@schibsted/advertory 3.3.2 → 3.3.3
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-BElVPIrz.js → _auto-entry_aftenposten-CVz-t03I.js} +1 -1
- package/aftenposten/es/{events-Cl__I9ZD.js → events-BmOUp5cd.js} +1 -1
- package/aftenposten/es/{index-BihLzcl2.js → index-5nddAXzN.js} +1 -1
- package/aftenposten/es/{index-DlCqITNe.js → index-C8o9P8rF.js} +1 -1
- package/aftenposten/es/{index-vJD0Jzxl.js → index-CN4B67PO.js} +1 -1
- package/aftenposten/es/{index-BHd-piPp.js → index-CNz8I6tM.js} +1 -1
- package/aftenposten/es/{index-Dv4dVil9.js → index-DLjtRLue.js} +1 -1
- package/aftenposten/es/{index-CLA8BdMc.js → index-DX0yCJ6q.js} +1 -1
- package/aftenposten/es/{index-8Ohbsz-5.js → index-Deb6SeEe.js} +1 -1
- package/aftenposten/es/{index-Dnm2Odz5.js → index-NjQha8dc.js} +1 -1
- package/aftenposten/es/index.js +1 -1
- package/aftenposten/es/{styles-BIc_VR6J.js → styles-B7ULnBc4.js} +1 -1
- package/aftenposten/es/{styles-B92WMTL8.js → styles-BBnOVvh2.js} +1 -1
- package/aftenposten/es/{styles-Bs3Cdkyg.js → styles-BKLsvzIr.js} +1 -1
- package/aftenposten/es/{styles-Bud_EAfd.js → styles-BrG8gUir.js} +1 -1
- package/aftenposten/es/{styles-B5tU0KNP.js → styles-CPqw872n.js} +1 -1
- package/aftenposten/es/{styles-BO3litIL.js → styles-CuyfVk33.js} +1 -1
- package/aftenposten/es/{styles-CqcwR04h.js → styles-D7SNbqW9.js} +1 -1
- package/aftenposten/es/{styles-2Q9M_7T6.js → styles-SH7fzjwV.js} +1 -1
- package/aftenposten/es/{styles-LyvIR044.js → styles-kV0vm_em.js} +1 -1
- package/aftenposten/es/{styles-oubDcppI.js → styles-lrOxU7Rj.js} +1 -1
- package/aftenpostenv2/es/{_auto-entry_aftenpostenv2-CaXCeP22.js → _auto-entry_aftenpostenv2-D13Zakig.js} +1 -1
- package/aftenpostenv2/es/{events-D1jHqZ-w.js → events-CzM9xmav.js} +1 -1
- package/aftenpostenv2/es/{index-CFcS3-HF.js → index-3sn2Lmdy.js} +1 -1
- package/aftenpostenv2/es/{index-DQJBTY6e.js → index-BIJTxWGW.js} +1 -1
- package/aftenpostenv2/es/{index-6Vxn3PAq.js → index-BNCg4HGL.js} +1 -1
- package/aftenpostenv2/es/{index-DMBBkYvM.js → index-BQjTdKtn.js} +1 -1
- package/aftenpostenv2/es/{index-dZq0bTLZ.js → index-Btc0reWV.js} +1 -1
- package/aftenpostenv2/es/{index-CCCoeJiV.js → index-CB8xcPYU.js} +1 -1
- package/{aftonbladetv2/es/index-DT_Gfi6q.js → aftenpostenv2/es/index-CmUzWmPf.js} +1 -1
- package/aftenpostenv2/es/{index-DYaemfes.js → index-Cr93WxGU.js} +1 -1
- package/aftenpostenv2/es/index.js +1 -1
- package/aftenpostenv2/es/{styles-CbItKrVE.js → styles-B0KbhwQ7.js} +1 -1
- package/aftenpostenv2/es/{styles-DD4X3boD.js → styles-B2oaD8rZ.js} +1 -1
- package/aftenpostenv2/es/{styles-CZohUzVN.js → styles-Beiag8Mf.js} +1 -1
- package/aftenpostenv2/es/{styles-Cd_T4_-4.js → styles-CFRA7a95.js} +1 -1
- package/aftenpostenv2/es/{styles-CK9IPSFk.js → styles-CT4175Ym.js} +1 -1
- package/aftenpostenv2/es/{styles-Czs7AVoK.js → styles-CeslltRs.js} +1 -1
- package/aftenpostenv2/es/{styles-BIKxzFeW.js → styles-CfN63NP7.js} +1 -1
- package/aftenpostenv2/es/{styles-8k-_CJAe.js → styles-D2Rt0aHf.js} +1 -1
- package/aftenpostenv2/es/{styles-BrRBBqK-.js → styles-DPqlCcOx.js} +1 -1
- package/aftenpostenv2/es/{styles-18uCzYrr.js → styles-pqGdperi.js} +1 -1
- package/aftonbladet/cjs/index.js +1 -1
- package/aftonbladet/es/{_auto-entry_aftonbladet-hwGgQ0vj.js → _auto-entry_aftonbladet-DD_wH-aA.js} +1 -1
- package/aftonbladet/es/{events-3ieb62CN.js → events-MxXQhtjO.js} +1 -1
- package/aftonbladet/es/{index-C7e30iDP.js → index-6QVckXeg.js} +1 -1
- package/aftonbladet/es/{index-CmFlh38x.js → index-C19CUIs9.js} +1 -1
- package/aftonbladet/es/{index-gcX8fpmY.js → index-CPcMMBlv.js} +1 -1
- package/aftonbladet/es/{index-D9klQrhI.js → index-Cb7PeS7Y.js} +1 -1
- package/aftonbladet/es/{index-F5esG3yW.js → index-D3F9fLzz.js} +1 -1
- package/aftonbladet/es/{index-mq5n6DBZ.js → index-DQQz9a68.js} +1 -1
- package/aftonbladet/es/{index-CBQmOV1u.js → index-nsoxtvO9.js} +1 -1
- package/aftonbladet/es/{index-THNzGtxo.js → index-suwZ12s1.js} +1 -1
- package/aftonbladet/es/index.js +1 -1
- package/aftonbladet/es/{styles-CSBciT6J.js → styles-B7d3Xppf.js} +1 -1
- package/aftonbladet/es/{styles-CbMdohoi.js → styles-BJ7ZUDeU.js} +1 -1
- package/aftonbladet/es/{styles-Duc0pS9i.js → styles-Bvo9hy5V.js} +1 -1
- package/aftonbladet/es/{styles-Cs18O9Mm.js → styles-CrIuiAMa.js} +1 -1
- package/aftonbladet/es/{styles-CLY4ATSL.js → styles-DLv_SQOs.js} +1 -1
- package/aftonbladetv2/es/{_auto-entry_aftonbladetv2-Cbw9qBbo.js → _auto-entry_aftonbladetv2--yUjS2RP.js} +1 -1
- package/aftonbladetv2/es/{events-CdJBnJeN.js → events-BhCeNxB0.js} +1 -1
- package/{aftenpostenv2/es/index-BGwCbTGO.js → aftonbladetv2/es/index-B2Qz3Nl6.js} +1 -1
- package/aftonbladetv2/es/{index-Cq2M6yzC.js → index-ChB0aY-d.js} +1 -1
- package/aftonbladetv2/es/{index-CIA0pFTh.js → index-D2daRcWM.js} +1 -1
- package/aftonbladetv2/es/{index-CtCALM28.js → index-DN8_Z4F1.js} +1 -1
- package/aftonbladetv2/es/{index-sbd9i44y.js → index-DmYHhjJQ.js} +1 -1
- package/aftonbladetv2/es/{index-BDwaYv4D.js → index-DpMCwE7v.js} +1 -1
- package/aftonbladetv2/es/{index-DdfUJwKp.js → index-aeuWvyUH.js} +1 -1
- package/aftonbladetv2/es/{index-D361Rd6a.js → index-oiDx6AWy.js} +1 -1
- package/aftonbladetv2/es/index.js +1 -1
- package/aftonbladetv2/es/{styles-CkeQ8kXN.js → styles-BPhVWZac.js} +1 -1
- package/aftonbladetv2/es/{styles-BTn8ZDMn.js → styles-CJoWZYne.js} +1 -1
- package/aftonbladetv2/es/{styles-fALAKRO3.js → styles-CpahICrL.js} +1 -1
- package/aftonbladetv2/es/{styles-0dH5vh-S.js → styles-CzhkT-OU.js} +1 -1
- package/aftonbladetv2/es/{styles-ClGjhWQ_.js → styles-DOHFIPtQ.js} +1 -1
- package/bt/cjs/index.js +1 -1
- package/bt/es/{_auto-entry_bt-Bn0X7h4H.js → _auto-entry_bt-Bk3OyHCZ.js} +1 -1
- package/bt/es/{events-B_NNmUea.js → events-B8-wE_Ik.js} +1 -1
- package/bt/es/{index-sg19Fjcn.js → index-B5f5Ccz-.js} +1 -1
- package/bt/es/{index-CBVnVW4h.js → index-BifVascS.js} +1 -1
- package/{sa/es/index-Bz5yDa5T.js → bt/es/index-CS7DhnX8.js} +1 -1
- package/bt/es/{index-Duflrdii.js → index-Csu85PVt.js} +1 -1
- package/bt/es/{index-B-6kpkgR.js → index-D9FQ31sq.js} +1 -1
- package/bt/es/{index-zf5wiZO4.js → index-Du8BA5YJ.js} +1 -1
- package/bt/es/{index-BbAM5SGK.js → index-pPlp74v_.js} +1 -1
- package/bt/es/{index-BPSirdPD.js → index-wWe13byi.js} +1 -1
- package/bt/es/index.js +1 -1
- package/bt/es/{styles-NCmD8bJY.js → styles-7GNDcRTH.js} +1 -1
- package/{sa/es/styles-DH3gJ9Ae.js → bt/es/styles-Bo3q7Vsd.js} +1 -1
- package/bt/es/{styles-D0mIOT7N.js → styles-C-tHYZ69.js} +1 -1
- package/{vg/es/styles-CrRGrByE.js → bt/es/styles-CS8JcQML.js} +1 -1
- package/bt/es/{styles-DyfgN0Mh.js → styles-D36n87pq.js} +1 -1
- package/{sa/es/styles-CY7AoGQ2.js → bt/es/styles-D5xulwvQ.js} +1 -1
- package/{vg/es/styles-C4JgTIBL.js → bt/es/styles-DAez1CwK.js} +1 -1
- package/{sa/es/styles-pUj-Qf6J.js → bt/es/styles-DL4btf9v.js} +1 -1
- package/bt/es/{styles-Bv62EkTz.js → styles-dDivbl1i.js} +1 -1
- package/btv2/es/{_auto-entry_btv2-D2Pssccc.js → _auto-entry_btv2-D20l681N.js} +1 -1
- package/btv2/es/{events-BIt_gig4.js → events-DWEEEO6z.js} +1 -1
- package/btv2/es/{index-BArDW64B.js → index--kJ3AsMg.js} +1 -1
- package/btv2/es/{index-BsGh_fsn.js → index-B39k7F9L.js} +1 -1
- package/btv2/es/{index-D3U8wZlY.js → index-B8tUzpYn.js} +1 -1
- package/btv2/es/{index-DibIVSAu.js → index-BTusSxIh.js} +1 -1
- package/btv2/es/{index-CyGTl5PX.js → index-BWOFs8pm.js} +1 -1
- package/btv2/es/{index-BPXEgms9.js → index-DHRCjJQi.js} +1 -1
- package/btv2/es/{index-XTq9kVkl.js → index-Df06ye4U.js} +1 -1
- package/btv2/es/{index-DzZlocSY.js → index-Tok2Hg3c.js} +1 -1
- package/btv2/es/index.js +1 -1
- package/btv2/es/{styles-BCMqSx_1.js → styles-Cu81jTfd.js} +1 -1
- package/{sav2/es/styles-B3S1yQjD.js → btv2/es/styles-Cw966t8W.js} +1 -1
- package/{sav2/es/styles-DeUD9s4O.js → btv2/es/styles-D1YOds-f.js} +1 -1
- package/btv2/es/{styles-BMv4IxMb.js → styles-D9eq8gBc.js} +1 -1
- package/{sav2/es/styles-DQeWVZsq.js → btv2/es/styles-WN2THadQ.js} +1 -1
- package/btv2/es/{styles-DyEO2Yhk.js → styles-k9n1Xr_e.js} +1 -1
- package/{vgv2/es/styles-B-mpn-yu.js → btv2/es/styles-n3sid6nX.js} +1 -1
- package/{vgv2/es/styles-ttzEpSY8.js → btv2/es/styles-zs2pURCn.js} +1 -1
- package/e24/es/{_auto-entry_e24-p-TjSt8C.js → _auto-entry_e24-D7k06t-c.js} +1 -1
- package/e24/es/{events-DDq8S27a.js → events-DH5WWX8q.js} +1 -1
- package/e24/es/{index-CEir3NbJ.js → index-BrJsfy7N.js} +1 -1
- package/e24/es/{index-Cb9EnP4h.js → index-Cc1tmxTB.js} +1 -1
- package/e24/es/{index-Bj4N7S9x.js → index-DEzMuR9N.js} +1 -1
- package/e24/es/{index-COzfnXQ-.js → index-D_qZaM6M.js} +1 -1
- package/e24/es/{index-z8v9R_ny.js → index-DrHpSMUz.js} +1 -1
- package/e24/es/{index-BP4Mt_Iv.js → index-VqXnS_G-.js} +1 -1
- package/e24/es/{index-CUOf8VT5.js → index-gARxvMWH.js} +1 -1
- package/e24/es/{index-C3uFYlzV.js → index-zYVPIll_.js} +1 -1
- package/e24/es/index.js +1 -1
- package/e24/es/{styles-DD2QRtBs.js → styles-BRkqQp0e.js} +1 -1
- package/e24/es/{styles-DIE8X2Y3.js → styles-BlbaoFQY.js} +1 -1
- package/e24/es/{styles-BsiUAPgh.js → styles-CDIl9dEO.js} +1 -1
- package/e24/es/{styles-IOcCBsiy.js → styles-Cq5Udrvx.js} +1 -1
- package/e24/es/{styles-Otdr-OI6.js → styles-DA3O0-Gg.js} +1 -1
- package/e24/es/{styles-DJPeTme5.js → styles-DREWHaYM.js} +1 -1
- package/{tv4/es/styles-DlcvXYiu.js → e24/es/styles-Dc-MCL8-.js} +1 -1
- package/e24/es/{styles-CXNZoriQ.js → styles-QZ2ciTUV.js} +1 -1
- package/e24/es/{styles-DEICOzW0.js → styles-abP1PR2V.js} +1 -1
- package/e24/es/{styles-DiWBeSjs.js → styles-kv5WfkpQ.js} +1 -1
- package/e24/es/{styles-CxMFscts.js → styles-pKr7cdV2.js} +1 -1
- package/fotbollskanalen/cjs/index.js +1 -1
- package/fotbollskanalen/es/{_auto-entry_fotbollskanalen-BTXk5Up9.js → _auto-entry_fotbollskanalen-BrPbfPLW.js} +1 -1
- package/fotbollskanalen/es/{events-C2GWDRMh.js → events-DtyLIzLA.js} +1 -1
- package/fotbollskanalen/es/{index-DheLxF7H.js → index-B6J5g_QN.js} +1 -1
- package/fotbollskanalen/es/{index-hdBTu4rG.js → index-B8n7HfXH.js} +1 -1
- package/fotbollskanalen/es/{index-D33Z5AMJ.js → index-BlzI_-tz.js} +1 -1
- package/fotbollskanalen/es/{index-BVKswIcw.js → index-Bu3guhwu.js} +1 -1
- package/fotbollskanalen/es/{index-D1EHQJlo.js → index-C6M2qdMu.js} +1 -1
- package/fotbollskanalen/es/{index-_YzdDfH7.js → index-LbBupMxo.js} +1 -1
- package/fotbollskanalen/es/{index-B8-Tv5lA.js → index-WfFresap.js} +1 -1
- package/fotbollskanalen/es/{index-lob9vOnJ.js → index-gR9IG4ZZ.js} +1 -1
- package/fotbollskanalen/es/index.js +1 -1
- package/fotbollskanalen/es/{styles-B9CsUT69.js → styles-C6j229k3.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-CO10jP8B.js → _auto-entry_koket-DT9AUl3h.js} +1 -1
- package/koket/es/{events-B-NLPaKx.js → events-CkYnyf5x.js} +1 -1
- package/koket/es/{index-DZUXyUr1.js → index-BdbQCitI.js} +1 -1
- package/{svdv2/es/index-BAUG2u6x.js → koket/es/index-BzHONS-K.js} +1 -1
- package/{svdv2/es/index-C3Q4E0V-.js → koket/es/index-Cm5rZRwb.js} +1 -1
- package/koket/es/{index-CGkyVqFO.js → index-CuwjKzgN.js} +1 -1
- package/koket/es/{index-B5kukTXo.js → index-DlxdBnmy.js} +1 -1
- package/koket/es/{index-D29UNyeN.js → index-DrkKZlG6.js} +1 -1
- package/koket/es/{index-CcW5OAQe.js → index-DvLP2SkW.js} +1 -1
- package/koket/es/{index-BtP7l5re.js → index-nMUdPtrf.js} +1 -1
- package/koket/es/index.js +1 -1
- package/{svdv2/es/styles-DEFhBuM8.js → koket/es/styles-iJyjn90H.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-dFl1hxHU.js → _auto-entry_sa-DZO6osrw.js} +1 -1
- package/sa/es/{events-CTj8oleY.js → events-BerRIOJZ.js} +1 -1
- package/sa/es/{index-Cs0DoMAT.js → index-3LM5-Njg.js} +1 -1
- package/sa/es/{index-CsYlqSaQ.js → index-BAh8zeDO.js} +1 -1
- package/sa/es/{index-5cRSykEr.js → index-BKfIFyir.js} +1 -1
- package/sa/es/{index-DKxdYKQu.js → index-BP1SlkGm.js} +1 -1
- package/{bt/es/index-ev6V_GGG.js → sa/es/index-CMZsoBKs.js} +1 -1
- package/sa/es/{index-BI01rUgm.js → index-D78u9XIe.js} +1 -1
- package/sa/es/{index-BP9ccjHM.js → index-DIT_0XSI.js} +1 -1
- package/sa/es/{index-DH1YJXhD.js → index-DwM9EP45.js} +1 -1
- package/sa/es/index.js +1 -1
- package/{vg/es/styles-B3SIAtmf.js → sa/es/styles-9SD7Ogfl.js} +1 -1
- package/{bt/es/styles-CMm48Tzn.js → sa/es/styles-BMUEeDcR.js} +1 -1
- package/sa/es/{styles-puxT6K1z.js → styles-BioSZGJk.js} +1 -1
- package/{bt/es/styles-CzONGI_9.js → sa/es/styles-BnCFgNTW.js} +1 -1
- package/sa/es/{styles-YjfvP5dT.js → styles-CEwDTsYm.js} +1 -1
- package/{vg/es/styles-DYucSx99.js → sa/es/styles-CY0g6dvP.js} +1 -1
- package/{bt/es/styles-CBswQAEE.js → sa/es/styles-Cab7uYvN.js} +1 -1
- package/sa/es/{styles-vc1GV8Bw.js → styles-DEMjVR-_.js} +1 -1
- package/sa/es/{styles-OH_HtkFs.js → styles-PltBaRPK.js} +1 -1
- package/sav2/es/{_auto-entry_sav2-CqaONvUb.js → _auto-entry_sav2-DTRHPYG_.js} +1 -1
- package/sav2/es/{events-DSu6ENOq.js → events-xMf1fy3T.js} +1 -1
- package/sav2/es/{index-CSQEkWyU.js → index-BBDtNQxH.js} +1 -1
- package/sav2/es/{index-Cq1bxmiu.js → index-CCuYLEau.js} +1 -1
- package/sav2/es/{index-CnWoyD5X.js → index-CaePhHuw.js} +1 -1
- package/sav2/es/{index-B0Ogxygp.js → index-DgoNgY5E.js} +1 -1
- package/sav2/es/{index-B8_zICB3.js → index-Dn0-9uMi.js} +1 -1
- package/sav2/es/{index-BscHaeMt.js → index-Dpr5ibUV.js} +1 -1
- package/sav2/es/{index-C0PQfiCt.js → index-jeoXjtXP.js} +1 -1
- package/sav2/es/{index-BCkKpphm.js → index-u3lvAFFr.js} +1 -1
- package/sav2/es/index.js +1 -1
- package/{btv2/es/styles-ClUr4JLw.js → sav2/es/styles-Be_fpGDR.js} +1 -1
- package/{btv2/es/styles-CUVCEjjO.js → sav2/es/styles-BfVm-ZPW.js} +1 -1
- package/sav2/es/{styles-BIC0zqTG.js → styles-CDktG3-6.js} +1 -1
- package/{vgv2/es/styles-BE7yT8Po.js → sav2/es/styles-CPD4FcBn.js} +1 -1
- package/sav2/es/{styles-BxS-FVJl.js → styles-Ck3gvhQ0.js} +1 -1
- package/{vgv2/es/styles-DJ4rbynz.js → sav2/es/styles-KjZQbO6N.js} +1 -1
- package/sav2/es/{styles-e1-cvbYh.js → styles-hCncNXNB.js} +1 -1
- package/sav2/es/{styles-h-0TLAN6.js → styles-oeejy-rD.js} +1 -1
- package/svd/cjs/index.js +1 -1
- package/svd/es/{_auto-entry_svd-DObty1yX.js → _auto-entry_svd-CAyHPQLR.js} +1 -1
- package/svd/es/{events-B3yfqoT1.js → events-pp5XnshB.js} +1 -1
- package/svd/es/{index-adguPOoH.js → index-4yCdda_t.js} +1 -1
- package/svd/es/{index-DQHnIfge.js → index-BneNRkNa.js} +1 -1
- package/svd/es/{index-Cyi0nNWm.js → index-BxYsPFxP.js} +1 -1
- package/svd/es/{index-BCOPGycn.js → index-CPAG4W0s.js} +1 -1
- package/svd/es/{index-x_pi8ljf.js → index-CjzqzbBO.js} +1 -1
- package/svd/es/{index-Bs2mwHSQ.js → index-D6A9QmAH.js} +1 -1
- package/{tv4/es/index-BrbRJRAM.js → svd/es/index-ZqPqiy2d.js} +1 -1
- package/svd/es/{index-Dspb2Hp1.js → index-sInMQwjj.js} +1 -1
- package/svd/es/index.js +1 -1
- package/svd/es/{styles-DZDnTH4T.js → styles-B0GtbmJ0.js} +1 -1
- package/svd/es/{styles-CVO3Bkeb.js → styles-Bs_l6EHo.js} +1 -1
- package/svd/es/{styles-yevZYJqV.js → styles-CHbyoDWE.js} +1 -1
- package/svd/es/{styles-D-CTyr-t.js → styles-CRtuw7ee.js} +1 -1
- package/svd/es/{styles-kXcjvNPz.js → styles-CWVPyAWn.js} +1 -1
- package/svd/es/{styles-MGlJLrmq.js → styles-CivZZfCT.js} +1 -1
- package/svdv2/es/{_auto-entry_svdv2-D4izmGDW.js → _auto-entry_svdv2-DY9xI_Ik.js} +1 -1
- package/svdv2/es/{events-D6AX8UVN.js → events-BBYbUkKp.js} +1 -1
- package/{koket/es/index-D9Ci3ipE.js → svdv2/es/index-BSM76eFq.js} +1 -1
- package/svdv2/es/{index-BsSt6dR_.js → index-BVi1t5kb.js} +1 -1
- package/svdv2/es/{index-YJITR7N-.js → index-Ciqi89kP.js} +1 -1
- package/{koket/es/index-4oSJX1qz.js → svdv2/es/index-Cx-kxRx7.js} +1 -1
- package/svdv2/es/{index-B8O7Unky.js → index-Dxn2DR6a.js} +1 -1
- package/svdv2/es/{index-CRgzP-EE.js → index-JxSJfQJr.js} +1 -1
- package/svdv2/es/{index-BsCWWTPa.js → index-VTcTT-eP.js} +1 -1
- package/svdv2/es/{index-BVNc8gak.js → index-u0NpqvrX.js} +1 -1
- package/svdv2/es/index.js +1 -1
- package/{koket/es/styles-BSRDrPk0.js → svdv2/es/styles-BJptu72_.js} +1 -1
- package/svdv2/es/{styles-Dpsz2P-G.js → styles-BccEgeDI.js} +1 -1
- package/svdv2/es/{styles-j3nu6dSw.js → styles-BkpDebqs.js} +1 -1
- package/svdv2/es/{styles-BYVg8D4q.js → styles-D3CpGOXt.js} +1 -1
- package/svdv2/es/{styles-rgKVh2qW.js → styles-HC9kEbFC.js} +1 -1
- package/svdv2/es/{styles-CAylM9Yv.js → styles-NPCZanRk.js} +1 -1
- package/tek/cjs/index.js +1 -1
- package/tv4/cjs/index.js +1 -1
- package/tv4/es/{_auto-entry_tv4-BEgZAGii.js → _auto-entry_tv4-C8BJZxig.js} +1 -1
- package/tv4/es/{events-NIFGWE6T.js → events-DTV-VABg.js} +1 -1
- package/tv4/es/{index-B8cFYDeZ.js → index--c4jYaCK.js} +1 -1
- package/tv4/es/{index-BXnmDiDd.js → index-BKm32ZwI.js} +1 -1
- package/tv4/es/{index-DvH_MwbP.js → index-BMfVwFMa.js} +1 -1
- package/{svd/es/index-B1TojPQw.js → tv4/es/index-BbriS2Px.js} +1 -1
- package/tv4/es/{index-DV6eEzT9.js → index-CQNGtUvY.js} +1 -1
- package/tv4/es/{index-BCbiUGm_.js → index-CUOctIcW.js} +1 -1
- package/tv4/es/{index-CZrtI7oA.js → index-Cxyi-eIW.js} +1 -1
- package/tv4/es/{index-C6TAKKPY.js → index-DrM6qtd0.js} +1 -1
- package/tv4/es/index.js +1 -1
- package/{e24/es/styles-BfdLqr3Q.js → tv4/es/styles-CyPlGjtS.js} +1 -1
- package/tvnu/cjs/index.js +1 -1
- package/types/index.d.ts +17 -1
- package/vg/cjs/index.js +1 -1
- package/vg/es/{_auto-entry_vg-BZbf6aEw.js → _auto-entry_vg-Bf6MYiaG.js} +1 -1
- package/vg/es/{events-DU355O1R.js → events-D5feN9bR.js} +1 -1
- package/vg/es/{index-C08J6wW2.js → index-CF1Qxgrd.js} +1 -1
- package/vg/es/{index-DSzUwlnR.js → index-C_1l3Aaw.js} +1 -1
- package/vg/es/{index-Da1LNWle.js → index-DAAzAkIX.js} +1 -1
- package/vg/es/{index-Coq-4L_H.js → index-DUThfp7F.js} +1 -1
- package/vg/es/{index-Dsf3lFX1.js → index-DcSO_T-J.js} +1 -1
- package/vg/es/{index-DF4htTTh.js → index-FHmWoTCF.js} +1 -1
- package/vg/es/{index-DcaAWnUU.js → index-NAwK-qkx.js} +1 -1
- package/vg/es/{index-C-lZ16HF.js → index-clSlHyyu.js} +1 -1
- package/vg/es/index.js +1 -1
- package/{sa/es/styles-DiaMdtfU.js → vg/es/styles-3mkI7btr.js} +1 -1
- package/vg/es/{styles-Cn2ubu8f.js → styles-5DHId2fe.js} +1 -1
- package/vg/es/{styles-CpsBlN_M.js → styles-BGRxMcOX.js} +1 -1
- package/vg/es/{styles-DjcvZJzy.js → styles-BHE4UEbU.js} +1 -1
- package/vg/es/{styles-D8Ublfmf.js → styles-BeghMLYj.js} +1 -1
- package/vg/es/{styles-C4rs_qXR.js → styles-C7o4Rs5b.js} +1 -1
- package/vg/es/{styles-BCFMSWP_.js → styles-Ce6OpgtR.js} +1 -1
- package/{sa/es/styles-DMccnX6Z.js → vg/es/styles-Cmm45LT0.js} +1 -1
- package/vg/es/{styles-CUV-BNGM.js → styles-DXIWViuB.js} +1 -1
- package/{bt/es/styles-DmIiuH0t.js → vg/es/styles-DkFPuiDU.js} +1 -1
- package/vg/es/{styles-BEDV_XWg.js → styles-DsU4bTPI.js} +1 -1
- package/vg/es/{styles-DBmdPdS5.js → styles-XJzVyXHC.js} +1 -1
- package/vg/es/{styles-C_cPsFFH.js → styles-ZNbSGnRu.js} +1 -1
- package/{bt/es/styles-CDAAiwqM.js → vg/es/styles-dn2knEaR.js} +1 -1
- package/vg/es/{styles-xTjRMt0f.js → styles-xu-Rv9kZ.js} +1 -1
- package/vgv2/es/{_auto-entry_vgv2-BMsLav3D.js → _auto-entry_vgv2-BQypbkBr.js} +1 -1
- package/vgv2/es/{events-Db62ENEb.js → events-DKa69DO8.js} +1 -1
- package/vgv2/es/{index-B6XQfWUf.js → index-B02vCnsw.js} +1 -1
- package/vgv2/es/{index-Bqb2og8T.js → index-BAXGJk3V.js} +1 -1
- package/vgv2/es/{index-C68Eok93.js → index-BJ00SxGy.js} +1 -1
- package/vgv2/es/{index-BdMFK2kO.js → index-BoccNdYW.js} +1 -1
- package/vgv2/es/{index-B9NwuL0F.js → index-BpgPl9X3.js} +1 -1
- package/vgv2/es/{index-CuJ6SmAw.js → index-DN_OQYJZ.js} +1 -1
- package/vgv2/es/{index-Dgno2rd6.js → index-MvQVaT0T.js} +1 -1
- package/vgv2/es/{index-DCB2Y_mZ.js → index-mkHHKnhH.js} +1 -1
- package/vgv2/es/index.js +1 -1
- package/{btv2/es/styles-BV4lOaZO.js → vgv2/es/styles-B6QweUsB.js} +1 -1
- package/{sav2/es/styles-BoyRNP0O.js → vgv2/es/styles-BwEc6tPE.js} +1 -1
- package/vgv2/es/{styles-C4-_q_fS.js → styles-C9IEHBzm.js} +1 -1
- package/vgv2/es/{styles-BkXiBYK7.js → styles-CBI6wBo3.js} +1 -1
- package/vgv2/es/{styles-3CMQPYYA.js → styles-CR-t1q8a.js} +1 -1
- package/vgv2/es/{styles-DkkUzG8W.js → styles-Cyzbeva4.js} +1 -1
- package/vgv2/es/{styles-DnVd489r.js → styles-DIViQqTS.js} +1 -1
- package/vgv2/es/{styles-CQch5Izz.js → styles-DP80oIAW.js} +1 -1
- package/vgv2/es/{styles-CxjN_ND3.js → styles-DUUJq8m5.js} +1 -1
- package/{btv2/es/styles-B472Ntu6.js → vgv2/es/styles-Du9nn9Rf.js} +1 -1
- package/vgv2/es/{styles-DAYZAxFE.js → styles-Fu2Vjk81.js} +1 -1
- package/vgv2/es/{styles-CJE4D1DL.js → styles-W1ImIWQr.js} +1 -1
- package/vgv2/es/{styles-CbQVvu6Y.js → styles-YCyJuUR1.js} +1 -1
- package/vgv2/es/{styles-CWu6yeRX.js → styles-giOJQbTW.js} +1 -1
- package/{btv2/es/styles-DFJnU5C6.js → vgv2/es/styles-o-XBlnBG.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",E=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=b[Math.floor(36*Math.random())]}return t},x=e=>{window.apntag.anq.push(e)},k=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)}),x(()=>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}-${E(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")))&&ke(e,Z)},ce=e=>{const{native:t}=e;return!!t},ue=e=>ke(e,te),pe=e=>{const{targetId:t}=e;return t.includes("takeover")||ke(e,ie)},ve=e=>ke(e,ie),ge=e=>ke(e,re),he=e=>ke(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"),Ee=e=>e.width>=1260&&e.width<=1280,xe=e=>e.width>=1600&&e.width<=1620,ke=(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:ke(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:Ee,hFormat:xe,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!xe(e)&&!Ee(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:"mobile",TABLET:"tablet",DESKTOP:"desktop"},at="web_desktop",dt="web_phone",st="wde",lt="wph",ct=()=>{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"},ut=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},pt=(e,t=window.screen.width,n,i)=>{const o=ut(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")},vt=new Map;vt.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),vt.set("panorama",{scale:.79,transformOrigin:"center center"}),vt.set("outstream",{scale:.79,transformOrigin:"center center"}),vt.set("integration",{scale:.79,transformOrigin:"center center"}),vt.set("toppanorama",{scale:.8,transformOrigin:"left center"});var gt=Object.freeze({__proto__:null,calculateScaleFactor:ut,getAspectRatio:(e,t)=>{if(e&&t)return t/e},scaleAd:pt,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=vt.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(ke(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;pt(e,(g<h?g:h)-u)}});const ht={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&((e,t)=>{pt(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=>{}},mt={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"},yt={publisherClassName:mt.PENT,fullWidthFormatClassName:"netboard"},ft=864e5,wt=(()=>{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=ft)=>{const o={data:n,expirationTime:(new Date).getTime()+i};t(e,JSON.stringify(o))},getByTimestamp:(t,n=ft)=>{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}}}})(),bt="glimrTags",Et=["glwe_","glwet_"],xt={geofenceTags:[],geoTags:[],weatherTags:[]},kt=(...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()}),Ct=()=>Ie(void 0,void 0,void 0,function*(){const{glimr:e}=p.get();if(!(yield kt())||!(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)=>{wt.setWithTimestamp(bt,{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})}),It={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"},Tt=e=>Et.some(t=>e.startsWith(t)),St=e=>e.startsWith("glgc_"),At=e=>!Tt(e)&&!St(e),Pt=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:i,pageContext:{countryCode:o}={}}=e,r=yield kt(e);if(!(null==i?void 0:i.enabled)||!r)return d("No consent for getting glimr tags."),{};const a=h(o),s=Ot(e,Boolean(n));return{[`${a}-geo`]:s.geoTags,[`${a}-weather`]:s.weatherTags,[`${a}-geofence`]:s.geofenceTags}}),Ot=(e,t)=>{const n=jt();if(!n)return xt;const i=((e=[])=>e.filter(Tt))(n),o=((e=[])=>e.filter(St))(n),r=((e=[],t,n)=>{var i;const o=e.filter(At);if(n&&t){const{publisher:e}=null!==(i=t.pageContext)&&void 0!==i?i:{},n=It[e]||e;o.push(n)}return o})(n,e,t);return{geoTags:r,geofenceTags:o,weatherTags:i}},jt=()=>{const e=wt.getByTimestamp(bt);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},_t=()=>(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),Lt=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),$t=(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)}},Nt={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()})},qt="advertory:ppids-cache",Dt={[g.SE]:`SCH${g.SE.toUpperCase()}-EnvHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-EnvHash`},Mt={[g.SE]:`SCH${g.SE.toUpperCase()}-UserHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-UserHash`},Ft={[g.SE]:`sch${g.SE}-envhash-v3`,[g.NO]:`sch${g.NO}-envhash-v3`},Bt={[g.SE]:`sch${g.SE}-userhash-v3`,[g.NO]:`sch${g.NO}-userhash-v3`},Rt={[g.SE]:`'sch${g.SE}-iosid-v3'`,[g.NO]:`'sch${g.NO}-iosid-v3'`},Ut={[g.SE]:`sch${g.SE}-androidid-v3`,[g.NO]:`sch${g.NO}-androidid-v3`},zt={[g.SE]:"sdrn:schibsted.com:user",[g.NO]:"sdrn:spid.no:user"};class Vt{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 Ht=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:""}},Wt=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=wt.get(qt),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}}:{});wt.set(qt,o)}hashPPIDs(e,t){return Ie(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield Nt.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?`${zt[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}}},Kt=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([Ht.processPPIDs(t,null==n?void 0:n.timeout),Wt.processPPIDs(t,i)])).forEach((e,t)=>{if("rejected"===e.status){d(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),Gt=e=>{const{ppid1:t,ppid2:n}=Ht.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Wt.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Vt).add(n,Dt[e]).add(t,Mt[e]).add(o,Ft[e]).add(i,Bt[e]).add(r,Rt[e]).add(a,Ut[e]).buildEids()}]}},Jt=()=>{const{ppid1:e,ppid2:t}=Ht.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},Qt=e=>{const{ppid1:t,ppid2:n}=Ht.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Wt.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Vt).add(n,Dt[e]).add(t,Mt[e]).add(o,Ft[e]).add(i,Bt[e]).add(r,Rt[e]).add(a,Ut[e]).buildRyEids()}}]}}},Xt=e=>{const{ppid1:t,ppid2:n}=Ht.getPPIDs(),{ppid1:i,ppid2:o}=Wt.getPPIDs();return(new Vt).add(n,Dt[e]).add(t,Mt[e]).add(o,Ft[e]).add(i,Bt[e]).buildRyEids()},Yt=e=>Ie(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=Ht.getPPIDs(),{ppid1:i,ppid2:o}=Wt.getPPIDs(),r=(new Vt).add(n,Dt[e]).add(t,Mt[e]).add(o,Ft[e]).add(i,Bt[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),Zt=(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)}))}),en="advertory-fullscreen-scroll",tn="advertory-fullscreen-scroll-wrapper",nn="fullscreen-scroll-in-screen",on="in-screen",rn=e=>e.includes("snoap.no"),an=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)},dn=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}),sn=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},ln=[],cn={},un=(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=>pn(e,i),{}),r=gn(e);o.observe(e),i&&(cn[r]=yn(e,null==t?void 0:t.options))},pn=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=gn(e);n?(vn(i,n),hn(e,i,t)):(vn(i,n),mn(e,i,t))})},vn=(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}`,"*")},gn=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},hn=(e,t,n)=>{e.classList.add(on),document.body.classList.add(nn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),ln.includes(t)||ln.push(t),n&&window.addEventListener("scroll",cn[t],{passive:!0})},mn=(e,t,n)=>{ln.includes(t)&&(n&&window.removeEventListener("scroll",cn[t]),document.body.classList.remove(nn),e.classList.remove(on),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},yn=(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&&fn(e,r,o,0),a.length&&fn(e,a,o,40)}},fn=(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 wn(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}wn('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 bn="left",En={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 xn=null;const kn=(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=`(${dn})()`,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(rn(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=sn(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>rn(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)),rn(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)),an(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},Cn=()=>{xn=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`)},In=()=>{xn||(xn=window.requestAnimationFrame(Cn))},Tn=(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;un(u,t),c.className=en,un(u,t),c.className="advertory-fullscreen-scroll";const v=ke(e,Y)?"absolute":"fixed";c.style.position=v,u.className=tn,u.dataset.showTagSubscribeId=s,c.setAttribute("data-ad-label",En[a].adText),(null==l?void 0:l.cogwheelPosition)===bn&&(c.dataset.moveCogwheelToTheLeft="true"),In(),window.addEventListener("resize",In),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",In),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",In)},Sn=e=>{if(!(null==e?void 0:e.classList.contains(en)))return;e.classList.remove(en),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(tn))&&(t.classList.remove(tn),t.classList.remove(on))};var An=Object.freeze({__proto__:null,createFullscreenScrollAd:Tn,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=an(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=an(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,kn(t,e))},undoFullscreenScrollContainer:Sn});const Pn=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},On=(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}]}})),Pn(e);const s=d.firstElementChild;s&&t.insertBefore(s,d),d.remove()},jn="ad-loaded",_n=()=>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=_t(),{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=_t(),u=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=_t();return{user:e,keywords:t}})();l.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:g}=u;(()=>{const e=Lt();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=Lt();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},Qt(n)),$t(g,v))),d("core add prebid config",Object.assign(Object.assign({consentManagement:a,enableSendAllBids:!1},Qt(n)),$t(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=>{Ln(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)?(Tn(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)):(Sn(u),null===(t=null==u?void 0:u.parentElement)||void 0===t||t.classList.add("advertory-direct-render")),u.classList.add(jn),(null==a?void 0:a.creativeId)&&On(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=>{Ln(e,r)},directRenderFn:()=>{}})})}),Ln=(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}),"*")},$n=(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])}},Nn=["netboard","board"];class qn{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 Nt.get(s,e);return d("Fetch operation completed successfully."),t}catch(e){d("Error during fetch operation:",e)}return null})}}let Dn=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 Mn=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 Fn{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 Mn(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),Mn(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)):Mn(a))):(d("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void Mn(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 Bn{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=n.device===rt.MOBILE?t.mobileHTML:t.desktopHTML;const 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 Rn{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 Zt(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 Un=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 zn extends Un{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 Vn=class extends Un{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 Hn={FRONT:"front"},Wn=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)))}))}),Kn={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 Yr})})}})}};class Gn{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=>{Kn[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 Wn(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===Hn.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 Jn="https://www.aftonbladet.se/video-player-extras/latest/";class Qn{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:{[`${Jn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${Jn}external-link.js`]:{name:"ExternalLink"}}};yield Wn(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 Xn=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class Yn{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({},Xn(e)?e:{}),{provider:Object.assign(Object.assign({},Xn(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 Wn(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===Hn.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let Zn=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const ei=(e,t,n)=>{var i;const{publisher:o,pageType:r,country:a}=e,d={[mt.VG]:new Dn,[mt.E24]:new Gn,[mt.AFTONBLADET]:new Qn,[mt.SVD]:new Yn}[o]||new Zn,s=new(a===g.SE?zn:Vn)(n,d,r),l=new qn(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),c=new Bn(d,s),u=new Rn(d);return new Fn(l,c,u,s)},ti=()=>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 ni{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 ii=(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=ei(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))},oi=()=>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)}}),ri=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},ai=[],di=(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=Nn.some(e=>l.startsWith(e)),p=ai.includes(l),v=(null===(i=null==c?void 0:c.drEdition)||void 0===i?void 0:i.editionName)||d;return c&&u&&!p&&v?(ai.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 ti(),g=new ni(v),h=ei({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)}),si=(e,t)=>{var n,i,o;if(!ri())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 di(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 li=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:ei,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 ti(),i=new ni(n);ii({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:di,handleDrEditionBackfillOnAdblock:si});const ci="collapseAd",ui="hideAd",pi="resizeAd",vi="renderDrEditionFallback",gi="wallpaperImageUrl",hi="wallpaperColor",mi="velvet",yi=[pi,gi,hi,ci,ui,vi,mi];let fi;const wi=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:gi,wallpaperImageUrl:t}}if(j(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:hi,wallpaperColor:t}}if(e.startsWith(vi)){const t=e.split(":")[1];return{name:vi,targetId:t}}if(e.startsWith(ci)||e.startsWith(ui)){const t=e.split(":")[1];return{name:ci,targetId:t}}if(e.includes("name")&&yi.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!yi.some(e=>n.name===e))return;const{name:i,targetId:o,wallpaperImageUrl:r,wallpaperColor:a,cmd:d,size:s}=n;i===mi&&d&&(d.includes("noScroll")&&(fi=(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==fi||fi(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==ci&&i!==ui||!o||F(o),i===pi&&o&&d&&$n(o,d),i===vi&&o&&(F(o),di(p.get(),{targetId:o})),"resizeMediationAd"===i&&o&&s&&$n(o,s,!0),i===gi&&r&&_(r),i===hi&&a&&L(a)},bi=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Ei=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=p.get(),i=window.apntag,o={publisher:e,countryCode:t,finnBlink:n},r=e=>{B(e),x(()=>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 ya});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 ya});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)}))})}},xi=(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 Ei().withFinnBlinkAd(t)):ye(t)?(d(`loading finn blink ad with full ads chain for ${t}`),void Ei().withFullAdsChain(t)):void x(()=>(d("core showTag",{id:t}),e.showTag(t)))},ki=(e,t)=>Ie(void 0,void 0,void 0,function*(){yield k,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,xi,e),bi(t));n.observe(e)}),Ci=new Map,Ii=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Ti=".brandstudio-premium-content-widget",Si=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Ai=({adWrapper:e,placementContainer:t})=>{const n=Si({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),V(i=t),i.innerHTML=""},Pi=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Oi=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=p.get(),i=Ii.includes(n)&&Boolean(t.closest(Ti));const o=i?t.closest(Ti):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 Pi(e),void r.disconnect();const d=t.closest('[style*="height"]'),s=o;d&&s.contains(d)?Pi(d):s.hasAttribute("style")&&Pi(s),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},ji=(e,t,n,i,o,r)=>{var a;const d=performance.now(),s=null!==(a=Ci.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,o)&&n<0;d-s>=o&&l&&(Ci.set(t,d),((e,t,n)=>{const{pageContext:{countryCode:i}}=p.get(),o=null==n?void 0:n.parentElement;o&&n&&Ai({adWrapper:o,placementContainer:n}),x(()=>{e.setKeywords([t],{[`${h(i)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},_i=(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,ji,t,n),bi(300));i.observe(e)},Li=(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},$i=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),Ni=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},qi=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=p.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),Ri(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},Di=(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;Ni(o,r)&&i&&(z(i.targetId),n.length&&o.classList.remove(...n),Ri([i],t))}},Mi=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:i}}=p.get();t&&(e.forEach(({targetId:e})=>{const t=Fi(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&Di(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),Di(e,!1,t))};n.persisted&&($i()?window.addEventListener("scroll",i,{passive:!0}):Di(e,!1,t))})})(e,n))},Fi=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},Bi=e=>{const{targetId:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(Fi(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},Ri=(e,t=!1)=>{const{queryConfig:{batchSize:n=c}={}}=p.get(),i=e.map(({targetId:e})=>e),o=Li(i,n);if(t)for(const t of e){const e=Bi(t);window.apntag.modifyTag(t.targetId,e)}for(const e of o)x(()=>window.apntag.refresh(e))},Ui=e=>`externalImpId:'${e}'`,zi=(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,Vi=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}=(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),h=Object.assign({invCode:l,sizes:r,targetId:o,keywords:zi(a,c),allowedFormats:s,dynamicSizeWidthCheck:g},v&&{safeframeConfig:v}),m=(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&&m&&(d("External Impression ID assigned to defineTag:",Ui(m)),h.externalImpId=Ui(m));const y=(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"))&&(h.native=y),h},Hi=e=>!e.includes("takeover")||He(),Wi=e=>{const{source:t}=e;return"csm"===t},Ki=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]})},Gi=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"]})},Ji=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"})})()},Qi=(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)})})});wn(".advertory-brandmetrics-survey{width:100%}");const Xi="advertory-brandmetrics-survey",Yi="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",Zi=()=>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}),eo={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"}},to={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},no=e=>(null==e?void 0:e.parent)?[...no(e.parent),e.shortPath||"unknown"]:[],io=(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]=no(e);return to[n]||"ovrigaavdelningar"})(e)}_{position}`,oo={aftonbladet:eo},ro={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:io(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:no(e).join(":")}}},ao=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},so=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),lo="se-generic",co="aa-sch",uo="kv_",po="pause",vo="{deviceType}",go="{position}",ho="afp_",mo=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),yo="1-1",fo="16-9",wo="3-4",bo="9-16",Eo="responsive",xo={[yo]:1,[fo]:1.78,[bo]:.56,[Eo]:1},ko={[yo]:1,[fo]:1.78,[wo]:1.33,[bo]:.56},Co=(e,t,n,i)=>{const{invCode:o="",videoOverlayInvCode:r}=null!=e?e:{},a=rt.DESKTOP===n?st:lt,d=o.replace(vo,a);return(e,n)=>{if(e===po)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(go,po).replace(/-([a-z]+)_/,"-article-"))(d);if(n&&mo.has(e)){return(i&&r?r:t.frontpageInvCodeTemplate).replace(vo,a).replace(go,e)}return d.replace(go,e)}},Io=(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])},To=()=>{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},So=()=>{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},Ao=()=>{const e=null!==(t=So()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=So()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},Po=()=>Object.fromEntries(new URLSearchParams(window.location.search)),Oo=(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 Zi(),c=yield Yt(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)=>Io(ko,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?Io(xo,Number(m.toFixed(2))):Eo;var m,y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${co}-country_code`]:o,[`${co}-publisher`]:i,[`${co}-supply_type`]:(y=e.deviceType,y===rt.DESKTOP?at:dt),[`kw_${co}-page_type`]:"collection",[`${co}-page_type`]:"collection",[`${lo}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${lo}-page`]:"index",[`${lo}-page`]:"index",[`${lo}-screenheight`]:String(window.screen.height),[`${lo}-screenwidth`]:String(window.screen.width),[`${lo}-viewportheight`]:String(a),[`${lo}-viewportwidth`]:String(r),[`${lo}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${lo}-mobile-os`]:ct(),[`${lo}-audience`]:void 0,[`${lo}-externalid_src`]:Ao(),[`${lo}-tags`]:e.tags,[`${lo}-articleid`]:p,"article-id":p},yield Pt(Object.assign(Object.assign({},t),{pageContext:d}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${lo}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(Po()).some(e=>e.includes(uo))&&(()=>{const e=Po(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(uo)).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})}),jo=["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"],_o=["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"],Lo=["external_uid","gdpr","gdpr_consent","eids","article-id"],$o=(e,t)=>{const n=[...jo,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||Lo.includes(e)?e:`kw_${e}`,t]))},No=e=>Object.fromEntries(Object.entries(e).filter(([e])=>_o.includes(e))),qo=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i,o,r;const a=(e=>{var t;oo[e]||s(`[video] No config found for publisher "${e}"`);return null!==(t=oo[e])&&void 0!==t?t:eo})(e.publisher),d=(e=>{var t;return null!==(t=ro[e])&&void 0!==t?t:ro.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 Oo({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:To(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:v,playbackMethod:ao(e.startMode)}}),Do=(e,t)=>{const{siteConfig:n,siteVideoParams:i,isUserPresentOnFrontPage:o,adsKeywords:r,prerollPlacementFormat:a,playbackMethod:d}=e,{invCode:s}=i||{},l=Co(i,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(ho)?`${ho}${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":so.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({},$o(r,n)),No(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")})}}}},Mo=e=>t=>Ie(void 0,void 0,void 0,function*(){const n=yield qo(e,t);return Do(n,e)}),Fo={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]}]},Bo={no:"NOK",se:"SEK"},Ro={no:"no",se:"sv"};class Uo{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 Zi(),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(Fo),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:E(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||Ro[o]||"no").split("-")[0]},regs:{ext:{gdpr:s.gdpr||0}},user:{id:yield Le(i),ext:{consent:s.gdpr_consent||"",eids:Xt(o)}},at:1,cur:[Bo[o]],source:{tid:E(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:",Yi);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?`${Yi}?${a.toString()}`:Yi,l=yield this.buildFetchObject(e,t,n,i),c=yield Nt.post(s,o,l);return d("Fetch operation completed successfully.",c),c}catch(e){d("Error during fetch operation:",e)}return null})}}const zo=0,Vo=3,Ho=(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},Wo="finn-blink",Ko="native-ad",Go=(e,t)=>{Jo(e,t),Xo(e,t)},Jo=(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:[])Zo(i)}),t.dataset.tracked="true")})},Qo=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(Yo):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},Xo=(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:rt.DESKTOP])&&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,Qo(e),c.disconnect();break}},s);c.observe(o)},Yo=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Zo(e):window.navigator.sendBeacon(e)},Zo=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},er=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:[]}),tr=(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())},bi(s)).observe(l)});const{prepareTag:c}=p.getHandlers(),u=U.getData("alertoryConfigKeywords"),v=null!==(i=c(Vi(e)).keywords)&&void 0!==i?i:{},g=new Uo,h=yield g.fetchData(e,u,v,t);h&&(((e,t,n)=>{const i=n===rt.MOBILE?t.mobileHTML:t.desktopHTML;if(i){if(t.adType===zo){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===Vo&&(Ho(t.pageContext.publisher,l,Ko,t.pageContext.pageType),Go({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)),On(e,n,Number(null==i?void 0:i.adid)),null==d||d.remove()})(e.targetId,e.invCode,l,h.bid))}),nr=(e,t)=>{e.forEach(e=>tr(e,t).catch(e=>{d("Failed to handle server-side ad:",e)}))},ir={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},or=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 Nt.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,ir))(e,t):e}catch(t){return d("Error fetching S3 config, using site config",{error:t}),e}}),rr=(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 ar,dr=[];const sr=["takeover","wallpaper"],lr=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.2",siteConfig:e,alertoryConfig:t}},cr=()=>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=Gi(e);U.setData("alertoryConfigKeywords",n)})(o.keywords),x(()=>ar.setPageOpts(o))}),ur=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);pr(a);(null==t?void 0:t.enabled)&&r&&!M()?(d("core loadPlacements prebid enabled"),yield _n()):(d("core load tags invoked without prebid enabled"),vr(a))}),pr=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=Vi(e);if(Hi(e.targetId)){const o=t(i),r=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Ki(i),sizes:o}})(o);n.push(r),x(()=>(d("core defineTag - add to the queue",{placement:e,preparedTag:o}),ar.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)},vr=e=>{const t=e.filter(({targetId:e})=>Hi(e)).map(({targetId:e})=>e);t.length&&x(()=>(d("core loadTags",{placementsIdsToLoad:t}),ar.loadTags([...t])))},gr=(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 ki(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())}),hr=e=>e.some(({targetId:e})=>sr.some(t=>e.includes(t))),mr=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,...Li(d,n)]})(i);for(const e of o)hr(e)?(d("core loadAds without lazy loading",{placementsToLoad:e}),yield ur(e)):e.length&&(d("core loadAds with lazy loading",{placementsToLoad:e}),yield yr(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 ya});yield e(n)}}),yr=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 ur(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&&ur(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))})}),fr=()=>Ie(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=p.getHandlers(),{wallpaper:n,fullscreenScroll:i}=p.get(),o=[];x(()=>{ar.onEvent("adRequested",()=>{e.adRequested()}),ar.onEvent("adAvailable",o=>Ie(void 0,void 0,void 0,function*(){var r,a,s,l,c,u;d("core adAvailable start",{placementsAvailable:dr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Wi(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(Wi(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 An});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 Ea});e()}if(le(o)&&!ye(o.targetId)){const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return An});e(o,i)}if(!ce(o)||Wi(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 Fa});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(()=>x(()=>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=dr.find(({targetId:e})=>e===o.targetId);h&&(yield gr(h,o),dr=dr.filter(e=>e.targetId!==h.targetId)),d("core adAvailable stop",{placementsAvailable:dr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Wi(o),isTakeoverAd:pe(o),isCollapseAd:he(o),isWallpaperAd:ge(o)})})),ar.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 aa});e(n)}if(o.includes(n.targetId)&&ce(n)&&(null==t||t(n,p.get()),it({adObj:n})),!o.includes(n.targetId)&&Wi(n)&&o.push(n.targetId),he(n)&&F(n.targetId),pe(n)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return Fa});e(ar,n.targetId)}if(ue(n)){const{prepareContainerForFullWidthFormat:e}=yield Promise.resolve().then(function(){return Ua});e(n)}if((e=>ke(e,ee))(n)){const{applyNinesixteenFormat:e}=yield Promise.resolve().then(function(){return Ua});e(n)}if((e=>ke(e,ne))(n)){const{applyFullsquareFormat:e}=yield Promise.resolve().then(function(){return Ua});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;Oi({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&&_i(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 gt});e(n),t(n)}e.adLoaded(n),Pn(n.targetId),s&&(s.classList.add(jn),(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)}}))})),ar.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 li});yield e(p.get(),t)}if(pe(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return tt});yield e(t)}e.adNoBid(t)})),ar.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)})),ar.onEvent("adCollapse",()=>{e.adCollapse()}),ar.onEvent("adRequestFailure",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield di(p.get(),t),e.adRequestFailure(t)})),ar.onEvent("adBadRequest",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield di(p.get(),t),e.adBadRequest(t)})),ar.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),ar.onEvent("adNoBidMediated",t=>Ie(void 0,void 0,void 0,function*(){yield di(p.get(),t),e.adNoBidMediated(t)}))})}),wr=(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 cr();const{clientSidePlacements:d,serverSidePlacements:s}=er(J(a));let l=d;return r&&(l=l.filter(e=>ye(e.targetId))),nr(s,p.get()),l.length>0&&(dr=[...dr,...l.map(e=>Object.assign({},e))],qi(l),Mi(l),yield mr(l)),dr}),br=(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",wi,!1),ar=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=ar,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"))||ar.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 Zt(null==e?void 0:e.prebidUrl))}),Kt(e),Ie(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=p.get();yield Zt(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 Zt(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 Zt(t),document.querySelector(`.${Xi}`))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(Xi)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),Ct(),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 Zt(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 Va});yield e()}d("Libraries have been loaded and trackers have been set"),yield fr(),yield cr(),d("Page options have been set"),lr(e),d("Advertory is setup on window");const{clientSidePlacements:l,serverSidePlacements:c}=er(J());if(dr=l,nr(c,e),qi(dr),Mi(dr),yield mr(dr),d("Ads has been loaded",dr),si(e,dr),Ji(dr),null==s?void 0:s.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return ya});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 li});yield t(e)}if(null==r?void 0:r.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return Za});t(e.rightColumnSplit)}if(null==o?void 0:o.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return dd});yield t(e)}}),Er=(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 or(e);yield oi(),yield Qi(o),yield Qi(r),d("TCF resolved successfully"),yield br(a,t),d("Run function resolved successfully")}))(e,t)}),xr=(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:E}=e,x=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:x(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 x(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:x(b),previewVideoSrc:null!=E?E:""},t)},kr=(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},Cr=(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(mt).includes(i);n&&r&&Ho(i,e,Ko,o)})(o,n),i())},Ir=(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=kr(e.targetId,l))&&void 0!==i?i:c,p=En[t.language||g.NO],v=xr(d,p,s,t);return(d.video?r[u]:o[u]||o.default)(v,t)})(e,t,n);Cr(e.targetId,i,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&Go(e,t)})},Tr=e=>(t,n)=>{var i;const{targetId:o}=t,r=document.querySelector(`#${o}`);if(!r)return;const a=e.getOptions(null!=n?n:{});Ir(t,a,e.templates),null===(i=e.postProcess)||void 0===i||i.call(e,t,r)},Sr=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}},Ar=e=>{const{pageContext:{countryCode:t}}=p.get(),n=`${h(t)}-targetid`;return e?{[n]:[e]}:{}},Pr=()=>{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},Or=e=>{const{siteSpecificConfig:t}=p.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))},jr=(e,t)=>Or(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{},_r=e=>Or(e)?{"aa-sch-dynamic-outstream":["true"]}:{};class Lr{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 $r=9826;class Nr{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e=rt.DESKTOP,isMobileApp:t}}=p.get();if(t){return{"aa-sch-supply_type":`app_${e===rt.MOBILE?"phone":rt.TABLET}`}}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=$r}={}}=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 qr=new Nr,Dr=qr.prepare.bind(qr);function Mr(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=ct();return{OS:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}const Fr=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function Br(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Fr.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Rr extends Nr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=rt.DESKTOP}}=p.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=p.get(),{OS:n,isHybridApp:i}=Mr(t);return{"no-sno-apptype":n&&e&&i?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return Br(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 Ur=new class extends Rr{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 Lr;yield v.addAsync(this.getAdvertisingConsentKeywords()),yield v.addAsync(Pt(p.get(),l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield v.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),v.add(this.getSupplyTypeKeywords()).add(Jt()).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({},Gt(g.NO)),m?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},zr=Ur.prepare.bind(Ur);class Vr extends Nr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=rt.DESKTOP}}=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}=Mr(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 Hr=new class extends Vr{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 Lr;yield c.addAsync(this.getAdvertisingConsentKeywords()),yield c.addAsync(Pt(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(Jt()).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({},Gt(g.SE)),v?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Wr=Hr.prepare.bind(Hr);wn('@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}}'),wn('.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 Kr={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:i,img:o,adText:r})=>(Promise.resolve().then(function(){return sd}),`<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>`)},Gr={displayTemplates:{default:Kr.NATIVE_TEMPLATE},videoTemplates:{}},Jr={prepareTag:e=>{var t;const{keywords:n,targetId:i,invCode:o,dynamicSizeWidthCheck:r}=e,{pageSetup:a,pageContext:{countryCode:d}}=p.get();if(!a)return(e=>{const{keywords:t,targetId:n,invCode:i}=e,{pageSetup:{tag:{useAppTabletInvCode:o=!0}={}}={}}=p.get(),r=rr(i,o),a=Sr(e),d=Ar(n),s=Pr(),l=_r(i),c=jr(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:s=!0}={}}=a,l=rr(o,s),c=Sr(e),u=Ar(i),v=(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}})(l),g=Pr(),m=_r(o),y=jr(o,{safeFrameAutoInitialSize:!0}),f=r&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,w=(new Lr).add(null!=n?n:{}).add(c).add(u).add(null!=v?v:{}).add(m).add(g).addIf(null===(t=null==a?void 0:a.tag)||void 0===t?void 0:t.reloadKeywords,{[`${h(d)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:f,invCode:l,keywords:w,rendererOptions:y,globalPlacementId:l})},preparePageOptions:e=>Ie(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t},pageSetup:n}=p.get();return n?yield t===g.SE?Wr(e):zr(e):yield Dr(e)}),siteEvents:ht,initNativeAd:(e,t)=>{var n;const{targetId:i}=e;if(!document.querySelector(`#${i}`))return;const{pageType:o=Hn.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:mt.PENT,deviceType:r,pageType:o,nativeTrackingConfig:a,appearanceConfig:d};Ir(e,s,Gr)}},Qr=((e,t)=>({init:n=>Er(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:wr,getVideoPPIDs:Yt,createInitNativeAd:Tr,getVideoAdsConfig:Mo}))(Jr,yt),Xr=wn("[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 Yr=Object.freeze({__proto__:null,default:Xr});wn('.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 Zr={Blink:"Blink"},ea=new Map,ta=e=>{var t;if(!ea.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(Zr)){const i=e[t];null!=i&&(window[n]=i)}})(e)).catch(t=>{throw ea.delete(e),t});ea.set(e,t)}return null!==(t=ea.get(e))&&void 0!==t?t:Promise.resolve()},na="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",ia="https://www.finn.no/distribution-front/external/carousel",oa=(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;Ho(n,o,Wo,null!=t?t:i);it({preferredTestIdData:{targetId:e,testId:"finn"}})},ra=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 aa=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=p.get(),{initNativeAd:n}=p.getHandlers();le(e)&&Tn(e,t),ce(e)&&(null==n||n(e,p.get()))},finnBlinkLoaded:oa,xandrAdLoaded:ra});const da={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}`)}}},sa="finn_blink_id",la=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[Zr.Blink];if(!a)return;const d=new a({remote:ia,id:n,hashed_email:i,theme:o});yield d.inject(Object.assign({},r))}),ca=e=>Ie(void 0,void 0,void 0,function*(){const{userId:t,theme:n}=e,i=Ce(e,["userId","theme"]),o=window[Zr.Blink];if(!o)return;const r=new o({remote:ia,userId:t,theme:n});yield r.inject(Object.assign({},i))}),ua=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},pa=(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:`#${ua(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}},va=(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=pa(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 ra(e);if((e=>{var t;const n=ua(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),E="dark"===y?"dark":"light";try{const e=yield Ie(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=p.get(),t=da.get(sa),n=N("finncode");if(!e||n)return"";if(!t){const t=yield Nt.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return da.set(sa,n),n}return t}),t=yield Ie(void 0,void 0,void 0,function*(){const{ppid1:e}=Wt.getPPIDs();return e}),n=(null===(i=null==s?void 0:s.finnBlink)||void 0===i?void 0:i.useNewConstructor)?ca:la;yield n(Object.assign(Object.assign({},l),{channel:f,id:b,userId:t,hashed_email:e,theme:E,uuid:h})).then(()=>{oa(l.selector.replace("#",""),l.advertoryTheme)})}catch(t){d(`Finn blink error ${t}`),n&&n(e),!n&&F(e),ra(e)}}),ga=()=>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)}),ha=(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}`)},ma=e=>document.querySelector(`#${e}`);var ya=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=ma(n);o&&(yield ki(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 ga())||o)return n&&n(e),ra(e),void(!n&&F(e));try{yield ta(na)}catch(e){console.error(e)}yield va(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];ri()&&r&&a&&t.enabled?(yield ga())&&(yield ta(na),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),Ho(t,i,Wo),d(`Creating blink container for: ${e}`),n})(t);(e=>{d(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),ha(n,i),n.dataset.finnBlinkId=t,Ei().withFullAdsChain(e)})):d(`Finn blink configuration is incorrect: ${JSON.stringify(o)}`)})});const fa=1e4,wa=e=>e.some(e=>e.some(e=>!!e&&Ni(e,0)));let ba;var Ea=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=p.get(),{enabled:t,options:{rotationInterval:n=fa,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=wa(o);if(!o.length)return;ba&&window.removeEventListener("scroll",ba);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=wa(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);ba=c,window.addEventListener("scroll",c)}});const xa="#fff",ka="#0098da",Ca=(e,t=!0)=>{(e===qe||e===De)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},Ia=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Ta=e=>{document.body.style.overflow=e?"initial":"hidden"},Sa=e=>{const t=Pa(e),n=Aa(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Ta(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},Aa=e=>{const t=()=>Sa(e);return window.addEventListener("advertory:closeTakeover",t),Ia(),t},Pa=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Sa(e)};return Ia(),window.addEventListener("keydown",t),t},Oa=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(Pa(e),Aa(e),Ia(),t.addEventListener("click",()=>{Sa(e)}),Ta(!1))},ja=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),Aa(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},_a=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Sa(e))})(e)},La=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=En.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},$a=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=En.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Na=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=En.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},qa=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=En.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Da=()=>{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)},Ma=(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 Fa=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&&Ca(r,!1),((e,t)=>{({[qe]:Na,[Ne]:La,[De]:$a,[Me]:qa})[t](e)})(o,r),Da(),((e,t)=>{({[qe]:ja,[De]:ja,[Ne]:Oa,[Me]:_a})[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:xa,"important"),n.style.color=null!=t?t:ka}}})},[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&&Ca(r,!0),Ze(e,r)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=an(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=an(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,Ma(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 Ba=(e,t)=>{t.left&&(e.style.left=t.left),t.marginLeft&&(e.style.marginLeft=t.marginLeft)},Ra=(e,t,n,i)=>{var o,r;const a=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:d,fullWidthFormatClassName:s}={},fullWidth:l,pageContext:{deviceType:c}}=p.get();if(!a)return;const u=a.parentElement,v=a.querySelector("iframe"),g=null==v?void 0:v.parentElement;if(!v||!g)return;if(a.style.width="100vw",a.style.position="relative",u&&(u.style.width="100vw",u.style.position="relative"),!d||!s)return;const h=`advertory-${d}-${s}`;a.classList.add(`${h}__${i}`),null==u||u.classList.add(`${h}-wrapper__${i}`);const m=null===(r=null===(o=null==l?void 0:l.options)||void 0===o?void 0:o.styles)||void 0===r?void 0:r[c],y=(null==l?void 0:l.enabled)&&m;!y&&u&&(u.style.left="50%",u.style.marginLeft="-50vw"),y&&m.adContainer&&Ba(a,m.adContainer),y&&m.adContainerWrapper&&u&&Ba(u,m.adContainerWrapper);const f=a.offsetWidth,w=f/e.width;g.style.transform=`scale(${w})`,g.style.transformOrigin="left top";const b=Math.round(f/t*n);a.style.height=`${b}px`};var Ua=Object.freeze({__proto__:null,applyFullsquareFormat:e=>{Ra(e,1080,1080,"fullsquare-ad")},applyNinesixteenFormat:e=>{Ra(e,1080,1920,"ninesixteen-ad")},prepareContainerForFullWidthFormat:e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:i}={}}=p.get();if(!t||!n||!i)return;const o=t.parentElement;o&&(t.classList.add(`advertory-${n}-${i}__full-width-ad`),o.classList.add(`advertory-${n}-${i}-wrapper__full-width-ad`))}});const za=e=>e===g.NO?"schibsted":"schibstedse";var Va=Object.freeze({__proto__:null,getCampaign:za,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}=Ht.getPPIDs(),{ppid1:i,ppid2:o}=Wt.getPPIDs(),r=(new Vt).add(n,Dt[e]).add(t,Mt[e]).add(o,Ft[e]).add(i,Bt[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/${za(t)}/map/${r}`,"norstat")})});const Ha=".advertory-right-column-track",Wa="--advertory-right-column-track-height",Ka=e=>e.getBoundingClientRect().top+window.scrollY,Ga=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Ja=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},Qa=(e,t)=>`${e}-${t}`,Xa=(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=Ka(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Ga(e);Ja("--advertory-newsroom-header-height",t)})(),r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=Ka(e),o=Qa(Wa,t),r=i-n,a=Qa("--advertory-right-column-split-point-height",t),d=Ga(e);Ja(o,r),Ja(a,d)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=Qa("--advertory-right-column-ad-height",t),i=Ga(e);Ja(n,i)})(o[t])});((e,t)=>{const n=Ka(e);Ja(Wa,n-t)})(r[Math.min(o.length,r.length-1)].point,a)};let Ya=!1;var Za=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||Ya)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=Ha}=e,o=document.querySelector(i);if(!o)return;Ya=!0;const r=()=>{Xa(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 ed{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 td{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class nd{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 id extends nd{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 od="[data-k5a-teaser-analytics]",rd=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new id(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(od);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(od);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 ad{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const i={[mt.VG]:new ed}[n]||new td;rd(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 Zt(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 dd=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 ad;yield t.run(e)})});wn('.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 sd=Object.freeze({__proto__:null});module.exports=Qr;
|
|
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",E=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=b[Math.floor(36*Math.random())]}return t},x=e=>{window.apntag.anq.push(e)},k=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)}),x(()=>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}-${E(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")))&&ke(e,Z)},ce=e=>{const{native:t}=e;return!!t},ue=e=>ke(e,te),pe=e=>{const{targetId:t}=e;return t.includes("takeover")||ke(e,ie)},ve=e=>ke(e,ie),ge=e=>ke(e,re),he=e=>ke(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"),Ee=e=>e.width>=1260&&e.width<=1280,xe=e=>e.width>=1600&&e.width<=1620,ke=(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:ke(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:Ee,hFormat:xe,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!xe(e)&&!Ee(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:"mobile",TABLET:"tablet",DESKTOP:"desktop"},at="web_desktop",dt="web_phone",st="wde",lt="wph",ct=()=>{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"},ut=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},pt=(e,t=window.screen.width,n,i)=>{const o=ut(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")},vt=new Map;vt.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),vt.set("panorama",{scale:.79,transformOrigin:"center center"}),vt.set("outstream",{scale:.79,transformOrigin:"center center"}),vt.set("integration",{scale:.79,transformOrigin:"center center"}),vt.set("toppanorama",{scale:.8,transformOrigin:"left center"});var gt=Object.freeze({__proto__:null,calculateScaleFactor:ut,getAspectRatio:(e,t)=>{if(e&&t)return t/e},scaleAd:pt,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=vt.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(ke(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;pt(e,(g<h?g:h)-u)}});const ht={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&((e,t)=>{pt(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=>{}},mt={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"},yt={publisherClassName:mt.PENT,fullWidthFormatClassName:"netboard"},ft=864e5,wt=(()=>{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=ft)=>{const o={data:n,expirationTime:(new Date).getTime()+i};t(e,JSON.stringify(o))},getByTimestamp:(t,n=ft)=>{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}}}})(),bt="glimrTags",Et=["glwe_","glwet_"],xt={geofenceTags:[],geoTags:[],weatherTags:[]},kt=(...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()}),Ct=()=>Ie(void 0,void 0,void 0,function*(){const{glimr:e}=p.get();if(!(yield kt())||!(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)=>{wt.setWithTimestamp(bt,{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})}),It={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"},Tt=e=>Et.some(t=>e.startsWith(t)),St=e=>e.startsWith("glgc_"),At=e=>!Tt(e)&&!St(e),Pt=(e,t)=>Ie(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:i,pageContext:{countryCode:o}={}}=e,r=yield kt(e);if(!(null==i?void 0:i.enabled)||!r)return d("No consent for getting glimr tags."),{};const a=h(o),s=Ot(e,Boolean(n));return{[`${a}-geo`]:s.geoTags,[`${a}-weather`]:s.weatherTags,[`${a}-geofence`]:s.geofenceTags}}),Ot=(e,t)=>{const n=jt();if(!n)return xt;const i=((e=[])=>e.filter(Tt))(n),o=((e=[])=>e.filter(St))(n),r=((e=[],t,n)=>{var i;const o=e.filter(At);if(n&&t){const{publisher:e}=null!==(i=t.pageContext)&&void 0!==i?i:{},n=It[e]||e;o.push(n)}return o})(n,e,t);return{geoTags:r,geofenceTags:o,weatherTags:i}},jt=()=>{const e=wt.getByTimestamp(bt);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},_t=()=>(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),Lt=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),$t=(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)}},Nt={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()})},qt="advertory:ppids-cache",Dt={[g.SE]:`SCH${g.SE.toUpperCase()}-EnvHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-EnvHash`},Mt={[g.SE]:`SCH${g.SE.toUpperCase()}-UserHash`,[g.NO]:`SCH${g.NO.toUpperCase()}-UserHash`},Ft={[g.SE]:`sch${g.SE}-envhash-v3`,[g.NO]:`sch${g.NO}-envhash-v3`},Bt={[g.SE]:`sch${g.SE}-userhash-v3`,[g.NO]:`sch${g.NO}-userhash-v3`},Rt={[g.SE]:`'sch${g.SE}-iosid-v3'`,[g.NO]:`'sch${g.NO}-iosid-v3'`},Ut={[g.SE]:`sch${g.SE}-androidid-v3`,[g.NO]:`sch${g.NO}-androidid-v3`},zt={[g.SE]:"sdrn:schibsted.com:user",[g.NO]:"sdrn:spid.no:user"};class Vt{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 Ht=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:""}},Wt=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=wt.get(qt),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}}:{});wt.set(qt,o)}hashPPIDs(e,t){return Ie(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield Nt.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?`${zt[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}}},Kt=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([Ht.processPPIDs(t,null==n?void 0:n.timeout),Wt.processPPIDs(t,i)])).forEach((e,t)=>{if("rejected"===e.status){d(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),Gt=e=>{const{ppid1:t,ppid2:n}=Ht.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Wt.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new Vt).add(n,Dt[e]).add(t,Mt[e]).add(o,Ft[e]).add(i,Bt[e]).add(r,Rt[e]).add(a,Ut[e]).buildEids()}]}},Jt=()=>{const{ppid1:e,ppid2:t}=Ht.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},Qt=e=>{const{ppid1:t,ppid2:n}=Ht.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=Wt.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new Vt).add(n,Dt[e]).add(t,Mt[e]).add(o,Ft[e]).add(i,Bt[e]).add(r,Rt[e]).add(a,Ut[e]).buildRyEids()}}]}}},Xt=e=>{const{ppid1:t,ppid2:n}=Ht.getPPIDs(),{ppid1:i,ppid2:o}=Wt.getPPIDs();return(new Vt).add(n,Dt[e]).add(t,Mt[e]).add(o,Ft[e]).add(i,Bt[e]).buildRyEids()},Yt=e=>Ie(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=Ht.getPPIDs(),{ppid1:i,ppid2:o}=Wt.getPPIDs(),r=(new Vt).add(n,Dt[e]).add(t,Mt[e]).add(o,Ft[e]).add(i,Bt[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),Zt=(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)}))}),en="advertory-fullscreen-scroll",tn="advertory-fullscreen-scroll-wrapper",nn="fullscreen-scroll-in-screen",on="in-screen",rn=e=>e.includes("snoap.no"),an=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)},dn=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}),sn=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},ln=[],cn={},un=(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=>pn(e,i),{}),r=gn(e);o.observe(e),i&&(cn[r]=yn(e,null==t?void 0:t.options))},pn=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=gn(e);n?(vn(i,n),hn(e,i,t)):(vn(i,n),mn(e,i,t))})},vn=(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}`,"*")},gn=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},hn=(e,t,n)=>{e.classList.add(on),document.body.classList.add(nn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),ln.includes(t)||ln.push(t),n&&window.addEventListener("scroll",cn[t],{passive:!0})},mn=(e,t,n)=>{ln.includes(t)&&(n&&window.removeEventListener("scroll",cn[t]),document.body.classList.remove(nn),e.classList.remove(on),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},yn=(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&&fn(e,r,o,0),a.length&&fn(e,a,o,40)}},fn=(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 wn(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}wn('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 bn="left",En={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 xn=null;const kn=(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=`(${dn})()`,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(rn(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=sn(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>rn(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)),rn(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)),an(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},Cn=()=>{xn=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`)},In=()=>{xn||(xn=window.requestAnimationFrame(Cn))},Tn=(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;un(u,t),c.className=en,un(u,t),c.className="advertory-fullscreen-scroll";const v=ke(e,Y)?"absolute":"fixed";c.style.position=v,u.className=tn,u.dataset.showTagSubscribeId=s,c.setAttribute("data-ad-label",En[a].adText),(null==l?void 0:l.cogwheelPosition)===bn&&(c.dataset.moveCogwheelToTheLeft="true"),In(),window.addEventListener("resize",In),null===(o=window.visualViewport)||void 0===o||o.addEventListener("resize",In),null===(r=window.visualViewport)||void 0===r||r.addEventListener("scroll",In)},Sn=e=>{if(!(null==e?void 0:e.classList.contains(en)))return;e.classList.remove(en),e.removeAttribute("style"),e.removeAttribute("data-ad-label");const t=e.parentElement;(null==t?void 0:t.classList.contains(tn))&&(t.classList.remove(tn),t.classList.remove(on))};var An=Object.freeze({__proto__:null,createFullscreenScrollAd:Tn,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=an(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=an(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,kn(t,e))},undoFullscreenScrollContainer:Sn});const Pn=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},On=(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}]}})),Pn(e);const s=d.firstElementChild;s&&t.insertBefore(s,d),d.remove()},jn="ad-loaded",_n=()=>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=_t(),{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=_t(),u=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=_t();return{user:e,keywords:t}})();l.failsafeOnTimeout("relevantCb");const{user:{externalUid:v=""}={},keywords:g}=u;(()=>{const e=Lt();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=Lt();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},Qt(n)),$t(g,v))),d("core add prebid config",Object.assign(Object.assign({consentManagement:a,enableSendAllBids:!1},Qt(n)),$t(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=>{Ln(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)?(Tn(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)):(Sn(u),null===(t=null==u?void 0:u.parentElement)||void 0===t||t.classList.add("advertory-direct-render")),u.classList.add(jn),(null==a?void 0:a.creativeId)&&On(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=>{Ln(e,r)},directRenderFn:()=>{}})})}),Ln=(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}),"*")},$n=(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])}},Nn=["netboard","board"];class qn{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 Nt.get(s,e);return d("Fetch operation completed successfully."),t}catch(e){d("Error during fetch operation:",e)}return null})}}let Dn=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 Mn=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 Fn{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 Mn(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),Mn(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)):Mn(a))):(d("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void Mn(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 Bn{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=n.device===rt.MOBILE?t.mobileHTML:t.desktopHTML;const 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 Rn{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 Zt(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 Un=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 zn extends Un{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 Vn=class extends Un{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 Hn={FRONT:"front"},Wn=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)))}))}),Kn={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 Yr})})}})}};class Gn{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=>{Kn[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 Wn(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===Hn.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 Jn="https://www.aftonbladet.se/video-player-extras/latest/";class Qn{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:{[`${Jn}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${Jn}external-link.js`]:{name:"ExternalLink"}}};yield Wn(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 Xn=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class Yn{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({},Xn(e)?e:{}),{provider:Object.assign(Object.assign({},Xn(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 Wn(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===Hn.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}let Zn=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const ei=(e,t,n)=>{var i;const{publisher:o,pageType:r,country:a}=e,d={[mt.VG]:new Dn,[mt.E24]:new Gn,[mt.AFTONBLADET]:new Qn,[mt.SVD]:new Yn}[o]||new Zn,s=new(a===g.SE?zn:Vn)(n,d,r),l=new qn(t,null!==(i=null==n?void 0:n.pulseTracker)&&void 0!==i?i:n),c=new Bn(d,s),u=new Rn(d);return new Fn(l,c,u,s)},ti=()=>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 ni{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 ii=(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=ei(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))},oi=()=>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)}}),ri=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},ai=[],di=(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=Nn.some(e=>l.startsWith(e)),p=ai.includes(l),v=(null===(i=null==c?void 0:c.drEdition)||void 0===i?void 0:i.editionName)||d;return c&&u&&!p&&v?(ai.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 ti(),g=new ni(v),h=ei({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)}),si=(e,t)=>{var n,i,o;if(!ri())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 di(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 li=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:ei,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 ti(),i=new ni(n);ii({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:di,handleDrEditionBackfillOnAdblock:si});const ci="collapseAd",ui="hideAd",pi="resizeAd",vi="renderDrEditionFallback",gi="wallpaperImageUrl",hi="wallpaperColor",mi="velvet",yi=[pi,gi,hi,ci,ui,vi,mi];let fi;const wi=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:gi,wallpaperImageUrl:t}}if(j(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:hi,wallpaperColor:t}}if(e.startsWith(vi)){const t=e.split(":")[1];return{name:vi,targetId:t}}if(e.startsWith(ci)||e.startsWith(ui)){const t=e.split(":")[1];return{name:ci,targetId:t}}if(e.includes("name")&&yi.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!yi.some(e=>n.name===e))return;const{name:i,targetId:o,wallpaperImageUrl:r,wallpaperColor:a,cmd:d,size:s}=n;i===mi&&d&&(d.includes("noScroll")&&(fi=(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==fi||fi(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==ci&&i!==ui||!o||F(o),i===pi&&o&&d&&$n(o,d),i===vi&&o&&(F(o),di(p.get(),{targetId:o})),"resizeMediationAd"===i&&o&&s&&$n(o,s,!0),i===gi&&r&&_(r),i===hi&&a&&L(a)},bi=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Ei=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=p.get(),i=window.apntag,o={publisher:e,countryCode:t,finnBlink:n},r=e=>{B(e),x(()=>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 ya});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 ya});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)}))})}},xi=(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 Ei().withFinnBlinkAd(t)):ye(t)?(d(`loading finn blink ad with full ads chain for ${t}`),void Ei().withFullAdsChain(t)):void x(()=>(d("core showTag",{id:t}),e.showTag(t)))},ki=(e,t)=>Ie(void 0,void 0,void 0,function*(){yield k,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,xi,e),bi(t));n.observe(e)}),Ci=new Map,Ii=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Ti=".brandstudio-premium-content-widget",Si=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Ai=({adWrapper:e,placementContainer:t})=>{const n=Si({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),V(i=t),i.innerHTML=""},Pi=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},Oi=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=p.get(),i=Ii.includes(n)&&Boolean(t.closest(Ti));const o=i?t.closest(Ti):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 Pi(e),void r.disconnect();const d=t.closest('[style*="height"]'),s=o;d&&s.contains(d)?Pi(d):s.hasAttribute("style")&&Pi(s),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},ji=(e,t,n,i,o,r)=>{var a;const d=performance.now(),s=null!==(a=Ci.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,o)&&n<0;d-s>=o&&l&&(Ci.set(t,d),((e,t,n)=>{const{pageContext:{countryCode:i}}=p.get(),o=null==n?void 0:n.parentElement;o&&n&&Ai({adWrapper:o,placementContainer:n}),x(()=>{e.setKeywords([t],{[`${h(i)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},_i=(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,ji,t,n),bi(300));i.observe(e)},Li=(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},$i=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),Ni=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},qi=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=p.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),Ri(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},Di=(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;Ni(o,r)&&i&&(z(i.targetId),n.length&&o.classList.remove(...n),Ri([i],t))}},Mi=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:i}}=p.get();t&&(e.forEach(({targetId:e})=>{const t=Fi(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&Di(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),Di(e,!1,t))};n.persisted&&($i()?window.addEventListener("scroll",i,{passive:!0}):Di(e,!1,t))})})(e,n))},Fi=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},Bi=e=>{const{targetId:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(Fi(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},Ri=(e,t=!1)=>{const{queryConfig:{batchSize:n=c}={}}=p.get(),i=e.map(({targetId:e})=>e),o=Li(i,n);if(t)for(const t of e){const e=Bi(t);window.apntag.modifyTag(t.targetId,e)}for(const e of o)x(()=>window.apntag.refresh(e))},Ui=e=>`externalImpId:'${e}'`,zi=(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,Vi=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}=(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),h=Object.assign({invCode:l,sizes:r,targetId:o,keywords:zi(a,c),allowedFormats:s,dynamicSizeWidthCheck:g},v&&{safeframeConfig:v}),m=(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&&m&&(d("External Impression ID assigned to defineTag:",Ui(m)),h.externalImpId=Ui(m));const y=(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"))&&(h.native=y),h},Hi=e=>!e.includes("takeover")||He(),Wi=e=>{const{source:t}=e;return"csm"===t},Ki=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]})},Gi=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"]})},Ji=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"})})()},Qi=(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)})})});wn(".advertory-brandmetrics-survey{width:100%}");const Xi="advertory-brandmetrics-survey",Yi="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",Zi=()=>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}),eo={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"}},to={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},no=e=>(null==e?void 0:e.parent)?[...no(e.parent),e.shortPath||"unknown"]:[],io=(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]=no(e);return to[n]||"ovrigaavdelningar"})(e)}_{position}`,oo={aftonbladet:eo},ro={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:io(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:no(e).join(":")}}},ao=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},so=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),lo="se-generic",co="aa-sch",uo="kv_",po="pause",vo="{deviceType}",go="{position}",ho="afp_",mo=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),yo="1-1",fo="16-9",wo="3-4",bo="9-16",Eo="responsive",xo={[yo]:1,[fo]:1.78,[bo]:.56,[Eo]:1},ko={[yo]:1,[fo]:1.78,[wo]:1.33,[bo]:.56},Co=(e,t,n,i)=>{const{invCode:o="",videoOverlayInvCode:r}=null!=e?e:{},a=rt.DESKTOP===n?st:lt,d=o.replace(vo,a);return(e,n)=>{if(e===po)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(go,po).replace(/-([a-z]+)_/,"-article-"))(d);if(n&&mo.has(e)){return(i&&r?r:t.frontpageInvCodeTemplate).replace(vo,a).replace(go,e)}return d.replace(go,e)}},Io=(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])},To=()=>{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},So=()=>{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},Ao=()=>{const e=null!==(t=So()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=So()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},Po=()=>Object.fromEntries(new URLSearchParams(window.location.search)),Oo=(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 Zi(),c=yield Yt(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)=>Io(ko,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?Io(xo,Number(m.toFixed(2))):Eo;var m,y;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${co}-country_code`]:o,[`${co}-publisher`]:i,[`${co}-supply_type`]:(y=e.deviceType,y===rt.DESKTOP?at:dt),[`kw_${co}-page_type`]:"collection",[`${co}-page_type`]:"collection",[`${lo}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${lo}-page`]:"index",[`${lo}-page`]:"index",[`${lo}-screenheight`]:String(window.screen.height),[`${lo}-screenwidth`]:String(window.screen.width),[`${lo}-viewportheight`]:String(a),[`${lo}-viewportwidth`]:String(r),[`${lo}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${lo}-mobile-os`]:ct(),[`${lo}-audience`]:void 0,[`${lo}-externalid_src`]:Ao(),[`${lo}-tags`]:e.tags,[`${lo}-articleid`]:p,"article-id":p},yield Pt(Object.assign(Object.assign({},t),{pageContext:d}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${lo}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(Po()).some(e=>e.includes(uo))&&(()=>{const e=Po(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(uo)).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})}),jo=["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"],_o=["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"],Lo=["external_uid","gdpr","gdpr_consent","eids","article-id"],$o=(e,t)=>{const n=[...jo,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||Lo.includes(e)?e:`kw_${e}`,t]))},No=e=>Object.fromEntries(Object.entries(e).filter(([e])=>_o.includes(e))),qo=(e,t)=>Ie(void 0,void 0,void 0,function*(){var n,i,o,r;const a=(e=>{var t;oo[e]||s(`[video] No config found for publisher "${e}"`);return null!==(t=oo[e])&&void 0!==t?t:eo})(e.publisher),d=(e=>{var t;return null!==(t=ro[e])&&void 0!==t?t:ro.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 Oo({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:To(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:v,playbackMethod:ao(e.startMode)}}),Do=(e,t)=>{const{siteConfig:n,siteVideoParams:i,isUserPresentOnFrontPage:o,adsKeywords:r,prerollPlacementFormat:a,playbackMethod:d}=e,{invCode:s}=i||{},l=Co(i,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(ho)?`${ho}${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":so.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({},$o(r,n)),No(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")})}}}},Mo=e=>t=>Ie(void 0,void 0,void 0,function*(){const n=yield qo(e,t);return Do(n,e)}),Fo={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]}]},Bo={no:"NOK",se:"SEK"},Ro={no:"no",se:"sv"};class Uo{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 Zi(),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(Fo),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:E(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||Ro[o]||"no").split("-")[0]},regs:{ext:{gdpr:s.gdpr||0}},user:{id:yield Le(i),ext:{consent:s.gdpr_consent||"",eids:Xt(o)}},at:1,cur:[Bo[o]],source:{tid:E(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:",Yi);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?`${Yi}?${a.toString()}`:Yi,l=yield this.buildFetchObject(e,t,n,i),c=yield Nt.post(s,o,l);return d("Fetch operation completed successfully.",c),c}catch(e){d("Error during fetch operation:",e)}return null})}}const zo=0,Vo=3,Ho=(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},Wo="finn-blink",Ko="native-ad",Go=(e,t)=>{Jo(e,t),Xo(e,t)},Jo=(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:[])Zo(i)}),t.dataset.tracked="true")})},Qo=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(Yo):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},Xo=(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:rt.DESKTOP])&&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,Qo(e),c.disconnect();break}},s);c.observe(o)},Yo=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Zo(e):window.navigator.sendBeacon(e)},Zo=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},er=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:[]}),tr=(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())},bi(s)).observe(l)});const{prepareTag:c}=p.getHandlers(),u=U.getData("alertoryConfigKeywords"),v=null!==(i=c(Vi(e)).keywords)&&void 0!==i?i:{},g=new Uo,h=yield g.fetchData(e,u,v,t);h&&(((e,t,n)=>{const i=n===rt.MOBILE?t.mobileHTML:t.desktopHTML;if(i){if(t.adType===zo){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===Vo&&(Ho(t.pageContext.publisher,l,Ko,t.pageContext.pageType),Go({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)),On(e,n,Number(null==i?void 0:i.adid)),null==d||d.remove()})(e.targetId,e.invCode,l,h.bid))}),nr=(e,t)=>{e.forEach(e=>tr(e,t).catch(e=>{d("Failed to handle server-side ad:",e)}))},ir={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},or=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 Nt.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,ir))(e,t):e}catch(t){return d("Error fetching S3 config, using site config",{error:t}),e}}),rr=(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 ar,dr=[];const sr=["takeover","wallpaper"],lr=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.3",siteConfig:e,alertoryConfig:t}},cr=()=>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=Gi(e);U.setData("alertoryConfigKeywords",n)})(o.keywords),x(()=>ar.setPageOpts(o))}),ur=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);pr(a);(null==t?void 0:t.enabled)&&r&&!M()?(d("core loadPlacements prebid enabled"),yield _n()):(d("core load tags invoked without prebid enabled"),vr(a))}),pr=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=Vi(e);if(Hi(e.targetId)){const o=t(i),r=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:o}=e;return{adTypes:t,invCode:n,keywords:Ki(i),sizes:o}})(o);n.push(r),x(()=>(d("core defineTag - add to the queue",{placement:e,preparedTag:o}),ar.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)},vr=e=>{const t=e.filter(({targetId:e})=>Hi(e)).map(({targetId:e})=>e);t.length&&x(()=>(d("core loadTags",{placementsIdsToLoad:t}),ar.loadTags([...t])))},gr=(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 ki(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())}),hr=e=>e.some(({targetId:e})=>sr.some(t=>e.includes(t))),mr=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,...Li(d,n)]})(i);for(const e of o)hr(e)?(d("core loadAds without lazy loading",{placementsToLoad:e}),yield ur(e)):e.length&&(d("core loadAds with lazy loading",{placementsToLoad:e}),yield yr(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 ya});yield e(n)}}),yr=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 ur(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&&ur(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))})}),fr=()=>Ie(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=p.getHandlers(),{wallpaper:n,fullscreenScroll:i}=p.get(),o=[];x(()=>{ar.onEvent("adRequested",()=>{e.adRequested()}),ar.onEvent("adAvailable",o=>Ie(void 0,void 0,void 0,function*(){var r,a,s,l,c,u;d("core adAvailable start",{placementsAvailable:dr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Wi(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(Wi(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 An});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 Ea});e()}if(le(o)&&!ye(o.targetId)){const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return An});e(o,i)}if(!ce(o)||Wi(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 Fa});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(()=>x(()=>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=dr.find(({targetId:e})=>e===o.targetId);h&&(yield gr(h,o),dr=dr.filter(e=>e.targetId!==h.targetId)),d("core adAvailable stop",{placementsAvailable:dr,adObj:o,isFullscreenScrollAd:le(o),isFinnBlink:ye(o.targetId),isNativeAd:ce(o),isMediation:Wi(o),isTakeoverAd:pe(o),isCollapseAd:he(o),isWallpaperAd:ge(o)})})),ar.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 aa});e(n)}if(o.includes(n.targetId)&&ce(n)&&(null==t||t(n,p.get()),it({adObj:n})),!o.includes(n.targetId)&&Wi(n)&&o.push(n.targetId),he(n)&&F(n.targetId),pe(n)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return Fa});e(ar,n.targetId)}if(ue(n)){const{prepareContainerForFullWidthFormat:e}=yield Promise.resolve().then(function(){return Ua});e(n)}if((e=>ke(e,ee))(n)){const{applyNinesixteenFormat:e}=yield Promise.resolve().then(function(){return Ua});e(n)}if((e=>ke(e,ne))(n)){const{applyFullsquareFormat:e}=yield Promise.resolve().then(function(){return Ua});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;Oi({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&&_i(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 gt});e(n),t(n)}e.adLoaded(n),Pn(n.targetId),s&&(s.classList.add(jn),(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)}}))})),ar.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 li});yield e(p.get(),t)}if(pe(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return tt});yield e(t)}e.adNoBid(t)})),ar.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)})),ar.onEvent("adCollapse",()=>{e.adCollapse()}),ar.onEvent("adRequestFailure",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield di(p.get(),t),e.adRequestFailure(t)})),ar.onEvent("adBadRequest",t=>Ie(void 0,void 0,void 0,function*(){F(t.targetId),yield di(p.get(),t),e.adBadRequest(t)})),ar.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),ar.onEvent("adNoBidMediated",t=>Ie(void 0,void 0,void 0,function*(){yield di(p.get(),t),e.adNoBidMediated(t)}))})}),wr=(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 cr();const{clientSidePlacements:d,serverSidePlacements:s}=er(J(a));let l=d;return r&&(l=l.filter(e=>ye(e.targetId))),nr(s,p.get()),l.length>0&&(dr=[...dr,...l.map(e=>Object.assign({},e))],qi(l),Mi(l),yield mr(l)),dr}),br=(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",wi,!1),ar=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=ar,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"))||ar.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 Zt(null==e?void 0:e.prebidUrl))}),Kt(e),Ie(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=p.get();yield Zt(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 Zt(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 Zt(t),document.querySelector(`.${Xi}`))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(Xi)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),Ct(),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 Zt(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 Va});yield e()}d("Libraries have been loaded and trackers have been set"),yield fr(),yield cr(),d("Page options have been set"),lr(e),d("Advertory is setup on window");const{clientSidePlacements:l,serverSidePlacements:c}=er(J());if(dr=l,nr(c,e),qi(dr),Mi(dr),yield mr(dr),d("Ads has been loaded",dr),si(e,dr),Ji(dr),null==s?void 0:s.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return ya});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 li});yield t(e)}if(null==r?void 0:r.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return Za});t(e.rightColumnSplit)}if(null==o?void 0:o.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return dd});yield t(e)}}),Er=(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 or(e);yield oi(),yield Qi(o),yield Qi(r),d("TCF resolved successfully"),yield br(a,t),d("Run function resolved successfully")}))(e,t)}),xr=(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:E}=e,x=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:x(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 x(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:x(b),previewVideoSrc:null!=E?E:""},t)},kr=(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},Cr=(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(mt).includes(i);n&&r&&Ho(i,e,Ko,o)})(o,n),i())},Ir=(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=kr(e.targetId,l))&&void 0!==i?i:c,p=En[t.language||g.NO],v=xr(d,p,s,t);return(d.video?r[u]:o[u]||o.default)(v,t)})(e,t,n);Cr(e.targetId,i,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&Go(e,t)})},Tr=e=>(t,n)=>{var i;const{targetId:o}=t,r=document.querySelector(`#${o}`);if(!r)return;const a=e.getOptions(null!=n?n:{});Ir(t,a,e.templates),null===(i=e.postProcess)||void 0===i||i.call(e,t,r)},Sr=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}},Ar=e=>{const{pageContext:{countryCode:t}}=p.get(),n=`${h(t)}-targetid`;return e?{[n]:[e]}:{}},Pr=()=>{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},Or=e=>{const{siteSpecificConfig:t}=p.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))},jr=(e,t)=>Or(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{},_r=e=>Or(e)?{"aa-sch-dynamic-outstream":["true"]}:{};class Lr{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 $r=9826;class Nr{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e=rt.DESKTOP,isMobileApp:t}}=p.get();if(t){return{"aa-sch-supply_type":`app_${e===rt.MOBILE?"phone":rt.TABLET}`}}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=$r}={}}=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 qr=new Nr,Dr=qr.prepare.bind(qr);function Mr(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=ct();return{OS:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}const Fr=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function Br(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Fr.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Rr extends Nr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=rt.DESKTOP}}=p.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=p.get(),{OS:n,isHybridApp:i}=Mr(t);return{"no-sno-apptype":n&&e&&i?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return Br(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 Ur=new class extends Rr{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 Lr;yield v.addAsync(this.getAdvertisingConsentKeywords()),yield v.addAsync(Pt(p.get(),l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield v.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),v.add(this.getSupplyTypeKeywords()).add(Jt()).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({},Gt(g.NO)),m?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},zr=Ur.prepare.bind(Ur);class Vr extends Nr{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e=rt.DESKTOP}}=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}=Mr(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 Hr=new class extends Vr{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 Lr;yield c.addAsync(this.getAdvertisingConsentKeywords()),yield c.addAsync(Pt(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(Jt()).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({},Gt(g.SE)),v?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Wr=Hr.prepare.bind(Hr);wn('@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}}'),wn('.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 Kr={NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:i,img:o,adText:r})=>(Promise.resolve().then(function(){return sd}),`<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>`)},Gr={displayTemplates:{default:Kr.NATIVE_TEMPLATE},videoTemplates:{}},Jr={prepareTag:e=>{var t;const{keywords:n,targetId:i,invCode:o,dynamicSizeWidthCheck:r}=e,{pageSetup:a,pageContext:{countryCode:d}}=p.get();if(!a)return(e=>{const{keywords:t,targetId:n,invCode:i}=e,{pageSetup:{tag:{useAppTabletInvCode:o=!0}={}}={}}=p.get(),r=rr(i,o),a=Sr(e),d=Ar(n),s=Pr(),l=_r(i),c=jr(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:s=!0}={}}=a,l=rr(o,s),c=Sr(e),u=Ar(i),v=(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}})(l),g=Pr(),m=_r(o),y=jr(o,{safeFrameAutoInitialSize:!0}),f=r&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,w=(new Lr).add(null!=n?n:{}).add(c).add(u).add(null!=v?v:{}).add(m).add(g).addIf(null===(t=null==a?void 0:a.tag)||void 0===t?void 0:t.reloadKeywords,{[`${h(d)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:f,invCode:l,keywords:w,rendererOptions:y,globalPlacementId:l})},preparePageOptions:e=>Ie(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t},pageSetup:n}=p.get();return n?yield t===g.SE?Wr(e):zr(e):yield Dr(e)}),siteEvents:ht,initNativeAd:(e,t)=>{var n;const{targetId:i}=e;if(!document.querySelector(`#${i}`))return;const{pageType:o=Hn.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:mt.PENT,deviceType:r,pageType:o,nativeTrackingConfig:a,appearanceConfig:d};Ir(e,s,Gr)}},Qr=((e,t)=>({init:n=>Er(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:wr,getVideoPPIDs:Yt,createInitNativeAd:Tr,getVideoAdsConfig:Mo}))(Jr,yt),Xr=wn("[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 Yr=Object.freeze({__proto__:null,default:Xr});wn('.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 Zr={Blink:"Blink"},ea=new Map,ta=e=>{var t;if(!ea.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(Zr)){const i=e[t];null!=i&&(window[n]=i)}})(e)).catch(t=>{throw ea.delete(e),t});ea.set(e,t)}return null!==(t=ea.get(e))&&void 0!==t?t:Promise.resolve()},na="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",ia="https://www.finn.no/distribution-front/external/carousel",oa=(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;Ho(n,o,Wo,null!=t?t:i);it({preferredTestIdData:{targetId:e,testId:"finn"}})},ra=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 aa=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=p.get(),{initNativeAd:n}=p.getHandlers();le(e)&&Tn(e,t),ce(e)&&(null==n||n(e,p.get()))},finnBlinkLoaded:oa,xandrAdLoaded:ra});const da={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}`)}}},sa="finn_blink_id",la=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[Zr.Blink];if(!a)return;const d=new a({remote:ia,id:n,hashed_email:i,theme:o});yield d.inject(Object.assign({},r))}),ca=e=>Ie(void 0,void 0,void 0,function*(){const{userId:t,theme:n}=e,i=Ce(e,["userId","theme"]),o=window[Zr.Blink];if(!o)return;const r=new o({remote:ia,userId:t,theme:n});yield r.inject(Object.assign({},i))}),ua=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},pa=(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:`#${ua(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}},va=(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=pa(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 ra(e);if((e=>{var t;const n=ua(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),E="dark"===y?"dark":"light";try{const e=yield Ie(void 0,void 0,void 0,function*(){const{finnBlink:{identifierUrl:e}={}}=p.get(),t=da.get(sa),n=N("finncode");if(!e||n)return"";if(!t){const t=yield Nt.get(e,{credentials:"include"}),{finn_blink_id:n}=t;if(!n)throw new Error("getFinnBlinkIdentifier: No finn_blink_id found");return da.set(sa,n),n}return t}),t=yield Ie(void 0,void 0,void 0,function*(){const{ppid1:e}=Wt.getPPIDs();return e}),n=(null===(i=null==s?void 0:s.finnBlink)||void 0===i?void 0:i.useNewConstructor)?ca:la;yield n(Object.assign(Object.assign({},l),{channel:f,id:b,userId:t,hashed_email:e,theme:E,uuid:h})).then(()=>{oa(l.selector.replace("#",""),l.advertoryTheme)})}catch(t){d(`Finn blink error ${t}`),n&&n(e),!n&&F(e),ra(e)}}),ga=()=>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)}),ha=(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}`)},ma=e=>document.querySelector(`#${e}`);var ya=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=ma(n);o&&(yield ki(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 ga())||o)return n&&n(e),ra(e),void(!n&&F(e));try{yield ta(na)}catch(e){console.error(e)}yield va(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];ri()&&r&&a&&t.enabled?(yield ga())&&(yield ta(na),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),Ho(t,i,Wo),d(`Creating blink container for: ${e}`),n})(t);(e=>{d(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),ha(n,i),n.dataset.finnBlinkId=t,Ei().withFullAdsChain(e)})):d(`Finn blink configuration is incorrect: ${JSON.stringify(o)}`)})});const fa=1e4,wa=e=>e.some(e=>e.some(e=>!!e&&Ni(e,0)));let ba;var Ea=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=p.get(),{enabled:t,options:{rotationInterval:n=fa,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=wa(o);if(!o.length)return;ba&&window.removeEventListener("scroll",ba);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=wa(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);ba=c,window.addEventListener("scroll",c)}});const xa="#fff",ka="#0098da",Ca=(e,t=!0)=>{(e===qe||e===De)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},Ia=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},Ta=e=>{document.body.style.overflow=e?"initial":"hidden"},Sa=e=>{const t=Pa(e),n=Aa(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),Ta(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},Aa=e=>{const t=()=>Sa(e);return window.addEventListener("advertory:closeTakeover",t),Ia(),t},Pa=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Sa(e)};return Ia(),window.addEventListener("keydown",t),t},Oa=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(Pa(e),Aa(e),Ia(),t.addEventListener("click",()=>{Sa(e)}),Ta(!1))},ja=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),Aa(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},_a=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Sa(e))})(e)},La=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=En.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},$a=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=En.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Na=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=En.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},qa=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=En.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Da=()=>{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)},Ma=(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 Fa=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&&Ca(r,!1),((e,t)=>{({[qe]:Na,[Ne]:La,[De]:$a,[Me]:qa})[t](e)})(o,r),Da(),((e,t)=>{({[qe]:ja,[De]:ja,[Ne]:Oa,[Me]:_a})[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:xa,"important"),n.style.color=null!=t?t:ka}}})},[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&&Ca(r,!0),Ze(e,r)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=an(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=an(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,Ma(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 Ba=(e,t)=>{t.left&&(e.style.left=t.left),t.marginLeft&&(e.style.marginLeft=t.marginLeft)},Ra=(e,t,n,i)=>{var o,r;const a=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:d,fullWidthFormatClassName:s}={},fullWidth:l,pageContext:{deviceType:c}}=p.get();if(!a)return;const u=a.parentElement,v=a.querySelector("iframe"),g=null==v?void 0:v.parentElement;if(!v||!g)return;if(a.style.width="100vw",a.style.position="relative",u&&(u.style.width="100vw",u.style.position="relative"),!d||!s)return;const h=`advertory-${d}-${s}`;a.classList.add(`${h}__${i}`),null==u||u.classList.add(`${h}-wrapper__${i}`);const m=null===(r=null===(o=null==l?void 0:l.options)||void 0===o?void 0:o.styles)||void 0===r?void 0:r[c],y=(null==l?void 0:l.enabled)&&m;!y&&u&&(u.style.left="50%",u.style.marginLeft="-50vw"),y&&m.adContainer&&Ba(a,m.adContainer),y&&m.adContainerWrapper&&u&&Ba(u,m.adContainerWrapper);const f=a.offsetWidth,w=f/e.width;g.style.transform=`scale(${w})`,g.style.transformOrigin="left top";const b=Math.round(f/t*n);a.style.height=`${b}px`};var Ua=Object.freeze({__proto__:null,applyFullsquareFormat:e=>{Ra(e,1080,1080,"fullsquare-ad")},applyNinesixteenFormat:e=>{Ra(e,1080,1920,"ninesixteen-ad")},prepareContainerForFullWidthFormat:e=>{const t=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:n,fullWidthFormatClassName:i}={}}=p.get();if(!t||!n||!i)return;const o=t.parentElement;o&&(t.classList.add(`advertory-${n}-${i}__full-width-ad`),o.classList.add(`advertory-${n}-${i}-wrapper__full-width-ad`))}});const za=e=>e===g.NO?"schibsted":"schibstedse";var Va=Object.freeze({__proto__:null,getCampaign:za,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}=Ht.getPPIDs(),{ppid1:i,ppid2:o}=Wt.getPPIDs(),r=(new Vt).add(n,Dt[e]).add(t,Mt[e]).add(o,Ft[e]).add(i,Bt[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/${za(t)}/map/${r}`,"norstat")})});const Ha=".advertory-right-column-track",Wa="--advertory-right-column-track-height",Ka=e=>e.getBoundingClientRect().top+window.scrollY,Ga=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},Ja=(e,t)=>{const n=(i=t,`${Math.max(0,Math.round(i))}px`);var i;document.body.style.setProperty(e,n)},Qa=(e,t)=>`${e}-${t}`,Xa=(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=Ka(e);(()=>{const e=document.querySelector("header");if(!e)return;const t=Ga(e);Ja("--advertory-newsroom-header-height",t)})(),r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=Ka(e),o=Qa(Wa,t),r=i-n,a=Qa("--advertory-right-column-split-point-height",t),d=Ga(e);Ja(o,r),Ja(a,d)})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=Qa("--advertory-right-column-ad-height",t),i=Ga(e);Ja(n,i)})(o[t])});((e,t)=>{const n=Ka(e);Ja(Wa,n-t)})(r[Math.min(o.length,r.length-1)].point,a)};let Ya=!1;var Za=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||Ya)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=Ha}=e,o=document.querySelector(i);if(!o)return;Ya=!0;const r=()=>{Xa(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 ed{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 td{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class nd{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 id extends nd{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 od="[data-k5a-teaser-analytics]",rd=(e,t,n)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new id(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(od);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(od);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 ad{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n}}){if(!(null==e?void 0:e.instance))return;const i={[mt.VG]:new ed}[n]||new td;rd(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 Zt(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 dd=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 ad;yield t.run(e)})});wn('.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 sd=Object.freeze({__proto__:null});module.exports=Qr;
|