@schibsted/advertory 3.3.8 → 3.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/aftenposten/cjs/index.js +1 -1
- package/aftenposten/es/{_auto-entry_aftenposten-Qv9rfBOr.js → _auto-entry_aftenposten-CvKHRCCO.js} +1 -1
- package/aftenposten/es/{events-pwCKJE-E.js → events-K5TGqdVC.js} +1 -1
- package/aftenposten/es/{index-CgHILqzl.js → index-2we84Xu-.js} +1 -1
- package/aftenposten/es/{index-Cm0nDUuy.js → index-BJKl5NKL.js} +1 -1
- package/aftenposten/es/{index-DmkjVlR4.js → index-BO8kkh2O.js} +1 -1
- package/aftenposten/es/{index-AlLrb170.js → index-C3Evdmqb.js} +1 -1
- package/aftenposten/es/{index-CtLrN1Pe.js → index-C4tq0QPF.js} +1 -1
- package/aftenposten/es/{index-cInS40fq.js → index-DKW9QzcY.js} +1 -1
- package/aftenposten/es/{index-BEZPIO7I.js → index-DPWbN-rj.js} +1 -1
- package/aftenposten/es/{index-LnDClHnb.js → index-DRbKV9pj.js} +1 -1
- package/aftenposten/es/index.js +1 -1
- package/aftenposten/es/{styles-DSVPTR6I.js → styles-BCjfx2vD.js} +1 -1
- package/aftenposten/es/{styles-9vm7IBmC.js → styles-BKoqUbxm.js} +1 -1
- package/aftenposten/es/{styles-BGDIYjb8.js → styles-Bn7xyJc1.js} +1 -1
- package/aftenposten/es/{styles-zjwrMCAl.js → styles-CDP15Rjj.js} +1 -1
- package/aftenposten/es/{styles-D7exavbg.js → styles-CIfFFodT.js} +1 -1
- package/aftenposten/es/{styles-BFlojOOY.js → styles-CWbsX0Yy.js} +1 -1
- package/aftenposten/es/{styles-gPqW7b_8.js → styles-CcySLf-2.js} +1 -1
- package/aftenposten/es/{styles-f4bfp4lX.js → styles-DZt4QFdh.js} +1 -1
- package/aftenposten/es/{styles-BSZHvf1Z.js → styles-S97MDec6.js} +1 -1
- package/aftenposten/es/{styles-CbzIMEmI.js → styles-zt6uRIKC.js} +1 -1
- package/aftenpostenv2/es/{_auto-entry_aftenpostenv2-n6iSa8_Q.js → _auto-entry_aftenpostenv2-Du8fmqX1.js} +1 -1
- package/aftenpostenv2/es/{events-B4ockA1H.js → events-ByrI1jlM.js} +1 -1
- package/{aftonbladetv2/es/index-oLvSJ2Aa.js → aftenpostenv2/es/index-BUnAX2mS.js} +1 -1
- package/aftenpostenv2/es/{index-kDRph_DX.js → index-BvUJwbYE.js} +1 -1
- package/aftenpostenv2/es/{index-DOHe2OZr.js → index-CMPinf81.js} +1 -1
- package/aftenpostenv2/es/{index-V5HC1ZJ8.js → index-Crgno0Kq.js} +1 -1
- package/aftenpostenv2/es/{index-CoZnGyXP.js → index-D52rsII2.js} +1 -1
- package/aftenpostenv2/es/{index-6UA1tfPp.js → index-D_PZTwDW.js} +1 -1
- package/aftenpostenv2/es/{index-DUAuJi_f.js → index-RcjbMhY6.js} +1 -1
- package/aftenpostenv2/es/{index-Du0fxvM-.js → index-wPECMhBC.js} +1 -1
- package/aftenpostenv2/es/index.js +1 -1
- package/aftenpostenv2/es/{styles-CzxVvt25.js → styles-BQVOwy62.js} +1 -1
- package/aftenpostenv2/es/{styles-C6VmL-be.js → styles-Bt_AfMQr.js} +1 -1
- package/aftenpostenv2/es/{styles-e9SgHmr0.js → styles-CACbrGOA.js} +1 -1
- package/aftenpostenv2/es/{styles-CGXfb9pY.js → styles-CPtE47Si.js} +1 -1
- package/aftenpostenv2/es/{styles-P-LV3zUD.js → styles-DDNLzCaV.js} +1 -1
- package/aftenpostenv2/es/{styles-Xp27LiJa.js → styles-DJpkAA-m.js} +1 -1
- package/aftenpostenv2/es/{styles-BnTSJ46G.js → styles-W8RPEdcF.js} +1 -1
- package/aftenpostenv2/es/{styles-BwGIiGrO.js → styles-_mVM9cGd.js} +1 -1
- package/aftenpostenv2/es/{styles-D0GTzboG.js → styles-k1DfyNAl.js} +1 -1
- package/aftenpostenv2/es/{styles-BIPyK5Z-.js → styles-rJ-WdTGI.js} +1 -1
- package/aftonbladet/cjs/index.js +1 -1
- package/aftonbladet/es/{_auto-entry_aftonbladet-BHUCvag1.js → _auto-entry_aftonbladet-ylPay0tC.js} +1 -1
- package/aftonbladet/es/{events-_gVIzkS8.js → events-DELkFYxa.js} +1 -1
- package/aftonbladet/es/{index-BnOkwsyg.js → index-BmA_wwQ8.js} +1 -1
- package/aftonbladet/es/{index-LSuE1Zjb.js → index-C9cjOyfo.js} +1 -1
- package/aftonbladet/es/{index-QWYsutyf.js → index-CWsyArzu.js} +1 -1
- package/aftonbladet/es/{index-C2qu_JeF.js → index-ClJg05Hr.js} +1 -1
- package/aftonbladet/es/{index-CaIingVM.js → index-DRvjhR3z.js} +1 -1
- package/aftonbladet/es/{index-BN2GIjG4.js → index-P97Ai1gt.js} +1 -1
- package/aftonbladet/es/{index-Sxcthfbs.js → index-lfdnClcB.js} +1 -1
- package/aftonbladet/es/{index-DZyIGrEU.js → index-vklYR8Ho.js} +1 -1
- package/aftonbladet/es/index.js +1 -1
- package/aftonbladet/es/{styles-9xz3aKk9.js → styles-B-3Dsyhf.js} +1 -1
- package/aftonbladet/es/{styles-dQQqAN5E.js → styles-B7hmF2YP.js} +1 -1
- package/aftonbladet/es/{styles-CNaky9Yo.js → styles-BUGI3pBl.js} +1 -1
- package/aftonbladet/es/{styles-DVyex5BX.js → styles-Cy7exo4u.js} +1 -1
- package/aftonbladet/es/{styles-D2_93lRD.js → styles-DCS0dI_k.js} +1 -1
- package/aftonbladet/es/{styles-CwT4stdD.js → styles-Dhwi6Qst.js} +1 -1
- package/aftonbladetv2/es/{_auto-entry_aftonbladetv2-D-R4kFRX.js → _auto-entry_aftonbladetv2-CICOFtTS.js} +1 -1
- package/aftonbladetv2/es/{events-CMy3gK7C.js → events-BwH02jOs.js} +1 -1
- package/aftonbladetv2/es/{index-BwbGX57v.js → index-BBi9SYIH.js} +1 -1
- package/aftonbladetv2/es/{index-DpU0beqG.js → index-BRU5ERfu.js} +1 -1
- package/{aftenpostenv2/es/index-B0qwdDAY.js → aftonbladetv2/es/index-BiA2-O_v.js} +1 -1
- package/aftonbladetv2/es/{index-BkPtOJ_R.js → index-C0nVsMox.js} +1 -1
- package/aftonbladetv2/es/{index-B2di1kJi.js → index-CEb5kS1Y.js} +1 -1
- package/aftonbladetv2/es/{index-BRYbhxik.js → index-CEz2skmG.js} +1 -1
- package/aftonbladetv2/es/{index-h3J2gadk.js → index-CFe-9G1y.js} +1 -1
- package/aftonbladetv2/es/{index-nVCpzdSc.js → index-CTwWYegQ.js} +1 -1
- package/aftonbladetv2/es/index.js +1 -1
- package/aftonbladetv2/es/{styles-D1IRRwiT.js → styles-B1_Nowmi.js} +1 -1
- package/aftonbladetv2/es/{styles-CaMP_UxD.js → styles-Ba4ZOZi3.js} +1 -1
- package/aftonbladetv2/es/{styles-mcgvmMlA.js → styles-C7xOf6bd.js} +1 -1
- package/aftonbladetv2/es/{styles-Ds6eML6Z.js → styles-CB7hFQgu.js} +1 -1
- package/aftonbladetv2/es/{styles-BgXARFvy.js → styles-CVO97hO2.js} +1 -1
- package/aftonbladetv2/es/{styles-y2zgW7kO.js → styles-I_9Mby3z.js} +1 -1
- package/bt/cjs/index.js +1 -1
- package/bt/es/{_auto-entry_bt-b_9UXZP4.js → _auto-entry_bt-dCnGXkfU.js} +1 -1
- package/bt/es/{events-T6iT1_ZZ.js → events-CCMBHKI7.js} +1 -1
- package/bt/es/{index-CoSV4xmd.js → index-B6Xob6f0.js} +1 -1
- package/bt/es/{index-C5va6Cbh.js → index-BUhVhfEq.js} +1 -1
- package/{sa/es/index-C8kXIaps.js → bt/es/index-BsQiDzj1.js} +1 -1
- package/bt/es/{index-BBoFi0am.js → index-DKP6Khyt.js} +1 -1
- package/bt/es/{index-CdZU_YOl.js → index-DZnaN4On.js} +1 -1
- package/{sa/es/index-DcevUzqA.js → bt/es/index-DjQY6XKA.js} +1 -1
- package/bt/es/{index-PlR1J6Ln.js → index-DsygItBi.js} +1 -1
- package/{sa/es/index-C0guWJaA.js → bt/es/index-Dzb8X0v1.js} +1 -1
- package/bt/es/index.js +1 -1
- package/bt/es/{styles-DVQXndfr.js → styles-B3Oqo-c_.js} +1 -1
- package/bt/es/{styles-RawCWSaA.js → styles-BcuiorMn.js} +1 -1
- package/bt/es/{styles-puVq7r95.js → styles-BjW2cAUE.js} +1 -1
- package/bt/es/{styles-6AyJkpFi.js → styles-BmoavBtt.js} +1 -1
- package/bt/es/{styles-CDUmYjyS.js → styles-BvX0F83Y.js} +1 -1
- package/{vg/es/styles-5LvcI4r2.js → bt/es/styles-C8_ztNtR.js} +1 -1
- package/{sa/es/styles-jBA1sRwj.js → bt/es/styles-DFW7YQ73.js} +1 -1
- package/{vg/es/styles-BmcAm-iy.js → bt/es/styles-DuG6KypD.js} +1 -1
- package/{sa/es/styles-BGxTGrwj.js → bt/es/styles-W-LVxEuJ.js} +1 -1
- package/btv2/es/{_auto-entry_btv2-BDaEBY8l.js → _auto-entry_btv2-Dp8BCk9J.js} +1 -1
- package/btv2/es/{events-ChQwJtgU.js → events-DGXZenFD.js} +1 -1
- package/btv2/es/{index-b0n3foL-.js → index-B1LkBn4K.js} +1 -1
- package/btv2/es/{index-HevuPBQ8.js → index-CyGWUgiJ.js} +1 -1
- package/btv2/es/{index-D_jO-cmq.js → index-DS5xftX2.js} +1 -1
- package/btv2/es/{index-B1v4sMOU.js → index-DSHXhZQw.js} +1 -1
- package/btv2/es/{index-Cgr-1RCn.js → index-F6tKH5jB.js} +1 -1
- package/btv2/es/{index-DGHdBN8s.js → index-G3yiM5or.js} +1 -1
- package/btv2/es/{index-Cx1BKAMt.js → index-uGO_7GeA.js} +1 -1
- package/btv2/es/{index-CmP3B_e6.js → index-v3IdX9m1.js} +1 -1
- package/btv2/es/index.js +1 -1
- package/{sav2/es/styles-BmLNv-2o.js → btv2/es/styles-0YbRh-QG.js} +1 -1
- package/btv2/es/{styles-5-UQopRf.js → styles-BTfnoOwo.js} +1 -1
- package/{sav2/es/styles-Dyc5UXXl.js → btv2/es/styles-Bot1TZLd.js} +1 -1
- package/{vgv2/es/styles-BmaId4oN.js → btv2/es/styles-C27vtJtB.js} +1 -1
- package/btv2/es/{styles-DtJecDZ3.js → styles-CHqsZlPI.js} +1 -1
- package/{sav2/es/styles-BmoJBA0N.js → btv2/es/styles-CSTZOH7c.js} +1 -1
- package/{sav2/es/styles-OZ8qIB12.js → btv2/es/styles-CeuX2AGS.js} +1 -1
- package/{sav2/es/styles-DUs9ujWq.js → btv2/es/styles-PK3cvDMW.js} +1 -1
- package/e24/es/{_auto-entry_e24-GKEZimHz.js → _auto-entry_e24-CZbAR2Lm.js} +1 -1
- package/e24/es/{events-DaCxZcb5.js → events-DtP9KS0Z.js} +1 -1
- package/e24/es/{index-C2FXDBf5.js → index-AjYLCdma.js} +1 -1
- package/e24/es/{index-CxPpmDRN.js → index-BA_wNs6u.js} +1 -1
- package/e24/es/{index-C5XiPG1f.js → index-BB--3x3S.js} +1 -1
- package/e24/es/{index-DiyOLCQ6.js → index-BB_BnAWW.js} +1 -1
- package/e24/es/{index-CdJOx5Iw.js → index-BFJg7EWT.js} +1 -1
- package/e24/es/{index-C2pD-Cy2.js → index-DMQvIGRC.js} +1 -1
- package/e24/es/{index-OSKClz7n.js → index-EiqEuWw_.js} +1 -1
- package/e24/es/{index-XgbycLWm.js → index-n93B64xR.js} +1 -1
- package/e24/es/index.js +1 -1
- package/e24/es/{styles-CmGD82dB.js → styles-BJ2pjatL.js} +1 -1
- package/e24/es/{styles-DzchC7kz.js → styles-Bix6eSsW.js} +1 -1
- package/e24/es/{styles-ga-HbzFr.js → styles-BwZWmxEh.js} +1 -1
- package/e24/es/{styles-CFDl6hLn.js → styles-C0Id6UFg.js} +1 -1
- package/e24/es/{styles-BV7hlv15.js → styles-CCD31X0P.js} +1 -1
- package/{tv4/es/styles-BjmPCWLv.js → e24/es/styles-CboVn9s2.js} +1 -1
- package/e24/es/{styles-UASxV28G.js → styles-CrKAY2ty.js} +1 -1
- package/e24/es/{styles-Mr5izHfF.js → styles-CtJ5Otd9.js} +1 -1
- package/e24/es/{styles-BI-XpK7u.js → styles-CyR2HFhH.js} +1 -1
- package/e24/es/{styles-D2ikTGnU.js → styles-oFIRcNfJ.js} +1 -1
- package/e24/es/{styles-DJdVJ-rH.js → styles-sPt9wDDk.js} +1 -1
- package/fotbollskanalen/cjs/index.js +1 -1
- package/fotbollskanalen/es/{_auto-entry_fotbollskanalen-CJVIUt-a.js → _auto-entry_fotbollskanalen-C8-cTEyW.js} +1 -1
- package/fotbollskanalen/es/{events-JwtvBiMk.js → events-DpKQKCjw.js} +1 -1
- package/fotbollskanalen/es/{index-CFFKKpsD.js → index-C51AtXU3.js} +1 -1
- package/fotbollskanalen/es/{index-B5r6RbNT.js → index-CKyNifUt.js} +1 -1
- package/fotbollskanalen/es/{index-BMJwXFsf.js → index-CQtjMdSU.js} +1 -1
- package/fotbollskanalen/es/{index-CYMsPpaX.js → index-ChyjBYj7.js} +1 -1
- package/fotbollskanalen/es/{index-u5AZrx1j.js → index-CydH9dZY.js} +1 -1
- package/fotbollskanalen/es/{index-i9Z2quuf.js → index-D0U5M4SB.js} +1 -1
- package/fotbollskanalen/es/{index-3uWhw5VA.js → index-DAqrbqrM.js} +1 -1
- package/fotbollskanalen/es/{index-L9s7iWEG.js → index-DPynYd4W.js} +1 -1
- package/fotbollskanalen/es/index.js +1 -1
- package/fotbollskanalen/es/{styles-CbrSJGYP.js → styles-IU4Kf7zt.js} +1 -1
- package/godare/cjs/index.js +1 -1
- package/godt/cjs/index.js +1 -1
- package/klart/cjs/index.js +1 -1
- package/koket/cjs/index.js +1 -1
- package/koket/es/{_auto-entry_koket-82pQVEHL.js → _auto-entry_koket-BFprpBJH.js} +1 -1
- package/koket/es/{events-C3UkJCmi.js → events-BW0ey0SL.js} +1 -1
- package/{svdv2/es/index-CDXg3M9r.js → koket/es/index-3DXIyM5C.js} +1 -1
- package/koket/es/{index-CDSnUYgU.js → index-Brq0RLPS.js} +1 -1
- package/koket/es/{index-CRDJB0wD.js → index-BsrTwQyK.js} +1 -1
- package/koket/es/{index-CUvdLWjA.js → index-CJWHd-Yl.js} +1 -1
- package/koket/es/{index-B8pCWpk_.js → index-DEnSog2c.js} +1 -1
- package/koket/es/{index-D4oOCUCI.js → index-DJOFIeoz.js} +1 -1
- package/koket/es/{index-BvoSUwd9.js → index-DpwRCnxG.js} +1 -1
- package/koket/es/{index-C4Je3IoQ.js → index-_ESMVp5I.js} +1 -1
- package/koket/es/index.js +1 -1
- package/{svdv2/es/styles-BH8EULbS.js → koket/es/styles-DkTmPJd8.js} +1 -1
- package/minmote/cjs/index.js +1 -1
- package/package.json +1 -1
- package/pent/cjs/index.js +1 -1
- package/sa/cjs/index.js +1 -1
- package/sa/es/{_auto-entry_sa-Dft7eHST.js → _auto-entry_sa-Dof3rn_Z.js} +1 -1
- package/sa/es/{events-CI-NBDQ3.js → events-4GAIrfnQ.js} +1 -1
- package/sa/es/{index-BxW2nIae.js → index-BD4UCe-J.js} +1 -1
- package/sa/es/{index-BBryFuMR.js → index-BkNxRKAw.js} +1 -1
- package/sa/es/{index-Ch9Cxg35.js → index-CRvTfv8V.js} +1 -1
- package/{bt/es/index-CECUWhMj.js → sa/es/index-Ct9TCsUz.js} +1 -1
- package/sa/es/{index-CLRMHMUJ.js → index-D8XHuENs.js} +1 -1
- package/{bt/es/index-quartLdQ.js → sa/es/index-DRnNhdcj.js} +1 -1
- package/sa/es/{index-Hx5tCjoh.js → index-DhbcbOtI.js} +1 -1
- package/{bt/es/index-B6UFLd-F.js → sa/es/index-DsVeP7TL.js} +1 -1
- package/sa/es/index.js +1 -1
- package/{bt/es/styles-QhftGMUO.js → sa/es/styles-Bi6deTcA.js} +1 -1
- package/sa/es/{styles-DZ5UhdXS.js → styles-Bl5eZvQN.js} +1 -1
- package/{vg/es/styles-Cb18IW2E.js → sa/es/styles-C1dAVKNv.js} +1 -1
- package/{bt/es/styles-B-ap7sIA.js → sa/es/styles-C3Ky-yI7.js} +1 -1
- package/sa/es/{styles-DgpdMDSk.js → styles-CA_Tnetf.js} +1 -1
- package/sa/es/{styles-v-5imuFK.js → styles-CsTooD54.js} +1 -1
- package/{bt/es/styles-Bbop1C0_.js → sa/es/styles-D66xRCz2.js} +1 -1
- package/{vg/es/styles-CEAaiuaJ.js → sa/es/styles-DlLE4574.js} +1 -1
- package/sa/es/{styles-KlpEAEax.js → styles-YEeDuXr7.js} +1 -1
- package/sav2/es/{_auto-entry_sav2-BoLqEIWP.js → _auto-entry_sav2-BDujqIPg.js} +1 -1
- package/sav2/es/{events-CgcK6eEs.js → events-DU_QWR86.js} +1 -1
- package/sav2/es/{index-wIi3ktvz.js → index-1MilmQGi.js} +1 -1
- package/sav2/es/{index-CvnnrNWI.js → index-DBXWuaDC.js} +1 -1
- package/sav2/es/{index-BBN69zD7.js → index-DPaqKemq.js} +1 -1
- package/sav2/es/{index-DVQ3oHwT.js → index-DbfTMaqA.js} +1 -1
- package/sav2/es/{index-BYwGf6aN.js → index-DwRyjPTk.js} +1 -1
- package/sav2/es/{index-S9UvUKn9.js → index-TSJ3nEho.js} +1 -1
- package/sav2/es/{index-D-lMSA2j.js → index-TrtVpF5r.js} +1 -1
- package/sav2/es/{index-DCnngrL2.js → index-WwIqMBOy.js} +1 -1
- package/sav2/es/index.js +1 -1
- package/sav2/es/{styles-j4mMmbKv.js → styles-B9lUxU2m.js} +1 -1
- package/{vgv2/es/styles-Ca-LpQWp.js → sav2/es/styles-BGB9VWIM.js} +1 -1
- package/{btv2/es/styles-D18PZlYE.js → sav2/es/styles-CRINfCEP.js} +1 -1
- package/sav2/es/{styles-CK8h19us.js → styles-CT_w5GEn.js} +1 -1
- package/{vgv2/es/styles-5H9KRtMR.js → sav2/es/styles-CzuukRt0.js} +1 -1
- package/{btv2/es/styles-DPH0aBZH.js → sav2/es/styles-DeRKpUTf.js} +1 -1
- package/{btv2/es/styles-BFF17qmy.js → sav2/es/styles-pkuJ3Yzw.js} +1 -1
- package/{vgv2/es/styles-CCKWTOhy.js → sav2/es/styles-t2IIkC9h.js} +1 -1
- package/svd/cjs/index.js +1 -1
- package/svd/es/{_auto-entry_svd-uqU5Rjx3.js → _auto-entry_svd-BKYvJkTf.js} +1 -1
- package/svd/es/{events-sOUBRFEK.js → events-BKMFLFU_.js} +1 -1
- package/svd/es/{index-mvGwbawp.js → index-2f6BXDxQ.js} +1 -1
- package/svd/es/{index-BpZ43530.js → index-BIAOjCgD.js} +1 -1
- package/svd/es/{index-WzbhHajN.js → index-BKmosnmU.js} +1 -1
- package/svd/es/{index-C4eApdD-.js → index-DEJtVR4t.js} +1 -1
- package/svd/es/{index-D4M_gHEC.js → index-DgKBqr5R.js} +1 -1
- package/svd/es/{index-B9kESXzJ.js → index-DlxID0Cs.js} +1 -1
- package/{tv4/es/index-Bxg2Gli-.js → svd/es/index-DqyqGKzj.js} +1 -1
- package/svd/es/{index-CbMNUr6i.js → index-Dxqm-jmz.js} +1 -1
- package/svd/es/index.js +1 -1
- package/svd/es/{styles-BjJtubaC.js → styles-BEfyMH0J.js} +1 -1
- package/svd/es/{styles-DeE4Lb6o.js → styles-BZS6s3iA.js} +1 -1
- package/svd/es/{styles-CbLlti7y.js → styles-BfBefeB2.js} +1 -1
- package/svd/es/{styles-CjK7BoJ2.js → styles-BjHdGThY.js} +1 -1
- package/svd/es/{styles-DyTVS4FO.js → styles-DV2zCyz3.js} +1 -1
- package/svd/es/{styles-CS_Oc9-e.js → styles-Hzl0yHZy.js} +1 -1
- package/svdv2/es/{_auto-entry_svdv2-nEzDRpA8.js → _auto-entry_svdv2-D0crZ9AS.js} +1 -1
- package/svdv2/es/{events-C6hgNlIz.js → events-BibjiSuU.js} +1 -1
- package/svdv2/es/{index-DGQb7LiH.js → index-Cy_6A7Wo.js} +1 -1
- package/svdv2/es/{index-__nlcHFH.js → index-DPVqMmtM.js} +1 -1
- package/svdv2/es/{index-Cgpup7VX.js → index-DPXjQ-J1.js} +1 -1
- package/svdv2/es/{index-BFEcyt6p.js → index-DaMJ9dCF.js} +1 -1
- package/{koket/es/index-DUTDuEYy.js → svdv2/es/index-FMQMYkmE.js} +1 -1
- package/svdv2/es/{index-BHq7KYUK.js → index-MksB2euI.js} +1 -1
- package/svdv2/es/{index-HTlsRgZ4.js → index-PQQhasxL.js} +1 -1
- package/svdv2/es/{index-DULy3Iny.js → index-oLbh23gZ.js} +1 -1
- package/svdv2/es/index.js +1 -1
- package/svdv2/es/{styles-G-aHKzxd.js → styles-CRxF5z68.js} +1 -1
- package/svdv2/es/{styles-lkLidNOo.js → styles-CxLfUt44.js} +1 -1
- package/svdv2/es/{styles-BNl0piT3.js → styles-D8qOfEPl.js} +1 -1
- package/svdv2/es/{styles-CHCOnfkw.js → styles-Daf4AQZh.js} +1 -1
- package/{koket/es/styles-B0mmVsx8.js → svdv2/es/styles-DeD7K_od.js} +1 -1
- package/svdv2/es/{styles-DKqBGuy_.js → styles-jU2FuvEW.js} +1 -1
- package/svdv2/styles.css +1 -1
- package/tek/cjs/index.js +1 -1
- package/tv4/cjs/index.js +1 -1
- package/tv4/es/{_auto-entry_tv4-DjJWRd05.js → _auto-entry_tv4-CrPl4xhP.js} +1 -1
- package/tv4/es/{events-DjYzwQwI.js → events-CblkBHSp.js} +1 -1
- package/tv4/es/{index-BzYmmv77.js → index-BHTKcK3C.js} +1 -1
- package/tv4/es/{index-DG2-sgEh.js → index-CS-DBTcy.js} +1 -1
- package/tv4/es/{index-DddVk17I.js → index-CfoXZoun.js} +1 -1
- package/tv4/es/{index-BzLF3DDV.js → index-D97onAi5.js} +1 -1
- package/tv4/es/{index-DQ3i-R55.js → index-DBtchzRY.js} +1 -1
- package/tv4/es/{index-CY8CnoVx.js → index-Dso58zTx.js} +1 -1
- package/{svd/es/index-DycilyaY.js → tv4/es/index-hfmsWoBI.js} +1 -1
- package/tv4/es/{index-Dl_E6qQT.js → index-truyNJK1.js} +1 -1
- package/tv4/es/index.js +1 -1
- package/{e24/es/styles-dcacab0B.js → tv4/es/styles-CRt5PDsA.js} +1 -1
- package/tvnu/cjs/index.js +1 -1
- package/vg/cjs/index.js +1 -1
- package/vg/es/{_auto-entry_vg-CJptTsjc.js → _auto-entry_vg-CKwg8Voi.js} +1 -1
- package/vg/es/{events-BQQ-8EpB.js → events-C_e4_daY.js} +1 -1
- package/vg/es/{index-CA7GJmDd.js → index-4qrcexjh.js} +1 -1
- package/vg/es/{index-CrLHBcfF.js → index-BegwwuYk.js} +1 -1
- package/vg/es/{index-6OjVrqVW.js → index-CMXefnRw.js} +1 -1
- package/vg/es/{index--oAC36uC.js → index-CZlUZahU.js} +1 -1
- package/vg/es/{index-_m-2D1wF.js → index-CjWmVf-e.js} +1 -1
- package/vg/es/{index-B2TPUyZl.js → index-DRm-LHaq.js} +1 -1
- package/vg/es/{index-DQ2YSD8Q.js → index-DpYE1TNQ.js} +1 -1
- package/vg/es/{index-DeZqU4Tt.js → index-nlGlEfZY.js} +1 -1
- package/vg/es/index.js +1 -1
- package/vg/es/{styles-CI6oqGuO.js → styles-57AritH8.js} +1 -1
- package/vg/es/{styles-DXH8jjFU.js → styles-B9JZfGvG.js} +1 -1
- package/vg/es/{styles-CnLlAd0C.js → styles-BCZihi7B.js} +1 -1
- package/vg/es/{styles-DXbyd0ii.js → styles-BOL_EUBH.js} +1 -1
- package/{sa/es/styles-DSHh2WzV.js → vg/es/styles-Bn0GGqED.js} +1 -1
- package/{sa/es/styles-Djz90Jfv.js → vg/es/styles-CFo0wic1.js} +1 -1
- package/vg/es/{styles-B9caWz6X.js → styles-CN7DSjAQ.js} +1 -1
- package/vg/es/{styles-DfWwYvbP.js → styles-DSyisYaa.js} +1 -1
- package/vg/es/{styles-Cwg7bCrd.js → styles-DVd9zYXf.js} +1 -1
- package/vg/es/{styles-DgZzx3j7.js → styles-DyEmHAVO.js} +1 -1
- package/vg/es/{styles-7XWb68Xr.js → styles-Uc7KvFEF.js} +1 -1
- package/{sa/es/styles-CuBhqwD_.js → vg/es/styles-_78cWeya.js} +1 -1
- package/vg/es/{styles-Bd7rgXb-.js → styles-cSiXYyOD.js} +1 -1
- package/{bt/es/styles-DdWpnEau.js → vg/es/styles-eMH82R03.js} +1 -1
- package/vg/es/{styles-BhGsK1qQ.js → styles-kzJKDSH7.js} +1 -1
- package/vgv2/es/{_auto-entry_vgv2-Dx9SvjFp.js → _auto-entry_vgv2-C0xclaJH.js} +1 -1
- package/vgv2/es/{events-DLgQS-yg.js → events-CFtZDoQ2.js} +1 -1
- package/vgv2/es/{index-B8E3WtjH.js → index-B5ZQ9JLf.js} +1 -1
- package/vgv2/es/{index-CUamoIeq.js → index-BBbnwfus.js} +1 -1
- package/vgv2/es/{index-B5PTUAsb.js → index-BnEu_EIp.js} +1 -1
- package/vgv2/es/{index-BPeqY16o.js → index-CAlD1eMo.js} +1 -1
- package/vgv2/es/{index-BenODF5V.js → index-CkEsACEf.js} +1 -1
- package/vgv2/es/{index-B0_M_Iwc.js → index-Ct_MDoiP.js} +1 -1
- package/vgv2/es/{index-Du7eaA85.js → index-DnUvADH_.js} +1 -1
- package/vgv2/es/{index-CyYlX0Ro.js → index-M40ItMc-.js} +1 -1
- package/vgv2/es/index.js +1 -1
- package/vgv2/es/{styles-CzC3G_1B.js → styles-BNV9TS_8.js} +1 -1
- package/vgv2/es/{styles-CHn_r2LQ.js → styles-BPdVR7eg.js} +1 -1
- package/vgv2/es/{styles-BO5zUdwS.js → styles-BQpItznY.js} +1 -1
- package/vgv2/es/{styles-rECwN9TT.js → styles-BfQLGNcP.js} +1 -1
- package/vgv2/es/{styles-DOjzFU0B.js → styles-CAeDozZQ.js} +1 -1
- package/vgv2/es/{styles-CdfXf-rQ.js → styles-CSGFhcNL.js} +1 -1
- package/vgv2/es/{styles-Blouhj8g.js → styles-CTldsmEE.js} +1 -1
- package/{btv2/es/styles-kE-1AsMN.js → vgv2/es/styles-DBdzlow_.js} +1 -1
- package/vgv2/es/{styles-CRqRi1y6.js → styles-DaVzgBpU.js} +1 -1
- package/vgv2/es/{styles-DAgcjWI7.js → styles-DdVHqfci.js} +1 -1
- package/{btv2/es/styles-B_X262Hu.js → vgv2/es/styles-Dea_yKo_.js} +1 -1
- package/{btv2/es/styles-DbdMTwU0.js → vgv2/es/styles-Dn01sjRm.js} +1 -1
- package/vgv2/es/{styles-BkVJk41Q.js → styles-IR2A_M9n.js} +1 -1
- package/vgv2/es/{styles-DTS_1bwK.js → styles-twi4k4UI.js} +1 -1
- package/{sav2/es/styles-D78ZtG-C.js → vgv2/es/styles-yIakLglf.js} +1 -1
package/pent/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t,n=require("react/jsx-runtime");function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o=i(function(){if(t)return e;t=1;var n=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map(function(e){return o(e,n)})}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function d(e,t){try{return t in e}catch(e){return!1}}function s(e,t,n){var i={};return n.isMergeableObject(e)&&a(e).forEach(function(t){i[t]=o(e[t],n)}),a(t).forEach(function(r){(function(e,t){return d(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(d(e,r)&&n.isMergeableObject(t[r])?i[r]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(r,n)(e[r],t[r],n):i[r]=o(t[r],n))}),i}function l(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||n,i.cloneUnlessOtherwiseSpecified=o;var a=Array.isArray(t);return a===Array.isArray(e)?a?i.arrayMerge(e,t,i):s(e,t,i):o(t,i)}return l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},e=l}());const r=["placements","takeover","refreshConfig","editory"],a={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},d=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},s=(e,t)=>{console.warn("[Advertory WARN]: ",e)},l=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:i,appearanceConfig:o}=null!=e?e:{};(null==t?void 0:t.publisher)||s("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||s("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||s("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||s("pageContext.deviceType is required."),n||s("pageOptions is required."),i||s("placements is required."),(null==o?void 0:o.defaultThreshold)||s("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,i,o;const r=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(i=e.fullscreenScroll)||void 0===i?void 0:i.enabled),property:"main",featureName:"fullscreenScroll"},{flag:!!(null===(o=e.widescreenSwitching)||void 0===o?void 0:o.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==r?void 0:r[t])&&s(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},c=6;class u{set(e){l(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of r){const i=e[n];void 0!==i&&(t[n]=i)}Object.assign(this.config,t),Object.prototype.hasOwnProperty.call(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.prototype.hasOwnProperty.call(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.prototype.hasOwnProperty.call(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=o(u.DEFAULT_SITE_HANDLERS,e)}}u.DEFAULT_SITE_HANDLERS={siteEvents:a,initNativeAd:function(){}};const p=new u,v=p.modifyConfigProperties.bind(p),g={NO:"no",SE:"se"},h=e=>e===g.NO?"no-sno":"se-generic";let m="";const y=new Map,f=e=>{const{pageSetup:{tag:t}={}}=p.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(m!==window.location.pathname&&(y.clear(),m=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),i=null!==(t=y.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${(()=>{const{pageContext:{countryCode:e,publisher:t}}=p.get();return`${e}-${t}`})()}-count`]=i,y.set(n,i+1),e})):e},w=e=>{const t=e.split("-"),n=t[t.length-1];return 6===n.length&&n.match(/^[a-zA-Z0-9]+$/)?t.slice(0,-1).join("-"):e},b="0123456789abcdefghijklmnopqrstuvwxyz",x=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=b[Math.floor(36*Math.random())]}return t},k=e=>{window.apntag.anq.push(e)},E=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),C=new Promise(e=>{if("undefined"==typeof document||!document.hidden)return void e();const t=()=>{document.hidden||(document.removeEventListener("visibilitychange",t),e())};document.addEventListener("visibilitychange",t,{once:!0})}),I="advertory-wallpaper-background",T="advertory-with-horseshoe",S=()=>{const e=document.querySelector(`.${I}`);e&&e.remove()},A=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${I}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},P=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,O=e=>P.test(e),j=e=>e.startsWith("wallpaper:color:"),_=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundImage=`url(${e})`)},L=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundColor=e)};var $=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(T),n.classList.add(T))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{wallpaperAnchorSelector:n}={}}=t;(()=>{S();const e=document.createElement("div");e.classList.add(I),document.body.appendChild(e),e.style.setProperty("position","fixed"),e.style.setProperty("width","100%"),e.style.setProperty("height","calc(100% - var(--header-height, 0px) - 15px)"),e.style.setProperty("background-position","center top"),e.style.setProperty("background-repeat","no-repeat")})(),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(A(n),window.addEventListener("scroll",()=>A(n)))})(n),e()},isShortWallpaperColorMessage:j,isShortWallpaperUrlMessage:O,removeWallpaperBackground:S,setWallpaperBackgroundColor:L,setWallpaperBackgroundImage:_});const N=e=>new URLSearchParams(window.location.search).get(e),q="takeover",D="native_override_desc2",M=()=>null!==N("disable_prebid"),F=e=>{if("0"===N("collapse_ad"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&S())},B=e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))};class R{initialize(){this.DATA=Object.assign({},R.INITIAL_DATA)}getData(e){if(!this.DATA)throw new Error("Storage was accessed with invalid data.");return this.DATA[e]}setData(e,t){if(!this.DATA)throw new Error("Storage was accessed before it had been initialized.");this.DATA[e]=Object.assign(Object.assign({},this.DATA[e]),t)}}R.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const U=new R,z=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,i=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${i}px`)},V=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=U.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=i},H=()=>{S();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{F(e.id),V(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),i=null==t?void 0:t.getAttribute("data-probable-width");n&&i&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",i+"px"))})(e.id),e.innerHTML="",e.id=w(e.id)}),k(()=>window.apntag.clearRequest())},W="noGroupedPlacements",K=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},G=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},J=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:i,pageContext:{deviceType:o}}=p.get(),r=n[o].filter(G)||[],a=e?document.querySelector(e):document;if(!a)return[];const d=r.reduce((e,t)=>{const n=K(t.targetId);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=r.filter(({targetId:e})=>e.match(t)),d=(null==i?void 0:i.queryByDataDeviceAttribute)?`div[id^="${e}"][data-device=${o}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,s=a.querySelectorAll(d),l=Array.from(s).filter(({id:e})=>e.match(t)).map((e,t)=>{var i;const o=Q(e,t,n),r=o.finnBlink&&!o.finnBlink.renderOnlyWithAdBlock,a=r&&(null===(i=o.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink),d=`${e.id}-${x(6)}`;return e.id=d,e.setAttribute("data-advertory-ad-rendered","true"),r&&e.setAttribute("data-is-finn-blink-placement","true"),a&&e.setAttribute("data-is-finn-blink-only-placement","true"),(e=>{var t;const n=e.id;n&&U.setData("initialClassNames",{[n]:{wrapper:null===(t=e.parentElement)||void 0===t?void 0:t.className.split(" "),container:e.className.split(" ")}})})(e),Object.assign(Object.assign({},o),{targetId:d})});return f(l)});return(e=>{const t=Array.from(document.querySelectorAll('div[class^="advertory"]'));return e.sort((e,n)=>t.findIndex(t=>t.id===e.targetId)-t.findIndex(e=>e.id===n.targetId))})(d)},Q=(e,t,n)=>{const i=n[t],o=n[n.length-1],r=n.filter(({targetId:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==i?void 0:i.targetId)?i:(null==e?void 0:e.id)===(null==o?void 0:o.targetId)?o:r||o},X=e=>{const{queryConfig:{placementBatches:t}={},pageContext:{deviceType:n}}=p.get(),i=(null==t?void 0:t[n])||{},o=Object.values(i).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=w(e.targetId);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[i,o]of Object.entries(t))n[i]=e.filter(e=>o.includes(w(e.targetId)));return n})(e,i),d=Object.keys(r),s=((e,t)=>e.filter(e=>!t.has(w(e.targetId))))(e,new Set([...d,...o]));return Object.assign(Object.assign(Object.assign({},a),r),{[W]:s})},Y="ABSOLUTE_FULLSCREEN",Z="ANY_FULLSCREEN",ee="NINESIXTEEN",te="FULLWIDTH",ne="FULLSQUARE",ie="TAKEOVER",oe="VELVET_TAKEOVER",re="WALLPAPER",ae="COLLAPSE",de={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],NINESIXTEEN:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],FULLSQUARE:[{width:1080,height:1080}],NATIVE_AD:[{width:1,height:1}],TAKEOVER:[{width:4,height:4}],VELVET_TAKEOVER:[{width:7,height:7}],WALLPAPER:[{width:2,height:2}],COLLAPSE:[{width:2,height:1}]},se={wallpaper:1600,"l-format":1600},le=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&Ee(e,Z)},ce=e=>{const{native:t}=e;return!!t},ue=e=>Ee(e,te),pe=e=>{const{targetId:t}=e;return t.includes("takeover")||Ee(e,ie)},ve=e=>Ee(e,ie),ge=e=>Ee(e,re),he=e=>Ee(e,ae),me=e=>e.targetId.includes("sponsorstripe"),ye=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},fe=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),we=e=>e.targetId.startsWith("midboard"),be=e=>e.targetId.includes("widescreen"),xe=e=>e.width>=1260&&e.width<=1280,ke=e=>e.width>=1600&&e.width<=1620,Ee=(e,t)=>{const n=de[t];if(!n)return!1;return!!n.find(t=>{var n,i;const o=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,a=t.width===o,d=!t.height||t.height===r;return a&&d})};function Ce(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function Ie(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{s(i.next(e))}catch(e){r(e)}}function d(e){try{s(i.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,d)}s((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const Te=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return d("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(d("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{d("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{d("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);d("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),Se="cmp:loaded";let Ae="undefined"!=typeof window?window._tcf_:void 0,Pe=!1;const Oe=(e,t,n)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,r=N("bypass_tcf"),a=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(d("TCF bypass param detected, returning consent: true"),!0):(d("TCF is not enabled, returning consent: true"),!0))(i,r))return!0;if(Pe)return null;if(!Ae)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=Ae.getConsentedToAllSync();return d(`TCF consented to all is: ${t}`),Ae.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(d("Getting TCF consent manager..."),window._tcf_)return d("TCF consent manager is already available"),Ae=window._tcf_,void e(Ae);d("TCF consent manager is not available");const n=()=>{d("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(Ae=window._tcf_,e(Ae)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(Se,n),Pe=!0,t(new Error("Timeout waiting for CMP to load"))},o);d("Listening for CMP loaded event..."),document.addEventListener(Se,n,{once:!0})}):Promise.resolve(null),getConsentSync:a,getConsentAsync:()=>Ie(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return d(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.SE,i=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.NO;if(t||i)return d("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield Te(e);if(!(null==e?void 0:e.enabled))return!0;const r=a();return null!==r?r:yield new Promise((e,t)=>{try{if(!Ae)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{d("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);Ae.onTcfReady(()=>{d("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),Ae.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},je=(e,t,n,...i)=>Ie(void 0,[e,t,n,...i],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return d(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return d(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=Oe(e,0,n);return(yield o())?(d(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(d(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),_e=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},Le=e=>Ie(void 0,void 0,void 0,function*(){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e,{getConsentAsync:o}=Oe(t,0,i);if(!(yield o()))return;const r=_e("_pulse2data");return r?r.split(",")[9]:void 0}),$e=()=>{const e=_e("_pulse2data");return e?e.split(",")[2]:void 0},Ne="splash",qe="welcomePage",De="topscroller",Me="velvet",Fe=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const i=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),o=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,o).toString()},Be="takeover-displayed",Re="takeover-visit-count",Ue=14400,ze=()=>{const e=_e(Re);return e?parseInt(e):0},Ve=()=>{const e=ze(),{takeover:{options:{cookieCapTime:t=Ue}={}}={}}=p.get(),n=document.location.hostname;window.document.cookie=`${Re}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},He=()=>{const{takeover:{enabled:e=!1,options:{secondVisitEnabled:t=!1}={}}={}}=p.get();return"0"!==N(q)&&("1"===N(q)||!(!e||(()=>{var e,t;const n=(null===(t=null===(e=p.get().takeover)||void 0===e?void 0:e.options)||void 0===t?void 0:t.cookieCapName)||Be;return"true"===_e(n)})())&&(!t||We()))},We=()=>{const e=ze();return 0===e?(Ve(),!1):1===e},Ke=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),Ge=()=>{const{takeover:e}=p.get();return Boolean(null==e?void 0:e.topscroller)},Je=e=>{const{width:t,height:n}=e;return Ke(t,n)?Ne:Ee(e,oe)?Me:Ge()?De:qe},Qe=()=>Ie(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{options:{cookieCapName:t=Be,cookieCapTime:n=Ue}={}}={},pageContext:{isMobileApp:i,countryCode:o},tcf:r}=p.get(),a=yield je(r,i,o,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),Xe=e=>{var t,n;const i=!!(null===(n=null===(t=p.get().takeover)||void 0===t?void 0:t.options)||void 0===n?void 0:n.setCookieCapForNotShownAd);return pe(e)&&i},Ye=(e,t)=>{var n;if(t===De){const{topscroller:t}=e;return null!=t?t:{}}if(t===Ne){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Ze=(e,t)=>{t!==Ne?(e=>{var t,n;const i=null===(t=p.get().pageSectionsSelectors)||void 0===t?void 0:t.header,o=null===(n=p.get().takeover)||void 0===n?void 0:n.topscroller;if(!i||o)return;const r=document.querySelector(i),a=document.querySelector(".welcome-page-wrapper"),d=document.querySelector(`#${e.targetId}`),s=document.querySelector(".advertory-welcome-page-scroll");if(!(r&&a&&s&&d))return;const l=null==r?void 0:r.offsetHeight,c=ve(e)?"60svh":`calc(100svh - ${l}px)`,u=ve(e)?"calc(40svh + 30px)":`calc(${l}px + 30px)`;a.style.setProperty("height",c,"important"),d.style.setProperty("height",c,"important"),s.style.setProperty("bottom",u,"important")})(e):(e=>{var t;if(!(null===(t=p.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),i=document.querySelector(`#${e.targetId}`);if(!n||!i)return;const o=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",o,"important")})(e)},et=Fe([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n .adform-adbox {\n height: 100% !important;\n width: 100% !important;\n }\n img {\n height: 100% !important;\n width: 100% !important;\n object-fit: cover !important;\n object-position: top !important;\n }\n ",e.contentDocument.head.appendChild(t)})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})});var tt=Object.freeze({__proto__:null,addTakeoverCookie:Qe,adjustTakeoverHeight:Ze,canDisplayTakeover:He,getProperWelcomePageConfig:Ye,getTakeoverVariant:Je,handleTakeoverCookieOnAdNotShown:e=>Ie(void 0,void 0,void 0,function*(){Xe(e)&&(yield Qe())}),incrementArticleVisitCount:Ve,isSplashVariant:Ke,isTopscroller:Ge,scaleAd:et,shouldAddTakeoverCookieForNotShownAd:Xe});const nt={nativeAd:e=>ce(e)&&!me(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:ue,fullscreenScroll:le,topscroller:e=>pe(e)&&Ge(),splash:e=>pe(e)&&Ke(e.width,e.height),welcomePage:pe,wallpaper:ge,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:xe,hFormat:ke,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!ke(e)&&!xe(e),topboard:e=>e.targetId.startsWith("topboard")&&!pe(e),widescreen:be,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:me,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!fe(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!we(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:fe,midboard:we},it=({adObj:e,preferredTestIdData:t})=>{var n,i;const o=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!o)return;const r=null===(i=document.querySelector(`#${o}`))||void 0===i?void 0:i.parentElement;if(!r)return;if(((e,t)=>{var n,i,o,r;const a=null===(r=null===(o=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===o?void 0:o[e])||void 0===r?void 0:r.invCode;a&&(t.dataset.invCode=a)})(o,r),null==t?void 0:t.testId)return void(r.dataset.testid=t.testId);const a="DIV"===(null==r?void 0:r.tagName);e&&a&&((e,t)=>{var n,i;for(const[o,r]of Object.entries(nt))if(r(e)){if("nativeAd"===o){const r="default";t.dataset.testid=`${o}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:r}`;break}t.dataset.testid=o;break}})(e,r)},ot=e=>{var t;return(null===(t=Object.entries(nt).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},rt="mobile",at="tablet",dt="desktop",st="web_desktop",lt="web_phone",ct="wde",ut="wph",pt=()=>{const e=window.navigator.userAgent.toLowerCase(),t=[["win","windows"],["macintosh","macos"],["x11","linux"],["android","android"],["ipad","ios"],["iphone","ios"]].find(([t])=>e.includes(t));return t?t[1]:"unknown"},vt=e=>e===rt,gt=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},ht=(e,t=window.screen.width,n,i)=>{const o=gt(e,t);if(n&&n(e,o),i)return void i(e);const r=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);r&&(r.style.transform=`scale(${o})`,r.style.transformOrigin="left top")},mt=new Map;mt.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),mt.set("panorama",{scale:.79,transformOrigin:"center center"}),mt.set("outstream",{scale:.79,transformOrigin:"center center"}),mt.set("integration",{scale:.79,transformOrigin:"center center"}),mt.set("toppanorama",{scale:.8,transformOrigin:"left center"});var yt=Object.freeze({__proto__:null,calculateScaleFactor:gt,getAspectRatio:(e,t)=>{if(e&&t)return t/e},scaleAd:ht,scaleAdIpadAirPortrait:e=>{if(!((null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.clientWidth)>767&&(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.clientWidth)<=853))return;var t,n;const i=ot(e),o=mt.get(i),r=document.querySelector(`#${e.targetId}`);if(!r||!o)return;if(r.style.transformOrigin=o.transformOrigin,r.style.transform=`scale(${o.scale})`,!(null==o?void 0:o.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==r?void 0:r.offsetWidth;a&&"number"==typeof d&&!isNaN(d)&&a.style.setProperty("right",String(-1*d*.2)+"px")},scaleAds:e=>{var t,n,i,o,r,a;const{adScaleConfig:d,pageContext:{deviceType:s}}=p.get();if(!(null==d?void 0:d.enabled))return;if(Ee(e,Z))return;const l=null!==(t=d.adsToBeScaled[s])&&void 0!==t?t:[],c=K(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(i=null===(n=d.offset)||void 0===n?void 0:n[c])&&void 0!==i?i:0,v=document.getElementById(e.targetId),g=null!==(o=null==v?void 0:v.offsetWidth)&&void 0!==o?o:window.screen.width,h=null!==(a=null===(r=null==v?void 0:v.parentElement)||void 0===r?void 0:r.offsetWidth)&&void 0!==a?a:window.screen.width;ht(e,(g<h?g:h)-u)}});const ft={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&((e,t)=>{ht(e,t);const n=document.querySelector(`#${e.targetId}`);n&&(n.style.minWidth="100vw")})(e,t)},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},wt={SVD:"svd",VG:"vg",GODARE:"godare",AFTENPOSTEN:"aftenposten",SA:"sa",BT:"bt",AFTONBLADET:"aftonbladet",E24:"e24",MINMOTE:"minmote",PENT:"pent",GODT:"godt",TEK:"tekno",KLART:"klart",TVNU:"tvnu",POLARIS:"polaris",KOKET:"koket",TV4:"tv4",FOTBOLLSKANALEN:"fotbollskanalen"},bt={publisherClassName:wt.PENT,fullWidthFormatClassName:"netboard"},xt=864e5,kt=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return d("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,i=xt)=>{const o={data:n,expirationTime:(new Date).getTime()+i};t(e,JSON.stringify(o))},getByTimestamp:(t,n=xt)=>{const i=e(t);if(!i)return null;if(!n)return i;try{const{expirationTime:e,data:t}=JSON.parse(i);return(new Date).getTime()<=e?t:null}catch(e){return d("Error with parsing localStorage data"),null}}}})(),Et="glimrTags",Ct=["glwe_","glwet_"],It={geofenceTags:[],geoTags:[],weatherTags:[]},Tt=(...e)=>Ie(void 0,[...e],void 0,function*(e=p.get()){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield je(t,n,i,"glimr")}const{getConsentAsync:o}=Oe(t,0,i);return yield o()}),St=()=>Ie(void 0,void 0,void 0,function*(){const{glimr:e}=p.get();if(!(yield Tt())||!(null==e?void 0:e.enabled))return void d("No consent for glimr data fetching.");const t=yield(n=500,Ie(void 0,void 0,void 0,function*(){return yield Promise.race([Ie(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{kt.setWithTimestamp(Et,{tags:e,tagMappings:t}),n(!0)})})}catch(e){d(`Error during getting glimr data: ${e}`)}else d("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:t})}),At={svd:"svd",vg:"vg",godare:"godare",aftenposten:"no-aftenposten",sa:"no-stavangeraftenblad",bt:"no-bergenstidende",aftonbladet:"aftonbladet",e24:"e24",minmote:"minmote",pent:"pent",godt:"godt",tek:"no-tek"},Pt=e=>Ct.some(t=>e.startsWith(t)),Ot=e=>e.startsWith("glgc_"),jt=e=>!Pt(e)&&!Ot(e),_t=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:i,pageContext:{countryCode:o}={}}=e,r=yield Tt(e);if(!(null==i?void 0:i.enabled)||!r)return d("No consent for getting glimr tags."),{};const a=h(o),s=Lt(e,Boolean(n));return{[`${a}-geo`]:s.geoTags,[`${a}-weather`]:s.weatherTags,[`${a}-geofence`]:s.geofenceTags}}),Lt=(e,t)=>{const n=$t();if(!n)return It;const i=((e=[])=>e.filter(Pt))(n),o=((e=[])=>e.filter(Ot))(n),r=((e=[],t,n)=>{var i;const o=e.filter(jt);if(n&&t){const{publisher:e}=null!==(i=t.pageContext)&&void 0!==i?i:{},n=At[e]||e;o.push(n)}return o})(n,e,t);return{geoTags:r,geofenceTags:o,weatherTags:i}},$t=()=>{const e=kt.getByTimestamp(Et);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},Nt=()=>(window.apntag||(window.apntag={anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}}),window.apntag),qt=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),Dt=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={},pageContext:{countryCode:o}}=p.get(),r=[`${h(o)}-geo`],a=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection","aa-sch-cmp_advertising",...i?r:[]],d=Object.fromEntries(Object.entries(e).filter(([e])=>a.includes(e))),s=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:d}}},s)}},Mt={get:(e,t)=>Ie(void 0,void 0,void 0,function*(){const n=yield fetch(e,t);if(!n.ok)throw new Error(n.statusText);return yield n.json()}),post:(e,t,n)=>Ie(void 0,void 0,void 0,function*(){const i=JSON.stringify(n),o=yield fetch(e,{method:"POST",headers:t,body:i});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},Ft="advertory:ppids-cache",Bt={[g.SE]:`SCH${g.SE.toUpperCase()}-EnvHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-EnvHash`},Rt={[g.SE]:`SCH${g.SE.toUpperCase()}-UserHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-UserHash`},Ut={[g.SE]:`sch${g.SE}-envhash-v3`,[g.NO]:`sch${g.NO}-envhash-v3`},zt={[g.SE]:`sch${g.SE}-userhash-v3`,[g.NO]:`sch${g.NO}-userhash-v3`},Vt={[g.SE]:`'sch${g.SE}-iosid-v3'`,[g.NO]:`'sch${g.NO}-iosid-v3'`},Ht={[g.SE]:`sch${g.SE}-androidid-v3`,[g.NO]:`sch${g.NO}-androidid-v3`},Wt={[g.SE]:"sdrn:schibsted.com:user",[g.NO]:"sdrn:spid.no:user"};class Kt{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:i})=>{t.append(e,`${i}-${n}`)}),t}}const Gt=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return Ie(this,arguments,void 0,function*(e,t=1e4){var n,i;const o=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=o.xandr)||void 0===n?void 0:n.ppId1,null===(i=o.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||d("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},Jt=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return Ie(this,void 0,void 0,function*(){var n,i,o,r,a,d,s,l,c,u,p;const v=kt.get(Ft),g=yield this.getNewPPIDs(e,t);if(this.shouldHash(v,g)){const t=null!==(n=e.hasherUrl)&&void 0!==n?n:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,t);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(o=g.anId)||void 0===o?void 0:o.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(d=g.idfv)||void 0===d?void 0:d.plain,null===(s=g.anId)||void 0===s?void 0:s.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(l=null==v?void 0:v.userId.hashed)&&void 0!==l?l:"",null!==(c=null==v?void 0:v.environmentId.hashed)&&void 0!==c?c:"",null===(u=null==g?void 0:g.idfv)||void 0===u?void 0:u.plain,null===(p=null==g?void 0:g.anId)||void 0===p?void 0:p.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||d("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,i){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=i?i:null}shouldHash(e,t){var n,i;if(!e)return!0;for(const o in e){if((null===(n=e[o])||void 0===n?void 0:n.plain)!==(null===(i=t[o])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const o=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),i?{anId:{plain:i}}:{});kt.set(Ft,o)}hashPPIDs(e,t){return Ie(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield Mt.post(t,n,e)}catch(e){return d("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return Ie(this,arguments,void 0,function*({clientId:e,instance:t},n){const i=yield((e,t)=>Ie(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${Wt[t]}:${n}`:null}))(t,n),o=yield(e=>Ie(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(t),r=window.advertory_idfv,a=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:i},environmentId:{plain:o},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},r?{idfv:{plain:r}}:{}),a?{anId:{plain:a}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:o}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:o.plain}}},Qt=e=>Ie(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,pageContext:{countryCode:i,isMobileApp:o}}=e;if(!(yield je(n,o,i,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([Gt.processPPIDs(t,null==n?void 0:n.timeout),Jt.processPPIDs(t,i)])).forEach((e,t)=>{if("rejected"===e.status){d(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),Xt=e=>{const{ppid1:t,ppid2:n}=Gt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Jt.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Kt).add(n,Bt[e]).add(t,Rt[e]).add(o,Ut[e]).add(i,zt[e]).add(r,Vt[e]).add(a,Ht[e]).buildEids()}]}},Yt=()=>{const{ppid1:e,ppid2:t}=Gt.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},Zt=e=>{const{ppid1:t,ppid2:n}=Gt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Jt.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Kt).add(n,Bt[e]).add(t,Rt[e]).add(o,Ut[e]).add(i,zt[e]).add(r,Vt[e]).add(a,Ht[e]).buildRyEids()}}]}}},en=e=>{const{ppid1:t,ppid2:n}=Gt.getPPIDs(),{ppid1:i,ppid2:o}=Jt.getPPIDs();return(new Kt).add(n,Bt[e]).add(t,Rt[e]).add(o,Ut[e]).add(i,zt[e]).buildRyEids()},tn=e=>Ie(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=Gt.getPPIDs(),{ppid1:i,ppid2:o}=Jt.getPPIDs(),r=(new Kt).add(n,Bt[e]).add(t,Rt[e]).add(o,Ut[e]).add(i,zt[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),nn=(e,...t)=>Ie(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{d(),n()},a=()=>{d(),i(new Error(`Failed to load ${e}`))},d=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(s)};o.addEventListener("load",r),o.addEventListener("error",a);const s=setTimeout(()=>{d(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}),on="advertory-fullscreen-scroll",rn="advertory-fullscreen-scroll-wrapper",an="fullscreen-scroll-in-screen",dn="in-screen",sn=e=>e.includes("snoap.no"),ln=e=>{var t,n,i,o,r;return!!(null===(r=null===(o=null===(i=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===i?void 0:i.adResponse)||void 0===o?void 0:o.ads[1])||void 0===r?void 0:r.rtb)},cn=Fe([],()=>{const e=({width:e,height:t})=>{var n;const i=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!i)return;const{clientWidth:o,clientHeight:r}=i,a=e/o,d=t/r;i.style.transform=`scale(${a},${d})`,i.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),un=e=>{const t=Fe([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const i=n.contentDocument.createElement("style");i.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(i),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},pn=[],vn={},gn=(e,t)=>{var n;const i=(null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.fadingHeaderEnabled)||!1,o=new IntersectionObserver(e=>hn(e,i),{}),r=yn(e);o.observe(e),i&&(vn[r]=bn(e,null==t?void 0:t.options))},hn=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=yn(e);n?(mn(i,n),fn(e,i,t)):(mn(i,n),wn(e,i,t))})},mn=(e,t)=>{var n,i;const o=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;const r=t?"showFullscreen":"hideFullscreen";null===(i=o.contentWindow)||void 0===i||i.postMessage(`advertory:${r}-${e}`,"*")},yn=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},fn=(e,t,n)=>{e.classList.add(dn),document.body.classList.add(an),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),pn.includes(t)||pn.push(t),n&&window.addEventListener("scroll",vn[t],{passive:!0})},wn=(e,t,n)=>{pn.includes(t)&&(n&&window.removeEventListener("scroll",vn[t]),document.body.classList.remove(an),e.classList.remove(dn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},bn=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:o=3}=t,r=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&r.push(n)}),i.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{r.length&&xn(e,r,o,0),a.length&&xn(e,a,o,40)}},xn=(e,t,n,i)=>{const o=e.offsetHeight,r=window.scrollY,a=e.getBoundingClientRect().top+r;t.forEach(e=>{const t=e.offsetHeight;let d;d=a>r?(a-r)/t-i:(r+t-(a+o))/t;const s=d<=0;e.style.visibility=s?"hidden":"",e.style.zIndex=s?"":n.toString(),e.style.pointerEvents=s?"none":"all",e.style.opacity=d.toString()})};function kn(e){if(!e||"undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}kn('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100vw !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh)}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top:var(--advertory-political-box-offset, 0px)}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px) + var(--advertory-political-box-offset, 0px)) !important}.advertory-fullscreen-scroll::before{left:calc(50vw - 628px);width:calc(100% - 36px);max-width:1250px;text-align:left;background-color:hsla(0,0%,100%,.6);color:#212121;font-family:Ester Blenda,Arial,sans-serif;font-size:11px;font-weight:400;font-style:normal;text-transform:lowercase;line-height:1;margin:16px 2px;padding:10px;z-index:1;visibility:inherit !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll::before{left:16px}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:calc(50vw - 623px);right:unset}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:22px;right:unset}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]::before{padding-left:32px}.advertory-fullscreen-scroll>div[id*=utif]{display:block;width:var(--advertory-fullscreen-scroll-vw, 100vw) !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[id*=utif]{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important}.advertory-fullscreen-scroll>div[id*=utif]{overflow:hidden}.advertory-fullscreen-scroll>div[id*=utif]>iframe{display:block;height:inherit !important;width:inherit !important}.advertory-fullscreen-scroll>div[role=button]{z-index:2;opacity:1;background:rgba(0,0,0,0) !important;left:unset;position:fixed !important;right:calc(50vw - 623px);top:calc(19px + var(--advertory-political-box-offset, 0px)) !important;width:26px !important;height:26px !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[role=button]{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix) + 19px + var(--advertory-political-box-offset, 0px)) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');const En="left",Cn={no:{adText:"ANNONSE",adFrom:"ANNONSE FRA",adContent:"ANNONSØRINNHOLD",adContentFrom:"ANNONSØRINNHOLD FRA"},se:{adText:"ANNONS",adFrom:"ANNONS FRÅN",adContent:"EXTERN LÄNK",adContentFrom:"EXTERN LÄNK FRÅN"}};let In=null;const Tn=(e,t)=>{let n=e;return n=(e=>{const t=document.createElement("script");return t.textContent="\n window.addEventListener('message', function(event) {\n if (event.data === 'advertory:showFullscreen-'+document.body.id) {\n document.body.style.display = \"block\";\n } else if (event.data === 'advertory:hideFullscreen-'+document.body.id) {\n document.body.style.display = \"none\";\n }\n });\n ",e+t.outerHTML})(e),n=(e=>{const t=document.createElement("script");return t.textContent=`(${cn})()`,e+t.outerHTML})(n),n=(e=>{if((e=>e.includes("google"))(e))return e;const t=document.createElement("div");t.innerHTML=e;const n=t.querySelector("img");return n?(n.style.width="100%",n.style.height="100%",n.style.objectFit="cover",n.style.position="fixed",t.innerHTML):e})(n),n=(e=>{if(sn(e))return e;const t=document.createElement("style");return t.textContent="\n .GoogleActiveViewClass, .GoogleActiveViewElement {\n transform: translate(calc(-50% + 50vw), 0);\n width: 100vw !important;\n height: 100vh !important;\n }\n .GoogleActiveViewClass img, .GoogleActiveViewElement img {\n width: 100vw;\n height: 100vh;\n object-fit: cover;\n }\n .GoogleActiveViewClass iframe {\n width: 100vw !important;\n height: 100vh !important;\n }\n ",e+t.outerHTML})(n),(e=>e.includes("adform"))(n)&&(n=(e=>{const t=document.createElement("script");t.textContent='\n var frame = window.frameElement;\n if (frame) {\n frame.style.removeProperty("width");\n frame.style.removeProperty("height");\n frame.contentWindow.document.body.onload = onLoad;\n } else {\n document.body.onload = onLoad;\n }\n \n function onLoad() {\n var iframe = document.querySelector("adfm-ad iframe");\n if (iframe) {\n var image = iframe.contentWindow.document.getElementById("image");\n if (!image) return;\n image.style.backgroundSize = "cover";\n } else {\n var iframe = document.querySelector(".adform-adbox iframe");\n if (iframe) {\n var style = document.createElement("style");\n style.textContent = "#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}";\n iframe.contentDocument.body.append(style);\n iframe.style = "width: 100vw; height: 100vh;";\n } else {\n var observer = new MutationObserver(function(mutations, obs) {\n for (var mutation of mutations) {\n var iframe = mutation.addedNodes[0];\n if (iframe && iframe.nodeName === "IFRAME") {\n iframe.style = "width: 100vw; height: 100vh;";\n iframe.dataset.contents += "<style>#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}</style>";\n obs.disconnect();\n }\n }\n });\n observer.observe(document.body, { childList: true, subtree: true });\n }\n }\n }\n ';const n=document.createElement("style");return n.textContent="\n html, body, adfm-ad, #sf_align, .adform-adbox, .adform-adbox img {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover;\n max-width: 100vw;\n }\n ",e+n.outerHTML+t.outerHTML})(n)),(e=>e.includes("529299503"))(n)&&(n=un(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>sn(e)?e:e.replace("<iframe ","<iframe onload=\"\n var f = document.querySelector('iframe');\n if (!f) return;\n var s = f.style;\n s.transform = 'scale(' + (window.innerHeight / Number(f.height)).toFixed(2) + ')';\n s.right = parseInt((Number(f.width) - window.innerWidth) / 2) + 'px';\n s.bottom = parseInt((Number(f.height) - window.innerHeight) / 2) + 'px';\n s.position = 'relative';\n \" "))(n)),sn(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</iframe>","</iframe><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),(e=>e.includes("kreateam.io"))(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</div>","</div><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),ln(t)&&(n=(e=>{const t=document.createElement("script");t.textContent='var frame = window.frameElement;\n if (frame) {\n frame.style.width = "100vw";\n frame.style.height = "100vh";\n }';const n=document.createElement("div");return n.innerHTML=e,n.appendChild(t),n.innerHTML})(n)),n},Sn=()=>{In=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,o=document.documentElement;o.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),o.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),o.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},An=()=>{In||(In=window.requestAnimationFrame(Sn))},Pn=(e,t)=>{var n,i,o,r;const{pageContext:{countryCode:a,deviceType:d}}=p.get(),{targetId:s}=e,l=null==t?void 0:t.options;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==l?void 0:l.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),((e,t)=>{var n;const{articlesContainerWidth:i=1302,backgroundColor:o="#fff",foregroundColor:r="#fff",margin:a,beforeContentValue:d=""}=e,s=null!==(n=null==a?void 0:a[t])&&void 0!==n?n:"16px 0",l=i/2,c=document.createElement("style");c.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${o} 0px,\n ${o} calc(50% - ${l}px),\n ${r} calc(50% - ${l}px),\n ${r} calc(50% + ${l}px),\n ${o} calc(50% + ${l}px),\n ${o} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${s};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${d&&"clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);\n -webkit-clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);"}\n }\n\n .advertory-fullscreen-scroll-wrapper:before, .advertory-fullscreen-scroll-wrapper:after {\n background: var(--background);\n content: '${d}' !important;\n }`,c.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(c)})(null!==(i=null==l?void 0:l.overlayStyles)&&void 0!==i?i:{},d);const c=document.getElementById(s),u=null==c?void 0:c.parentElement;if(!c||!u)return;gn(u,t),c.className=on,gn(u,t),c.className="advertory-fullscreen-scroll";const v=Ee(e,Y)?"absolute":"fixed";c.style.position=v,u.className=rn,u.dataset.showTagSubscribeId=s,c.setAttribute("data-ad-label",Cn[a].adText),(null==l?void 0:l.cogwheelPosition)===En&&(c.dataset.moveCogwheelToTheLeft="true"),An(),window.addEventListener("resize",An),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",An),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",An)},On=e=>{if(!(null==e?void 0:e.classList.contains(on)))return;e.classList.remove(on),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(rn))&&(t.classList.remove(rn),t.classList.remove(dn))};var jn=Object.freeze({__proto__:null,createFullscreenScrollAd:Pn,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=ln(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=ln(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,Tn(t,e))},undoFullscreenScrollContainer:On});const _n=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},Ln=(e,t,n)=>{var i,o,r,a;const d=document.createElement("div");d.id=`${e}-button`,t.appendChild(d);(null===(o=null===(i=window.apntag.requests)||void 0===i?void 0:i.tags[e])||void 0===o?void 0:o.adResponse)||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]=Object.assign(Object.assign({},window.apntag.requests.tags[e]),{adResponse:{ads:[{creative_id:n}]}})),_n(e);const s=d.firstElementChild;s&&t.insertBefore(s,d),d.remove()},$n="ad-loaded",Nn=()=>Ie(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,pageContext:{countryCode:n,isMobileApp:i},fullscreenScroll:o}=p.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:r}=p.getHandlers(),{getConsentAsync:a}=Oe(t,0,n),s=yield a(),l=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:i=>{const o=Nt(),{prebid:{relevantCallbackTimeout:r}={}}=p.get(),a="relevantCb"===i&&r?r:n[i].timeout,d=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,o.loadTags&&o.loadTags())},a);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),c=Nt(),u=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=Nt();return{user:e,keywords:t}})();l.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:g}=u;(()=>{const e=qt();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(l.getCancel()||!c.loadTags)return d("core loadTags() call was cancelled",{cancel:l.getCancel(),apnTagLoadTags:!c.loadTags,condition:"or"}),void l.cleanup();const t=qt();l.events.relevantCb.done=!0,l.failsafeOnTimeout("auctionCb");const a=s?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};d("prebid consentManagement",a),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:a,enableSendAllBids:!1},Zt(n)),Dt(g,v))),d("core add prebid config",Object.assign(Object.assign({consentManagement:a,enableSendAllBids:!1},Zt(n)),Dt(g,v))),t.loadPrebid({configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e)),l.cleanup()}},customNativeRender:e=>{qn(e,r)},directRenderFn:e=>{var t;const{settings:n,renderFn:r}=e,{bid:a,adDiv:d}=n||{};if(!d)return;const s=r(n),l=Object.assign(Object.assign({},a),{targetId:d.id,banner:!0}),c=d.id,u=document.getElementById(c);u&&(le(l)?(Pn(l,o),i?u.style.setProperty("--advertory-political-box-offset","30px"):(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const i=new MutationObserver(()=>{n()&&i.disconnect()});i.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(s)):(On(u),null===(t=null==u?void 0:u.parentElement)||void 0===t||t.classList.add("advertory-direct-render")),u.classList.add($n),(null==a?void 0:a.creativeId)&&Ln(c,u,Number(null==a?void 0:a.creativeId)))}}),d("core load prebid",{configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e))}},customNativeRender:e=>{qn(e,r)},directRenderFn:()=>{}})})}),qn=(e,t)=>{var n;const{divId:i,native:o,bid:r}=e,a=document.querySelectorAll(`[id^=${i}]`)[0],d=`RY-${a.id}`;((e,t)=>{e.childNodes.forEach(e=>e.style.cssText="position: absolute; z-index: -1;");const n=document.createElement("div");n.setAttribute("id",t),e.appendChild(n)})(a,d);const s=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;null==t||t({native:o,targetId:d},p.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")},Dn=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:o}=window,[r,a]=t;if(!i.dataset.lockedsize&&a&&r)i.style.width=`${r}px`,i.style.height=`${a}px`,n&&(o.resizeAd(i.id,[r,a]),i.dataset.lockedsize="true",i.dataset.lockedwidth=r.toString(),i.dataset.lockedheight=a.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&o.resizeAd(i.id,[e,t])}},Mn=["netboard","board"];class Fn{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),d=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:s,spid:l}=t;return d.searchParams.append("editionName",o),r&&d.searchParams.append("urlData",r),a&&d.searchParams.append("excludedItems",a),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(e){return Ie(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),r=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",a=(null==o?void 0:o.userId)?String(o.userId):"",s=this.buildUrl(e,{envId:r,spid:a});try{d("Starting fetching DrEdition ad from URL:",s);const e={method:"GET"},t=yield Mt.get(s,e);return d("Fetch operation completed successfully."),t}catch(e){d("Error during fetch operation:",e)}return null})}}let Bn=class{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,d=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:d},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return Ie(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:o,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const Rn=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):d("Dr. Edition container does not have a parent element, cannot remove height lock.")};class Un{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return Ie(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,a=e.querySelector(o);if(!a)return void d(`Container with selector "${o}" not found.`);const s=yield this.drEditionService.fetchData(t);return(null==s?void 0:s.itemId)||r?!(null==s?void 0:s.itemId)&&r?(d("No Dr. Edition ads available to render. Collapsing whole placement."),F(e.id),void Rn(a)):((null==s?void 0:s.itemId)&&r&&(d("Dr. Edition ad available to render as a Xandr backfill."),B(e.id)),void(s?(s.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(s.css,"style"),yield this.rendererManager.render(a,s,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(s,t),Rn(a),this.drEditionAds.push(s),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(s.itemId),this.observeAdView(e,s,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):Rn(a))):(d("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void Rn(a))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";B(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}class zn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return Ie(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:i}=Oe(n.tcf,n.isMobileApp,n.country),o=yield i(),r=vt(n.device)?t.mobileHTML:t.desktopHTML,a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var i,o,r;e.search=null!==(r=null===(o=(i=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(i,e,t,n))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class Vn{constructor(e){this.strategy=e}handle(e,t){return Ie(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return Ie(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield nn(t)}catch(e){d("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return Ie(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==o||o.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",r),d.setAttribute("playsinline",""),!(!d||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,d),!0))}}let Hn=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return Ie(this,void 0,void 0,function*(){var i,o,r,a,d,s,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:n.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const p=this.getEventInput(e,t,n,"view");(null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,p):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackViewUIElement)||void 0===s||s.call(d,p):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,p)})}trackContentClick(e,t,n){return Ie(this,void 0,void 0,function*(){var i,o,r,a,d,s;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(o=(i=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(i,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(s=(d=this.pulse).trackElementClick)||void 0===s||s.call(d,l)})}};class Wn extends Hn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:d="",creativeId:s,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:p,urlPath:v}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[d,a,p,v].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:d,"spt:creativeId":s,pageTitle:a,publicUrl:p,urlPath:v},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let Kn=class extends Hn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,d,s;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,p=n.editionName,v=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:p,"@type":"UIElement",position:p,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:p,"@type":v,url:location.origin},tags:null===(s=null===(d=this.newsroomStrategy)||void 0===d?void 0:d.getTags)||void 0===s?void 0:s.call(d,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,d;const{pulseData:{algorithm:s="sov",clientName:l,creativeId:c,editionId:u,itemId:p,url:v,probability:g}={}}=t,h=Math.floor(Date.now()/1e3),m=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),f=this.getTeaserElementText(e,"image"),w=null!==(d=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:v)&&void 0!==d?d:"";return{algorithm:s,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:p,link:w,placement:n.editionName,subtitle:y,time:h,title:m,type:i,imageUrl:f,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const Gn={FRONT:"front"},Jn=e=>Ie(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),Qn={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return Ie(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return ta})})}})}};class Xn{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){yield Ie(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const a=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var s,l;l=d,null==(s=a)||s.forEach(e=>{Qn[e](l)});const c={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},u=yield Jn(c);u.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(u,a)}),u.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),u.once("PulseStats:ready",()=>Ie(this,void 0,void 0,function*(){const e=yield u.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Gn.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const Yn="https://www.aftonbladet.se/video-player-extras/latest/";class Zn{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${Yn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${Yn}external-link.js`]:{name:"ExternalLink"}}};yield Jn(a),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}const ei=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class ti{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},ei(e)?e:{}),{provider:Object.assign(Object.assign({},ei(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},d=yield Jn(a);d.once("PulseStats:ready",()=>Ie(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Gn.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let ni=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const ii=(e,t,n)=>{var i;const{publisher:o,pageType:r,country:a}=e,d={[wt.VG]:new Bn,[wt.E24]:new Xn,[wt.AFTONBLADET]:new Zn,[wt.SVD]:new ti}[o]||new ni,s=new(a===g.SE?Wn:Kn)(n,d,r),l=new Fn(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),c=new zn(d,s),u=new Vn(d);return new Un(l,c,u,s)},oi=()=>Ie(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})});class ri{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return Ie(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return d("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return Ie(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}const ai=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=ii(n,i,o);e.forEach(e=>{var i,o,a;if(!e.isIntersecting)return;const d=e.target,s=null!==(i=d.dataset.editionName)&&void 0!==i?i:"",l=null!==(o=d.dataset.pulseColumnname)&&void 0!==o?o:"",c=null!==(a=d.dataset.pulsePrimaryposition)&&void 0!==a?a:"";r.fetchAndRenderAd(d,Object.assign(Object.assign({},n),{editionName:s,columnName:l,primaryPosition:c})),t.unobserve(d)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},di=()=>Ie(void 0,void 0,void 0,function*(){try{(()=>{const e=document.createElement("script");e.setAttribute("src","https://ads.inventory.schibsted.io/ad-service/ad-banner-sponsor-advertisement/ad.js"),e.setAttribute("type","text/javascript"),e.setAttribute("async","true"),document.head.appendChild(e)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ads-advertory-anchor"),e.classList.add("subscribe_box"),e.classList.add("ad-box"),e.classList.add("leftAd"),e.classList.add("netboard"),e.classList.add("advert"),e.classList.add("module"),e.classList.add("banner"),e.classList.add("leaderboard"),e.classList.add("adsbygoogle"),e.classList.add("ad-banner"),e.classList.add("ad-container"),e.classList.add("adsbox"),e.classList.add("sidebar-ads"),e.classList.add("banner-ads"),e.style.opacity="0",e.style.width="1px",e.style.height="1px",e.style.minWidth="0px",e.style.minHeight="0px",e.style.maxWidth="1px",e.style.maxHeight="1px",e.style.position="absolute",e.style.top="0",e.style.boxSizing="border-box",e.style.margin="0",e.style.padding="0",document.body.appendChild(e)})()}catch(e){console.error("Error running adblock scripts:",e)}}),si=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},li=[],ci=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,pageContext:{deviceType:a,publisher:s,pageType:l,countryCode:c,isMobileApp:u}}=e;if(!(yield je(o,u,c,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:a}=e,d=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,s=r[o]||r.desktop,l=w(t.targetId),c=s.find(e=>e.targetId===l),u=Mn.some(e=>l.startsWith(e)),p=li.includes(l),v=(null===(i=null==c?void 0:c.drEdition)||void 0===i?void 0:i.editionName)||d;return c&&u&&!p&&v?(li.push(l),Object.assign(Object.assign({},c),{drEdition:Object.assign(Object.assign({},c.drEdition),{editionName:v})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void d("Pulse has not been passed as a prop, aborting");const v=yield oi(),g=new ri(v),h=ii({publisher:s,pageType:l,country:c},g,null==i?void 0:i.instance),m=document.getElementById(t.targetId);if(!m||!r)return;m.classList.value="";const y=document.createElement("div");y.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=y.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:a,tcf:o,isMobileApp:u,country:c,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,f)}),ui=(e,t)=>{var n,i,o;if(!si())return void d("Ad block not enabled, Dr. Edition backfills will not be rendered");d("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:r},finnBlink:a}=e,s=null===(i=null===(n=null==a?void 0:a.replacementConfig)||void 0===n?void 0:n.adsToReplace)||void 0===i?void 0:i[r],l=null!==(o=null==s?void 0:s.map(([e])=>e))&&void 0!==o?o:[],c=new IntersectionObserver((t,n)=>Ie(void 0,void 0,void 0,function*(){for(const i of t){if(!i.isIntersecting)continue;const t=i.target;n.unobserve(t),yield ci(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!l.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&c.observe(t)})};var pi=Object.freeze({__proto__:null,DrEdition:({editionName:e,fallbackTargetId:t,children:i,pulseData:o,htmlAttributes:r})=>{const a=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},d=a(o,"data-pulse"),s=a(r,"data");return n.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":e},d,s,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":t,style:{display:"none"},children:i})]}))},getDrEditionManager:ii,handleDrEdition:e=>Ie(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield je(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield oi(),i=new ri(n);ai({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),handleDrEditionBackfill:ci,handleDrEditionBackfillOnAdblock:ui});const vi="collapseAd",gi="hideAd",hi="resizeAd",mi="renderDrEditionFallback",yi="wallpaperImageUrl",fi="wallpaperColor",wi="velvet",bi=[hi,yi,fi,vi,gi,mi,wi];let xi;const ki=e=>{if(!["http://acdn.adnxs-simple.com","https://acdn.adnxs-simple.com","https://crcdn01.adnxs-simple.com","http://crcdn01.adnxs-simple.com","https://acdn.adnxs.com","http://acdn.adnxs.com","https://adsdk.microsoft.com","https://adsdk.bing.net","https://adsdkprod.azureedge.net"].includes(e.origin.trim()))return;const{data:t}=e;if(!t)return;const n=(e=>{if("object"==typeof e)return e;if(O(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:yi,wallpaperImageUrl:t}}if(j(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:fi,wallpaperColor:t}}if(e.startsWith(mi)){const t=e.split(":")[1];return{name:mi,targetId:t}}if(e.startsWith(vi)||e.startsWith(gi)){const t=e.split(":")[1];return{name:vi,targetId:t}}if(e.includes("name")&&bi.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!bi.some(e=>n.name===e))return;const{name:i,targetId:o,wallpaperImageUrl:r,wallpaperColor:a,cmd:d,size:s}=n;i===wi&&d&&(d.includes("noScroll")&&(xi=(e=>{if(!e)return()=>{};const t=e.style.overflow;return e.style.setProperty("overflow","hidden"),()=>{e.style.setProperty("overflow",t)}})(document.querySelector("body"))),(d.includes("close")||d.includes("ended"))&&(null==xi||xi(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==vi&&i!==gi||!o||F(o),i===hi&&o&&d&&Dn(o,d),i===mi&&o&&(F(o),ci(p.get(),{targetId:o})),"resizeMediationAd"===i&&o&&s&&Dn(o,s,!0),i===yi&&r&&_(r),i===fi&&a&&L(a)},Ei=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Ci=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=p.get(),i=window.apntag,o={publisher:e,countryCode:t,finnBlink:n},r=e=>{B(e),k(()=>i.showTag(e))};return{withXandrAd:r,withFinnBlinkAd:e=>Ie(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ba});yield t(e,o,null)}),withFullAdsChain:e=>Ie(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return void r(e);const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ba});yield t(e,o,r,()=>Ie(void 0,void 0,void 0,function*(){if(!U.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return $});t(e)}))})}},Ii=(e,t,n)=>{const i="true"===n.dataset.isFinnBlinkOnlyPlacement;return ye(t)&&i?(d(`loading finn blink ad for blink only placement for ${t}`),void Ci().withFinnBlinkAd(t)):ye(t)?(d(`loading finn blink ad with full ads chain for ${t}`),void Ci().withFullAdsChain(t)):void k(()=>(d("core showTag",{id:t}),e.showTag(t)))},Ti=(e,t)=>Ie(void 0,void 0,void 0,function*(){yield E,yield C;const n=new IntersectionObserver((t,n)=>((e,t,n,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,r=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),a=document.getElementById(r);d("core log from intersection observer handler",{targetId:r,element:a}),n(window.apntag,r,i),a&&(t.unobserve(a),t.disconnect())})})(t,n,Ii,e),Ei(t));n.observe(e)}),Si=new Map,Ai=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Pi=".brandstudio-premium-content-widget",Oi=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),ji=({adWrapper:e,placementContainer:t})=>{const n=Oi({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),V(i=t),i.innerHTML=""},_i=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Li=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=p.get(),i=Ai.includes(n)&&Boolean(t.closest(Pi));const o=i?t.closest(Pi):null,r=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!i&&!a||i&&!o)return;if(a)return _i(e),void r.disconnect();const d=t.closest('[style*="height"]'),s=o;d&&s.contains(d)?_i(d):s.hasAttribute("style")&&_i(s),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},$i=(e,t,n,i,o,r)=>{var a;const d=performance.now(),s=null!==(a=Si.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,o)&&n<0;d-s>=o&&l&&(Si.set(t,d),((e,t,n)=>{const{pageContext:{countryCode:i}}=p.get(),o=null==n?void 0:n.parentElement;o&&n&&ji({adWrapper:o,placementContainer:n}),k(()=>{e.setKeywords([t],{[`${h(i)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},Ni=(e,t,n)=>{const i=new IntersectionObserver((e,i)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:o,boundingClientRect:r}=e;t(window.apntag,o.id,r.y,n,i,o)})})(e,$i,t,n),Ei(300));i.observe(e)},qi=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const o=e.slice(i,i+t);n.push(o)}return n},Di=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),Mi=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},Fi=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=p.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),Vi(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},Bi=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const o of i){const i=e.find(e=>{var t,n;return e.targetId===(null===(t=o.firstElementChild)||void 0===t?void 0:t.id)&&(null===(n=e.refresh)||void 0===n?void 0:n.bfCache)}),r=null==i?void 0:i.requestThreshold;Mi(o,r)&&i&&(z(i.targetId),n.length&&o.classList.remove(...n),Vi([i],t))}},Ri=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:i}}=p.get();t&&(e.forEach(({targetId:e})=>{const t=Ui(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&Bi(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),Bi(e,!1,t))};n.persisted&&(Di()?window.addEventListener("scroll",i,{passive:!0}):Bi(e,!1,t))})})(e,n))},Ui=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},zi=e=>{const{targetId:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(Ui(t)),o=(e=>1===e[0]&&1===e[1])(i),r={sizes:[i],allowedFormats:o?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return o||(r.native=void 0),r},Vi=(e,t=!1)=>{const{queryConfig:{batchSize:n=c}={}}=p.get(),i=e.map(({targetId:e})=>e),o=qi(i,n);if(t)for(const t of e){const e=zi(t);window.apntag.modifyTag(t.targetId,e)}for(const e of o)k(()=>window.apntag.refresh(e))},Hi=e=>`externalImpId:'${e}'`,Wi=(e,t)=>t?Object.assign(Object.assign({},e),{"aa-sch-ssa-native-ad":"true","aa-sch-ssa-format":"NATIVE_CONTENT","aa-sch-ssa-market":"XNO","aa-sch-ssa-cat":["ssa_1","ssa_2","ssa_3","ssa_4","ssa_5","ssa_6","ssa_7","ssa_8","ssa_9","ssa_10","ssa_11","ssa_12","ssa_13","ssa_14","ssa_15","ssa_16","ssa_17","ssa_18","ssa_19","ssa_20","ssa_21","ssa_22","ssa_23","ssa_24","ssa_25","ssa_26","ssa_27","ssa_28","ssa_29","ssa_30"]}):e,Ki=e=>{var t;const{pageSetup:{tag:{forwardExternalImpId:n=!1}={}}={},tracker:i}=p.get(),{targetId:o,sizes:r,keywords:a,allowedFormats:s,invCode:l,ssaNativeAdEnabled:c=!1,nativeCustomProperties:u,safeframeConfig:v,dynamicSizeWidthCheck:g=!1,globalPlacementId:h}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||He())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],i=Array.isArray(n)?n.filter(e=>e!==De):n,o=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:o})})(e),m=Object.assign({invCode:l,sizes:r,targetId:o,keywords:Wi(a,c),allowedFormats:s,dynamicSizeWidthCheck:g,globalPlacementId:h},v&&{safeframeConfig:v}),y=(e=>{var t,n,i,o,r,a,s;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(i=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===i?void 0:i.pageViewId)?(d("Tracker state pageViewId is:",null===(r=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.state)||void 0===r?void 0:r.pageViewId),null===(s=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===s?void 0:s.pageViewId):(d("Tracker state does not contain field pageViewId or it is empty"),""):(d("Tracker state is empty"),""):(d("Tracker is not configured in initAdvertory function"),"")})(i);n&&y&&(d("External Impression ID assigned to defineTag:",Hi(y)),m.externalImpId=Hi(y));const f=(e=>Object.entries({video:{required:!1},address:{required:!1},saleprice:{required:!1},rating:{required:!1},price:{required:!1},phone:{required:!1},likes:{required:!1},downloads:{required:!1},customIcon1:{required:!1},customIcon2:{required:!1},customDisplayUrl1:{required:!1}}).reduce((t,[n,i])=>((null==e?void 0:e.includes(n))&&(t[n]=i),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(u);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(m.native=f),m},Gi=e=>!e.includes("takeover")||He(),Ji=e=>{const{source:t}=e;return"csm"===t},Qi=e=>{if(!e)return e;const{pageContext:{countryCode:t}}=p.get(),n=h(t),i=e[`${n}-targetid`],o=i?w(i[0]):"";return Object.assign(Object.assign({},e),i&&{[`${n}-targetid`]:[o]})},Xi=e=>{const{pageContext:{countryCode:t}}=p.get(),n=h(t);return Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${n}-geo`]&&{[`${n}-geo`]:["geo-test-value"]}),e[`${n}-geofence`]&&{[`${n}-geofence`]:["geofence-test-value"]}),e[`${n}-weather`]&&{[`${n}-weather`]:["weather-test-value"]})},Yi=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const i=n.split(",")[0].split(":")[0],o=e.find(e=>e.invCode===i),r=document.querySelector(`[id^=${null==o?void 0:o.targetId}]`);r&&r.scrollIntoView({behavior:"smooth",block:"start"})})(e),(()=>{var e;const t=new URLSearchParams(window.location.search).get("scrollToDrEditionPlacement");if(!t)return;const n=null!==(e=document.querySelector(`[id*="${t}}"]`))&&void 0!==e?e:document.querySelector(`a[aria-label*="${t}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"start"})})()},Zi=(e,t)=>Ie(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})});kn(".advertory-brandmetrics-survey{width:100%}");const eo="advertory-brandmetrics-survey",to="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",no=()=>Ie(void 0,void 0,void 0,function*(){return window.__tcfapi?{gdpr:1,gdpr_consent:yield(e=window.__tcfapi,new Promise((t,n)=>{e("addEventListener",2,(n,i)=>{var o;i||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(o=n.tcString)&&void 0!==o?o:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),io={pageContext:{publisher:"aftonbladet",countryCode:g.SE},memberId:9943,sectionKeyword:"se-aftonbladet-section",frontpageInvCodeTemplate:"se-aftonbladet-{deviceType}-front-{position}",additionalFilterKeys:["se-aftonbladet-navigation","se-aftonbladet-keyword_generator","se-aftonbladet-sponsor"],tcf:{enabled:!0,advertisingCMPSignalEnabled:!0,schibstedConsentToPayEnabled:!0},glimr:{enabled:!0,clientId:"OYGH3SXYFAQR78LVPNQD"}},oo={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},ro=e=>(null==e?void 0:e.parent)?[...ro(e.parent),e.shortPath||"unknown"]:[],ao=(e,t)=>t?"se-aftonbladet-{deviceType}-studio_{position}":`se-aftonbladet-tv-{deviceType}-${(e=>{var t;if(null===(t=null==e?void 0:e.metadata)||void 0===t?void 0:t.afp)return"afp";const[,n]=ro(e);return oo[n]||"ovrigaavdelningar"})(e)}_{position}`,so={aftonbladet:io},lo={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:ao(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:ro(e).join(":")}}},co=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},uo=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),po="se-generic",vo="aa-sch",go="kv_",ho="pause",mo="{deviceType}",yo="{position}",fo="afp_",wo=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),bo="1-1",xo="16-9",ko="3-4",Eo="9-16",Co="responsive",Io={[bo]:1,[xo]:1.78,[Eo]:.56,[Co]:1},To={[bo]:1,[xo]:1.78,[ko]:1.33,[Eo]:.56},So=(e,t,n,i)=>{const{invCode:o="",videoOverlayInvCode:r}=null!=e?e:{},a=dt===n?ct:ut,d=o.replace(mo,a);return(e,n)=>{if(e===ho)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(yo,ho).replace(/-([a-z]+)_/,"-article-"))(d);if(n&&wo.has(e)){return(i&&r?r:t.frontpageInvCodeTemplate).replace(mo,a).replace(yo,e)}return d.replace(yo,e)}},Ao=(e,t)=>{const n=Object.entries(e);return n.reduce((n,[i,o])=>{const r=Math.abs(e[n]-t);return Math.abs(o-t)<r?i:n},n[0][0])},Po=()=>{var e,t;const n=jwplayer().getContainer(),i=null!==(t=null===(e=document.getElementById(n.id))||void 0===e?void 0:e.parentElement)&&void 0!==t?t:null;return i&&"number"==typeof i.offsetWidth&&"number"==typeof i.offsetHeight&&0!==i.offsetHeight?i.offsetWidth/i.offsetHeight:1},Oo=()=>{return(e=>{try{return decodeURIComponent(e)}catch(e){return""}})("undefined"!=typeof document&&null!==(t=null===(e=document.cookie.match("(^|;)\\s*_pulse2data\\s*=\\s*([^;]+)"))||void 0===e?void 0:e.pop())&&void 0!==t?t:"").split(",");var e,t},jo=()=>{const e=null!==(t=Oo()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=Oo()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},_o=()=>Object.fromEntries(new URLSearchParams(window.location.search)),Lo=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{publisher:i,countryCode:o}}=t,{width:r,height:a}={width:window.innerWidth,height:window.innerHeight},d={isMobileApp:e.isApp,countryCode:o,publisher:i,pageType:"front",deviceType:e.deviceType},s=(yield je(n,e.isApp,o,"video"))?"1":"0",l=yield no(),c=yield tn(o),u=yield Le({tcf:n,pageContext:d}),p=null!==(v=window.location.pathname.split("/").slice(-2,-1).pop())&&void 0!==v?v:"";var v;const g=((e=1)=>Ao(To,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?Ao(Io,Number(m.toFixed(2))):Co;var m,y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${vo}-country_code`]:o,[`${vo}-publisher`]:i,[`${vo}-supply_type`]:(y=e.deviceType,y===dt?st:lt),[`kw_${vo}-page_type`]:"collection",[`${vo}-page_type`]:"collection",[`${po}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${po}-page`]:"index",[`${po}-page`]:"index",[`${po}-screenheight`]:String(window.screen.height),[`${po}-screenwidth`]:String(window.screen.width),[`${po}-viewportheight`]:String(a),[`${po}-viewportwidth`]:String(r),[`${po}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${po}-mobile-os`]:pt(),[`${po}-audience`]:void 0,[`${po}-externalid_src`]:jo(),[`${po}-tags`]:e.tags,[`${po}-articleid`]:p,"article-id":p},yield _t(Object.assign(Object.assign({},t),{pageContext:d}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${po}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(_o()).some(e=>e.includes(go))&&(()=>{const e=_o(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(go)).map(([e,t])=>[e.slice(3),t]));return Object.keys(t).length>0?t:void 0})()),{[t.sectionKeyword]:e.sections.split(":"),"aa-sch-cmp_advertising":s,"kw_aa-sch-cmp_advertising":s,"aa-sch-instream_player_aspectratio":g,"aa-sch-player_aspectratio":h}),l),{eids:c})}),$o=["se-generic-audience","se-generic-appversion","se-generic-sitemode","se-generic-pagegen","se-generic-viewportheight","se-generic-viewportwidth","se-generic-screenheight","se-generic-screenwidth","aa-sch-inventory_type"],No=["aa-sch-publisher","se-generic-page","aa-sch-supply_type","se-generic-story","se-generic-section","se-generic-adformat","aa-sch-context_keyword","se-generic-tvtags","se-generic-test","aa-sch-cmp_advertising","aa-sch-instream_player_aspectratio","aa-sch-player_aspectratio"],qo=["external_uid","gdpr","gdpr_consent","eids","article-id"],Do=(e,t)=>{const n=[...$o,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||qo.includes(e)?e:`kw_${e}`,t]))},Mo=e=>Object.fromEntries(Object.entries(e).filter(([e])=>No.includes(e))),Fo=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i,o,r;const a=(e=>{var t;so[e]||s(`[video] No config found for publisher "${e}"`);return null!==(t=so[e])&&void 0!==t?t:io})(e.publisher),d=(e=>{var t;return null!==(t=lo[e])&&void 0!==t?t:lo.aftonbladet})(e.publisher)(e.assetSection,e.isLiveStudio),l="/"===window.location.pathname,c=null===(i=null===(n=t.attributes)||void 0===n?void 0:n.id)||void 0===i?void 0:i.toString(),u=e.assetId===c,p=null!==(o=Number(e.aspectRatio))&&void 0!==o?o:1,v=u?"preroll":"bumper";var g;return{siteConfig:a,siteVideoParams:d,isUserPresentOnFrontPage:l,adsKeywords:yield Lo({pageAdsKeywords:e.pageAdsKeywords,tags:(g=e.tags,g?g.filter(e=>e.slug).map(({slug:e})=>e).join(","):""),sections:null!==(r=null==d?void 0:d.sections)&&void 0!==r?r:"",isUserLoggedIn:e.isUserLoggedIn,isUserPresentOnFrontPage:l,isInitialVideo:u,instreamAspectRatio:p,playerAspectRatio:Po(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:v,playbackMethod:co(e.startMode)}}),Bo=(e,t)=>{const{siteConfig:n,siteVideoParams:i,isUserPresentOnFrontPage:o,adsKeywords:r,prerollPlacementFormat:a,playbackMethod:d}=e,{invCode:s}=i||{},l=So(i,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(fo)?`${fo}${t}`:t)(s),u=window.location.href;return{member:n.memberId,options:{autoplayMuted:!0,vpaidcontrols:!0},adSlots:{schedule:{preroll:{inv_code:l(a,o),"se-generic-playback-method":uo.get(d),"kw_se-generic-adformat":c(a)},midroll:{inv_code:l("midroll"),"kw_se-generic-adformat":c("midroll")},postroll:{inv_code:l("postroll"),"kw_se-generic-adformat":c("postroll")}},params:Object.assign(Object.assign(Object.assign({},Do(r,n)),Mo(r)),{vskippable:"0",referrer:u,vplaybackmethod:d})},adPlacements:{schedule:{pause:{invCode:l("pause"),sizes:[[825,424],[1280,720],[2,1]]}},params:{keywords:Object.assign(Object.assign({},r),{"se-generic-adformat":c("pause")})}}}},Ro=e=>t=>Ie(void 0,void 0,void 0,function*(){const n=yield Fo(e,t);return Bo(n,e)}),Uo={plcmtcnt:1,context:1,contextsubtype:10,plcmttype:1,assets:[{id:1,title:{len:100},required:0},{id:2,img:{type:1,hmin:10,wmin:10},required:0},{id:3,img:{type:3,hmin:10,wmin:10},required:0},{id:4,data:{type:2},required:0},{id:5,data:{type:12},required:0}],ver:"1.2",eventtrackers:[{event:1,methods:[1,2]}]},zo={no:"NOK",se:"SEK"},Vo={no:"no",se:"sv"};class Ho{buildFetchObject(e,t,n,i){return Ie(this,void 0,void 0,function*(){const{pageContext:{countryCode:o},pageOptions:r}=i,{invCode:a,xandrPlacementId:d}=e,s=yield no(),l=(c=Object.assign(Object.assign({},t),n),Object.entries(c).flatMap(([e,t])=>void 0===t?[]:Array.isArray(t)?t.map(t=>`${e}=${t}`):[`${e}=${t}`]).join(","));var c;const u=new URL(window.location.href),p=(e=>{const{allowedFormats:t}=e;if(!t||t.includes("native"))return{request:JSON.stringify(Uo),ver:"1.1"}})(e),v=(e=>{const{sizes:t,allowedFormats:n}=e;if((null==n?void 0:n.includes("banner"))&&t&&0!==t.length)return{format:t.map(([e,t])=>({w:e,h:t})),w:t[0][0],h:t[0][1]}})(e);return{id:x(36),imp:[Object.assign(Object.assign(Object.assign({id:a},p&&{native:p}),v&&{banner:v}),{secure:1,tagid:a,ext:{appnexus:Object.assign(Object.assign({},d&&{placement_id:d}),{code:a,keywords:l,use_pmt_rule:!1})}})],site:{domain:u.hostname,page:u.href,publisher:{id:String(r.publisherId),domain:u.hostname},ext:{amp:0}},device:{dnt:Number((null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)),ua:window.navigator.userAgent,h:screen.height,w:screen.width,language:(navigator.language||Vo[o]||"no").split("-")[0]},regs:{ext:{gdpr:s.gdpr||0}},user:{id:yield Le(i),ext:{consent:s.gdpr_consent||"",eids:en(o)}},at:1,cur:[zo[o]],source:{tid:x(36)},ext:{prebid:{bidder:{appnexus:{member:r.member}}}}}})}fetchData(e,t,n,i){return Ie(this,void 0,void 0,function*(){try{d("Starting fetching Studio ad from Xandr:",to);const o=new Headers({"Content-Type":"application/json"}),r=new URLSearchParams(window.location.search),a=new URLSearchParams(["openRTBDebugMemberOverride","openRTBNewsroomOverride","openRTBForceNativeDesc2Override"].flatMap(e=>{const t=r.get(e);return t?[[e,t]]:[]})),s=a.size>0?`${to}?${a.toString()}`:to,l=yield this.buildFetchObject(e,t,n,i),c=yield Mt.post(s,o,l);return d("Fetch operation completed successfully.",c),c}catch(e){d("Error during fetch operation:",e)}return null})}}const Wo=0,Ko=3,Go=(e,t,n,i)=>{const o=t.parentElement;if(!o)return;const r=e?`-${e}`:"",a=i?`__${i}`:"",d=`advertory${r}-${n}${a}`,s=`advertory${r}-${n}-wrapper${a}`;t.classList.remove(...t.classList),o.classList.remove(...o.classList),t.classList.add(d),o.classList.add(s),t.dataset.adType=n},Jo="finn-blink",Qo="native-ad",Xo=(e,t)=>{Yo(e,t),er(e,t)},Yo=(e,t)=>{var n,i;const o=document.querySelector(`#${e.targetId}`);if(!o||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(i=null==t?void 0:t.clickLinkSelector)&&void 0!==i?i:"a.ad-link";(null==o?void 0:o.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const i of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])nr(i)}),t.dataset.tracked="true")})},Zo=e=>{var t;const{native:{impressionTrackers:n}={}}=e,i=null==n?void 0:n.some(e=>e.includes("googleads")),o="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;i||!o?null==n||n.forEach(tr):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},er=(e,t)=>{var n;let i=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:dt])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!i)for(const n of t)if(n.isIntersecting){i=!0,Zo(e),c.disconnect();break}},s);c.observe(o)},tr=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?nr(e):window.navigator.sendBeacon(e)},nr=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},ir=e=>e.reduce((e,t)=>{if(!t.serverSidePlacement)return e.clientSidePlacements.push(t),e;const n=Math.random()<.5;return t.keywords=Object.assign(Object.assign({},t.keywords),{"aa-sch-prerenderer":n?"true":"false"}),n?e.serverSidePlacements.push(t):e.clientSidePlacements.push(t),e},{clientSidePlacements:[],serverSidePlacements:[]}),or=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;const{pageContext:{deviceType:o},appearanceConfig:r}=t,a=null==r?void 0:r.defaultThreshold[o],s=null!==(n=e.requestThreshold)&&void 0!==n?n:a,l=document.getElementById(e.targetId);if(!l)return void d(`Server-side ad container not found: ${e.targetId}`);yield new Promise(e=>{new IntersectionObserver((t,n)=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),e())},Ei(s)).observe(l)});const{prepareTag:c}=p.getHandlers(),u=U.getData("alertoryConfigKeywords"),v=null!==(i=c(Ki(e)).keywords)&&void 0!==i?i:{},g=new Ho,h=yield g.fetchData(e,u,v,t);h&&(((e,t,n)=>{const i=n===rt?t.mobileHTML:t.desktopHTML;if(i){if(t.adType===Wo){const n=document.createElement("iframe");n.width=String(t.bid.w),n.height=String(t.bid.h),n.style.overflow="hidden",n.style.border="none",n.srcdoc=`<style>html,body{margin:0;overflow:hidden;}</style>${i}`,e.appendChild(n)}else e.innerHTML=i;e.classList.add("ad-loaded")}})(l,h,o),h.adType===Ko&&(Go(t.pageContext.publisher,l,Qo,t.pageContext.pageType),Xo({targetId:e.targetId,native:{clickTrackers:h.clickTrackers,impressionTrackers:h.impTrackers}},{deviceType:o,appearanceConfig:r,nativeTrackingConfig:t.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,i)=>{var o,r,a;let d;(null===(o=window.apntag.requests)||void 0===o?void 0:o.tags[e])||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]={invCode:t,adResponse:{ads:[{creative_id:Number(null==i?void 0:i.adid)}]}}),!!n.querySelector("iframe")||(d=document.createElement("iframe"),n.appendChild(d)),Ln(e,n,Number(null==i?void 0:i.adid)),null==d||d.remove()})(e.targetId,e.invCode,l,h.bid))}),rr=(e,t)=>{e.forEach(e=>or(e,t).catch(e=>{d("Failed to handle server-side ad:",e)}))},ar={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},dr=e=>Ie(void 0,void 0,void 0,function*(){if(!(e=>{const{editory:{editableConfiguration:{enabled:t=!1,pageTypeToFetch:n}={}}={},siteSpecificConfig:i}=e;return Boolean(t&&n&&(null==i?void 0:i.publisherClassName))})(e))return e;try{const t=yield(e=>Ie(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editory:{editoryUrl:n,editableConfiguration:{pageTypeToFetch:i}={}}={}}=e;return(null==t?void 0:t.publisherClassName)&&i?`${n||"https://alertory-cdn.inventory.schibsted.io"}/editable-configurations/${t.publisherClassName}/${i.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,i=setTimeout(()=>n.abort(),5e3);try{return yield Mt.get(t,{method:"GET",signal:n.signal})}catch(e){throw d("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(i)}}))(e);return t?((e,t)=>o(t,e,ar))(e,t):e}catch(t){return d("Error fetching S3 config, using site config",{error:t}),e}}),sr=(e,t)=>{const{pageContext:{isMobileApp:n}}=p.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e};let lr,cr=[];const ur=["takeover","wallpaper"],pr=e=>{const t=(e=>{var t;const n=U.getData("alertoryConfigKeywords"),{queryConfig:i,placements:o,tcf:r,glimr:a,appearanceConfig:d,pageContext:{publisher:s,countryCode:l,pageType:u,deviceType:p,isMobileApp:v=!1},pageOptions:{member:g},pageSetup:h,takeover:m,fullscreenScroll:y,fullWidth:f}=e,w=null!==(t=null==i?void 0:i.batchSize)&&void 0!==t?t:c;return{xandr:{member:g,keywords:n,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({pageContext:{publisher:s,countryCode:l,pageType:u,deviceType:p,isMobileApp:v},pageSetup:h,placements:o,tcf:r,queryConfig:Object.assign(Object.assign({},i),{batchSize:w})},a&&{glimr:a}),d&&{appearanceConfig:d}),m&&{takeover:m}),y&&{fullscreenScroll:y}),f&&{fullWidth:f})}})(e);window.advertory={initialized:!0,version:"3.3.8",siteConfig:e,alertoryConfig:t}},vr=()=>Ie(void 0,void 0,void 0,function*(){const{pageOptions:e}=p.get(),{preparePageOptions:t}=p.getHandlers(),n=(()=>{var e,t;const{pageSetup:{pageOptions:n}={}}=p.get();return{sandboxAdIframe:null===(t=null===(e=null==n?void 0:n.options)||void 0===e?void 0:e.sandboxAdIframeEnabled)||void 0===t||t,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),i=yield Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return(yield je(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),o=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),i));(e=>{const t=U.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Xi(e);U.setData("alertoryConfigKeywords",n)})(o.keywords),k(()=>lr.setPageOpts(o))}),gr=e=>Ie(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),r=yield je(n,i,o,"loadPlacements"),a=((e,t)=>t?e:(e.filter(e=>!e.supportsNonRTB).forEach(e=>F(e.targetId)),e.filter(e=>e.supportsNonRTB).map(e=>{return Object.assign(Object.assign({},e),{invCode:(t=e.invCode,`${t}_non_rtb`)});var t})))(e,r);hr(a);(null==t?void 0:t.enabled)&&r&&!M()?(d("core loadPlacements prebid enabled"),yield Nn()):(d("core load tags invoked without prebid enabled"),mr(a))}),hr=e=>{const{prepareTag:t}=p.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.targetId.includes(t)),o=t.findIndex(e=>n.targetId.includes(e));return-1!==i&&-1===o?-1:-1===i&&-1!==o?1:i-o})})(e).forEach(e=>{d("core defineTags",{placement:e});const i=Ki(e);if(Gi(e.targetId)){const o=t(i),r=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Qi(i),sizes:o}})(o);n.push(r),k(()=>(d("core defineTag - add to the queue",{placement:e,preparedTag:o}),lr.defineTag(o)))}}),(e=>{var t,n,i;(null===(i=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===i?void 0:i.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},mr=e=>{const t=e.filter(({targetId:e})=>Gi(e)).map(({targetId:e})=>e);t.length&&k(()=>(d("core loadTags",{placementsIdsToLoad:t}),lr.loadTags([...t])))},yr=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{appearanceConfig:n,pageContext:{deviceType:i}}=p.get(),{requestThreshold:o,refresh:r}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),s=null==n?void 0:n.defaultThreshold[i];a&&(d("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,requestThreshold:o,deviceDefaultThreshold:s}),yield Ti(a,null!=o?o:s)),a&&(null==r?void 0:r.scroll)&&(d("core showAd - setup refreshing",{placement:e,adObj:t}),a.dataset.refresh=r.scroll.toString())}),fr=e=>e.some(({targetId:e})=>ur.some(t=>e.includes(t))),wr=e=>Ie(void 0,void 0,void 0,function*(){var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return;const[n,i]=(e=>e.reduce(([e,t],n)=>{var i;return(null===(i=null==n?void 0:n.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),o=(e=>{const{queryConfig:{placementBatches:t,batchSize:n=c}={},pageContext:{deviceType:i}}=p.get(),o=X(e),r=Object.keys((null==t?void 0:t[i])||{}).map(e=>o[e]||[]).filter(e=>e.length>0),a=new Set(r.flat().map(({targetId:e})=>e)),d=e.filter(({targetId:e})=>!a.has(e));return[...r,...qi(d,n)]})(i);for(const e of o)fr(e)?(d("core loadAds without lazy loading",{placementsToLoad:e}),yield gr(e)):e.length&&(d("core loadAds with lazy loading",{placementsToLoad:e}),yield br(e));const{finnBlink:r}=p.get();if((null==r?void 0:r.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield Promise.resolve().then(function(){return ba});yield e(n)}}),br=e=>Ie(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=p.get(),i=[];if(!t)return d("lazy load is not enabled",{placements:e}),void(yield gr(e));const o=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{d("lazy load is enabled - handler start",{loadedTargetIds:i,placements:e});const o=e.every(e=>i.includes(e.targetId)),r=e.map(e=>e.targetId);!o&&i.push(...r),!o&&gr(e),d("lazy load is enabled - handler stop",{loadedTargetIds:i,placements:e,arePlacementsLoaded:o,targetIds:r}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.targetId);t&&(d("lazy loading - observe element",{targetId:e.targetId,element:t}),o.observe(t))})}),xr=()=>Ie(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=p.getHandlers(),{wallpaper:n,fullscreenScroll:i}=p.get(),o=[];k(()=>{lr.onEvent("adRequested",()=>{e.adRequested()}),lr.onEvent("adAvailable",o=>Ie(void 0,void 0,void 0,function*(){var r,a,s,l,c,u;d("core adAvailable start",{placementsAvailable:cr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Ji(o),isTakeoverAd:pe(o),isCollapseAd:he(o),isWallpaperAd:ge(o)});const v=null===(s=null===(a=null===(r=null===window||void 0===window?void 0:window.apntag)||void 0===r?void 0:r.requests)||void 0===a?void 0:a.tags[o.targetId])||void 0===s?void 0:s.adResponse.ads;if(Ji(o)&&v&&(null===(l=v[1])||void 0===l?void 0:l.rtb)&&(o.banner=null===(u=null===(c=v[1])||void 0===c?void 0:c.rtb)||void 0===u?void 0:u.banner),le(o)){const{modifyFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return jn});e(o)}const{widescreenSwitching:g}=p.get();if(be(o)&&(null==g?void 0:g.enabled)){const{initWidescreenSwitching:e}=yield Promise.resolve().then(function(){return Ca});e()}if(le(o)&&!ye(o.targetId)){const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return jn});e(o,i)}if(!ce(o)||Ji(o)||ye(o.targetId)||null==t||t(o,p.get()),pe(o)&&!he(o)){const{modifyTakeoverAdContent:e,createTakeoverAd:t}=yield Promise.resolve().then(function(){return Ua});e(o.targetId),yield t(o)}if(ge(o)&&(null==n?void 0:n.enabled)){const{initWallpaperAd:e}=yield Promise.resolve().then(function(){return $});e(()=>k(()=>window.apntag.showTag(o.targetId)),n),U.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(o)&&U.setData("horseshoe",{isAvailable:!0}),it({adObj:o}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const i=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;i&&((e,t)=>{const{height:n,width:i,native:o}=e;o?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(o),e.adAvailable(o);const h=cr.find(({targetId:e})=>e===o.targetId);h&&(yield yr(h,o),cr=cr.filter(e=>e.targetId!==h.targetId)),d("core adAvailable stop",{placementsAvailable:cr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Ji(o),isTakeoverAd:pe(o),isCollapseAd:he(o),isWallpaperAd:ge(o)})})),lr.onEvent("adLoaded",n=>Ie(void 0,void 0,void 0,function*(){const{refreshConfig:i,appearanceConfig:r,wallpaper:a,adScaleConfig:d}=p.get(),s=document.getElementById(n.targetId);if(ye(n.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield Promise.resolve().then(function(){return la});e(n)}if(o.includes(n.targetId)&&ce(n)&&(null==t||t(n,p.get()),it({adObj:n})),!o.includes(n.targetId)&&Ji(n)&&o.push(n.targetId),he(n)&&F(n.targetId),pe(n)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return Ua});e(lr,n.targetId)}if((e=>Ee(e,ee))(n)){const{applyNinesixteenFormat:e}=yield Promise.resolve().then(function(){return Wa});e(n)}if((e=>Ee(e,ne))(n)){const{applyFullsquareFormat:e}=yield Promise.resolve().then(function(){return Wa});e(n)}if(ue(n)){const{applyFullwidthFormat:e}=yield Promise.resolve().then(function(){return Wa});e(n)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),o=null==i?void 0:i.parentElement;if(!o||!i)return;Li({adWrapper:o,placementContainer:i});const{delayTimeToNextRefresh:r=1e3}=t,a=(new Date).getTime();i&&"true"!==i.dataset.subscribedForRefresh&&(i.dataset.subscribedForRefresh="true",i.dataset.refresh&&Ni(i,a,r))})(n,i),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(n.targetId);if(U.getData("horseshoe").isAvailable&&(null==a?void 0:a.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return $});e(n.targetId)}if(null==d?void 0:d.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield Promise.resolve().then(function(){return yt});e(n),t(n)}e.adLoaded(n),_n(n.targetId),s&&(s.classList.add($n),(e=>{var t,n;const{pageSectionsSelectors:i}=p.get(),o=null==i?void 0:i.mainFirstColumn,r=o?null===(t=document.querySelector(o))||void 0===t?void 0:t.clientWidth:void 0;r&&e.clientWidth>r&&(null===(n=e.parentElement)||void 0===n||n.setAttribute("data-two-column-ad-layout","true"))})(s)),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:n.targetId,adFormat:ot(n)}}))})),lr.onEvent("adNoBid",t=>Ie(void 0,void 0,void 0,function*(){var n;if(F(t.targetId),null===(n=p.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:e}=yield Promise.resolve().then(function(){return pi});yield e(p.get(),t)}if(pe(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return tt});yield e(t)}e.adNoBid(t)})),lr.onEvent("adError",(t,n)=>Ie(void 0,void 0,void 0,function*(){if(pe(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return tt});yield e(n)}e.adError(t,n)})),lr.onEvent("adCollapse",()=>{e.adCollapse()}),lr.onEvent("adRequestFailure",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield ci(p.get(),t),e.adRequestFailure(t)})),lr.onEvent("adBadRequest",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield ci(p.get(),t),e.adBadRequest(t)})),lr.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),lr.onEvent("adNoBidMediated",t=>Ie(void 0,void 0,void 0,function*(){yield ci(p.get(),t),e.adNoBidMediated(t)}))})}),kr=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return[];const{clearAds:i,reloadExistingAds:o,renderFinnBlinkPlacements:r,contextSelector:a}=null!=t?t:{};if(i)return H(),[];o&&(H(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{B(e.id)})),v(null!=e?e:{}),yield vr();const{clientSidePlacements:d,serverSidePlacements:s}=ir(J(a));let l=d;return r&&(l=l.filter(e=>ye(e.targetId))),rr(s,p.get()),l.length>0&&(cr=[...cr,...l.map(e=>Object.assign({},e))],Fi(l),Ri(l),yield wr(l)),cr}),Er=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;p.set(e),p.setHandlers(Object.assign(Object.assign({},t),e.customHandlers));const{norstat:i,kilkaya:o,rightColumnSplit:r,drEdition:a,finnBlink:s}=e;if(U.initialize(),window.addEventListener("message",ki,!1),lr=window.apntag||{anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}},window.apntag=lr,d("Apn tag is set up on window"),yield Promise.allSettled([Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();(yield je(e,t,n,"xandr-endpoint"))||lr.setEndpoint("ib.adnxs-simple.com",!0)}),Ie(void 0,void 0,void 0,function*(){if(M())return;const{prebid:e,tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get(),o=yield je(t,n,i,"prebid");(null==e?void 0:e.enabled)&&o&&(yield nn(null==e?void 0:e.prebidUrl))}),Qt(e),Ie(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=p.get();yield nn(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),Ie(void 0,void 0,void 0,function*(){const{developerOptions:{gptUrl:e}={},tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get();(yield je(t,n,i,"gpt-endpoint"))&&(yield nn(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),Ie(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,brandmetricsUrl:t}={},tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),{getConsentAsync:r}=Oe(n,0,o),a=yield r();if(e&&t&&a){if(yield nn(t),document.querySelector(`.${eo}`))return window._brandmetrics=window._brandmetrics||[],void window._brandmetrics.push({cmd:"_loadsurvey"});new MutationObserver((e,t)=>{for(const n of e){if("childList"!==n.type)return;Array.from(n.addedNodes).some(e=>{var t;return null===(t=e.outerHTML)||void 0===t?void 0:t.includes(eo)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),St(),Ie(void 0,void 0,void 0,function*(){const{gdpr:{gdprUrl:e,allowHidingAds:t=!0}={}}=p.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield nn(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null==i?void 0:i.enabled){const{loadNorstat:e}=yield Promise.resolve().then(function(){return Ga});yield e()}d("Libraries have been loaded and trackers have been set"),yield xr(),yield vr(),d("Page options have been set"),pr(e),d("Advertory is setup on window");const{clientSidePlacements:l,serverSidePlacements:c}=ir(J());if(cr=l,rr(c,e),Fi(cr),Ri(cr),yield wr(cr),d("Ads has been loaded",cr),ui(e,cr),Yi(cr),null==s?void 0:s.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return ba});yield t(null===(n=null==e?void 0:e.pageContext)||void 0===n?void 0:n.deviceType,e.finnBlink)}if(null==a?void 0:a.enabled){const{handleDrEdition:t}=yield Promise.resolve().then(function(){return pi});yield t(e)}if(null==r?void 0:r.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return id});t(e.rightColumnSplit)}if(null==o?void 0:o.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return ud});yield t(e)}}),Cr=(e,t)=>Ie(void 0,void 0,void 0,function*(){yield((e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;const{initConsentManager:o,getConsentAsync:r}=Oe(e.tcf,null===(n=e.pageContext)||void 0===n||n.isMobileApp,null===(i=e.pageContext)||void 0===i?void 0:i.countryCode),a=yield dr(e);yield di(),yield Zi(o),yield Zi(r),d("TCF resolved successfully"),yield Er(a,t),d("Run function resolved successfully")}))(e,t)}),Ir=(e,t,n,i)=>{var o;const{image:r,icon:a,sponsoredBy:d,title:s,clickUrl:l,cta:c,body:u,desc2:p,video:v,description:g,customTitle1:h,customTitle2:m,customTitle3:y,customTitle4:f,customIcon1:w,customIcon2:b,customDisplayUrl1:x}=e,k=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:k(r),imgWidth:null==r?void 0:r.width,imgHeight:null==r?void 0:r.height,imgAltText:null!=s?s:"",logo:(()=>{var e;const t=(null==p?void 0:p.includes("sponsor"))&&"dark"===(null===(e=i.appearanceConfig)||void 0===e?void 0:e.theme)&&w;return k(t?w:a)})(),sponsoredBy:null!=d?d:"",title:null!=s?s:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(o=null!=u?u:g)&&void 0!==o?o:"",desc2:null!=p?p:"",video:v,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=y?y:"",customTitle4:null!=f?f:"",logo2:k(b),previewVideoSrc:null!=x?x:""},t)},Tr=(e,t)=>{const n=(i=D,window.location.href.includes(i));var i;const o=new URLSearchParams(window.location.search).get(D),r=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?r?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},Sr=(e,t,n,i)=>{const o=document.querySelector(`#${e}`);o&&t&&(o.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:o}=t,r=i&&Object.values(wt).includes(i);n&&r&&Go(i,e,Qo,o)})(o,n),i())},Ar=(e,t,n)=>{const i=((e,t,n)=>{var i;const{displayTemplates:o,videoTemplates:r}=n,a="default";if(!e.native)return null;const{native:d,targetId:s}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),u=null!==(i=Tr(e.targetId,l))&&void 0!==i?i:c,p=Cn[t.language||g.NO],v=Ir(d,p,s,t);return(d.video?r[u]:o[u]||o.default)(v,t)})(e,t,n);Sr(e.targetId,i,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&Xo(e,t)})},Pr=e=>(t,n)=>{var i;const{targetId:o}=t,r=document.querySelector(`#${o}`);if(!r)return;const a=e.getOptions(null!=n?n:{});Ar(t,a,e.templates),null===(i=e.postProcess)||void 0===i||i.call(e,t,r)},Or=e=>{const{pageContext:{countryCode:t}}=p.get(),{keywords:n,dynamicSizeWidthCheck:i}=e,o=`${h(t)}-adformat`,r=n?n[o]:[];if(!r)return{};const a=(Array.isArray(r)?r:[r]).filter(e=>!(e in se)||window.innerWidth>=se[e]);return{[o]:i?a:r}},jr=e=>{const{pageContext:{countryCode:t}}=p.get(),n=`${h(t)}-targetid`;return e?{[n]:[e]}:{}},_r=()=>{if(!window.location.search.includes("kv_"))return{};const e={},t=(()=>{const e=new URLSearchParams(window.location.search);return Object.fromEntries(e)})();return Object.keys(t).forEach(n=>{n.startsWith("kv_")&&(e[n.slice(3)]=t[n])}),e},Lr=e=>{const{siteSpecificConfig:t}=p.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))},$r=(e,t)=>Lr(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{},Nr=e=>Lr(e)?{"aa-sch-dynamic-outstream":["true"]}:{};class qr{constructor(){this.keywords={}}add(e){return Object.assign(this.keywords,e),this}addAsync(e){return Ie(this,void 0,void 0,function*(){return Object.assign(this.keywords,yield e),this})}addIf(e,t){return e&&Object.assign(this.keywords,t),this}addIfAsync(e,t){return Ie(this,void 0,void 0,function*(){return e&&Object.assign(this.keywords,yield t()),this})}build(){return this.keywords}}const Dr=9826;class Mr{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e,isMobileApp:t}}=p.get();if(t){return{"aa-sch-supply_type":`app_${e===rt?"phone":at}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return Ie(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},e.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(e.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return Ie(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return{"aa-sch-externalid_src":Number(!!e)+Number(!!t)}})}getUserId(){return $e()}getExternalUid(){return Ie(this,void 0,void 0,function*(){return yield Le(p.get())})}isTrackingForbidden(){return Ie(this,void 0,void 0,function*(){return(null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)||"DO_NOT_TRACK"===(yield this.getExternalUid())})}getMember(){const{pageOptions:{member:e},developerOptions:{testMember:t=Dr}={}}=p.get();return"true"===N("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{pageContext:{publisher:e}}=p.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return Ie(this,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get(),{getConsentAsync:i}=Oe(e,0,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageContext:{pageType:e}}=p.get();return{"aa-sch-page_type":e}}getCountryCodeKeywords(e){return{"aa-sch-country_code":e}}getInventoryTypeKeywords(){return{"aa-sch-inventory_type":"editorial"}}getHasContextKeywords(e){const t=e["aa-sch-context_keyword"];return{"aa-sch-has_context_keyword":Array.isArray(t)&&t.length?1:0}}getPageOptionsFormatDevice(e="desktop"){return"mobile"===e?"phone":e}}const Fr=new Mr,Br=Fr.prepare.bind(Fr);function Rr(e=!1){var t,n;const i=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),o=pt();return{OS:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}const Ur=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function zr(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Ur.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Vr extends Mr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=p.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=p.get(),{OS:n,isHybridApp:i}=Rr(t);return{"no-sno-apptype":n&&e&&i?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return zr(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get(),o=null!==(t=null===(e=n.keywords["no-sno-news-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan";return{"no-sno-section-page_type":`${o.split("_").pop()||o}_${"article"===i?"article":"front"}`}}}const Hr=new class extends Vr{prepare(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a,d;const s=p.get(),l=null!==(i=null===(n=null===(t=s.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},c=null!==(a=null===(r=null===(o=s.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},u=null===(d=s.siteSpecificConfig)||void 0===d?void 0:d.publisherClassName,v=new qr;yield v.addAsync(this.getAdvertisingConsentKeywords()),yield v.addAsync(_t(p.get(),l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield v.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),v.add(this.getSupplyTypeKeywords()).add(Yt()).addIf(c.appType,this.getAppTypeKeywords()).addIf(c.device,this.getDeviceKeywords()).addIf(c.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(c.sectionPageType,this.getSectionPageTypeKeywords()).addIf(c.obituaries&&void 0!==u,void 0!==u?this.getObituariesKeywords(u):{}).addIf(c.hasContext,this.getHasContextKeywords(e.keywords)).add(e.keywords);const h=v.build(),m=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:h,user:Object.assign(Object.assign({},Xt(g.NO)),m?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Wr=Hr.prepare.bind(Hr);class Kr extends Mr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=p.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return{width:e||n||0,height:t||i||0}}(),t={width:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==i?i:0,height:null!==(r=null===(o=window.screen)||void 0===o?void 0:o.height)&&void 0!==r?r:0};var n,i,o,r;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return Ie(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{pageContext:{isMobileApp:e}}=p.get(),{appMode:t,mobileOS:n}=Rr(e);return{"se-generic-appmode":t,"se-generic-mobileos":n}}getPublisherGroup(){return{"se-generic-publishergroup":"schibsted"}}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get();return{"se-generic-section-page_type":`${null!==(t=null===(e=n.keywords["se-generic-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan"}_${"article"===i?"article":"front"}`}}}const Gr=new class extends Kr{prepare(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a;const d=p.get(),s=null!==(i=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},l=null!==(a=null===(r=null===(o=d.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},c=new qr;yield c.addAsync(this.getAdvertisingConsentKeywords()),yield c.addAsync(_t(p.get(),s.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield c.addIfAsync(l.externalIdSrc,()=>this.getExternalIdSrc()),yield c.addIfAsync(l.sdkVersion,()=>Ie(void 0,void 0,void 0,function*(){return{"se-generic-sdk-version":"function"==typeof window.apntag.getAstVersion?window.apntag.getAstVersion():""}})),c.add(this.getSupplyTypeKeywords()).add(Yt()).addIf(l.appType,this.getAppTypeKeywords()).addIf(l.device,this.getDeviceKeywords()).addIf(l.screen,this.getScreenKeywords()).addIf(l.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(l.sectionPageType,this.getSectionPageTypeKeywords()).addIf(l.hasContext,this.getHasContextKeywords(e.keywords)).addIf(l.hasPlusMembership,{"se-generic-has_plus":"plus"===_e("X-AB-Site-Version")?"yes":"no"}).add(e.keywords);const u=c.build(),v=!1!==s.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:u,user:Object.assign(Object.assign({},Xt(g.SE)),v?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Jr=Gr.prepare.bind(Gr);kn('@import"https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap";.advertory-shared-ad-native-content-display-basic{width:100%;font-family:Roboto,sans-serif;color:#6d747e;text-align:left;background:#fff;position:relative;margin:0 auto;display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic *{line-height:normal}.advertory-shared-ad-native-content-display-basic .ad-info{top:0;right:8px;position:absolute}.advertory-shared-ad-native-content-display-basic .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic .ad-link{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-link:hover{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-header{padding:5px 16px;background-color:#ffcd00;font-size:12px;text-transform:uppercase;color:#495057;font-weight:600}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper{display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{position:relative;padding-bottom:40%}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{display:none}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper{position:absolute;height:100%;width:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper .ad-large-image{object-fit:cover;min-width:100%;height:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content{box-sizing:border-box;display:flex;background-color:#fffae6}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container{flex-grow:1;padding:16px}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:20px;color:#212529;font-weight:600;margin-bottom:16px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:22px}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-sponsor{font-size:11px;color:gray;font-weight:600;text-transform:uppercase}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:none;max-width:175px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:block}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover;max-width:100%}.advertory-shared-ad-native-content-display-basic.article .ad-info{top:0;right:0;position:absolute;border-bottom-left-radius:50%;background:hsla(0,0%,100%,.6)}.advertory-shared-ad-native-content-display-basic.article .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{display:block}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container{padding:8px 16px;border-left:4px solid #ffcd00}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{display:flex;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper .ad-header{padding:2px 4px;font-size:11px}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:15px;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:18px;margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:16px 8px 16px 0}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:0}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:contain}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover}}'),kn('.advertory-abo-ad-native-sponsorstripe{position:absolute;top:0;left:0;width:100%;height:1px;background:inherit;padding:0;margin:0;border:none;text-align:left}.advertory-abo-ad-native-sponsorstripe .ad-wrapper{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;max-width:980px;height:30px;padding:5px 15px;margin:auto;font-family:"Helvetica Neue",Arial,Roboto,sans-serif}.advertory-abo-ad-native-sponsorstripe .ad-logo{flex:0;height:20px;max-width:35%;max-height:inherit}.advertory-abo-ad-native-sponsorstripe .ad-title{margin-right:10px;padding-left:34px;font-size:13px;color:#fff}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper{display:grid;position:absolute;place-content:center;height:30px;min-width:30px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{display:inline-block;height:20px;width:20px;position:relative;border:solid 1px #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{content:"i";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:13px}.advertory-abo-ad-native-sponsorstripe .ad-description{font-size:13px;color:#fff;position:absolute;top:0;max-width:980px;min-height:30px;padding:15px 35px 15px 15px;margin-left:-15px;background-color:rgba(0,0,0,.9)}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper{position:absolute;top:15px;right:15px;place-content:center;height:16px;min-width:16px}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button{display:inline-block;height:16px;width:16px;position:relative;border:1px solid #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button:before{content:"✕";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:10px;font-weight:bold}.advertory-abo-ad-native-sponsorstripe .ad-description .ad-description-readmore{color:#c7ecff}.advertory-abo-ad-native-sponsorstripe .ad-description.hide{display:none}@media screen and (min-width: 768px){.advertory-abo-ad-native-sponsorstripe .ad-wrapper{height:50px}.advertory-abo-ad-native-sponsorstripe .ad-wrapper .ad-description{min-height:50px}.advertory-abo-ad-native-sponsorstripe .ad-logo{height:40px}.advertory-abo-ad-native-sponsorstripe .ad-title{font-size:20px;padding-left:40px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{height:30px;width:30px;border-width:2px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{font-size:20px}}');const Qr={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:i,img:o,adText:r})=>(Promise.resolve().then(function(){return pd}),`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${r}</span> ${n}\n </div>\n <div class="ad-title">${i}</div>\n </div>\n </div>\n </a>\n </article>`)},Xr={displayTemplates:{default:Qr.NATIVE_TEMPLATE},videoTemplates:{}},Yr={prepareTag:e=>{var t;const{keywords:n,targetId:i,invCode:o,dynamicSizeWidthCheck:r,globalPlacementId:a}=e,{pageSetup:d,pageContext:{countryCode:s}}=p.get();if(!d)return(e=>{const{keywords:t,targetId:n,invCode:i}=e,{pageSetup:{tag:{useAppTabletInvCode:o=!0}={}}={}}=p.get(),r=sr(i,o),a=Or(e),d=jr(n),s=_r(),l=Nr(i),c=$r(i);return Object.assign(Object.assign({},e),{invCode:r,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),a),d),l),s),rendererOptions:c})})(e);const{tag:{useAppTabletInvCode:l=!0}={}}=d,c=sr(o,l),u=Or(e),v=jr(i),g=(e=>{var t;const[,n]=null!==(t=e.match(/-((w|a)(?:ph|de|tb))-/))&&void 0!==t?t:[];switch(n){case"wde":return{"aa-sch-supply_type":"web_desktop"};case"wtb":return{"aa-sch-supply_type":"web_tablet"};case"wph":return{"aa-sch-supply_type":"web_phone"};case"aph":return{"aa-sch-supply_type":"app_phone"};default:return}})(c),m=_r(),y=Nr(o),f=$r(o,{safeFrameAutoInitialSize:!0}),w=r&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,b=(new qr).add(null!=n?n:{}).add(u).add(v).add(null!=g?g:{}).add(y).add(m).addIf(null===(t=null==d?void 0:d.tag)||void 0===t?void 0:t.reloadKeywords,{[`${h(s)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:w,invCode:c,keywords:b,rendererOptions:f,globalPlacementId:a||c})},preparePageOptions:e=>Ie(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t},pageSetup:n}=p.get();return n?yield t===g.SE?Jr(e):Wr(e):yield Br(e)}),siteEvents:ft,initNativeAd:(e,t)=>{var n;const{targetId:i}=e;if(!document.querySelector(`#${i}`))return;const{pageType:o=Gn.FRONT,deviceType:r}=null!==(n=null==t?void 0:t.pageContext)&&void 0!==n?n:{},{nativeTrackingConfig:a,appearanceConfig:d}=null!=t?t:{},s={language:g.NO,publisher:wt.PENT,deviceType:r,pageType:o,nativeTrackingConfig:a,appearanceConfig:d};Ar(e,s,Xr)}},Zr=((e,t)=>({init:n=>Cr(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:kr,getVideoPPIDs:tn,createInitNativeAd:Pr,getVideoAdsConfig:Ro}))(Yr,bt),ea=kn("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container{padding:0 6px;height:36px}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon{margin-right:3px;height:unset;width:unset;bottom:0}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var ta=Object.freeze({__proto__:null,default:ea});kn('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const na={Blink:"Blink"},ia=new Map,oa=e=>{var t;if(!ia.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(na)){const i=e[t];null!=i&&(window[n]=i)}})(e)).catch(t=>{throw ia.delete(e),t});ia.set(e,t)}return null!==(t=ia.get(e))&&void 0!==t?t:Promise.resolve()},ra="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",aa="https://www.finn.no/distribution-front/external/carousel",da=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageContext:{pageType:i}}=p.get(),o=document.querySelector(`#${e}`);if(!o)return;if(o.classList.add("disable-cogwheel"),!n)return;Go(n,o,Jo,null!=t?t:i);it({preferredTestIdData:{targetId:e,testId:"finn"}})},sa=e=>{const{pageContext:{publisher:t=""}}=p.get(),n=document.querySelector(`#${e}`);if(!n)return;const i=`-${t}`;n.classList.remove(`advertory${i}-finn-blink`),n.classList.remove(`advertory${i}-finn-blink-wrapper`)};var la=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=p.get(),{initNativeAd:n}=p.getHandlers();le(e)&&Pn(e,t),ce(e)&&(null==n||n(e,p.get()))},finnBlinkLoaded:da,xandrAdLoaded:sa});const ca={get:e=>{try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return d(`sessionStorageClient.get: Error during getting data from sessionStorage: ${e}`),null}},set:(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){d(`sessionStorageClient.set: Error during saving data to sessionStorage: ${e}`)}},remove:e=>{try{sessionStorage.removeItem(e)}catch(e){d(`sessionStorageClient.remove: Error during remove data from sessionStorage: ${e}`)}}},ua="finn_blink_id",pa=e=>Ie(void 0,void 0,void 0,function*(){const{userId:t,id:n,hashed_email:i,theme:o}=e,r=Ce(e,["userId","id","hashed_email","theme"]),a=window[na.Blink];if(!a)return;const d=new a({remote:aa,id:n,hashed_email:i,theme:o});yield d.inject(Object.assign({},r))}),va=e=>Ie(void 0,void 0,void 0,function*(){const{userId:t,theme:n}=e,i=Ce(e,["userId","theme"]),o=window[na.Blink];if(!o)return;const r=new o({remote:aa,userId:t,theme:n});yield r.inject(Object.assign({},i))}),ga=e=>{var t,n;const i=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==i?void 0:i.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},ha=(e,t)=>{const{finnBlink:{enabled:n}={}}=p.get(),i=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!i||!n)return null;const{limit:o,height:r,requireImage:a,theme:d,rec:s,distributionTypes:l,position:c,offset:u}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${ga(e)}`,enabled:i,position:null!=c?c:e,distributionTypes:null!=l?l:[],limit:null!=o?o:100,height:null!=r?r:100,offset:null!=u?u:200,requireImage:a,rec:s,theme:"dark"===d?"dark":"light",advertoryTheme:null==t?void 0:t.advertoryTheme}},ma=(e,t,n)=>Ie(void 0,void 0,void 0,function*(){var i;const{placements:o,pageContext:{deviceType:r}}=p.get();d(`rendering finn blink ad for ${e}`);const a=w(e),s=o[r].find(e=>e.targetId===a),l=ha(e,null==s?void 0:s.finnBlink);if(!(null==l?void 0:l.enabled))return d(`Finn blink is not enabled on placement: ${e}`),n&&n(e),void sa(e);if((e=>{var t;const n=ga(e),i=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==i?void 0:i.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void d(`Finn blink already loaded ${e}`);const{publisher:c,countryCode:u,finnBlink:v}=t,{sdkPayload:{userId:g,uuid:h,channel:m,theme:y}={}}=null!=v?v:{},f=null!=m?m:`${c}.${u}`,b=(e=>{if(!e){const e=$e();return null!=e?e:""}return e})(g),x="dark"===y?"dark":"light";try{const e=yield Ie(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=p.get(),t=ca.get(ua),n=N("finncode");if(!e||n)return"";if(!t){const t=yield Mt.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return ca.set(ua,n),n}return t}),t=yield Ie(void 0,void 0,void 0,function*(){const{ppid1:e}=Jt.getPPIDs();return e}),n=(null===(i=null==s?void 0:s.finnBlink)||void 0===i?void 0:i.useNewConstructor)?va:pa;yield n(Object.assign(Object.assign({},l),{channel:f,id:b,userId:t,hashed_email:e,theme:x,uuid:h})).then(()=>{da(l.selector.replace("#",""),l.advertoryTheme)})}catch(t){d(`Finn blink error ${t}`),n&&n(e),!n&&F(e),sa(e)}}),ya=()=>Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return!!(yield je(e,t,n,"finn-blink"))||(d("Skip loading finn blink ad due to missing TCF consent."),!1)}),fa=(e,t)=>{var n;(d(`Appending ${t.id} after ${e.id}`),e.parentElement&&(n=e.parentElement,!Array.from(n.children).some(e=>e.classList.contains("advertory-finn-blink-wrapper"))))?(e.parentElement.style.display="none",e.parentElement.insertAdjacentElement("afterend",t)):d(`Cannot perform afterend on: ${e.id}`)},wa=e=>document.querySelector(`#${e}`);var ba=Object.freeze({__proto__:null,handleFinnBlinkOnlyPlacements:e=>Ie(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:n}}=p.get(),i=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{requestThreshold:e,targetId:n}=t,o=wa(n);o&&(yield Ti(o,null!=e?e:i))}}),loadFinnBlinkAd:(e,t,n,i)=>Ie(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:o}}=p.get();if(d(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield ya())||o)return n&&n(e),sa(e),void(!n&&F(e));try{yield oa(ra)}catch(e){console.error(e)}yield ma(e,t,n),i&&i()}),replaceAdsWithFinnBlink:(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;if(!t)return;const{replacementConfig:o}=t,r=null===(n=null==o?void 0:o.adsToReplace)||void 0===n?void 0:n[e],a=null===(i=null==o?void 0:o.sizes)||void 0===i?void 0:i[e];si()&&r&&a&&t.enabled?(yield ya())&&(yield oa(ra),r.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const i=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=p.get(),n=document.createElement("div"),i=document.createElement("div");return i.id=e,n.appendChild(i),Go(t,i,Jo),d(`Creating blink container for: ${e}`),n})(t);(e=>{d(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),fa(n,i),n.dataset.finnBlinkId=t,Ci().withFullAdsChain(e)})):d(`Finn blink configuration is incorrect: ${JSON.stringify(o)}`)})});const xa=1e4,ka=e=>e.some(e=>e.some(e=>!!e&&Mi(e,0)));let Ea;var Ca=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=p.get(),{enabled:t,options:{rotationInterval:n=xa,widescreenIdPrefix:i}={}}=null!=e?e:{};if(!t)return;const o=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=p.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(i);let r=0,a=Date.now(),d=ka(o);if(!o.length)return;Ea&&window.removeEventListener("scroll",Ea);const s=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},l=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block",e[0].style.opacity="1"),e[1]&&(e[1].style.display="none",e[1].style.opacity="")})})(o);const c=((e,t)=>{let n=null;return(...i)=>{null===n&&(e(...i),n=setTimeout(()=>{n=null},t))}})(()=>{d||(d=ka(o)||d,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(r),t=o.map(e=>e[r]),n=o.map(t=>t[e]);s(t,"opacity","0"),setTimeout(()=>{s(t,"display","none"),s(n,"opacity","0"),s(n,"display","block"),setTimeout(()=>{s(n,"opacity","1")},450)},450)})(),r=l(r),a=Date.now())},1e3);Ea=c,window.addEventListener("scroll",c)}});const Ia="#fff",Ta="#0098da",Sa=(e,t=!0)=>{(e===qe||e===De)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},Aa=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Pa=e=>{document.body.style.overflow=e?"initial":"hidden"},Oa=e=>{const t=_a(e),n=ja(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Pa(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},ja=e=>{const t=()=>Oa(e);return window.addEventListener("advertory:closeTakeover",t),Aa(),t},_a=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Oa(e)};return Aa(),window.addEventListener("keydown",t),t},La=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(_a(e),ja(e),Aa(),t.addEventListener("click",()=>{Oa(e)}),Pa(!1))},$a=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),ja(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},Na=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Oa(e))})(e)},qa=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=p.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),i=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&i&&(i.style.display="flex",i.innerText=Cn.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Da=e=>{const t=document.querySelectorAll(".advertory-topscroller-elements");Array.from(t).forEach(e=>e.style.display="flex");const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=Cn.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Ma=e=>{const t=document.querySelectorAll(".advertory-welcome-page-elements");Array.from(t).forEach(e=>{e.style.display="flex",e.style.animation="elementsAnimation 1.5s ease-out forwards"});const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=Cn.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Fa=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=Cn.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Ba=()=>{const e=document.querySelector(".welcome-page-wrapper, .topscroller-wrapper, .advertory-splash-wrapper");if(!e)return;let t=0;new IntersectionObserver(e=>{e.forEach(e=>{var n;if(e.isIntersecting){window.dispatchEvent(new CustomEvent("advertory:takeoverInView"));(null!==(n=Array.from(e.target.classList))&&void 0!==n?n:[]).includes("advertory-splash-wrapper")&&(()=>{const e=window.scrollY||0;document.body.dataset.scrollY=e.toString(),document.body.style.top="0",document.body.classList.add("page-locked"),document.documentElement.scrollTop=0})(),t++}else t>0&&window.dispatchEvent(new CustomEvent("advertory:takeoverNotInView"))})},{root:null,rootMargin:"0px",threshold:0}).observe(e)},Ra=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${et})()`,e+t.outerHTML})(e)),n};var Ua=Object.freeze({__proto__:null,createTakeoverAd:e=>Ie(void 0,void 0,void 0,function*(){const{takeover:t}=p.get(),{targetId:n}=e,i=document.querySelector(`#${n}`),o=document.querySelector(".advertory-takeover-wrapper");if(!i||!o||!t)return;const r=Je(e),a=o.offsetHeight,d=window.scrollY>a;o.style.display="block",!d&&Sa(r,!1),((e,t)=>{({[qe]:Ma,[Ne]:qa,[De]:Da,[Me]:Fa})[t](e)})(o,r),Ba(),((e,t)=>{({[qe]:$a,[De]:$a,[Ne]:La,[Me]:Na})[t](e)})(o,r),((e,t,n)=>{if(!n)return;({[qe]:()=>{const{buttonLabel:i}=Ye(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=i?i:"")})},[Ne]:()=>{const{themeColors:i,logotype:o,buttonLabel:r,showArrowIcon:a}=Ye(n,t);["#advertory-splash-close-label",".advertory-splash-close","#advertory-splash-logotype",".advertory-splash-navbar-wrapper"].forEach(t=>{const n=e.querySelector(`${t}`);if(n){if("#advertory-splash-close-label"===t&&(n.innerText=null!=r?r:""),".advertory-splash-close"===t&&a){const e=document.createElement("img");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAfQAAAH0Bx0gPAAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNtdPJCYBADEDRzzRmE3ZgEV6tRHHpzELiIQrBZRajA7lk4EE2RIQjgApYgdbmY8EJaADZo3sDBKAvQa4JRYZc5D6pyJiDPMuKTCkkXp8icwxJd1mRxSC1/Q94328luJroGqNrkdyrzAfHVHzOG+8CKlLk+LO+AAAAAElFTkSuQmCC"),e.setAttribute("alt","close ad"),n.appendChild(e)}if("#advertory-splash-logotype"===t&&o&&(n.setAttribute("src",o.url),n.setAttribute("alt",o.alt)),".advertory-splash-navbar-wrapper"===t&&i){const{backgroundColor:e,color:t}=i;n.style.setProperty("background-color",null!=e?e:Ia,"important"),n.style.color=null!=t?t:Ta}}})},[De]:()=>{const{buttonLabel:i,showArrowIcon:o,showCloseButton:r=!0}=Ye(n,t);["#advertory-topscroller-scroll-label","#advertory-topscroller-scroll-image",".advertory-topscroller-close"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(".advertory-topscroller-close"!==t||r||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[Me]:()=>{}})[t]()})(o,r,t),yield Qe(),!d&&Sa(r,!0),Ze(e,r)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=ln(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=ln(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,Ra(t))},modifyTakeoverIframe:(e,t)=>{var n;const i="100%",o="100%";e.resizeAd(t,[i,o]);const r=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!r)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(r),t=e.width,n=e.height;t===i&&n===o||(r.style.width=i,r.style.height=o)}}).observe(r,{attributes:!0,attributeFilter:["style"]})}});const za=(e,t)=>{t.left&&(e.style.left=t.left),t.marginLeft&&(e.style.marginLeft=t.marginLeft)},Va=(e,t)=>{var n,i;const o=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:r,fullWidthFormatClassName:a}={},fullWidth:d,pageContext:{deviceType:s}}=p.get();if(!o)return null;const l=o.parentElement;if(o.style.width=vt(s)?"100vw":"100%",o.style.position="relative",l&&(l.style.width=vt(s)?"100vw":"100%",l.style.position="relative"),r&&a){const e=`advertory-${r}-${a}`;o.classList.add(`${e}__${t}`),null==l||l.classList.add(`${e}-wrapper__${t}`)}const c=null===(i=null===(n=null==d?void 0:d.options)||void 0===n?void 0:n.styles)||void 0===i?void 0:i[s],u=(null==d?void 0:d.enabled)&&c;return!u&&l&&vt(s)&&(l.style.left="50%",l.style.marginLeft="-50vw"),u&&c.adContainer&&za(o,c.adContainer),u&&c.adContainerWrapper&&l&&za(l,c.adContainerWrapper),o},Ha=(e,t,n,i)=>{const o=Va(e,i);if(!o)return;const r=o.querySelector("iframe"),a=null==r?void 0:r.parentElement;if(!r||!a)return;const d=o.offsetWidth,s=d/e.width;a.style.transform=`scale(${s})`,a.style.transformOrigin="left top";const l=Math.round(d/t*n);o.style.height=`${l}px`};var Wa=Object.freeze({__proto__:null,applyFullsquareFormat:e=>{Ha(e,1080,1080,"fullsquare-ad")},applyFullwidthFormat:e=>{const t=Va(e,"fullwidth-ad");if(!t)return;const n=t.querySelector("iframe");if(!n)return;const{deviceType:i}=p.get().pageContext;n.style.width=vt(i)?"100vw":"100%",(null==n?void 0:n.parentElement)&&(n.parentElement.style.width=vt(i)?"100vw":"100%")},applyNinesixteenFormat:e=>{Ha(e,1080,1920,"ninesixteen-ad")}});const Ka=e=>e===g.NO?"schibsted":"schibstedse";var Ga=Object.freeze({__proto__:null,getCampaign:Ka,loadNorstat:()=>Ie(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},pageContext:{countryCode:t,isMobileApp:n},tcf:i}=p.get(),o=yield je(i,n,t,"norstat");if(!e||n||!o)return;const r=(e=>{const{ppid1:t,ppid2:n}=Gt.getPPIDs(),{ppid1:i,ppid2:o}=Jt.getPPIDs(),r=(new Kt).add(n,Bt[e]).add(t,Rt[e]).add(o,Ut[e]).add(i,zt[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{Ie(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const i=document.createElement("img");i.src=e,i.id=null!=t?t:"",n&&(i.style.display="none"),document.body.appendChild(i)})})(`https://sch-map.norstatsurveys.com/api/nids/${Ka(t)}/map/${r}`,"norstat")})});const Ja=".advertory-right-column-track",Qa="--advertory-right-column-track-height",Xa=e=>e.getBoundingClientRect().top+window.scrollY,Ya=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Za=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},ed=(e,t)=>`${e}-${t}`,td=(e,t,n)=>{var i;const o=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),r=(e=>e.map(e=>{var t;return null===(t=document.querySelector(`[id^="${e}"]`))||void 0===t?void 0:t.parentElement}).map((e,t)=>({point:e,originalIndex:t})).filter(e=>Boolean(e.point)))(n);if(0===r.length)return;const a=Xa(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Ya(e);Za("--advertory-newsroom-header-height",t)})(),r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=Xa(e),o=ed(Qa,t),r=i-n,a=ed("--advertory-right-column-split-point-height",t),d=Ya(e);Za(o,r),Za(a,d)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=ed("--advertory-right-column-ad-height",t),i=Ya(e);Za(n,i)})(o[t])});((e,t)=>{const n=Xa(e);Za(Qa,n-t)})(r[Math.min(o.length,r.length-1)].point,a)};let nd=!1;var id=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||nd)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=Ja}=e,o=document.querySelector(i);if(!o)return;nd=!0;const r=()=>{td(o,n,t)};r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),window.addEventListener("load",r),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(r)});new ResizeObserver(r).observe(o)}});class od{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class rd{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class ad{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:i}=this.parseKilkayaData(e);return{id:i,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a,d,s,l;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(o=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===o||o.call(i,u):(null===(r=this.pulse)||void 0===r?void 0:r.trackViewUIElement)?null===(d=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===d||d.call(a,u):null===(l=null===(s=this.pulse)||void 0===s?void 0:s.trackElementView)||void 0===l||l.call(s,u)})}trackContentClick(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a;if(!this.pulse)return;const d=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,d):this.pulse.trackClickUIElement?null===(o=(i=this.pulse).trackClickUIElement)||void 0===o||o.call(i,d):null===(a=(r=this.pulse).trackElementClick)||void 0===a||a.call(r,d)})}}class dd extends ad{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,o,r,a;const{clientName:d,creativeId:s,itemId:l,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),p=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(o=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==o?o:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:d,creativeId:null!=s?s:l},page:{"@id":null!=p?p:c,"@type":u,url:location.origin},tags:null===(a=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getTags)||void 0===a?void 0:a.call(r,e)}}getEventTarget(e){const{link:t,itemId:n,title:i}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const sd="[data-k5a-teaser-analytics]",ld=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new dd(e,t,n),r=new WeakMap,a=e=>{const t=r.get(e);t&&(t.disconnect(),r.delete(e))},d=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,i=n.querySelector(sd);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(r.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(sd);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),r.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{d.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})};class cd{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const i={[wt.VG]:new od}[n]||new rd;ld(e.instance,i,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(!n)return;const i=n.parentElement;i&&(d(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(i))})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";B(i)}loadKilkayaScript(e){return Ie(this,void 0,void 0,function*(){yield nn(e)})}run(e){return Ie(this,void 0,void 0,function*(){var t,n;const{tcf:i,pageContext:{isMobileApp:o,countryCode:r},kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const d=yield je(i,o,r,"kilkaya");d&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(d),yield this.loadKilkayaScript(null!==(n=null===(t=a.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(e))})}}var ud=Object.freeze({__proto__:null,Kilkaya:({placementName:e,slotTag:t,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const d=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},s=d(r,"data-pulse"),l=d(a,"data");return n.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},s,l,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("k5a-stream",{name:e,"slot-tag":t}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},runKilkaya:e=>Ie(void 0,void 0,void 0,function*(){const t=new cd;yield t.run(e)})});kn('.advertory-no-ad-native-default{width:calc(100% - 32px);min-height:250px;margin:auto;color:#dfdfdf;font-family:"Inter",sans-serif;font-weight:600;text-align:left;position:relative;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed;font-size:14px}@media screen and (min-width: 768px){.advertory-no-ad-native-default{width:580px;height:400px}}.advertory-no-ad-native-default *{box-sizing:border-box;line-height:normal;text-transform:none}.advertory-no-ad-native-default .ad-info{position:absolute;top:0;left:0;height:26px;width:26px;z-index:1000;background-color:#dfdfdf;border-bottom-right-radius:13px;transform:none;transform-origin:center}.advertory-no-ad-native-default .ad-link{display:block;text-decoration:none;color:#000;background-color:rgba(0,0,0,0);border:1px solid #dfdfdf}.advertory-no-ad-native-default .ad-content{display:block}.advertory-no-ad-native-default .ad-image-container{background-color:#dfdfdf;display:flex;position:relative;line-height:0}.advertory-no-ad-native-default .ad-image-container .ad-image{position:static;width:100%;aspect-ratio:1.91;height:auto}.advertory-no-ad-native-default .ad-text-container{background:#f5faff;overflow:auto;padding:8px}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container{padding:12px 16px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:12px;margin:0;text-transform:uppercase;display:block}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:14px;margin-right:8px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor .ad-label{font-weight:600;color:#fff;background-color:#467aae;display:inline-block;padding:4px 6px;border-radius:4px;border:none;margin-right:4px}.advertory-no-ad-native-default .ad-text-container .ad-title{margin:4px 0 0 0;line-height:normal;color:#000;font-size:18px;display:flex;flex-direction:column;justify-content:center}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-title{margin:12px 0 0 0;font-size:28px}}.advertory-vg-native-ad__front .advertory-no-ad-native-default{width:100%;height:auto}.advertory-aftenposten-native-ad-wrapper__front{justify-content:center}.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(-40px + 4rem)}@media screen and (min-width: 768px){.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(12px + .75rem)}}');var pd=Object.freeze({__proto__:null});module.exports=Zr;
|
|
1
|
+
"use strict";var e,t,n=require("react/jsx-runtime");function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o=i(function(){if(t)return e;t=1;var n=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map(function(e){return o(e,n)})}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function d(e,t){try{return t in e}catch(e){return!1}}function s(e,t,n){var i={};return n.isMergeableObject(e)&&a(e).forEach(function(t){i[t]=o(e[t],n)}),a(t).forEach(function(r){(function(e,t){return d(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(d(e,r)&&n.isMergeableObject(t[r])?i[r]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(r,n)(e[r],t[r],n):i[r]=o(t[r],n))}),i}function l(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||n,i.cloneUnlessOtherwiseSpecified=o;var a=Array.isArray(t);return a===Array.isArray(e)?a?i.arrayMerge(e,t,i):s(e,t,i):o(t,i)}return l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},e=l}());const r=["placements","takeover","refreshConfig","editory"],a={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},d=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},s=(e,t)=>{console.warn("[Advertory WARN]: ",e)},l=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:i,appearanceConfig:o}=null!=e?e:{};(null==t?void 0:t.publisher)||s("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||s("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||s("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||s("pageContext.deviceType is required."),n||s("pageOptions is required."),i||s("placements is required."),(null==o?void 0:o.defaultThreshold)||s("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,i,o;const r=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(i=e.fullscreenScroll)||void 0===i?void 0:i.enabled),property:"main",featureName:"fullscreenScroll"},{flag:!!(null===(o=e.widescreenSwitching)||void 0===o?void 0:o.enabled),property:"right",featureName:"widescreenSwitching"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==r?void 0:r[t])&&s(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},c=6;class u{set(e){l(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");const t={};for(const n of r){const i=e[n];void 0!==i&&(t[n]=i)}Object.assign(this.config,t),Object.prototype.hasOwnProperty.call(e,"pageContext")&&void 0!==e.pageContext&&(this.config.pageContext=Object.assign(Object.assign({},this.config.pageContext),e.pageContext)),Object.prototype.hasOwnProperty.call(e,"pageOptions")&&void 0!==e.pageOptions&&(this.config.pageOptions=Object.assign(Object.assign({},this.config.pageOptions),e.pageOptions)),Object.prototype.hasOwnProperty.call(e,"tcf")&&void 0!==e.tcf&&(this.config.tcf=Object.assign(Object.assign({},this.config.tcf),e.tcf))}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=o(u.DEFAULT_SITE_HANDLERS,e)}}u.DEFAULT_SITE_HANDLERS={siteEvents:a,initNativeAd:function(){}};const p=new u,v=p.modifyConfigProperties.bind(p),g={NO:"no",SE:"se"},h=e=>e===g.NO?"no-sno":"se-generic";let m="";const y=new Map,f=e=>{const{pageSetup:{tag:t}={}}=p.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(m!==window.location.pathname&&(y.clear(),m=window.location.pathname),e.map(e=>{var t;const n=e.invCode.replace(/_\d+$/,""),i=null!==(t=y.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${(()=>{const{pageContext:{countryCode:e,publisher:t}}=p.get();return`${e}-${t}`})()}-count`]=i,y.set(n,i+1),e})):e},w=e=>{const t=e.split("-"),n=t[t.length-1];return 6===n.length&&n.match(/^[a-zA-Z0-9]+$/)?t.slice(0,-1).join("-"):e},b="0123456789abcdefghijklmnopqrstuvwxyz",x=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=b[Math.floor(36*Math.random())]}return t},k=e=>{window.apntag.anq.push(e)},E=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),C=new Promise(e=>{if("undefined"==typeof document||!document.hidden)return void e();const t=()=>{document.hidden||(document.removeEventListener("visibilitychange",t),e())};document.addEventListener("visibilitychange",t,{once:!0})}),I="advertory-wallpaper-background",T="advertory-with-horseshoe",S=()=>{const e=document.querySelector(`.${I}`);e&&e.remove()},A=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${I}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},P=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,O=e=>P.test(e),j=e=>e.startsWith("wallpaper:color:"),_=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundImage=`url(${e})`)},L=e=>{const t=document.querySelector(`.${I}`);t&&(t.style.backgroundColor=e)};var $=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(T),n.classList.add(T))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{wallpaperAnchorSelector:n}={}}=t;(()=>{S();const e=document.createElement("div");e.classList.add(I),document.body.appendChild(e),e.style.setProperty("position","fixed"),e.style.setProperty("width","100%"),e.style.setProperty("height","calc(100% - var(--header-height, 0px) - 15px)"),e.style.setProperty("background-position","center top"),e.style.setProperty("background-repeat","no-repeat")})(),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(A(n),window.addEventListener("scroll",()=>A(n)))})(n),e()},isShortWallpaperColorMessage:j,isShortWallpaperUrlMessage:O,removeWallpaperBackground:S,setWallpaperBackgroundColor:L,setWallpaperBackgroundImage:_});const N=e=>new URLSearchParams(window.location.search).get(e),q="takeover",D="native_override_desc2",M=()=>null!==N("disable_prebid"),F=e=>{if("0"===N("collapse_ad"))return;const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.setProperty("width","0","important"),t.style.setProperty("height","0","important"),t.style.setProperty("display","none","important"),n.style.setProperty("display","none","important"),e.includes("wallpaper")&&S())},B=e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))};class R{initialize(){this.DATA=Object.assign({},R.INITIAL_DATA)}getData(e){if(!this.DATA)throw new Error("Storage was accessed with invalid data.");return this.DATA[e]}setData(e,t){if(!this.DATA)throw new Error("Storage was accessed before it had been initialized.");this.DATA[e]=Object.assign(Object.assign({},this.DATA[e]),t)}}R.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const U=new R,z=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,i=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${i}px`)},V=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=U.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=i},H=()=>{S();document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{F(e.id),V(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),i=null==t?void 0:t.getAttribute("data-probable-width");n&&i&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",i+"px"))})(e.id),e.innerHTML="",e.id=w(e.id)}),k(()=>window.apntag.clearRequest())},W="noGroupedPlacements",K=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},G=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},J=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:i,pageContext:{deviceType:o}}=p.get(),r=n[o].filter(G)||[],a=e?document.querySelector(e):document;if(!a)return[];const d=r.reduce((e,t)=>{const n=K(t.targetId);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=r.filter(({targetId:e})=>e.match(t)),d=(null==i?void 0:i.queryByDataDeviceAttribute)?`div[id^="${e}"][data-device=${o}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,s=a.querySelectorAll(d),l=Array.from(s).filter(({id:e})=>e.match(t)).map((e,t)=>{var i;const o=Q(e,t,n),r=o.finnBlink&&!o.finnBlink.renderOnlyWithAdBlock,a=r&&(null===(i=o.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink),d=`${e.id}-${x(6)}`;return e.id=d,e.setAttribute("data-advertory-ad-rendered","true"),r&&e.setAttribute("data-is-finn-blink-placement","true"),a&&e.setAttribute("data-is-finn-blink-only-placement","true"),(e=>{var t;const n=e.id;n&&U.setData("initialClassNames",{[n]:{wrapper:null===(t=e.parentElement)||void 0===t?void 0:t.className.split(" "),container:e.className.split(" ")}})})(e),Object.assign(Object.assign({},o),{targetId:d})});return f(l)});return(e=>{const t=Array.from(document.querySelectorAll('div[class^="advertory"]'));return e.sort((e,n)=>t.findIndex(t=>t.id===e.targetId)-t.findIndex(e=>e.id===n.targetId))})(d)},Q=(e,t,n)=>{const i=n[t],o=n[n.length-1],r=n.filter(({targetId:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==i?void 0:i.targetId)?i:(null==e?void 0:e.id)===(null==o?void 0:o.targetId)?o:r||o},X=e=>{const{queryConfig:{placementBatches:t}={},pageContext:{deviceType:n}}=p.get(),i=(null==t?void 0:t[n])||{},o=Object.values(i).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=w(e.targetId);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[i,o]of Object.entries(t))n[i]=e.filter(e=>o.includes(w(e.targetId)));return n})(e,i),d=Object.keys(r),s=((e,t)=>e.filter(e=>!t.has(w(e.targetId))))(e,new Set([...d,...o]));return Object.assign(Object.assign(Object.assign({},a),r),{[W]:s})},Y="ABSOLUTE_FULLSCREEN",Z="ANY_FULLSCREEN",ee="NINESIXTEEN",te="FULLWIDTH",ne="FULLSQUARE",ie="TAKEOVER",oe="VELVET_TAKEOVER",re="WALLPAPER",ae="COLLAPSE",de={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],NINESIXTEEN:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],FULLSQUARE:[{width:1080,height:1080}],NATIVE_AD:[{width:1,height:1}],TAKEOVER:[{width:4,height:4}],VELVET_TAKEOVER:[{width:7,height:7}],WALLPAPER:[{width:2,height:2}],COLLAPSE:[{width:2,height:1}]},se={wallpaper:1600,"l-format":1600},le=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&Ee(e,Z)},ce=e=>{const{native:t}=e;return!!t},ue=e=>Ee(e,te),pe=e=>{const{targetId:t}=e;return t.includes("takeover")||Ee(e,ie)},ve=e=>Ee(e,ie),ge=e=>Ee(e,re),he=e=>Ee(e,ae),me=e=>e.targetId.includes("sponsorstripe"),ye=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},fe=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),we=e=>e.targetId.startsWith("midboard"),be=e=>e.targetId.includes("widescreen"),xe=e=>e.width>=1260&&e.width<=1280,ke=e=>e.width>=1600&&e.width<=1620,Ee=(e,t)=>{const n=de[t];if(!n)return!1;return!!n.find(t=>{var n,i;const o=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,a=t.width===o,d=!t.height||t.height===r;return a&&d})};function Ce(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function Ie(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{s(i.next(e))}catch(e){r(e)}}function d(e){try{s(i.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,d)}s((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const Te=e=>new Promise(t=>{if(!window._tcf_||!(null==e?void 0:e.enabled))return void t(!1);const n=(()=>{if(!window._tcf_)return null;const e=window._tcf_.getPermissionSync("CMP:advertising");if(null===e)return null;const t=Number(e);return d("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(d("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{d("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{d("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);d("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),Se="cmp:loaded";let Ae="undefined"!=typeof window?window._tcf_:void 0,Pe=!1;const Oe=(e,t,n)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,r=N("bypass_tcf"),a=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(d("TCF bypass param detected, returning consent: true"),!0):(d("TCF is not enabled, returning consent: true"),!0))(i,r))return!0;if(Pe)return null;if(!Ae)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=Ae.getConsentedToAllSync();return d(`TCF consented to all is: ${t}`),Ae.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(d("Getting TCF consent manager..."),window._tcf_)return d("TCF consent manager is already available"),Ae=window._tcf_,void e(Ae);d("TCF consent manager is not available");const n=()=>{d("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(Ae=window._tcf_,e(Ae)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(Se,n),Pe=!0,t(new Error("Timeout waiting for CMP to load"))},o);d("Listening for CMP loaded event..."),document.addEventListener(Se,n,{once:!0})}):Promise.resolve(null),getConsentSync:a,getConsentAsync:()=>Ie(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return d(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.SE,i=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===g.NO;if(t||i)return d("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield Te(e);if(!(null==e?void 0:e.enabled))return!0;const r=a();return null!==r?r:yield new Promise((e,t)=>{try{if(!Ae)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},i=setTimeout(()=>{d("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);Ae.onTcfReady(()=>{d("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),Ae.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},je=(e,t,n,...i)=>Ie(void 0,[e,t,n,...i],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return d(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return d(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${i}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:o}=Oe(e,0,n);return(yield o())?(d(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(d(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),_e=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},Le=e=>Ie(void 0,void 0,void 0,function*(){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e,{getConsentAsync:o}=Oe(t,0,i);if(!(yield o()))return;const r=_e("_pulse2data");return r?r.split(",")[9]:void 0}),$e=()=>{const e=_e("_pulse2data");return e?e.split(",")[2]:void 0},Ne="splash",qe="welcomePage",De="topscroller",Me="velvet",Fe=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const i=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),o=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,o).toString()},Be="takeover-displayed",Re="takeover-visit-count",Ue=14400,ze=()=>{const e=_e(Re);return e?parseInt(e):0},Ve=()=>{const e=ze(),{takeover:{options:{cookieCapTime:t=Ue}={}}={}}=p.get(),n=document.location.hostname;window.document.cookie=`${Re}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},He=()=>{const{takeover:{enabled:e=!1,options:{secondVisitEnabled:t=!1}={}}={}}=p.get();return"0"!==N(q)&&("1"===N(q)||!(!e||(()=>{var e,t;const n=(null===(t=null===(e=p.get().takeover)||void 0===e?void 0:e.options)||void 0===t?void 0:t.cookieCapName)||Be;return"true"===_e(n)})())&&(!t||We()))},We=()=>{const e=ze();return 0===e?(Ve(),!1):1===e},Ke=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),Ge=()=>{const{takeover:e}=p.get();return Boolean(null==e?void 0:e.topscroller)},Je=e=>{const{width:t,height:n}=e;return Ke(t,n)?Ne:Ee(e,oe)?Me:Ge()?De:qe},Qe=()=>Ie(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{options:{cookieCapName:t=Be,cookieCapTime:n=Ue}={}}={},pageContext:{isMobileApp:i,countryCode:o},tcf:r}=p.get(),a=yield je(r,i,o,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),Xe=e=>{var t,n;const i=!!(null===(n=null===(t=p.get().takeover)||void 0===t?void 0:t.options)||void 0===n?void 0:n.setCookieCapForNotShownAd);return pe(e)&&i},Ye=(e,t)=>{var n;if(t===De){const{topscroller:t}=e;return null!=t?t:{}}if(t===Ne){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Ze=(e,t)=>{t!==Ne?(e=>{var t,n;const i=null===(t=p.get().pageSectionsSelectors)||void 0===t?void 0:t.header,o=null===(n=p.get().takeover)||void 0===n?void 0:n.topscroller;if(!i||o)return;const r=document.querySelector(i),a=document.querySelector(".welcome-page-wrapper"),d=document.querySelector(`#${e.targetId}`),s=document.querySelector(".advertory-welcome-page-scroll");if(!(r&&a&&s&&d))return;const l=null==r?void 0:r.offsetHeight,c=ve(e)?"60svh":`calc(100svh - ${l}px)`,u=ve(e)?"calc(40svh + 30px)":`calc(${l}px + 30px)`;a.style.setProperty("height",c,"important"),d.style.setProperty("height",c,"important"),s.style.setProperty("bottom",u,"important")})(e):(e=>{var t;if(!(null===(t=p.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),i=document.querySelector(`#${e.targetId}`);if(!n||!i)return;const o=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",o,"important")})(e)},et=Fe([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n .adform-adbox {\n height: 100% !important;\n width: 100% !important;\n }\n img {\n height: 100% !important;\n width: 100% !important;\n object-fit: cover !important;\n object-position: top !important;\n }\n ",e.contentDocument.head.appendChild(t)})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})});var tt=Object.freeze({__proto__:null,addTakeoverCookie:Qe,adjustTakeoverHeight:Ze,canDisplayTakeover:He,getProperWelcomePageConfig:Ye,getTakeoverVariant:Je,handleTakeoverCookieOnAdNotShown:e=>Ie(void 0,void 0,void 0,function*(){Xe(e)&&(yield Qe())}),incrementArticleVisitCount:Ve,isSplashVariant:Ke,isTopscroller:Ge,scaleAd:et,shouldAddTakeoverCookieForNotShownAd:Xe});const nt={nativeAd:e=>ce(e)&&!me(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:ue,fullscreenScroll:le,topscroller:e=>pe(e)&&Ge(),splash:e=>pe(e)&&Ke(e.width,e.height),welcomePage:pe,wallpaper:ge,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:xe,hFormat:ke,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!ke(e)&&!xe(e),topboard:e=>e.targetId.startsWith("topboard")&&!pe(e),widescreen:be,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:me,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!fe(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!we(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:fe,midboard:we},it=({adObj:e,preferredTestIdData:t})=>{var n,i;const o=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!o)return;const r=null===(i=document.querySelector(`#${o}`))||void 0===i?void 0:i.parentElement;if(!r)return;if(((e,t)=>{var n,i,o,r;const a=null===(r=null===(o=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===o?void 0:o[e])||void 0===r?void 0:r.invCode;a&&(t.dataset.invCode=a)})(o,r),null==t?void 0:t.testId)return void(r.dataset.testid=t.testId);const a="DIV"===(null==r?void 0:r.tagName);e&&a&&((e,t)=>{var n,i;for(const[o,r]of Object.entries(nt))if(r(e)){if("nativeAd"===o){const r="default";t.dataset.testid=`${o}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:r}`;break}t.dataset.testid=o;break}})(e,r)},ot=e=>{var t;return(null===(t=Object.entries(nt).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},rt="mobile",at="tablet",dt="desktop",st="web_desktop",lt="web_phone",ct="wde",ut="wph",pt=()=>{const e=window.navigator.userAgent.toLowerCase(),t=[["win","windows"],["macintosh","macos"],["x11","linux"],["android","android"],["ipad","ios"],["iphone","ios"]].find(([t])=>e.includes(t));return t?t[1]:"unknown"},vt=e=>e===rt,gt=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},ht=(e,t=window.screen.width,n,i)=>{const o=gt(e,t);if(n&&n(e,o),i)return void i(e);const r=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);r&&(r.style.transform=`scale(${o})`,r.style.transformOrigin="left top")},mt=new Map;mt.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),mt.set("panorama",{scale:.79,transformOrigin:"center center"}),mt.set("outstream",{scale:.79,transformOrigin:"center center"}),mt.set("integration",{scale:.79,transformOrigin:"center center"}),mt.set("toppanorama",{scale:.8,transformOrigin:"left center"});var yt=Object.freeze({__proto__:null,calculateScaleFactor:gt,getAspectRatio:(e,t)=>{if(e&&t)return t/e},scaleAd:ht,scaleAdIpadAirPortrait:e=>{if(!((null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.clientWidth)>767&&(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.clientWidth)<=853))return;var t,n;const i=ot(e),o=mt.get(i),r=document.querySelector(`#${e.targetId}`);if(!r||!o)return;if(r.style.transformOrigin=o.transformOrigin,r.style.transform=`scale(${o.scale})`,!(null==o?void 0:o.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==r?void 0:r.offsetWidth;a&&"number"==typeof d&&!isNaN(d)&&a.style.setProperty("right",String(-1*d*.2)+"px")},scaleAds:e=>{var t,n,i,o,r,a;const{adScaleConfig:d,pageContext:{deviceType:s}}=p.get();if(!(null==d?void 0:d.enabled))return;if(Ee(e,Z))return;const l=null!==(t=d.adsToBeScaled[s])&&void 0!==t?t:[],c=K(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(i=null===(n=d.offset)||void 0===n?void 0:n[c])&&void 0!==i?i:0,v=document.getElementById(e.targetId),g=null!==(o=null==v?void 0:v.offsetWidth)&&void 0!==o?o:window.screen.width,h=null!==(a=null===(r=null==v?void 0:v.parentElement)||void 0===r?void 0:r.offsetWidth)&&void 0!==a?a:window.screen.width;ht(e,(g<h?g:h)-u)}});const ft={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&((e,t)=>{ht(e,t);const n=document.querySelector(`#${e.targetId}`);n&&(n.style.minWidth="100vw")})(e,t)},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},wt={SVD:"svd",VG:"vg",GODARE:"godare",AFTENPOSTEN:"aftenposten",SA:"sa",BT:"bt",AFTONBLADET:"aftonbladet",E24:"e24",MINMOTE:"minmote",PENT:"pent",GODT:"godt",TEK:"tekno",KLART:"klart",TVNU:"tvnu",POLARIS:"polaris",KOKET:"koket",TV4:"tv4",FOTBOLLSKANALEN:"fotbollskanalen"},bt={publisherClassName:wt.PENT,fullWidthFormatClassName:"netboard"},xt=864e5,kt=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return d("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,i=xt)=>{const o={data:n,expirationTime:(new Date).getTime()+i};t(e,JSON.stringify(o))},getByTimestamp:(t,n=xt)=>{const i=e(t);if(!i)return null;if(!n)return i;try{const{expirationTime:e,data:t}=JSON.parse(i);return(new Date).getTime()<=e?t:null}catch(e){return d("Error with parsing localStorage data"),null}}}})(),Et="glimrTags",Ct=["glwe_","glwet_"],It={geofenceTags:[],geoTags:[],weatherTags:[]},Tt=(...e)=>Ie(void 0,[...e],void 0,function*(e=p.get()){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield je(t,n,i,"glimr")}const{getConsentAsync:o}=Oe(t,0,i);return yield o()}),St=()=>Ie(void 0,void 0,void 0,function*(){const{glimr:e}=p.get();if(!(yield Tt())||!(null==e?void 0:e.enabled))return void d("No consent for glimr data fetching.");const t=yield(n=500,Ie(void 0,void 0,void 0,function*(){return yield Promise.race([Ie(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{kt.setWithTimestamp(Et,{tags:e,tagMappings:t}),n(!0)})})}catch(e){d(`Error during getting glimr data: ${e}`)}else d("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:t})}),At={svd:"svd",vg:"vg",godare:"godare",aftenposten:"no-aftenposten",sa:"no-stavangeraftenblad",bt:"no-bergenstidende",aftonbladet:"aftonbladet",e24:"e24",minmote:"minmote",pent:"pent",godt:"godt",tek:"no-tek"},Pt=e=>Ct.some(t=>e.startsWith(t)),Ot=e=>e.startsWith("glgc_"),jt=e=>!Pt(e)&&!Ot(e),_t=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:i,pageContext:{countryCode:o}={}}=e,r=yield Tt(e);if(!(null==i?void 0:i.enabled)||!r)return d("No consent for getting glimr tags."),{};const a=h(o),s=Lt(e,Boolean(n));return{[`${a}-geo`]:s.geoTags,[`${a}-weather`]:s.weatherTags,[`${a}-geofence`]:s.geofenceTags}}),Lt=(e,t)=>{const n=$t();if(!n)return It;const i=((e=[])=>e.filter(Pt))(n),o=((e=[])=>e.filter(Ot))(n),r=((e=[],t,n)=>{var i;const o=e.filter(jt);if(n&&t){const{publisher:e}=null!==(i=t.pageContext)&&void 0!==i?i:{},n=At[e]||e;o.push(n)}return o})(n,e,t);return{geoTags:r,geofenceTags:o,weatherTags:i}},$t=()=>{const e=kt.getByTimestamp(Et);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},Nt=()=>(window.apntag||(window.apntag={anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}}),window.apntag),qt=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),Dt=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={},pageContext:{countryCode:o}}=p.get(),r=[`${h(o)}-geo`],a=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection","aa-sch-cmp_advertising",...i?r:[]],d=Object.fromEntries(Object.entries(e).filter(([e])=>a.includes(e))),s=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:d}}},s)}},Mt={get:(e,t)=>Ie(void 0,void 0,void 0,function*(){const n=yield fetch(e,t);if(!n.ok)throw new Error(n.statusText);return yield n.json()}),post:(e,t,n)=>Ie(void 0,void 0,void 0,function*(){const i=JSON.stringify(n),o=yield fetch(e,{method:"POST",headers:t,body:i});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},Ft="advertory:ppids-cache",Bt={[g.SE]:`SCH${g.SE.toUpperCase()}-EnvHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-EnvHash`},Rt={[g.SE]:`SCH${g.SE.toUpperCase()}-UserHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-UserHash`},Ut={[g.SE]:`sch${g.SE}-envhash-v3`,[g.NO]:`sch${g.NO}-envhash-v3`},zt={[g.SE]:`sch${g.SE}-userhash-v3`,[g.NO]:`sch${g.NO}-userhash-v3`},Vt={[g.SE]:`'sch${g.SE}-iosid-v3'`,[g.NO]:`'sch${g.NO}-iosid-v3'`},Ht={[g.SE]:`sch${g.SE}-androidid-v3`,[g.NO]:`sch${g.NO}-androidid-v3`},Wt={[g.SE]:"sdrn:schibsted.com:user",[g.NO]:"sdrn:spid.no:user"};class Kt{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:i})=>{t.append(e,`${i}-${n}`)}),t}}const Gt=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return Ie(this,arguments,void 0,function*(e,t=1e4){var n,i;const o=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=o.xandr)||void 0===n?void 0:n.ppId1,null===(i=o.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||d("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},Jt=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return Ie(this,void 0,void 0,function*(){var n,i,o,r,a,d,s,l,c,u,p;const v=kt.get(Ft),g=yield this.getNewPPIDs(e,t);if(this.shouldHash(v,g)){const t=null!==(n=e.hasherUrl)&&void 0!==n?n:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,t);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(o=g.anId)||void 0===o?void 0:o.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(d=g.idfv)||void 0===d?void 0:d.plain,null===(s=g.anId)||void 0===s?void 0:s.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(l=null==v?void 0:v.userId.hashed)&&void 0!==l?l:"",null!==(c=null==v?void 0:v.environmentId.hashed)&&void 0!==c?c:"",null===(u=null==g?void 0:g.idfv)||void 0===u?void 0:u.plain,null===(p=null==g?void 0:g.anId)||void 0===p?void 0:p.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||d("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,i){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=i?i:null}shouldHash(e,t){var n,i;if(!e)return!0;for(const o in e){if((null===(n=e[o])||void 0===n?void 0:n.plain)!==(null===(i=t[o])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const o=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),i?{anId:{plain:i}}:{});kt.set(Ft,o)}hashPPIDs(e,t){return Ie(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield Mt.post(t,n,e)}catch(e){return d("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return Ie(this,arguments,void 0,function*({clientId:e,instance:t},n){const i=yield((e,t)=>Ie(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${Wt[t]}:${n}`:null}))(t,n),o=yield(e=>Ie(void 0,void 0,void 0,function*(){const t=yield e.getEnvironmentId();return t?`sdrn:schibsted:environment:${t}`:null}))(t),r=window.advertory_idfv,a=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:i},environmentId:{plain:o},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},r?{idfv:{plain:r}}:{}),a?{anId:{plain:a}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:o}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:o.plain}}},Qt=e=>Ie(void 0,void 0,void 0,function*(){const{tracker:t,tcf:n,pageContext:{countryCode:i,isMobileApp:o}}=e;if(!(yield je(n,o,i,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([Gt.processPPIDs(t,null==n?void 0:n.timeout),Jt.processPPIDs(t,i)])).forEach((e,t)=>{if("rejected"===e.status){d(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),Xt=e=>{const{ppid1:t,ppid2:n}=Gt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Jt.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Kt).add(n,Bt[e]).add(t,Rt[e]).add(o,Ut[e]).add(i,zt[e]).add(r,Vt[e]).add(a,Ht[e]).buildEids()}]}},Yt=()=>{const{ppid1:e,ppid2:t}=Gt.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},Zt=e=>{const{ppid1:t,ppid2:n}=Gt.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Jt.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Kt).add(n,Bt[e]).add(t,Rt[e]).add(o,Ut[e]).add(i,zt[e]).add(r,Vt[e]).add(a,Ht[e]).buildRyEids()}}]}}},en=e=>{const{ppid1:t,ppid2:n}=Gt.getPPIDs(),{ppid1:i,ppid2:o}=Jt.getPPIDs();return(new Kt).add(n,Bt[e]).add(t,Rt[e]).add(o,Ut[e]).add(i,zt[e]).buildRyEids()},tn=e=>Ie(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=Gt.getPPIDs(),{ppid1:i,ppid2:o}=Jt.getPPIDs(),r=(new Kt).add(n,Bt[e]).add(t,Rt[e]).add(o,Ut[e]).add(i,zt[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),nn=(e,...t)=>Ie(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{d(),n()},a=()=>{d(),i(new Error(`Failed to load ${e}`))},d=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(s)};o.addEventListener("load",r),o.addEventListener("error",a);const s=setTimeout(()=>{d(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}),on="advertory-fullscreen-scroll",rn="advertory-fullscreen-scroll-wrapper",an="fullscreen-scroll-in-screen",dn="in-screen",sn=e=>e.includes("snoap.no"),ln=e=>{var t,n,i,o,r;return!!(null===(r=null===(o=null===(i=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===i?void 0:i.adResponse)||void 0===o?void 0:o.ads[1])||void 0===r?void 0:r.rtb)},cn=Fe([],()=>{const e=({width:e,height:t})=>{var n;const i=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!i)return;const{clientWidth:o,clientHeight:r}=i,a=e/o,d=t/r;i.style.transform=`scale(${a},${d})`,i.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),un=e=>{const t=Fe([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const i=n.contentDocument.createElement("style");i.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(i),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},pn=[],vn={},gn=(e,t)=>{var n;const i=(null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.fadingHeaderEnabled)||!1,o=new IntersectionObserver(e=>hn(e,i),{}),r=yn(e);o.observe(e),i&&(vn[r]=bn(e,null==t?void 0:t.options))},hn=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=yn(e);n?(mn(i,n),fn(e,i,t)):(mn(i,n),wn(e,i,t))})},mn=(e,t)=>{var n,i;const o=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;const r=t?"showFullscreen":"hideFullscreen";null===(i=o.contentWindow)||void 0===i||i.postMessage(`advertory:${r}-${e}`,"*")},yn=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},fn=(e,t,n)=>{e.classList.add(dn),document.body.classList.add(an),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),pn.includes(t)||pn.push(t),n&&window.addEventListener("scroll",vn[t],{passive:!0})},wn=(e,t,n)=>{pn.includes(t)&&(n&&window.removeEventListener("scroll",vn[t]),document.body.classList.remove(an),e.classList.remove(dn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},bn=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:o=3}=t,r=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&r.push(n)}),i.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{r.length&&xn(e,r,o,0),a.length&&xn(e,a,o,40)}},xn=(e,t,n,i)=>{const o=e.offsetHeight,r=window.scrollY,a=e.getBoundingClientRect().top+r;t.forEach(e=>{const t=e.offsetHeight;let d;d=a>r?(a-r)/t-i:(r+t-(a+o))/t;const s=d<=0;e.style.visibility=s?"hidden":"",e.style.zIndex=s?"":n.toString(),e.style.pointerEvents=s?"none":"all",e.style.opacity=d.toString()})};function kn(e){if(!e||"undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}kn('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100vw !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh)}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top:var(--advertory-political-box-offset, 0px)}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px) + var(--advertory-political-box-offset, 0px)) !important}.advertory-fullscreen-scroll::before{left:calc(50vw - 628px);width:calc(100% - 36px);max-width:1250px;text-align:left;background-color:hsla(0,0%,100%,.6);color:#212121;font-family:Ester Blenda,Arial,sans-serif;font-size:11px;font-weight:400;font-style:normal;text-transform:lowercase;line-height:1;margin:16px 2px;padding:10px;z-index:1;visibility:inherit !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll::before{left:16px}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:calc(50vw - 623px);right:unset}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:22px;right:unset}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]::before{padding-left:32px}.advertory-fullscreen-scroll>div[id*=utif]{display:block;width:var(--advertory-fullscreen-scroll-vw, 100vw) !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[id*=utif]{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important}.advertory-fullscreen-scroll>div[id*=utif]{overflow:hidden}.advertory-fullscreen-scroll>div[id*=utif]>iframe{display:block;height:inherit !important;width:inherit !important}.advertory-fullscreen-scroll>div[role=button]{z-index:2;opacity:1;background:rgba(0,0,0,0) !important;left:unset;position:fixed !important;right:calc(50vw - 623px);top:calc(19px + var(--advertory-political-box-offset, 0px)) !important;width:26px !important;height:26px !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[role=button]{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix) + 19px + var(--advertory-political-box-offset, 0px)) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');const En="left",Cn={no:{adText:"ANNONSE",adFrom:"ANNONSE FRA",adContent:"ANNONSØRINNHOLD",adContentFrom:"ANNONSØRINNHOLD FRA"},se:{adText:"ANNONS",adFrom:"ANNONS FRÅN",adContent:"EXTERN LÄNK",adContentFrom:"EXTERN LÄNK FRÅN"}};let In=null;const Tn=(e,t)=>{let n=e;return n=(e=>{const t=document.createElement("script");return t.textContent="\n window.addEventListener('message', function(event) {\n if (event.data === 'advertory:showFullscreen-'+document.body.id) {\n document.body.style.display = \"block\";\n } else if (event.data === 'advertory:hideFullscreen-'+document.body.id) {\n document.body.style.display = \"none\";\n }\n });\n ",e+t.outerHTML})(e),n=(e=>{const t=document.createElement("script");return t.textContent=`(${cn})()`,e+t.outerHTML})(n),n=(e=>{if((e=>e.includes("google"))(e))return e;const t=document.createElement("div");t.innerHTML=e;const n=t.querySelector("img");return n?(n.style.width="100%",n.style.height="100%",n.style.objectFit="cover",n.style.position="fixed",t.innerHTML):e})(n),n=(e=>{if(sn(e))return e;const t=document.createElement("style");return t.textContent="\n .GoogleActiveViewClass, .GoogleActiveViewElement {\n transform: translate(calc(-50% + 50vw), 0);\n width: 100vw !important;\n height: 100vh !important;\n }\n .GoogleActiveViewClass img, .GoogleActiveViewElement img {\n width: 100vw;\n height: 100vh;\n object-fit: cover;\n }\n .GoogleActiveViewClass iframe {\n width: 100vw !important;\n height: 100vh !important;\n }\n ",e+t.outerHTML})(n),(e=>e.includes("adform"))(n)&&(n=(e=>{const t=document.createElement("script");t.textContent='\n var frame = window.frameElement;\n if (frame) {\n frame.style.removeProperty("width");\n frame.style.removeProperty("height");\n frame.contentWindow.document.body.onload = onLoad;\n } else {\n document.body.onload = onLoad;\n }\n \n function onLoad() {\n var iframe = document.querySelector("adfm-ad iframe");\n if (iframe) {\n var image = iframe.contentWindow.document.getElementById("image");\n if (!image) return;\n image.style.backgroundSize = "cover";\n } else {\n var iframe = document.querySelector(".adform-adbox iframe");\n if (iframe) {\n var style = document.createElement("style");\n style.textContent = "#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}";\n iframe.contentDocument.body.append(style);\n iframe.style = "width: 100vw; height: 100vh;";\n } else {\n var observer = new MutationObserver(function(mutations, obs) {\n for (var mutation of mutations) {\n var iframe = mutation.addedNodes[0];\n if (iframe && iframe.nodeName === "IFRAME") {\n iframe.style = "width: 100vw; height: 100vh;";\n iframe.dataset.contents += "<style>#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}</style>";\n obs.disconnect();\n }\n }\n });\n observer.observe(document.body, { childList: true, subtree: true });\n }\n }\n }\n ';const n=document.createElement("style");return n.textContent="\n html, body, adfm-ad, #sf_align, .adform-adbox, .adform-adbox img {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover;\n max-width: 100vw;\n }\n ",e+n.outerHTML+t.outerHTML})(n)),(e=>e.includes("529299503"))(n)&&(n=un(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>sn(e)?e:e.replace("<iframe ","<iframe onload=\"\n var f = document.querySelector('iframe');\n if (!f) return;\n var s = f.style;\n s.transform = 'scale(' + (window.innerHeight / Number(f.height)).toFixed(2) + ')';\n s.right = parseInt((Number(f.width) - window.innerWidth) / 2) + 'px';\n s.bottom = parseInt((Number(f.height) - window.innerHeight) / 2) + 'px';\n s.position = 'relative';\n \" "))(n)),sn(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</iframe>","</iframe><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),(e=>e.includes("kreateam.io"))(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</div>","</div><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),ln(t)&&(n=(e=>{const t=document.createElement("script");t.textContent='var frame = window.frameElement;\n if (frame) {\n frame.style.width = "100vw";\n frame.style.height = "100vh";\n }';const n=document.createElement("div");return n.innerHTML=e,n.appendChild(t),n.innerHTML})(n)),n},Sn=()=>{In=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,o=document.documentElement;o.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),o.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),o.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},An=()=>{In||(In=window.requestAnimationFrame(Sn))},Pn=(e,t)=>{var n,i,o,r;const{pageContext:{countryCode:a,deviceType:d}}=p.get(),{targetId:s}=e,l=null==t?void 0:t.options;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==l?void 0:l.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),((e,t)=>{var n;const{articlesContainerWidth:i=1302,backgroundColor:o="#fff",foregroundColor:r="#fff",margin:a,beforeContentValue:d=""}=e,s=null!==(n=null==a?void 0:a[t])&&void 0!==n?n:"16px 0",l=i/2,c=document.createElement("style");c.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${o} 0px,\n ${o} calc(50% - ${l}px),\n ${r} calc(50% - ${l}px),\n ${r} calc(50% + ${l}px),\n ${o} calc(50% + ${l}px),\n ${o} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${s};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${d&&"clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);\n -webkit-clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);"}\n }\n\n .advertory-fullscreen-scroll-wrapper:before, .advertory-fullscreen-scroll-wrapper:after {\n background: var(--background);\n content: '${d}' !important;\n }`,c.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(c)})(null!==(i=null==l?void 0:l.overlayStyles)&&void 0!==i?i:{},d);const c=document.getElementById(s),u=null==c?void 0:c.parentElement;if(!c||!u)return;gn(u,t),c.className=on,gn(u,t),c.className="advertory-fullscreen-scroll";const v=Ee(e,Y)?"absolute":"fixed";c.style.position=v,u.className=rn,u.dataset.showTagSubscribeId=s,c.setAttribute("data-ad-label",Cn[a].adText),(null==l?void 0:l.cogwheelPosition)===En&&(c.dataset.moveCogwheelToTheLeft="true"),An(),window.addEventListener("resize",An),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",An),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",An)},On=e=>{if(!(null==e?void 0:e.classList.contains(on)))return;e.classList.remove(on),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(rn))&&(t.classList.remove(rn),t.classList.remove(dn))};var jn=Object.freeze({__proto__:null,createFullscreenScrollAd:Pn,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=ln(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=ln(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,Tn(t,e))},undoFullscreenScrollContainer:On});const _n=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},Ln=(e,t,n)=>{var i,o,r,a;const d=document.createElement("div");d.id=`${e}-button`,t.appendChild(d);(null===(o=null===(i=window.apntag.requests)||void 0===i?void 0:i.tags[e])||void 0===o?void 0:o.adResponse)||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]=Object.assign(Object.assign({},window.apntag.requests.tags[e]),{adResponse:{ads:[{creative_id:n}]}})),_n(e);const s=d.firstElementChild;s&&t.insertBefore(s,d),d.remove()},$n="ad-loaded",Nn=()=>Ie(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,pageContext:{countryCode:n,isMobileApp:i},fullscreenScroll:o}=p.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:r}=p.getHandlers(),{getConsentAsync:a}=Oe(t,0,n),s=yield a(),l=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:i=>{const o=Nt(),{prebid:{relevantCallbackTimeout:r}={}}=p.get(),a="relevantCb"===i&&r?r:n[i].timeout,d=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,o.loadTags&&o.loadTags())},a);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),c=Nt(),u=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=Nt();return{user:e,keywords:t}})();l.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:g}=u;(()=>{const e=qt();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{if(l.getCancel()||!c.loadTags)return d("core loadTags() call was cancelled",{cancel:l.getCancel(),apnTagLoadTags:!c.loadTags,condition:"or"}),void l.cleanup();const t=qt();l.events.relevantCb.done=!0,l.failsafeOnTimeout("auctionCb");const a=s?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};d("prebid consentManagement",a),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:a,enableSendAllBids:!1},Zt(n)),Dt(g,v))),d("core add prebid config",Object.assign(Object.assign({consentManagement:a,enableSendAllBids:!1},Zt(n)),Dt(g,v))),t.loadPrebid({configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e)),l.cleanup()}},customNativeRender:e=>{qn(e,r)},directRenderFn:e=>{var t;const{settings:n,renderFn:r}=e,{bid:a,adDiv:d}=n||{};if(!d)return;const s=r(n),l=Object.assign(Object.assign({},a),{targetId:d.id,banner:!0}),c=d.id,u=document.getElementById(c);u&&(le(l)?(Pn(l,o),i?u.style.setProperty("--advertory-political-box-offset","30px"):(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const i=new MutationObserver(()=>{n()&&i.disconnect()});i.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(s)):(On(u),null===(t=null==u?void 0:u.parentElement)||void 0===t||t.classList.add("advertory-direct-render")),u.classList.add($n),(null==a?void 0:a.creativeId)&&Ln(c,u,Number(null==a?void 0:a.creativeId)))}}),d("core load prebid",{configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{l.getCancel()||(l.events.auctionCb.done=!0,c.loadTags(e))}},customNativeRender:e=>{qn(e,r)},directRenderFn:()=>{}})})}),qn=(e,t)=>{var n;const{divId:i,native:o,bid:r}=e,a=document.querySelectorAll(`[id^=${i}]`)[0],d=`RY-${a.id}`;((e,t)=>{e.childNodes.forEach(e=>e.style.cssText="position: absolute; z-index: -1;");const n=document.createElement("div");n.setAttribute("id",t),e.appendChild(n)})(a,d);const s=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;null==t||t({native:o,targetId:d},p.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")},Dn=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:o}=window,[r,a]=t;if(!i.dataset.lockedsize&&a&&r)i.style.width=`${r}px`,i.style.height=`${a}px`,n&&(o.resizeAd(i.id,[r,a]),i.dataset.lockedsize="true",i.dataset.lockedwidth=r.toString(),i.dataset.lockedheight=a.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&o.resizeAd(i.id,[e,t])}},Mn=["netboard","board"];class Fn{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),d=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:s,spid:l}=t;return d.searchParams.append("editionName",o),r&&d.searchParams.append("urlData",r),a&&d.searchParams.append("excludedItems",a),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(e){return Ie(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),r=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",a=(null==o?void 0:o.userId)?String(o.userId):"",s=this.buildUrl(e,{envId:r,spid:a});try{d("Starting fetching DrEdition ad from URL:",s);const e={method:"GET"},t=yield Mt.get(s,e);return d("Fetch operation completed successfully."),t}catch(e){d("Error during fetch operation:",e)}return null})}}let Bn=class{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,d=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:d},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return Ie(this,void 0,void 0,function*(){const{id:n,autoplay:i,mute:o,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:i,vgtvMuted:o,vgtvLoop:!!r,vgtvNa:!0,vgtvRecommended:!1,vgtvPulseProvider:"vg",vgtvPulseProductTag:"partnerstudio"})})}getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const Rn=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):d("Dr. Edition container does not have a parent element, cannot remove height lock.")};class Un{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return Ie(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,a=e.querySelector(o);if(!a)return void d(`Container with selector "${o}" not found.`);const s=yield this.drEditionService.fetchData(t);return(null==s?void 0:s.itemId)||r?!(null==s?void 0:s.itemId)&&r?(d("No Dr. Edition ads available to render. Collapsing whole placement."),F(e.id),void Rn(a)):((null==s?void 0:s.itemId)&&r&&(d("Dr. Edition ad available to render as a Xandr backfill."),B(e.id)),void(s?(s.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(s.css,"style"),yield this.rendererManager.render(a,s,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(s,t),Rn(a),this.drEditionAds.push(s),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(s.itemId),this.observeAdView(e,s,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):Rn(a))):(d("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void Rn(a))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";B(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}class zn{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return Ie(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:i}=Oe(n.tcf,n.isMobileApp,n.country),o=yield i(),r=vt(n.device)?t.mobileHTML:t.desktopHTML,a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var i,o,r;e.search=null!==(r=null===(o=(i=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(i,e,t,n))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class Vn{constructor(e){this.strategy=e}handle(e,t){return Ie(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:i}={}}=e;(n||i)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return Ie(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield nn(t)}catch(e){d("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return Ie(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==o||o.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",r),d.setAttribute("playsinline",""),!(!d||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,d),!0))}}let Hn=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return Ie(this,void 0,void 0,function*(){var i,o,r,a,d,s,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:n.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const p=this.getEventInput(e,t,n,"view");(null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,p):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackViewUIElement)||void 0===s||s.call(d,p):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,p)})}trackContentClick(e,t,n){return Ie(this,void 0,void 0,function*(){var i,o,r,a,d,s;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(o=(i=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(i,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(s=(d=this.pulse).trackElementClick)||void 0===s||s.call(d,l)})}};class Wn extends Hn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:d="",creativeId:s,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:p,urlPath:v}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[d,a,p,v].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:d,"spt:creativeId":s,pageTitle:a,publicUrl:p,urlPath:v},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}let Kn=class extends Hn{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,d,s;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,p=n.editionName,v=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:p,"@type":"UIElement",position:p,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:p,"@type":v,url:location.origin},tags:null===(s=null===(d=this.newsroomStrategy)||void 0===d?void 0:d.getTags)||void 0===s?void 0:s.call(d,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,d;const{pulseData:{algorithm:s="sov",clientName:l,creativeId:c,editionId:u,itemId:p,url:v,probability:g}={}}=t,h=Math.floor(Date.now()/1e3),m=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),f=this.getTeaserElementText(e,"image"),w=null!==(d=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:v)&&void 0!==d?d:"";return{algorithm:s,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:p,link:w,placement:n.editionName,subtitle:y,time:h,title:m,type:i,imageUrl:f,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const Gn={FRONT:"front"},Jn=e=>Ie(void 0,void 0,void 0,function*(){var t,n;return(null===(t=null===window||void 0===window?void 0:window.SVP)||void 0===t?void 0:t.Player)?new window.SVP.Player(e):((()=>{const e="svp-player-sdk",t=document.querySelector(e),n=Array.from(document.querySelectorAll('script[src^="https://cdn.stream.schibsted.media/player"]'));if(t||n.length>0)return;const i=document.createElement("script");i.id=e,i.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",i.async=!0;try{i.src=i.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(i,document.head.firstChild)})(),(null===(n=window.SVP)||void 0===n?void 0:n.isLoaded)?new window.SVP.Player(e):yield new Promise(t=>{window.addEventListener("onSvpPlayerReady",()=>t(new window.SVP.Player(e)))}))}),Qn={ContentMutePlugin:e=>{window.SVP.Player.Plugins.register({getName:()=>"ContentMutePlugin",initialize(){},setup(){const t=this.player.config.get("mute");this.container=e||this.player.getContainer(),this.muted=t,t&&this.listenToOnce(this.player,"ready",this.renderButtonElement,this)},getButtonElement(){const e=document.createElement("button");e.className="player-plugin-content-mute";const t=document.createElement("span");return t.className="volume-button-icon",e.appendChild(t),e},renderButtonElement(){this.buttonElement=this.getButtonElement(),this.buttonElement.addEventListener("click",this.onButtonClick.bind(this)),this.container.appendChild(this.buttonElement),this.isVideo()||(this.buttonElement.style.display="none"),this.getJWPlayer()&&this.getJWPlayer().on("mute",this.onMuteChange,this)},onButtonClick(){this.getJWPlayer()&&(this.container.classList.add("has-interacted"),this.muted=!this.muted,this.getJWPlayer().setMute(this.muted))},onMuteChange(e){this.muted=e.mute,this.muted?this.buttonElement.classList.remove("content-video-volume-on"):this.buttonElement.classList.add("content-video-volume-on")},isVideo(){return"video"===this.player.getRawAsset().assetType},getJWPlayer(){return this.player.model.player}})},IntegrationMenu:()=>{window.SVP.Player.Plugins.register({getName:()=>"IntegrationMenu",setup(){return Ie(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return ta})})}})}};class Xn{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){yield Ie(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const a=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var s,l;l=d,null==(s=a)||s.forEach(e=>{Qn[e](l)});const c={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},u=yield Jn(c);u.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(u,a)}),u.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),u.once("PulseStats:ready",()=>Ie(this,void 0,void 0,function*(){const e=yield u.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Gn.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}}const Yn="https://www.aftonbladet.se/video-player-extras/latest/";class Zn{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${Yn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${Yn}external-link.js`]:{name:"ExternalLink"}}};yield Jn(a),this.addEditionVideoClass(e)})}addEditionVideoClass(e){var t;(null===(t=null==e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)&&e.parentElement.parentElement.classList.add("dr-edition-video-player")}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.aftonbladet.se"===t?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}const ei=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class ti{handleVideo(e,t){return Ie(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},ei(e)?e:{}),{provider:Object.assign(Object.assign({},ei(null==e?void 0:e.provider)?e.provider:{}),{productTag:"partnerstudio"})})},skin:{name:"svd-player",url:""},settings:{pulse:{host:"se-aftonbladet.videoplaza.tv",contentMetadata:{category:"SvD",tags:["standard-linears","pause",`video-${t}`]},requestSettings:{}}}},d=yield Jn(a);d.once("PulseStats:ready",()=>Ie(this,void 0,void 0,function*(){const e=yield d.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"svdse",productTag:"partnerstudio"}})}))})}transformUrl(e){const{hostname:t,pathname:n}=new URL(e);return"brand-studio.svd.se"===t?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:e,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Gn.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let ni=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const ii=(e,t,n)=>{var i;const{publisher:o,pageType:r,country:a}=e,d={[wt.VG]:new Bn,[wt.E24]:new Xn,[wt.AFTONBLADET]:new Zn,[wt.SVD]:new ti}[o]||new ni,s=new(a===g.SE?Wn:Kn)(n,d,r),l=new Fn(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),c=new zn(d,s),u=new Vn(d);return new Un(l,c,u,s)},oi=()=>Ie(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})});class ri{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return Ie(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return d("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return Ie(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}const ai=(e,t,n)=>{const{wrapperSelector:i}=null==e?void 0:e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=ii(n,i,o);e.forEach(e=>{var i,o,a;if(!e.isIntersecting)return;const d=e.target,s=null!==(i=d.dataset.editionName)&&void 0!==i?i:"",l=null!==(o=d.dataset.pulseColumnname)&&void 0!==o?o:"",c=null!==(a=d.dataset.pulsePrimaryposition)&&void 0!==a?a:"";r.fetchAndRenderAd(d,Object.assign(Object.assign({},n),{editionName:s,columnName:l,primaryPosition:c})),t.unobserve(d)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},di=()=>Ie(void 0,void 0,void 0,function*(){try{(()=>{const e=document.createElement("script");e.setAttribute("src","https://ads.inventory.schibsted.io/ad-service/ad-banner-sponsor-advertisement/ad.js"),e.setAttribute("type","text/javascript"),e.setAttribute("async","true"),document.head.appendChild(e)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ads-advertory-anchor"),e.classList.add("subscribe_box"),e.classList.add("ad-box"),e.classList.add("leftAd"),e.classList.add("netboard"),e.classList.add("advert"),e.classList.add("module"),e.classList.add("banner"),e.classList.add("leaderboard"),e.classList.add("adsbygoogle"),e.classList.add("ad-banner"),e.classList.add("ad-container"),e.classList.add("adsbox"),e.classList.add("sidebar-ads"),e.classList.add("banner-ads"),e.style.opacity="0",e.style.width="1px",e.style.height="1px",e.style.minWidth="0px",e.style.minHeight="0px",e.style.maxWidth="1px",e.style.maxHeight="1px",e.style.position="absolute",e.style.top="0",e.style.boxSizing="border-box",e.style.margin="0",e.style.padding="0",document.body.appendChild(e)})()}catch(e){console.error("Error running adblock scripts:",e)}}),si=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},li=[],ci=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,pageContext:{deviceType:a,publisher:s,pageType:l,countryCode:c,isMobileApp:u}}=e;if(!(yield je(o,u,c,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:a}=e,d=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,s=r[o]||r.desktop,l=w(t.targetId),c=s.find(e=>e.targetId===l),u=Mn.some(e=>l.startsWith(e)),p=li.includes(l),v=(null===(i=null==c?void 0:c.drEdition)||void 0===i?void 0:i.editionName)||d;return c&&u&&!p&&v?(li.push(l),Object.assign(Object.assign({},c),{drEdition:Object.assign(Object.assign({},c.drEdition),{editionName:v})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void d("Pulse has not been passed as a prop, aborting");const v=yield oi(),g=new ri(v),h=ii({publisher:s,pageType:l,country:c},g,null==i?void 0:i.instance),m=document.getElementById(t.targetId);if(!m||!r)return;m.classList.value="";const y=document.createElement("div");y.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=y.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:a,tcf:o,isMobileApp:u,country:c,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,f)}),ui=(e,t)=>{var n,i,o;if(!si())return void d("Ad block not enabled, Dr. Edition backfills will not be rendered");d("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:r},finnBlink:a}=e,s=null===(i=null===(n=null==a?void 0:a.replacementConfig)||void 0===n?void 0:n.adsToReplace)||void 0===i?void 0:i[r],l=null!==(o=null==s?void 0:s.map(([e])=>e))&&void 0!==o?o:[],c=new IntersectionObserver((t,n)=>Ie(void 0,void 0,void 0,function*(){for(const i of t){if(!i.isIntersecting)continue;const t=i.target;n.unobserve(t),yield ci(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!l.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&c.observe(t)})};var pi=Object.freeze({__proto__:null,DrEdition:({editionName:e,fallbackTargetId:t,children:i,pulseData:o,htmlAttributes:r})=>{const a=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},d=a(o,"data-pulse"),s=a(r,"data");return n.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":e},d,s,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":t,style:{display:"none"},children:i})]}))},getDrEditionManager:ii,handleDrEdition:e=>Ie(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield je(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield oi(),i=new ri(n);ai({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),handleDrEditionBackfill:ci,handleDrEditionBackfillOnAdblock:ui});const vi="collapseAd",gi="hideAd",hi="resizeAd",mi="renderDrEditionFallback",yi="wallpaperImageUrl",fi="wallpaperColor",wi="velvet",bi=[hi,yi,fi,vi,gi,mi,wi];let xi;const ki=e=>{if(!["http://acdn.adnxs-simple.com","https://acdn.adnxs-simple.com","https://crcdn01.adnxs-simple.com","http://crcdn01.adnxs-simple.com","https://acdn.adnxs.com","http://acdn.adnxs.com","https://adsdk.microsoft.com","https://adsdk.bing.net","https://adsdkprod.azureedge.net"].includes(e.origin.trim()))return;const{data:t}=e;if(!t)return;const n=(e=>{if("object"==typeof e)return e;if(O(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:yi,wallpaperImageUrl:t}}if(j(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:fi,wallpaperColor:t}}if(e.startsWith(mi)){const t=e.split(":")[1];return{name:mi,targetId:t}}if(e.startsWith(vi)||e.startsWith(gi)){const t=e.split(":")[1];return{name:vi,targetId:t}}if(e.includes("name")&&bi.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!bi.some(e=>n.name===e))return;const{name:i,targetId:o,wallpaperImageUrl:r,wallpaperColor:a,cmd:d,size:s}=n;i===wi&&d&&(d.includes("noScroll")&&(xi=(e=>{if(!e)return()=>{};const t=e.style.overflow;return e.style.setProperty("overflow","hidden"),()=>{e.style.setProperty("overflow",t)}})(document.querySelector("body"))),(d.includes("close")||d.includes("ended"))&&(null==xi||xi(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==vi&&i!==gi||!o||F(o),i===hi&&o&&d&&Dn(o,d),i===mi&&o&&(F(o),ci(p.get(),{targetId:o})),"resizeMediationAd"===i&&o&&s&&Dn(o,s,!0),i===yi&&r&&_(r),i===fi&&a&&L(a)},Ei=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Ci=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=p.get(),i=window.apntag,o={publisher:e,countryCode:t,finnBlink:n},r=e=>{B(e),k(()=>i.showTag(e))};return{withXandrAd:r,withFinnBlinkAd:e=>Ie(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ba});yield t(e,o,null)}),withFullAdsChain:e=>Ie(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return void r(e);const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ba});yield t(e,o,r,()=>Ie(void 0,void 0,void 0,function*(){if(!U.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return $});t(e)}))})}},Ii=(e,t,n)=>{const i="true"===n.dataset.isFinnBlinkOnlyPlacement;return ye(t)&&i?(d(`loading finn blink ad for blink only placement for ${t}`),void Ci().withFinnBlinkAd(t)):ye(t)?(d(`loading finn blink ad with full ads chain for ${t}`),void Ci().withFullAdsChain(t)):void k(()=>(d("core showTag",{id:t}),e.showTag(t)))},Ti=(e,t)=>Ie(void 0,void 0,void 0,function*(){yield E,yield C;const n=new IntersectionObserver((t,n)=>((e,t,n,i)=>{e.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(e=>{const{target:o}=e,r=(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(o),a=document.getElementById(r);d("core log from intersection observer handler",{targetId:r,element:a}),n(window.apntag,r,i),a&&(t.unobserve(a),t.disconnect())})})(t,n,Ii,e),Ei(t));n.observe(e)}),Si=new Map,Ai=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Pi=".brandstudio-premium-content-widget",Oi=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),ji=({adWrapper:e,placementContainer:t})=>{const n=Oi({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),V(i=t),i.innerHTML=""},_i=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Li=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=p.get(),i=Ai.includes(n)&&Boolean(t.closest(Pi));const o=i?t.closest(Pi):null,r=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!i&&!a||i&&!o)return;if(a)return _i(e),void r.disconnect();const d=t.closest('[style*="height"]'),s=o;d&&s.contains(d)?_i(d):s.hasAttribute("style")&&_i(s),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},$i=(e,t,n,i,o,r)=>{var a;const d=performance.now(),s=null!==(a=Si.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,o)&&n<0;d-s>=o&&l&&(Si.set(t,d),((e,t,n)=>{const{pageContext:{countryCode:i}}=p.get(),o=null==n?void 0:n.parentElement;o&&n&&ji({adWrapper:o,placementContainer:n}),k(()=>{e.setKeywords([t],{[`${h(i)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},Ni=(e,t,n)=>{const i=new IntersectionObserver((e,i)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:o,boundingClientRect:r}=e;t(window.apntag,o.id,r.y,n,i,o)})})(e,$i,t,n),Ei(300));i.observe(e)},qi=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const o=e.slice(i,i+t);n.push(o)}return n},Di=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),Mi=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},Fi=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=p.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),Vi(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},Bi=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const o of i){const i=e.find(e=>{var t,n;return e.targetId===(null===(t=o.firstElementChild)||void 0===t?void 0:t.id)&&(null===(n=e.refresh)||void 0===n?void 0:n.bfCache)}),r=null==i?void 0:i.requestThreshold;Mi(o,r)&&i&&(z(i.targetId),n.length&&o.classList.remove(...n),Vi([i],t))}},Ri=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:i}}=p.get();t&&(e.forEach(({targetId:e})=>{const t=Ui(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&Bi(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),Bi(e,!1,t))};n.persisted&&(Di()?window.addEventListener("scroll",i,{passive:!0}):Bi(e,!1,t))})})(e,n))},Ui=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},zi=e=>{const{targetId:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(Ui(t)),o=(e=>1===e[0]&&1===e[1])(i),r={sizes:[i],allowedFormats:o?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return o||(r.native=void 0),r},Vi=(e,t=!1)=>{const{queryConfig:{batchSize:n=c}={}}=p.get(),i=e.map(({targetId:e})=>e),o=qi(i,n);if(t)for(const t of e){const e=zi(t);window.apntag.modifyTag(t.targetId,e)}for(const e of o)k(()=>window.apntag.refresh(e))},Hi=e=>`externalImpId:'${e}'`,Wi=(e,t)=>t?Object.assign(Object.assign({},e),{"aa-sch-ssa-native-ad":"true","aa-sch-ssa-format":"NATIVE_CONTENT","aa-sch-ssa-market":"XNO","aa-sch-ssa-cat":["ssa_1","ssa_2","ssa_3","ssa_4","ssa_5","ssa_6","ssa_7","ssa_8","ssa_9","ssa_10","ssa_11","ssa_12","ssa_13","ssa_14","ssa_15","ssa_16","ssa_17","ssa_18","ssa_19","ssa_20","ssa_21","ssa_22","ssa_23","ssa_24","ssa_25","ssa_26","ssa_27","ssa_28","ssa_29","ssa_30"]}):e,Ki=e=>{var t;const{pageSetup:{tag:{forwardExternalImpId:n=!1}={}}={},tracker:i}=p.get(),{targetId:o,sizes:r,keywords:a,allowedFormats:s,invCode:l,ssaNativeAdEnabled:c=!1,nativeCustomProperties:u,safeframeConfig:v,dynamicSizeWidthCheck:g=!1,globalPlacementId:h}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||He())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],i=Array.isArray(n)?n.filter(e=>e!==De):n,o=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:o})})(e),m=Object.assign({invCode:l,sizes:r,targetId:o,keywords:Wi(a,c),allowedFormats:s,dynamicSizeWidthCheck:g,globalPlacementId:h},v&&{safeframeConfig:v}),y=(e=>{var t,n,i,o,r,a,s;return e?(null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)?(null===(i=null===(n=null==e?void 0:e.instance)||void 0===n?void 0:n.state)||void 0===i?void 0:i.pageViewId)?(d("Tracker state pageViewId is:",null===(r=null===(o=null==e?void 0:e.instance)||void 0===o?void 0:o.state)||void 0===r?void 0:r.pageViewId),null===(s=null===(a=null==e?void 0:e.instance)||void 0===a?void 0:a.state)||void 0===s?void 0:s.pageViewId):(d("Tracker state does not contain field pageViewId or it is empty"),""):(d("Tracker state is empty"),""):(d("Tracker is not configured in initAdvertory function"),"")})(i);n&&y&&(d("External Impression ID assigned to defineTag:",Hi(y)),m.externalImpId=Hi(y));const f=(e=>Object.entries({video:{required:!1},address:{required:!1},saleprice:{required:!1},rating:{required:!1},price:{required:!1},phone:{required:!1},likes:{required:!1},downloads:{required:!1},customIcon1:{required:!1},customIcon2:{required:!1},customDisplayUrl1:{required:!1}}).reduce((t,[n,i])=>((null==e?void 0:e.includes(n))&&(t[n]=i),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(u);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(m.native=f),m},Gi=e=>!e.includes("takeover")||He(),Ji=e=>{const{source:t}=e;return"csm"===t},Qi=e=>{if(!e)return e;const{pageContext:{countryCode:t}}=p.get(),n=h(t),i=e[`${n}-targetid`],o=i?w(i[0]):"";return Object.assign(Object.assign({},e),i&&{[`${n}-targetid`]:[o]})},Xi=e=>{const{pageContext:{countryCode:t}}=p.get(),n=h(t);return Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${n}-geo`]&&{[`${n}-geo`]:["geo-test-value"]}),e[`${n}-geofence`]&&{[`${n}-geofence`]:["geofence-test-value"]}),e[`${n}-weather`]&&{[`${n}-weather`]:["weather-test-value"]})},Yi=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const i=n.split(",")[0].split(":")[0],o=e.find(e=>e.invCode===i),r=document.querySelector(`[id^=${null==o?void 0:o.targetId}]`);r&&r.scrollIntoView({behavior:"smooth",block:"start"})})(e),(()=>{var e;const t=new URLSearchParams(window.location.search).get("scrollToDrEditionPlacement");if(!t)return;const n=null!==(e=document.querySelector(`[id*="${t}}"]`))&&void 0!==e?e:document.querySelector(`a[aria-label*="${t}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"start"})})()},Zi=(e,t)=>Ie(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})});kn(".advertory-brandmetrics-survey{width:100%}");const eo="advertory-brandmetrics-survey",to="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",no=()=>Ie(void 0,void 0,void 0,function*(){return window.__tcfapi?{gdpr:1,gdpr_consent:yield(e=window.__tcfapi,new Promise((t,n)=>{e("addEventListener",2,(n,i)=>{var o;i||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(o=n.tcString)&&void 0!==o?o:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),io={pageContext:{publisher:"aftonbladet",countryCode:g.SE},memberId:9943,sectionKeyword:"se-aftonbladet-section",frontpageInvCodeTemplate:"se-aftonbladet-{deviceType}-front-{position}",additionalFilterKeys:["se-aftonbladet-navigation","se-aftonbladet-keyword_generator","se-aftonbladet-sponsor"],tcf:{enabled:!0,advertisingCMPSignalEnabled:!0,schibstedConsentToPayEnabled:!0},glimr:{enabled:!0,clientId:"OYGH3SXYFAQR78LVPNQD"}},oo={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},ro=e=>(null==e?void 0:e.parent)?[...ro(e.parent),e.shortPath||"unknown"]:[],ao=(e,t)=>t?"se-aftonbladet-{deviceType}-studio_{position}":`se-aftonbladet-tv-{deviceType}-${(e=>{var t;if(null===(t=null==e?void 0:e.metadata)||void 0===t?void 0:t.afp)return"afp";const[,n]=ro(e);return oo[n]||"ovrigaavdelningar"})(e)}_{position}`,so={aftonbladet:io},lo={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:ao(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:ro(e).join(":")}}},co=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},uo=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),po="se-generic",vo="aa-sch",go="kv_",ho="pause",mo="{deviceType}",yo="{position}",fo="afp_",wo=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),bo="1-1",xo="16-9",ko="3-4",Eo="9-16",Co="responsive",Io={[bo]:1,[xo]:1.78,[Eo]:.56,[Co]:1},To={[bo]:1,[xo]:1.78,[ko]:1.33,[Eo]:.56},So=(e,t,n,i)=>{const{invCode:o="",videoOverlayInvCode:r}=null!=e?e:{},a=dt===n?ct:ut,d=o.replace(mo,a);return(e,n)=>{if(e===ho)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(yo,ho).replace(/-([a-z]+)_/,"-article-"))(d);if(n&&wo.has(e)){return(i&&r?r:t.frontpageInvCodeTemplate).replace(mo,a).replace(yo,e)}return d.replace(yo,e)}},Ao=(e,t)=>{const n=Object.entries(e);return n.reduce((n,[i,o])=>{const r=Math.abs(e[n]-t);return Math.abs(o-t)<r?i:n},n[0][0])},Po=()=>{var e,t;const n=jwplayer().getContainer(),i=null!==(t=null===(e=document.getElementById(n.id))||void 0===e?void 0:e.parentElement)&&void 0!==t?t:null;return i&&"number"==typeof i.offsetWidth&&"number"==typeof i.offsetHeight&&0!==i.offsetHeight?i.offsetWidth/i.offsetHeight:1},Oo=()=>{return(e=>{try{return decodeURIComponent(e)}catch(e){return""}})("undefined"!=typeof document&&null!==(t=null===(e=document.cookie.match("(^|;)\\s*_pulse2data\\s*=\\s*([^;]+)"))||void 0===e?void 0:e.pop())&&void 0!==t?t:"").split(",");var e,t},jo=()=>{const e=null!==(t=Oo()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=Oo()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},_o=()=>Object.fromEntries(new URLSearchParams(window.location.search)),Lo=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{publisher:i,countryCode:o}}=t,{width:r,height:a}={width:window.innerWidth,height:window.innerHeight},d={isMobileApp:e.isApp,countryCode:o,publisher:i,pageType:"front",deviceType:e.deviceType},s=(yield je(n,e.isApp,o,"video"))?"1":"0",l=yield no(),c=yield tn(o),u=yield Le({tcf:n,pageContext:d}),p=null!==(v=window.location.pathname.split("/").slice(-2,-1).pop())&&void 0!==v?v:"";var v;const g=((e=1)=>Ao(To,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?Ao(Io,Number(m.toFixed(2))):Co;var m,y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${vo}-country_code`]:o,[`${vo}-publisher`]:i,[`${vo}-supply_type`]:(y=e.deviceType,y===dt?st:lt),[`kw_${vo}-page_type`]:"collection",[`${vo}-page_type`]:"collection",[`${po}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${po}-page`]:"index",[`${po}-page`]:"index",[`${po}-screenheight`]:String(window.screen.height),[`${po}-screenwidth`]:String(window.screen.width),[`${po}-viewportheight`]:String(a),[`${po}-viewportwidth`]:String(r),[`${po}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${po}-mobile-os`]:pt(),[`${po}-audience`]:void 0,[`${po}-externalid_src`]:jo(),[`${po}-tags`]:e.tags,[`${po}-articleid`]:p,"article-id":p},yield _t(Object.assign(Object.assign({},t),{pageContext:d}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${po}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(_o()).some(e=>e.includes(go))&&(()=>{const e=_o(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(go)).map(([e,t])=>[e.slice(3),t]));return Object.keys(t).length>0?t:void 0})()),{[t.sectionKeyword]:e.sections.split(":"),"aa-sch-cmp_advertising":s,"kw_aa-sch-cmp_advertising":s,"aa-sch-instream_player_aspectratio":g,"aa-sch-player_aspectratio":h}),l),{eids:c})}),$o=["se-generic-audience","se-generic-appversion","se-generic-sitemode","se-generic-pagegen","se-generic-viewportheight","se-generic-viewportwidth","se-generic-screenheight","se-generic-screenwidth","aa-sch-inventory_type"],No=["aa-sch-publisher","se-generic-page","aa-sch-supply_type","se-generic-story","se-generic-section","se-generic-adformat","aa-sch-context_keyword","se-generic-tvtags","se-generic-test","aa-sch-cmp_advertising","aa-sch-instream_player_aspectratio","aa-sch-player_aspectratio"],qo=["external_uid","gdpr","gdpr_consent","eids","article-id"],Do=(e,t)=>{const n=[...$o,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||qo.includes(e)?e:`kw_${e}`,t]))},Mo=e=>Object.fromEntries(Object.entries(e).filter(([e])=>No.includes(e))),Fo=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i,o,r;const a=(e=>{var t;so[e]||s(`[video] No config found for publisher "${e}"`);return null!==(t=so[e])&&void 0!==t?t:io})(e.publisher),d=(e=>{var t;return null!==(t=lo[e])&&void 0!==t?t:lo.aftonbladet})(e.publisher)(e.assetSection,e.isLiveStudio),l="/"===window.location.pathname,c=null===(i=null===(n=t.attributes)||void 0===n?void 0:n.id)||void 0===i?void 0:i.toString(),u=e.assetId===c,p=null!==(o=Number(e.aspectRatio))&&void 0!==o?o:1,v=u?"preroll":"bumper";var g;return{siteConfig:a,siteVideoParams:d,isUserPresentOnFrontPage:l,adsKeywords:yield Lo({pageAdsKeywords:e.pageAdsKeywords,tags:(g=e.tags,g?g.filter(e=>e.slug).map(({slug:e})=>e).join(","):""),sections:null!==(r=null==d?void 0:d.sections)&&void 0!==r?r:"",isUserLoggedIn:e.isUserLoggedIn,isUserPresentOnFrontPage:l,isInitialVideo:u,instreamAspectRatio:p,playerAspectRatio:Po(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:v,playbackMethod:co(e.startMode)}}),Bo=(e,t)=>{const{siteConfig:n,siteVideoParams:i,isUserPresentOnFrontPage:o,adsKeywords:r,prerollPlacementFormat:a,playbackMethod:d}=e,{invCode:s}=i||{},l=So(i,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(fo)?`${fo}${t}`:t)(s),u=window.location.href;return{member:n.memberId,options:{autoplayMuted:!0,vpaidcontrols:!0},adSlots:{schedule:{preroll:{inv_code:l(a,o),"se-generic-playback-method":uo.get(d),"kw_se-generic-adformat":c(a)},midroll:{inv_code:l("midroll"),"kw_se-generic-adformat":c("midroll")},postroll:{inv_code:l("postroll"),"kw_se-generic-adformat":c("postroll")}},params:Object.assign(Object.assign(Object.assign({},Do(r,n)),Mo(r)),{vskippable:"0",referrer:u,vplaybackmethod:d})},adPlacements:{schedule:{pause:{invCode:l("pause"),sizes:[[825,424],[1280,720],[2,1]]}},params:{keywords:Object.assign(Object.assign({},r),{"se-generic-adformat":c("pause")})}}}},Ro=e=>t=>Ie(void 0,void 0,void 0,function*(){const n=yield Fo(e,t);return Bo(n,e)}),Uo={plcmtcnt:1,context:1,contextsubtype:10,plcmttype:1,assets:[{id:1,title:{len:100},required:0},{id:2,img:{type:1,hmin:10,wmin:10},required:0},{id:3,img:{type:3,hmin:10,wmin:10},required:0},{id:4,data:{type:2},required:0},{id:5,data:{type:12},required:0}],ver:"1.2",eventtrackers:[{event:1,methods:[1,2]}]},zo={no:"NOK",se:"SEK"},Vo={no:"no",se:"sv"};class Ho{buildFetchObject(e,t,n,i){return Ie(this,void 0,void 0,function*(){const{pageContext:{countryCode:o},pageOptions:r}=i,{invCode:a,xandrPlacementId:d}=e,s=yield no(),l=(c=Object.assign(Object.assign({},t),n),Object.entries(c).flatMap(([e,t])=>void 0===t?[]:Array.isArray(t)?t.map(t=>`${e}=${t}`):[`${e}=${t}`]).join(","));var c;const u=new URL(window.location.href),p=(e=>{const{allowedFormats:t}=e;if(!t||t.includes("native"))return{request:JSON.stringify(Uo),ver:"1.1"}})(e),v=(e=>{const{sizes:t,allowedFormats:n}=e;if((null==n?void 0:n.includes("banner"))&&t&&0!==t.length)return{format:t.map(([e,t])=>({w:e,h:t})),w:t[0][0],h:t[0][1]}})(e);return{id:x(36),imp:[Object.assign(Object.assign(Object.assign({id:a},p&&{native:p}),v&&{banner:v}),{secure:1,tagid:a,ext:{appnexus:Object.assign(Object.assign({},d&&{placement_id:d}),{code:a,keywords:l,use_pmt_rule:!1})}})],site:{domain:u.hostname,page:u.href,publisher:{id:String(r.publisherId),domain:u.hostname},ext:{amp:0}},device:{dnt:Number((null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)),ua:window.navigator.userAgent,h:screen.height,w:screen.width,language:(navigator.language||Vo[o]||"no").split("-")[0]},regs:{ext:{gdpr:s.gdpr||0}},user:{id:yield Le(i),ext:{consent:s.gdpr_consent||"",eids:en(o)}},at:1,cur:[zo[o]],source:{tid:x(36)},ext:{prebid:{bidder:{appnexus:{member:r.member}}}}}})}fetchData(e,t,n,i){return Ie(this,void 0,void 0,function*(){try{d("Starting fetching Studio ad from Xandr:",to);const o=new Headers({"Content-Type":"application/json"}),r=new URLSearchParams(window.location.search),a=new URLSearchParams(["openRTBDebugMemberOverride","openRTBNewsroomOverride","openRTBForceNativeDesc2Override"].flatMap(e=>{const t=r.get(e);return t?[[e,t]]:[]})),s=a.size>0?`${to}?${a.toString()}`:to,l=yield this.buildFetchObject(e,t,n,i),c=yield Mt.post(s,o,l);return d("Fetch operation completed successfully.",c),c}catch(e){d("Error during fetch operation:",e)}return null})}}const Wo=0,Ko=3,Go=(e,t,n,i)=>{const o=t.parentElement;if(!o)return;const r=e?`-${e}`:"",a=i?`__${i}`:"",d=`advertory${r}-${n}${a}`,s=`advertory${r}-${n}-wrapper${a}`;t.classList.remove(...t.classList),o.classList.remove(...o.classList),t.classList.add(d),o.classList.add(s),t.dataset.adType=n},Jo="finn-blink",Qo="native-ad",Xo=(e,t)=>{Yo(e,t),er(e,t)},Yo=(e,t)=>{var n,i;const o=document.querySelector(`#${e.targetId}`);if(!o||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(i=null==t?void 0:t.clickLinkSelector)&&void 0!==i?i:"a.ad-link";(null==o?void 0:o.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const i of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])nr(i)}),t.dataset.tracked="true")})},Zo=e=>{var t;const{native:{impressionTrackers:n}={}}=e,i=null==n?void 0:n.some(e=>e.includes("googleads")),o="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;i||!o?null==n||n.forEach(tr):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},er=(e,t)=>{var n;let i=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:dt])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!i)for(const n of t)if(n.isIntersecting){i=!0,Zo(e),c.disconnect();break}},s);c.observe(o)},tr=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?nr(e):window.navigator.sendBeacon(e)},nr=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},ir=e=>e.reduce((e,t)=>{if(!t.serverSidePlacement)return e.clientSidePlacements.push(t),e;const n=Math.random()<.5;return t.keywords=Object.assign(Object.assign({},t.keywords),{"aa-sch-prerenderer":n?"true":"false"}),n?e.serverSidePlacements.push(t):e.clientSidePlacements.push(t),e},{clientSidePlacements:[],serverSidePlacements:[]}),or=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;const{pageContext:{deviceType:o},appearanceConfig:r}=t,a=null==r?void 0:r.defaultThreshold[o],s=null!==(n=e.requestThreshold)&&void 0!==n?n:a,l=document.getElementById(e.targetId);if(!l)return void d(`Server-side ad container not found: ${e.targetId}`);yield new Promise(e=>{new IntersectionObserver((t,n)=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),e())},Ei(s)).observe(l)});const{prepareTag:c}=p.getHandlers(),u=U.getData("alertoryConfigKeywords"),v=null!==(i=c(Ki(e)).keywords)&&void 0!==i?i:{},g=new Ho,h=yield g.fetchData(e,u,v,t);h&&(((e,t,n)=>{const i=n===rt?t.mobileHTML:t.desktopHTML;if(i){if(t.adType===Wo){const n=document.createElement("iframe");n.width=String(t.bid.w),n.height=String(t.bid.h),n.style.overflow="hidden",n.style.border="none",n.srcdoc=`<style>html,body{margin:0;overflow:hidden;}</style>${i}`,e.appendChild(n)}else e.innerHTML=i;e.classList.add("ad-loaded")}})(l,h,o),h.adType===Ko&&(Go(t.pageContext.publisher,l,Qo,t.pageContext.pageType),Xo({targetId:e.targetId,native:{clickTrackers:h.clickTrackers,impressionTrackers:h.impTrackers}},{deviceType:o,appearanceConfig:r,nativeTrackingConfig:t.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,i)=>{var o,r,a;let d;(null===(o=window.apntag.requests)||void 0===o?void 0:o.tags[e])||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]={invCode:t,adResponse:{ads:[{creative_id:Number(null==i?void 0:i.adid)}]}}),!!n.querySelector("iframe")||(d=document.createElement("iframe"),n.appendChild(d)),Ln(e,n,Number(null==i?void 0:i.adid)),null==d||d.remove()})(e.targetId,e.invCode,l,h.bid))}),rr=(e,t)=>{e.forEach(e=>or(e,t).catch(e=>{d("Failed to handle server-side ad:",e)}))},ar={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},dr=e=>Ie(void 0,void 0,void 0,function*(){if(!(e=>{const{editory:{editableConfiguration:{enabled:t=!1,pageTypeToFetch:n}={}}={},siteSpecificConfig:i}=e;return Boolean(t&&n&&(null==i?void 0:i.publisherClassName))})(e))return e;try{const t=yield(e=>Ie(void 0,void 0,void 0,function*(){const t=(e=>{const{siteSpecificConfig:t,editory:{editoryUrl:n,editableConfiguration:{pageTypeToFetch:i}={}}={}}=e;return(null==t?void 0:t.publisherClassName)&&i?`${n||"https://alertory-cdn.inventory.schibsted.io"}/editable-configurations/${t.publisherClassName}/${i.toUpperCase()}.json`:null})(e);if(!t)return null;const n=new AbortController,i=setTimeout(()=>n.abort(),5e3);try{return yield Mt.get(t,{method:"GET",signal:n.signal})}catch(e){throw d("Failed to fetch S3 config",{error:e,url:t}),e}finally{clearTimeout(i)}}))(e);return t?((e,t)=>o(t,e,ar))(e,t):e}catch(t){return d("Error fetching S3 config, using site config",{error:t}),e}}),sr=(e,t)=>{const{pageContext:{isMobileApp:n}}=p.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e};let lr,cr=[];const ur=["takeover","wallpaper"],pr=e=>{const t=(e=>{var t;const n=U.getData("alertoryConfigKeywords"),{queryConfig:i,placements:o,tcf:r,glimr:a,appearanceConfig:d,pageContext:{publisher:s,countryCode:l,pageType:u,deviceType:p,isMobileApp:v=!1},pageOptions:{member:g},pageSetup:h,takeover:m,fullscreenScroll:y,fullWidth:f}=e,w=null!==(t=null==i?void 0:i.batchSize)&&void 0!==t?t:c;return{xandr:{member:g,keywords:n,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({pageContext:{publisher:s,countryCode:l,pageType:u,deviceType:p,isMobileApp:v},pageSetup:h,placements:o,tcf:r,queryConfig:Object.assign(Object.assign({},i),{batchSize:w})},a&&{glimr:a}),d&&{appearanceConfig:d}),m&&{takeover:m}),y&&{fullscreenScroll:y}),f&&{fullWidth:f})}})(e);window.advertory={initialized:!0,version:"3.3.9",siteConfig:e,alertoryConfig:t}},vr=()=>Ie(void 0,void 0,void 0,function*(){const{pageOptions:e}=p.get(),{preparePageOptions:t}=p.getHandlers(),n=(()=>{var e,t;const{pageSetup:{pageOptions:n}={}}=p.get();return{sandboxAdIframe:null===(t=null===(e=null==n?void 0:n.options)||void 0===e?void 0:e.sandboxAdIframeEnabled)||void 0===t||t,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),i=yield Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return(yield je(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),o=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),i));(e=>{const t=U.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=Xi(e);U.setData("alertoryConfigKeywords",n)})(o.keywords),k(()=>lr.setPageOpts(o))}),gr=e=>Ie(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),r=yield je(n,i,o,"loadPlacements"),a=((e,t)=>t?e:(e.filter(e=>!e.supportsNonRTB).forEach(e=>F(e.targetId)),e.filter(e=>e.supportsNonRTB).map(e=>{return Object.assign(Object.assign({},e),{invCode:(t=e.invCode,`${t}_non_rtb`)});var t})))(e,r);hr(a);(null==t?void 0:t.enabled)&&r&&!M()?(d("core loadPlacements prebid enabled"),yield Nn()):(d("core load tags invoked without prebid enabled"),mr(a))}),hr=e=>{const{prepareTag:t}=p.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.targetId.includes(t)),o=t.findIndex(e=>n.targetId.includes(e));return-1!==i&&-1===o?-1:-1===i&&-1!==o?1:i-o})})(e).forEach(e=>{d("core defineTags",{placement:e});const i=Ki(e);if(Gi(e.targetId)){const o=t(i),r=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Qi(i),sizes:o}})(o);n.push(r),k(()=>(d("core defineTag - add to the queue",{placement:e,preparedTag:o}),lr.defineTag(o)))}}),(e=>{var t,n,i;(null===(i=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===i?void 0:i.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},mr=e=>{const t=e.filter(({targetId:e})=>Gi(e)).map(({targetId:e})=>e);t.length&&k(()=>(d("core loadTags",{placementsIdsToLoad:t}),lr.loadTags([...t])))},yr=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{appearanceConfig:n,pageContext:{deviceType:i}}=p.get(),{requestThreshold:o,refresh:r}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),s=null==n?void 0:n.defaultThreshold[i];a&&(d("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,requestThreshold:o,deviceDefaultThreshold:s}),yield Ti(a,null!=o?o:s)),a&&(null==r?void 0:r.scroll)&&(d("core showAd - setup refreshing",{placement:e,adObj:t}),a.dataset.refresh=r.scroll.toString())}),fr=e=>e.some(({targetId:e})=>ur.some(t=>e.includes(t))),wr=e=>Ie(void 0,void 0,void 0,function*(){var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return;const[n,i]=(e=>e.reduce(([e,t],n)=>{var i;return(null===(i=null==n?void 0:n.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),o=(e=>{const{queryConfig:{placementBatches:t,batchSize:n=c}={},pageContext:{deviceType:i}}=p.get(),o=X(e),r=Object.keys((null==t?void 0:t[i])||{}).map(e=>o[e]||[]).filter(e=>e.length>0),a=new Set(r.flat().map(({targetId:e})=>e)),d=e.filter(({targetId:e})=>!a.has(e));return[...r,...qi(d,n)]})(i);for(const e of o)fr(e)?(d("core loadAds without lazy loading",{placementsToLoad:e}),yield gr(e)):e.length&&(d("core loadAds with lazy loading",{placementsToLoad:e}),yield br(e));const{finnBlink:r}=p.get();if((null==r?void 0:r.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield Promise.resolve().then(function(){return ba});yield e(n)}}),br=e=>Ie(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=p.get(),i=[];if(!t)return d("lazy load is not enabled",{placements:e}),void(yield gr(e));const o=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{d("lazy load is enabled - handler start",{loadedTargetIds:i,placements:e});const o=e.every(e=>i.includes(e.targetId)),r=e.map(e=>e.targetId);!o&&i.push(...r),!o&&gr(e),d("lazy load is enabled - handler stop",{loadedTargetIds:i,placements:e,arePlacementsLoaded:o,targetIds:r}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.targetId);t&&(d("lazy loading - observe element",{targetId:e.targetId,element:t}),o.observe(t))})}),xr=()=>Ie(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=p.getHandlers(),{wallpaper:n,fullscreenScroll:i}=p.get(),o=[];k(()=>{lr.onEvent("adRequested",()=>{e.adRequested()}),lr.onEvent("adAvailable",o=>Ie(void 0,void 0,void 0,function*(){var r,a,s,l,c,u;d("core adAvailable start",{placementsAvailable:cr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Ji(o),isTakeoverAd:pe(o),isCollapseAd:he(o),isWallpaperAd:ge(o)});const v=null===(s=null===(a=null===(r=null===window||void 0===window?void 0:window.apntag)||void 0===r?void 0:r.requests)||void 0===a?void 0:a.tags[o.targetId])||void 0===s?void 0:s.adResponse.ads;if(Ji(o)&&v&&(null===(l=v[1])||void 0===l?void 0:l.rtb)&&(o.banner=null===(u=null===(c=v[1])||void 0===c?void 0:c.rtb)||void 0===u?void 0:u.banner),le(o)){const{modifyFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return jn});e(o)}const{widescreenSwitching:g}=p.get();if(be(o)&&(null==g?void 0:g.enabled)){const{initWidescreenSwitching:e}=yield Promise.resolve().then(function(){return Ca});e()}if(le(o)&&!ye(o.targetId)){const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return jn});e(o,i)}if(!ce(o)||Ji(o)||ye(o.targetId)||null==t||t(o,p.get()),pe(o)&&!he(o)){const{modifyTakeoverAdContent:e,createTakeoverAd:t}=yield Promise.resolve().then(function(){return Ua});e(o.targetId),yield t(o)}if(ge(o)&&(null==n?void 0:n.enabled)){const{initWallpaperAd:e}=yield Promise.resolve().then(function(){return $});e(()=>k(()=>window.apntag.showTag(o.targetId)),n),U.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(o)&&U.setData("horseshoe",{isAvailable:!0}),it({adObj:o}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const i=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;i&&((e,t)=>{const{height:n,width:i,native:o}=e;o?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(o),e.adAvailable(o);const h=cr.find(({targetId:e})=>e===o.targetId);h&&(yield yr(h,o),cr=cr.filter(e=>e.targetId!==h.targetId)),d("core adAvailable stop",{placementsAvailable:cr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Ji(o),isTakeoverAd:pe(o),isCollapseAd:he(o),isWallpaperAd:ge(o)})})),lr.onEvent("adLoaded",n=>Ie(void 0,void 0,void 0,function*(){const{refreshConfig:i,appearanceConfig:r,wallpaper:a,adScaleConfig:d}=p.get(),s=document.getElementById(n.targetId);if(ye(n.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield Promise.resolve().then(function(){return la});e(n)}if(o.includes(n.targetId)&&ce(n)&&(null==t||t(n,p.get()),it({adObj:n})),!o.includes(n.targetId)&&Ji(n)&&o.push(n.targetId),he(n)&&F(n.targetId),pe(n)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return Ua});e(lr,n.targetId)}if((e=>Ee(e,ee))(n)){const{applyNinesixteenFormat:e}=yield Promise.resolve().then(function(){return Wa});e(n)}if((e=>Ee(e,ne))(n)){const{applyFullsquareFormat:e}=yield Promise.resolve().then(function(){return Wa});e(n)}if(ue(n)){const{applyFullwidthFormat:e}=yield Promise.resolve().then(function(){return Wa});e(n)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),o=null==i?void 0:i.parentElement;if(!o||!i)return;Li({adWrapper:o,placementContainer:i});const{delayTimeToNextRefresh:r=1e3}=t,a=(new Date).getTime();i&&"true"!==i.dataset.subscribedForRefresh&&(i.dataset.subscribedForRefresh="true",i.dataset.refresh&&Ni(i,a,r))})(n,i),(null==r?void 0:r.clearProbableDimensionsEnabled)&&(e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")})(n.targetId);if(U.getData("horseshoe").isAvailable&&(null==a?void 0:a.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return $});e(n.targetId)}if(null==d?void 0:d.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield Promise.resolve().then(function(){return yt});e(n),t(n)}e.adLoaded(n),_n(n.targetId),s&&(s.classList.add($n),(e=>{var t,n;const{pageSectionsSelectors:i}=p.get(),o=null==i?void 0:i.mainFirstColumn,r=o?null===(t=document.querySelector(o))||void 0===t?void 0:t.clientWidth:void 0;r&&e.clientWidth>r&&(null===(n=e.parentElement)||void 0===n||n.setAttribute("data-two-column-ad-layout","true"))})(s)),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:n.targetId,adFormat:ot(n)}}))})),lr.onEvent("adNoBid",t=>Ie(void 0,void 0,void 0,function*(){var n;if(F(t.targetId),null===(n=p.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:e}=yield Promise.resolve().then(function(){return pi});yield e(p.get(),t)}if(pe(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return tt});yield e(t)}e.adNoBid(t)})),lr.onEvent("adError",(t,n)=>Ie(void 0,void 0,void 0,function*(){if(pe(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return tt});yield e(n)}e.adError(t,n)})),lr.onEvent("adCollapse",()=>{e.adCollapse()}),lr.onEvent("adRequestFailure",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield ci(p.get(),t),e.adRequestFailure(t)})),lr.onEvent("adBadRequest",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield ci(p.get(),t),e.adBadRequest(t)})),lr.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),lr.onEvent("adNoBidMediated",t=>Ie(void 0,void 0,void 0,function*(){yield ci(p.get(),t),e.adNoBidMediated(t)}))})}),kr=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return[];const{clearAds:i,reloadExistingAds:o,renderFinnBlinkPlacements:r,contextSelector:a}=null!=t?t:{};if(i)return H(),[];o&&(H(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{B(e.id)})),v(null!=e?e:{}),yield vr();const{clientSidePlacements:d,serverSidePlacements:s}=ir(J(a));let l=d;return r&&(l=l.filter(e=>ye(e.targetId))),rr(s,p.get()),l.length>0&&(cr=[...cr,...l.map(e=>Object.assign({},e))],Fi(l),Ri(l),yield wr(l)),cr}),Er=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n;p.set(e),p.setHandlers(Object.assign(Object.assign({},t),e.customHandlers));const{norstat:i,kilkaya:o,rightColumnSplit:r,drEdition:a,finnBlink:s}=e;if(U.initialize(),window.addEventListener("message",ki,!1),lr=window.apntag||{anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}},window.apntag=lr,d("Apn tag is set up on window"),yield Promise.allSettled([Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();(yield je(e,t,n,"xandr-endpoint"))||lr.setEndpoint("ib.adnxs-simple.com",!0)}),Ie(void 0,void 0,void 0,function*(){if(M())return;const{prebid:e,tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get(),o=yield je(t,n,i,"prebid");(null==e?void 0:e.enabled)&&o&&(yield nn(null==e?void 0:e.prebidUrl))}),Qt(e),Ie(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=p.get();yield nn(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),Ie(void 0,void 0,void 0,function*(){const{developerOptions:{gptUrl:e}={},tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=p.get();(yield je(t,n,i,"gpt-endpoint"))&&(yield nn(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),Ie(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,brandmetricsUrl:t}={},tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=p.get(),{getConsentAsync:r}=Oe(n,0,o),a=yield r();if(e&&t&&a){if(yield nn(t),document.querySelector(`.${eo}`))return window._brandmetrics=window._brandmetrics||[],void window._brandmetrics.push({cmd:"_loadsurvey"});new MutationObserver((e,t)=>{for(const n of e){if("childList"!==n.type)return;Array.from(n.addedNodes).some(e=>{var t;return null===(t=e.outerHTML)||void 0===t?void 0:t.includes(eo)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),St(),Ie(void 0,void 0,void 0,function*(){const{gdpr:{gdprUrl:e,allowHidingAds:t=!0}={}}=p.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield nn(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null==i?void 0:i.enabled){const{loadNorstat:e}=yield Promise.resolve().then(function(){return Ga});yield e()}d("Libraries have been loaded and trackers have been set"),yield xr(),yield vr(),d("Page options have been set"),pr(e),d("Advertory is setup on window");const{clientSidePlacements:l,serverSidePlacements:c}=ir(J());if(cr=l,rr(c,e),Fi(cr),Ri(cr),yield wr(cr),d("Ads has been loaded",cr),ui(e,cr),Yi(cr),null==s?void 0:s.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return ba});yield t(null===(n=null==e?void 0:e.pageContext)||void 0===n?void 0:n.deviceType,e.finnBlink)}if(null==a?void 0:a.enabled){const{handleDrEdition:t}=yield Promise.resolve().then(function(){return pi});yield t(e)}if(null==r?void 0:r.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return id});t(e.rightColumnSplit)}if(null==o?void 0:o.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return ud});yield t(e)}}),Cr=(e,t)=>Ie(void 0,void 0,void 0,function*(){yield((e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;const{initConsentManager:o,getConsentAsync:r}=Oe(e.tcf,null===(n=e.pageContext)||void 0===n||n.isMobileApp,null===(i=e.pageContext)||void 0===i?void 0:i.countryCode),a=yield dr(e);yield di(),yield Zi(o),yield Zi(r),d("TCF resolved successfully"),yield Er(a,t),d("Run function resolved successfully")}))(e,t)}),Ir=(e,t,n,i)=>{var o;const{image:r,icon:a,sponsoredBy:d,title:s,clickUrl:l,cta:c,body:u,desc2:p,video:v,description:g,customTitle1:h,customTitle2:m,customTitle3:y,customTitle4:f,customIcon1:w,customIcon2:b,customDisplayUrl1:x}=e,k=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:k(r),imgWidth:null==r?void 0:r.width,imgHeight:null==r?void 0:r.height,imgAltText:null!=s?s:"",logo:(()=>{var e;const t=(null==p?void 0:p.includes("sponsor"))&&"dark"===(null===(e=i.appearanceConfig)||void 0===e?void 0:e.theme)&&w;return k(t?w:a)})(),sponsoredBy:null!=d?d:"",title:null!=s?s:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(o=null!=u?u:g)&&void 0!==o?o:"",desc2:null!=p?p:"",video:v,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=y?y:"",customTitle4:null!=f?f:"",logo2:k(b),previewVideoSrc:null!=x?x:""},t)},Tr=(e,t)=>{const n=(i=D,window.location.href.includes(i));var i;const o=new URLSearchParams(window.location.search).get(D),r=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?r?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},Sr=(e,t,n,i)=>{const o=document.querySelector(`#${e}`);o&&t&&(o.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:o}=t,r=i&&Object.values(wt).includes(i);n&&r&&Go(i,e,Qo,o)})(o,n),i())},Ar=(e,t,n)=>{const i=((e,t,n)=>{var i;const{displayTemplates:o,videoTemplates:r}=n,a="default";if(!e.native)return null;const{native:d,targetId:s}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),u=null!==(i=Tr(e.targetId,l))&&void 0!==i?i:c,p=Cn[t.language||g.NO],v=Ir(d,p,s,t);return(d.video?r[u]:o[u]||o.default)(v,t)})(e,t,n);Sr(e.targetId,i,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&Xo(e,t)})},Pr=e=>(t,n)=>{var i;const{targetId:o}=t,r=document.querySelector(`#${o}`);if(!r)return;const a=e.getOptions(null!=n?n:{});Ar(t,a,e.templates),null===(i=e.postProcess)||void 0===i||i.call(e,t,r)},Or=e=>{const{pageContext:{countryCode:t}}=p.get(),{keywords:n,dynamicSizeWidthCheck:i}=e,o=`${h(t)}-adformat`,r=n?n[o]:[];if(!r)return{};const a=(Array.isArray(r)?r:[r]).filter(e=>!(e in se)||window.innerWidth>=se[e]);return{[o]:i?a:r}},jr=e=>{const{pageContext:{countryCode:t}}=p.get(),n=`${h(t)}-targetid`;return e?{[n]:[e]}:{}},_r=()=>{if(!window.location.search.includes("kv_"))return{};const e={},t=(()=>{const e=new URLSearchParams(window.location.search);return Object.fromEntries(e)})();return Object.keys(t).forEach(n=>{n.startsWith("kv_")&&(e[n.slice(3)]=t[n])}),e},Lr=e=>{const{siteSpecificConfig:t}=p.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))},$r=(e,t)=>Lr(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{},Nr=e=>Lr(e)?{"aa-sch-dynamic-outstream":["true"]}:{};class qr{constructor(){this.keywords={}}add(e){return Object.assign(this.keywords,e),this}addAsync(e){return Ie(this,void 0,void 0,function*(){return Object.assign(this.keywords,yield e),this})}addIf(e,t){return e&&Object.assign(this.keywords,t),this}addIfAsync(e,t){return Ie(this,void 0,void 0,function*(){return e&&Object.assign(this.keywords,yield t()),this})}build(){return this.keywords}}const Dr=9826;class Mr{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e,isMobileApp:t}}=p.get();if(t){return{"aa-sch-supply_type":`app_${e===rt?"phone":at}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return Ie(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},e.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(e.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return Ie(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return{"aa-sch-externalid_src":Number(!!e)+Number(!!t)}})}getUserId(){return $e()}getExternalUid(){return Ie(this,void 0,void 0,function*(){return yield Le(p.get())})}isTrackingForbidden(){return Ie(this,void 0,void 0,function*(){return(null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)||"DO_NOT_TRACK"===(yield this.getExternalUid())})}getMember(){const{pageOptions:{member:e},developerOptions:{testMember:t=Dr}={}}=p.get();return"true"===N("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{pageContext:{publisher:e}}=p.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return Ie(this,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get(),{getConsentAsync:i}=Oe(e,0,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageContext:{pageType:e}}=p.get();return{"aa-sch-page_type":e}}getCountryCodeKeywords(e){return{"aa-sch-country_code":e}}getInventoryTypeKeywords(){return{"aa-sch-inventory_type":"editorial"}}getHasContextKeywords(e){const t=e["aa-sch-context_keyword"];return{"aa-sch-has_context_keyword":Array.isArray(t)&&t.length?1:0}}getPageOptionsFormatDevice(e="desktop"){return"mobile"===e?"phone":e}}const Fr=new Mr,Br=Fr.prepare.bind(Fr);function Rr(e=!1){var t,n;const i=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),o=pt();return{OS:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}const Ur=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function zr(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Ur.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Vr extends Mr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=p.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=p.get(),{OS:n,isHybridApp:i}=Rr(t);return{"no-sno-apptype":n&&e&&i?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return zr(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get(),o=null!==(t=null===(e=n.keywords["no-sno-news-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan";return{"no-sno-section-page_type":`${o.split("_").pop()||o}_${"article"===i?"article":"front"}`}}}const Hr=new class extends Vr{prepare(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a,d;const s=p.get(),l=null!==(i=null===(n=null===(t=s.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},c=null!==(a=null===(r=null===(o=s.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},u=null===(d=s.siteSpecificConfig)||void 0===d?void 0:d.publisherClassName,v=new qr;yield v.addAsync(this.getAdvertisingConsentKeywords()),yield v.addAsync(_t(p.get(),l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield v.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),v.add(this.getSupplyTypeKeywords()).add(Yt()).addIf(c.appType,this.getAppTypeKeywords()).addIf(c.device,this.getDeviceKeywords()).addIf(c.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(c.sectionPageType,this.getSectionPageTypeKeywords()).addIf(c.obituaries&&void 0!==u,void 0!==u?this.getObituariesKeywords(u):{}).addIf(c.hasContext,this.getHasContextKeywords(e.keywords)).add(e.keywords);const h=v.build(),m=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:h,user:Object.assign(Object.assign({},Xt(g.NO)),m?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Wr=Hr.prepare.bind(Hr);class Kr extends Mr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=p.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return{width:e||n||0,height:t||i||0}}(),t={width:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==i?i:0,height:null!==(r=null===(o=window.screen)||void 0===o?void 0:o.height)&&void 0!==r?r:0};var n,i,o,r;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return Ie(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{pageContext:{isMobileApp:e}}=p.get(),{appMode:t,mobileOS:n}=Rr(e);return{"se-generic-appmode":t,"se-generic-mobileos":n}}getPublisherGroup(){return{"se-generic-publishergroup":"schibsted"}}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=p.get();return{"se-generic-section-page_type":`${null!==(t=null===(e=n.keywords["se-generic-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan"}_${"article"===i?"article":"front"}`}}}const Gr=new class extends Kr{prepare(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a;const d=p.get(),s=null!==(i=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},l=null!==(a=null===(r=null===(o=d.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},c=new qr;yield c.addAsync(this.getAdvertisingConsentKeywords()),yield c.addAsync(_t(p.get(),s.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield c.addIfAsync(l.externalIdSrc,()=>this.getExternalIdSrc()),yield c.addIfAsync(l.sdkVersion,()=>Ie(void 0,void 0,void 0,function*(){return{"se-generic-sdk-version":"function"==typeof window.apntag.getAstVersion?window.apntag.getAstVersion():""}})),c.add(this.getSupplyTypeKeywords()).add(Yt()).addIf(l.appType,this.getAppTypeKeywords()).addIf(l.device,this.getDeviceKeywords()).addIf(l.screen,this.getScreenKeywords()).addIf(l.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(l.sectionPageType,this.getSectionPageTypeKeywords()).addIf(l.hasContext,this.getHasContextKeywords(e.keywords)).addIf(l.hasPlusMembership,{"se-generic-has_plus":"plus"===_e("X-AB-Site-Version")?"yes":"no"}).add(e.keywords);const u=c.build(),v=!1!==s.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:u,user:Object.assign(Object.assign({},Xt(g.SE)),v?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Jr=Gr.prepare.bind(Gr);kn('@import"https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap";.advertory-shared-ad-native-content-display-basic{width:100%;font-family:Roboto,sans-serif;color:#6d747e;text-align:left;background:#fff;position:relative;margin:0 auto;display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic *{line-height:normal}.advertory-shared-ad-native-content-display-basic .ad-info{top:0;right:8px;position:absolute}.advertory-shared-ad-native-content-display-basic .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic .ad-link{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-link:hover{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-header{padding:5px 16px;background-color:#ffcd00;font-size:12px;text-transform:uppercase;color:#495057;font-weight:600}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper{display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{position:relative;padding-bottom:40%}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{display:none}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper{position:absolute;height:100%;width:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper .ad-large-image{object-fit:cover;min-width:100%;height:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content{box-sizing:border-box;display:flex;background-color:#fffae6}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container{flex-grow:1;padding:16px}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:20px;color:#212529;font-weight:600;margin-bottom:16px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:22px}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-sponsor{font-size:11px;color:gray;font-weight:600;text-transform:uppercase}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:none;max-width:175px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:block}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover;max-width:100%}.advertory-shared-ad-native-content-display-basic.article .ad-info{top:0;right:0;position:absolute;border-bottom-left-radius:50%;background:hsla(0,0%,100%,.6)}.advertory-shared-ad-native-content-display-basic.article .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{display:block}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container{padding:8px 16px;border-left:4px solid #ffcd00}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{display:flex;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper .ad-header{padding:2px 4px;font-size:11px}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:15px;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:18px;margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:16px 8px 16px 0}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:0}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:contain}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover}}'),kn('.advertory-abo-ad-native-sponsorstripe{position:absolute;top:0;left:0;width:100%;height:1px;background:inherit;padding:0;margin:0;border:none;text-align:left}.advertory-abo-ad-native-sponsorstripe .ad-wrapper{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;max-width:980px;height:30px;padding:5px 15px;margin:auto;font-family:"Helvetica Neue",Arial,Roboto,sans-serif}.advertory-abo-ad-native-sponsorstripe .ad-logo{flex:0;height:20px;max-width:35%;max-height:inherit}.advertory-abo-ad-native-sponsorstripe .ad-title{margin-right:10px;padding-left:34px;font-size:13px;color:#fff}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper{display:grid;position:absolute;place-content:center;height:30px;min-width:30px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{display:inline-block;height:20px;width:20px;position:relative;border:solid 1px #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{content:"i";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:13px}.advertory-abo-ad-native-sponsorstripe .ad-description{font-size:13px;color:#fff;position:absolute;top:0;max-width:980px;min-height:30px;padding:15px 35px 15px 15px;margin-left:-15px;background-color:rgba(0,0,0,.9)}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper{position:absolute;top:15px;right:15px;place-content:center;height:16px;min-width:16px}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button{display:inline-block;height:16px;width:16px;position:relative;border:1px solid #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button:before{content:"✕";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:10px;font-weight:bold}.advertory-abo-ad-native-sponsorstripe .ad-description .ad-description-readmore{color:#c7ecff}.advertory-abo-ad-native-sponsorstripe .ad-description.hide{display:none}@media screen and (min-width: 768px){.advertory-abo-ad-native-sponsorstripe .ad-wrapper{height:50px}.advertory-abo-ad-native-sponsorstripe .ad-wrapper .ad-description{min-height:50px}.advertory-abo-ad-native-sponsorstripe .ad-logo{height:40px}.advertory-abo-ad-native-sponsorstripe .ad-title{font-size:20px;padding-left:40px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{height:30px;width:30px;border-width:2px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{font-size:20px}}');const Qr={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:i,img:o,adText:r})=>(Promise.resolve().then(function(){return pd}),`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${r}</span> ${n}\n </div>\n <div class="ad-title">${i}</div>\n </div>\n </div>\n </a>\n </article>`)},Xr={displayTemplates:{default:Qr.NATIVE_TEMPLATE},videoTemplates:{}},Yr={prepareTag:e=>{var t;const{keywords:n,targetId:i,invCode:o,dynamicSizeWidthCheck:r,globalPlacementId:a}=e,{pageSetup:d,pageContext:{countryCode:s}}=p.get();if(!d)return(e=>{const{keywords:t,targetId:n,invCode:i}=e,{pageSetup:{tag:{useAppTabletInvCode:o=!0}={}}={}}=p.get(),r=sr(i,o),a=Or(e),d=jr(n),s=_r(),l=Nr(i),c=$r(i);return Object.assign(Object.assign({},e),{invCode:r,keywords:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),a),d),l),s),rendererOptions:c})})(e);const{tag:{useAppTabletInvCode:l=!0}={}}=d,c=sr(o,l),u=Or(e),v=jr(i),g=(e=>{var t;const[,n]=null!==(t=e.match(/-((w|a)(?:ph|de|tb))-/))&&void 0!==t?t:[];switch(n){case"wde":return{"aa-sch-supply_type":"web_desktop"};case"wtb":return{"aa-sch-supply_type":"web_tablet"};case"wph":return{"aa-sch-supply_type":"web_phone"};case"aph":return{"aa-sch-supply_type":"app_phone"};default:return}})(c),m=_r(),y=Nr(o),f=$r(o,{safeFrameAutoInitialSize:!0}),w=r&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,b=(new qr).add(null!=n?n:{}).add(u).add(v).add(null!=g?g:{}).add(y).add(m).addIf(null===(t=null==d?void 0:d.tag)||void 0===t?void 0:t.reloadKeywords,{[`${h(s)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:w,invCode:c,keywords:b,rendererOptions:f,globalPlacementId:a||c})},preparePageOptions:e=>Ie(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t},pageSetup:n}=p.get();return n?yield t===g.SE?Jr(e):Wr(e):yield Br(e)}),siteEvents:ft,initNativeAd:(e,t)=>{var n;const{targetId:i}=e;if(!document.querySelector(`#${i}`))return;const{pageType:o=Gn.FRONT,deviceType:r}=null!==(n=null==t?void 0:t.pageContext)&&void 0!==n?n:{},{nativeTrackingConfig:a,appearanceConfig:d}=null!=t?t:{},s={language:g.NO,publisher:wt.PENT,deviceType:r,pageType:o,nativeTrackingConfig:a,appearanceConfig:d};Ar(e,s,Xr)}},Zr=((e,t)=>({init:n=>Cr(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:kr,getVideoPPIDs:tn,createInitNativeAd:Pr,getVideoAdsConfig:Ro}))(Yr,bt),ea=kn("[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-slider-time,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-slider-time{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container{padding:0 6px;height:36px}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-fullscreen,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-settings-sharing{display:none}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon{margin-right:3px;height:unset;width:unset;bottom:0}[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,[id^=integration_godt-menu]>article .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-volume,.advertory-godt-ad-weekly-menu .jw-controls>.jw-controlbar .jw-button-container .jw-icon-playback{display:flex}");var ta=Object.freeze({__proto__:null,default:ea});kn('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const na={Blink:"Blink"},ia=new Map,oa=e=>{var t;if(!ia.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(na)){const i=e[t];null!=i&&(window[n]=i)}})(e)).catch(t=>{throw ia.delete(e),t});ia.set(e,t)}return null!==(t=ia.get(e))&&void 0!==t?t:Promise.resolve()},ra="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",aa="https://www.finn.no/distribution-front/external/carousel",da=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageContext:{pageType:i}}=p.get(),o=document.querySelector(`#${e}`);if(!o)return;if(o.classList.add("disable-cogwheel"),!n)return;Go(n,o,Jo,null!=t?t:i);it({preferredTestIdData:{targetId:e,testId:"finn"}})},sa=e=>{const{pageContext:{publisher:t=""}}=p.get(),n=document.querySelector(`#${e}`);if(!n)return;const i=`-${t}`;n.classList.remove(`advertory${i}-finn-blink`),n.classList.remove(`advertory${i}-finn-blink-wrapper`)};var la=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=p.get(),{initNativeAd:n}=p.getHandlers();le(e)&&Pn(e,t),ce(e)&&(null==n||n(e,p.get()))},finnBlinkLoaded:da,xandrAdLoaded:sa});const ca={get:e=>{try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return d(`sessionStorageClient.get: Error during getting data from sessionStorage: ${e}`),null}},set:(e,t)=>{try{sessionStorage.setItem(e,JSON.stringify(t))}catch(e){d(`sessionStorageClient.set: Error during saving data to sessionStorage: ${e}`)}},remove:e=>{try{sessionStorage.removeItem(e)}catch(e){d(`sessionStorageClient.remove: Error during remove data from sessionStorage: ${e}`)}}},ua="finn_blink_id",pa=e=>Ie(void 0,void 0,void 0,function*(){const{userId:t,id:n,hashed_email:i,theme:o}=e,r=Ce(e,["userId","id","hashed_email","theme"]),a=window[na.Blink];if(!a)return;const d=new a({remote:aa,id:n,hashed_email:i,theme:o});yield d.inject(Object.assign({},r))}),va=e=>Ie(void 0,void 0,void 0,function*(){const{userId:t,theme:n}=e,i=Ce(e,["userId","theme"]),o=window[na.Blink];if(!o)return;const r=new o({remote:aa,userId:t,theme:n});yield r.inject(Object.assign({},i))}),ga=e=>{var t,n;const i=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==i?void 0:i.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},ha=(e,t)=>{const{finnBlink:{enabled:n}={}}=p.get(),i=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!i||!n)return null;const{limit:o,height:r,requireImage:a,theme:d,rec:s,distributionTypes:l,position:c,offset:u}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${ga(e)}`,enabled:i,position:null!=c?c:e,distributionTypes:null!=l?l:[],limit:null!=o?o:100,height:null!=r?r:100,offset:null!=u?u:200,requireImage:a,rec:s,theme:"dark"===d?"dark":"light",advertoryTheme:null==t?void 0:t.advertoryTheme}},ma=(e,t,n)=>Ie(void 0,void 0,void 0,function*(){var i;const{placements:o,pageContext:{deviceType:r}}=p.get();d(`rendering finn blink ad for ${e}`);const a=w(e),s=o[r].find(e=>e.targetId===a),l=ha(e,null==s?void 0:s.finnBlink);if(!(null==l?void 0:l.enabled))return d(`Finn blink is not enabled on placement: ${e}`),n&&n(e),void sa(e);if((e=>{var t;const n=ga(e),i=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==i?void 0:i.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void d(`Finn blink already loaded ${e}`);const{publisher:c,countryCode:u,finnBlink:v}=t,{sdkPayload:{userId:g,uuid:h,channel:m,theme:y}={}}=null!=v?v:{},f=null!=m?m:`${c}.${u}`,b=(e=>{if(!e){const e=$e();return null!=e?e:""}return e})(g),x="dark"===y?"dark":"light";try{const e=yield Ie(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=p.get(),t=ca.get(ua),n=N("finncode");if(!e||n)return"";if(!t){const t=yield Mt.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return ca.set(ua,n),n}return t}),t=yield Ie(void 0,void 0,void 0,function*(){const{ppid1:e}=Jt.getPPIDs();return e}),n=(null===(i=null==s?void 0:s.finnBlink)||void 0===i?void 0:i.useNewConstructor)?va:pa;yield n(Object.assign(Object.assign({},l),{channel:f,id:b,userId:t,hashed_email:e,theme:x,uuid:h})).then(()=>{da(l.selector.replace("#",""),l.advertoryTheme)})}catch(t){d(`Finn blink error ${t}`),n&&n(e),!n&&F(e),sa(e)}}),ya=()=>Ie(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=p.get();return!!(yield je(e,t,n,"finn-blink"))||(d("Skip loading finn blink ad due to missing TCF consent."),!1)}),fa=(e,t)=>{var n;(d(`Appending ${t.id} after ${e.id}`),e.parentElement&&(n=e.parentElement,!Array.from(n.children).some(e=>e.classList.contains("advertory-finn-blink-wrapper"))))?(e.parentElement.style.display="none",e.parentElement.insertAdjacentElement("afterend",t)):d(`Cannot perform afterend on: ${e.id}`)},wa=e=>document.querySelector(`#${e}`);var ba=Object.freeze({__proto__:null,handleFinnBlinkOnlyPlacements:e=>Ie(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:n}}=p.get(),i=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{requestThreshold:e,targetId:n}=t,o=wa(n);o&&(yield Ti(o,null!=e?e:i))}}),loadFinnBlinkAd:(e,t,n,i)=>Ie(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:o}}=p.get();if(d(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield ya())||o)return n&&n(e),sa(e),void(!n&&F(e));try{yield oa(ra)}catch(e){console.error(e)}yield ma(e,t,n),i&&i()}),replaceAdsWithFinnBlink:(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i;if(!t)return;const{replacementConfig:o}=t,r=null===(n=null==o?void 0:o.adsToReplace)||void 0===n?void 0:n[e],a=null===(i=null==o?void 0:o.sizes)||void 0===i?void 0:i[e];si()&&r&&a&&t.enabled?(yield ya())&&(yield oa(ra),r.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const i=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=p.get(),n=document.createElement("div"),i=document.createElement("div");return i.id=e,n.appendChild(i),Go(t,i,Jo),d(`Creating blink container for: ${e}`),n})(t);(e=>{d(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),fa(n,i),n.dataset.finnBlinkId=t,Ci().withFullAdsChain(e)})):d(`Finn blink configuration is incorrect: ${JSON.stringify(o)}`)})});const xa=1e4,ka=e=>e.some(e=>e.some(e=>!!e&&Mi(e,0)));let Ea;var Ca=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=p.get(),{enabled:t,options:{rotationInterval:n=xa,widescreenIdPrefix:i}={}}=null!=e?e:{};if(!t)return;const o=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=p.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(i);let r=0,a=Date.now(),d=ka(o);if(!o.length)return;Ea&&window.removeEventListener("scroll",Ea);const s=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},l=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block",e[0].style.opacity="1"),e[1]&&(e[1].style.display="none",e[1].style.opacity="")})})(o);const c=((e,t)=>{let n=null;return(...i)=>{null===n&&(e(...i),n=setTimeout(()=>{n=null},t))}})(()=>{d||(d=ka(o)||d,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(r),t=o.map(e=>e[r]),n=o.map(t=>t[e]);s(t,"opacity","0"),setTimeout(()=>{s(t,"display","none"),s(n,"opacity","0"),s(n,"display","block"),setTimeout(()=>{s(n,"opacity","1")},450)},450)})(),r=l(r),a=Date.now())},1e3);Ea=c,window.addEventListener("scroll",c)}});const Ia="#fff",Ta="#0098da",Sa=(e,t=!0)=>{(e===qe||e===De)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},Aa=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Pa=e=>{document.body.style.overflow=e?"initial":"hidden"},Oa=e=>{const t=_a(e),n=ja(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Pa(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},ja=e=>{const t=()=>Oa(e);return window.addEventListener("advertory:closeTakeover",t),Aa(),t},_a=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Oa(e)};return Aa(),window.addEventListener("keydown",t),t},La=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(_a(e),ja(e),Aa(),t.addEventListener("click",()=>{Oa(e)}),Pa(!1))},$a=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),ja(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},Na=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Oa(e))})(e)},qa=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=p.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),i=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&i&&(i.style.display="flex",i.innerText=Cn.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Da=e=>{const t=document.querySelectorAll(".advertory-topscroller-elements");Array.from(t).forEach(e=>e.style.display="flex");const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=Cn.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Ma=e=>{const t=document.querySelectorAll(".advertory-welcome-page-elements");Array.from(t).forEach(e=>{e.style.display="flex",e.style.animation="elementsAnimation 1.5s ease-out forwards"});const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=Cn.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Fa=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=Cn.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Ba=()=>{const e=document.querySelector(".welcome-page-wrapper, .topscroller-wrapper, .advertory-splash-wrapper");if(!e)return;let t=0;new IntersectionObserver(e=>{e.forEach(e=>{var n;if(e.isIntersecting){window.dispatchEvent(new CustomEvent("advertory:takeoverInView"));(null!==(n=Array.from(e.target.classList))&&void 0!==n?n:[]).includes("advertory-splash-wrapper")&&(()=>{const e=window.scrollY||0;document.body.dataset.scrollY=e.toString(),document.body.style.top="0",document.body.classList.add("page-locked"),document.documentElement.scrollTop=0})(),t++}else t>0&&window.dispatchEvent(new CustomEvent("advertory:takeoverNotInView"))})},{root:null,rootMargin:"0px",threshold:0}).observe(e)},Ra=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${et})()`,e+t.outerHTML})(e)),n};var Ua=Object.freeze({__proto__:null,createTakeoverAd:e=>Ie(void 0,void 0,void 0,function*(){const{takeover:t}=p.get(),{targetId:n}=e,i=document.querySelector(`#${n}`),o=document.querySelector(".advertory-takeover-wrapper");if(!i||!o||!t)return;const r=Je(e),a=o.offsetHeight,d=window.scrollY>a;o.style.display="block",!d&&Sa(r,!1),((e,t)=>{({[qe]:Ma,[Ne]:qa,[De]:Da,[Me]:Fa})[t](e)})(o,r),Ba(),((e,t)=>{({[qe]:$a,[De]:$a,[Ne]:La,[Me]:Na})[t](e)})(o,r),((e,t,n)=>{if(!n)return;({[qe]:()=>{const{buttonLabel:i}=Ye(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=i?i:"")})},[Ne]:()=>{const{themeColors:i,logotype:o,buttonLabel:r,showArrowIcon:a}=Ye(n,t);["#advertory-splash-close-label",".advertory-splash-close","#advertory-splash-logotype",".advertory-splash-navbar-wrapper"].forEach(t=>{const n=e.querySelector(`${t}`);if(n){if("#advertory-splash-close-label"===t&&(n.innerText=null!=r?r:""),".advertory-splash-close"===t&&a){const e=document.createElement("img");e.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAAfQAAAH0Bx0gPAAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAABzSURBVDiNtdPJCYBADEDRzzRmE3ZgEV6tRHHpzELiIQrBZRajA7lk4EE2RIQjgApYgdbmY8EJaADZo3sDBKAvQa4JRYZc5D6pyJiDPMuKTCkkXp8icwxJd1mRxSC1/Q94328luJroGqNrkdyrzAfHVHzOG+8CKlLk+LO+AAAAAElFTkSuQmCC"),e.setAttribute("alt","close ad"),n.appendChild(e)}if("#advertory-splash-logotype"===t&&o&&(n.setAttribute("src",o.url),n.setAttribute("alt",o.alt)),".advertory-splash-navbar-wrapper"===t&&i){const{backgroundColor:e,color:t}=i;n.style.setProperty("background-color",null!=e?e:Ia,"important"),n.style.color=null!=t?t:Ta}}})},[De]:()=>{const{buttonLabel:i,showArrowIcon:o,showCloseButton:r=!0}=Ye(n,t);["#advertory-topscroller-scroll-label","#advertory-topscroller-scroll-image",".advertory-topscroller-close"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(".advertory-topscroller-close"!==t||r||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[Me]:()=>{}})[t]()})(o,r,t),yield Qe(),!d&&Sa(r,!0),Ze(e,r)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=ln(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=ln(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,Ra(t))},modifyTakeoverIframe:(e,t)=>{var n;const i="100%",o="100%";e.resizeAd(t,[i,o]);const r=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!r)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(r),t=e.width,n=e.height;t===i&&n===o||(r.style.width=i,r.style.height=o)}}).observe(r,{attributes:!0,attributeFilter:["style"]})}});const za=(e,t)=>{t.left&&(e.style.left=t.left),t.marginLeft&&(e.style.marginLeft=t.marginLeft)},Va=(e,t)=>{var n,i;const o=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:r,fullWidthFormatClassName:a}={},fullWidth:d,pageContext:{deviceType:s}}=p.get();if(!o)return null;const l=o.parentElement;if(o.style.width=vt(s)?"100vw":"100%",o.style.position="relative",l&&(l.style.width=vt(s)?"100vw":"100%",l.style.position="relative"),r&&a){const e=`advertory-${r}-${a}`;o.classList.add(`${e}__${t}`),null==l||l.classList.add(`${e}-wrapper__${t}`)}const c=null===(i=null===(n=null==d?void 0:d.options)||void 0===n?void 0:n.styles)||void 0===i?void 0:i[s],u=(null==d?void 0:d.enabled)&&c;return!u&&l&&vt(s)&&(l.style.left="50%",l.style.marginLeft="-50vw"),u&&c.adContainer&&za(o,c.adContainer),u&&c.adContainerWrapper&&l&&za(l,c.adContainerWrapper),o},Ha=(e,t,n,i)=>{const o=Va(e,i);if(!o)return;const r=o.querySelector("iframe"),a=null==r?void 0:r.parentElement;if(!r||!a)return;const d=o.offsetWidth,s=d/e.width;a.style.transform=`scale(${s})`,a.style.transformOrigin="left top";const l=Math.round(d/t*n);o.style.height=`${l}px`};var Wa=Object.freeze({__proto__:null,applyFullsquareFormat:e=>{Ha(e,1080,1080,"fullsquare-ad")},applyFullwidthFormat:e=>{const t=Va(e,"fullwidth-ad");if(!t)return;const n=t.querySelector("iframe");if(!n)return;const{deviceType:i}=p.get().pageContext;n.style.width=vt(i)?"100vw":"100%",(null==n?void 0:n.parentElement)&&(n.parentElement.style.width=vt(i)?"100vw":"100%")},applyNinesixteenFormat:e=>{Ha(e,1080,1920,"ninesixteen-ad")}});const Ka=e=>e===g.NO?"schibsted":"schibstedse";var Ga=Object.freeze({__proto__:null,getCampaign:Ka,loadNorstat:()=>Ie(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},pageContext:{countryCode:t,isMobileApp:n},tcf:i}=p.get(),o=yield je(i,n,t,"norstat");if(!e||n||!o)return;const r=(e=>{const{ppid1:t,ppid2:n}=Gt.getPPIDs(),{ppid1:i,ppid2:o}=Jt.getPPIDs(),r=(new Kt).add(n,Bt[e]).add(t,Rt[e]).add(o,Ut[e]).add(i,zt[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{Ie(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const i=document.createElement("img");i.src=e,i.id=null!=t?t:"",n&&(i.style.display="none"),document.body.appendChild(i)})})(`https://sch-map.norstatsurveys.com/api/nids/${Ka(t)}/map/${r}`,"norstat")})});const Ja=".advertory-right-column-track",Qa="--advertory-right-column-track-height",Xa=e=>e.getBoundingClientRect().top+window.scrollY,Ya=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Za=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},ed=(e,t)=>`${e}-${t}`,td=(e,t,n)=>{var i;const o=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),r=(e=>e.map(e=>{var t;return null===(t=document.querySelector(`[id^="${e}"]`))||void 0===t?void 0:t.parentElement}).map((e,t)=>({point:e,originalIndex:t})).filter(e=>Boolean(e.point)))(n);if(0===r.length)return;const a=Xa(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Ya(e);Za("--advertory-newsroom-header-height",t)})(),r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=Xa(e),o=ed(Qa,t),r=i-n,a=ed("--advertory-right-column-split-point-height",t),d=Ya(e);Za(o,r),Za(a,d)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=ed("--advertory-right-column-ad-height",t),i=Ya(e);Za(n,i)})(o[t])});((e,t)=>{const n=Xa(e);Za(Qa,n-t)})(r[Math.min(o.length,r.length-1)].point,a)};let nd=!1;var id=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||nd)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=Ja}=e,o=document.querySelector(i);if(!o)return;nd=!0;const r=()=>{td(o,n,t)};r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),window.addEventListener("load",r),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(r)});new ResizeObserver(r).observe(o)}});class od{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class rd{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class ad{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:i}=this.parseKilkayaData(e);return{id:i,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a,d,s,l;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(o=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===o||o.call(i,u):(null===(r=this.pulse)||void 0===r?void 0:r.trackViewUIElement)?null===(d=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===d||d.call(a,u):null===(l=null===(s=this.pulse)||void 0===s?void 0:s.trackElementView)||void 0===l||l.call(s,u)})}trackContentClick(e){return Ie(this,void 0,void 0,function*(){var t,n,i,o,r,a;if(!this.pulse)return;const d=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,d):this.pulse.trackClickUIElement?null===(o=(i=this.pulse).trackClickUIElement)||void 0===o||o.call(i,d):null===(a=(r=this.pulse).trackElementClick)||void 0===a||a.call(r,d)})}}class dd extends ad{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,o,r,a;const{clientName:d,creativeId:s,itemId:l,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),p=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(o=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==o?o:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:d,creativeId:null!=s?s:l},page:{"@id":null!=p?p:c,"@type":u,url:location.origin},tags:null===(a=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getTags)||void 0===a?void 0:a.call(r,e)}}getEventTarget(e){const{link:t,itemId:n,title:i}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const sd="[data-k5a-teaser-analytics]",ld=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new dd(e,t,n),r=new WeakMap,a=e=>{const t=r.get(e);t&&(t.disconnect(),r.delete(e))},d=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,i=n.querySelector(sd);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),a(n)):((e,t)=>{if(r.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(sd);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),a(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),r.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{d.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})};class cd{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const i={[wt.VG]:new od}[n]||new rd;ld(e.instance,i,t)}injectKilkayaMeta(e){const t=document.createElement("script");t.textContent=`var k5aMeta = { consent: ${e} };`,document.head.appendChild(t)}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(!n)return;const i=n.parentElement;i&&(d(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(i))})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";B(i)}loadKilkayaScript(e){return Ie(this,void 0,void 0,function*(){yield nn(e)})}run(e){return Ie(this,void 0,void 0,function*(){var t,n;const{tcf:i,pageContext:{isMobileApp:o,countryCode:r},kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const d=yield je(i,o,r,"kilkaya");d&&(this.observeForKilkayaBackfills(),this.injectKilkayaMeta(d),yield this.loadKilkayaScript(null!==(n=null===(t=a.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(e))})}}var ud=Object.freeze({__proto__:null,Kilkaya:({placementName:e,slotTag:t,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const d=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},s=d(r,"data-pulse"),l=d(a,"data");return n.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},s,l,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("k5a-stream",{name:e,"slot-tag":t}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},runKilkaya:e=>Ie(void 0,void 0,void 0,function*(){const t=new cd;yield t.run(e)})});kn('.advertory-no-ad-native-default{width:calc(100% - 32px);min-height:250px;margin:auto;color:#dfdfdf;font-family:"Inter",sans-serif;font-weight:600;text-align:left;position:relative;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed;font-size:14px}@media screen and (min-width: 768px){.advertory-no-ad-native-default{width:580px;height:400px}}.advertory-no-ad-native-default *{box-sizing:border-box;line-height:normal;text-transform:none}.advertory-no-ad-native-default .ad-info{position:absolute;top:0;left:0;height:26px;width:26px;z-index:1000;background-color:#dfdfdf;border-bottom-right-radius:13px;transform:none;transform-origin:center}.advertory-no-ad-native-default .ad-link{display:block;text-decoration:none;color:#000;background-color:rgba(0,0,0,0);border:1px solid #dfdfdf}.advertory-no-ad-native-default .ad-content{display:block}.advertory-no-ad-native-default .ad-image-container{background-color:#dfdfdf;display:flex;position:relative;line-height:0}.advertory-no-ad-native-default .ad-image-container .ad-image{position:static;width:100%;aspect-ratio:1.91;height:auto}.advertory-no-ad-native-default .ad-text-container{background:#f5faff;overflow:auto;padding:8px}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container{padding:12px 16px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:12px;margin:0;text-transform:uppercase;display:block}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:14px;margin-right:8px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor .ad-label{font-weight:600;color:#fff;background-color:#467aae;display:inline-block;padding:4px 6px;border-radius:4px;border:none;margin-right:4px}.advertory-no-ad-native-default .ad-text-container .ad-title{margin:4px 0 0 0;line-height:normal;color:#000;font-size:18px;display:flex;flex-direction:column;justify-content:center}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-title{margin:12px 0 0 0;font-size:28px}}.advertory-vg-native-ad__front .advertory-no-ad-native-default{width:100%;height:auto}.advertory-aftenposten-native-ad-wrapper__front{justify-content:center}.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(-40px + 4rem)}@media screen and (min-width: 768px){.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(12px + .75rem)}}');var pd=Object.freeze({__proto__:null});module.exports=Zr;
|