@schibsted/advertory 3.6.4-no-issue.1 → 3.6.5
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/ad-native/cjs/index.d.ts +0 -19
- package/ad-native/cjs/index.js +1 -1
- package/ad-native/es/index.d.ts +0 -19
- package/ad-native/es/index.js +1 -1
- package/aftenposten/cjs/index.d.ts +0 -19
- package/aftenposten/cjs/index.js +1 -1
- package/aftenposten/es/_auto-entry_aftenposten-CGSS0tKf.js +1 -0
- package/aftenposten/es/{events-90h4J0Pi.js → events-BrtAqJbD.js} +1 -1
- package/aftenposten/es/{index-x3C8LqoH.js → index-2TPGlMiI.js} +1 -1
- package/aftenposten/es/{index-D0SMqCpS.js → index-BO5kdoFl.js} +1 -1
- package/aftenposten/es/{index-BZDFHEyy.js → index-CgYQfcsJ.js} +1 -1
- package/aftenposten/es/index-CyylCAXU.js +1 -0
- package/aftenposten/es/{index-GvJ5O8Ol.js → index-DiyY7jME.js} +1 -1
- package/aftenposten/es/{index-CwCkFmT3.js → index-DkMzEzdq.js} +1 -1
- package/aftenposten/es/{index-PNWqx3ql.js → index-Dx1_2rbM.js} +1 -1
- package/aftenposten/es/{index-SPBgETLm.js → index-YZFW5XYK.js} +1 -1
- package/aftenposten/es/{index-k9VKIwq-.js → index-aAMvxk1n.js} +1 -1
- package/aftenposten/es/index.d.ts +0 -19
- package/aftenposten/es/index.js +1 -1
- package/aftenposten/es/{styles-C0fEGkU3.js → styles-73Frgdu6.js} +1 -1
- package/aftenposten/es/{styles-IM25mjsd.js → styles-BJ4HdALX.js} +1 -1
- package/aftenposten/es/{styles-D6C4kXph.js → styles-BMBJ_dLC.js} +1 -1
- package/aftenposten/es/{styles-mqLUt40K.js → styles-B_mmWkIp.js} +1 -1
- package/aftenposten/es/{styles-BODrkqLL.js → styles-C3VDdenU.js} +1 -1
- package/aftenposten/es/{styles-CGsVX09f.js → styles-C5l7RlQE.js} +1 -1
- package/aftenposten/es/{styles-DHz7ybgQ.js → styles-DGQoKTEg.js} +1 -1
- package/aftenposten/es/{styles-otSfsajI.js → styles-DvPlbBYX.js} +1 -1
- package/aftenposten/es/{styles-Bz8JDFmN.js → styles-H2hv-cxU.js} +1 -1
- package/aftenposten/es/{styles-CJ9OBVfJ.js → styles-N8lWOyBH.js} +1 -1
- package/aftenpostenv2/es/_auto-entry_aftenpostenv2-Cq8ZeNLa.js +1 -0
- package/aftenpostenv2/es/{events-BiZ53WbG.js → events-BoIjaJ8w.js} +1 -1
- package/aftenpostenv2/es/{index-CvVs7cA5.js → index-B5ZL-Rjh.js} +1 -1
- package/aftenpostenv2/es/index-BXcP5Hm5.js +1 -0
- package/aftenpostenv2/es/{index-1scrmbN8.js → index-CZZF7QUw.js} +1 -1
- package/aftenpostenv2/es/{index-DOo535KJ.js → index-CoNaj9-j.js} +1 -1
- package/{aftonbladetv2/es/index-Cr9mktXq.js → aftenpostenv2/es/index-DJjkw6G8.js} +1 -1
- package/aftenpostenv2/es/{index-oqTbMoBZ.js → index-Db_2VTsd.js} +1 -1
- package/aftenpostenv2/es/{index-Cv4YIbxm.js → index-DdML-00Q.js} +1 -1
- package/aftenpostenv2/es/{index-CHwNPbLT.js → index-GiEUtrkK.js} +1 -1
- package/aftenpostenv2/es/{index-LkRkfkb-.js → index-J1oQJ_r8.js} +1 -1
- package/aftenpostenv2/es/index.d.ts +0 -19
- package/aftenpostenv2/es/index.js +1 -1
- package/aftenpostenv2/es/{styles-Brav2qkV.js → styles-BkmHJJOv.js} +1 -1
- package/aftenpostenv2/es/{styles-XJ-eFfEw.js → styles-BzvYXJkC.js} +1 -1
- package/aftenpostenv2/es/{styles-oXQISx1b.js → styles-C2vZ76M1.js} +1 -1
- package/aftenpostenv2/es/{styles-DSJgHwN1.js → styles-CVhzSijz.js} +1 -1
- package/aftenpostenv2/es/{styles-Cgr1J3T3.js → styles-Clryv9Hj.js} +1 -1
- package/aftenpostenv2/es/{styles-DaS9lthq.js → styles-D3Pm4qer.js} +1 -1
- package/aftenpostenv2/es/{styles--5PORqq4.js → styles-DXWLjzLO.js} +1 -1
- package/aftenpostenv2/es/{styles-BVPRm4PB.js → styles-Dkz3Htxc.js} +1 -1
- package/aftenpostenv2/es/{styles-Cg5tKEAO.js → styles-GYZcDJg-.js} +1 -1
- package/aftenpostenv2/es/{styles-PWB8bkpb.js → styles-oqOqoj1W.js} +1 -1
- package/aftonbladet/cjs/index.d.ts +0 -19
- package/aftonbladet/cjs/index.js +1 -1
- package/aftonbladet/es/_auto-entry_aftonbladet-_V5Audbn.js +1 -0
- package/aftonbladet/es/{events-A8eRarM0.js → events-CJzsjVyW.js} +1 -1
- package/aftonbladet/es/{index-D9AivUBC.js → index-30rmINZw.js} +1 -1
- package/aftonbladet/es/{index-DIMuWioR.js → index-BCbK2Mrt.js} +1 -1
- package/aftonbladet/es/{index-3y_krWtI.js → index-Bni3tsv5.js} +1 -1
- package/aftonbladet/es/{index-YErwUvPi.js → index-CBeKuUvR.js} +1 -1
- package/aftonbladet/es/index-DVUhAeP5.js +1 -0
- package/aftonbladet/es/{index-BAcl84hu.js → index-DtB48BNL.js} +1 -1
- package/aftonbladet/es/{index-DKVhyZ7t.js → index-aLzDWM0e.js} +1 -1
- package/aftonbladet/es/{index-BiYceV13.js → index-c8kI-vcD.js} +1 -1
- package/aftonbladet/es/{index-DzMEQmPc.js → index-mvepspSi.js} +1 -1
- package/aftonbladet/es/index.d.ts +0 -19
- package/aftonbladet/es/index.js +1 -1
- package/aftonbladet/es/{styles-B3CXjx3R.js → styles-BPkZEAD-.js} +1 -1
- package/aftonbladet/es/{styles-DAOwzujX.js → styles-CZRDodTH.js} +1 -1
- package/aftonbladet/es/{styles-CqbU0dC-.js → styles-CekYdBOd.js} +1 -1
- package/aftonbladet/es/{styles-whRiQawN.js → styles-CwFeTlaP.js} +1 -1
- package/aftonbladet/es/{styles-CuKe16UU.js → styles-DTrFzAzw.js} +1 -1
- package/aftonbladet/es/{styles-BfmQQWQf.js → styles-kafJWDp1.js} +1 -1
- package/aftonbladetv2/es/_auto-entry_aftonbladetv2-DhOD1VZC.js +1 -0
- package/aftonbladetv2/es/{events-RlWiPgEd.js → events-C5v5iE1V.js} +1 -1
- package/aftonbladetv2/es/{index-DG71uAwM.js → index--Be8UbhZ.js} +1 -1
- package/aftonbladetv2/es/{index-CHe2mY5U.js → index-BFJAnPUm.js} +1 -1
- package/{aftenpostenv2/es/index-siSPAYL7.js → aftonbladetv2/es/index-BbOZLzvd.js} +1 -1
- package/aftonbladetv2/es/index-Bnl-hCmK.js +1 -0
- package/aftonbladetv2/es/{index-CzMGSy6Q.js → index-BrB4KaFL.js} +1 -1
- package/aftonbladetv2/es/{index-3uQCIdwA.js → index-CkNz2z-e.js} +1 -1
- package/aftonbladetv2/es/{index-CtEsmloB.js → index-DZctONj5.js} +1 -1
- package/aftonbladetv2/es/{index-BpHuZZzP.js → index-Dx70kkK7.js} +1 -1
- package/aftonbladetv2/es/{index-CwMJAqqO.js → index-Dy9ISoH8.js} +1 -1
- package/aftonbladetv2/es/index.d.ts +0 -19
- package/aftonbladetv2/es/index.js +1 -1
- package/aftonbladetv2/es/{styles-BEhQkXU1.js → styles-BWw6MUfh.js} +1 -1
- package/aftonbladetv2/es/{styles-DPqx2adI.js → styles-CH0eBIZ1.js} +1 -1
- package/aftonbladetv2/es/{styles-DkOgwygd.js → styles-Cf2QMJcS.js} +1 -1
- package/aftonbladetv2/es/{styles-BrFu_W5K.js → styles-CgLlqz7G.js} +1 -1
- package/aftonbladetv2/es/{styles-Bfc9l8WO.js → styles-DpnxJPCQ.js} +1 -1
- package/aftonbladetv2/es/{styles-BoJUgU8p.js → styles-_8FZyG25.js} +1 -1
- package/brandmetrics/cjs/index.js +1 -1
- package/brandmetrics/es/index.js +1 -1
- package/bt/cjs/index.d.ts +0 -19
- package/bt/cjs/index.js +1 -1
- package/bt/es/_auto-entry_bt-CTOR3iJo.js +1 -0
- package/bt/es/{events-B8E0Wmof.js → events-CDiGx_kJ.js} +1 -1
- package/{sa/es/index-BAJc_zk_.js → bt/es/index-6GLhpqQ1.js} +1 -1
- package/{sa/es/index-uThQzJEi.js → bt/es/index-BD2lQffQ.js} +1 -1
- package/bt/es/{index-Bj0f0v87.js → index-Brbrf6FQ.js} +1 -1
- package/bt/es/{index-03aD4eo1.js → index-CSvfpCfu.js} +1 -1
- package/bt/es/{index-dZUFgkcj.js → index-D2eZyMcb.js} +1 -1
- package/bt/es/index-DKGTzkAK.js +1 -0
- package/{sa/es/index-Cyq1Jqmv.js → bt/es/index-GN5Luv2m.js} +1 -1
- package/bt/es/{index-xFX_gjti.js → index-vfI6JnHo.js} +1 -1
- package/bt/es/{index-COAyNr45.js → index-vmoF41n6.js} +1 -1
- package/bt/es/index.d.ts +0 -19
- package/bt/es/index.js +1 -1
- package/{sa/es/styles-CI1Ug3AG.js → bt/es/styles-6fYvpuOp.js} +1 -1
- package/bt/es/{styles-BZkEY9ow.js → styles-AnKMq_OD.js} +1 -1
- package/bt/es/{styles-CEsYJDqo.js → styles-B4mmwRnK.js} +1 -1
- package/bt/es/{styles-CH2-1sgP.js → styles-BfzTE1Wf.js} +1 -1
- package/bt/es/{styles-CGYAqI9_.js → styles-BvJy56Rt.js} +1 -1
- package/bt/es/{styles--vBDQgko.js → styles-C7xGOU6H.js} +1 -1
- package/{sa/es/styles-Ysny45W0.js → bt/es/styles-D4bJcIM4.js} +1 -1
- package/bt/es/{styles-CHBDQHwu.js → styles-Dex4_cvt.js} +1 -1
- package/bt/es/{styles-wforPVjv.js → styles-rFRnCytf.js} +1 -1
- package/btv2/es/_auto-entry_btv2-D3MYyPVi.js +1 -0
- package/btv2/es/{events-B4DlNAQt.js → events-CbbvdA08.js} +1 -1
- package/btv2/es/{index-BUFZZQM2.js → index-Bk0IpCA2.js} +1 -1
- package/btv2/es/{index-CloqSUQD.js → index-BwxuCSNc.js} +1 -1
- package/btv2/es/{index-DxXBBDVp.js → index-C9V5sDTa.js} +1 -1
- package/btv2/es/{index-DNSUtbs9.js → index-Cl_IzcNG.js} +1 -1
- package/btv2/es/{index-feLxUxLr.js → index-CqiXhlFN.js} +1 -1
- package/btv2/es/{index-BYzgCdkQ.js → index-D2sxoQVQ.js} +1 -1
- package/btv2/es/index-DbSmNfh4.js +1 -0
- package/{sav2/es/index-B8QN1-Xi.js → btv2/es/index-DcLzcmwF.js} +1 -1
- package/btv2/es/{index-BbUYZ_o3.js → index-b6WqOVQ7.js} +1 -1
- package/btv2/es/index.d.ts +0 -19
- package/btv2/es/index.js +1 -1
- package/{vgv2/es/styles-Bgv4Jaz7.js → btv2/es/styles-B1g7jDKf.js} +1 -1
- package/{sav2/es/styles-BMrhfdTD.js → btv2/es/styles-BKnDli4l.js} +1 -1
- package/{sav2/es/styles-2Nnzs_wx.js → btv2/es/styles-BRH1Wo7z.js} +1 -1
- package/btv2/es/{styles-DvBM5Avv.js → styles-BwLYPpcA.js} +1 -1
- package/btv2/es/{styles-BHDI2Q0m.js → styles-CSoIhCt6.js} +1 -1
- package/btv2/es/{styles-Dz4b2AdK.js → styles-DDU_GH9v.js} +1 -1
- package/{sav2/es/styles-Bu82ldvz.js → btv2/es/styles-DNXSuP_F.js} +1 -1
- package/{vgv2/es/styles-CDQN7OoS.js → btv2/es/styles-DsWFYc2Y.js} +1 -1
- package/common/cjs/index.js +1 -1
- package/common/es/index.js +1 -1
- package/dr-edition/cjs/index.d.ts +6 -23
- package/dr-edition/cjs/index.js +1 -1
- package/dr-edition/es/index.d.ts +6 -23
- package/dr-edition/es/index.js +1 -1
- package/e24/es/_auto-entry_e24-BpEy58ES.js +1 -0
- package/e24/es/{events-2LemXGhL.js → events-DMy5AbEB.js} +1 -1
- package/e24/es/{index-BPsxnGG7.js → index-CC7jTokX.js} +1 -1
- package/e24/es/{index-RTqU_3hB.js → index-COYSr2gT.js} +1 -1
- package/e24/es/{index-D6VTaTl3.js → index-CmZ75be4.js} +1 -1
- package/e24/es/{index-DF244RRi.js → index-CqIG11G-.js} +1 -1
- package/{svdv2/es/index-DUEKQirr.js → e24/es/index-CtpL999V.js} +1 -1
- package/e24/es/index-CuPVfqC2.js +1 -0
- package/e24/es/{index-CLAfHIml.js → index-CzsZSoXk.js} +1 -1
- package/e24/es/{index-BKQ1a6Ig.js → index-N7143u8T.js} +1 -1
- package/{tv4/es/index-BUuBvzxQ.js → e24/es/index-tMVF4DRR.js} +1 -1
- package/e24/es/index.d.ts +0 -19
- package/e24/es/index.js +1 -1
- package/e24/es/{styles-Bia3hiG7.js → styles-B9D_sVUe.js} +1 -1
- package/e24/es/{styles-oDmE25-G.js → styles-BivpYTAN.js} +1 -1
- package/e24/es/{styles-3sc6XdB-.js → styles-CaFX-Dhh.js} +1 -1
- package/e24/es/{styles-NDCl-Fnx.js → styles-D2A6egGX.js} +1 -1
- package/e24/es/{styles-nqTatAnn.js → styles-DPcCPUbB.js} +1 -1
- package/{tv4/es/styles-D7WvCXz-.js → e24/es/styles-Do6n4ZMP.js} +1 -1
- package/e24/es/{styles-BMJ8T7fL.js → styles-DqMPAHVA.js} +1 -1
- package/e24/es/{styles-DpEIDLEr.js → styles-LSoWLlY2.js} +1 -1
- package/e24/es/{styles-DUOog_gc.js → styles-PjgLGS7b.js} +1 -1
- package/e24/es/{styles-BAl_3vMl.js → styles-f4BKcBzP.js} +1 -1
- package/e24/es/{styles-DK4hTklO.js → styles-x8QyipEm.js} +1 -1
- package/e24/styles.css +1 -1
- package/editory/cjs/index.d.ts +0 -19
- package/editory/es/index.d.ts +0 -19
- package/fotbollskanalen/cjs/index.d.ts +0 -19
- package/fotbollskanalen/cjs/index.js +1 -1
- package/fotbollskanalen/es/_auto-entry_fotbollskanalen-DumTrFL_.js +1 -0
- package/fotbollskanalen/es/{events-BdjHDrCO.js → events-ZjJFi8QC.js} +1 -1
- package/fotbollskanalen/es/{index-DMn-yP1t.js → index-5dx2445c.js} +1 -1
- package/fotbollskanalen/es/{index-VIQLjIBw.js → index-83t7oB8b.js} +1 -1
- package/fotbollskanalen/es/{index-C-He7fit.js → index-CGKDlMmg.js} +1 -1
- package/fotbollskanalen/es/{index-QUwIJqca.js → index-DAi_itu4.js} +1 -1
- package/fotbollskanalen/es/{index-BYOnKTkC.js → index-DFriHY76.js} +1 -1
- package/fotbollskanalen/es/index-DV_g-aoU.js +1 -0
- package/fotbollskanalen/es/{index-nJoT51KX.js → index-iDZsd43T.js} +1 -1
- package/fotbollskanalen/es/{index-B8_DAJrE.js → index-kydjr3CO.js} +1 -1
- package/fotbollskanalen/es/{index-Cq2dTD5N.js → index-zubHvhlS.js} +1 -1
- package/fotbollskanalen/es/index.d.ts +0 -19
- package/fotbollskanalen/es/index.js +1 -1
- package/fotbollskanalen/es/{styles-BuH9xVv6.js → styles-Ck5r4KkG.js} +1 -1
- package/glimr/cjs/index.js +1 -1
- package/glimr/es/index.js +1 -1
- package/godt/cjs/index.d.ts +0 -19
- package/godt/cjs/index.js +1 -1
- package/kilkaya/cjs/index.d.ts +0 -19
- package/kilkaya/cjs/index.js +1 -1
- package/kilkaya/es/index.d.ts +0 -19
- package/kilkaya/es/index.js +1 -1
- package/klart/cjs/index.d.ts +0 -19
- package/klart/cjs/index.js +1 -1
- package/koket/cjs/index.d.ts +0 -19
- package/koket/cjs/index.js +1 -1
- package/koket/es/_auto-entry_koket-L1nrgeUL.js +1 -0
- package/koket/es/{events-0DxWWCZ9.js → events-BTGz0Pma.js} +1 -1
- package/koket/es/{index-D8fZlGJ6.js → index-4E2GIMHF.js} +1 -1
- package/koket/es/{index-Be_MdB7n.js → index-BBGfWroF.js} +1 -1
- package/koket/es/{index--wuLVJT1.js → index-BxSe2uve.js} +1 -1
- package/koket/es/{index-C6aVVVJ6.js → index-CapaG-J2.js} +1 -1
- package/koket/es/{index-DfDCldGO.js → index-DT4JGaxo.js} +1 -1
- package/koket/es/index-D_M9VOIU.js +1 -0
- package/koket/es/{index-DOGN0SX7.js → index-DjQDUPlI.js} +1 -1
- package/koket/es/{index-cYdPNTwi.js → index-Dt4XfWUn.js} +1 -1
- package/{svdv2/es/index-nzRrRDNv.js → koket/es/index-OaWjkFxh.js} +1 -1
- package/koket/es/index.d.ts +0 -19
- package/koket/es/index.js +1 -1
- package/{svdv2/es/styles-9ghYoFbS.js → koket/es/styles-XyNFWK3D.js} +1 -1
- package/minmote/cjs/index.d.ts +0 -19
- package/minmote/cjs/index.js +1 -1
- package/package.json +1 -1
- package/pent/cjs/index.d.ts +0 -19
- package/pent/cjs/index.js +1 -1
- package/sa/cjs/index.d.ts +0 -19
- package/sa/cjs/index.js +1 -1
- package/sa/es/_auto-entry_sa-B9EduKH8.js +1 -0
- package/sa/es/{events-C8S7jrt3.js → events-DA2ltPG0.js} +1 -1
- package/sa/es/{index-Br6T-pda.js → index-4HyD4prX.js} +1 -1
- package/sa/es/{index-CYNpcUX3.js → index-6KVsvnDN.js} +1 -1
- package/{bt/es/index-D9-4nJzo.js → sa/es/index-C2OhqQoD.js} +1 -1
- package/sa/es/{index-1IvtyUJ6.js → index-CN7BHAWh.js} +1 -1
- package/sa/es/index-D3eIWo0r.js +1 -0
- package/sa/es/{index-B_iUHp18.js → index-DeCtDv4Z.js} +1 -1
- package/{bt/es/index-1fdav_Jg.js → sa/es/index-Dmk7iGsd.js} +1 -1
- package/sa/es/{index-DtJJzHK5.js → index-VMartVgT.js} +1 -1
- package/{bt/es/index-ikSnI3qk.js → sa/es/index-t7Bs5y8o.js} +1 -1
- package/sa/es/index.d.ts +0 -19
- package/sa/es/index.js +1 -1
- package/{vg/es/styles-BSfpgVXJ.js → sa/es/styles-2rJJPgT5.js} +1 -1
- package/sa/es/{styles-BqbfWI42.js → styles-B0zyiuB7.js} +1 -1
- package/sa/es/{styles-_0voXDgk.js → styles-BXQpiwJe.js} +1 -1
- package/sa/es/{styles-jucyBwh4.js → styles-CEP9t0Ff.js} +1 -1
- package/{vg/es/styles-tD8TNMsW.js → sa/es/styles-COVyyfE7.js} +1 -1
- package/sa/es/{styles-B1GOzs0B.js → styles-CbwscNL4.js} +1 -1
- package/sa/es/{styles-B8JtTDvr.js → styles-DZ6LHKrH.js} +1 -1
- package/sa/es/{styles-KihGIsxt.js → styles-VN0LBRZ4.js} +1 -1
- package/{bt/es/styles-BWe06TQl.js → sa/es/styles-aAKviTBd.js} +1 -1
- package/sav2/es/_auto-entry_sav2-e31gmPAN.js +1 -0
- package/sav2/es/{events-BTwxLrmE.js → events-CzgV0gSw.js} +1 -1
- package/sav2/es/{index-CTEloN61.js → index-9i8Xscdw.js} +1 -1
- package/sav2/es/{index-ZGLdhTow.js → index-Aq_AdT_0.js} +1 -1
- package/sav2/es/{index-Dmor7Z1b.js → index-BpVpeYR2.js} +1 -1
- package/{btv2/es/index-DPaE0hzc.js → sav2/es/index-D4fObIZB.js} +1 -1
- package/sav2/es/index-DYnnrQ9_.js +1 -0
- package/sav2/es/{index-HS2u3Zpj.js → index-Devj4B9g.js} +1 -1
- package/sav2/es/{index-COWfP5cs.js → index-Dn_gJXR0.js} +1 -1
- package/sav2/es/{index-rjgG7Xwk.js → index-W5qP0ujP.js} +1 -1
- package/sav2/es/{index-B53BR4b8.js → index-xSxPMKIA.js} +1 -1
- package/sav2/es/index.d.ts +0 -19
- package/sav2/es/index.js +1 -1
- package/{btv2/es/styles-BehUrvhi.js → sav2/es/styles-B2sL5WX4.js} +1 -1
- package/{btv2/es/styles-Cw9KJB6P.js → sav2/es/styles-BLiYCuWq.js} +1 -1
- package/{vgv2/es/styles-B4PZq-53.js → sav2/es/styles-C0jxcdH_.js} +1 -1
- package/sav2/es/{styles-DjMguaWj.js → styles-CEcubZQq.js} +1 -1
- package/sav2/es/{styles-DRLhz-Pu.js → styles-CkFbSEHS.js} +1 -1
- package/sav2/es/{styles-DFoiKFxe.js → styles-DUyX_DuT.js} +1 -1
- package/sav2/es/{styles-zb8508Q3.js → styles-DWB79r6_.js} +1 -1
- package/{vgv2/es/styles-BoxNTzGZ.js → sav2/es/styles-DZBKEfdt.js} +1 -1
- package/svd/cjs/index.d.ts +0 -19
- package/svd/cjs/index.js +1 -1
- package/svd/es/_auto-entry_svd-BdqmfmX6.js +1 -0
- package/svd/es/{events-xpACbhEk.js → events-C-9CJZ4h.js} +1 -1
- package/svd/es/index-1NGo6XQO.js +1 -0
- package/svd/es/{index-AaU4iJb_.js → index-BPc-z5yI.js} +1 -1
- package/svd/es/{index-ZRqg1RwZ.js → index-BlEUjADY.js} +1 -1
- package/{e24/es/index-CZtyf0jS.js → svd/es/index-CDYICatm.js} +1 -1
- package/svd/es/{index-BTkJXRDz.js → index-CPCTDvdm.js} +1 -1
- package/svd/es/{index-Bpqx7sL4.js → index-CqH2jGLh.js} +1 -1
- package/svd/es/{index-C8IPcd68.js → index-CtpXxUty.js} +1 -1
- package/svd/es/{index-DP_0yLU0.js → index-DLuY5Oeh.js} +1 -1
- package/{tv4/es/index-DZpubrgE.js → svd/es/index-Dv2VkPEy.js} +1 -1
- package/svd/es/index.d.ts +0 -19
- package/svd/es/index.js +1 -1
- package/svd/es/{styles-DjXQ1aIf.js → styles--4y6tyb7.js} +1 -1
- package/svd/es/{styles-fEOdy4x5.js → styles-AWXFMeot.js} +1 -1
- package/svd/es/{styles-DDwL7EXa.js → styles-BKSE1vOn.js} +1 -1
- package/svd/es/{styles-wVQjAwi4.js → styles-BYer2eO_.js} +1 -1
- package/svd/es/{styles-COuw80gn.js → styles-Bq2j_d6U.js} +1 -1
- package/svd/es/{styles-DXJ54Dlu.js → styles-Cr8zQz9V.js} +1 -1
- package/svdv2/es/_auto-entry_svdv2-DmKWQeIK.js +1 -0
- package/svdv2/es/{events-rHRR45Oc.js → events-ChZzMCGb.js} +1 -1
- package/svdv2/es/{index-C3EyOOQ1.js → index-BSsUqLi3.js} +1 -1
- package/{koket/es/index-B9jCMa-F.js → svdv2/es/index-BUafAKnp.js} +1 -1
- package/svdv2/es/index-BXwRRMHx.js +1 -0
- package/svdv2/es/index-CHg5wuUI.js +1 -0
- package/svdv2/es/{index-B5_Heysk.js → index-CrDjUSeU.js} +1 -1
- package/svdv2/es/{index-9m7OluMX.js → index-DF4UQA32.js} +1 -1
- package/svdv2/es/{index-sFmWFac1.js → index-DdpAFzQA.js} +1 -1
- package/svdv2/es/{index-D6jFeixA.js → index-DqFMnIvs.js} +1 -1
- package/svdv2/es/{index-_VqtpxkU.js → index-XlBiI6yV.js} +1 -1
- package/svdv2/es/index.d.ts +0 -19
- package/svdv2/es/index.js +1 -1
- package/svdv2/es/{styles-Cffbyyic.js → styles-B8Wm63Ec.js} +1 -1
- package/svdv2/es/{styles-Dl5qiGBy.js → styles-CkFEEa_w.js} +1 -1
- package/svdv2/es/{styles-CdvbETBq.js → styles-DBz9Dne3.js} +1 -1
- package/{koket/es/styles-DswGt2mE.js → svdv2/es/styles-DTV93sOT.js} +1 -1
- package/svdv2/es/{styles-p4pWN8kV.js → styles-DiBJaHVE.js} +1 -1
- package/svdv2/es/{styles-DIBKsLFk.js → styles-DsTdnUNV.js} +1 -1
- package/svdv2/styles.css +1 -1
- package/tek/cjs/index.d.ts +0 -19
- package/tek/cjs/index.js +1 -1
- package/tracker/cjs/index.d.ts +0 -19
- package/tracker/es/index.d.ts +0 -19
- package/tv4/cjs/index.d.ts +0 -19
- package/tv4/cjs/index.js +1 -1
- package/tv4/es/_auto-entry_tv4-GP9f9YWP.js +1 -0
- package/tv4/es/{events-CbC7QEai.js → events-CBIiFHLG.js} +1 -1
- package/tv4/es/{index-CmQWra83.js → index-B2__uMJs.js} +1 -1
- package/tv4/es/{index-D5qF2adM.js → index-C5HBQjWJ.js} +1 -1
- package/tv4/es/{index-pYKKu0ld.js → index-Ch4SrCas.js} +1 -1
- package/tv4/es/{index-BclrqEGM.js → index-CuVprOQs.js} +1 -1
- package/tv4/es/index-DScH3yWn.js +1 -0
- package/{svd/es/index-pRPyyoJx.js → tv4/es/index-Db_dsVJP.js} +1 -1
- package/{svd/es/index-Cge_jEH4.js → tv4/es/index-DfnCtA_I.js} +1 -1
- package/tv4/es/{index-Ks5JLKPT.js → index-XoAfWrkk.js} +1 -1
- package/tv4/es/{index-BUhmWRPT.js → index-dbE5lsvs.js} +1 -1
- package/tv4/es/index.d.ts +0 -19
- package/tv4/es/index.js +1 -1
- package/{e24/es/styles-DWNWEqx9.js → tv4/es/styles-BElEv35i.js} +1 -1
- package/tvnu/cjs/index.d.ts +0 -19
- package/tvnu/cjs/index.js +1 -1
- package/types/index.d.ts +0 -19
- package/vg/cjs/index.d.ts +0 -19
- package/vg/cjs/index.js +1 -1
- package/vg/es/_auto-entry_vg-Rp3gHZAh.js +1 -0
- package/vg/es/{events-DNAl1ePr.js → events-D35DGr75.js} +1 -1
- package/vg/es/{index-DwGxBmeP.js → index-BrYporHD.js} +1 -1
- package/vg/es/index-C016kE6A.js +1 -0
- package/vg/es/{index-BGun5xCj.js → index-CALBi355.js} +1 -1
- package/vg/es/{index-XeZ7SwBk.js → index-CNJLaOsv.js} +1 -1
- package/vg/es/{index-C7fN75K3.js → index-Caz866vA.js} +1 -1
- package/vg/es/{index-DDL8Af2X.js → index-DBY1obI3.js} +1 -1
- package/vg/es/{index-D1uLhilC.js → index-DZgb0LWb.js} +1 -1
- package/vg/es/{index-C3V_e1XF.js → index-k-YsQ_Sz.js} +1 -1
- package/{vgv2/es/index-DmCJBm4m.js → vg/es/index-wJEus7sL.js} +1 -1
- package/vg/es/index.d.ts +0 -19
- package/vg/es/index.js +1 -1
- package/vg/es/{styles-BvhA39C7.js → styles-5YI1QuIh.js} +1 -1
- package/vg/es/{styles-Bv3vF0-b.js → styles-8pqIa33x.js} +1 -1
- package/vg/es/{styles-3bVT0t_a.js → styles-B4Etu3iY.js} +1 -1
- package/vg/es/{styles-CQmno1pW.js → styles-BI-2-NhT.js} +1 -1
- package/vg/es/{styles-lJcNQKcP.js → styles-CMITVLra.js} +1 -1
- package/{sa/es/styles-BQcj5ZW0.js → vg/es/styles-CPN8YKpo.js} +1 -1
- package/vg/es/{styles-CiILkZUo.js → styles-CUhXHsnF.js} +1 -1
- package/vg/es/{styles-XmDfZpcm.js → styles-CfXV6VRM.js} +1 -1
- package/vg/es/{styles-BIALa-xy.js → styles-DAj9t35g.js} +1 -1
- package/vg/es/{styles-D4oRsLM6.js → styles-DVj73s_P.js} +1 -1
- package/vg/es/{styles-CRr6kpBX.js → styles-DanuOZtw.js} +1 -1
- package/{bt/es/styles-CyR4WSpG.js → vg/es/styles-DtEm8YXe.js} +1 -1
- package/vg/es/{styles-4yCwF2nv.js → styles-MO07__ZK.js} +1 -1
- package/vg/es/{styles-BwiR_kbC.js → styles-P9CwLfZu.js} +1 -1
- package/vg/es/{styles-CIHwlSYD.js → styles-ebC35oa4.js} +1 -1
- package/vg/styles.css +1 -1
- package/vgv2/es/_auto-entry_vgv2-CtFbm1pY.js +1 -0
- package/vgv2/es/{events-4c0QZ5ru.js → events-MLPKGiYJ.js} +1 -1
- package/vgv2/es/{index-_3XO0Gdc.js → index-BLaZuPHA.js} +1 -1
- package/vgv2/es/{index-DgzoxTqw.js → index-BzcuYqZC.js} +1 -1
- package/vgv2/es/index-C6pbI_IV.js +1 -0
- package/vgv2/es/{index-BHZONEW_.js → index-CmzLQXEB.js} +1 -1
- package/vgv2/es/{index-DKdpwEOg.js → index-CopaZijs.js} +1 -1
- package/vgv2/es/index-DJja7Kd0.js +1 -0
- package/vgv2/es/{index-6WUbxF8q.js → index-DNHpLrOS.js} +1 -1
- package/vgv2/es/{index-DsHPQZyc.js → index-dDkybE5J.js} +1 -1
- package/vgv2/es/{index-CiK1eAL3.js → index-eXRipzeT.js} +1 -1
- package/vgv2/es/index.d.ts +0 -19
- package/vgv2/es/index.js +1 -1
- package/{btv2/es/styles-DJT27wtw.js → vgv2/es/styles-2RyU9xTM.js} +1 -1
- package/vgv2/es/{styles-sTq9rRqk.js → styles-B12DPGXZ.js} +1 -1
- package/vgv2/es/{styles-E76tlcUr.js → styles-BT4Xcflt.js} +1 -1
- package/vgv2/es/{styles-DGwU3ILj.js → styles-BVt7_2tj.js} +1 -1
- package/vgv2/es/{styles-CSmqo9nP.js → styles-Bz6hOrxF.js} +1 -1
- package/vgv2/es/{styles-szVijAOX.js → styles-C8Nt-9bo.js} +1 -1
- package/vgv2/es/{styles-B858Hsls.js → styles-CAYrbIG-.js} +1 -1
- package/vgv2/es/{styles-BaPlw8lH.js → styles-CK-oDz4k.js} +1 -1
- package/{sav2/es/styles-DnoLY9DG.js → vgv2/es/styles-CMK0k5K7.js} +1 -1
- package/{btv2/es/styles-BPOLl8SC.js → vgv2/es/styles-DGUvoCuJ.js} +1 -1
- package/vgv2/es/{styles-Do2sahbB.js → styles-DH2jgzEK.js} +1 -1
- package/vgv2/es/{styles-Kzz5C2Ep.js → styles-Dy62grXK.js} +1 -1
- package/vgv2/es/{styles-BuGStooT.js → styles-Fgm7EU9P.js} +1 -1
- package/vgv2/es/{styles-OYmkqDQW.js → styles-b3k10M9h.js} +1 -1
- package/{btv2/es/styles-SsDyWsc5.js → vgv2/es/styles-yeAuvyL_.js} +1 -1
- package/vgv2/styles.css +1 -1
- package/video/cjs/index.js +1 -1
- package/video/es/index.js +1 -1
- package/aftenposten/es/_auto-entry_aftenposten-e5bjjybw.js +0 -1
- package/aftenposten/es/index-DQlbgZ8n.js +0 -1
- package/aftenpostenv2/es/_auto-entry_aftenpostenv2-BAMydMZR.js +0 -1
- package/aftenpostenv2/es/index-DQlbgZ8n.js +0 -1
- package/aftonbladet/es/_auto-entry_aftonbladet-CKiQ7hDs.js +0 -1
- package/aftonbladet/es/index-DQlbgZ8n.js +0 -1
- package/aftonbladetv2/es/_auto-entry_aftonbladetv2-Dh7qL1X3.js +0 -1
- package/aftonbladetv2/es/index-DQlbgZ8n.js +0 -1
- package/bt/es/_auto-entry_bt-CQT-xDPU.js +0 -1
- package/bt/es/index-DQlbgZ8n.js +0 -1
- package/btv2/es/_auto-entry_btv2-893Uo7bG.js +0 -1
- package/btv2/es/index-DQlbgZ8n.js +0 -1
- package/e24/es/_auto-entry_e24-BzGAVnFM.js +0 -1
- package/e24/es/index-BqUeo7N0.js +0 -1
- package/e24/es/index-DQlbgZ8n.js +0 -1
- package/fotbollskanalen/es/_auto-entry_fotbollskanalen-ClJ6Fvy9.js +0 -1
- package/fotbollskanalen/es/index-DQlbgZ8n.js +0 -1
- package/koket/es/_auto-entry_koket-CfcCrr2a.js +0 -1
- package/koket/es/index-DQlbgZ8n.js +0 -1
- package/sa/es/_auto-entry_sa-DuMP7yP_.js +0 -1
- package/sa/es/index-DQlbgZ8n.js +0 -1
- package/sav2/es/_auto-entry_sav2-Chan3yFg.js +0 -1
- package/sav2/es/index-DQlbgZ8n.js +0 -1
- package/svd/es/_auto-entry_svd-5Orlt_aZ.js +0 -1
- package/svd/es/index-DQlbgZ8n.js +0 -1
- package/svdv2/es/_auto-entry_svdv2-D92Sr8sv.js +0 -1
- package/svdv2/es/index-DQlbgZ8n.js +0 -1
- package/tv4/es/_auto-entry_tv4-DTu42CVS.js +0 -1
- package/tv4/es/index-DQlbgZ8n.js +0 -1
- package/vg/es/_auto-entry_vg-CI7KeJ7F.js +0 -1
- package/vg/es/index-BYE_L3YR.js +0 -1
- package/vg/es/index-DQlbgZ8n.js +0 -1
- package/vgv2/es/_auto-entry_vgv2-CVxHXRQ3.js +0 -1
- package/vgv2/es/index-DQlbgZ8n.js +0 -1
package/dr-edition/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime");function t(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="opaque",i=e=>t(void 0,void 0,void 0,function*(){if(e.type!==n){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),o={get:(e,...n)=>t(void 0,[e,...n],void 0,function*(e,n={}){var{timeout:o}=n,r=function(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}(n,["timeout"]);if(o)return((e,n,o)=>t(void 0,void 0,void 0,function*(){const t=new AbortController,r=setTimeout(()=>t.abort(),o);try{const o=yield fetch(e,Object.assign(Object.assign({},n),{signal:t.signal}));return i(o)}finally{clearTimeout(r)}}))(e,r,o);const a=yield fetch(e,r);return i(a)}),post:(e,n,i)=>t(void 0,void 0,void 0,function*(){const t=JSON.stringify(i),o=yield fetch(e,{method:"POST",headers:n,body:t});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},r=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},a=["netboard","board"];class s{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:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return t(this,void 0,void 0,function*(){var t,n,i;const a=yield this.identityFacade.getIdentityUser(),s=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:"",d=(null==a?void 0:a.userId)?String(a.userId):"",l=this.buildUrl(e,{envId:s,spid:d});try{r("Starting fetching DrEdition ad from URL:",l);const e=yield o.get(l);return r("Fetch operation completed successfully."),e}catch(e){r("Error during fetch operation:",e)}return null})}}class d{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,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},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,n){return t(this,void 0,void 0,function*(){const{id:t,autoplay:i,mute:o,videoLoop:r,vendor:a}=n.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:t,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 l=e=>new URLSearchParams(window.location.search).get(e),c=e=>{if("0"===l("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")&&(()=>{const e=document.querySelector(".advertory-wallpaper-background");e&&e.remove()})())},u=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"))},v=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):r("Dr. Edition container does not have a parent element, cannot remove height lock.")};class p{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,n){return t(this,void 0,void 0,function*(){var t,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:a=!1}=n,s=e.querySelector(o);if(!s)return void r(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(n);return(null==d?void 0:d.itemId)||a?!(null==d?void 0:d.itemId)&&a?(r("No Dr. Edition ads available to render. Collapsing whole placement."),c(e.id),void v(s)):((null==d?void 0:d.itemId)&&a&&(r("Dr. Edition ad available to render as a Xandr backfill."),u(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(s,d,n),yield null===(t=this.videoManager)||void 0===t?void 0:t.handle(d,n),v(s),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,n),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):v(s))):(r("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(s),this.showBackfill(e),void v(s))})}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:"";u(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}}const g=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 r("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(r("Resolving advertising permission value obtained"),i=!0,t(e))},a=setTimeout(()=>{r("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{r("On Tcf Ready called, waiting for permission"),clearTimeout(a)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(a);const t=Number(e);r("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),m="no",h="se",y="cmp:loaded";let w="undefined"!=typeof window?window._tcf_:void 0,f=!1;const b=(e,n,i)=>{const o=!!(null==e?void 0:e.enabled),a=(null==e?void 0:e.timeout)||3e3,s=l("bypass_tcf"),d=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(r("TCF bypass param detected, returning consent: true"),!0):(r("TCF is not enabled, returning consent: true"),!0))(o,s))return!0;if(f)return null;if(!w)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=w.getConsentedToAllSync();return r(`TCF consented to all is: ${t}`),w.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(r("Getting TCF consent manager..."),window._tcf_)return r("TCF consent manager is already available"),w=window._tcf_,void e(w);r("TCF consent manager is not available");const n=()=>{r("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(w=window._tcf_,e(w)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(y,n),f=!0,t(new Error("Timeout waiting for CMP to load"))},a);r("Listening for CMP loaded event..."),document.addEventListener(y,n,{once:!0})}):Promise.resolve(null),getConsentSync:d,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return r(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===h,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===m;if(t||n)return r("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield g(e);if(!(null==e?void 0:e.enabled))return!0;const o=d();return null!==o?o:yield new Promise((e,t)=>{try{if(!w)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(()=>{r("TCF isConsentedToAll timed out, resolving with false"),n(!1)},a);w.onTcfReady(()=>{r("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),w.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},E=(e,n,i,...o)=>t(void 0,[e,n,i,...o],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return r(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return r(`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}=b(e,0,n);return(yield o())?(r(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(r(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),P="mobile";class C{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,n,i){return t(this,void 0,void 0,function*(){if(!(null==n?void 0:n.itemId))return;const{getConsentAsync:t}=b(i.tcf,i.isMobileApp,i.country),o=yield t(),r=i.device===P?n.mobileHTML:n.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var t,o,r;e.search=null!==(r=null===(o=(t=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(t,e,n,i))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,n,i)})})}}class T{constructor(e){this.strategy=e}handle(e,n){return t(this,void 0,void 0,function*(){const{videoConfiguration:{id:t,preview:i}={}}=e;(t||i)&&(yield this.importScript(n),yield this.createVideoElement(e,n))})}importScript(e){return t(this,void 0,void 0,function*(){const n=e.drEditionConfig.options.videoScriptUrl,i=document.querySelector(`script[src="${n}"]`);if(n&&!window.autoplayQueue&&!i)try{yield((e,...n)=>t(void 0,[e,...n],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=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}))(n)}catch(e){r("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,n){return t(this,void 0,void 0,function*(){const t=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,n))return;this.strategy.handleVideo(t,e),null==o||o.appendChild(t),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 s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}class j{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,n,i){return t(this,void 0,void 0,function*(){var t,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:i.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(e,n,i,"view");(null===(t=this.pulse)||void 0===t?void 0:t.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,v):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(e,n,i){return t(this,void 0,void 0,function*(){var t,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,n,i,"click");this.pulse.trackLegacyClickUIElement?null===(o=(t=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(t,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}}class I extends j{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:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:v,urlPath:p}=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:[s,a,v,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:v,urlPath:p},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}class S extends j{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,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=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:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,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,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:v,url:p,probability:g}={}}=t,m=Math.floor(Date.now()/1e3),h=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),w=this.getTeaserElementText(e,"image"),f=null!==(s=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:p)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:f,placement:n.editionName,subtitle:y,time:m,title:h,type:i,imageUrl:w,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}}const k="svd",A="vg",L="aftonbladet",O="e24",U="front",M=e=>t(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)))}))}),x={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 t(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Q})})}})}};class D{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:n,node:i,autoplay:o,mute:r,vendor:a}}){yield t(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 s=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var l,c;c=d,null==(l=s)||l.forEach(e=>{x[e](c)});const u={id:n,node:i,autoplay:o,mute:r,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},v=yield M(u);v.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(v,s)}),v.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"]})}),v.once("PulseStats:ready",()=>t(this,void 0,void 0,function*(){const e=yield v.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===U?"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 _="https://www.aftonbladet.se/video-player-extras/latest/";class N{handleVideo(e,n){return t(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:{[`${_}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${_}external-link.js`]:{name:"ExternalLink"}}};yield M(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 V=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class B{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:n,node:i,autoplay:o,mute:r,vendor:a}}){const s={id:n,node:i,autoplay:o,mute:r,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},V(e)?e:{}),{provider:Object.assign(Object.assign({},V(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-${n}`]},requestSettings:{}}}},d=yield M(s);d.once("PulseStats:ready",()=>t(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===U?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class R{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const $=(e,t,n)=>{const{publisher:i,pageType:o,country:r}=e,a={[A]:new d,[O]:new D,[L]:new N,[k]:new B}[i]||new R,l=new(r===h?I:S)(n,a,o),c=new s(t,n),u=new C(a,l),v=new T(a);return new p(c,u,v,l)},q=()=>t(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"==typeof window)return void e(void 0);if(window.schAccount)return void e(window.schAccount);if(window.Identity)return void e(window.Identity);if(window.schIdentity)return void e(window.schIdentity);const t=new AbortController;window.addEventListener("schAccount:ready",()=>{t.abort(),e(window.schAccount)},{once:!0,signal:t.signal}),window.addEventListener("identity-initialized",()=>{t.abort(),e(window.Identity)},{once:!0,signal:t.signal}),window.addEventListener("schIdentity:ready",()=>{t.abort(),e(window.schIdentity)},{once:!0,signal:t.signal})})});class F{constructor(e){this.account=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this)}getIdentityUser(){return t(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.account)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return r("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return t(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.account)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}}const H=(e,t,n)=>{const{wrapperSelector:i}=e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=$(n,i,o);e.forEach(e=>{var i,o;if(!e.isIntersecting)return;const a=e.target,s=null!==(i=a.dataset.editionName)&&void 0!==i?i:"",d=null!==(o=a.dataset.pulseColumnname)&&void 0!==o?o:"",l=Number(a.dataset.pulsePrimaryposition)||0;r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:s,columnName:d,primaryPosition:l})),t.unobserve(a)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},z=[],W=(e,n)=>t(void 0,void 0,void 0,function*(){var t;const{pulse:i,tcf:o,drEdition:s,account:d,pageContext:{deviceType:l,publisher:c,pageType:u,countryCode:v,isMobileApp:p}}=e;if(!(yield E(o,p,v,"handleDrEditionBackfill")))return;const g=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:s}=e,d=null===(n=null==s?void 0:s.options)||void 0===n?void 0:n.fallbackGlobalEditionName,l=r[o]||r.desktop,c=(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})(t.targetId),u=l.find(e=>e.targetId===c),v=a.some(e=>c.startsWith(e)),p=z.includes(c),g=(null===(i=null==u?void 0:u.drEdition)||void 0===i?void 0:i.editionName)||d;return u&&v&&!p&&g?(z.push(c),Object.assign(Object.assign({},u),{drEdition:Object.assign(Object.assign({},u.drEdition),{editionName:g})})):null})(e,n);if(!g)return;if(!(null==i?void 0:i.instance))return void r("Pulse has not been passed as a prop, aborting");const m=(null==d?void 0:d.getAccountSdk)?yield d.getAccountSdk():yield q(),h=new F(m),y=$({publisher:c,pageType:u,country:v},h,null==i?void 0:i.instance),w=document.getElementById(n.targetId);if(!w||!s)return;w.classList.value="";const f=document.createElement("div");f.className=s.options.containerSelector.replace(/^[.#:[\]]+/,""),w.innerHTML=f.outerHTML;const b={editionName:(null===(t=null==g?void 0:g.drEdition)||void 0===t?void 0:t.editionName)||"",drEditionConfig:s,device:l,tcf:o,isMobileApp:p,country:v,renderAsBackfill:!0};yield y.fetchAndRenderAd(w,b)});const J=function(e){if("undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}("[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 Q=Object.freeze({__proto__:null,default:J});exports.DrEdition=({editionName:t,fallbackTargetId:n,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},s=a(o,"data-pulse"),d=a(r,"data");return e.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":t},s,d,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:i})]}))},exports.getDrEditionManager=$,exports.handleDrEdition=e=>t(void 0,[e],void 0,function*({drEdition:e,pageContext:t,account:n,tcf:i,pulse:o}){if(!e)return;if(!(yield E(i,t.isMobileApp,t.countryCode,"handleDrEdition")))return;const r=(null==n?void 0:n.getAccountSdk)?yield n.getAccountSdk():yield q(),a=new F(r);H({publisher:t.publisher,drEditionConfig:e,device:t.deviceType,pageType:t.pageType,country:t.countryCode},a,null==o?void 0:o.instance)}),exports.handleDrEditionBackfill=W,exports.handleDrEditionBackfillOnAdblock=(e,n)=>{var i,o,a;if(!(()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})())return void r("Ad block not enabled, Dr. Edition backfills will not be rendered");r("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:s},finnBlink:d}=e,l=null===(o=null===(i=null==d?void 0:d.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===o?void 0:o[s],c=null!==(a=null==l?void 0:l.map(([e])=>e))&&void 0!==a?a:[],u=new IntersectionObserver((n,i)=>t(void 0,void 0,void 0,function*(){for(const t of n){if(!t.isIntersecting)continue;const n=t.target;i.unobserve(n),yield W(e,{targetId:n.id})}}),{rootMargin:"400% 0px"});n.filter(e=>!c.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&u.observe(t)})};
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime");function t(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="opaque",i=e=>t(void 0,void 0,void 0,function*(){if(e.type!==n){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),o={get:(e,...n)=>t(void 0,[e,...n],void 0,function*(e,n={}){var{timeout:o}=n,r=function(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}(n,["timeout"]);if(o)return((e,n,o)=>t(void 0,void 0,void 0,function*(){const t=new AbortController,r=setTimeout(()=>t.abort(),o);try{const o=yield fetch(e,Object.assign(Object.assign({},n),{signal:t.signal}));return i(o)}finally{clearTimeout(r)}}))(e,r,o);const a=yield fetch(e,r);return i(a)}),post:(e,n,i)=>t(void 0,void 0,void 0,function*(){const t=JSON.stringify(i),o=yield fetch(e,{method:"POST",headers:n,body:t});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},r=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},a=["netboard","board"];class s{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:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return t(this,void 0,void 0,function*(){var t,n,i;const a=yield this.identityFacade.getIdentityUser(),s=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:"",d=(null==a?void 0:a.userId)?String(a.userId):"",l=this.buildUrl(e,{envId:s,spid:d});try{r("Starting fetching DrEdition ad from URL:",l);const e=yield o.get(l);return r("Fetch operation completed successfully."),e}catch(e){r("Error during fetch operation:",e)}return null})}}class d{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,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},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,n){return t(this,void 0,void 0,function*(){const{id:t,autoplay:i,mute:o,videoLoop:r,vendor:a}=n.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:t,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 l=e=>new URLSearchParams(window.location.search).get(e),c=e=>{if("0"===l("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")&&(()=>{const e=document.querySelector(".advertory-wallpaper-background");e&&e.remove()})())},u=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"))},v=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):r("Dr. Edition container does not have a parent element, cannot remove height lock.")};class p{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,n){return t(this,void 0,void 0,function*(){var t,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:a=!1}=n,s=e.querySelector(o);if(!s)return void r(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(n);return(null==d?void 0:d.itemId)||a?!(null==d?void 0:d.itemId)&&a?(r("No Dr. Edition ads available to render. Collapsing whole placement."),c(e.id),void v(s)):((null==d?void 0:d.itemId)&&a&&(r("Dr. Edition ad available to render as a Xandr backfill."),u(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(s,d,n),yield null===(t=this.videoManager)||void 0===t?void 0:t.handle(d,n),v(s),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,n),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):v(s))):(r("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(s),this.showBackfill(e),void v(s))})}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:"";u(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}}const g=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 r("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(r("Resolving advertising permission value obtained"),i=!0,t(e))},a=setTimeout(()=>{r("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{r("On Tcf Ready called, waiting for permission"),clearTimeout(a)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(a);const t=Number(e);r("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),m="no",h="se",y="cmp:loaded";let w="undefined"!=typeof window?window._tcf_:void 0,f=!1;const b=(e,n,i)=>{const o=!!(null==e?void 0:e.enabled),a=(null==e?void 0:e.timeout)||3e3,s=l("bypass_tcf"),d=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(r("TCF bypass param detected, returning consent: true"),!0):(r("TCF is not enabled, returning consent: true"),!0))(o,s))return!0;if(f)return null;if(!w)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=w.getConsentedToAllSync();return r(`TCF consented to all is: ${t}`),w.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(r("Getting TCF consent manager..."),window._tcf_)return r("TCF consent manager is already available"),w=window._tcf_,void e(w);r("TCF consent manager is not available");const n=()=>{r("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(w=window._tcf_,e(w)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(y,n),f=!0,t(new Error("Timeout waiting for CMP to load"))},a);r("Listening for CMP loaded event..."),document.addEventListener(y,n,{once:!0})}):Promise.resolve(null),getConsentSync:d,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return r(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===h,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===m;if(t||n)return r("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield g(e);if(!(null==e?void 0:e.enabled))return!0;const o=d();return null!==o?o:yield new Promise((e,t)=>{try{if(!w)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(()=>{r("TCF isConsentedToAll timed out, resolving with false"),n(!1)},a);w.onTcfReady(()=>{r("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),w.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},E=(e,n,i,...o)=>t(void 0,[e,n,i,...o],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return r(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return r(`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}=b(e,0,n);return(yield o())?(r(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(r(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),P="mobile";class C{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,n,i){return t(this,void 0,void 0,function*(){if(!(null==n?void 0:n.itemId))return;const{getConsentAsync:t}=b(i.tcf,i.isMobileApp,i.country),o=yield t(),r=i.device===P?n.mobileHTML:n.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var t,o,r;e.search=null!==(r=null===(o=(t=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(t,e,n,i))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,n,i)})})}}class T{constructor(e){this.strategy=e}handle(e,n){return t(this,void 0,void 0,function*(){const{videoConfiguration:{id:t,preview:i}={}}=e;(t||i)&&(yield this.importScript(n),yield this.createVideoElement(e,n))})}importScript(e){return t(this,void 0,void 0,function*(){const n=e.drEditionConfig.options.videoScriptUrl,i=document.querySelector(`script[src="${n}"]`);if(n&&!window.autoplayQueue&&!i)try{yield((e,...n)=>t(void 0,[e,...n],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=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}))(n)}catch(e){r("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,n){return t(this,void 0,void 0,function*(){const t=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,n))return;this.strategy.handleVideo(t,e),null==o||o.appendChild(t),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 s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}class j{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,n,i){return t(this,void 0,void 0,function*(){var t,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:i.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(e,n,i,"view");(null===(t=this.pulse)||void 0===t?void 0:t.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,v):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(e,n,i){return t(this,void 0,void 0,function*(){var t,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,n,i,"click");this.pulse.trackLegacyClickUIElement?null===(o=(t=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(t,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}}class I extends j{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:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:v,urlPath:p}=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:[s,a,v,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:v,urlPath:p},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}class S extends j{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,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=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:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,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,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:v,url:p,probability:g}={}}=t,m=Math.floor(Date.now()/1e3),h=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),w=this.getTeaserElementText(e,"image"),f=null!==(s=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:p)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:f,placement:n.editionName,subtitle:y,time:m,title:h,type:i,imageUrl:w,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}}const k="svd",A="vg",L="aftonbladet",O="e24",U="front",x=e=>t(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)))}))}),M={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 t(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Q})})}})}};class D{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:n,node:i,autoplay:o,mute:r,vendor:a}}){yield t(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 s=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var l,c;c=d,null==(l=s)||l.forEach(e=>{M[e](c)});const u={id:n,node:i,autoplay:o,mute:r,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},v=yield x(u);v.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(v,s)}),v.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"]})}),v.once("PulseStats:ready",()=>t(this,void 0,void 0,function*(){const e=yield v.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===U?"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 _="https://www.aftonbladet.se/video-player-extras/latest/";class N{handleVideo(e,n){return t(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:{[`${_}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${_}external-link.js`]:{name:"ExternalLink"}}};yield x(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 V=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class B{handleVideo(e,n){return t(this,arguments,void 0,function*(e,{videoConfiguration:{id:n,node:i,autoplay:o,mute:r,vendor:a}}){const s={id:n,node:i,autoplay:o,mute:r,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},V(e)?e:{}),{provider:Object.assign(Object.assign({},V(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-${n}`]},requestSettings:{}}}},d=yield x(s);d.once("PulseStats:ready",()=>t(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===U?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class R{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const $=(e,t,n)=>{const{publisher:i,pageType:o,country:r}=e,a={[A]:new d,[O]:new D,[L]:new N,[k]:new B}[i]||new R,l=new(r===h?I:S)(n,a,o),c=new s(t,n),u=new C(a,l),v=new T(a);return new p(c,u,v,l)},q=()=>t(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 F{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 t(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 r("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return t(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 H=(e,t,n)=>{const{wrapperSelector:i}=e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=$(n,i,o);e.forEach(e=>{var i,o;if(!e.isIntersecting)return;const a=e.target,s=null!==(i=a.dataset.editionName)&&void 0!==i?i:"",d=null!==(o=a.dataset.pulseColumnname)&&void 0!==o?o:"",l=Number(a.dataset.pulsePrimaryposition)||0;r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:s,columnName:d,primaryPosition:l})),t.unobserve(a)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},z=[],W=(e,n)=>t(void 0,void 0,void 0,function*(){var t;const{pulse:i,tcf:o,drEdition:s,pageContext:{deviceType:d,publisher:l,pageType:c,countryCode:u,isMobileApp:v}}=e;if(!(yield E(o,v,u,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:s}=e,d=null===(n=null==s?void 0:s.options)||void 0===n?void 0:n.fallbackGlobalEditionName,l=r[o]||r.desktop,c=(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})(t.targetId),u=l.find(e=>e.targetId===c),v=a.some(e=>c.startsWith(e)),p=z.includes(c),g=(null===(i=null==u?void 0:u.drEdition)||void 0===i?void 0:i.editionName)||d;return u&&v&&!p&&g?(z.push(c),Object.assign(Object.assign({},u),{drEdition:Object.assign(Object.assign({},u.drEdition),{editionName:g})})):null})(e,n);if(!p)return;if(!(null==i?void 0:i.instance))return void r("Pulse has not been passed as a prop, aborting");const g=yield q(),m=new F(g),h=$({publisher:l,pageType:c,country:u},m,null==i?void 0:i.instance),y=document.getElementById(n.targetId);if(!y||!s)return;y.classList.value="";const w=document.createElement("div");w.className=s.options.containerSelector.replace(/^[.#:[\]]+/,""),y.innerHTML=w.outerHTML;const f={editionName:(null===(t=null==p?void 0:p.drEdition)||void 0===t?void 0:t.editionName)||"",drEditionConfig:s,device:d,tcf:o,isMobileApp:v,country:u,renderAsBackfill:!0};yield h.fetchAndRenderAd(y,f)});const J=function(e){if("undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}("[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 Q=Object.freeze({__proto__:null,default:J});exports.DrEdition=({editionName:t,fallbackTargetId:n,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},s=a(o,"data-pulse"),d=a(r,"data");return e.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":t},s,d,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:i})]}))},exports.getDrEditionManager=$,exports.handleDrEdition=e=>t(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield E(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield q(),i=new F(n);H({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)}),exports.handleDrEditionBackfill=W,exports.handleDrEditionBackfillOnAdblock=(e,n)=>{var i,o,a;if(!(()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})())return void r("Ad block not enabled, Dr. Edition backfills will not be rendered");r("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:s},finnBlink:d}=e,l=null===(o=null===(i=null==d?void 0:d.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===o?void 0:o[s],c=null!==(a=null==l?void 0:l.map(([e])=>e))&&void 0!==a?a:[],u=new IntersectionObserver((n,i)=>t(void 0,void 0,void 0,function*(){for(const t of n){if(!t.isIntersecting)continue;const n=t.target;i.unobserve(n),yield W(e,{targetId:n.id})}}),{rootMargin:"400% 0px"});n.filter(e=>!c.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&u.observe(t)})};
|
package/dr-edition/es/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Tracker from '@schibsted/pulse-sdk';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { Identity, HasSessionSuccessResponse } from '@schibsted/account-sdk-browser';
|
|
3
4
|
|
|
4
5
|
type AstAdType = 'banner' | 'video' | 'native' | 'outstream';
|
|
5
6
|
interface AstBanner {
|
|
@@ -205,24 +206,6 @@ type Newsroom = (typeof Newsrooms)[keyof typeof Newsrooms];
|
|
|
205
206
|
|
|
206
207
|
type InitNativeAd = (adObj: AstAdObj, options?: Partial<SiteConfig>) => void;
|
|
207
208
|
|
|
208
|
-
interface IdentityUser {
|
|
209
|
-
userId?: string | number;
|
|
210
|
-
gender?: string;
|
|
211
|
-
}
|
|
212
|
-
/** The effectively used, narrowed down interface of the Account SDK v6 Account or Account SDK v5 Identity */
|
|
213
|
-
type AccountInterface = {
|
|
214
|
-
getUser: () => Promise<IdentityUser>;
|
|
215
|
-
isLoggedIn: () => Promise<boolean>;
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
interface AccountConfig {
|
|
219
|
-
/** Satisfied by function available in account-sdk-browser v6.
|
|
220
|
-
* This should become the non-optional way to get AccountInterface in a future release,
|
|
221
|
-
* as per https://docs.google.com/document/d/1WR4xgRpWMgd3JXClTYKmrwsa3ZrUVABO7-4NYVxaLs0/edit?tab=t.0#heading=h.77mg7jlirhp
|
|
222
|
-
*/
|
|
223
|
-
getAccountSdk?: () => Promise<AccountInterface>;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
209
|
declare const CogwheelPositions: {
|
|
227
210
|
readonly LEFT: "left";
|
|
228
211
|
readonly RIGHT: "right";
|
|
@@ -246,7 +229,6 @@ interface SiteConfig {
|
|
|
246
229
|
tcf?: TCFConfig;
|
|
247
230
|
prebid?: PrebidConfig;
|
|
248
231
|
pulse?: PulseConfig;
|
|
249
|
-
account?: AccountConfig;
|
|
250
232
|
finnBlink?: FinnBlinkConfig;
|
|
251
233
|
wallpaper?: WallpaperConfig;
|
|
252
234
|
fullscreenScroll?: FullscreenScrollConfig;
|
|
@@ -666,10 +648,11 @@ interface DrEditionHtmlAttributes {
|
|
|
666
648
|
type DrEditionObserverProperties = Pick<DrEditionObserverConfig, 'publisher' | 'pageType' | 'country'>;
|
|
667
649
|
|
|
668
650
|
declare class IdentityFacade {
|
|
669
|
-
private readonly
|
|
670
|
-
constructor(
|
|
671
|
-
getIdentityUser(): Promise<
|
|
651
|
+
private readonly identity;
|
|
652
|
+
constructor(identity: Identity | undefined);
|
|
653
|
+
getIdentityUser(): Promise<HasSessionSuccessResponse | null>;
|
|
672
654
|
isUserLoggedIn(): Promise<boolean>;
|
|
655
|
+
onIdentityLogout(callback: () => void): void;
|
|
673
656
|
}
|
|
674
657
|
|
|
675
658
|
declare class DrEditionService {
|
|
@@ -699,7 +682,7 @@ declare const getDrEditionManager: (drEditionPageProperties: DrEditionObserverPr
|
|
|
699
682
|
declare const DrEdition: ({ editionName, fallbackTargetId, children, pulseData, htmlAttributes }: DrEditionComponentProps) => ReactNode;
|
|
700
683
|
|
|
701
684
|
declare const handleDrEditionBackfill: (config: SiteConfig, adObj: AstTagObj) => Promise<void>;
|
|
702
|
-
declare const handleDrEdition: (
|
|
685
|
+
declare const handleDrEdition: (siteConfig: SiteConfig) => Promise<void>;
|
|
703
686
|
declare const handleDrEditionBackfillOnAdblock: (siteConfig: SiteConfig, placements: Array<Placement>) => void;
|
|
704
687
|
|
|
705
688
|
export { DrEdition, getDrEditionManager, handleDrEdition, handleDrEditionBackfill, handleDrEditionBackfillOnAdblock };
|
package/dr-edition/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const i="opaque",o=e=>n(void 0,void 0,void 0,function*(){if(e.type!==i){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),r={get:(e,...t)=>n(void 0,[e,...t],void 0,function*(e,t={}){var{timeout:i}=t,r=function(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}(t,["timeout"]);if(i)return((e,t,i)=>n(void 0,void 0,void 0,function*(){const n=new AbortController,r=setTimeout(()=>n.abort(),i);try{const i=yield fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}));return o(i)}finally{clearTimeout(r)}}))(e,r,i);const a=yield fetch(e,r);return o(a)}),post:(e,t,i)=>n(void 0,void 0,void 0,function*(){const n=JSON.stringify(i),o=yield fetch(e,{method:"POST",headers:t,body:n});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},a=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},s=["netboard","board"];class d{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:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return n(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),s=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:"",d=(null==o?void 0:o.userId)?String(o.userId):"",l=this.buildUrl(e,{envId:s,spid:d});try{a("Starting fetching DrEdition ad from URL:",l);const e=yield r.get(l);return a("Fetch operation completed successfully."),e}catch(e){a("Error during fetch operation:",e)}return null})}}class l{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,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},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 n(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 c=e=>new URLSearchParams(window.location.search).get(e),u=e=>{if("0"===c("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")&&(()=>{const e=document.querySelector(".advertory-wallpaper-background");e&&e.remove()})())},v=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"))},p=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):a("Dr. Edition container does not have a parent element, cannot remove height lock.")};class g{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return n(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,s=e.querySelector(o);if(!s)return void a(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(t);return(null==d?void 0:d.itemId)||r?!(null==d?void 0:d.itemId)&&r?(a("No Dr. Edition ads available to render. Collapsing whole placement."),u(e.id),void p(s)):((null==d?void 0:d.itemId)&&r&&(a("Dr. Edition ad available to render as a Xandr backfill."),v(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(s,d,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),p(s),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):p(s))):(a("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(s),this.showBackfill(e),void p(s))})}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:"";v(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}}const m=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 a("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(a("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{a("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{a("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);a("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),h="no",y="se",w="cmp:loaded";let f="undefined"!=typeof window?window._tcf_:void 0,b=!1;const E=(e,t,i)=>{const o=!!(null==e?void 0:e.enabled),r=(null==e?void 0:e.timeout)||3e3,s=c("bypass_tcf"),d=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(a("TCF bypass param detected, returning consent: true"),!0):(a("TCF is not enabled, returning consent: true"),!0))(o,s))return!0;if(b)return null;if(!f)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=f.getConsentedToAllSync();return a(`TCF consented to all is: ${t}`),f.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(a("Getting TCF consent manager..."),window._tcf_)return a("TCF consent manager is already available"),f=window._tcf_,void e(f);a("TCF consent manager is not available");const n=()=>{a("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(f=window._tcf_,e(f)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(w,n),b=!0,t(new Error("Timeout waiting for CMP to load"))},r);a("Listening for CMP loaded event..."),document.addEventListener(w,n,{once:!0})}):Promise.resolve(null),getConsentSync:d,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return a(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===h;if(t||n)return a("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield m(e);if(!(null==e?void 0:e.enabled))return!0;const o=d();return null!==o?o:yield new Promise((e,t)=>{try{if(!f)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(()=>{a("TCF isConsentedToAll timed out, resolving with false"),n(!1)},r);f.onTcfReady(()=>{a("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),f.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},P=(e,t,i,...o)=>n(void 0,[e,t,i,...o],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return a(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return a(`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}=E(e,0,n);return(yield o())?(a(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(a(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),C="mobile";class T{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,i){return n(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:n}=E(i.tcf,i.isMobileApp,i.country),o=yield n(),r=i.device===C?t.mobileHTML:t.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var n,o,r;e.search=null!==(r=null===(o=(n=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(n,e,t,i))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,i)})})}}class I{constructor(e){this.strategy=e}handle(e,t){return n(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 n(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,i=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!i)try{yield((e,...t)=>n(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=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}))(t)}catch(e){a("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return n(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 s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}class j{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,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:i.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(e,t,i,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,v):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(e,t,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,t,i,"click");this.pulse.trackLegacyClickUIElement?null===(o=(n=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(n,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}}class S extends j{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:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:v,urlPath:p}=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:[s,a,v,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:v,urlPath:p},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}class k extends j{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,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=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:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,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,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:v,url:p,probability:g}={}}=t,m=Math.floor(Date.now()/1e3),h=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),w=this.getTeaserElementText(e,"image"),f=null!==(s=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:p)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:f,placement:n.editionName,subtitle:y,time:m,title:h,type:i,imageUrl:w,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}}const A="svd",L="vg",O="aftonbladet",U="e24",M="front",_=e=>n(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)))}))}),N={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 n(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return K})})}})}};class D{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){yield n(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 s=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var l,c;c=d,null==(l=s)||l.forEach(e=>{N[e](c)});const u={id:t,node:i,autoplay:o,mute:r,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},v=yield _(u);v.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(v,s)}),v.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"]})}),v.once("PulseStats:ready",()=>n(this,void 0,void 0,function*(){const e=yield v.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===M?"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 V="https://www.aftonbladet.se/video-player-extras/latest/";class x{handleVideo(e,t){return n(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:{[`${V}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${V}external-link.js`]:{name:"ExternalLink"}}};yield _(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 B=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class R{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){const s={id:t,node:i,autoplay:o,mute:r,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},B(e)?e:{}),{provider:Object.assign(Object.assign({},B(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 _(s);d.once("PulseStats:ready",()=>n(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===M?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class ${handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const F=(e,t,n)=>{const{publisher:i,pageType:o,country:r}=e,a={[L]:new l,[U]:new D,[O]:new x,[A]:new R}[i]||new $,s=new(r===y?S:k)(n,a,o),c=new d(t,n),u=new T(a,s),v=new I(a);return new g(c,u,v,s)},q=({editionName:n,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const s=(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=s(r,"data-pulse"),l=s(a,"data");return e("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":n},d,l,{children:[t("div",{className:"inscreen-target"}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},H=()=>n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"==typeof window)return void e(void 0);if(window.schAccount)return void e(window.schAccount);if(window.Identity)return void e(window.Identity);if(window.schIdentity)return void e(window.schIdentity);const t=new AbortController;window.addEventListener("schAccount:ready",()=>{t.abort(),e(window.schAccount)},{once:!0,signal:t.signal}),window.addEventListener("identity-initialized",()=>{t.abort(),e(window.Identity)},{once:!0,signal:t.signal}),window.addEventListener("schIdentity:ready",()=>{t.abort(),e(window.schIdentity)},{once:!0,signal:t.signal})})});class z{constructor(e){this.account=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this)}getIdentityUser(){return n(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.account)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return a("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return n(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.account)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}}const W=(e,t,n)=>{const{wrapperSelector:i}=e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=F(n,i,o);e.forEach(e=>{var i,o;if(!e.isIntersecting)return;const a=e.target,s=null!==(i=a.dataset.editionName)&&void 0!==i?i:"",d=null!==(o=a.dataset.pulseColumnname)&&void 0!==o?o:"",l=Number(a.dataset.pulsePrimaryposition)||0;r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:s,columnName:d,primaryPosition:l})),t.unobserve(a)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},J=[],Q=(e,t)=>n(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,account:d,pageContext:{deviceType:l,publisher:c,pageType:u,countryCode:v,isMobileApp:p}}=e;if(!(yield P(o,p,v,"handleDrEditionBackfill")))return;const g=((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,l=r[o]||r.desktop,c=(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})(t.targetId),u=l.find(e=>e.targetId===c),v=s.some(e=>c.startsWith(e)),p=J.includes(c),g=(null===(i=null==u?void 0:u.drEdition)||void 0===i?void 0:i.editionName)||d;return u&&v&&!p&&g?(J.push(c),Object.assign(Object.assign({},u),{drEdition:Object.assign(Object.assign({},u.drEdition),{editionName:g})})):null})(e,t);if(!g)return;if(!(null==i?void 0:i.instance))return void a("Pulse has not been passed as a prop, aborting");const m=(null==d?void 0:d.getAccountSdk)?yield d.getAccountSdk():yield H(),h=new z(m),y=F({publisher:c,pageType:u,country:v},h,null==i?void 0:i.instance),w=document.getElementById(t.targetId);if(!w||!r)return;w.classList.value="";const f=document.createElement("div");f.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),w.innerHTML=f.outerHTML;const b={editionName:(null===(n=null==g?void 0:g.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:l,tcf:o,isMobileApp:p,country:v,renderAsBackfill:!0};yield y.fetchAndRenderAd(w,b)}),G=e=>n(void 0,[e],void 0,function*({drEdition:e,pageContext:t,account:n,tcf:i,pulse:o}){if(!e)return;if(!(yield P(i,t.isMobileApp,t.countryCode,"handleDrEdition")))return;const r=(null==n?void 0:n.getAccountSdk)?yield n.getAccountSdk():yield H(),a=new z(r);W({publisher:t.publisher,drEditionConfig:e,device:t.deviceType,pageType:t.pageType,country:t.countryCode},a,null==o?void 0:o.instance)}),X=(e,t)=>{var i,o,r;if(!(()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})())return void a("Ad block not enabled, Dr. Edition backfills will not be rendered");a("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:s},finnBlink:d}=e,l=null===(o=null===(i=null==d?void 0:d.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===o?void 0:o[s],c=null!==(r=null==l?void 0:l.map(([e])=>e))&&void 0!==r?r:[],u=new IntersectionObserver((t,i)=>n(void 0,void 0,void 0,function*(){for(const n of t){if(!n.isIntersecting)continue;const t=n.target;i.unobserve(t),yield Q(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!c.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&u.observe(t)})};const Z=function(e){if("undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}("[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 K=Object.freeze({__proto__:null,default:Z});export{q as DrEdition,F as getDrEditionManager,G as handleDrEdition,Q as handleDrEditionBackfill,X as handleDrEditionBackfillOnAdblock};
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{d(i.next(e))}catch(e){r(e)}}function s(e){try{d(i.throw(e))}catch(e){r(e)}}function d(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}d((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const i="opaque",o=e=>n(void 0,void 0,void 0,function*(){if(e.type!==i){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),r={get:(e,...t)=>n(void 0,[e,...t],void 0,function*(e,t={}){var{timeout:i}=t,r=function(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}(t,["timeout"]);if(i)return((e,t,i)=>n(void 0,void 0,void 0,function*(){const n=new AbortController,r=setTimeout(()=>n.abort(),i);try{const i=yield fetch(e,Object.assign(Object.assign({},t),{signal:n.signal}));return o(i)}finally{clearTimeout(r)}}))(e,r,i);const a=yield fetch(e,r);return o(a)}),post:(e,t,i)=>n(void 0,void 0,void 0,function*(){const n=JSON.stringify(i),o=yield fetch(e,{method:"POST",headers:t,body:n});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},a=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},s=["netboard","board"];class d{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:[]),s=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:d,spid:l}=t;return s.searchParams.append("editionName",o),r&&s.searchParams.append("urlData",r),a&&s.searchParams.append("excludedItems",a),l&&s.searchParams.append("spid",l),d&&s.searchParams.append("envid",d),s.toString()}fetchData(e){return n(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),s=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:"",d=(null==o?void 0:o.userId)?String(o.userId):"",l=this.buildUrl(e,{envId:s,spid:d});try{a("Starting fetching DrEdition ad from URL:",l);const e=yield r.get(l);return a("Fetch operation completed successfully."),e}catch(e){a("Error during fetch operation:",e)}return null})}}class l{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,s=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:s},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 n(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 c=e=>new URLSearchParams(window.location.search).get(e),u=e=>{if("0"===c("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")&&(()=>{const e=document.querySelector(".advertory-wallpaper-background");e&&e.remove()})())},v=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"))},p=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):a("Dr. Edition container does not have a parent element, cannot remove height lock.")};class g{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return n(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,s=e.querySelector(o);if(!s)return void a(`Container with selector "${o}" not found.`);const d=yield this.drEditionService.fetchData(t);return(null==d?void 0:d.itemId)||r?!(null==d?void 0:d.itemId)&&r?(a("No Dr. Edition ads available to render. Collapsing whole placement."),u(e.id),void p(s)):((null==d?void 0:d.itemId)&&r&&(a("Dr. Edition ad available to render as a Xandr backfill."),v(e.id)),void(d?(d.css&&((e,t)=>{const n=document.createElement("link");n.rel="preload",n.href=e,n.as=t,document.head.appendChild(n)})(d.css,"style"),yield this.rendererManager.render(s,d,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),p(s),this.drEditionAds.push(d),window.advertory=window.advertory||{},window.advertory.renderedDrEditionAds=window.advertory.renderedDrEditionAds||[],window.advertory.renderedDrEditionAds.push(d.itemId),this.observeAdView(e,d,t),null===(i=e.querySelector("a"))||void 0===i||i.addEventListener("pointerup",()=>null)):p(s))):(a("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(s),this.showBackfill(e),void p(s))})}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:"";v(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}}const m=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 a("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(a("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{a("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{a("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);a("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),h="no",y="se",w="cmp:loaded";let f="undefined"!=typeof window?window._tcf_:void 0,b=!1;const E=(e,t,i)=>{const o=!!(null==e?void 0:e.enabled),r=(null==e?void 0:e.timeout)||3e3,s=c("bypass_tcf"),d=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(a("TCF bypass param detected, returning consent: true"),!0):(a("TCF is not enabled, returning consent: true"),!0))(o,s))return!0;if(b)return null;if(!f)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=f.getConsentedToAllSync();return a(`TCF consented to all is: ${t}`),f.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(a("Getting TCF consent manager..."),window._tcf_)return a("TCF consent manager is already available"),f=window._tcf_,void e(f);a("TCF consent manager is not available");const n=()=>{a("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(f=window._tcf_,e(f)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(w,n),b=!0,t(new Error("Timeout waiting for CMP to load"))},r);a("Listening for CMP loaded event..."),document.addEventListener(w,n,{once:!0})}):Promise.resolve(null),getConsentSync:d,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return a(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&i===h;if(t||n)return a("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield m(e);if(!(null==e?void 0:e.enabled))return!0;const o=d();return null!==o?o:yield new Promise((e,t)=>{try{if(!f)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(()=>{a("TCF isConsentedToAll timed out, resolving with false"),n(!1)},r);f.onTcfReady(()=>{a("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),f.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},P=(e,t,i,...o)=>n(void 0,[e,t,i,...o],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return a(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return a(`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}=E(e,0,n);return(yield o())?(a(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(a(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),C="mobile";class T{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,i){return n(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:n}=E(i.tcf,i.isMobileApp,i.country),o=yield n(),r=i.device===C?t.mobileHTML:t.desktopHTML;const a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var n,o,r;e.search=null!==(r=null===(o=(n=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(n,e,t,i))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,i)})})}}class I{constructor(e){this.strategy=e}handle(e,t){return n(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 n(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,i=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!i)try{yield((e,...t)=>n(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=()=>{s(),n()},a=()=>{s(),i(new Error(`Failed to load ${e}`))},s=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(d)};o.addEventListener("load",r),o.addEventListener("error",a);const d=setTimeout(()=>{s(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}))(t)}catch(e){a("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return n(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 s=document.querySelector(".dr-edition-preview .preview-video");return!!s&&(s.setAttribute("src",r),s.setAttribute("playsinline",""),!(!s||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,s),!0))}}class j{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,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:i.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const v=this.getEventInput(e,t,i,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,v):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(d=null===(s=this.pulse)||void 0===s?void 0:s.trackViewUIElement)||void 0===d||d.call(s,v):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,v)})}trackContentClick(e,t,i){return n(this,void 0,void 0,function*(){var n,o,r,a,s,d;if(!this.pulse)return;const l=this.getEventInput(e,t,i,"click");this.pulse.trackLegacyClickUIElement?null===(o=(n=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(n,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(d=(s=this.pulse).trackElementClick)||void 0===d||d.call(s,l)})}}class S extends j{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:s="",creativeId:d,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:v,urlPath:p}=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:[s,a,v,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:s,"spt:creativeId":d,pageTitle:a,publicUrl:v,urlPath:p},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}}class k extends j{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,s,d;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,v=n.editionName,p=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:v,"@type":"UIElement",position:v,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:v,"@type":p,url:location.origin},tags:null===(d=null===(s=this.newsroomStrategy)||void 0===s?void 0:s.getTags)||void 0===d?void 0:d.call(s,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,s;const{pulseData:{algorithm:d="sov",clientName:l,creativeId:c,editionId:u,itemId:v,url:p,probability:g}={}}=t,m=Math.floor(Date.now()/1e3),h=this.getTeaserElementText(e,"title"),y=this.getTeaserElementText(e,"subtitle"),w=this.getTeaserElementText(e,"image"),f=null!==(s=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:p)&&void 0!==s?s:"";return{algorithm:d,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:v,link:f,placement:n.editionName,subtitle:y,time:m,title:h,type:i,imageUrl:w,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}}const A="svd",L="vg",O="aftonbladet",U="e24",M="front",_=e=>n(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)))}))}),x={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 n(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return K})})}})}};class N{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){yield n(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 s=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var l,c;c=d,null==(l=s)||l.forEach(e=>{x[e](c)});const u={id:t,node:i,autoplay:o,mute:r,vendor:a,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},v=yield _(u);v.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(v,s)}),v.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"]})}),v.once("PulseStats:ready",()=>n(this,void 0,void 0,function*(){const e=yield v.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===M?"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 D="https://www.aftonbladet.se/video-player-extras/latest/";class V{handleVideo(e,t){return n(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:{[`${D}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${D}external-link.js`]:{name:"ExternalLink"}}};yield _(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 B=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);class R{handleVideo(e,t){return n(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:i,autoplay:o,mute:r,vendor:a}}){const s={id:t,node:i,autoplay:o,mute:r,vendor:a,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},B(e)?e:{}),{provider:Object.assign(Object.assign({},B(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 _(s);d.once("PulseStats:ready",()=>n(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===M?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class ${handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const F=(e,t,n)=>{const{publisher:i,pageType:o,country:r}=e,a={[L]:new l,[U]:new N,[O]:new V,[A]:new R}[i]||new $,s=new(r===y?S:k)(n,a,o),c=new d(t,n),u=new T(a,s),v=new I(a);return new g(c,u,v,s)},q=({editionName:n,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const s=(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=s(r,"data-pulse"),l=s(a,"data");return e("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":n},d,l,{children:[t("div",{className:"inscreen-target"}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},H=()=>n(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 z{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 n(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 a("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return n(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 W=(e,t,n)=>{const{wrapperSelector:i}=e.drEditionConfig.options,o=document.querySelectorAll(i),r=new IntersectionObserver((i,o)=>((e,t,n,i,o)=>{const r=F(n,i,o);e.forEach(e=>{var i,o;if(!e.isIntersecting)return;const a=e.target,s=null!==(i=a.dataset.editionName)&&void 0!==i?i:"",d=null!==(o=a.dataset.pulseColumnname)&&void 0!==o?o:"",l=Number(a.dataset.pulsePrimaryposition)||0;r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:s,columnName:d,primaryPosition:l})),t.unobserve(a)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},J=[],Q=(e,t)=>n(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,pageContext:{deviceType:d,publisher:l,pageType:c,countryCode:u,isMobileApp:v}}=e;if(!(yield P(o,v,u,"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,l=r[o]||r.desktop,c=(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})(t.targetId),u=l.find(e=>e.targetId===c),v=s.some(e=>c.startsWith(e)),p=J.includes(c),g=(null===(i=null==u?void 0:u.drEdition)||void 0===i?void 0:i.editionName)||d;return u&&v&&!p&&g?(J.push(c),Object.assign(Object.assign({},u),{drEdition:Object.assign(Object.assign({},u.drEdition),{editionName:g})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void a("Pulse has not been passed as a prop, aborting");const g=yield H(),m=new z(g),h=F({publisher:l,pageType:c,country:u},m,null==i?void 0:i.instance),y=document.getElementById(t.targetId);if(!y||!r)return;y.classList.value="";const w=document.createElement("div");w.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),y.innerHTML=w.outerHTML;const f={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:d,tcf:o,isMobileApp:v,country:u,renderAsBackfill:!0};yield h.fetchAndRenderAd(y,f)}),G=e=>n(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield P(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield H(),i=new z(n);W({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)}),X=(e,t)=>{var i,o,r;if(!(()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)})())return void a("Ad block not enabled, Dr. Edition backfills will not be rendered");a("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:s},finnBlink:d}=e,l=null===(o=null===(i=null==d?void 0:d.replacementConfig)||void 0===i?void 0:i.adsToReplace)||void 0===o?void 0:o[s],c=null!==(r=null==l?void 0:l.map(([e])=>e))&&void 0!==r?r:[],u=new IntersectionObserver((t,i)=>n(void 0,void 0,void 0,function*(){for(const n of t){if(!n.isIntersecting)continue;const t=n.target;i.unobserve(t),yield Q(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!c.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&u.observe(t)})};const Z=function(e){if("undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}("[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 K=Object.freeze({__proto__:null,default:Z});export{q as DrEdition,F as getDrEditionManager,G as handleDrEdition,Q as handleDrEditionBackfill,X as handleDrEditionBackfillOnAdblock};
|