@schibsted/advertory 3.10.2 → 3.10.4

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.
Files changed (439) hide show
  1. package/ad-native/cjs/index.js +1 -1
  2. package/ad-native/es/index.js +1 -1
  3. package/aftenposten/cjs/index.d.ts +1 -0
  4. package/aftenposten/cjs/index.js +1 -1
  5. package/aftenposten/es/{_auto-entry_aftenposten-CfxmA6Sz.js → _auto-entry_aftenposten-DL8rALPn.js} +1 -1
  6. package/aftenposten/es/{events-D5BK_FjH.js → events-CKshwdEl.js} +1 -1
  7. package/aftenposten/es/{index-B7fWQoNH.js → index-BiEOoFhy.js} +1 -1
  8. package/aftenposten/es/{index-CD8kgVAe.js → index-BsRZWoiy.js} +1 -1
  9. package/aftenposten/es/{index-D7LDwNiz.js → index-C7yQLsqd.js} +1 -1
  10. package/aftenposten/es/{index-CRIkhrs0.js → index-CRz7N1Dq.js} +1 -1
  11. package/aftenposten/es/{index-CLz2ZrJo.js → index-CcErOtZ9.js} +1 -1
  12. package/{aftonbladet/es/index-AcwQn_AF.js → aftenposten/es/index-DQ-8qUh4.js} +1 -1
  13. package/aftenposten/es/index-Do3SX6XR.js +1 -0
  14. package/aftenposten/es/{index-ovJpscDM.js → index-MKoWC2rP.js} +1 -1
  15. package/aftenposten/es/{index-fXD-E25z.js → index-PSVOQ1x-.js} +1 -1
  16. package/aftenposten/es/index.d.ts +1 -0
  17. package/aftenposten/es/index.js +1 -1
  18. package/aftenposten/es/{styles-BLC6D36_.js → styles-3WxKkjjH.js} +1 -1
  19. package/aftenposten/es/{styles-lBs-Vv6p.js → styles-BBy_Knsh.js} +1 -1
  20. package/aftenposten/es/styles-BJ1R2itC.js +1 -0
  21. package/aftenposten/es/{styles-BuBHRZAA.js → styles-BngE3R74.js} +1 -1
  22. package/aftenposten/es/{styles-DKDtEErf.js → styles-BpQegAFC.js} +1 -1
  23. package/aftenposten/es/{styles-0TG4Gt1h.js → styles-C0gnBEwg.js} +1 -1
  24. package/aftenposten/es/{styles-BE8Jhsvc.js → styles-CPj6ybDS.js} +1 -1
  25. package/aftenposten/es/{styles-CQVBlvO-.js → styles-DdjbcoCw.js} +1 -1
  26. package/aftenposten/es/{styles-DiMWswaB.js → styles-DhNN6Nbg.js} +1 -1
  27. package/aftenposten/es/{styles-CENeKsau.js → styles-ku50fFmX.js} +1 -1
  28. package/aftenposten/styles.css +1 -1
  29. package/aftenpostenv2/es/{_auto-entry_aftenpostenv2-DpSt04Hy.js → _auto-entry_aftenpostenv2-D9-muS7s.js} +1 -1
  30. package/aftenpostenv2/es/{events-DNBenqqw.js → events-Dh_YbWWV.js} +1 -1
  31. package/aftenpostenv2/es/{index-xmDgfcm6.js → index-B4XxEIvY.js} +1 -1
  32. package/aftenpostenv2/es/{index-iu7u8q3_.js → index-BJogqJqT.js} +1 -1
  33. package/aftenpostenv2/es/{index-BuO48dsR.js → index-BaF9v2-5.js} +1 -1
  34. package/aftenpostenv2/es/{index-CSemVhhs.js → index-ByDXrHOv.js} +1 -1
  35. package/aftenpostenv2/es/{index-BH9Q1LRu.js → index-C5uWP3iI.js} +1 -1
  36. package/aftenpostenv2/es/{index-BvFRch7F.js → index-CQ8OIYRt.js} +1 -1
  37. package/{aftonbladetv2/es/index-DhC3vj9h.js → aftenpostenv2/es/index-Dc1zEK0m.js} +1 -1
  38. package/aftenpostenv2/es/index-TftiQjJL.js +1 -0
  39. package/aftenpostenv2/es/{index-padX4wW4.js → index-opGJv9Fp.js} +1 -1
  40. package/aftenpostenv2/es/index.d.ts +1 -0
  41. package/aftenpostenv2/es/index.js +1 -1
  42. package/aftenpostenv2/es/{styles-CVpMqPrZ.js → styles-0xW1lK1-.js} +1 -1
  43. package/aftenpostenv2/es/{styles-CEy2oTnP.js → styles-Bd0a1ltv.js} +1 -1
  44. package/aftenpostenv2/es/{styles-B8ZvEgHw.js → styles-CU4Feq-D.js} +1 -1
  45. package/aftenpostenv2/es/{styles-B0k9t7dS.js → styles-CWcROYn2.js} +1 -1
  46. package/aftenpostenv2/es/{styles-ZAsWjqFd.js → styles-C_KGtVna.js} +1 -1
  47. package/aftenpostenv2/es/{styles-D670f_yr.js → styles-CaFWvqf4.js} +1 -1
  48. package/aftenpostenv2/es/{styles-BRb-b463.js → styles-DGqwVg6-.js} +1 -1
  49. package/aftenpostenv2/es/styles-DSIEM1Bb.js +1 -0
  50. package/aftenpostenv2/es/{styles-m_bOPe3-.js → styles-Ds1rjF0m.js} +1 -1
  51. package/aftenpostenv2/es/{styles-NHzn3GB0.js → styles-Ne1kSYOg.js} +1 -1
  52. package/aftenpostenv2/styles.css +1 -1
  53. package/aftonbladet/cjs/index.d.ts +1 -0
  54. package/aftonbladet/cjs/index.js +1 -1
  55. package/aftonbladet/es/{_auto-entry_aftonbladet-CR16KCDx.js → _auto-entry_aftonbladet-754pFkBn.js} +1 -1
  56. package/aftonbladet/es/{events-Bvh_6jxa.js → events-h9MrTwwR.js} +1 -1
  57. package/aftonbladet/es/{index-EKC-Twlr.js → index-7LMyLpgS.js} +1 -1
  58. package/aftonbladet/es/{index-DYNB-45Y.js → index-B1ZD2d6M.js} +1 -1
  59. package/aftonbladet/es/{index-CCWI9z3_.js → index-BRp75dk6.js} +1 -1
  60. package/aftonbladet/es/{index-BAVT-rAm.js → index-BrwmO7aY.js} +1 -1
  61. package/{aftenposten/es/index-Bo60x3kZ.js → aftonbladet/es/index-Bzxg0htc.js} +1 -1
  62. package/aftonbladet/es/{index-D5pZNy1E.js → index-C74skELM.js} +1 -1
  63. package/aftonbladet/es/{index-B1ERZvIq.js → index-ClJ_m2Dg.js} +1 -1
  64. package/aftonbladet/es/index-DNZU8kX3.js +1 -0
  65. package/aftonbladet/es/{index-B0biY21K.js → index-DulaPeP5.js} +1 -1
  66. package/aftonbladet/es/index.d.ts +1 -0
  67. package/aftonbladet/es/index.js +1 -1
  68. package/aftonbladet/es/{styles-D9xQPSiV.js → styles-C221Itv_.js} +1 -1
  69. package/aftonbladet/es/{styles-dm8JPLdN.js → styles-CHz4FL44.js} +1 -1
  70. package/aftonbladet/es/{styles-WvWD9ESg.js → styles-CiHBP658.js} +1 -1
  71. package/aftonbladet/es/{styles-CmEYksOo.js → styles-CwaWlNGG.js} +1 -1
  72. package/aftonbladet/es/{styles-Pf7GGY1D.js → styles-DrLqd9EL.js} +1 -1
  73. package/aftonbladet/es/styles-VzaqYQ_r.js +1 -0
  74. package/aftonbladetv2/es/{_auto-entry_aftonbladetv2-DNYykorK.js → _auto-entry_aftonbladetv2-DBukjFYQ.js} +1 -1
  75. package/aftonbladetv2/es/{events-Dw9ZbynX.js → events-CKEqQJez.js} +1 -1
  76. package/aftonbladetv2/es/{index-BotJKtLK.js → index-BGafnHb0.js} +1 -1
  77. package/aftonbladetv2/es/{index-Chmtx3Ub.js → index-Bh5DpcLJ.js} +1 -1
  78. package/aftonbladetv2/es/{index-ftxi3ksg.js → index-BpNkuePN.js} +1 -1
  79. package/aftonbladetv2/es/{index-DUyfv07Q.js → index-C6XMBVdY.js} +1 -1
  80. package/aftonbladetv2/es/{index-DPjtzM_d.js → index-CUR1ueB4.js} +1 -1
  81. package/aftonbladetv2/es/{index-WTmQL0-f.js → index-D95K_NLa.js} +1 -1
  82. package/aftonbladetv2/es/{index-CtnO8QSI.js → index-DC5RUNKG.js} +1 -1
  83. package/{aftenpostenv2/es/index-CovGINUT.js → aftonbladetv2/es/index-XpRuPOIE.js} +1 -1
  84. package/aftonbladetv2/es/index-_sfuxBPo.js +1 -0
  85. package/aftonbladetv2/es/index.d.ts +1 -0
  86. package/aftonbladetv2/es/index.js +1 -1
  87. package/aftonbladetv2/es/{styles-BkftGGMD.js → styles-B-cqQ6PQ.js} +1 -1
  88. package/aftonbladetv2/es/{styles-D5SbeQZq.js → styles-BVp0loXs.js} +1 -1
  89. package/aftonbladetv2/es/{styles-CVRa5YlA.js → styles-Bbb349Zp.js} +1 -1
  90. package/aftonbladetv2/es/{styles-D7lpavUi.js → styles-CC1TcSmD.js} +1 -1
  91. package/aftonbladetv2/es/{styles-kBEWQbuF.js → styles-Dxd14Xg_.js} +1 -1
  92. package/aftonbladetv2/es/styles-lSfEYjsL.js +1 -0
  93. package/bt/cjs/index.d.ts +1 -0
  94. package/bt/cjs/index.js +1 -1
  95. package/bt/es/{_auto-entry_bt-BK7Unx_d.js → _auto-entry_bt-e8-IueAI.js} +1 -1
  96. package/bt/es/{events-DuZUIBSC.js → events-BDwOMdUr.js} +1 -1
  97. package/{sa/es/index-B_kX-D9U.js → bt/es/index-BN-gT1g1.js} +1 -1
  98. package/bt/es/{index-DTuerL5f.js → index-BltGvt2y.js} +1 -1
  99. package/bt/es/index-CBo2RYnY.js +1 -0
  100. package/bt/es/{index-BR0gAgOE.js → index-CO4Nm_SW.js} +1 -1
  101. package/bt/es/{index-Dx9slRzW.js → index-CiewTuJW.js} +1 -1
  102. package/{sa/es/index-CvRkm6hO.js → bt/es/index-CivH-P0-.js} +1 -1
  103. package/{sa/es/index-CcWwfCfX.js → bt/es/index-Dpcgtwfd.js} +1 -1
  104. package/bt/es/{index-CNVHNPdL.js → index-DrLhIjg1.js} +1 -1
  105. package/bt/es/{index-BX7nDIU6.js → index-TRgMiD_q.js} +1 -1
  106. package/bt/es/index.d.ts +1 -0
  107. package/bt/es/index.js +1 -1
  108. package/{sa/es/styles-Ct0gNo_w.js → bt/es/styles-B0uzGCli.js} +1 -1
  109. package/bt/es/{styles-CGrq08M4.js → styles-B6CzlGYf.js} +1 -1
  110. package/{sa/es/styles-C35eDf0k.js → bt/es/styles-BNBjySJ2.js} +1 -1
  111. package/bt/es/{styles-BWFXPAcu.js → styles-BYwFW3EY.js} +1 -1
  112. package/bt/es/styles-CHFjfz-8.js +1 -0
  113. package/bt/es/{styles-CJA_lrQl.js → styles-D6f1Tshv.js} +1 -1
  114. package/bt/es/{styles-vfpH8IhJ.js → styles-IQRP9tep.js} +1 -1
  115. package/{sa/es/styles-DJyevuPj.js → bt/es/styles-aSp9N8W_.js} +1 -1
  116. package/bt/es/{styles-BvMG41ze.js → styles-zckbViUk.js} +1 -1
  117. package/bt/styles.css +1 -1
  118. package/btv2/es/{_auto-entry_btv2-DDlJ2rNT.js → _auto-entry_btv2-BQO_a2LS.js} +1 -1
  119. package/{omni/es/events-s7M_BIZf.js → btv2/es/events-BNKlDxcQ.js} +1 -1
  120. package/btv2/es/{index-Di77ZZwe.js → index-B1yhDuaz.js} +1 -1
  121. package/btv2/es/{index-bsdtXr9s.js → index-BmaQhSWV.js} +1 -1
  122. package/{omni/es/index-DbU616q2.js → btv2/es/index-CHSjbB7u.js} +1 -1
  123. package/btv2/es/{index-CXBlT7aa.js → index-CV0xCDVd.js} +1 -1
  124. package/{omni/es/index-G1VotTxH.js → btv2/es/index-DDxlIt-1.js} +1 -1
  125. package/btv2/es/index-DI7iQH7u.js +1 -0
  126. package/btv2/es/{index-C0R90pvz.js → index-DoW_0uCA.js} +1 -1
  127. package/{omni/es/index-BGv9kjCm.js → btv2/es/index-chyJu-hG.js} +1 -1
  128. package/{vgv2/es/index-Da4oVrjM.js → btv2/es/index-uWVB_DMp.js} +1 -1
  129. package/btv2/es/index.d.ts +1 -0
  130. package/btv2/es/index.js +1 -1
  131. package/btv2/es/{styles-CWelmzPA.js → styles-ChHM-fQH.js} +1 -1
  132. package/btv2/es/{styles-Dpp_lBCH.js → styles-CmktI_qI.js} +1 -1
  133. package/btv2/es/styles-DEYe0L85.js +1 -0
  134. package/{sav2/es/styles-DprmmaR9.js → btv2/es/styles-Dg72BssU.js} +1 -1
  135. package/btv2/es/{styles-B8opdIuf.js → styles-DiPbcYX4.js} +1 -1
  136. package/{sav2/es/styles-CQ6A7ukE.js → btv2/es/styles-NyIOiIF0.js} +1 -1
  137. package/{sav2/es/styles-DqKMHAsS.js → btv2/es/styles-TTV-oonJ.js} +1 -1
  138. package/{sav2/es/styles-BYi6wl_B.js → btv2/es/styles-W4U9meei.js} +1 -1
  139. package/btv2/styles.css +1 -1
  140. package/e24/es/{_auto-entry_e24-O_4Bc5km.js → _auto-entry_e24-DaW99G43.js} +1 -1
  141. package/e24/es/{events-CrQFeT1k.js → events-BruVAt_I.js} +1 -1
  142. package/e24/es/{index-DfJXfpBA.js → index-198Z7tvy.js} +1 -1
  143. package/e24/es/{index-pgnnXWcu.js → index-B4NX4brC.js} +1 -1
  144. package/e24/es/{index-74ld5BQ2.js → index-BY-Kjxbo.js} +1 -1
  145. package/e24/es/{index-D86ttP18.js → index-CqF6FVGy.js} +1 -1
  146. package/e24/es/{index-DBu5NzAR.js → index-DUK3jTd9.js} +1 -1
  147. package/e24/es/{index-Dn24MFLp.js → index-D__ihjUH.js} +1 -1
  148. package/e24/es/index-DcyIjL76.js +1 -0
  149. package/e24/es/{index-Ic7OI_Sr.js → index-DimZGRM1.js} +1 -1
  150. package/e24/es/{index-DOlXP8v2.js → index-ceFkH8FB.js} +1 -1
  151. package/e24/es/index.d.ts +1 -0
  152. package/e24/es/index.js +1 -1
  153. package/e24/es/{styles-CoB5ytG1.js → styles-B-pHNgnz.js} +1 -1
  154. package/e24/es/{styles-DIG0wB9C.js → styles-BIlaaxfv.js} +1 -1
  155. package/e24/es/{styles-jrjuCf_A.js → styles-BJ7qhX48.js} +1 -1
  156. package/e24/es/{styles-UQPGJkgc.js → styles-Bx0mOWx-.js} +1 -1
  157. package/e24/es/{styles-BUVVMkht.js → styles-CQ2Bh4XK.js} +1 -1
  158. package/e24/es/{styles-6M2QJ97O.js → styles-CS76_Hge.js} +1 -1
  159. package/e24/es/{styles-4ETUIe9U.js → styles-CaG7L-Lc.js} +1 -1
  160. package/e24/es/{styles-Dck1P_6i.js → styles-DQ41UtFX.js} +1 -1
  161. package/e24/es/{styles-9904XWpX.js → styles-EN0I8l5E.js} +1 -1
  162. package/{tv4/es/styles-R6HFQW4L.js → e24/es/styles-K4dRu4pa.js} +1 -1
  163. package/e24/es/styles-_mypReYD.js +1 -0
  164. package/fotbollskanalen/cjs/index.d.ts +1 -0
  165. package/fotbollskanalen/cjs/index.js +1 -1
  166. package/fotbollskanalen/es/{_auto-entry_fotbollskanalen-Dd2ZUktK.js → _auto-entry_fotbollskanalen-B7AhPuG0.js} +1 -1
  167. package/fotbollskanalen/es/{events-DARnayac.js → events-q63I9juc.js} +1 -1
  168. package/fotbollskanalen/es/{index-DVYIl4J1.js → index-24FEQhYt.js} +1 -1
  169. package/fotbollskanalen/es/{index-KoIcy_OM.js → index-2nZjxFZx.js} +1 -1
  170. package/fotbollskanalen/es/index-BFR6CG1q.js +1 -0
  171. package/fotbollskanalen/es/{index-BnRtqH81.js → index-BWW4kUpz.js} +1 -1
  172. package/fotbollskanalen/es/{index-oMq_hcQU.js → index-C2kkAg8E.js} +1 -1
  173. package/fotbollskanalen/es/{index-6YGAxy4M.js → index-DBVvxtQD.js} +1 -1
  174. package/fotbollskanalen/es/{index--LOmSqwk.js → index-LmHTNf5t.js} +1 -1
  175. package/fotbollskanalen/es/{index-B-1pnCde.js → index-ji-Yxl7K.js} +1 -1
  176. package/fotbollskanalen/es/{index-BnOqhool.js → index-pwlkSVU9.js} +1 -1
  177. package/fotbollskanalen/es/index.d.ts +1 -0
  178. package/fotbollskanalen/es/index.js +1 -1
  179. package/fotbollskanalen/es/{styles-BzZnBkIV.js → styles-BMtdLwFB.js} +1 -1
  180. package/fotbollskanalen/es/{styles-Vq6mjn9w.js → styles-CHuWBDNb.js} +1 -1
  181. package/fotbollskanalen/es/{styles-COVqK-7B.js → styles-CMZJAkXg.js} +1 -1
  182. package/fotbollskanalen/es/styles-DdB8ezwj.js +1 -0
  183. package/godt/cjs/index.d.ts +1 -0
  184. package/godt/cjs/index.js +1 -1
  185. package/klart/cjs/index.d.ts +1 -0
  186. package/klart/cjs/index.js +1 -1
  187. package/koket/cjs/index.d.ts +1 -0
  188. package/koket/cjs/index.js +1 -1
  189. package/koket/es/{_auto-entry_koket-C6PWUDH1.js → _auto-entry_koket-CHUcVk4k.js} +1 -1
  190. package/koket/es/{events-BmHAioCv.js → events-C5Pd7Op_.js} +1 -1
  191. package/koket/es/index-B4qLaHn8.js +1 -0
  192. package/koket/es/{index-DksR9jJv.js → index-CSDYZ4-v.js} +1 -1
  193. package/{svdv2/es/index-BbJJeO67.js → koket/es/index-CizfDkkz.js} +1 -1
  194. package/koket/es/{index-CiWAwKf0.js → index-D5yqtp-F.js} +1 -1
  195. package/koket/es/{index-W1--RhCx.js → index-D9CADoq6.js} +1 -1
  196. package/koket/es/{index-LyPBDvyr.js → index-GP8xl-Ib.js} +1 -1
  197. package/koket/es/{index-Hb34Fjg8.js → index-ONGwdlTS.js} +1 -1
  198. package/koket/es/{index-JSS6zxGH.js → index-Xwxcm0nr.js} +1 -1
  199. package/koket/es/{index-DA3_TmVi.js → index-kkXTeINz.js} +1 -1
  200. package/koket/es/index.d.ts +1 -0
  201. package/koket/es/index.js +1 -1
  202. package/{svdv2/es/styles-BDu2ZrAm.js → koket/es/styles-BrXO7d5E.js} +1 -1
  203. package/koket/es/{styles-pUhmUrSX.js → styles-Dedx5H8_.js} +1 -1
  204. package/koket/es/styles-DmuX0h0-.js +1 -0
  205. package/koket/es/{styles-Cqj8IPA5.js → styles-Dq-THU6j.js} +1 -1
  206. package/minmote/cjs/index.d.ts +1 -0
  207. package/minmote/cjs/index.js +1 -1
  208. package/omni/es/{_auto-entry_omni-DEbFXIPP.js → _auto-entry_omni-ClQbh_rO.js} +1 -1
  209. package/{tvnu/es/events-C390CeeZ.js → omni/es/events-K84-X9iy.js} +1 -1
  210. package/omni/es/{index-DEJ_hkCf.js → index-AzKgATXQ.js} +1 -1
  211. package/omni/es/index-BWFIf-Ge.js +1 -0
  212. package/{btv2/es/index-Csf1U6vg.js → omni/es/index-BxwDgFDk.js} +1 -1
  213. package/omni/es/{index-BOILkVtF.js → index-C-NG45Ht.js} +1 -1
  214. package/omni/es/{index-Bt_9C7cT.js → index-CGAZnsVW.js} +1 -1
  215. package/omni/es/{index-ByI-pcbZ.js → index-CjL7nCe1.js} +1 -1
  216. package/{sav2/es/index-_14Pynfv.js → omni/es/index-DQTZHJAK.js} +1 -1
  217. package/{btv2/es/index-neAX6nLz.js → omni/es/index-V62k9CJz.js} +1 -1
  218. package/omni/es/{index-DqPMqpt5.js → index-i5bNwQCu.js} +1 -1
  219. package/omni/es/index.d.ts +1 -0
  220. package/omni/es/index.js +1 -1
  221. package/omni/es/{styles-DtUKhhz1.js → styles-aDhDI2Et.js} +1 -1
  222. package/package.json +1 -1
  223. package/pent/cjs/index.d.ts +1 -0
  224. package/pent/cjs/index.js +1 -1
  225. package/sa/cjs/index.d.ts +1 -0
  226. package/sa/cjs/index.js +1 -1
  227. package/sa/es/{_auto-entry_sa-BkYbwAd1.js → _auto-entry_sa-Dc-In2OF.js} +1 -1
  228. package/sa/es/{events-CgE-hy7W.js → events-CKiSdJoo.js} +1 -1
  229. package/{bt/es/index-BIZrLSm4.js → sa/es/index-B1Ws6f_s.js} +1 -1
  230. package/sa/es/{index-PfCWrlNE.js → index-BQHzcXJ2.js} +1 -1
  231. package/{bt/es/index-BQAhJ1I3.js → sa/es/index-Bh4-7vma.js} +1 -1
  232. package/sa/es/{index-DUaOfqg_.js → index-C3TpsmE2.js} +1 -1
  233. package/sa/es/index-C_bDdAMb.js +1 -0
  234. package/sa/es/{index-DjZul_dC.js → index-CkMf4WD2.js} +1 -1
  235. package/sa/es/{index-UFQEw2S6.js → index-D20o_2rd.js} +1 -1
  236. package/{vg/es/index-PGqNtXNR.js → sa/es/index-DnQvDaJo.js} +1 -1
  237. package/{bt/es/index-pIhy6ZDE.js → sa/es/index-cGudvEkp.js} +1 -1
  238. package/sa/es/index.d.ts +1 -0
  239. package/sa/es/index.js +1 -1
  240. package/sa/es/styles-B3ZB5BM-.js +1 -0
  241. package/{bt/es/styles-mp7-tauJ.js → sa/es/styles-B_C57SkF.js} +1 -1
  242. package/sa/es/{styles-BnpxSiqe.js → styles-C6Mw-uSI.js} +1 -1
  243. package/{vg/es/styles-yPGwfMKh.js → sa/es/styles-C_9smbav.js} +1 -1
  244. package/sa/es/{styles-DlMSCcQC.js → styles-CpmvL_u2.js} +1 -1
  245. package/{vg/es/styles-DO1WM037.js → sa/es/styles-CziTZvov.js} +1 -1
  246. package/{bt/es/styles-DQxXSt_E.js → sa/es/styles-DELF0LDV.js} +1 -1
  247. package/sa/es/{styles-DDUNXGZu.js → styles-xYLH0saz.js} +1 -1
  248. package/sa/es/{styles-CddaurTU.js → styles-zLDn9QrS.js} +1 -1
  249. package/sa/styles.css +1 -1
  250. package/sav2/es/{_auto-entry_sav2-DAAErDbm.js → _auto-entry_sav2-DtgZTpCX.js} +1 -1
  251. package/sav2/es/{events-Cm6_V0Bn.js → events-ClEyD3PE.js} +1 -1
  252. package/sav2/es/{index-DmgVfc-L.js → index-32kxBneG.js} +1 -1
  253. package/{vgv2/es/index-D6O720Nu.js → sav2/es/index-B-yHn3Ol.js} +1 -1
  254. package/sav2/es/{index-emj7a3AL.js → index-BgEZdYjJ.js} +1 -1
  255. package/sav2/es/{index-Murg4k2B.js → index-BuWnN9kT.js} +1 -1
  256. package/{btv2/es/index-BxtryKML.js → sav2/es/index-C88xRU8g.js} +1 -1
  257. package/sav2/es/{index-CqqCCuAs.js → index-Cb4_yHYB.js} +1 -1
  258. package/sav2/es/index-CzTrvGcG.js +1 -0
  259. package/{btv2/es/index-BhVu3nAT.js → sav2/es/index-D7i_LdOr.js} +1 -1
  260. package/sav2/es/{index-B39uzh-E.js → index-TeDlG84u.js} +1 -1
  261. package/sav2/es/index.d.ts +1 -0
  262. package/sav2/es/index.js +1 -1
  263. package/{vgv2/es/styles-GSHPW9nk.js → sav2/es/styles-2N_b0ian.js} +1 -1
  264. package/sav2/es/{styles-CGVNAf-X.js → styles-BYIyqUGk.js} +1 -1
  265. package/{btv2/es/styles-0IyKaKeC.js → sav2/es/styles-By9LprFO.js} +1 -1
  266. package/{vgv2/es/styles-CeosZ_uD.js → sav2/es/styles-BylxhH3R.js} +1 -1
  267. package/sav2/es/{styles-DTVbU6_f.js → styles-Cs6aUNhI.js} +1 -1
  268. package/{btv2/es/styles-BQFgLvfw.js → sav2/es/styles-DjLzW68o.js} +1 -1
  269. package/sav2/es/styles-DyV53Mgt.js +1 -0
  270. package/{vgv2/es/styles-D1t6uurz.js → sav2/es/styles-Uxg0DKGq.js} +1 -1
  271. package/sav2/styles.css +1 -1
  272. package/svd/cjs/index.d.ts +1 -0
  273. package/svd/cjs/index.js +1 -1
  274. package/svd/es/{_auto-entry_svd-rqHJkFqg.js → _auto-entry_svd-CMxIjpsh.js} +1 -1
  275. package/svd/es/{events-C54D9CLs.js → events-DtyOHM1E.js} +1 -1
  276. package/svd/es/{index-VePBoLTn.js → index-BfJxymh0.js} +1 -1
  277. package/svd/es/{index-B6uzadCk.js → index-CG39ZaEP.js} +1 -1
  278. package/svd/es/{index-DU8extUB.js → index-CP9hJdhw.js} +1 -1
  279. package/svd/es/{index-BVLW4O3t.js → index-CaUFWIsb.js} +1 -1
  280. package/svd/es/{index-CrQOrzCS.js → index-CnDCNmtH.js} +1 -1
  281. package/svd/es/index-Dh0f23Qs.js +1 -0
  282. package/svd/es/{index-i8EH1ugD.js → index-DowJTB-a.js} +1 -1
  283. package/svd/es/{index-DIlIWWka.js → index-rPsuJew4.js} +1 -1
  284. package/svd/es/{index-huEfDuMB.js → index-xHObDpAv.js} +1 -1
  285. package/svd/es/index.d.ts +1 -0
  286. package/svd/es/index.js +1 -1
  287. package/svd/es/{styles-DKlj1xfj.js → styles-CLSGwMPM.js} +1 -1
  288. package/svd/es/{styles-DoJrlftc.js → styles-D3I1JZ2Y.js} +1 -1
  289. package/svd/es/{styles-D9G98plw.js → styles-Dh1baABm.js} +1 -1
  290. package/svd/es/{styles-Cv3Ag4kN.js → styles-DnKliBXl.js} +1 -1
  291. package/{tv4/es/styles-CfjbYsTS.js → svd/es/styles-DoeKKlKm.js} +1 -1
  292. package/svd/es/{styles-C4lyWBqI.js → styles-DqePmgwe.js} +1 -1
  293. package/svdv2/es/{_auto-entry_svdv2-DUbGPvAo.js → _auto-entry_svdv2-RcFbon7r.js} +1 -1
  294. package/svdv2/es/{events-BpylTjt0.js → events-CvlkbSIk.js} +1 -1
  295. package/svdv2/es/{index-BJolBzAq.js → index-B-VXXPEg.js} +1 -1
  296. package/svdv2/es/{index-Ci31S_cI.js → index-C6w4w3nc.js} +1 -1
  297. package/svdv2/es/{index-CvAMVxop.js → index-CEAx-yHX.js} +1 -1
  298. package/{koket/es/index-CQQjR0dc.js → svdv2/es/index-Ch--6NVh.js} +1 -1
  299. package/svdv2/es/{index-DH8TWS2G.js → index-DAVHPGIj.js} +1 -1
  300. package/svdv2/es/{index-D-__1qKd.js → index-E_GaSuU6.js} +1 -1
  301. package/svdv2/es/{index-_6MokU4g.js → index-L5cWibAB.js} +1 -1
  302. package/svdv2/es/{index-7L6GOEcY.js → index-S8lV_5aP.js} +1 -1
  303. package/svdv2/es/index-v6pG052K.js +1 -0
  304. package/svdv2/es/index.d.ts +1 -0
  305. package/svdv2/es/index.js +1 -1
  306. package/svdv2/es/{styles-DTkufDwb.js → styles-B11ft3zS.js} +1 -1
  307. package/svdv2/es/{styles-DncgBPAW.js → styles-Bea1L6S_.js} +1 -1
  308. package/svdv2/es/{styles-CHVopxcA.js → styles-BlJ83zfj.js} +1 -1
  309. package/svdv2/es/{styles-XjAAdIhb.js → styles-BqYsqpzs.js} +1 -1
  310. package/svdv2/es/styles-ioo9A2FA.js +1 -0
  311. package/svdv2/es/{styles-D6UbxUjq.js → styles-lwgKofag.js} +1 -1
  312. package/{koket/es/styles-t7FqgPGh.js → svdv2/es/styles-p_Y9FkUE.js} +1 -1
  313. package/tek/cjs/index.d.ts +1 -0
  314. package/tek/cjs/index.js +1 -1
  315. package/tv4/cjs/index.d.ts +1 -0
  316. package/tv4/cjs/index.js +1 -1
  317. package/tv4/es/{_auto-entry_tv4-D2LUPwoc.js → _auto-entry_tv4-kJ9hswIa.js} +1 -1
  318. package/tv4/es/{events-DT9QhbzN.js → events-pquiBfZJ.js} +1 -1
  319. package/tv4/es/{index-Hdl3waaw.js → index-3PheqdCm.js} +1 -1
  320. package/tv4/es/{index-D9S2cCxr.js → index-B7ygN8qP.js} +1 -1
  321. package/tv4/es/{index-bJoB9mAg.js → index-BblXOxbk.js} +1 -1
  322. package/tv4/es/{index-DnqArFwz.js → index-CBno1ySD.js} +1 -1
  323. package/tv4/es/{index-Dw5mfzbv.js → index-CWjwd5sy.js} +1 -1
  324. package/tv4/es/{index-ByKiJjOy.js → index-D7gJ0ucS.js} +1 -1
  325. package/tv4/es/{index-BtGUspMD.js → index-De-SJ8Ll.js} +1 -1
  326. package/tv4/es/{index-Ch-gVM1R.js → index-S7lnDTX0.js} +1 -1
  327. package/tv4/es/index-qPS_wjwH.js +1 -0
  328. package/tv4/es/index.d.ts +1 -0
  329. package/tv4/es/index.js +1 -1
  330. package/{e24/es/styles-CAyjmgPZ.js → tv4/es/styles-BxvkuxIW.js} +1 -1
  331. package/tv4/es/{styles-BC_f7KSS.js → styles-CsenWjio.js} +1 -1
  332. package/{svd/es/styles-u9ZnoWTJ.js → tv4/es/styles-D3D992WZ.js} +1 -1
  333. package/tv4/es/styles-sMYTPti8.js +1 -0
  334. package/tvnu/cjs/index.d.ts +1 -0
  335. package/tvnu/cjs/index.js +1 -1
  336. package/tvnu/es/{_auto-entry_tvnu-CqoU0IXF.js → _auto-entry_tvnu-BNH620us.js} +1 -1
  337. package/{btv2/es/events-BD4zr3fc.js → tvnu/es/events-C5D3UiyX.js} +1 -1
  338. package/tvnu/es/{index-CJyhCgQB.js → index-1dgGsuRM.js} +1 -1
  339. package/tvnu/es/{index-DGLFfSVY.js → index-C47iw9-J.js} +1 -1
  340. package/tvnu/es/{index-fJy6hdcp.js → index-CB-i902O.js} +1 -1
  341. package/tvnu/es/{index-DRWjvco2.js → index-CIZopmCV.js} +1 -1
  342. package/{vgv2/es/index-C1S7jUbo.js → tvnu/es/index-CYASQRJ2.js} +1 -1
  343. package/tvnu/es/{index-BUSsSqB0.js → index-Cfrd9WE8.js} +1 -1
  344. package/tvnu/es/index-CiAPVPhH.js +1 -0
  345. package/{sav2/es/index-D6yLmPBl.js → tvnu/es/index-DWzxJtDb.js} +1 -1
  346. package/tvnu/es/{index-DS6FI8f_.js → index-DbjRNIU6.js} +1 -1
  347. package/tvnu/es/index.d.ts +1 -0
  348. package/tvnu/es/index.js +1 -1
  349. package/tvnu/es/styles-BQOnZkZ9.js +1 -0
  350. package/tvnu/es/{styles-Bk-wqWYG.js → styles-Du6u63bp.js} +1 -1
  351. package/{btv2/es/styles-DyME_pzd.js → tvnu/es/styles-ceOeH9R0.js} +1 -1
  352. package/types/index.d.ts +1 -0
  353. package/vg/cjs/index.d.ts +1 -0
  354. package/vg/cjs/index.js +1 -1
  355. package/vg/es/{_auto-entry_vg-DJn1N7L-.js → _auto-entry_vg-Cjr6TBwT.js} +1 -1
  356. package/vg/es/{events-D-RmmjAD.js → events-PcNTmdx8.js} +1 -1
  357. package/vg/es/{index-X5UUksnA.js → index-B4KIgn0c.js} +1 -1
  358. package/vg/es/index-BCH5hDee.js +1 -0
  359. package/vg/es/{index-Cnzf7bSt.js → index-BHxTIM4s.js} +1 -1
  360. package/vg/es/{index-D_wz3vTE.js → index-CwiFGKc0.js} +1 -1
  361. package/vg/es/{index-BTnYavtj.js → index-DjmwvCB6.js} +1 -1
  362. package/vg/es/{index-Cy--3dbA.js → index-L1WYC5in.js} +1 -1
  363. package/vg/es/{index-CMlhhadG.js → index-ZYvgwk9A.js} +1 -1
  364. package/{sa/es/index-CkKcBPdO.js → vg/es/index-qSjZU3Xr.js} +1 -1
  365. package/vg/es/{index-CIDflsKH.js → index-tECjKpHI.js} +1 -1
  366. package/vg/es/index.d.ts +1 -0
  367. package/vg/es/index.js +1 -1
  368. package/vg/es/{styles-0vZbXMU2.js → styles-6Rvktlge.js} +1 -1
  369. package/vg/es/{styles-DmaryQGU.js → styles-7TCPKZOt.js} +1 -1
  370. package/vg/es/{styles-CmHH7Qsm.js → styles-B6rF2XUA.js} +1 -1
  371. package/vg/es/{styles-G4L7KsOB.js → styles-BCFb7bAO.js} +1 -1
  372. package/vg/es/{styles-Nb4lDLU9.js → styles-BLb6mIea.js} +1 -1
  373. package/vg/es/{styles-B1fg-eeV.js → styles-BNXXJ74K.js} +1 -1
  374. package/{sa/es/styles-omXIOq4S.js → vg/es/styles-BOt7Y-dP.js} +1 -1
  375. package/{bt/es/styles-D_EmOU-M.js → vg/es/styles-BqPQ6VMi.js} +1 -1
  376. package/vg/es/{styles-hzC9-7ZQ.js → styles-C6TP_cBO.js} +1 -1
  377. package/vg/es/{styles-CLsNBm5e.js → styles-CVzTu1vN.js} +1 -1
  378. package/vg/es/{styles-8-TUi3FI.js → styles-CtTmUzaH.js} +1 -1
  379. package/vg/es/{styles-BhQRBj_I.js → styles-DJnbuUkj.js} +1 -1
  380. package/vg/es/{styles-Blblcos3.js → styles-DfzvHCIn.js} +1 -1
  381. package/vg/es/styles-EQj97jyP.js +1 -0
  382. package/vg/es/{styles-XQb0C0py.js → styles-WHugI_vy.js} +1 -1
  383. package/vgv2/es/{_auto-entry_vgv2-1bhhiBCr.js → _auto-entry_vgv2-ClmZ2tDd.js} +1 -1
  384. package/vgv2/es/{events-DvfYVt2r.js → events-DNYQq3-x.js} +1 -1
  385. package/vgv2/es/{index-DD3IpPlw.js → index-AGgV1s5Y.js} +1 -1
  386. package/vgv2/es/{index-DtgmRVgN.js → index-B6Z2EtjS.js} +1 -1
  387. package/vgv2/es/index-CI9-3ewu.js +1 -0
  388. package/{tvnu/es/index-Dt05Vcc7.js → vgv2/es/index-CL87HpAc.js} +1 -1
  389. package/vgv2/es/{index-ytXDEmdI.js → index-CPRaSJPR.js} +1 -1
  390. package/vgv2/es/{index-DFNSdbx-.js → index-CrH86aH0.js} +1 -1
  391. package/vgv2/es/{index-CEe-5Q1h.js → index-D6p12dSG.js} +1 -1
  392. package/{sav2/es/index-CgUEK1uZ.js → vgv2/es/index-DfTL5DBW.js} +1 -1
  393. package/{tvnu/es/index-DC0PL22p.js → vgv2/es/index-DwtMNVrX.js} +1 -1
  394. package/vgv2/es/index.d.ts +1 -0
  395. package/vgv2/es/index.js +1 -1
  396. package/{btv2/es/styles-DlCvU34q.js → vgv2/es/styles-B823XLKH.js} +1 -1
  397. package/vgv2/es/{styles-UrLUFwd4.js → styles-BDHAgZsG.js} +1 -1
  398. package/vgv2/es/{styles-Cw12tBlm.js → styles-BMQoyqZ0.js} +1 -1
  399. package/vgv2/es/{styles-DPWlCXEM.js → styles-BmpRHAtW.js} +1 -1
  400. package/vgv2/es/{styles-BI1mPsld.js → styles-By3BI9fy.js} +1 -1
  401. package/vgv2/es/{styles-B9UcxZ4c.js → styles-C-BapRph.js} +1 -1
  402. package/{sav2/es/styles-4ZUqvXlb.js → vgv2/es/styles-CYWQfLRe.js} +1 -1
  403. package/vgv2/es/{styles-BR97GkKx.js → styles-CgilFIxP.js} +1 -1
  404. package/vgv2/es/{styles-RwNHR2DO.js → styles-CqeRHplu.js} +1 -1
  405. package/vgv2/es/styles-CvHX7sB9.js +1 -0
  406. package/vgv2/es/{styles-2Uwumnsx.js → styles-D5hg02gB.js} +1 -1
  407. package/vgv2/es/{styles-ytWLYmf8.js → styles-DE6rAdPk.js} +1 -1
  408. package/{tvnu/es/styles-bYE_i6tN.js → vgv2/es/styles-Dj4XkPOX.js} +1 -1
  409. package/vgv2/es/{styles-DXXTblXP.js → styles-DzZYoG9-.js} +1 -1
  410. package/vgv2/es/{styles-B89wdj0X.js → styles-yHEjHvM1.js} +1 -1
  411. package/aftenposten/es/index-BoV9_ZRb.js +0 -1
  412. package/aftenposten/es/styles-6cSerhxF.js +0 -1
  413. package/aftenpostenv2/es/index-DTCnZrKE.js +0 -1
  414. package/aftenpostenv2/es/styles-DYitsqbR.js +0 -1
  415. package/aftonbladet/es/index-BMW8bIDx.js +0 -1
  416. package/aftonbladet/es/styles-c-BgWOZH.js +0 -1
  417. package/aftonbladetv2/es/index-UBHRoKSn.js +0 -1
  418. package/aftonbladetv2/es/styles-B2gFwWJu.js +0 -1
  419. package/bt/es/index-CAFDwDWc.js +0 -1
  420. package/bt/es/styles-nKm0Vh5F.js +0 -1
  421. package/btv2/es/index-CS4z77wW.js +0 -1
  422. package/btv2/es/styles-CtTssJkI.js +0 -1
  423. package/e24/es/index-CJjBbPQL.js +0 -1
  424. package/e24/es/styles-7G5deHiD.js +0 -1
  425. package/fotbollskanalen/es/index-CUJeyBHW.js +0 -1
  426. package/koket/es/index-BFI3SvdD.js +0 -1
  427. package/omni/es/index-qnl_keQC.js +0 -1
  428. package/sa/es/index-Dajd_xSt.js +0 -1
  429. package/sa/es/styles-DB-lQnRO.js +0 -1
  430. package/sav2/es/index-BOZwYIvr.js +0 -1
  431. package/sav2/es/styles-bREDShMq.js +0 -1
  432. package/svd/es/index-D_oQj3Xt.js +0 -1
  433. package/svdv2/es/index-DwX9_N1J.js +0 -1
  434. package/tv4/es/index-DuZk2Gu9.js +0 -1
  435. package/tvnu/es/index-p-6XHngr.js +0 -1
  436. package/vg/es/index-Dj0JDiRo.js +0 -1
  437. package/vg/es/styles-BgOzuIVQ.js +0 -1
  438. package/vgv2/es/index-FK-JpFgj.js +0 -1
  439. package/vgv2/es/styles-CJwj3aJ6.js +0 -1
package/pent/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e,t,n=require("react/jsx-runtime");function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var i=o(function(){if(t)return e;t=1;var n=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===o}(e)}(e)},o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map(function(e){return i(e,n)})}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function d(e,t){try{return t in e}catch(e){return!1}}function s(e,t,n){var o={};return n.isMergeableObject(e)&&a(e).forEach(function(t){o[t]=i(e[t],n)}),a(t).forEach(function(r){(function(e,t){return d(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(d(e,r)&&n.isMergeableObject(t[r])?o[r]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(r,n)(e[r],t[r],n):o[r]=i(t[r],n))}),o}function l(e,t,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||n,o.cloneUnlessOtherwiseSpecified=i;var a=Array.isArray(t);return a===Array.isArray(e)?a?o.arrayMerge(e,t,o):s(e,t,o):i(t,o)}return l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},e=l}());const r={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},a=(e,t)=>i(e,t,r),d={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},s=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},l=(e,t)=>{console.warn("[Advertory WARN]: ",e)},c=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:o,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||l("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||l("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||l("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||l("pageContext.deviceType is required."),n||l("pageOptions is required."),o||l("placements is required."),(null==i?void 0:i.defaultThreshold)||l("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,o,i;const r=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(o=e.widescreenSwitching)||void 0===o?void 0:o.enabled),property:"right",featureName:"widescreenSwitching"},{flag:!!(null===(i=e.wallpaper)||void 0===i?void 0:i.enabled),property:"header",featureName:"wallpaper"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==r?void 0:r[t])&&l(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},u=["placements","takeover","refreshConfig","editory"],p=(e,t)=>Object.assign(Object.assign({},e),t),v={editory:(e,t)=>{var n;return a(null!==(n=e)&&void 0!==n?n:{},t)},pageContext:p,pageOptions:p,tcf:p},g=(e,t)=>{const n={};for(const e of u){const o=t[e];void 0===o||e in v||(n[e]=o)}Object.assign(e,n);const o=e;for(const e of Object.keys(v))Object.hasOwn(t,e)&&void 0!==t[e]&&(o[e]=v[e](o[e],t[e]))},h=6;class m{set(e){c(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");g(this.config,e)}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=a(m.DEFAULT_SITE_HANDLERS,e)}}m.DEFAULT_SITE_HANDLERS={siteEvents:d,initNativeAd:()=>{}};const f=new m,y=f.modifyConfigProperties.bind(f),b={NO:"no",SE:"se"},w=e=>e===b.NO?"no-sno":"se-generic",k=/_\d+$/,x=e=>e.replace(k,"");let C="";const I=new Map,E=e=>{const{pageSetup:{tag:t}={}}=f.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(C!==window.location.pathname&&(I.clear(),C=window.location.pathname),e.map(e=>{var t;const n=x(e.invCode),o=null!==(t=I.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${(()=>{const{pageContext:{countryCode:e,publisher:t}}=f.get();return`${e}-${t}`})()}-count`]=o,I.set(n,o+1),e})):e},T=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};function S(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i<o.length;i++)t.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(e,o[i])&&(n[o[i]]=e[o[i]])}return n}function P(e,t,n,o){return new(n||(n=Promise))(function(i,r){function a(e){try{s(o.next(e))}catch(e){r(e)}}function d(e){try{s(o.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,d)}s((o=o.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const A="0123456789abcdefghijklmnopqrstuvwxyz",O=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=A[Math.floor(36*Math.random())]}return t},j=e=>{window.apntag.anq.push(e)},$=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),L=new Promise(e=>{if("undefined"==typeof document||!document.hidden)return void e();const t=()=>{document.hidden||(document.removeEventListener("visibilitychange",t),e())};document.addEventListener("visibilitychange",t,{once:!0})}),_="advertory-wallpaper-background",N="advertory-with-horseshoe",q=()=>{const e=document.querySelector(`.${_}`);e&&e.remove()},F=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${_}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},D=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,M=e=>D.test(e),B=e=>e.startsWith("wallpaper:color:"),R=e=>{const t=document.querySelector(`.${_}`);t&&(t.style.backgroundImage=`url(${e})`)},U=e=>{const t=document.querySelector(`.${_}`);t&&(t.style.backgroundColor=e)};var z=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(N),n.classList.add(N))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{wallpaperAnchorSelector:n}={}}=t;(()=>{q();const e=document.createElement("div");e.classList.add(_),document.body.appendChild(e),e.style.setProperty("position","fixed"),e.style.setProperty("width","100%"),e.style.setProperty("height","calc(100% - var(--advertory-header-height, 0px) - 15px)"),e.style.setProperty("background-position","center top"),e.style.setProperty("background-repeat","no-repeat")})(),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(F(n),window.addEventListener("scroll",()=>F(n)))})(n),e()},isShortWallpaperColorMessage:B,isShortWallpaperUrlMessage:M,removeWallpaperBackground:q,setWallpaperBackgroundColor:U,setWallpaperBackgroundImage:R});const V=e=>new URLSearchParams(window.location.search).get(e),H="takeover",W="native_override_desc2",K=e=>window.location.href.includes(e),G=()=>null!==V("disable_prebid"),X=e=>{if("0"===V("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")&&q())},J=e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))};class Y{initialize(){this.DATA=Object.assign({},Y.INITIAL_DATA)}getData(e){if(!this.DATA)throw new Error("Storage was accessed with invalid data.");return this.DATA[e]}setData(e,t){if(!this.DATA)throw new Error("Storage was accessed before it had been initialized.");this.DATA[e]=Object.assign(Object.assign({},this.DATA[e]),t)}}Y.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const Q=new Y,Z=e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")},ee=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,o=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${o}px`)},te="opaque",ne=e=>P(void 0,void 0,void 0,function*(){if(e.type!==te){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),oe={get:(e,...t)=>P(void 0,[e,...t],void 0,function*(e,t={}){var{timeout:n}=t,o=S(t,["timeout"]);if(n)return((e,t,n)=>P(void 0,void 0,void 0,function*(){const o=new AbortController,i=setTimeout(()=>o.abort(),n);try{const n=yield fetch(e,Object.assign(Object.assign({},t),{signal:o.signal}));return ne(n)}finally{clearTimeout(i)}}))(e,o,n);const i=yield fetch(e,o);return ne(i)}),post:(e,t,n)=>P(void 0,void 0,void 0,function*(){const o=JSON.stringify(n),i=yield fetch(e,{method:"POST",headers:t,body:o});if(!i.ok)throw new Error(i.statusText);return yield i.json()})},ie="https://alertory-cdn.inventory.schibsted.io",re=5e3,ae="editory/native-creator/native-templates",de=e=>{const{siteSpecificConfig:t,editory:{editoryUrl:n,editableConfiguration:{pageTypeToFetch:o}={}}={}}=e;if(!(null==t?void 0:t.publisherClassName)||!o)return null;return`${n||ie}/editable-configurations/${t.publisherClassName}/${o.toLowerCase()}.json`};const se=new class{constructor(){this.requestToken=0,this.cacher=(()=>{const e=new Map;return{get:t=>e.get(t),set:(t,n)=>{e.set(t,n)},delete:t=>{e.delete(t)}}})()}shouldFetchEditableConfig(e){const{editory:{editableConfiguration:{enabled:t=!1,pageTypeToFetch:n}={}}={},siteSpecificConfig:o}=e;return Boolean(t&&n&&(null==o?void 0:o.publisherClassName))}captureLocalSiteConfig(e){return this.localSiteConfig=Object.assign({},e),this.localSiteConfig}fetchEditableConfig(e){return P(this,void 0,void 0,function*(){const t=de(e);if(!t)return null;let n=this.cacher.get(t);return n||(n=(e=>P(void 0,void 0,void 0,function*(){const t=de(e);if(!t)return null;try{return yield oe.get(t,{timeout:re})}catch(e){throw s("Failed to fetch S3 config",{error:e,url:t}),e}}))(e).catch(e=>{throw this.cacher.delete(t),e}),this.cacher.set(t,n)),n})}resolveRemoteConfig(e,t){var n,o,i;const r=((e,t)=>{const{sections:n}=e,o=S(e,["sections"]),i=t?null==n?void 0:n[t]:void 0;return i?a(o,i):o})(t,null!==(i=null===(o=null===(n=e.editory)||void 0===n?void 0:n.editableConfiguration)||void 0===o?void 0:o.section)&&void 0!==i?i:(()=>{const[e]=window.location.pathname.split("/").filter(Boolean);return e})());return((e,t)=>a(t,e))(e,r)}getConfig(e){return P(this,void 0,void 0,function*(){var t,n;const o=this.captureLocalSiteConfig(e);if(!this.shouldFetchEditableConfig(o))return o;try{const e=yield this.fetchEditableConfig(o);return e?(this.lastFetchedPageType=null===(n=null===(t=o.editory)||void 0===t?void 0:t.editableConfiguration)||void 0===n?void 0:n.pageTypeToFetch,this.resolveRemoteConfig(o,e)):o}catch(e){return s("Error fetching S3 config, using site config",{error:e}),o}})}resolveUpdatedConfig(e){return P(this,void 0,void 0,function*(){var t,n,o,i;if(!this.localSiteConfig)return;if(g(this.localSiteConfig,null!=e?e:{}),!this.shouldFetchEditableConfig(this.localSiteConfig))return;const r=null===(n=null===(t=this.localSiteConfig.editory)||void 0===t?void 0:t.editableConfiguration)||void 0===n?void 0:n.pageTypeToFetch;if(r===this.lastFetchedPageType)return;const a=++this.requestToken;try{const e=yield this.fetchEditableConfig(this.localSiteConfig);if(a!==this.requestToken||(null===(i=null===(o=this.localSiteConfig.editory)||void 0===o?void 0:o.editableConfiguration)||void 0===i?void 0:i.pageTypeToFetch)!==r)return;if(!e)return;return this.lastFetchedPageType=r,this.resolveRemoteConfig(this.localSiteConfig,e)}catch(e){return void s("Error fetching updated S3 config, keeping current config",{error:e})}})}},le=se.getConfig.bind(se),ce=se.resolveUpdatedConfig.bind(se),ue=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:o}=(e=>{const t=Q.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=o},pe=()=>{q();const e=document.querySelectorAll('[data-advertory-ad-rendered="true"]'),t=[];return e.forEach(e=>{X(e.id),ue(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),o=null==t?void 0:t.getAttribute("data-probable-width");n&&o&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",o+"px"))})(e.id),e.innerHTML="",e.id=T(e.id),t.push(e.id)}),j(()=>window.apntag.clearRequest()),t},ve=e=>P(void 0,void 0,void 0,function*(){const t=yield ce(e);var n;t?(f.set(t),n=t,window.advertory&&(window.advertory.siteConfig=n,window.advertory.alertoryConfig&&(window.advertory.alertoryConfig.advertory.placements=n.placements))):y(null!=e?e:{})}),ge="mobile",he="tablet",me="desktop",fe="web_desktop",ye="web_phone",be="wde",we="wph",ke="noGroupedPlacements",xe=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},Ce=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},Ie=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:o,pageContext:{deviceType:i}}=f.get(),r=((e,t)=>{var n;const o=null!==(n=e[t])&&void 0!==n?n:[];return t===he&&0===o.length?e[me]:o})(n,i),a=r.filter(Ce),d=e?document.querySelector(e):document;if(!d)return[];const s=a.reduce((e,t)=>{const n=xe(t.targetId);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=a.filter(({targetId:e})=>e.match(t)),r=(null==o?void 0:o.queryByDataDeviceAttribute)?`div[id^="${e}"][data-device=${i}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,s=d.querySelectorAll(r),l=Array.from(s).filter(({id:e})=>e.match(t)).map((e,t)=>{var o;const i=Ee(e,t,n),r=i.finnBlink&&!i.finnBlink.renderOnlyWithAdBlock,a=r&&(null===(o=i.finnBlink)||void 0===o?void 0:o.loadOnlyFinnBlink),d=`${e.id}-${O(6)}`;return e.id=d,e.setAttribute("data-advertory-ad-rendered","true"),r&&e.setAttribute("data-is-finn-blink-placement","true"),a&&e.setAttribute("data-is-finn-blink-only-placement","true"),(e=>{var t;const n=e.id;n&&Q.setData("initialClassNames",{[n]:{wrapper:null===(t=e.parentElement)||void 0===t?void 0:t.className.split(" "),container:e.className.split(" ")}})})(e),Object.assign(Object.assign({},i),{targetId:d})});return E(l)});return(e=>{const t=Array.from(document.querySelectorAll('div[class^="advertory"]'));return e.sort((e,n)=>t.findIndex(t=>t.id===e.targetId)-t.findIndex(e=>e.id===n.targetId))})(s)},Ee=(e,t,n)=>{const o=n[t],i=n[n.length-1],r=n.filter(({targetId:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==o?void 0:o.targetId)?o:(null==e?void 0:e.id)===(null==i?void 0:i.targetId)?i:r||i},Te=e=>{const{queryConfig:{placementBatches:t}={},pageContext:{deviceType:n}}=f.get(),o=(null==t?void 0:t[n])||{},i=Object.values(o).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=T(e.targetId);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[o,i]of Object.entries(t))n[o]=e.filter(e=>i.includes(T(e.targetId)));return n})(e,o),d=Object.keys(r),s=((e,t)=>e.filter(e=>!t.has(T(e.targetId))))(e,new Set([...d,...i]));return Object.assign(Object.assign(Object.assign({},a),r),{[ke]:s})},Se="ABSOLUTE_FULLSCREEN",Pe="ANY_FULLSCREEN",Ae="NINESIXTEEN",Oe="FULLWIDTH",je="FULLSQUARE",$e="TAKEOVER",Le="VELVET_TAKEOVER",_e="WALLPAPER",Ne="COLLAPSE",qe={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],NINESIXTEEN:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],FULLSQUARE:[{width:1080,height:1080}],NATIVE_AD:[{width:1,height:1}],TAKEOVER:[{width:4,height:4}],VELVET_TAKEOVER:[{width:7,height:7}],WALLPAPER:[{width:2,height:2}],COLLAPSE:[{width:2,height:1}]},Fe={wallpaper:1600,"l-format":1600},De=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&Qe(e,Pe)},Me=e=>{const{native:t}=e;return!!t},Be=e=>Qe(e,Oe),Re=e=>{const{targetId:t}=e;return t.includes("takeover")||Qe(e,$e)},Ue=e=>Qe(e,$e),ze=e=>Qe(e,_e),Ve=e=>Qe(e,Ne),He=e=>e.targetId.includes("sponsorstripe"),We=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},Ke=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),Ge=e=>e.targetId.startsWith("midboard"),Xe=e=>e.targetId.includes("widescreen"),Je=e=>e.width>=1260&&e.width<=1280,Ye=e=>e.width>=1600&&e.width<=1620,Qe=(e,t)=>{const n=qe[t];if(!n)return!1;return!!n.find(t=>{var n,o;const i=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(o=e.banner)||void 0===o?void 0:o.height)||e.height,a=t.width===i,d=!t.height||t.height===r;return a&&d})},Ze=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 s("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let o=!1;const i=e=>{o||(s("Resolving advertising permission value obtained"),o=!0,t(e))},r=setTimeout(()=>{s("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{s("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);s("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),et="cmp:loaded";let tt="undefined"!=typeof window?window._tcf_:void 0,nt=!1;const ot=(e,t,n)=>{const o=!!(null==e?void 0:e.enabled),i=(null==e?void 0:e.timeout)||3e3,r=V("bypass_tcf"),a=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(s("TCF bypass param detected, returning consent: true"),!0):(s("TCF is not enabled, returning consent: true"),!0))(o,r))return!0;if(nt)return null;if(!tt)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=tt.getConsentedToAllSync();return s(`TCF consented to all is: ${t}`),tt.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(s("Getting TCF consent manager..."),window._tcf_)return s("TCF consent manager is already available"),tt=window._tcf_,void e(tt);s("TCF consent manager is not available");const n=()=>{s("CMP loaded, resolving consent manager..."),o&&clearTimeout(o),window._tcf_?(tt=window._tcf_,e(tt)):t(new Error("CMP loaded but window._tcf_ is not defined"))},o=setTimeout(()=>{document.removeEventListener(et,n),nt=!0,t(new Error("Timeout waiting for CMP to load"))},i);s("Listening for CMP loaded event..."),document.addEventListener(et,n,{once:!0})}):Promise.resolve(null),getConsentSync:a,getConsentAsync:()=>P(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return s(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===b.SE,o=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===b.NO;if(t||o)return s("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield Ze(e);if(!(null==e?void 0:e.enabled))return!0;const r=a();return null!==r?r:yield new Promise((e,t)=>{try{if(!tt)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},o=setTimeout(()=>{s("TCF isConsentedToAll timed out, resolving with false"),n(!1)},i);tt.onTcfReady(()=>{s("On Tcf Ready called, waiting for consent"),clearTimeout(o)}),tt.isConsentedToAll(t=>{clearTimeout(o),e(t)})}catch(e){t(e)}})})}},it=(e,t,n,...o)=>P(void 0,[e,t,n,...o],void 0,function*(e,t,n,o="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return s(`Schibsted Consent to Pay is not enabled, returning true for ${o}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return s(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${o}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=ot(e,0,n);return(yield i())?(s(`Schibsted Ad Choices consent given according to TCF consent manager for ${o}`),!0):(s(`Schibsted Ad Choices consent not given according to TCF consent manager for ${o}`),!1)}),rt=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},at=e=>P(void 0,void 0,void 0,function*(){const{tcf:t,pageContext:{isMobileApp:n,countryCode:o}={}}=e,{getConsentAsync:i}=ot(t,0,o);if(!(yield i()))return;const r=rt("_pulse2data");return r?r.split(",")[9]:void 0}),dt="splash",st="welcomePage",lt="topscroller",ct="velvet",ut=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const o=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),i=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=o.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,i).toString()},pt="takeover-displayed",vt="takeover-visit-count",gt=14400,ht=()=>{const e=rt(vt);return e?parseInt(e):0},mt=()=>{const e=ht(),{takeover:{options:{cookieCapTime:t=gt}={}}={}}=f.get(),n=document.location.hostname;window.document.cookie=`${vt}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},ft=()=>{const{takeover:{enabled:e=!1,options:{secondVisitEnabled:t=!1}={}}={}}=f.get();return"0"!==V(H)&&("1"===V(H)||!(!e||(()=>{var e,t;const n=(null===(t=null===(e=f.get().takeover)||void 0===e?void 0:e.options)||void 0===t?void 0:t.cookieCapName)||pt;return"true"===rt(n)})())&&(!t||yt()))},yt=()=>{const e=ht();return 0===e?(mt(),!1):1===e},bt=(e,t)=>[[1,1],[1920,1080]].some(([n,o])=>n===e&&o===t),wt=()=>{const{takeover:e}=f.get();return Boolean(null==e?void 0:e.topscroller)},kt=e=>{const{width:t,height:n}=e;return bt(t,n)?dt:Qe(e,Le)?ct:wt()?lt:st},xt=()=>P(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{options:{cookieCapName:t=pt,cookieCapTime:n=gt}={}}={},pageContext:{isMobileApp:o,countryCode:i},tcf:r}=f.get(),a=yield it(r,o,i,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),Ct=e=>{var t,n;const o=!!(null===(n=null===(t=f.get().takeover)||void 0===t?void 0:t.options)||void 0===n?void 0:n.setCookieCapForNotShownAd);return Re(e)&&o},It=(e,t)=>{var n;if(t===lt){const{topscroller:t}=e;return null!=t?t:{}}if(t===dt){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Et=(e,t)=>{t!==dt?(e=>{var t,n;const o=null===(t=f.get().pageSectionsSelectors)||void 0===t?void 0:t.header,i=null===(n=f.get().takeover)||void 0===n?void 0:n.topscroller;if(!o||i)return;const r=document.querySelector(o),a=document.querySelector(".welcome-page-wrapper"),d=document.querySelector(`#${e.targetId}`),s=document.querySelector(".advertory-welcome-page-scroll");if(!(r&&a&&s&&d))return;const l=null==r?void 0:r.offsetHeight,c=Ue(e)?"60svh":`calc(100svh - ${l}px)`,u=Ue(e)?"calc(40svh + 30px)":`calc(${l}px + 30px)`;a.style.setProperty("height",c,"important"),d.style.setProperty("height",c,"important"),s.style.setProperty("bottom",u,"important")})(e):(e=>{var t;if(!(null===(t=f.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),o=document.querySelector(`#${e.targetId}`);if(!n||!o)return;const i=`calc(100svh - ${n.offsetHeight}px)`;o.style.setProperty("height",i,"important")})(e)},Tt=ut([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n .adform-adbox {\n height: 100% !important;\n width: 100% !important;\n }\n img {\n height: 100% !important;\n width: 100% !important;\n object-fit: cover !important;\n object-position: top !important;\n }\n ",e.contentDocument.head.appendChild(t)})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})});var St=Object.freeze({__proto__:null,addTakeoverCookie:xt,adjustTakeoverHeight:Et,canDisplayTakeover:ft,getProperWelcomePageConfig:It,getTakeoverVariant:kt,handleTakeoverCookieOnAdNotShown:e=>P(void 0,void 0,void 0,function*(){Ct(e)&&(yield xt())}),incrementArticleVisitCount:mt,isSplashVariant:bt,isTopscroller:wt,scaleAd:Tt,shouldAddTakeoverCookieForNotShownAd:Ct});const Pt={nativeAd:e=>Me(e)&&!He(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:Be,fullscreenScroll:De,topscroller:e=>Re(e)&&wt(),splash:e=>Re(e)&&bt(e.width,e.height),welcomePage:Re,wallpaper:ze,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:Je,hFormat:Ye,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!Ye(e)&&!Je(e),topboard:e=>e.targetId.startsWith("topboard")&&!Re(e),widescreen:Xe,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:He,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!Ke(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!Ge(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:Ke,midboard:Ge},At=({adObj:e,preferredTestIdData:t})=>{var n,o;const i=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!i)return;const r=null===(o=document.querySelector(`#${i}`))||void 0===o?void 0:o.parentElement;if(!r)return;if(((e,t)=>{var n,o,i,r;const a=null===(r=null===(i=null===(o=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===o?void 0:o.tags)||void 0===i?void 0:i[e])||void 0===r?void 0:r.invCode;a&&(t.dataset.invCode=a)})(i,r),null==t?void 0:t.testId)return void(r.dataset.testid=t.testId);const a="DIV"===(null==r?void 0:r.tagName);e&&a&&((e,t)=>{var n,o;for(const[i,r]of Object.entries(Pt))if(r(e)){if("nativeAd"===i){const r="default";t.dataset.testid=`${i}-${null!==(o=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==o?o:r}`;break}t.dataset.testid=i;break}})(e,r)},Ot=e=>{var t;return(null===(t=Object.entries(Pt).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},jt=()=>{const e=window.navigator.userAgent.toLowerCase(),t=[["win","windows"],["macintosh","macos"],["x11","linux"],["android","android"],["ipad","ios"],["iphone","ios"]].find(([t])=>e.includes(t));return t?t[1]:"unknown"},$t=e=>e===ge,Lt=(e,t)=>{const n=e.width,o=(null!=t?t:window.screen.width)/n;return o<1?o:1},_t=(e,t=window.screen.width,n,o)=>{const i=Lt(e,t);if(n&&n(e,i),o)return void o(e);const r=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);r&&(r.style.transform=`scale(${i})`,r.style.transformOrigin="left top")},Nt=new Map;Nt.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),Nt.set("panorama",{scale:.79,transformOrigin:"center center"}),Nt.set("outstream",{scale:.79,transformOrigin:"center center"}),Nt.set("integration",{scale:.79,transformOrigin:"center center"}),Nt.set("toppanorama",{scale:.8,transformOrigin:"left center"});var qt=Object.freeze({__proto__:null,calculateScaleFactor:Lt,getAspectRatio:(e,t)=>{if(e&&t)return t/e},scaleAd:_t,scaleAdIpadAirPortrait:e=>{if(!((null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.clientWidth)>767&&(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.clientWidth)<=853))return;var t,n;const o=Ot(e),i=Nt.get(o),r=document.querySelector(`#${e.targetId}`);if(!r||!i)return;if(r.style.transformOrigin=i.transformOrigin,r.style.transform=`scale(${i.scale})`,!(null==i?void 0:i.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==r?void 0:r.offsetWidth;a&&"number"==typeof d&&!isNaN(d)&&a.style.setProperty("right",String(-1*d*.2)+"px")},scaleAds:e=>{var t,n,o,i,r,a;const{adScaleConfig:d,pageContext:{deviceType:s}}=f.get();if(!(null==d?void 0:d.enabled))return;if(Qe(e,Pe))return;const l=null!==(t=d.adsToBeScaled[s])&&void 0!==t?t:[],c=xe(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(o=null===(n=d.offset)||void 0===n?void 0:n[c])&&void 0!==o?o:0,p=document.getElementById(e.targetId),v=null!==(i=null==p?void 0:p.offsetWidth)&&void 0!==i?i:window.screen.width,g=null!==(a=null===(r=null==p?void 0:p.parentElement)||void 0===r?void 0:r.offsetWidth)&&void 0!==a?a:window.screen.width;_t(e,(v<g?v:g)-u)}});const Ft={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&((e,t)=>{_t(e,t);const n=document.querySelector(`#${e.targetId}`);n&&(n.style.minWidth="100vw")})(e,t)},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},Dt={SVD:"svd",VG:"vg",AFTENPOSTEN:"aftenposten",SA:"sa",BT:"bt",AFTONBLADET:"aftonbladet",E24:"e24",MINMOTE:"minmote",PENT:"pent",GODT:"godt",TEK:"tekno",KLART:"klart",TVNU:"tvnu",POLARIS:"polaris",KOKET:"koket",TV4:"tv4",FOTBOLLSKANALEN:"fotbollskanalen",OMNI:"omni"},Mt={publisherClassName:Dt.PENT,fullWidthFormatClassName:"netboard"},Bt=864e5,Rt=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return s("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,o=Bt)=>{const i={data:n,expirationTime:(new Date).getTime()+o};t(e,JSON.stringify(i))},getByTimestamp:(t,n=Bt)=>{const o=e(t);if(!o)return null;if(!n)return o;try{const{expirationTime:e,data:t}=JSON.parse(o);return(new Date).getTime()<=e?t:null}catch(e){return s("Error with parsing localStorage data"),null}}}})(),Ut="glimrTags",zt=["glwe_","glwet_"],Vt={geofenceTags:[],geoTags:[],weatherTags:[]},Ht=(...e)=>P(void 0,[...e],void 0,function*(e=f.get()){const{tcf:t,pageContext:{isMobileApp:n,countryCode:o}={}}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield it(t,n,o,"glimr")}const{getConsentAsync:i}=ot(t,0,o);return yield i()}),Wt=()=>P(void 0,void 0,void 0,function*(){const{glimr:e}=f.get();if(!(yield Ht())||!(null==e?void 0:e.enabled))return void s("No consent for glimr data fetching.");const t=yield(n=500,P(void 0,void 0,void 0,function*(){return yield Promise.race([P(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{Rt.setWithTimestamp(Ut,{tags:e,tagMappings:t}),n(!0)})})}catch(e){s(`Error during getting glimr data: ${e}`)}else s("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:t})}),Kt={svd:"svd",vg:"vg",aftenposten:"no-aftenposten",sa:"no-stavangeraftenblad",bt:"no-bergenstidende",aftonbladet:"aftonbladet",e24:"e24",minmote:"minmote",pent:"pent",godt:"godt",tek:"no-tek"},Gt=e=>zt.some(t=>e.startsWith(t)),Xt=e=>e.startsWith("glgc_"),Jt=e=>e.startsWith("glci_"),Yt=e=>!Gt(e)&&!Xt(e),Qt=(e,t)=>P(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:o,pageContext:{countryCode:i}={}}=e,r=yield Ht(e);if(!(null==o?void 0:o.enabled)||!r)return s("No consent for getting glimr tags."),{};const a=w(i),d=Zt(e,Boolean(n));return{[`${a}-geo`]:d.geoTags,[`${a}-weather`]:d.weatherTags,[`${a}-geofence`]:d.geofenceTags}}),Zt=(e,t)=>{const n=en();if(!n)return Vt;const o=((e=[])=>e.filter(Gt))(n),i=((e=[])=>e.filter(Xt))(n),r=((e=[],t,n)=>{var o;const i=e.filter(Yt);if(n&&t){const{publisher:e}=null!==(o=t.pageContext)&&void 0!==o?o:{},n=Kt[e]||e;i.push(n)}return i})(n,e,t);return{geoTags:r,geofenceTags:i,weatherTags:o}},en=()=>{const e=Rt.getByTimestamp(Ut);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},tn=()=>{var e;return((e=[])=>e.filter(Jt))(null!==(e=en())&&void 0!==e?e:[])},nn=()=>(window.apntag||(window.apntag={anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}}),window.apntag),on=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),rn=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:o=!1}={},pageContext:{countryCode:i}}=f.get(),r=[`${w(i)}-geo`],a=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection","aa-sch-cmp_advertising",...o?r:[]],d=Object.fromEntries(Object.entries(e).filter(([e])=>a.includes(e))),s=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:d}}},s)}},an="advertory:ppids-cache",dn={[b.SE]:`SCH${b.SE.toUpperCase()}-EnvHash`,[b.NO]:`SCH${b.NO.toUpperCase()}-EnvHash`},sn={[b.SE]:`SCH${b.SE.toUpperCase()}-UserHash`,[b.NO]:`SCH${b.NO.toUpperCase()}-UserHash`},ln={[b.SE]:`sch${b.SE}-envhash-v3`,[b.NO]:`sch${b.NO}-envhash-v3`},cn={[b.SE]:`sch${b.SE}-userhash-v3`,[b.NO]:`sch${b.NO}-userhash-v3`},un={[b.SE]:`'sch${b.SE}-iosid-v3'`,[b.NO]:`'sch${b.NO}-iosid-v3'`},pn={[b.SE]:`sch${b.SE}-androidid-v3`,[b.NO]:`sch${b.NO}-androidid-v3`},vn={[b.SE]:"sdrn:schibsted.com:user",[b.NO]:"sdrn:spid.no:user"};class gn{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:o})=>{t.append(e,`${o}-${n}`)}),t}}const hn=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return P(this,arguments,void 0,function*(e,t=1e4){var n,o;const i=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=i.xandr)||void 0===n?void 0:n.ppId1,null===(o=i.xandr)||void 0===o?void 0:o.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||s("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},mn=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return P(this,void 0,void 0,function*(){var n,o,i,r,a,d,s,l,c,u,p;const v=Rt.get(an),g=yield this.getNewPPIDs(e,t);if(this.shouldHash(v,g)){const t=null!==(n=e.hasherUrl)&&void 0!==n?n:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,t);return c?(this.cachePPIDs(l,c,null===(o=g.idfv)||void 0===o?void 0:o.plain,null===(i=g.anId)||void 0===i?void 0:i.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(d=g.idfv)||void 0===d?void 0:d.plain,null===(s=g.anId)||void 0===s?void 0:s.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(l=null==v?void 0:v.userId.hashed)&&void 0!==l?l:"",null!==(c=null==v?void 0:v.environmentId.hashed)&&void 0!==c?c:"",null===(u=null==g?void 0:g.idfv)||void 0===u?void 0:u.plain,null===(p=null==g?void 0:g.anId)||void 0===p?void 0:p.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||s("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,o){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=o?o:null}shouldHash(e,t){var n,o;if(!e)return!0;for(const i in e){if((null===(n=e[i])||void 0===n?void 0:n.plain)!==(null===(o=t[i])||void 0===o?void 0:o.plain))return!0}return!1}cachePPIDs(e,t,n,o){const i=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),o?{anId:{plain:o}}:{});Rt.set(an,i)}hashPPIDs(e,t){return P(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield oe.post(t,n,e)}catch(e){return s("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return P(this,arguments,void 0,function*({clientId:e,instance:t},n){const o=yield((e,t)=>P(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${vn[t]}:${n}`:null}))(t,n),i=yield(r=t,P(void 0,void 0,void 0,function*(){const e=yield r.getEnvironmentId();return e?`sdrn:schibsted:environment:${e}`:null}));var r;const a=window.advertory_idfv,d=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:o},environmentId:{plain:i},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},a?{idfv:{plain:a}}:{}),d?{anId:{plain:d}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:o,environmentId:i}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:o.plain,environmentId:i.plain}}},fn=e=>P(void 0,void 0,void 0,function*(){const{pulse:t,tcf:n,pageContext:{countryCode:o,isMobileApp:i}}=e;if(!(yield it(n,i,o,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([hn.processPPIDs(t,null==n?void 0:n.timeout),mn.processPPIDs(t,o)])).forEach((e,t)=>{if("rejected"===e.status){s(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),yn=e=>{const{ppid1:t,ppid2:n}=hn.getPPIDs(),{ppid1:o,ppid2:i,idfv:r,anId:a}=mn.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new gn).add(n,dn[e]).add(t,sn[e]).add(i,ln[e]).add(o,cn[e]).add(r,un[e]).add(a,pn[e]).buildEids()}]}},bn=()=>{const{ppid1:e,ppid2:t}=hn.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},wn=e=>{const{ppid1:t,ppid2:n}=hn.getPPIDs(),{ppid1:o,ppid2:i,idfv:r,anId:a}=mn.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new gn).add(n,dn[e]).add(t,sn[e]).add(i,ln[e]).add(o,cn[e]).add(r,un[e]).add(a,pn[e]).buildRyEids()}}]}}},kn=e=>{const{ppid1:t,ppid2:n}=hn.getPPIDs(),{ppid1:o,ppid2:i}=mn.getPPIDs();return(new gn).add(n,dn[e]).add(t,sn[e]).add(i,ln[e]).add(o,cn[e]).buildRyEids()},xn=e=>P(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=hn.getPPIDs(),{ppid1:o,ppid2:i}=mn.getPPIDs(),r=(new gn).add(n,dn[e]).add(t,sn[e]).add(i,ln[e]).add(o,cn[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),Cn=(e,...t)=>P(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,o)=>{const i=document.createElement("script");i.async=!0,i.src=e;const r=()=>{d(),n()},a=()=>{d(),o(new Error(`Failed to load ${e}`))},d=()=>{i.removeEventListener("load",r),i.removeEventListener("error",a),clearTimeout(s)};i.addEventListener("load",r),i.addEventListener("error",a);const s=setTimeout(()=>{d(),o(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}),In="advertory-fullscreen-scroll",En="advertory-fullscreen-scroll-wrapper",Tn="fullscreen-scroll-in-screen",Sn="in-screen",Pn=e=>e.includes("snoap.no"),An=e=>{var t,n,o,i,r;return!!(null===(r=null===(i=null===(o=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===o?void 0:o.adResponse)||void 0===i?void 0:i.ads[1])||void 0===r?void 0:r.rtb)},On=ut([],()=>{const e=({width:e,height:t})=>{var n;const o=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!o)return;const{clientWidth:i,clientHeight:r}=o,a=e/i,d=t/r;o.style.transform=`scale(${a},${d})`,o.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),jn=e=>{const t=ut([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const o=n.contentDocument.createElement("style");o.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(o),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},$n=e=>{if((e=>e.includes("google"))(e))return e;const t=document.createElement("div");t.innerHTML=e;const n=t.querySelector("img");if(!n)return e;n.style.width="100%",n.style.height="100%",n.style.objectFit="cover",n.style.position="fixed";return t.innerHTML},Ln=[],_n={},Nn=(e,t)=>{var n;const o=(null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.fadingHeaderEnabled)||!1,i=new IntersectionObserver(e=>qn(e,o),{}),r=Dn(e);i.observe(e),o&&(_n[r]=Rn(e,null==t?void 0:t.options))},qn=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const o=Dn(e);n?(Fn(o,n),Mn(e,o,t)):(Fn(o,n),Bn(e,o,t))})},Fn=(e,t)=>{var n,o;const i=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!i)return;const r=t?"showFullscreen":"hideFullscreen";null===(o=i.contentWindow)||void 0===o||o.postMessage(`advertory:${r}-${e}`,"*")},Dn=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},Mn=(e,t,n)=>{e.classList.add(Sn),document.body.classList.add(Tn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),Ln.includes(t)||Ln.push(t),n&&window.addEventListener("scroll",_n[t],{passive:!0})},Bn=(e,t,n)=>{Ln.includes(t)&&(n&&window.removeEventListener("scroll",_n[t]),document.body.classList.remove(Tn),e.classList.remove(Sn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},Rn=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:o=[".skyscraper_r"],headerZIndex:i=3}=t,r=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&r.push(n)}),o.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{r.length&&Un(e,r,i,0),a.length&&Un(e,a,i,40)}},Un=(e,t,n,o)=>{const i=e.offsetHeight,r=window.scrollY,a=e.getBoundingClientRect().top+r;t.forEach(e=>{const t=e.offsetHeight;let d;d=a>r?(a-r)/t-o:(r+t-(a+i))/t;const s=d<=0;e.style.visibility=s?"hidden":"",e.style.zIndex=s?"":n.toString(),e.style.pointerEvents=s?"none":"all",e.style.opacity=d.toString()})};function zn(e){if(!e||"undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}zn('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100vw !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);flex-shrink:0}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll:not([data-ad-label-custom])::before{text-transform:lowercase}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top:var(--advertory-political-box-offset, 0px)}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px) + var(--advertory-political-box-offset, 0px)) !important}.advertory-fullscreen-scroll::before{left:calc(50vw - 628px);width:calc(100% - 36px);max-width:1250px;text-align:left;background-color:hsla(0,0%,100%,.6);color:#212121;font-family:Ester Blenda,Arial,sans-serif;font-size:11px;font-weight:400;font-style:normal;line-height:1;margin:16px 2px;padding:10px;z-index:1;visibility:inherit !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll::before{left:16px}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:calc(50vw - 623px);right:unset}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:22px;right:unset}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]::before{padding-left:32px}.advertory-fullscreen-scroll>div[id*=utif]{display:block;width:var(--advertory-fullscreen-scroll-vw, 100vw) !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[id*=utif]{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important}.advertory-fullscreen-scroll>div[id*=utif]{overflow:hidden}.advertory-fullscreen-scroll>div[id*=utif]>iframe{display:block;height:inherit !important;width:inherit !important}.advertory-fullscreen-scroll>div[role=button]{z-index:2;opacity:1;background:rgba(0,0,0,0) !important;left:unset;position:fixed !important;right:calc(50vw - 623px);top:calc(19px + var(--advertory-political-box-offset, 0px)) !important;width:26px !important;height:26px !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[role=button]{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix) + 19px + var(--advertory-political-box-offset, 0px)) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');const Vn="left",Hn={no:{adText:"ANNONSE",adFrom:"ANNONSE FRA",adContent:"ANNONSØRINNHOLD",adContentFrom:"ANNONSØRINNHOLD FRA"},se:{adText:"ANNONS",adFrom:"ANNONS FRÅN",adContent:"EXTERN LÄNK",adContentFrom:"EXTERN LÄNK FRÅN"}};let Wn=null;const Kn=(e,t)=>{let n=e;return n=(e=>{const t=document.createElement("script");return t.textContent="\n window.addEventListener('message', function(event) {\n if (event.data === 'advertory:showFullscreen-'+document.body.id) {\n document.body.style.display = \"block\";\n } else if (event.data === 'advertory:hideFullscreen-'+document.body.id) {\n document.body.style.display = \"none\";\n }\n });\n ",e+t.outerHTML})(e),n=(e=>{const t=document.createElement("script");return t.textContent=`(${On})()`,e+t.outerHTML})(n),n=$n(n),n=(e=>{if(Pn(e))return e;const t=document.createElement("style");return t.textContent="\n .GoogleActiveViewClass, .GoogleActiveViewElement {\n transform: translate(calc(-50% + 50vw), 0);\n width: 100vw !important;\n height: 100vh !important;\n }\n .GoogleActiveViewClass img, .GoogleActiveViewElement img {\n width: 100vw;\n height: 100vh;\n object-fit: cover;\n }\n .GoogleActiveViewClass iframe {\n width: 100vw !important;\n height: 100vh !important;\n }\n ",e+t.outerHTML})(n),(e=>e.includes("adform"))(n)&&(n=(e=>{const t=document.createElement("script");t.textContent='\n var frame = window.frameElement;\n if (frame) {\n frame.style.removeProperty("width");\n frame.style.removeProperty("height");\n frame.contentWindow.document.body.onload = onLoad;\n } else {\n document.body.onload = onLoad;\n }\n \n function onLoad() {\n var iframe = document.querySelector("adfm-ad iframe");\n if (iframe) {\n var image = iframe.contentWindow.document.getElementById("image");\n if (!image) return;\n image.style.backgroundSize = "cover";\n } else {\n var iframe = document.querySelector(".adform-adbox iframe");\n if (iframe) {\n var style = document.createElement("style");\n style.textContent = "#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}";\n iframe.contentDocument.body.append(style);\n iframe.style = "width: 100vw; height: 100vh;";\n } else {\n var observer = new MutationObserver(function(mutations, obs) {\n for (var mutation of mutations) {\n var iframe = mutation.addedNodes[0];\n if (iframe && iframe.nodeName === "IFRAME") {\n iframe.style = "width: 100vw; height: 100vh;";\n iframe.dataset.contents += "<style>#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}</style>";\n obs.disconnect();\n }\n }\n });\n observer.observe(document.body, { childList: true, subtree: true });\n }\n }\n }\n ';const n=document.createElement("style");return n.textContent="\n html, body, adfm-ad, #sf_align, .adform-adbox, .adform-adbox img {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover;\n max-width: 100vw;\n }\n ",e+n.outerHTML+t.outerHTML})(n)),(e=>e.includes("529299503"))(n)&&(n=jn(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>Pn(e)?e:e.replace("<iframe ","<iframe onload=\"\n var f = document.querySelector('iframe');\n if (!f) return;\n var s = f.style;\n s.transform = 'scale(' + (window.innerHeight / Number(f.height)).toFixed(2) + ')';\n s.right = parseInt((Number(f.width) - window.innerWidth) / 2) + 'px';\n s.bottom = parseInt((Number(f.height) - window.innerHeight) / 2) + 'px';\n s.position = 'relative';\n \" "))(n)),Pn(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</iframe>","</iframe><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),(e=>e.includes("kreateam.io"))(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</div>","</div><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),An(t)&&(n=(e=>{const t=document.createElement("script");t.textContent='var frame = window.frameElement;\n if (frame) {\n frame.style.width = "100vw";\n frame.style.height = "100vh";\n }';const n=document.createElement("div");return n.innerHTML=e,n.appendChild(t),n.innerHTML})(n)),n},Gn=()=>{Wn=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,o=e?e.offsetLeft:0,i=document.documentElement;i.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),i.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),i.style.setProperty("--advertory-fullscreen-scroll-left",`${o}px`)},Xn=()=>{Wn||(Wn=window.requestAnimationFrame(Gn))},Jn=(e,t)=>{var n,o,i,r,a;const{pageContext:{countryCode:d,deviceType:s}}=f.get(),{targetId:l}=e,c=null==t?void 0:t.options;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==c?void 0:c.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),((e,t)=>{var n;const{articlesContainerWidth:o=1302,backgroundColor:i="#fff",foregroundColor:r="#fff",margin:a,beforeContentValue:d=""}=e,s=null!==(n=null==a?void 0:a[t])&&void 0!==n?n:"16px 0",l=o/2,c=document.createElement("style");c.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${i} 0px,\n ${i} calc(50% - ${l}px),\n ${r} calc(50% - ${l}px),\n ${r} calc(50% + ${l}px),\n ${i} calc(50% + ${l}px),\n ${i} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${s};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${d&&"clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);\n -webkit-clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);"}\n }\n\n .advertory-fullscreen-scroll-wrapper:before, .advertory-fullscreen-scroll-wrapper:after {\n background: var(--background);\n content: '${d}' !important;\n }`,c.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(c)})(null!==(o=null==c?void 0:c.overlayStyles)&&void 0!==o?o:{},s);const u=document.getElementById(l),p=null==u?void 0:u.parentElement;if(!u||!p)return;Nn(p,t),u.className=In,Nn(p,t),u.className="advertory-fullscreen-scroll";const v=Qe(e,Se)?"absolute":"fixed";u.style.position=v,p.className=En,p.dataset.showTagSubscribeId=l,u.setAttribute("data-ad-label",null!==(i=null==c?void 0:c.annonsLabel)&&void 0!==i?i:Hn[d].adText),(null==c?void 0:c.annonsLabel)&&(u.dataset.adLabelCustom="true"),(null==c?void 0:c.cogwheelPosition)===Vn&&(u.dataset.moveCogwheelToTheLeft="true"),Xn(),window.addEventListener("resize",Xn),null===(r=window.visualViewport)||void 0===r||r.addEventListener("resize",Xn),null===(a=window.visualViewport)||void 0===a||a.addEventListener("scroll",Xn)},Yn=e=>{if(!(null==e?void 0:e.classList.contains(In)))return;e.classList.remove(In),e.removeAttribute("style"),e.removeAttribute("data-ad-label"),e.removeAttribute("data-ad-label-custom");const t=e.parentElement;(null==t?void 0:t.classList.contains(En))&&(t.classList.remove(En),t.classList.remove(Sn))};var Qn=Object.freeze({__proto__:null,createFullscreenScrollAd:Jn,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,o=An(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[o].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,o=An(e)?1:0,i=null==n?void 0:n.tags[e].adResponse.ads[o].rtb;i&&(i.banner.content=t)})(e,Kn(t,e))},undoFullscreenScrollContainer:Yn});const Zn=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},eo=(e,t,n)=>{var o,i,r,a;const d=document.createElement("div");d.id=`${e}-button`,t.appendChild(d);(null===(i=null===(o=window.apntag.requests)||void 0===o?void 0:o.tags[e])||void 0===i?void 0:i.adResponse)||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]=Object.assign(Object.assign({},window.apntag.requests.tags[e]),{adResponse:{ads:[{creative_id:n}]}})),Zn(e);const s=d.firstElementChild;s&&t.insertBefore(s,d),d.remove()},to="ad-loaded",no=(e,t,n)=>P(void 0,void 0,void 0,function*(){yield $,yield L;new IntersectionObserver((t,o)=>{t.filter(({isIntersecting:e})=>e).forEach(()=>{n(),o.unobserve(e),o.disconnect()})},{rootMargin:`${t}px 0px ${t}px 0px`}).observe(e)}),oo=()=>P(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,pageContext:{countryCode:n,isMobileApp:o,deviceType:i},fullscreenScroll:r,appearanceConfig:a,placements:d}=f.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:l}=f.getHandlers(),{getConsentAsync:c}=ot(t,0,n),u=yield c(),p=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:o=>{const i=nn(),{prebid:{relevantCallbackTimeout:r}={}}=f.get(),a="relevantCb"===o&&r?r:n[o].timeout,d=setTimeout(()=>{!n[o].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${o}'`),e=!0,i.loadTags&&i.loadTags())},a);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),v=nn(),g=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=nn();return{user:e,keywords:t}})();p.failsafeOnTimeout("relevantCb");const{user:{externalUid:h=""}={},keywords:m}=g;(()=>{const e=on();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{s("prebid relevantYieldQueue callback fired - RY took over");if(p.getCancel()||!v.loadTags)return s("core loadTags() call was cancelled",{cancel:p.getCancel(),apnTagLoadTags:!v.loadTags,condition:"or"}),void p.cleanup();const t=on();p.events.relevantCb.done=!0,p.failsafeOnTimeout("auctionCb");const c=u?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};s("prebid consentManagement",c),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:c,enableSendAllBids:!1},wn(n)),rn(m,h))),s("core add prebid config",Object.assign(Object.assign({consentManagement:c,enableSendAllBids:!1},wn(n)),rn(m,h))),t.loadPrebid({configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{s("prebid auctionCb loadTags called by RY - prebid hands off to Xandr",{targetIds:e,cancelled:p.getCancel()}),p.getCancel()||(p.events.auctionCb.done=!0,v.loadTags(e)),p.cleanup()}},customNativeRender:e=>{io(e,l)},directRenderFn:e=>{var t,n,l;const{settings:c,renderFn:u}=e,{bid:p,adDiv:v}=c||{};if(!v)return;const g=v.id,h=document.getElementById(g);if(!h)return;const m=null===(t=null==d?void 0:d[i])||void 0===t?void 0:t.find(e=>e.targetId===g),f=null!==(l=null!==(n=null==m?void 0:m.requestThreshold)&&void 0!==n?n:null==a?void 0:a.defaultThreshold[i])&&void 0!==l?l:0,y=Object.assign(Object.assign({},p),{targetId:g,banner:!0});s("prebid directRenderFn ad info",{targetId:g,width:null==p?void 0:p.width,height:null==p?void 0:p.height,adId:null==p?void 0:p.adId,creativeId:null==p?void 0:p.creativeId}),no(h,f,()=>{var e;const t=u(c),n=De(y);if(s("prebid directRenderFn isFullscreenScrollAd",{targetId:g,isFullscreen:n,width:null==p?void 0:p.width,height:null==p?void 0:p.height}),n)s("prebid directRenderFn: creating fullscreen scroll container",{targetId:g}),Jn(y,r),(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const o=new MutationObserver(()=>{n()&&o.disconnect()});o.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(t),o&&h.style.setProperty("--advertory-political-box-offset","30px");else{s("prebid directRenderFn: NOT fullscreen scroll - undoing container",{targetId:g}),Yn(h),null===(e=null==h?void 0:h.parentElement)||void 0===e||e.classList.add("advertory-direct-render");const n=t.getAttribute("width");n&&(h.style.width=`${n}px`)}h.classList.add(to),(null==p?void 0:p.creativeId)&&eo(g,h,Number(null==p?void 0:p.creativeId))})}}),s("core load prebid",{configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{p.getCancel()||(p.events.auctionCb.done=!0,v.loadTags(e))}},customNativeRender:e=>{io(e,l)},directRenderFn:()=>{}})})}),io=(e,t)=>{var n;const{divId:o,native:i,bid:r}=e,a=document.querySelectorAll(`[id^=${o}]`)[0],d=`RY-${a.id}`;((e,t)=>{e.childNodes.forEach(e=>e.style.cssText="position: absolute; z-index: -1;");const n=document.createElement("div");n.setAttribute("id",t),e.appendChild(n)})(a,d);const s=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;null==t||t({native:i,targetId:d},f.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")},ro=(e,t,n)=>{const o=document.getElementById(`div_utif_${e}`);if(!o)return;const{apntag:i}=window,[r,a]=t;if(!o.dataset.lockedsize&&a&&r)o.style.width=`${r}px`,o.style.height=`${a}px`,n&&(i.resizeAd(o.id,[r,a]),o.dataset.lockedsize="true",o.dataset.lockedwidth=r.toString(),o.dataset.lockedheight=a.toString());else if(null==o?void 0:o.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=o.dataset;e&&t&&i.resizeAd(o.id,[e,t])}},ao=["netboard","board"];class so{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,o;const{editionName:i}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(o=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==o?o:[]),d=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:s,spid:l}=t;return d.searchParams.append("editionName",i),r&&d.searchParams.append("urlData",r),a&&d.searchParams.append("excludedItems",a),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(e){return P(this,void 0,void 0,function*(){var t,n,o;const i=yield this.identityFacade.getIdentityUser(),r=null!==(o=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==o?o:"",a=(null==i?void 0:i.userId)?String(i.userId):"",d=this.buildUrl(e,{envId:r,spid:a});try{s("Starting fetching DrEdition ad from URL:",d);const e=yield oe.get(d);return s("Fetch operation completed successfully."),e}catch(e){s("Error during fetch operation:",e)}return null})}}let lo=class{getDrEditionUTMParams(e,t){var n;const{title:o="",clientName:i,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,d=o.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:i,utm_medium:d},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const o=this.getDrEditionUTMParams(t,n),i=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(o).forEach(([e,t])=>{i.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const o=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!o)return"";const i=this.getDrEditionUTMParams(e,t),r=new URL(o);return Object.entries(i).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return P(this,void 0,void 0,function*(){const{id:n,autoplay:o,mute:i,videoLoop:r,vendor:a}=t.videoConfiguration;e.classList.add("vgtv-video-container"),Object.assign(e.dataset,{vgtvVideoId:n,vgtvVendor:a,vgtvAutoplay:o,vgtvMuted:i,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:o,pathname:i}=new URL(n);if(!o.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const r=i.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}};const co=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):s("Dr. Edition container does not have a parent element, cannot remove height lock.")};class uo{constructor(e,t,n,o){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=o,this.drEditionAds=[]}fetchAndRenderAd(e,t){return P(this,void 0,void 0,function*(){var n,o;const{drEditionConfig:{options:{containerSelector:i}},renderAsBackfill:r=!1}=t,a=e.querySelector(i);if(!a)return void s(`Container with selector "${i}" not found.`);const d=yield this.drEditionService.fetchData(t);return(null==d?void 0:d.itemId)||r?!(null==d?void 0:d.itemId)&&r?(s("No Dr. Edition ads available to render. Collapsing whole placement."),X(e.id),void co(a)):((null==d?void 0:d.itemId)&&r&&(s("Dr. Edition ad available to render as a Xandr backfill."),J(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(a,d,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),co(a),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===(o=e.querySelector("a"))||void 0===o||o.addEventListener("pointerup",()=>null)):co(a))):(s("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void co(a))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const o=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";J(o)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const o=e.querySelector(".dr-edition-slider");if(!o)return!1;let i=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(i&&clearTimeout(i),i=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...o.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...o.children].forEach(e=>{r.observe(e)}),!0}}class po{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return P(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:o}=ot(n.tcf,n.isMobileApp,n.country),i=yield o(),r=$t(n.device)?t.mobileHTML:t.desktopHTML,a=i?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var o,i,r;e.search=null!==(r=null===(i=(o=this.newsroomStrategy).getUrlSearchParams)||void 0===i?void 0:i.call(o,e,t,n))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class vo{constructor(e){this.strategy=e}handle(e,t){return P(this,void 0,void 0,function*(){const{videoConfiguration:{id:n,preview:o}={}}=e;(n||o)&&(yield this.importScript(t),yield this.createVideoElement(e,t))})}importScript(e){return P(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield Cn(t)}catch(e){s("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return P(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:o}=e.videoConfiguration,i=[...document.querySelectorAll(`#${o}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==i||i.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==i?void 0:i.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,o,i;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",r),d.setAttribute("playsinline",""),!(!d||!a)&&(null===(i=(o=t.drEditionConfig.options).addPreviewVideo)||void 0===i||i.call(o,d),!0))}}let go=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,o){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 o=null==n?void 0:n.textContent;return o?o.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:o}={}}=t,i=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:o}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return P(this,void 0,void 0,function*(){var o,i,r,a,d,s,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:n.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const p=this.getEventInput(e,t,n,"view");(null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)?null===(r=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===r||r.call(i,p):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackViewUIElement)||void 0===s||s.call(d,p):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,p)})}trackContentClick(e,t,n){return P(this,void 0,void 0,function*(){var o,i,r,a,d,s;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(i=(o=this.pulse).trackLegacyClickUIElement)||void 0===i||i.call(o,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(s=(d=this.pulse).trackElementClick)||void 0===s||s.call(d,l)})}},ho=class extends go{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var o,i,r;const{pulseData:{title:a,clientName:d="",creativeId:s,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:p,urlPath:v}=null!==(r=null===(i=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.transformUrl)||void 0===i?void 0:i.call(o,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[d,a,p,v].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:d,"spt:creativeId":s,pageTitle:a,publicUrl:p,urlPath:v},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}},mo=class extends go{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var o,i,r,a,d,s;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,p=n.editionName,v=this.mapPageType(this.pageType),g=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulseObjectId)||void 0===r?void 0:r.call(i))&&void 0!==a?a:p,"@type":"UIElement",position:p,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:p,"@type":v,url:location.origin},tags:null===(s=null===(d=this.newsroomStrategy)||void 0===d?void 0:d.getTags)||void 0===s?void 0:s.call(d,e)}}getEventInput(e,t,n,o){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,o),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,o){var i,r,a,d;const{pulseData:{algorithm:s="sov",clientName:l,creativeId:c,editionId:u,itemId:p,url:v,probability:g}={}}=t,h=Math.floor(Date.now()/1e3),m=this.getTeaserElementText(e,"title"),f=this.getTeaserElementText(e,"subtitle"),y=this.getTeaserElementText(e,"image"),b=null!==(d=null!==(a=null===(r=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getUrlWithParams)||void 0===r?void 0:r.call(i,t,n))&&void 0!==a?a:v)&&void 0!==d?d:"";return{algorithm:s,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:p,link:b,placement:n.editionName,subtitle:f,time:h,title:m,type:o,imageUrl:y,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const fo={FRONT:"front"},yo=e=>P(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 o=document.createElement("script");o.id=e,o.src="https://cdn.stream.schibsted.media/player/3.78.1/player.min.js",o.async=!0;try{o.src=o.src.replace("player.min","player.next.min")}catch(e){console.error("Failed to set player.next.min source:",e)}document.head.insertBefore(o,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)))}))}),bo={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 P(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Xa})})}})}};let wo=class{handleVideo(e,t){return P(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:o,mute:i,vendor:r}}){yield P(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const a=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var s,l;l=d,null==(s=a)||s.forEach(e=>{bo[e](l)});const c={id:t,node:n,autoplay:o,mute:i,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},u=yield yo(c);u.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(u,a)}),u.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),u.once("PulseStats:ready",()=>P(this,void 0,void 0,function*(){const e=yield u.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===fo.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:o}=new URL(n),i=o.split("/").filter(Boolean);return i.length?[...i.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 ko="https://www.aftonbladet.se/video-player-extras/latest/";let xo=class{handleVideo(e,t){return P(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:o,mute:i,vendor:r}}){const a={id:t,node:n,autoplay:o,mute:i,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"aftonbladet"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"",url:""},plugins:{[`${ko}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${ko}external-link.js`]:{name:"ExternalLink"}}};yield yo(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 Co=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);let Io=class{handleVideo(e,t){return P(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:o,mute:i,vendor:r}}){const a={id:t,node:n,autoplay:o,mute:i,vendor:r,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},Co(e)?e:{}),{provider:Object.assign(Object.assign({},Co(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 yo(a);d.once("PulseStats:ready",()=>P(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===fo.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}},Eo=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const To=(e,t,n)=>{const{publisher:o,pageType:i,country:r}=e,a={[Dt.VG]:new lo,[Dt.E24]:new wo,[Dt.AFTONBLADET]:new xo,[Dt.SVD]:new Io}[o]||new Eo,d=new(r===b.SE?ho:mo)(n,a,i),s=new so(t,n),l=new po(a,d),c=new vo(a);return new uo(s,l,c,d)},So=()=>P(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 Po{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 P(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 s("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return P(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 Ao=(e,t,n)=>{const{wrapperSelector:o}=e.drEditionConfig.options,i=document.querySelectorAll(o),r=new IntersectionObserver((o,i)=>((e,t,n,o,i)=>{const r=To(n,o,i);e.forEach(e=>{var o,i;if(!e.isIntersecting)return;const a=e.target,d=null!==(o=a.dataset.editionName)&&void 0!==o?o:"",s=null!==(i=a.dataset.pulseColumnname)&&void 0!==i?i:"",l=Number(a.dataset.pulsePrimaryposition)||0;r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:d,columnName:s,primaryPosition:l})),t.unobserve(a)})})(o,i,e,t,n),{rootMargin:"400% 0px"});i.forEach(e=>r.observe(e))},Oo=()=>P(void 0,void 0,void 0,function*(){try{(()=>{const e=document.createElement("script");e.setAttribute("src","https://ads.inventory.schibsted.io/ad-service/ad-banner-sponsor-advertisement/ad.js"),e.setAttribute("type","text/javascript"),e.setAttribute("async","true"),document.head.appendChild(e)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ads-advertory-anchor"),e.classList.add("subscribe_box"),e.classList.add("ad-box"),e.classList.add("leftAd"),e.classList.add("netboard"),e.classList.add("advert"),e.classList.add("module"),e.classList.add("banner"),e.classList.add("leaderboard"),e.classList.add("adsbygoogle"),e.classList.add("ad-banner"),e.classList.add("ad-container"),e.classList.add("adsbox"),e.classList.add("sidebar-ads"),e.classList.add("banner-ads"),e.style.opacity="0",e.style.width="1px",e.style.height="1px",e.style.minWidth="0px",e.style.minHeight="0px",e.style.maxWidth="1px",e.style.maxHeight="1px",e.style.position="absolute",e.style.top="0",e.style.boxSizing="border-box",e.style.margin="0",e.style.padding="0",document.body.appendChild(e)})()}catch(e){console.error("Error running adblock scripts:",e)}}),jo=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},$o=[],Lo=(e,t)=>P(void 0,void 0,void 0,function*(){var n;const{pulse:o,tcf:i,drEdition:r,pageContext:{deviceType:a,publisher:d,pageType:l,countryCode:c,isMobileApp:u}}=e;if(!(yield it(i,u,c,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,o;const{pageContext:{deviceType:i},placements:r,drEdition:a}=e,d=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,s=r[i]||r.desktop,l=T(t.targetId),c=s.find(e=>e.targetId===l),u=ao.some(e=>l.startsWith(e)),p=$o.includes(l),v=(null===(o=null==c?void 0:c.drEdition)||void 0===o?void 0:o.editionName)||d;return c&&u&&!p&&v?($o.push(l),Object.assign(Object.assign({},c),{drEdition:Object.assign(Object.assign({},c.drEdition),{editionName:v})})):null})(e,t);if(!p)return;if(!(null==o?void 0:o.instance))return void s("Pulse has not been passed as a prop, aborting");const v=yield So(),g=new Po(v),h=To({publisher:d,pageType:l,country:c},g,null==o?void 0:o.instance),m=document.getElementById(t.targetId);if(!m||!r)return;m.classList.value="";const f=document.createElement("div");f.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=f.outerHTML;const y={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:a,tcf:i,isMobileApp:u,country:c,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,y)}),_o=(e,t)=>{var n,o,i;if(!jo())return void s("Ad block not enabled, Dr. Edition backfills will not be rendered");s("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:r},finnBlink:a}=e,d=null===(o=null===(n=null==a?void 0:a.replacementConfig)||void 0===n?void 0:n.adsToReplace)||void 0===o?void 0:o[r],l=null!==(i=null==d?void 0:d.map(([e])=>e))&&void 0!==i?i:[],c=new IntersectionObserver((t,n)=>P(void 0,void 0,void 0,function*(){for(const o of t){if(!o.isIntersecting)continue;const t=o.target;n.unobserve(t),yield Lo(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!l.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&c.observe(t)})};var No=Object.freeze({__proto__:null,DrEdition:({editionName:e,fallbackTargetId:t,children:o,pulseData:i,htmlAttributes:r})=>{const a=(e,t)=>{const n={};if(!e)return n;for(const[o,i]of Object.entries(e)){n[t?`${t}-${o}`:o]=String(i)}return n},d=a(i,"data-pulse"),s=a(r,"data");return n.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":e},d,s,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":t,style:{display:"none"},children:o})]}))},getDrEditionManager:To,handleDrEdition:e=>P(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield it(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield So(),o=new Po(n);Ao({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},o,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),handleDrEditionBackfill:Lo,handleDrEditionBackfillOnAdblock:_o});const qo="collapseAd",Fo="hideAd",Do="resizeAd",Mo="renderDrEditionFallback",Bo="wallpaperImageUrl",Ro="wallpaperColor",Uo="velvet",zo=[Do,Bo,Ro,qo,Fo,Mo,Uo];let Vo;const Ho=e=>{if(!["http://acdn.adnxs-simple.com","https://acdn.adnxs-simple.com","https://crcdn01.adnxs-simple.com","http://crcdn01.adnxs-simple.com","https://acdn.adnxs.com","http://acdn.adnxs.com","https://adsdk.microsoft.com","https://adsdk.bing.net","https://adsdkprod.azureedge.net"].includes(e.origin.trim()))return;const{data:t}=e;if(!t)return;const n=(e=>{if("object"==typeof e)return e;if(M(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:Bo,wallpaperImageUrl:t}}if(B(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:Ro,wallpaperColor:t}}if(e.startsWith(Mo)){const t=e.split(":")[1];return{name:Mo,targetId:t}}if(e.startsWith(qo)||e.startsWith(Fo)){const t=e.split(":")[1];return{name:qo,targetId:t}}if(e.includes("name")&&zo.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!zo.some(e=>n.name===e))return;const{name:o,targetId:i,wallpaperImageUrl:r,wallpaperColor:a,cmd:d,size:s}=n;o===Uo&&d&&(d.includes("noScroll")&&(Vo=(e=>{if(!e)return()=>{};const t=e.style.overflow;return e.style.setProperty("overflow","hidden"),()=>{e.style.setProperty("overflow",t)}})(document.querySelector("body"))),(d.includes("close")||d.includes("ended"))&&(null==Vo||Vo(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),o!==qo&&o!==Fo||!i||X(i),o===Do&&i&&d&&ro(i,d),o===Mo&&i&&(X(i),Lo(f.get(),{targetId:i})),"resizeMediationAd"===o&&i&&s&&ro(i,s,!0),o===Bo&&r&&R(r),o===Ro&&a&&U(a)},Wo=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=f.get(),o=window.apntag,i={publisher:e,countryCode:t,finnBlink:n},r=e=>{J(e),j(()=>o.showTag(e))};return{withXandrAd:r,withFinnBlinkAd:e=>P(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ld});yield t(e,i,null)}),withFullAdsChain:e=>P(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return void r(e);const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ld});yield t(e,i,r,()=>P(void 0,void 0,void 0,function*(){if(!Q.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return z});t(e)}))})}},Ko=(e,t)=>P(void 0,void 0,void 0,function*(){e.id.includes("wallpaper")||(yield no(e,t,()=>((e,t,n)=>{const o="true"===n.dataset.isFinnBlinkOnlyPlacement;return We(t)&&o?(s(`loading finn blink ad for blink only placement for ${t}`),void Wo().withFinnBlinkAd(t)):We(t)?(s(`loading finn blink ad with full ads chain for ${t}`),void Wo().withFullAdsChain(t)):void j(()=>(s("core showTag",{id:t}),e.showTag(t)))})(window.apntag,(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(e),e)))}),Go=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Xo=new Map,Jo=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Yo=".brandstudio-premium-content-widget",Qo=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Zo=({adWrapper:e,placementContainer:t})=>{const n=Qo({adWrapper:e,placementContainer:t});var o;null==e||e.style.setProperty("height",`${n}px`),ue(o=t),o.innerHTML=""},ei=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},ti=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=f.get(),o=Jo.includes(n)&&Boolean(t.closest(Yo));const i=o?t.closest(Yo):null,r=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!o&&!a||o&&!i)return;if(a)return ei(e),void r.disconnect();const d=t.closest('[style*="height"]'),s=i;d&&s.contains(d)?ei(d):s.hasAttribute("style")&&ei(s),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},ni=(e,t,n,o,i,r)=>{var a;const d=performance.now(),s=null!==(a=Xo.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(o,i)&&n<0;d-s>=i&&l&&(Xo.set(t,d),((e,t,n)=>{const{pageContext:{countryCode:o}}=f.get(),i=null==n?void 0:n.parentElement;i&&n&&Zo({adWrapper:i,placementContainer:n}),j(()=>{e.setKeywords([t],{[`${w(o)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},oi=(e,t,n)=>{const o=new IntersectionObserver((e,o)=>((e,t,n,o)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:i,boundingClientRect:r}=e;t(window.apntag,i.id,r.y,n,o,i)})})(e,ni,t,n),Go(300));o.observe(e)},ii=(e,t=6)=>{const n=[];for(let o=0;o<e.length;o+=t){const i=e.slice(o,o+t);n.push(i)}return n},ri=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),ai=(e,t=0)=>{const n=e.getBoundingClientRect(),o=window.innerHeight;return n.bottom>-t&&n.top<o+t},di=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=f.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),pi(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},si=(e,t,n)=>{const o=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const i of o){const o=e.find(e=>{var t,n;return e.targetId===(null===(t=i.firstElementChild)||void 0===t?void 0:t.id)&&(null===(n=e.refresh)||void 0===n?void 0:n.bfCache)}),r=null==o?void 0:o.requestThreshold;ai(i,r)&&o&&(ee(o.targetId),n.length&&i.classList.remove(...n),pi([o],t))}},li=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:o}}=f.get();t&&(e.forEach(({targetId:e})=>{const t=ci(e);t&&(t.dataset.bfCacheRefresh="true")}),o?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&si(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const o=()=>{window.scrollY>0&&(window.removeEventListener("scroll",o),si(e,!1,t))};n.persisted&&(ri()?window.addEventListener("scroll",o,{passive:!0}):si(e,!1,t))})})(e,n))},ci=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},ui=e=>{const{targetId:t,allowedFormats:n}=e,o=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(ci(t)),i=(e=>1===e[0]&&1===e[1])(o),r={sizes:[o],allowedFormats:i?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return i||(r.native=void 0),r},pi=(e,t=!1)=>{const{queryConfig:{batchSize:n=h}={}}=f.get(),o=e.map(({targetId:e})=>e),i=ii(o,n);if(t)for(const t of e){const e=ui(t);window.apntag.modifyTag(t.targetId,e)}for(const e of i)j(()=>window.apntag.refresh(e))},vi=e=>`externalImpId:'${e}'`,gi=(e,t)=>t?Object.assign(Object.assign({},e),{"aa-sch-ssa-native-ad":"true","aa-sch-ssa-format":"NATIVE_CONTENT","aa-sch-ssa-market":"XNO","aa-sch-ssa-cat":["ssa_1","ssa_2","ssa_3","ssa_4","ssa_5","ssa_6","ssa_7","ssa_8","ssa_9","ssa_10","ssa_11","ssa_12","ssa_13","ssa_14","ssa_15","ssa_16","ssa_17","ssa_18","ssa_19","ssa_20","ssa_21","ssa_22","ssa_23","ssa_24","ssa_25","ssa_26","ssa_27","ssa_28","ssa_29","ssa_30"]}):e,hi=e=>{var t;const{pageSetup:{tag:{forwardExternalImpId:n=!1}={}}={},pulse:o}=f.get(),{targetId:i,sizes:r,keywords:a,allowedFormats:d,invCode:l,ssaNativeAdEnabled:c=!1,nativeCustomProperties:u,safeframeConfig:p,dynamicSizeWidthCheck:v=!1,globalPlacementId:g}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||ft())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],o=Array.isArray(n)?n.filter(e=>e!==lt):n,i=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":o}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:i})})(e),h=Object.assign({invCode:l,sizes:r,targetId:i,keywords:gi(a,c),allowedFormats:d,dynamicSizeWidthCheck:v,globalPlacementId:g},p&&{safeframeConfig:p}),m=(e=>{var t,n;const o=null===(n=null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)||void 0===n?void 0:n.pageViewId;return o?(s("Pulse state pageViewId is:",o),o):(s("Pulse state does not contain field pageViewId or it is empty"),"")})(o);n&&m&&(s("External Impression ID assigned to defineTag:",vi(m)),h.externalImpId=vi(m));const y=(e=>Object.entries({video:{required:!1},address:{required:!1},saleprice:{required:!1},rating:{required:!1},price:{required:!1},phone:{required:!1},likes:{required:!1},downloads:{required:!1},customIcon1:{required:!1},customIcon2:{required:!1},customDisplayUrl1:{required:!1},customBody1:{required:!1},customBody2:{required:!1},customBody3:{required:!1},customBody4:{required:!1},customBody5:{required:!1}}).reduce((t,[n,o])=>((null==e?void 0:e.includes(n))&&(t[n]=o),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(u);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(h.native=y),h},mi=e=>!e.includes("takeover")||ft(),fi=e=>{const{source:t}=e;return"csm"===t},yi=e=>{if(!e)return e;const{pageContext:{countryCode:t}}=f.get(),n=w(t),o=e[`${n}-targetid`],i=o?T(o[0]):"";return Object.assign(Object.assign({},e),o&&{[`${n}-targetid`]:[i]})},bi=e=>{const{pageContext:{countryCode:t}}=f.get(),n=w(t);return Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${n}-geo`]&&{[`${n}-geo`]:["geo-test-value"]}),e[`${n}-geofence`]&&{[`${n}-geofence`]:["geofence-test-value"]}),e[`${n}-weather`]&&{[`${n}-weather`]:["weather-test-value"]})},wi=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const o=n.split(",")[0].split(":")[0],i=e.find(e=>e.invCode===o),r=document.querySelector(`[id^=${null==i?void 0:i.targetId}]`);r&&r.scrollIntoView({behavior:"smooth",block:"start"})})(e),(()=>{var e;const t=new URLSearchParams(window.location.search).get("scrollToDrEditionPlacement");if(!t)return;const n=null!==(e=document.querySelector(`[id*="${t}}"]`))&&void 0!==e?e:document.querySelector(`a[aria-label*="${t}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"start"})})()},ki=(e,t)=>P(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})});zn(".advertory-brandmetrics-survey{width:100%}");const xi="advertory-brandmetrics-survey",Ci="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",Ii=()=>P(void 0,void 0,void 0,function*(){return window.__tcfapi?{gdpr:1,gdpr_consent:yield(e=window.__tcfapi,new Promise((t,n)=>{e("addEventListener",2,(n,o)=>{var i;o||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(i=n.tcString)&&void 0!==i?i:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),Ei={pageContext:{publisher:"aftonbladet",countryCode:b.SE},memberId:9943,sectionKeyword:"se-aftonbladet-section",frontpageInvCodeTemplate:"se-aftonbladet-{deviceType}-front-{position}",additionalFilterKeys:["se-aftonbladet-navigation","se-aftonbladet-keyword_generator","se-aftonbladet-sponsor"],tcf:{enabled:!0,advertisingCMPSignalEnabled:!0,schibstedConsentToPayEnabled:!0},glimr:{enabled:!0,clientId:"OYGH3SXYFAQR78LVPNQD"}},Ti={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},Si=e=>(null==e?void 0:e.parent)?[...Si(e.parent),e.shortPath||"unknown"]:[],Pi=(e,t)=>t?"se-aftonbladet-{deviceType}-studio_{position}":`se-aftonbladet-tv-{deviceType}-${(e=>{var t;if(null===(t=null==e?void 0:e.metadata)||void 0===t?void 0:t.afp)return"afp";const[,n]=Si(e);return Ti[n]||"ovrigaavdelningar"})(e)}_{position}`,Ai={aftonbladet:Ei},Oi={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:Pi(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:Si(e).join(":")}}},ji=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},$i=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),Li="se-generic",_i="aa-sch",Ni="kv_",qi="pause",Fi="{deviceType}",Di="{position}",Mi="afp_",Bi=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),Ri="1-1",Ui="16-9",zi="3-4",Vi="9-16",Hi="responsive",Wi={[Ri]:1,[Ui]:1.78,[Vi]:.56,[Hi]:1},Ki={[Ri]:1,[Ui]:1.78,[zi]:1.33,[Vi]:.56},Gi=(e,t,n,o)=>{const{invCode:i="",videoOverlayInvCode:r}=null!=e?e:{},a=me===n?be:we,d=i.replace(Fi,a);return(e,n)=>{if(e===qi)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(Di,qi).replace(/-([a-z]+)_/,"-article-"))(d);if(n&&Bi.has(e)){return(o&&r?r:t.frontpageInvCodeTemplate).replace(Fi,a).replace(Di,e)}return d.replace(Di,e)}},Xi=(e,t)=>{const n=Object.entries(e);return n.reduce((n,[o,i])=>{const r=Math.abs(e[n]-t);return Math.abs(i-t)<r?o:n},n[0][0])},Ji=()=>{var e,t;const n=jwplayer().getContainer(),o=null!==(t=null===(e=document.getElementById(n.id))||void 0===e?void 0:e.parentElement)&&void 0!==t?t:null;return o&&"number"==typeof o.offsetWidth&&"number"==typeof o.offsetHeight&&0!==o.offsetHeight?o.offsetWidth/o.offsetHeight:1},Yi=()=>{return(e=>{try{return decodeURIComponent(e)}catch(e){return""}})("undefined"!=typeof document&&null!==(t=null===(e=document.cookie.match("(^|;)\\s*_pulse2data\\s*=\\s*([^;]+)"))||void 0===e?void 0:e.pop())&&void 0!==t?t:"").split(",");var e,t},Qi=()=>{const e=null!==(t=Yi()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=Yi()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},Zi=()=>Object.fromEntries(new URLSearchParams(window.location.search)),er=(e,t)=>P(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{publisher:o,countryCode:i}}=t,{width:r,height:a}={width:window.innerWidth,height:window.innerHeight},d={isMobileApp:e.isApp,countryCode:i,publisher:o,pageType:"front",deviceType:e.deviceType},s=(yield it(n,e.isApp,i,"video"))?"1":"0",l=yield Ii(),c=yield xn(i),u=yield at({tcf:n,pageContext:d}),p=null!==(v=window.location.pathname.split("/").slice(-2,-1).pop())&&void 0!==v?v:"";var v;const g=((e=1)=>Xi(Ki,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?Xi(Wi,Number(m.toFixed(2))):Hi;var m,f;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${_i}-country_code`]:i,[`${_i}-publisher`]:o,[`${_i}-supply_type`]:(f=e.deviceType,f===me?fe:ye),[`kw_${_i}-page_type`]:"collection",[`${_i}-page_type`]:"collection",[`${Li}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${Li}-page`]:"index",[`${Li}-page`]:"index",[`${Li}-screenheight`]:String(window.screen.height),[`${Li}-screenwidth`]:String(window.screen.width),[`${Li}-viewportheight`]:String(a),[`${Li}-viewportwidth`]:String(r),[`${Li}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${Li}-mobile-os`]:jt(),[`${Li}-audience`]:void 0,[`${Li}-externalid_src`]:Qi(),[`${Li}-tags`]:e.tags,[`${Li}-articleid`]:p,"article-id":p},yield Qt(Object.assign(Object.assign({},t),{pageContext:d}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${Li}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(Zi()).some(e=>e.includes(Ni))&&(()=>{const e=Zi(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(Ni)).map(([e,t])=>[e.slice(3),t]));return Object.keys(t).length>0?t:void 0})()),{[t.sectionKeyword]:e.sections.split(":"),"aa-sch-cmp_advertising":s,"kw_aa-sch-cmp_advertising":s,"aa-sch-instream_player_aspectratio":g,"aa-sch-player_aspectratio":h}),l),{eids:c})}),tr=["se-generic-audience","se-generic-appversion","se-generic-sitemode","se-generic-pagegen","se-generic-viewportheight","se-generic-viewportwidth","se-generic-screenheight","se-generic-screenwidth","aa-sch-inventory_type"],nr=["aa-sch-publisher","se-generic-page","aa-sch-supply_type","se-generic-story","se-generic-section","se-generic-adformat","aa-sch-context_keyword","se-generic-tvtags","se-generic-test","aa-sch-cmp_advertising","aa-sch-instream_player_aspectratio","aa-sch-player_aspectratio"],or=["external_uid","gdpr","gdpr_consent","eids","article-id"],ir=(e,t)=>{const n=[...tr,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||or.includes(e)?e:`kw_${e}`,t]))},rr=e=>Object.fromEntries(Object.entries(e).filter(([e])=>nr.includes(e))),ar=(e,t)=>P(void 0,void 0,void 0,function*(){var n,o,i,r;const a=(e=>{var t;Ai[e]||l(`[video] No config found for publisher "${e}"`);return null!==(t=Ai[e])&&void 0!==t?t:Ei})(e.publisher),d=(e=>{var t;return null!==(t=Oi[e])&&void 0!==t?t:Oi.aftonbladet})(e.publisher)(e.assetSection,e.isLiveStudio),s="/"===window.location.pathname,c=null===(o=null===(n=t.attributes)||void 0===n?void 0:n.id)||void 0===o?void 0:o.toString(),u=e.assetId===c,p=null!==(i=Number(e.aspectRatio))&&void 0!==i?i:1,v=u?"preroll":"bumper";var g;return{siteConfig:a,siteVideoParams:d,isUserPresentOnFrontPage:s,adsKeywords:yield er({pageAdsKeywords:e.pageAdsKeywords,tags:(g=e.tags,g?g.filter(e=>e.slug).map(({slug:e})=>e).join(","):""),sections:null!==(r=null==d?void 0:d.sections)&&void 0!==r?r:"",isUserLoggedIn:e.isUserLoggedIn,isUserPresentOnFrontPage:s,isInitialVideo:u,instreamAspectRatio:p,playerAspectRatio:Ji(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:v,playbackMethod:ji(e.startMode)}}),dr=(e,t)=>{const{siteConfig:n,siteVideoParams:o,isUserPresentOnFrontPage:i,adsKeywords:r,prerollPlacementFormat:a,playbackMethod:d}=e,{invCode:s}=o||{},l=Gi(o,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(Mi)?`${Mi}${t}`:t)(s),u=window.location.href;return{member:n.memberId,options:{autoplayMuted:!0,vpaidcontrols:!0},adSlots:{schedule:{preroll:{inv_code:l(a,i),"se-generic-playback-method":$i.get(d),"kw_se-generic-adformat":c(a)},midroll:{inv_code:l("midroll"),"kw_se-generic-adformat":c("midroll")},postroll:{inv_code:l("postroll"),"kw_se-generic-adformat":c("postroll")}},params:Object.assign(Object.assign(Object.assign({},ir(r,n)),rr(r)),{vskippable:"0",referrer:u,vplaybackmethod:d})},adPlacements:{schedule:{pause:{invCode:l("pause"),sizes:[[825,424],[1280,720],[2,1]]}},params:{keywords:Object.assign(Object.assign({},r),{"se-generic-adformat":c("pause")})}}}},sr=e=>t=>P(void 0,void 0,void 0,function*(){const n=yield ar(e,t);return dr(n,e)}),lr={plcmtcnt:1,context:1,contextsubtype:10,plcmttype:1,assets:[{id:1,title:{len:100},required:0},{id:2,img:{type:1,hmin:10,wmin:10},required:0},{id:3,img:{type:3,hmin:10,wmin:10},required:0},{id:4,data:{type:2},required:0},{id:5,data:{type:12},required:0}],ver:"1.2",eventtrackers:[{event:1,methods:[1,2]}]},cr={no:"NOK",se:"SEK"},ur={no:"no",se:"sv"};class pr{buildFetchObject(e,t,n,o){return P(this,void 0,void 0,function*(){const{pageContext:{countryCode:i},pageOptions:r}=o,{invCode:a,xandrPlacementId:d}=e,s=yield Ii(),l=(c=Object.assign(Object.assign({},t),n),Object.entries(c).flatMap(([e,t])=>void 0===t?[]:Array.isArray(t)?t.map(t=>`${e}=${t}`):[`${e}=${t}`]).join(","));var c;const u=new URL(window.location.href),p=(e=>{const{allowedFormats:t}=e;if(!t||t.includes("native"))return{request:JSON.stringify(lr),ver:"1.1"}})(e),v=(e=>{const{sizes:t,allowedFormats:n}=e;if((null==n?void 0:n.includes("banner"))&&t&&0!==t.length)return{format:t.map(([e,t])=>({w:e,h:t})),w:t[0][0],h:t[0][1]}})(e);return{id:O(36),imp:[Object.assign(Object.assign(Object.assign({id:a},p&&{native:p}),v&&{banner:v}),{secure:1,tagid:a,ext:{appnexus:Object.assign(Object.assign({},d&&{placement_id:d}),{code:a,keywords:l,use_pmt_rule:!1})}})],site:{domain:u.hostname,page:u.href,publisher:{id:String(r.publisherId),domain:u.hostname},ext:{amp:0}},device:{dnt:Number((null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)),ua:window.navigator.userAgent,h:screen.height,w:screen.width,language:(navigator.language||ur[i]||"no").split("-")[0]},regs:{ext:{gdpr:s.gdpr||0}},user:{id:yield at(o),ext:{consent:s.gdpr_consent||"",eids:kn(i)}},at:1,cur:[cr[i]],source:{tid:O(36)},ext:{prebid:{bidder:{appnexus:{member:r.member}}}}}})}fetchData(e,t,n,o){return P(this,void 0,void 0,function*(){try{s("Starting fetching Studio ad from Xandr:",Ci);const i=new Headers({"Content-Type":"application/json"}),r=new URLSearchParams(window.location.search),a=new URLSearchParams(["openRTBDebugMemberOverride","openRTBNewsroomOverride","openRTBForceNativeDesc2Override"].flatMap(e=>{const t=r.get(e);return t?[[e,t]]:[]})),d=a.size>0?`${Ci}?${a.toString()}`:Ci,l=yield this.buildFetchObject(e,t,n,o),c=yield oe.post(d,i,l);return s("Fetch operation completed successfully.",c),c}catch(e){s("Error during fetch operation:",e)}return null})}}const vr=0,gr=3,hr=(e,t,n,o)=>{const i=t.parentElement;if(!i)return;const r=e?`-${e}`:"",a=o?`__${o}`:"",d=`advertory${r}-${n}${a}`,s=`advertory${r}-${n}-wrapper${a}`;t.classList.remove(...t.classList),i.classList.remove(...i.classList),t.classList.add(d),i.classList.add(s),t.dataset.adType=n},mr="finn-blink",fr="native-ad",yr=(e,t)=>{br(e,t),kr(e,t)},br=(e,t)=>{var n,o;const i=document.querySelector(`#${e.targetId}`);if(!i||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(o=null==t?void 0:t.clickLinkSelector)&&void 0!==o?o:"a.ad-link";(null==i?void 0:i.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const o of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])Cr(o)}),t.dataset.tracked="true")})},wr=e=>{var t;const{native:{impressionTrackers:n}={}}=e,o=null==n?void 0:n.some(e=>e.includes("googleads")),i="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;o||!i?null==n||n.forEach(xr):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},kr=(e,t)=>{var n;let o=!1;const i=document.querySelector(`#${e.targetId}`);if(!i||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:me])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!o)for(const n of t)if(n.isIntersecting){o=!0,wr(e),c.disconnect();break}},s);c.observe(i)},xr=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Cr(e):window.navigator.sendBeacon(e)},Cr=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Ir=e=>e.reduce((e,t)=>{if(!t.serverSidePlacement)return e.clientSidePlacements.push(t),e;const n=Math.random()<.5;return t.keywords=Object.assign(Object.assign({},t.keywords),{"aa-sch-prerenderer":n?"true":"false"}),n?e.serverSidePlacements.push(t):e.clientSidePlacements.push(t),e},{clientSidePlacements:[],serverSidePlacements:[]}),Er=(e,t)=>P(void 0,void 0,void 0,function*(){var n,o;const{pageContext:{deviceType:i},appearanceConfig:r}=t,a=null==r?void 0:r.defaultThreshold[i],d=null!==(n=e.requestThreshold)&&void 0!==n?n:a,l=document.getElementById(e.targetId);if(!l)return void s(`Server-side ad container not found: ${e.targetId}`);yield new Promise(e=>{new IntersectionObserver((t,n)=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),e())},Go(d)).observe(l)});const{prepareTag:c}=f.getHandlers(),u=Q.getData("alertoryConfigKeywords"),p=null!==(o=c(hi(e)).keywords)&&void 0!==o?o:{},v=new pr,g=yield v.fetchData(e,u,p,t);g&&(((e,t,n)=>{const o=n===ge?t.mobileHTML:t.desktopHTML;if(o){if(t.adType===vr){const n=document.createElement("iframe");n.width=String(t.bid.w),n.height=String(t.bid.h),n.style.overflow="hidden",n.style.border="none",n.srcdoc=`<style>html,body{margin:0;overflow:hidden;}</style>${o}`,e.appendChild(n)}else e.innerHTML=o;e.classList.add("ad-loaded")}})(l,g,i),g.adType===gr&&(hr(t.pageContext.publisher,l,fr,t.pageContext.pageType),yr({targetId:e.targetId,native:{clickTrackers:g.clickTrackers,impressionTrackers:g.impTrackers}},{deviceType:i,appearanceConfig:r,nativeTrackingConfig:t.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,o)=>{var i,r,a;let d;(null===(i=window.apntag.requests)||void 0===i?void 0:i.tags[e])||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]={invCode:t,adResponse:{ads:[{creative_id:Number(null==o?void 0:o.adid)}]}}),!!n.querySelector("iframe")||(d=document.createElement("iframe"),n.appendChild(d)),eo(e,n,Number(null==o?void 0:o.adid)),null==d||d.remove()})(e.targetId,e.invCode,l,g.bid))}),Tr=(e,t)=>{e.forEach(e=>Er(e,t).catch(e=>{s("Failed to handle server-side ad:",e)}))},Sr=(e,t,n,o)=>{const i=document.querySelector(`#${e}`);i&&t&&(i.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:o,pageType:i}=t,r=o&&Object.values(Dt).includes(o);n&&r&&hr(o,e,fr,i)})(i,n),o())},Pr=(e,t)=>{var n,o;const i=document.querySelector(`#${e.targetId}`);if(!i||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(o=null==t?void 0:t.clickLinkSelector)&&void 0!==o?o:"a.ad-link";(null==i?void 0:i.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const o of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])$r(o)}),t.dataset.tracked="true")})},Ar=e=>{var t;const{native:{impressionTrackers:n}={}}=e,o=null==n?void 0:n.some(e=>e.includes("googleads")),i="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;o||!i?null==n||n.forEach(jr):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},Or=(e,t)=>{var n;let o=!1;const i=document.querySelector(`#${e.targetId}`);if(!i||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:me])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!o)for(const n of t)if(n.isIntersecting){o=!0,Ar(e),c.disconnect();break}},s);c.observe(i)},jr=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?$r(e):window.navigator.sendBeacon(e)},$r=e=>{oe.get(e,{mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Lr=(()=>{const e=new Map,t=new Map;return{getTemplate:t=>e.get(t),setTemplate:(t,n)=>{e.set(t,n)},deleteTemplate:t=>{e.delete(t)},getAdjustment:e=>t.get(e),setAdjustment:(e,n)=>{t.set(e,n)},clear:()=>{e.clear(),t.clear()}}})(),_r=(e,t,n)=>{if(!n)return Promise.resolve(null);const o=((e,t,n)=>`${null!=n?n:ie}/${ae}/${e}/adjustments/${t}.json`)(e,n,t),i=Lr.getAdjustment(o);if(i)return i;const r=oe.get(o,{timeout:re}).catch(e=>(s("Failed to fetch native template adjustment",{error:e,url:o}),null));return Lr.setAdjustment(o,r),r},Nr=(e,t,n)=>P(void 0,void 0,void 0,function*(){const o=((e,t)=>`${null!=t?t:ie}/${ae}/${e}/default.json`)(e,n);let i=Lr.getTemplate(o);i||(i=oe.get(o,{timeout:re}).catch(e=>{throw s("Failed to fetch native template",{error:e,url:o}),Lr.deleteTemplate(o),e}),Lr.setTemplate(o,i));const r=_r(e,n,t),[a,d]=yield Promise.all([i,r]);return{schema:a,adjustment:d}}),qr=(e,t)=>{const{adjustmentOverrides:n}=e,o=S(e,["adjustmentOverrides"]);return Object.assign(Object.assign({},o),t.overrides&&{adjustmentOverrides:a({},t.overrides)})},Fr="desktop",Dr="mobile",Mr="container",Br="text",Rr="image",Ur="cogwheel",zr=e=>{if(e)return e===ge?Dr:Fr},Vr=(e,t,n)=>{var o,i,r,a,d,s,l,c,u,p,v,g,h;const m=t?null===(o=e.overrides)||void 0===o?void 0:o[t]:void 0,f=null===(i=null==n?void 0:n.default)||void 0===i?void 0:i[e.id],y=t?null===(r=null==n?void 0:n[t])||void 0===r?void 0:r[e.id]:void 0;if(null!==(s=null!==(d=null!==(a=null==y?void 0:y.hidden)&&void 0!==a?a:null==f?void 0:f.hidden)&&void 0!==d?d:null==m?void 0:m.hidden)&&void 0!==s?s:e.hidden)return null;const b=Object.assign(Object.assign(Object.assign(Object.assign({},e.styles),null==m?void 0:m.styles),null==f?void 0:f.styles),null==y?void 0:y.styles),w=null!==(u=null!==(c=null!==(l=null==y?void 0:y.tag)&&void 0!==l?l:null==f?void 0:f.tag)&&void 0!==c?c:null==m?void 0:m.tag)&&void 0!==u?u:e.tag,k=null!==(g=null!==(v=null!==(p=null==y?void 0:y.text)&&void 0!==p?p:null==f?void 0:f.text)&&void 0!==v?v:null==m?void 0:m.text)&&void 0!==g?g:e.text,x=null===(h=e.children)||void 0===h?void 0:h.map(e=>Vr(e,t,n)).filter(e=>null!==e),C={id:e.id,tag:w,type:e.type,name:e.name,styles:b,connections:e.connections};return void 0!==k&&(C.text=k),void 0!==x&&(C.children=x),C},Hr=e=>Object.entries(e).map(([e,t])=>`${(e=>e.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()))(e)}:${(e=>String(e).replace(/"/g,"&quot;"))(t)}`).join(";"),Wr={microsoftMonetize:{title:"title","body-text":"body",description:"body","sponsored-by":"sponsoredBy","call-to-action":"cta","display-url":"clickUrl","desc-2":"desc2",image:"image",icon:"icon","title-1":"customTitle1","title-2":"customTitle2","title-3":"customTitle3","title-4":"customTitle4","icon-1":"customIcon1","icon-2":"customIcon2","custom-display-url-1":"customDisplayUrl1","custom-body-1":"customBody1","custom-body-2":"customBody2","custom-body-3":"customBody3","custom-body-4":"customBody4","custom-body-5":"customBody5"}},Kr=(e,t)=>{const n=e[t];return null==n?"":"object"==typeof n&&"content"in n?n.content:"object"==typeof n&&"url"in n?n.url:String(n)};class Gr{constructor(e,t=!1){this.tag=e,this.voidElement=t,this.attributes=new Map,this.content=""}attr(e,t){return t&&this.attributes.set(e,t),this}children(e){return this.content=e,this}build(){const e=[...this.attributes].map(([e,t])=>` ${e}="${t}"`).join("");return this.voidElement?`<${this.tag}${e}>`:`<${this.tag}${e}>${this.content}</${this.tag}>`}}const Xr=(e,t,n="")=>{var o;return(null===(o=e.connections)||void 0===o?void 0:o.length)?((e,t)=>{const n=[];for(const o of e){const e=Wr[o.server];if(e)for(const i of o.properties){const o=e[i];if(!o)continue;const r=Kr(t,o);r&&n.push(r)}}return n.join(" ")})(e.connections,t):n},Jr=(e,t,n,o)=>{var i;const{tag:r,styles:a}=e,d=(null!==(i=e.children)&&void 0!==i?i:[]).map(e=>Qr(e,t,n,!1)).join(""),s=new Gr(r);return o(s),s.attr("href","a"===r?Xr(e,t):"").attr("style",Hr(a)).children(d).build()},Yr={[Mr]:(e,t,n,o)=>{var i;const r=null!==(i=n.publisher)&&void 0!==i?i:"shared";return Jr(e,t,n,t=>{o&&t.attr("class",`advertory-${r}-ad-native-${e.name.toLowerCase()}`)})},[Ur]:(e,t,n)=>Jr(e,t,n,e=>{n.containerId&&e.attr("id",`${n.containerId}-button`)}),[Br]:(e,t)=>{var n;return new Gr(e.tag).attr("style",Hr(e.styles)).children(Xr(e,t,null!==(n=e.text)&&void 0!==n?n:"")).build()},[Rr]:(e,t)=>new Gr("img",!0).attr("style",Hr(e.styles)).attr("src",Xr(e,t)).build()},Qr=(e,t,n,o=!0)=>{const i=Yr[e.type];return i?i(e,t,n,o):""},Zr=e=>(t,{publisher:n,containerId:o,deviceType:i})=>(({config:e,nativeData:t,breakpoint:n,adjustments:o,publisher:i,containerId:r})=>{const a=o?qr(e,o):e,d=Vr(a.root,n,a.adjustmentOverrides);return d?Qr(d,t,{breakpoint:n,publisher:i,containerId:r}):null})({config:e,nativeData:t,breakpoint:zr(i),publisher:n,containerId:o}),ea="default",ta=(e,t)=>P(void 0,void 0,void 0,function*(){var n,o,i,r,a;const d=document.querySelector(`#${e.targetId}`);if(!e.native||!d)return;const{desc2:l}=e.native,c=null==l?void 0:l.toLowerCase(),u=((e,t)=>{const n=K(W),o=new URLSearchParams(window.location.search).get(W),i=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?i?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null})(e.targetId,null!=l?l:ea),p=(null!=u?u:c)||ea,v=null===(n=t.pageContext)||void 0===n?void 0:n.publisher;try{const{schema:n,adjustment:d}=yield Nr(p,v,null===(o=t.editory)||void 0===o?void 0:o.editoryUrl),s=d?qr(n,d):n,l=Zr(s),c={publisher:v,pageType:null===(i=t.pageContext)||void 0===i?void 0:i.pageType,deviceType:null===(r=t.pageContext)||void 0===r?void 0:r.deviceType,appearanceConfig:t.appearanceConfig,nativeTrackingConfig:t.nativeTrackingConfig,containerId:e.targetId,clickLinkSelector:"a"},u=l(e.native,c),{enabled:g=!0}=null!==(a=t.nativeTrackingConfig)&&void 0!==a?a:{};Sr(e.targetId,u,c,()=>{Zn(e.targetId),g&&((e,t)=>{Pr(e,t),Or(e,t)})(e,c)})}catch(e){s("Failed to render native ad from config",{error:e})}}),na="_adchoices_non_rtb",oa=e=>{const{tcf:{nonRtb:{invCodeSuffix:t=na}={}}={}}=f.get();return`${x(e)}${t}`},ia=(e,t)=>t?e:((e=>{e.filter(e=>!e.supportsNonRTB).forEach(e=>X(e.targetId))})(e),(e=>e.filter(e=>e.supportsNonRTB).map(e=>Object.assign(Object.assign({},e),{invCode:oa(e.invCode)})))(e)),ra=e=>`${Math.max(0,Math.round(e))}px`,aa=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},da=(e,t)=>{const n=document.body;if(n)for(const t of Object.keys(e)){const o=e[t];n.style.setProperty(t,o)}},sa=()=>{const{pageSectionsSelectors:e}=f.get();(null==e?void 0:e.header)&&(e=>{const t=document.querySelector(e);if(!t)return;const n=aa(t);da({"--advertory-header-height":ra(n)})})(e.header)};let la,ca=[];const ua=["takeover","wallpaper"],pa=e=>{const t=(e=>{var t;const n=Q.getData("alertoryConfigKeywords"),{queryConfig:o,placements:i,tcf:r,glimr:a,appearanceConfig:d,pageContext:{publisher:s,countryCode:l,pageType:c,deviceType:u,isMobileApp:p=!1},pageOptions:{member:v},pageSetup:g,takeover:m,fullscreenScroll:f,fullWidth:y}=e,b=null!==(t=null==o?void 0:o.batchSize)&&void 0!==t?t:h;return{xandr:{member:v,keywords:n,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({pageContext:{publisher:s,countryCode:l,pageType:c,deviceType:u,isMobileApp:p},pageSetup:g,placements:i,tcf:r,queryConfig:Object.assign(Object.assign({},o),{batchSize:b})},a&&{glimr:a}),d&&{appearanceConfig:d}),m&&{takeover:m}),f&&{fullscreenScroll:f}),y&&{fullWidth:y})}})(e);window.advertory={initialized:!0,version:"3.10.2",siteConfig:e,alertoryConfig:t}},va=()=>P(void 0,void 0,void 0,function*(){const{pageOptions:e}=f.get(),{preparePageOptions:t}=f.getHandlers(),n=(()=>{var e,t;const{pageSetup:{pageOptions:n}={}}=f.get();return{sandboxAdIframe:null===(t=null===(e=null==n?void 0:n.options)||void 0===e?void 0:e.sandboxAdIframeEnabled)||void 0===t||t,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),o=yield P(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=f.get();return(yield it(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),i=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),o));(e=>{const t=Q.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=bi(e);Q.setData("alertoryConfigKeywords",n)})(i.keywords),j(()=>la.setPageOpts(i))}),ga=e=>P(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,pageContext:{isMobileApp:o,countryCode:i}}=f.get(),r=yield it(n,o,i,"loadPlacements"),a=ia(e,r);ha(a);(null==t?void 0:t.enabled)&&r&&!G()?(s("core loadPlacements prebid enabled"),yield oo()):(s("core load tags invoked without prebid enabled"),ma(a))}),ha=e=>{const{prepareTag:t}=f.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const o=t.findIndex(t=>e.targetId.includes(t)),i=t.findIndex(e=>n.targetId.includes(e));return-1!==o&&-1===i?-1:-1===o&&-1!==i?1:o-i})})(e).forEach(e=>{s("core defineTags",{placement:e});const o=hi(e);if(mi(e.targetId)){const i=t(o),r=(e=>{const{allowedFormats:t,invCode:n,keywords:o,sizes:i}=e;return{adTypes:t,invCode:n,keywords:yi(o),sizes:i}})(i);n.push(r),j(()=>(s("core defineTag - add to the queue",{placement:e,preparedTag:i}),la.defineTag(i)))}}),(e=>{var t,n,o;(null===(o=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===o?void 0:o.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},ma=e=>{const t=e.filter(({targetId:e})=>mi(e)).map(({targetId:e})=>e);t.length&&j(()=>(s("core loadTags",{placementsIdsToLoad:t}),la.loadTags([...t])))},fa=(e,t)=>P(void 0,void 0,void 0,function*(){const{appearanceConfig:n,pageContext:{deviceType:o}}=f.get(),{requestThreshold:i,refresh:r}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),d=null==n?void 0:n.defaultThreshold[o];a&&(s("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,requestThreshold:i,deviceDefaultThreshold:d}),yield Ko(a,null!=i?i:d)),a&&(null==r?void 0:r.scroll)&&(s("core showAd - setup refreshing",{placement:e,adObj:t}),a.dataset.refresh=r.scroll.toString())}),ya=e=>e.some(({targetId:e})=>ua.some(t=>e.includes(t))),ba=e=>P(void 0,void 0,void 0,function*(){var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return;const[n,o]=(e=>e.reduce(([e,t],n)=>{var o;return(null===(o=null==n?void 0:n.finnBlink)||void 0===o?void 0:o.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),i=(e=>{const{queryConfig:{placementBatches:t,batchSize:n=h}={},pageContext:{deviceType:o}}=f.get(),i=Te(e),r=Object.keys((null==t?void 0:t[o])||{}).map(e=>i[e]||[]).filter(e=>e.length>0),a=new Set(r.flat().map(({targetId:e})=>e)),d=e.filter(({targetId:e})=>!a.has(e));return[...r,...ii(d,n)]})(o);for(const e of i)ya(e)?(s("core loadAds without lazy loading",{placementsToLoad:e}),yield ga(e)):e.length&&(s("core loadAds with lazy loading",{placementsToLoad:e}),yield wa(e));const{finnBlink:r}=f.get();if((null==r?void 0:r.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield Promise.resolve().then(function(){return ld});yield e(n)}}),wa=e=>P(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=f.get(),o=[];if(!t)return s("lazy load is not enabled",{placements:e}),void(yield ga(e));const i=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{s("lazy load is enabled - handler start",{loadedTargetIds:o,placements:e});const i=e.every(e=>o.includes(e.targetId)),r=e.map(e=>e.targetId);!i&&o.push(...r),!i&&ga(e),s("lazy load is enabled - handler stop",{loadedTargetIds:o,placements:e,arePlacementsLoaded:i,targetIds:r}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.targetId);t&&(s("lazy loading - observe element",{targetId:e.targetId,element:t}),i.observe(t))})}),ka=()=>P(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=f.getHandlers(),n=[];j(()=>{la.onEvent("adRequested",()=>{e.adRequested()}),la.onEvent("adAvailable",n=>P(void 0,void 0,void 0,function*(){var o,i,r,a,d,l;s("core adAvailable start",{placementsAvailable:ca,adObj:n,isFullscreenScrollAd:De(n),isFinnBlink:We(n.targetId),isNativeAd:Me(n),isMediation:fi(n),isTakeoverAd:Re(n),isCollapseAd:Ve(n),isWallpaperAd:ze(n)});const c=null===(r=null===(i=null===(o=null===window||void 0===window?void 0:window.apntag)||void 0===o?void 0:o.requests)||void 0===i?void 0:i.tags[n.targetId])||void 0===r?void 0:r.adResponse.ads;if(fi(n)&&c&&(null===(a=c[1])||void 0===a?void 0:a.rtb)&&(n.banner=null===(l=null===(d=c[1])||void 0===d?void 0:d.rtb)||void 0===l?void 0:l.banner),De(n)){const{modifyFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Qn});e(n)}const{widescreenSwitching:u,wallpaper:p,fullscreenScroll:v}=f.get();if(Xe(n)&&(null==u?void 0:u.enabled)){const{initWidescreenSwitching:e}=yield Promise.resolve().then(function(){return vd});e()}if(De(n)&&!We(n.targetId)){s("core adAvailable: creating fullscreen scroll container",{targetId:n.targetId,width:n.width,height:n.height,bannerWidth:n.banner&&"object"==typeof n.banner?n.banner.width:n.banner,bannerHeight:n.banner&&"object"==typeof n.banner?n.banner.height:void 0});const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Qn});e(n,v)}if(!Me(n)||fi(n)||We(n.targetId)||null==t||t(n,f.get()),Re(n)&&!Ve(n)){const{modifyTakeoverAdContent:e,createTakeoverAd:t}=yield Promise.resolve().then(function(){return Ld});e(n.targetId),yield t(n)}if(ze(n)&&(null==p?void 0:p.enabled)){const{initWallpaperAd:e}=yield Promise.resolve().then(function(){return z});e(()=>j(()=>window.apntag.showTag(n.targetId)),p),Q.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(n)&&Q.setData("horseshoe",{isAvailable:!0}),e.adAvailable(n);const g=ca.find(({targetId:e})=>e===n.targetId);g&&(yield fa(g,n),ca=ca.filter(e=>e.targetId!==g.targetId)),s("core adAvailable stop",{placementsAvailable:ca,adObj:n,isFullscreenScrollAd:De(n),isFinnBlink:We(n.targetId),isNativeAd:Me(n),isMediation:fi(n),isTakeoverAd:Re(n),isCollapseAd:Ve(n),isWallpaperAd:ze(n)})})),la.onEvent("adLoaded",o=>P(void 0,void 0,void 0,function*(){const{refreshConfig:i,appearanceConfig:r,wallpaper:a,adScaleConfig:d}=f.get(),s=document.getElementById(o.targetId);if(We(o.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield Promise.resolve().then(function(){return nd});e(o)}if(n.includes(o.targetId)&&Me(o)&&(null==t||t(o,f.get()),At({adObj:o})),!n.includes(o.targetId)&&fi(o)&&n.push(o.targetId),Ve(o)&&X(o.targetId),Re(o)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return Ld});e(la,o.targetId)}if((e=>Qe(e,Ae))(o)){const{applyNinesixteenFormat:e}=yield Promise.resolve().then(function(){return Fd});e(o)}if((e=>Qe(e,je))(o)){const{applyFullsquareFormat:e}=yield Promise.resolve().then(function(){return Fd});e(o)}if(Be(o)){const{applyFullwidthFormat:e}=yield Promise.resolve().then(function(){return Fd});e(o)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,o=document.querySelector(`#${n}`),i=null==o?void 0:o.parentElement;if(!i||!o)return;ti({adWrapper:i,placementContainer:o});const{delayTimeToNextRefresh:r=1e3}=t,a=(new Date).getTime();o&&"true"!==o.dataset.subscribedForRefresh&&(o.dataset.subscribedForRefresh="true",o.dataset.refresh&&oi(o,a,r))})(o,i),(null==r?void 0:r.clearProbableDimensionsEnabled)&&Z(o.targetId);if(Q.getData("horseshoe").isAvailable&&(null==a?void 0:a.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return z});e(o.targetId)}if(null==d?void 0:d.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield Promise.resolve().then(function(){return qt});e(o),t(o)}e.adLoaded(o),Zn(o.targetId),s&&(s.classList.add(to),(e=>{var t,n;const{pageSectionsSelectors:o}=f.get(),i=null==o?void 0:o.mainFirstColumn,r=i?null===(t=document.querySelector(i))||void 0===t?void 0:t.clientWidth:void 0;r&&e.clientWidth>r&&(null===(n=e.parentElement)||void 0===n||n.setAttribute("data-two-column-ad-layout","true"))})(s)),At({adObj:o}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const o=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;o&&((e,t)=>{const{height:n,width:o,native:i}=e;i?t.dataset.adSizes="[1,1]":n&&o&&(t.dataset.adSizes=`[${o},${n}]`)})(e,o)})(o),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:o.targetId,adFormat:Ot(o)}}))})),la.onEvent("adNoBid",t=>P(void 0,void 0,void 0,function*(){var n;if(X(t.targetId),null===(n=f.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:e}=yield Promise.resolve().then(function(){return No});yield e(f.get(),t)}if(Re(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return St});yield e(t)}e.adNoBid(t)})),la.onEvent("adError",(t,n)=>P(void 0,void 0,void 0,function*(){if(Re(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return St});yield e(n)}e.adError(t,n)})),la.onEvent("adCollapse",()=>{e.adCollapse()}),la.onEvent("adRequestFailure",t=>P(void 0,void 0,void 0,function*(){X(t.targetId),yield Lo(f.get(),t),e.adRequestFailure(t)})),la.onEvent("adBadRequest",t=>P(void 0,void 0,void 0,function*(){X(t.targetId),yield Lo(f.get(),t),e.adBadRequest(t)})),la.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),la.onEvent("adNoBidMediated",t=>P(void 0,void 0,void 0,function*(){yield Lo(f.get(),t),e.adNoBidMediated(t)}))})}),xa=(e,t)=>P(void 0,void 0,void 0,function*(){var n,o;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return[];const{clearAds:i,reloadExistingAds:r,renderFinnBlinkPlacements:a,contextSelector:d}=null!=t?t:{},s=Object.keys(null!=e?e:{}).length>0;let l=[];if(i&&(l=null!==(o=pe())&&void 0!==o?o:[]),i&&!s)return[];i&&s&&(ca=[],Q.setData("wallpaper",{isAvailable:!1}),Q.setData("horseshoe",{isAvailable:!1})),r&&(pe(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{J(e.id)})),yield ve(e),yield va();const{clientSidePlacements:c,serverSidePlacements:u}=Ir(Ie(d)),p=[...c,...u];((e,t)=>{if(0===e.length)return;const n=new Set(t.map(({targetId:e})=>T(e)));e.filter(e=>n.has(e)).forEach(e=>J(e))})(l,p),((e,t)=>{if(0===e.length)return;const n=new Set(t.map(({targetId:e})=>T(e)));e.filter(e=>!n.has(e)).forEach(e=>Z(e))})(l,p);let v=c;return a&&(v=v.filter(e=>We(e.targetId))),Tr(u,f.get()),v.length>0&&(ca=[...ca,...v.map(e=>Object.assign({},e))],di(v),li(v),yield ba(v)),ca}),Ca=(e,t)=>P(void 0,void 0,void 0,function*(){var n;f.set(e),f.setHandlers(Object.assign(Object.assign({},t),e.customHandlers));const{norstat:o,kilkaya:i,rightColumnSplit:r,drEdition:a,finnBlink:d}=e;if(Q.initialize(),window.addEventListener("message",Ho,!1),la=window.apntag||{anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}},window.apntag=la,s("Apn tag is set up on window"),yield Promise.allSettled([P(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=f.get();(yield it(e,t,n,"xandr-endpoint"))||la.setEndpoint("ib.adnxs-simple.com",!0)}),P(void 0,void 0,void 0,function*(){if(G())return;const{prebid:e,tcf:t,pageContext:{isMobileApp:n,countryCode:o}}=f.get(),i=yield it(t,n,o,"prebid");(null==e?void 0:e.enabled)&&i&&(yield Cn(null==e?void 0:e.prebidUrl))}),fn(e),P(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=f.get();yield Cn(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),P(void 0,void 0,void 0,function*(){const{developerOptions:{gptUrl:e}={},tcf:t,pageContext:{isMobileApp:n,countryCode:o}}=f.get();(yield it(t,n,o,"gpt-endpoint"))&&(yield Cn(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),P(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,brandmetricsUrl:t}={},tcf:n,pageContext:{isMobileApp:o,countryCode:i}}=f.get(),{getConsentAsync:r}=ot(n,0,i),a=yield r();if(e&&t&&a){if(yield Cn(t),document.querySelector(`.${xi}`))return window._brandmetrics=window._brandmetrics||[],void window._brandmetrics.push({cmd:"_loadsurvey"});new MutationObserver((e,t)=>{for(const n of e){if("childList"!==n.type)return;Array.from(n.addedNodes).some(e=>{var t;return null===(t=e.outerHTML)||void 0===t?void 0:t.includes(xi)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),Wt(),P(void 0,void 0,void 0,function*(){const{gdpr:{gdprUrl:e,allowHidingAds:t=!0}={}}=f.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield Cn(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null==o?void 0:o.enabled){const{loadNorstat:e}=yield Promise.resolve().then(function(){return Md});yield e()}s("Libraries have been loaded and trackers have been set"),sa(),yield ka(),yield va(),s("Page options have been set"),pa(e),s("Advertory is setup on window");const{clientSidePlacements:l,serverSidePlacements:c}=Ir(Ie());if(ca=l,Tr(c,e),di(ca),li(ca),yield ba(ca),s("Ads has been loaded",ca),_o(e,ca),wi(ca),null==d?void 0:d.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return ld});yield t(null===(n=null==e?void 0:e.pageContext)||void 0===n?void 0:n.deviceType,e.finnBlink)}if(null==a?void 0:a.enabled){const{handleDrEdition:t}=yield Promise.resolve().then(function(){return No});yield t(e)}if(null==r?void 0:r.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return Wd});t(e.rightColumnSplit)}if(null==i?void 0:i.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return gs});yield t(e)}}),Ia=(e,t)=>P(void 0,void 0,void 0,function*(){yield((e,t)=>P(void 0,void 0,void 0,function*(){var n,o;const{initConsentManager:i,getConsentAsync:r}=ot(e.tcf,null===(n=e.pageContext)||void 0===n||n.isMobileApp,null===(o=e.pageContext)||void 0===o?void 0:o.countryCode),a=yield le(e);yield Oo(),yield ki(i),yield ki(r),s("TCF resolved successfully"),yield Ca(a,t),s("Run function resolved successfully")}))(e,t)}),Ea=(e,t,n,o)=>{var i;const{image:r,icon:a,sponsoredBy:d,title:s,clickUrl:l,cta:c,body:u,desc2:p,video:v,description:g,customTitle1:h,customTitle2:m,customTitle3:f,customTitle4:y,customBody1:b,customBody2:w,customBody3:k,customBody4:x,customBody5:C,customIcon1:I,customIcon2:E,customDisplayUrl1:T}=e,S=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:S(r),imgWidth:null==r?void 0:r.width,imgHeight:null==r?void 0:r.height,imgAltText:null!=s?s:"",logo:(()=>{var e;const t=(null==p?void 0:p.includes("sponsor"))&&"dark"===(null===(e=o.appearanceConfig)||void 0===e?void 0:e.theme)&&I;return S(t?I:a)})(),sponsoredBy:null!=d?d:"",title:null!=s?s:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(i=null!=u?u:g)&&void 0!==i?i:"",desc2:null!=p?p:"",video:v,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=f?f:"",customTitle4:null!=y?y:"",customBody1:null!=b?b:"",customBody2:null!=w?w:"",customBody3:null!=k?k:"",customBody4:null!=x?x:"",customBody5:null!=C?C:"",logo2:S(E),previewVideoSrc:null!=T?T:""},t)},Ta=(e,t)=>{const n=K(W),o=new URLSearchParams(window.location.search).get(W),i=t.includes("native_recirc");return n&&o?o:(null==e?void 0:e.includes("recirc"))?i?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},Sa=(e,t,n,o)=>{const i=document.querySelector(`#${e}`);i&&t&&(i.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:o,pageType:i}=t,r=o&&Object.values(Dt).includes(o);n&&r&&hr(o,e,fr,i)})(i,n),o())},Pa=(e,t,n)=>{const o=((e,t,n)=>{var o;const{displayTemplates:i,videoTemplates:r}=n,a="default";if(!e.native)return null;const{native:d,targetId:s}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),u=null!==(o=Ta(e.targetId,l))&&void 0!==o?o:c,p=Hn[t.language||b.NO],v=Ea(d,p,s,t);return(d.video?r[u]:i[u]||i.default)(v,t)})(e,t,n);Sa(e.targetId,o,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&yr(e,t)})},Aa=e=>(t,n)=>{var o;const{targetId:i}=t,r=document.querySelector(`#${i}`);if(!r)return;const a=e.getOptions(null!=n?n:{});Pa(t,a,e.templates),null===(o=e.postProcess)||void 0===o||o.call(e,t,r)},Oa=()=>{if(!window.location.search.includes("kv_"))return{};const e={},t=(()=>{const e=new URLSearchParams(window.location.search);return Object.fromEntries(e)})();return Object.keys(t).forEach(n=>{n.startsWith("kv_")&&(e[n.slice(3)]=t[n])}),e},ja=e=>{const{siteSpecificConfig:t}=f.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))};class $a{constructor(){this.keywords={}}add(e){return Object.assign(this.keywords,e),this}addAsync(e){return P(this,void 0,void 0,function*(){return Object.assign(this.keywords,yield e),this})}addIf(e,t){return e&&Object.assign(this.keywords,t),this}addIfAsync(e,t){return P(this,void 0,void 0,function*(){return e&&Object.assign(this.keywords,yield t()),this})}build(){return this.keywords}}const La=9826;class _a{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e,isMobileApp:t}}=f.get();if(t){return{"aa-sch-supply_type":`app_${e===ge?"phone":he}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return P(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},e.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(e.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return P(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return{"aa-sch-externalid_src":Number(!!e)+Number(!!t)}})}getUserId(){return(()=>{const e=rt("_pulse2data");return e?e.split(",")[2]:void 0})()}getExternalUid(){return P(this,void 0,void 0,function*(){return yield at(f.get())})}isTrackingForbidden(){return P(this,void 0,void 0,function*(){return(null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)||"DO_NOT_TRACK"===(yield this.getExternalUid())})}getMember(){const{pageOptions:{member:e},developerOptions:{testMember:t=La}={}}=f.get();return"true"===V("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{pageContext:{publisher:e}}=f.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return P(this,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=f.get(),{getConsentAsync:o}=ot(e,0,n);return{"aa-sch-cmp_advertising":(yield o())?"1":"0"}})}getPageTypeKeywords(){const{pageContext:{pageType:e}}=f.get();return{"aa-sch-page_type":e}}getCountryCodeKeywords(e){return{"aa-sch-country_code":e}}getInventoryTypeKeywords(){return{"aa-sch-inventory_type":"editorial"}}getHasContextKeywords(e){const t=e["aa-sch-context_keyword"];return{"aa-sch-has_context_keyword":Array.isArray(t)&&t.length?1:0}}getPageOptionsFormatDevice(e="desktop"){return"mobile"===e?"phone":e}}const Na=new _a;function qa(e=!1){var t,n;const o=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),i=jt();return{OS:i,mobileOS:["ios","android"].includes(i)?i:"unknown",isHybridApp:o.includes("hermes"),appMode:e?"hybrid":"notinapp"}}Na.prepare.bind(Na);const Fa=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function Da(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Fa.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Ma extends _a{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=f.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=f.get(),{OS:n,isHybridApp:o}=qa(t);return{"no-sno-apptype":n&&e&&o?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return Da(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:o}}=f.get(),i=null!==(t=null===(e=n.keywords["no-sno-news-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan";return{"no-sno-section-page_type":`${i.split("_").pop()||i}_${"article"===o?"article":"front"}`}}}const Ba=new class extends Ma{prepare(e){return P(this,void 0,void 0,function*(){var t,n,o,i,r,a,d;const s=f.get(),l=null!==(o=null===(n=null===(t=s.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==o?o:{},c=null!==(a=null===(r=null===(i=s.pageSetup)||void 0===i?void 0:i.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},u=null===(d=s.siteSpecificConfig)||void 0===d?void 0:d.publisherClassName,p=new $a;yield p.addAsync(this.getAdvertisingConsentKeywords()),yield p.addAsync(Qt(s,l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield p.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),p.add(this.getSupplyTypeKeywords()).add(bn()).addIf(c.appType,this.getAppTypeKeywords()).addIf(c.device,this.getDeviceKeywords()).addIf(c.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(c.sectionPageType,this.getSectionPageTypeKeywords()).addIf(c.hasContext,this.getHasContextKeywords(e.keywords)).add(e.keywords).addIf(c.obituaries&&void 0!==u,void 0!==u?this.getObituariesKeywords(u):{});const v=p.build(),g=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:v,user:Object.assign(Object.assign({},yn(b.NO)),g?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Ra=Ba.prepare.bind(Ba);class Ua extends _a{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=f.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,o=document.documentElement.clientHeight;return{width:e||n||0,height:t||o||0}}(),t={width:null!==(o=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==o?o:0,height:null!==(r=null===(i=window.screen)||void 0===i?void 0:i.height)&&void 0!==r?r:0};var n,o,i,r;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return P(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{pageContext:{isMobileApp:e}}=f.get(),{appMode:t,mobileOS:n}=qa(e);return{"se-generic-appmode":t,"se-generic-mobileos":n}}getPublisherGroup(){return{"se-generic-publishergroup":"schibsted"}}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:o}}=f.get();return{"se-generic-section-page_type":`${null!==(t=null===(e=n.keywords["se-generic-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan"}_${"article"===o?"article":"front"}`}}}const za=new class extends Ua{prepare(e){return P(this,void 0,void 0,function*(){var t,n,o,i,r,a;const d=f.get(),s=null!==(o=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==o?o:{},l=null!==(a=null===(r=null===(i=d.pageSetup)||void 0===i?void 0:i.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},c=new $a;yield c.addAsync(this.getAdvertisingConsentKeywords()),yield c.addAsync(Qt(d,s.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield c.addIfAsync(l.externalIdSrc,()=>this.getExternalIdSrc()),yield c.addIfAsync(l.sdkVersion,()=>P(void 0,void 0,void 0,function*(){return{"se-generic-sdk-version":"function"==typeof window.apntag.getAstVersion?window.apntag.getAstVersion():""}})),c.add(this.getSupplyTypeKeywords()).add(bn()).addIf(l.appType,this.getAppTypeKeywords()).addIf(l.device,this.getDeviceKeywords()).addIf(l.screen,this.getScreenKeywords()).addIf(l.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(l.sectionPageType,this.getSectionPageTypeKeywords()).addIf(l.hasContext,this.getHasContextKeywords(e.keywords)).addIf(l.hasPlusMembership,{"se-generic-has_plus":"plus"===rt("X-AB-Site-Version")?"yes":"no"}).add(e.keywords);const u=c.build(),p=!1!==s.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:u,user:Object.assign(Object.assign({},yn(b.SE)),p?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Va=za.prepare.bind(za);zn('@import"https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap";.advertory-shared-ad-native-content-display-basic{width:100%;font-family:Roboto,sans-serif;color:#6d747e;text-align:left;background:#fff;position:relative;margin:0 auto;display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic *{line-height:normal}.advertory-shared-ad-native-content-display-basic .ad-info{top:0;right:8px;position:absolute}.advertory-shared-ad-native-content-display-basic .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic .ad-link{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-link:hover{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-header{padding:5px 16px;background-color:#ffcd00;font-size:12px;text-transform:uppercase;color:#495057;font-weight:600}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper{display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{position:relative;padding-bottom:40%}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{display:none}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper{position:absolute;height:100%;width:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper .ad-large-image{object-fit:cover;min-width:100%;height:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content{box-sizing:border-box;display:flex;background-color:#fffae6}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container{flex-grow:1;padding:16px}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:20px;color:#212529;font-weight:600;margin-bottom:16px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:22px}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-sponsor{font-size:11px;color:gray;font-weight:600;text-transform:uppercase}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:none;max-width:175px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:block}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover;max-width:100%}.advertory-shared-ad-native-content-display-basic.article .ad-info{top:0;right:0;position:absolute;border-bottom-left-radius:50%;background:hsla(0,0%,100%,.6)}.advertory-shared-ad-native-content-display-basic.article .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{display:block}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container{padding:8px 16px;border-left:4px solid #ffcd00}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{display:flex;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper .ad-header{padding:2px 4px;font-size:11px}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:15px;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:18px;margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:16px 8px 16px 0}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:0}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:contain}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover}}'),zn('.advertory-abo-ad-native-sponsorstripe{position:absolute;top:0;left:0;width:100%;height:1px;background:inherit;padding:0;margin:0;border:none;text-align:left}.advertory-abo-ad-native-sponsorstripe .ad-wrapper{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;max-width:980px;height:30px;padding:5px 15px;margin:auto;font-family:"Helvetica Neue",Arial,Roboto,sans-serif}.advertory-abo-ad-native-sponsorstripe .ad-logo{flex:0;height:20px;max-width:35%;max-height:inherit}.advertory-abo-ad-native-sponsorstripe .ad-title{margin-right:10px;padding-left:34px;font-size:13px;color:#fff}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper{display:grid;position:absolute;place-content:center;height:30px;min-width:30px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{display:inline-block;height:20px;width:20px;position:relative;border:solid 1px #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{content:"i";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:13px}.advertory-abo-ad-native-sponsorstripe .ad-description{font-size:13px;color:#fff;position:absolute;top:0;max-width:980px;min-height:30px;padding:15px 35px 15px 15px;margin-left:-15px;background-color:rgba(0,0,0,.9)}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper{position:absolute;top:15px;right:15px;place-content:center;height:16px;min-width:16px}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button{display:inline-block;height:16px;width:16px;position:relative;border:1px solid #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button:before{content:"✕";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:10px;font-weight:bold}.advertory-abo-ad-native-sponsorstripe .ad-description .ad-description-readmore{color:#c7ecff}.advertory-abo-ad-native-sponsorstripe .ad-description.hide{display:none}@media screen and (min-width: 768px){.advertory-abo-ad-native-sponsorstripe .ad-wrapper{height:50px}.advertory-abo-ad-native-sponsorstripe .ad-wrapper .ad-description{min-height:50px}.advertory-abo-ad-native-sponsorstripe .ad-logo{height:40px}.advertory-abo-ad-native-sponsorstripe .ad-title{font-size:20px;padding-left:40px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{height:30px;width:30px;border-width:2px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{font-size:20px}}');const Ha={displayTemplates:{default:{NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:o,img:i,adText:r})=>(Promise.resolve().then(function(){return hs}),`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${o}" class="ad-image" src="${i}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${r}</span> ${n}\n </div>\n <div class="ad-title">${o}</div>\n </div>\n </div>\n </a>\n </article>`)}.NATIVE_TEMPLATE},videoTemplates:{}},Wa={prepareTag:e=>{var t;const{keywords:n,targetId:o,invCode:i,dynamicSizeWidthCheck:r,globalPlacementId:a}=e,{pageSetup:d,pageContext:{countryCode:s}}=f.get(),{tag:{useAppTabletInvCode:l=!0}={}}=null!=d?d:{},c=((e,t)=>{const{pageContext:{isMobileApp:n}}=f.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e})(i,l),u=(e=>{const{pageContext:{countryCode:t}}=f.get(),{keywords:n,dynamicSizeWidthCheck:o}=e,i=`${w(t)}-adformat`,r=n?n[i]:[];if(!r)return{};const a=(Array.isArray(r)?r:[r]).filter(e=>!(e in Fe)||window.innerWidth>=Fe[e]);return{[i]:o?a:r}})(e),p=(e=>{const{pageContext:{countryCode:t}}=f.get(),n=`${w(t)}-targetid`;return e?{[n]:[e]}:{}})(o),v=(e=>{var t;const[,n]=null!==(t=e.match(/-((w|a)(?:ph|de|tb))-/))&&void 0!==t?t:[];switch(n){case"wde":return{"aa-sch-supply_type":"web_desktop"};case"wtb":return{"aa-sch-supply_type":"web_tablet"};case"wph":return{"aa-sch-supply_type":"web_phone"};case"aph":return{"aa-sch-supply_type":"app_phone"};default:return}})(c),g=Oa(),h=(e=>ja(e)?{"aa-sch-dynamic-outstream":["true"]}:{})(i),m=((e,t)=>ja(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{})(i,{safeFrameAutoInitialSize:!0}),y=r&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,b=(new $a).add(null!=n?n:{}).add(u).add(p).add(null!=v?v:{}).add(h).add(g).addIf(null===(t=null==d?void 0:d.tag)||void 0===t?void 0:t.reloadKeywords,{[`${w(s)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:y,invCode:c,keywords:b,rendererOptions:m,globalPlacementId:a||c})},preparePageOptions:e=>P(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t}}=f.get();return yield t===b.SE?Va(e):Ra(e)}),siteEvents:Ft,initNativeAd:(e,t)=>{var n,o,i;if(null===(o=null===(n=null==t?void 0:t.editory)||void 0===n?void 0:n.adNativeBuilder)||void 0===o?void 0:o.enabled)return void ta(e,t);const{targetId:r}=e;if(!document.querySelector(`#${r}`))return;const{pageType:a=fo.FRONT,deviceType:d}=null!==(i=null==t?void 0:t.pageContext)&&void 0!==i?i:{},{nativeTrackingConfig:s,appearanceConfig:l}=null!=t?t:{},c={language:b.NO,publisher:Dt.PENT,deviceType:d,pageType:a,nativeTrackingConfig:s,appearanceConfig:l};Pa(e,c,Ha)}},Ka=((e,t)=>({init:n=>Ia(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:xa,getVideoPPIDs:xn,createInitNativeAd:Aa,getVideoAdsConfig:sr}))(Wa,Mt),Ga=zn("[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 Xa=Object.freeze({__proto__:null,default:Ga});zn('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const Ja={Blink:"Blink"},Ya=new Map,Qa=e=>{var t;if(!Ya.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(Ja)){const o=e[t];null!=o&&(window[n]=o)}})(e)).catch(t=>{throw Ya.delete(e),t});Ya.set(e,t)}return null!==(t=Ya.get(e))&&void 0!==t?t:Promise.resolve()},Za="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",ed=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageContext:{pageType:o}}=f.get(),i=document.querySelector(`#${e}`);if(!i)return;if(i.classList.add("disable-cogwheel"),!n)return;hr(n,i,mr,null!=t?t:o);At({preferredTestIdData:{targetId:e,testId:"finn"}})},td=e=>{const{pageContext:{publisher:t=""}}=f.get(),n=document.querySelector(`#${e}`);if(!n)return;const o=`-${t}`;n.classList.remove(`advertory${o}-finn-blink`),n.classList.remove(`advertory${o}-finn-blink-wrapper`)};var nd=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=f.get(),{initNativeAd:n}=f.getHandlers();De(e)&&Jn(e,t),Me(e)&&(null==n||n(e,f.get()))},finnBlinkLoaded:ed,xandrAdLoaded:td});const od=e=>{var t,n;const o=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==o?void 0:o.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},id=(e,t)=>{const{finnBlink:{enabled:n}={}}=f.get(),o=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!o||!n)return null;const{height:i,requireImage:r,position:a,offset:d}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${od(e)}`,enabled:o,position:null!=a?a:e,height:null!=i?i:100,offset:null!=d?d:200,requireImage:r,advertoryTheme:null==t?void 0:t.advertoryTheme}},rd=(e,t,n)=>P(void 0,void 0,void 0,function*(){const{placements:o,pageContext:{deviceType:i},appearanceConfig:r}=f.get();s(`rendering finn blink ad for ${e}`);const a=T(e),d=o[i].find(e=>e.targetId===a),l=id(e,null==d?void 0:d.finnBlink);if(!(null==l?void 0:l.enabled))return s(`Finn blink is not enabled on placement: ${e}`),n&&n(e),void td(e);if((e=>{var t;const n=od(e),o=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==o?void 0:o.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void s(`Finn blink already loaded ${e}`);const{publisher:c,countryCode:u,finnBlink:p}=t,{sdkPayload:{channel:v}={}}=null!=p?p:{},g=null!=v?v:`${c}.${u}`,h="dark"===(null==r?void 0:r.theme)?"dark":"light";try{const e=yield P(void 0,void 0,void 0,function*(){const{ppid1:e}=mn.getPPIDs();return e});yield(m=Object.assign(Object.assign({},l),{channel:g,userId:e,theme:h}),P(void 0,void 0,void 0,function*(){const{userId:e,theme:t}=m,n=S(m,["userId","theme"]),o=window[Ja.Blink];if(!o)return;const i=new o({remote:"https://www.finn.no/distribution-front/external/carousel",userId:e,theme:t});yield i.inject(Object.assign({},n))})),ed(l.selector.replace("#",""),l.advertoryTheme)}catch(t){s(`Finn blink error ${t}`),n&&n(e),!n&&X(e),td(e)}var m}),ad=()=>P(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=f.get();return!!(yield it(e,t,n,"finn-blink"))||(s("Skip loading finn blink ad due to missing TCF consent."),!1)}),dd=(e,t)=>{var n;(s(`Appending ${t.id} after ${e.id}`),e.parentElement&&(n=e.parentElement,!Array.from(n.children).some(e=>e.classList.contains("advertory-finn-blink-wrapper"))))?(e.parentElement.style.display="none",e.parentElement.insertAdjacentElement("afterend",t)):s(`Cannot perform afterend on: ${e.id}`)},sd=e=>document.querySelector(`#${e}`);var ld=Object.freeze({__proto__:null,handleFinnBlinkOnlyPlacements:e=>P(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:n}}=f.get(),o=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{requestThreshold:e,targetId:n}=t,i=sd(n);i&&(yield Ko(i,null!=e?e:o))}}),loadFinnBlinkAd:(e,t,n,o)=>P(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:i}}=f.get();if(s(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield ad())||i)return n&&n(e),td(e),void(!n&&X(e));try{yield Qa(Za)}catch(e){console.error(e)}yield rd(e,t,n),o&&o()}),replaceAdsWithFinnBlink:(e,t)=>P(void 0,void 0,void 0,function*(){var n,o;if(!t)return;const{replacementConfig:i}=t,r=null===(n=null==i?void 0:i.adsToReplace)||void 0===n?void 0:n[e],a=null===(o=null==i?void 0:i.sizes)||void 0===o?void 0:o[e];jo()&&r&&a?(yield ad())&&(yield Qa(Za),r.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const o=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=f.get(),n=document.createElement("div"),o=document.createElement("div");return o.id=e,n.appendChild(o),hr(t,o,mr),s(`Creating blink container for: ${e}`),n})(t);(e=>{s(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),dd(n,o),n.dataset.finnBlinkId=t,Wo().withFullAdsChain(e)})):s(`Finn blink configuration is incorrect: ${JSON.stringify(i)}`)})});const cd=1e4,ud=e=>e.some(e=>e.some(e=>!!e&&ai(e,0)));let pd;var vd=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=f.get(),{enabled:t,options:{rotationInterval:n=cd,widescreenIdPrefix:o}={}}=null!=e?e:{};if(!t)return;const i=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=f.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(o);let r=0,a=Date.now(),d=ud(i);if(!i.length)return;pd&&window.removeEventListener("scroll",pd);const s=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},l=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block",e[0].style.opacity="1"),e[1]&&(e[1].style.display="none",e[1].style.opacity="")})})(i);const c=((e,t)=>{let n=null;return(...o)=>{null===n&&(e(...o),n=setTimeout(()=>{n=null},t))}})(()=>{d||(d=ud(i)||d,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(r),t=i.map(e=>e[r]),n=i.map(t=>t[e]);s(t,"opacity","0"),setTimeout(()=>{s(t,"display","none"),s(n,"opacity","0"),s(n,"display","block"),setTimeout(()=>{s(n,"opacity","1")},450)},450)})(),r=l(r),a=Date.now())},1e3);pd=c,window.addEventListener("scroll",c)}});const gd="#fff",hd="#0098da",md=e=>"dark"===e,fd=(e,t,n,o)=>{if(!n)return;const i={[st]:()=>{const{buttonLabel:o}=It(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=o?o:"")})},[dt]:()=>{const{themeColors:i,logotype:r,buttonLabel:a,showArrowIcon:d}=It(n,t),s=((e,t)=>{var n,o,i,r;if(!e)return;const a=md(t)?e.darkMode:void 0;return{backgroundColor:null!==(o=null!==(n=null==a?void 0:a.backgroundColor)&&void 0!==n?n:e.backgroundColor)&&void 0!==o?o:gd,color:null!==(r=null!==(i=null==a?void 0:a.color)&&void 0!==i?i:e.color)&&void 0!==r?r:hd}})(i,o),l=((e,t)=>{var n,o;if(!e)return;const i=md(t)?e.darkMode:void 0;return{url:null!==(n=null==i?void 0:i.url)&&void 0!==n?n:e.url,alt:null!==(o=null==i?void 0:i.alt)&&void 0!==o?o:e.alt}})(r,o);["#advertory-splash-close-label",".advertory-splash-close","#advertory-splash-logotype",".advertory-splash-navbar-wrapper"].forEach(t=>{const n=e.querySelector(`${t}`);if(n){if("#advertory-splash-close-label"===t&&(n.innerText=null!=a?a:""),".advertory-splash-close"===t&&!d){const e=n.querySelector("#advertory-splash-close-image");null==e||e.style.setProperty("display","none")}".advertory-splash-close"===t&&s&&(n.style.color=s.color),"#advertory-splash-logotype"===t&&l&&(n.setAttribute("src",l.url),n.setAttribute("alt",l.alt)),".advertory-splash-navbar-wrapper"===t&&s&&(n.style.setProperty("background-color",s.backgroundColor,"important"),n.style.color=s.color)}})},[lt]:()=>{const{buttonLabel:o,showArrowIcon:i,showCloseButton:r=!0}=It(n,t);["#advertory-topscroller-scroll-label","#advertory-topscroller-scroll-image",".advertory-topscroller-close"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(".advertory-topscroller-close"!==t||r||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||i||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=o?o:""))})},[ct]:()=>{}};i[t]()},yd=(e,t=!0)=>{(e===st||e===lt)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},bd=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},wd=e=>{document.body.style.overflow=e?"initial":"hidden"},kd=e=>{const t=Cd(e),n=xd(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),wd(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},xd=e=>{const t=()=>kd(e);return window.addEventListener("advertory:closeTakeover",t),bd(),t},Cd=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&kd(e)};return bd(),window.addEventListener("keydown",t),t},Id=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(Cd(e),xd(e),bd(),t.addEventListener("click",()=>{kd(e)}),wd(!1))},Ed=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),xd(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},Td=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>kd(e))})(e)},Sd=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=f.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),o=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&o&&(o.style.display="flex",o.innerText=Hn.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Pd=e=>{const t=document.querySelectorAll(".advertory-topscroller-elements");Array.from(t).forEach(e=>e.style.display="flex");const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=Hn.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},Ad=e=>{const t=document.querySelectorAll(".advertory-welcome-page-elements");Array.from(t).forEach(e=>{e.style.display="flex",e.style.animation="elementsAnimation 1.5s ease-out forwards"});const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=Hn.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},Od=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=Hn.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},jd=()=>{const e=document.querySelector(".welcome-page-wrapper, .topscroller-wrapper, .advertory-splash-wrapper");if(!e)return;let t=0;new IntersectionObserver(e=>{e.forEach(e=>{var n;if(e.isIntersecting){window.dispatchEvent(new CustomEvent("advertory:takeoverInView"));(null!==(n=Array.from(e.target.classList))&&void 0!==n?n:[]).includes("advertory-splash-wrapper")&&(()=>{const e=window.scrollY||0;document.body.dataset.scrollY=e.toString(),document.body.style.top="0",document.body.classList.add("page-locked"),document.documentElement.scrollTop=0})(),t++}else t>0&&window.dispatchEvent(new CustomEvent("advertory:takeoverNotInView"))})},{root:null,rootMargin:"0px",threshold:0}).observe(e)},$d=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${Tt})()`,e+t.outerHTML})(e)),n=$n(n),n};var Ld=Object.freeze({__proto__:null,createTakeoverAd:e=>P(void 0,void 0,void 0,function*(){const{takeover:t,appearanceConfig:n}=f.get(),{targetId:o}=e,i=document.querySelector(`#${o}`),r=document.querySelector(".advertory-takeover-wrapper");if(!i||!r||!t)return;const a=kt(e),d=r.offsetHeight,s=window.scrollY>d;r.style.display="block",!s&&yd(a,!1),((e,t)=>{({[st]:Ad,[dt]:Sd,[lt]:Pd,[ct]:Od})[t](e)})(r,a),jd(),((e,t)=>{({[st]:Ed,[lt]:Ed,[dt]:Id,[ct]:Td})[t](e)})(r,a),fd(r,a,t,null==n?void 0:n.theme),yield xt(),!s&&yd(a,!0),Et(e,a)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,o=An(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[o].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,o=An(e)?1:0,i=null==n?void 0:n.tags[e].adResponse.ads[o].rtb;i&&(i.banner.content=t)})(e,$d(t))},modifyTakeoverIframe:(e,t)=>{var n;const o="100%",i="100%";e.resizeAd(t,[o,i]);const r=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!r)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(r),t=e.width,n=e.height;t===o&&n===i||(r.style.width=o,r.style.height=i)}}).observe(r,{attributes:!0,attributeFilter:["style"]})}});const _d=(e,t)=>{t.left&&(e.style.left=t.left),t.marginLeft&&(e.style.marginLeft=t.marginLeft)},Nd=(e,t,n)=>{var o,i;const r=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:a,fullWidthFormatClassName:d}={},fullWidth:s,pageContext:{deviceType:l}}=f.get();if(!r)return null;const c=r.parentElement,u=$t(l)||n;if(r.style.width=u?"100vw":"100%",r.style.position="relative",c&&(c.style.width=u?"100vw":"100%",c.style.position="relative"),a&&d){const e=`advertory-${a}-${d}`;r.classList.add(`${e}__${t}`),null==c||c.classList.add(`${e}-wrapper__${t}`)}const p=null===(i=null===(o=null==s?void 0:s.options)||void 0===o?void 0:o.styles)||void 0===i?void 0:i[l],v=(null==s?void 0:s.enabled)&&p;return!v&&c&&u&&(c.style.left="50%",c.style.marginLeft="-50vw"),v&&p.adContainer&&_d(r,p.adContainer),v&&p.adContainerWrapper&&c&&_d(c,p.adContainerWrapper),r},qd=(e,t,n,o,i)=>{const r=Nd(e,o,i);if(!r)return void s("[Ad full width] adContainer not found");const a=r.querySelector("iframe"),d=null==a?void 0:a.parentElement;if(!a||!d)return void s("[Ad full width] iframe or iframeWrapper not found");const l=r.offsetWidth,c=l/t;s(`[Ad full width] containerWidth ${l}, ratioWidth ${t}, adObjWidth: ${e.width}, scaleFactor ${c}`),d.style.transform=`scale(${c})`,d.style.transformOrigin="left top";const u=Math.round(l/t*n);r.style.height=`${u}px`};var Fd=Object.freeze({__proto__:null,applyFullsquareFormat:e=>{qd(e,1080,1080,"fullsquare-ad",!0)},applyFullwidthFormat:e=>{const t=Nd(e,"fullwidth-ad",!1);if(!t)return;const n=t.querySelector("iframe");if(!n)return;const{deviceType:o}=f.get().pageContext;n.style.width=$t(o)?"100vw":"100%",(null==n?void 0:n.parentElement)&&(n.parentElement.style.width=$t(o)?"100vw":"100%")},applyNinesixteenFormat:e=>{qd(e,1080,1920,"ninesixteen-ad",!0)}});const Dd=e=>e===b.NO?"schibsted":"schibstedse";var Md=Object.freeze({__proto__:null,getCampaign:Dd,loadNorstat:()=>P(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},pageContext:{countryCode:t,isMobileApp:n},tcf:o}=f.get(),i=yield it(o,n,t,"norstat");if(!e||n||!i)return;const r=(e=>{const{ppid1:t,ppid2:n}=hn.getPPIDs(),{ppid1:o,ppid2:i}=mn.getPPIDs(),r=(new gn).add(n,dn[e]).add(t,sn[e]).add(i,ln[e]).add(o,cn[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{P(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const o=document.createElement("img");o.src=e,o.id=null!=t?t:"",n&&(o.style.display="none"),document.body.appendChild(o)})})(`https://sch-map.norstatsurveys.com/api/nids/${Dd(t)}/map/${r}`,"norstat")})});const Bd=".advertory-right-column-track",Rd="--advertory-right-column-track-height",Ud=e=>e.getBoundingClientRect().top+window.scrollY,zd=(e,t)=>`${e}-${t}`,Vd=(e,t,n)=>{var o;const i=Array.from(null!==(o=e.querySelectorAll(t))&&void 0!==o?o:[]),r=(e=>e.map(e=>{var t;return null===(t=document.querySelector(`[id^="${e}"]`))||void 0===t?void 0:t.parentElement}).map((e,t)=>({point:e,originalIndex:t})).filter(e=>Boolean(e.point)))(n);if(0===r.length)return;const a=Ud(e);r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const o=Ud(e),i=zd(Rd,t),r=o-n,a=zd("--advertory-right-column-split-point-height",t),d=aa(e);da({[i]:ra(r),[a]:ra(d)})})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=zd("--advertory-right-column-ad-height",t),o=aa(e);da({[n]:ra(o)})})(i[t])});((e,t)=>{const n=Ud(e)-t;da({[Rd]:ra(n)})})(r[Math.min(i.length,r.length-1)].point,a)};let Hd=!1;var Wd=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||Hd)return;const{splitPointIDs:t,adSelector:n,trackSelector:o=Bd}=e,i=document.querySelector(o);if(!i)return;Hd=!0;const r=()=>{Vd(i,n,t)};r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),window.addEventListener("load",r),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(r)});new ResizeObserver(r).observe(i)}});class Kd{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:o,pathname:i}=new URL(n);if(!o.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const r=i.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class Gd{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class Xd{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:o}=this.parseKilkayaData(e);return{id:o,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return P(this,void 0,void 0,function*(){var t,n,o,i,r,a,d,s,l;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(i=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===i||i.call(o,u):(null===(r=this.pulse)||void 0===r?void 0:r.trackViewUIElement)?null===(d=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===d||d.call(a,u):null===(l=null===(s=this.pulse)||void 0===s?void 0:s.trackElementView)||void 0===l||l.call(s,u)})}trackContentClick(e){return P(this,void 0,void 0,function*(){var t,n,o,i,r,a;if(!this.pulse)return;const d=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,d):this.pulse.trackClickUIElement?null===(i=(o=this.pulse).trackClickUIElement)||void 0===i||i.call(o,d):null===(a=(r=this.pulse).trackElementClick)||void 0===a||a.call(r,d)})}}class Jd extends Xd{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,o,i,r,a;const{clientName:d,creativeId:s,itemId:l,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),p=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(o=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===o?void 0:o.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:d,creativeId:null!=s?s:l},page:{"@id":null!=p?p:c,"@type":u,url:location.origin},tags:null===(a=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getTags)||void 0===a?void 0:a.call(r,e)}}getEventTarget(e){const{link:t,itemId:n,title:o}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const Yd=/^glci_/,Qd="gender_",Zd="geo_",es="male",ts="female";class ns extends Xd{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getPlacementData(e){var t;const n=e.closest(".kilkaya-wrapper");return{columnName:null!==(t=null==n?void 0:n.dataset.pulseColumnname)&&void 0!==t?t:"",primaryPosition:Number(null==n?void 0:n.dataset.pulsePrimaryposition)||0}}getEventBaseData(e){var t,n;const{title:o="",clientName:i="",creativeId:r="",link:a=""}=this.parseKilkayaData(e),{columnName:d,primaryPosition:s}=this.getPlacementData(e),l={publicUrl:a,urlPath:a?new URL(a).pathname:""},{publicUrl:c,urlPath:u}=a&&(null===(n=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===n?void 0:n.call(t,a))||l;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:o,placement:{columnName:d,primaryPosition:s},tags:[i,o,c,u].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:i,"spt:creativeId":r,pageTitle:o,publicUrl:c,urlPath:u},url:location.origin}}getEventTarget(e){const{link:t,itemId:n,title:o}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:t}}getEventInput(e){return{object:this.getEventBaseData(e),target:this.getEventTarget(e)}}}const os="[data-k5a-teaser-analytics]",is=(e,t,n,o)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const r=new(o===b.SE?ns:Jd)(e,t,n),a=new WeakMap,d=e=>{const t=a.get(e);t&&(t.disconnect(),a.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,o=n.querySelector(os);Boolean(null==o?void 0:o.dataset.k5aTeaserAnalytics)?(r.trackContentView(n),t.unobserve(e.target),d(n)):((e,t)=>{if(a.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(os);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(r.trackContentView(e),t.unobserve(e),d(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),a.set(e,n)})(n,t)})},{threshold:.5});i.forEach(e=>{s.observe(e),e.addEventListener("click",()=>r.trackContentClick(e))})},rs=()=>P(void 0,void 0,void 0,function*(){try{const t=yield(e=500,P(void 0,void 0,void 0,function*(){return Promise.race([So(),new Promise(t=>setTimeout(()=>t(void 0),e))])})),n=new Po(t),o=yield n.getIdentityUser(),{gender:i}=null!=o?o:{};return i===es||i===ts?`${Qd}${i}`:void 0}catch(e){return}var e}),as=()=>P(void 0,void 0,void 0,function*(){const e=[],t=yield rs(),n=(()=>{const e=tn().map(e=>`${Zd}${e.replace(Yd,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e});class ds{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===fo.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:o}=new URL(n),i=o.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class ss{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class ls{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class cs{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class us{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===fo.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class ps{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""}}class vs{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n,countryCode:o}}){if(!(null==e?void 0:e.instance))return;const i={[Dt.VG]:new Kd,[Dt.E24]:new ds,"no-aftenposten":new ss,[Dt.BT]:new ls,"no-bergenstidende":new ls,[Dt.SA]:new cs,"no-stavangeraftenblad":new cs,[Dt.SVD]:new us,[Dt.AFTONBLADET]:new ps}[n]||new Gd;is(e.instance,i,t,o)}injectKilkayaMeta(e){return P(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield as();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(s(`Kilkaya event for slot: ${n}`),!n)return void s("Kilkaya slot empty, Xandr backfill won't be loaded");const o=n.parentElement;o?(s(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(o)):s("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const o=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";J(o)}loadKilkayaScript(e){return P(this,void 0,void 0,function*(){yield Cn(e)})}run(e){return P(this,void 0,void 0,function*(){var t,n;const{tcf:o,pageContext:{isMobileApp:i,countryCode:r},kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const d=yield it(o,i,r,"kilkaya");d&&(this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(d),yield this.loadKilkayaScript(null!==(n=null===(t=a.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(e))})}}var gs=Object.freeze({__proto__:null,Kilkaya:({placementName:e,slotTag:t,fallbackTargetId:o,children:i,pulseData:r,htmlAttributes:a})=>{const d=(e,t)=>{const n={};if(!e)return n;for(const[o,i]of Object.entries(e)){n[t?`${t}-${o}`:o]=String(i)}return n},s=d(r,"data-pulse"),l=d(a,"data");return n.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},s,l,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("k5a-stream",{name:e,"slot-tag":t}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":o,style:{display:"none"},children:i})]}))},runKilkaya:e=>P(void 0,void 0,void 0,function*(){const t=new vs;yield t.run(e)})});zn('.advertory-no-ad-native-default{width:calc(100% - 32px);min-height:250px;margin:auto;color:#dfdfdf;font-family:"Inter",sans-serif;font-weight:600;text-align:left;position:relative;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed;font-size:14px}@media screen and (min-width: 768px){.advertory-no-ad-native-default{width:580px;height:400px}}.advertory-no-ad-native-default *{box-sizing:border-box;line-height:normal;text-transform:none}.advertory-no-ad-native-default .ad-info{position:absolute;top:0;left:0;height:26px;width:26px;z-index:1000;background-color:#dfdfdf;border-bottom-right-radius:13px;transform:none;transform-origin:center}.advertory-no-ad-native-default .ad-link{display:block;text-decoration:none;color:#000;background-color:rgba(0,0,0,0);border:1px solid #dfdfdf}.advertory-no-ad-native-default .ad-content{display:block}.advertory-no-ad-native-default .ad-image-container{background-color:#dfdfdf;display:flex;position:relative;line-height:0}.advertory-no-ad-native-default .ad-image-container .ad-image{position:static;width:100%;aspect-ratio:1.91;height:auto}.advertory-no-ad-native-default .ad-text-container{background:#f5faff;overflow:auto;padding:8px}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container{padding:12px 16px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:12px;margin:0;text-transform:uppercase;display:block}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:14px;margin-right:8px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor .ad-label{font-weight:600;color:#fff;background-color:#467aae;display:inline-block;padding:4px 6px;border-radius:4px;border:none;margin-right:4px}.advertory-no-ad-native-default .ad-text-container .ad-title{margin:4px 0 0 0;line-height:normal;color:#000;font-size:18px;display:flex;flex-direction:column;justify-content:center}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-title{margin:12px 0 0 0;font-size:28px}}.advertory-vg-native-ad__front .advertory-no-ad-native-default{width:100%;height:auto}.advertory-aftenposten-native-ad-wrapper__front{justify-content:center}.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(-40px + 4rem)}@media screen and (min-width: 768px){.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(12px + .75rem)}}');var hs=Object.freeze({__proto__:null});module.exports=Ka;
1
+ "use strict";var e,t,n=require("react/jsx-runtime");function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o=i(function(){if(t)return e;t=1;var n=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===i}(e)}(e)},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e,t){return!1!==t.clone&&t.isMergeableObject(e)?l((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,n){return e.concat(t).map(function(e){return o(e,n)})}function a(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}(e))}function d(e,t){try{return t in e}catch(e){return!1}}function s(e,t,n){var i={};return n.isMergeableObject(e)&&a(e).forEach(function(t){i[t]=o(e[t],n)}),a(t).forEach(function(r){(function(e,t){return d(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(d(e,r)&&n.isMergeableObject(t[r])?i[r]=function(e,t){if(!t.customMerge)return l;var n=t.customMerge(e);return"function"==typeof n?n:l}(r,n)(e[r],t[r],n):i[r]=o(t[r],n))}),i}function l(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||r,i.isMergeableObject=i.isMergeableObject||n,i.cloneUnlessOtherwiseSpecified=o;var a=Array.isArray(t);return a===Array.isArray(e)?a?i.arrayMerge(e,t,i):s(e,t,i):o(t,i)}return l.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return l(e,n,t)},{})},e=l}());const r={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},a=(e,t)=>o(e,t,r),d={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},s=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},l=(e,t)=>{console.warn("[Advertory WARN]: ",e)},c=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:i,appearanceConfig:o}=null!=e?e:{};(null==t?void 0:t.publisher)||l("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||l("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||l("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||l("pageContext.deviceType is required."),n||l("pageOptions is required."),i||l("placements is required."),(null==o?void 0:o.defaultThreshold)||l("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,i,o;const r=e.pageSectionsSelectors,a=[{flag:!!(null===(t=e.takeover)||void 0===t?void 0:t.enabled),property:"header",featureName:"takeover"},{flag:!!(null===(n=e.sponsorstripe)||void 0===n?void 0:n.enabled),property:"header",featureName:"sponsorstripe"},{flag:!!(null===(i=e.widescreenSwitching)||void 0===i?void 0:i.enabled),property:"right",featureName:"widescreenSwitching"},{flag:!!(null===(o=e.wallpaper)||void 0===o?void 0:o.enabled),property:"header",featureName:"wallpaper"}];for(const{flag:e,property:t,featureName:n}of a)e&&!(null==r?void 0:r[t])&&l(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},u=["placements","takeover","refreshConfig","editory"],p=(e,t)=>Object.assign(Object.assign({},e),t),v={editory:(e,t)=>{var n;return a(null!==(n=e)&&void 0!==n?n:{},t)},pageContext:p,pageOptions:p,tcf:p},g=(e,t)=>{const n={};for(const e of u){const i=t[e];void 0===i||e in v||(n[e]=i)}Object.assign(e,n);const i=e;for(const e of Object.keys(v))Object.hasOwn(t,e)&&void 0!==t[e]&&(i[e]=v[e](i[e],t[e]))},h=6;class m{set(e){c(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");g(this.config,e)}get(){if(!this.config)throw new Error("Config was accessed before it had been initialized.");return this.config}getHandlers(){if(!this.siteHandlers)throw new Error("Handlers were accessed before it had been initialized.");return this.siteHandlers}setHandlers(e){this.siteHandlers=a(m.DEFAULT_SITE_HANDLERS,e)}}m.DEFAULT_SITE_HANDLERS={siteEvents:d,initNativeAd:()=>{}};const f=new m,y=f.modifyConfigProperties.bind(f),w={NO:"no",SE:"se"},b=e=>e===w.NO?"no-sno":"se-generic",x=/_\d+$/,k=e=>e.replace(x,"");let C="";const I=new Map,E=e=>{const{pageSetup:{tag:t}={}}=f.get();return(null==t?void 0:t.includeCountingKeywordInTags)?(C!==window.location.pathname&&(I.clear(),C=window.location.pathname),e.map(e=>{var t;const n=k(e.invCode),i=null!==(t=I.get(n))&&void 0!==t?t:0;return e.keywords=Object.assign({},e.keywords),e.keywords[`${(()=>{const{pageContext:{countryCode:e,publisher:t}}=f.get();return`${e}-${t}`})()}-count`]=i,I.set(n,i+1),e})):e},T=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};function S(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(e);o<i.length;o++)t.indexOf(i[o])<0&&Object.prototype.propertyIsEnumerable.call(e,i[o])&&(n[i[o]]=e[i[o]])}return n}function P(e,t,n,i){return new(n||(n=Promise))(function(o,r){function a(e){try{s(i.next(e))}catch(e){r(e)}}function d(e){try{s(i.throw(e))}catch(e){r(e)}}function s(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,d)}s((i=i.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const A="0123456789abcdefghijklmnopqrstuvwxyz",O=(e=6)=>{if(e<=0)return"";let t="";for(let n=0;n<e;n++){t+=A[Math.floor(36*Math.random())]}return t},j=e=>{window.apntag.anq.push(e)},$=new Promise(e=>{"undefined"!=typeof document&&document.prerendering?document.addEventListener("prerenderingchange",()=>e()):e()}),L=new Promise(e=>{if("undefined"==typeof document||!document.hidden)return void e();const t=()=>{document.hidden||(document.removeEventListener("visibilitychange",t),e())};document.addEventListener("visibilitychange",t,{once:!0})}),_="advertory-wallpaper-background",N="advertory-with-horseshoe",q=()=>{const e=document.querySelector(`.${_}`);e&&e.remove()},F=e=>{const t=e.getBoundingClientRect().top;requestAnimationFrame(()=>(e=>{if(!document.body)return;const t=document.querySelector(`.${_}`);t&&t.style.setProperty("top",`${e}px`)})(t+15))},D=/^wallpaper:url:(http[s]?:\/\/)?[^\s(["<,>]*\.[^\s[",><]*/,M=e=>D.test(e),B=e=>e.startsWith("wallpaper:color:"),R=e=>{const t=document.querySelector(`.${_}`);t&&(t.style.backgroundImage=`url(${e})`)},U=e=>{const t=document.querySelector(`.${_}`);t&&(t.style.backgroundColor=e)};var z=Object.freeze({__proto__:null,adjustAdToHorseshoe:e=>{var t;const n=document.querySelector(`#${e}`);n&&(null===(t=n.parentElement)||void 0===t||t.classList.add(N),n.classList.add(N))},initWallpaperAd:(e,t)=>{if(!t)return;const{options:{wallpaperAnchorSelector:n}={}}=t;(()=>{q();const e=document.createElement("div");e.classList.add(_),document.body.appendChild(e),e.style.setProperty("position","fixed"),e.style.setProperty("width","100%"),e.style.setProperty("height","calc(100% - var(--advertory-header-height, 0px) - 15px)"),e.style.setProperty("background-position","center top"),e.style.setProperty("background-repeat","no-repeat")})(),(e=>{const t=e||".advertory-wrapper-common-skyscraperleft_1",n=document.querySelector(t);n&&(F(n),window.addEventListener("scroll",()=>F(n)))})(n),e()},isShortWallpaperColorMessage:B,isShortWallpaperUrlMessage:M,removeWallpaperBackground:q,setWallpaperBackgroundColor:U,setWallpaperBackgroundImage:R});const V=e=>new URLSearchParams(window.location.search).get(e),H="takeover",W="native_override_desc2",K=e=>window.location.href.includes(e),G=()=>null!==V("disable_prebid"),X=e=>{if("0"===V("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")&&q())},J=e=>{const t=document.querySelector(`div[id^="${e}"]`);if(!t)return;const n=t.parentElement;n&&(t.style.removeProperty("width"),t.style.removeProperty("height"),t.style.removeProperty("display"),n.style.removeProperty("display"))};class Y{initialize(){this.DATA=Object.assign({},Y.INITIAL_DATA)}getData(e){if(!this.DATA)throw new Error("Storage was accessed with invalid data.");return this.DATA[e]}setData(e,t){if(!this.DATA)throw new Error("Storage was accessed before it had been initialized.");this.DATA[e]=Object.assign(Object.assign({},this.DATA[e]),t)}}Y.INITIAL_DATA={wallpaper:{isAvailable:!1},horseshoe:{isAvailable:!1},initialClassNames:{},alertoryConfigKeywords:{}};const Q=new Y,Z=e=>{const t=document.querySelector(`#${e}`);t&&(t.style.minWidth="",t.style.minHeight="")},ee=e=>{var t;const n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement,i=(null==n?void 0:n.offsetHeight)||0;n&&(n.style.minHeight=`${i}px`)},te="opaque",ne=e=>P(void 0,void 0,void 0,function*(){if(e.type!==te){if(!e.ok)throw new Error(e.statusText);return yield e.json()}}),ie={get:(e,...t)=>P(void 0,[e,...t],void 0,function*(e,t={}){var{timeout:n}=t,i=S(t,["timeout"]);if(n)return((e,t,n)=>P(void 0,void 0,void 0,function*(){const i=new AbortController,o=setTimeout(()=>i.abort(),n);try{const n=yield fetch(e,Object.assign(Object.assign({},t),{signal:i.signal}));return ne(n)}finally{clearTimeout(o)}}))(e,i,n);const o=yield fetch(e,i);return ne(o)}),post:(e,t,n)=>P(void 0,void 0,void 0,function*(){const i=JSON.stringify(n),o=yield fetch(e,{method:"POST",headers:t,body:i});if(!o.ok)throw new Error(o.statusText);return yield o.json()})},oe="https://alertory-cdn.inventory.schibsted.io",re=5e3,ae="editory/native-creator/native-templates",de=e=>{const{siteSpecificConfig:t,editory:{editoryUrl:n,editableConfiguration:{pageTypeToFetch:i}={}}={}}=e;if(!(null==t?void 0:t.publisherClassName)||!i)return null;return`${n||oe}/editable-configurations/${t.publisherClassName}/${i.toLowerCase()}.json`};const se=new class{constructor(){this.requestToken=0,this.cacher=(()=>{const e=new Map;return{get:t=>e.get(t),set:(t,n)=>{e.set(t,n)},delete:t=>{e.delete(t)}}})()}shouldFetchEditableConfig(e){const{editory:{editableConfiguration:{enabled:t=!1,pageTypeToFetch:n}={}}={},siteSpecificConfig:i}=e;return Boolean(t&&n&&(null==i?void 0:i.publisherClassName))}captureLocalSiteConfig(e){return this.localSiteConfig=Object.assign({},e),this.localSiteConfig}fetchEditableConfig(e){return P(this,void 0,void 0,function*(){const t=de(e);if(!t)return null;let n=this.cacher.get(t);return n||(n=(e=>P(void 0,void 0,void 0,function*(){const t=de(e);if(!t)return null;try{return yield ie.get(t,{timeout:re})}catch(e){throw s("Failed to fetch S3 config",{error:e,url:t}),e}}))(e).catch(e=>{throw this.cacher.delete(t),e}),this.cacher.set(t,n)),n})}resolveRemoteConfig(e,t){var n,i,o;const r=((e,t)=>{const{sections:n}=e,i=S(e,["sections"]),o=t?null==n?void 0:n[t]:void 0;return o?a(i,o):i})(t,null!==(o=null===(i=null===(n=e.editory)||void 0===n?void 0:n.editableConfiguration)||void 0===i?void 0:i.section)&&void 0!==o?o:(()=>{const[e]=window.location.pathname.split("/").filter(Boolean);return e})());return((e,t)=>a(t,e))(e,r)}getConfig(e){return P(this,void 0,void 0,function*(){var t,n;const i=this.captureLocalSiteConfig(e);if(!this.shouldFetchEditableConfig(i))return i;try{const e=yield this.fetchEditableConfig(i);return e?(this.lastFetchedPageType=null===(n=null===(t=i.editory)||void 0===t?void 0:t.editableConfiguration)||void 0===n?void 0:n.pageTypeToFetch,this.resolveRemoteConfig(i,e)):i}catch(e){return s("Error fetching S3 config, using site config",{error:e}),i}})}resolveUpdatedConfig(e){return P(this,void 0,void 0,function*(){var t,n,i,o;if(!this.localSiteConfig)return;if(g(this.localSiteConfig,null!=e?e:{}),!this.shouldFetchEditableConfig(this.localSiteConfig))return;const r=null===(n=null===(t=this.localSiteConfig.editory)||void 0===t?void 0:t.editableConfiguration)||void 0===n?void 0:n.pageTypeToFetch;if(r===this.lastFetchedPageType)return;const a=++this.requestToken;try{const e=yield this.fetchEditableConfig(this.localSiteConfig);if(a!==this.requestToken||(null===(o=null===(i=this.localSiteConfig.editory)||void 0===i?void 0:i.editableConfiguration)||void 0===o?void 0:o.pageTypeToFetch)!==r)return;if(!e)return;return this.lastFetchedPageType=r,this.resolveRemoteConfig(this.localSiteConfig,e)}catch(e){return void s("Error fetching updated S3 config, keeping current config",{error:e})}})}},le=se.getConfig.bind(se),ce=se.resolveUpdatedConfig.bind(se),ue=e=>{const t=e.parentElement;if(!e||!t)return;const{container:n,wrapper:i}=(e=>{const t=Q.getData("initialClassNames")[e.id];return{wrapper:(null==t?void 0:t.wrapper)?t.wrapper.join(" "):"",container:(null==t?void 0:t.container)?t.container.join(" "):""}})(e);e.className=n,t.className=i},pe=()=>{q();const e=document.querySelectorAll('[data-advertory-ad-rendered="true"]'),t=[];return e.forEach(e=>{X(e.id),ue(e),(e=>{const t=document.querySelector(`#${e}`),n=null==t?void 0:t.getAttribute("data-probable-height"),i=null==t?void 0:t.getAttribute("data-probable-width");n&&i&&(null==t||t.style.setProperty("min-height",n+"px"),null==t||t.style.setProperty("min-probable-width",i+"px"))})(e.id),e.innerHTML="",e.id=T(e.id),t.push(e.id)}),j(()=>window.apntag.clearRequest()),t},ve=e=>P(void 0,void 0,void 0,function*(){const t=yield ce(e);var n;t?(f.set(t),n=t,window.advertory&&(window.advertory.siteConfig=n,window.advertory.alertoryConfig&&(window.advertory.alertoryConfig.advertory.placements=n.placements))):y(null!=e?e:{})}),ge="mobile",he="tablet",me="desktop",fe="web_desktop",ye="web_phone",we="wde",be="wph",xe="noGroupedPlacements",ke=e=>{const t=e.replace(/[0-9]/g,"");return"_"===t.slice(-1)?t.substring(0,t.length-1):t},Ce=e=>{if(!(null==e?void 0:e.minViewWidth))return!0;return window.innerWidth>=e.minViewWidth},Ie=e=>{var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return[];const{placements:n,queryConfig:i,pageContext:{deviceType:o}}=f.get(),r=((e,t)=>{var n;const i=null!==(n=e[t])&&void 0!==n?n:[];return t===he&&0===i.length?e[me]:i})(n,o),a=r.filter(Ce),d=e?document.querySelector(e):document;if(!d)return[];const s=a.reduce((e,t)=>{const n=ke(t.targetId);return!n||e.includes(n)||e.push(n),e},[]).flatMap(e=>{const t=new RegExp(`^${e}(_(\\d+))?$`),n=a.filter(({targetId:e})=>e.match(t)),r=(null==i?void 0:i.queryByDataDeviceAttribute)?`div[id^="${e}"][data-device=${o}], div[id^="${e}"][data-device=all]`:`div[id^="${e}"]:not([data-disabled="true"])`,s=d.querySelectorAll(r),l=Array.from(s).filter(({id:e})=>e.match(t)).map((e,t)=>{var i;const o=Ee(e,t,n),r=o.finnBlink&&!o.finnBlink.renderOnlyWithAdBlock,a=r&&(null===(i=o.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink),d=`${e.id}-${O(6)}`;return e.id=d,e.setAttribute("data-advertory-ad-rendered","true"),r&&e.setAttribute("data-is-finn-blink-placement","true"),a&&e.setAttribute("data-is-finn-blink-only-placement","true"),(e=>{var t;const n=e.id;n&&Q.setData("initialClassNames",{[n]:{wrapper:null===(t=e.parentElement)||void 0===t?void 0:t.className.split(" "),container:e.className.split(" ")}})})(e),Object.assign(Object.assign({},o),{targetId:d})});return E(l)});return(e=>{const t=Array.from(document.querySelectorAll('div[class^="advertory"]'));return e.sort((e,n)=>t.findIndex(t=>t.id===e.targetId)-t.findIndex(e=>e.id===n.targetId))})(s)},Ee=(e,t,n)=>{const i=n[t],o=n[n.length-1],r=n.filter(({targetId:t})=>t===e.id)[0];return(null==e?void 0:e.id)===(null==i?void 0:i.targetId)?i:(null==e?void 0:e.id)===(null==o?void 0:o.targetId)?o:r||o},Te=e=>{const{queryConfig:{placementBatches:t}={},pageContext:{deviceType:n}}=f.get(),i=(null==t?void 0:t[n])||{},o=Object.values(i).flat(),r=(e=>{const t={};return e.forEach(e=>{const n=T(e.targetId);e.isBackfill&&(t[n]=[e])}),t})(e),a=((e,t)=>{const n={};for(const[i,o]of Object.entries(t))n[i]=e.filter(e=>o.includes(T(e.targetId)));return n})(e,i),d=Object.keys(r),s=((e,t)=>e.filter(e=>!t.has(T(e.targetId))))(e,new Set([...d,...o]));return Object.assign(Object.assign(Object.assign({},a),r),{[xe]:s})},Se="ABSOLUTE_FULLSCREEN",Pe="ANY_FULLSCREEN",Ae="NINESIXTEEN",Oe="FULLWIDTH",je="FULLSQUARE",$e="TAKEOVER",Le="VELVET_TAKEOVER",_e="WALLPAPER",Ne="COLLAPSE",qe={ANY_FULLSCREEN:[{width:6,height:6},{width:1920,height:1080},{width:3,height:3}],ABSOLUTE_FULLSCREEN:[{width:6,height:6}],NINESIXTEEN:[{width:1080,height:1920}],FIXED_FULLSCREEN:[{width:1920,height:1080},{width:3,height:3}],FULLWIDTH:[{width:5},{width:400,height:400}],FULLSQUARE:[{width:1080,height:1080}],NATIVE_AD:[{width:1,height:1}],TAKEOVER:[{width:4,height:4}],VELVET_TAKEOVER:[{width:7,height:7}],WALLPAPER:[{width:2,height:2}],COLLAPSE:[{width:2,height:1}]},Fe={wallpaper:1600,"l-format":1600},De=e=>{const{banner:t,targetId:n}=e;return!(!t||(null==n?void 0:n.includes("takeover")))&&Qe(e,Pe)},Me=e=>{const{native:t}=e;return!!t},Be=e=>Qe(e,Oe),Re=e=>{const{targetId:t}=e;return t.includes("takeover")||Qe(e,$e)},Ue=e=>Qe(e,$e),ze=e=>Qe(e,_e),Ve=e=>Qe(e,Ne),He=e=>e.targetId.includes("sponsorstripe"),We=e=>{const t=document.querySelector(`#${e}`);return!!t&&"true"===t.dataset.isFinnBlinkPlacement},Ke=e=>e.targetId.startsWith("panorama")||e.targetId.startsWith("modul"),Ge=e=>e.targetId.startsWith("midboard"),Xe=e=>e.targetId.includes("widescreen"),Je=e=>e.width>=1260&&e.width<=1280,Ye=e=>e.width>=1600&&e.width<=1620,Qe=(e,t)=>{const n=qe[t];if(!n)return!1;return!!n.find(t=>{var n,i;const o=(null===(n=e.banner)||void 0===n?void 0:n.width)||e.width,r=(null===(i=e.banner)||void 0===i?void 0:i.height)||e.height,a=t.width===o,d=!t.height||t.height===r;return a&&d})},Ze=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 s("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let i=!1;const o=e=>{i||(s("Resolving advertising permission value obtained"),i=!0,t(e))},r=setTimeout(()=>{s("Advertising permission timed out, resolving with false"),o(!1)},3e3);window._tcf_.onTcfReady(()=>{s("On Tcf Ready called, waiting for permission"),clearTimeout(r)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(r);const t=Number(e);s("Advertising permission value obtained asynchronously: ",e),o(Boolean(t))})}),et="cmp:loaded";let tt="undefined"!=typeof window?window._tcf_:void 0,nt=!1;const it=(e,t,n)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,r=V("bypass_tcf"),a=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(s("TCF bypass param detected, returning consent: true"),!0):(s("TCF is not enabled, returning consent: true"),!0))(i,r))return!0;if(nt)return null;if(!tt)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=tt.getConsentedToAllSync();return s(`TCF consented to all is: ${t}`),tt.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(s("Getting TCF consent manager..."),window._tcf_)return s("TCF consent manager is already available"),tt=window._tcf_,void e(tt);s("TCF consent manager is not available");const n=()=>{s("CMP loaded, resolving consent manager..."),i&&clearTimeout(i),window._tcf_?(tt=window._tcf_,e(tt)):t(new Error("CMP loaded but window._tcf_ is not defined"))},i=setTimeout(()=>{document.removeEventListener(et,n),nt=!0,t(new Error("Timeout waiting for CMP to load"))},o);s("Listening for CMP loaded event..."),document.addEventListener(et,n,{once:!0})}):Promise.resolve(null),getConsentSync:a,getConsentAsync:()=>P(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return s(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===w.SE,i=(null==e?void 0:e.advertisingCMPSignalEnabled)&&n===w.NO;if(t||i)return s("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield Ze(e);if(!(null==e?void 0:e.enabled))return!0;const r=a();return null!==r?r:yield new Promise((e,t)=>{try{if(!tt)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(()=>{s("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);tt.onTcfReady(()=>{s("On Tcf Ready called, waiting for consent"),clearTimeout(i)}),tt.isConsentedToAll(t=>{clearTimeout(i),e(t)})}catch(e){t(e)}})})}},ot=(e,t,n,...i)=>P(void 0,[e,t,n,...i],void 0,function*(e,t,n,i="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return s(`Schibsted Consent to Pay is not enabled, returning true for ${i}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return s(`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}=it(e,0,n);return(yield o())?(s(`Schibsted Ad Choices consent given according to TCF consent manager for ${i}`),!0):(s(`Schibsted Ad Choices consent not given according to TCF consent manager for ${i}`),!1)}),rt=e=>{const t=encodeURIComponent(e).replace(/[-.+*]/g,"\\$&"),n=new RegExp(`(?:(?:^|.*;)\\s*${t}\\s*\\=\\s*([^;]*).*$)|^.*$`);return decodeURIComponent(document.cookie.replace(n,"$1"))||null},at=e=>P(void 0,void 0,void 0,function*(){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e,{getConsentAsync:o}=it(t,0,i);if(!(yield o()))return;const r=rt("_pulse2data");return r?r.split(",")[9]:void 0}),dt="splash",st="welcomePage",lt="topscroller",ct="velvet",ut=(e,t=(...e)=>{})=>{const n=t.toString();if(0===e.length)return n;const i=n.substring(0,n.indexOf("=>")).replace("(","").replace(")","").split(",").map(e=>e.trim()),o=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),r=i.map((t,n)=>`${t} = "${e[n]}"`);return new Function(...r,o).toString()},pt="takeover-displayed",vt="takeover-visit-count",gt=14400,ht=()=>{const e=rt(vt);return e?parseInt(e):0},mt=()=>{const e=ht(),{takeover:{options:{cookieCapTime:t=gt}={}}={}}=f.get(),n=document.location.hostname;window.document.cookie=`${vt}=${e+1}; max-age=${t}; domain=${n}; path=/; SameSite=Lax`},ft=()=>{const{takeover:{enabled:e=!1,options:{secondVisitEnabled:t=!1}={}}={}}=f.get();return"0"!==V(H)&&("1"===V(H)||!(!e||(()=>{var e,t;const n=(null===(t=null===(e=f.get().takeover)||void 0===e?void 0:e.options)||void 0===t?void 0:t.cookieCapName)||pt;return"true"===rt(n)})())&&(!t||yt()))},yt=()=>{const e=ht();return 0===e?(mt(),!1):1===e},wt=(e,t)=>[[1,1],[1920,1080]].some(([n,i])=>n===e&&i===t),bt=()=>{const{takeover:e}=f.get();return Boolean(null==e?void 0:e.topscroller)},xt=e=>{const{width:t,height:n}=e;return wt(t,n)?dt:Qe(e,Le)?ct:bt()?lt:st},kt=()=>P(void 0,void 0,void 0,function*(){const e=document.location.hostname,{takeover:{options:{cookieCapName:t=pt,cookieCapTime:n=gt}={}}={},pageContext:{isMobileApp:i,countryCode:o},tcf:r}=f.get(),a=yield ot(r,i,o,"ad-takeover-cookiecap");n&&a&&(window.document.cookie=`${t}=true; max-age=${n}; domain=${e}; path=/`)}),Ct=e=>{var t,n;const i=!!(null===(n=null===(t=f.get().takeover)||void 0===t?void 0:t.options)||void 0===n?void 0:n.setCookieCapForNotShownAd);return Re(e)&&i},It=(e,t)=>{var n;if(t===lt){const{topscroller:t}=e;return null!=t?t:{}}if(t===dt){const{splash:t}=e;return null!=t?t:{}}return null!==(n=e.welcomePage)&&void 0!==n?n:{}},Et=(e,t)=>{t!==dt?(e=>{var t,n;const i=null===(t=f.get().pageSectionsSelectors)||void 0===t?void 0:t.header,o=null===(n=f.get().takeover)||void 0===n?void 0:n.topscroller;if(!i||o)return;const r=document.querySelector(i),a=document.querySelector(".welcome-page-wrapper"),d=document.querySelector(`#${e.targetId}`),s=document.querySelector(".advertory-welcome-page-scroll");if(!(r&&a&&s&&d))return;const l=null==r?void 0:r.offsetHeight,c=Ue(e)?"60svh":`calc(100svh - ${l}px)`,u=Ue(e)?"calc(40svh + 30px)":`calc(${l}px + 30px)`;a.style.setProperty("height",c,"important"),d.style.setProperty("height",c,"important"),s.style.setProperty("bottom",u,"important")})(e):(e=>{var t;if(!(null===(t=f.get().takeover)||void 0===t?void 0:t.splash))return;const n=document.querySelector(".advertory-splash-navbar-wrapper"),i=document.querySelector(`#${e.targetId}`);if(!n||!i)return;const o=`calc(100svh - ${n.offsetHeight}px)`;i.style.setProperty("height",o,"important")})(e)},Tt=ut([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n .adform-adbox {\n height: 100% !important;\n width: 100% !important;\n }\n img {\n height: 100% !important;\n width: 100% !important;\n object-fit: cover !important;\n object-position: top !important;\n }\n ",e.contentDocument.head.appendChild(t)})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})});var St=Object.freeze({__proto__:null,addTakeoverCookie:kt,adjustTakeoverHeight:Et,canDisplayTakeover:ft,getProperWelcomePageConfig:It,getTakeoverVariant:xt,handleTakeoverCookieOnAdNotShown:e=>P(void 0,void 0,void 0,function*(){Ct(e)&&(yield kt())}),incrementArticleVisitCount:mt,isSplashVariant:wt,isTopscroller:bt,scaleAd:Tt,shouldAddTakeoverCookieForNotShownAd:Ct});const Pt={nativeAd:e=>Me(e)&&!He(e),buyrecipe:e=>e.targetId.startsWith("buyrecipe"),fullwidthAd:Be,fullscreenScroll:De,topscroller:e=>Re(e)&&bt(),splash:e=>Re(e)&&wt(e.width,e.height),welcomePage:Re,wallpaper:ze,skyscraper:e=>e.targetId.includes("skyscraper")&&!!e.banner,lFormat:Je,hFormat:Ye,toppanorama:e=>e.targetId.startsWith("toppanorama")&&!Ye(e)&&!Je(e),topboard:e=>e.targetId.startsWith("topboard")&&!Re(e),widescreen:Xe,insider:e=>e.targetId.startsWith("insider"),sponsorstripe:He,brandboard:e=>(e=>(980===e.width||1920===e.width&&e.targetId.includes("brandboard"))&&!e.targetId.includes("topboard")&&!e.targetId.includes("companion")&&!Ke(e))(e)&&!(e=>e.targetId.includes("backfill"))(e)&&!Ge(e),outstream:e=>"https://acdn.adnxs.com/video/outstream/ANOutstreamVideo.js"===e.renderer_url,netboard:e=>(e=>e.targetId.startsWith("netboard"))(e)||(e=>e.targetId.startsWith("board"))(e),panorama:Ke,midboard:Ge},At=({adObj:e,preferredTestIdData:t})=>{var n,i;const o=null!==(n=null==t?void 0:t.targetId)&&void 0!==n?n:null==e?void 0:e.targetId;if(!o)return;const r=null===(i=document.querySelector(`#${o}`))||void 0===i?void 0:i.parentElement;if(!r)return;if(((e,t)=>{var n,i,o,r;const a=null===(r=null===(o=null===(i=null===(n=window.apntag)||void 0===n?void 0:n.requests)||void 0===i?void 0:i.tags)||void 0===o?void 0:o[e])||void 0===r?void 0:r.invCode;a&&(t.dataset.invCode=a)})(o,r),null==t?void 0:t.testId)return void(r.dataset.testid=t.testId);const a="DIV"===(null==r?void 0:r.tagName);e&&a&&((e,t)=>{var n,i;for(const[o,r]of Object.entries(Pt))if(r(e)){if("nativeAd"===o){const r="default";t.dataset.testid=`${o}-${null!==(i=null===(n=null==e?void 0:e.native)||void 0===n?void 0:n.desc2)&&void 0!==i?i:r}`;break}t.dataset.testid=o;break}})(e,r)},Ot=e=>{var t;return(null===(t=Object.entries(Pt).find(([,t])=>t(e)))||void 0===t?void 0:t[0])||""},jt=()=>{const e=window.navigator.userAgent.toLowerCase(),t=[["win","windows"],["macintosh","macos"],["x11","linux"],["android","android"],["ipad","ios"],["iphone","ios"]].find(([t])=>e.includes(t));return t?t[1]:"unknown"},$t=e=>e===ge,Lt=(e,t)=>{const n=e.width,i=(null!=t?t:window.screen.width)/n;return i<1?i:1},_t=(e,t=window.screen.width,n,i)=>{const o=Lt(e,t);if(n&&n(e,o),i)return void i(e);const r=document.querySelector(`iframe[id^="utif_${e.targetId}"]`);r&&(r.style.transform=`scale(${o})`,r.style.transformOrigin="left top")},Nt=new Map;Nt.set("insider",{scale:.82,transformOrigin:"left center",cogwheelAdjust:!0}),Nt.set("panorama",{scale:.79,transformOrigin:"center center"}),Nt.set("outstream",{scale:.79,transformOrigin:"center center"}),Nt.set("integration",{scale:.79,transformOrigin:"center center"}),Nt.set("toppanorama",{scale:.8,transformOrigin:"left center"});var qt=Object.freeze({__proto__:null,calculateScaleFactor:Lt,getAspectRatio:(e,t)=>{if(e&&t)return t/e},scaleAd:_t,scaleAdIpadAirPortrait:e=>{if(!((null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.clientWidth)>767&&(null===(n=null===document||void 0===document?void 0:document.body)||void 0===n?void 0:n.clientWidth)<=853))return;var t,n;const i=Ot(e),o=Nt.get(i),r=document.querySelector(`#${e.targetId}`);if(!r||!o)return;if(r.style.transformOrigin=o.transformOrigin,r.style.transform=`scale(${o.scale})`,!(null==o?void 0:o.cogwheelAdjust))return;const a=document.querySelector(`div[class*="gdpr-cogwheel-button"][id$="${e.targetId}"]`),d=null==r?void 0:r.offsetWidth;a&&"number"==typeof d&&!isNaN(d)&&a.style.setProperty("right",String(-1*d*.2)+"px")},scaleAds:e=>{var t,n,i,o,r,a;const{adScaleConfig:d,pageContext:{deviceType:s}}=f.get();if(!(null==d?void 0:d.enabled))return;if(Qe(e,Pe))return;const l=null!==(t=d.adsToBeScaled[s])&&void 0!==t?t:[],c=ke(e.targetId.split("-")[0]);if(!l.includes(c))return;const u=null!==(i=null===(n=d.offset)||void 0===n?void 0:n[c])&&void 0!==i?i:0,p=document.getElementById(e.targetId),v=null!==(o=null==p?void 0:p.offsetWidth)&&void 0!==o?o:window.screen.width,g=null!==(a=null===(r=null==p?void 0:p.parentElement)||void 0===r?void 0:r.offsetWidth)&&void 0!==a?a:window.screen.width;_t(e,(v<g?v:g)-u)}});const Ft={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{const t=window.screen.width||window.innerWidth;980===e.width&&t<980&&((e,t)=>{_t(e,t);const n=document.querySelector(`#${e.targetId}`);n&&(n.style.minWidth="100vw")})(e,t)},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},Dt={SVD:"svd",VG:"vg",AFTENPOSTEN:"aftenposten",SA:"sa",BT:"bt",AFTONBLADET:"aftonbladet",E24:"e24",MINMOTE:"minmote",PENT:"pent",GODT:"godt",TEK:"tekno",KLART:"klart",TVNU:"tvnu",POLARIS:"polaris",KOKET:"koket",TV4:"tv4",FOTBOLLSKANALEN:"fotbollskanalen",OMNI:"omni"},Mt={publisherClassName:Dt.PENT,fullWidthFormatClassName:"netboard"},Bt=864e5,Rt=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return s("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,i=Bt)=>{const o={data:n,expirationTime:(new Date).getTime()+i};t(e,JSON.stringify(o))},getByTimestamp:(t,n=Bt)=>{const i=e(t);if(!i)return null;if(!n)return i;try{const{expirationTime:e,data:t}=JSON.parse(i);return(new Date).getTime()<=e?t:null}catch(e){return s("Error with parsing localStorage data"),null}}}})(),Ut="glimrTags",zt=["glwe_","glwet_"],Vt={geofenceTags:[],geoTags:[],weatherTags:[]},Ht=(...e)=>P(void 0,[...e],void 0,function*(e=f.get()){const{tcf:t,pageContext:{isMobileApp:n,countryCode:i}={}}=e;if(null==t?void 0:t.schibstedConsentToPayEnabled){return yield ot(t,n,i,"glimr")}const{getConsentAsync:o}=it(t,0,i);return yield o()}),Wt=()=>P(void 0,void 0,void 0,function*(){const{glimr:e}=f.get();if(!(yield Ht())||!(null==e?void 0:e.enabled))return void s("No consent for glimr data fetching.");const t=yield(n=500,P(void 0,void 0,void 0,function*(){return yield Promise.race([P(void 0,void 0,void 0,function*(){const e=yield import("glimr-sdk");return e.default||e}),new Promise(e=>setTimeout(()=>e(!1),n))])}));var n;if(t)try{t.setTagCacheTimeInSeconds(300),yield new Promise(n=>{t.getTags(e.clientId,(e,t)=>{Rt.setWithTimestamp(Ut,{tags:e,tagMappings:t}),n(!0)})})}catch(e){s(`Error during getting glimr data: ${e}`)}else s("Timeout (500ms) while loading glimr package. Skipping glimr data fetching.",{glimr:t})}),Kt={svd:"svd",vg:"vg",aftenposten:"no-aftenposten",sa:"no-stavangeraftenblad",bt:"no-bergenstidende",aftonbladet:"aftonbladet",e24:"e24",minmote:"minmote",pent:"pent",godt:"godt",tek:"no-tek"},Gt=e=>zt.some(t=>e.startsWith(t)),Xt=e=>e.startsWith("glgc_"),Jt=e=>e.startsWith("glci_"),Yt=e=>!Gt(e)&&!Xt(e),Qt=(e,t)=>P(void 0,void 0,void 0,function*(){const{addPublisherToGeo:n}=t||{},{glimr:i,pageContext:{countryCode:o}={}}=e,r=yield Ht(e);if(!(null==i?void 0:i.enabled)||!r)return s("No consent for getting glimr tags."),{};const a=b(o),d=Zt(e,Boolean(n));return{[`${a}-geo`]:d.geoTags,[`${a}-weather`]:d.weatherTags,[`${a}-geofence`]:d.geofenceTags}}),Zt=(e,t)=>{const n=en();if(!n)return Vt;const i=((e=[])=>e.filter(Gt))(n),o=((e=[])=>e.filter(Xt))(n),r=((e=[],t,n)=>{var i;const o=e.filter(Yt);if(n&&t){const{publisher:e}=null!==(i=t.pageContext)&&void 0!==i?i:{},n=Kt[e]||e;o.push(n)}return o})(n,e,t);return{geoTags:r,geofenceTags:o,weatherTags:i}},en=()=>{const e=Rt.getByTimestamp(Ut);return e&&"string"!=typeof e?null==e?void 0:e.tags:null},tn=()=>{var e;return((e=[])=>e.filter(Jt))(null!==(e=en())&&void 0!==e?e:[])},nn=()=>(window.apntag||(window.apntag={anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}}),window.apntag),on=()=>(window.relevantDigital||(window.relevantDigital={cmd:[]}),window.relevantDigital),rn=(e={},t)=>{const{prebid:{externalUidInAuctionEnabled:n,forwardGlimrTags:i=!1}={},pageContext:{countryCode:o}}=f.get(),r=[`${b(o)}-geo`],a=["aa-sch-context_keyword","aa-sch-publisher","se-aftonbladet-section","se-svd-section","se-generic-section","no-sno-news-section","no-sno-news-subsection","aa-sch-cmp_advertising",...i?r:[]],d=Object.fromEntries(Object.entries(e).filter(([e])=>a.includes(e))),s=t&&n?{id:t}:{};return{ortb2:Object.assign({site:{ext:{data:d}}},s)}},an="advertory:ppids-cache",dn={[w.SE]:`SCH${w.SE.toUpperCase()}-EnvHash`,[w.NO]:`SCH${w.NO.toUpperCase()}-EnvHash`},sn={[w.SE]:`SCH${w.SE.toUpperCase()}-UserHash`,[w.NO]:`SCH${w.NO.toUpperCase()}-UserHash`},ln={[w.SE]:`sch${w.SE}-envhash-v3`,[w.NO]:`sch${w.NO}-envhash-v3`},cn={[w.SE]:`sch${w.SE}-userhash-v3`,[w.NO]:`sch${w.NO}-userhash-v3`},un={[w.SE]:`'sch${w.SE}-iosid-v3'`,[w.NO]:`'sch${w.NO}-iosid-v3'`},pn={[w.SE]:`sch${w.SE}-androidid-v3`,[w.NO]:`sch${w.NO}-androidid-v3`},vn={[w.SE]:"sdrn:schibsted.com:user",[w.NO]:"sdrn:spid.no:user"};class gn{constructor(){this.eids=[]}add(e,t){return e&&this.eids.push({id:e,source:t}),this}buildRyEids(){return this.eids.map(({id:e,source:t})=>({source:t,uids:[{id:e,atype:1,ext:{stype:"ppuid"}}]}))}buildEids(){return[...this.eids]}buildVideoEids(){return this.eids.map(({id:e,source:t})=>`${t},${e}`).join("|")}buildNorstatPath(){const e=this.eids[0];return e?`${e.source}-${e.id}`:""}buildNorstatQuery(e){const t=new URLSearchParams;return this.eids.slice(1).forEach(({id:n,source:i})=>{t.append(e,`${i}-${n}`)}),t}}const hn=new class{constructor(){this.ppid1=null,this.ppid2=null}processPPIDs(e){return P(this,arguments,void 0,function*(e,t=1e4){var n,i;const o=yield Promise.race([new Promise(e=>{setTimeout(()=>e({xandr:{ppId1:"",ppId2:""}}),t)}),e.instance.getAdvertisingIdentifiers()]);this.setPPIDs(null===(n=o.xandr)||void 0===n?void 0:n.ppId1,null===(i=o.xandr)||void 0===i?void 0:i.ppId2)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||s("PPIDv2s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:""}}setPPIDs(e,t){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:""}},mn=new class{constructor(){this.ppid1=null,this.ppid2=null,this.idfv=null,this.anId=null}processPPIDs(e,t){return P(this,void 0,void 0,function*(){var n,i,o,r,a,d,s,l,c,u,p;const v=Rt.get(an),g=yield this.getNewPPIDs(e,t);if(this.shouldHash(v,g)){const t=null!==(n=e.hasherUrl)&&void 0!==n?n:"https://hasher.schibsted.com/api/v1/hash",l=this.createHasherPayload(g),c=yield this.hashPPIDs(l,t);return c?(this.cachePPIDs(l,c,null===(i=g.idfv)||void 0===i?void 0:i.plain,null===(o=g.anId)||void 0===o?void 0:o.plain),void this.setPPIDs(null!==(r=c.userId)&&void 0!==r?r:"",null!==(a=c.environmentId)&&void 0!==a?a:"",null===(d=g.idfv)||void 0===d?void 0:d.plain,null===(s=g.anId)||void 0===s?void 0:s.plain)):void this.setPPIDs("","")}this.setPPIDs(null!==(l=null==v?void 0:v.userId.hashed)&&void 0!==l?l:"",null!==(c=null==v?void 0:v.environmentId.hashed)&&void 0!==c?c:"",null===(u=null==g?void 0:g.idfv)||void 0===u?void 0:u.plain,null===(p=null==g?void 0:g.anId)||void 0===p?void 0:p.plain)})}getPPIDs(){var e,t;return null!==this.ppid1&&null!==this.ppid2||s("PPIDv3s accessed before they have been initialized"),{ppid1:null!==(e=this.ppid1)&&void 0!==e?e:"",ppid2:null!==(t=this.ppid2)&&void 0!==t?t:"",idfv:this.idfv,anId:this.anId}}setPPIDs(e,t,n,i){this.ppid1=null!=e?e:"",this.ppid2=null!=t?t:"",this.idfv=null!=n?n:null,this.anId=null!=i?i:null}shouldHash(e,t){var n,i;if(!e)return!0;for(const o in e){if((null===(n=e[o])||void 0===n?void 0:n.plain)!==(null===(i=t[o])||void 0===i?void 0:i.plain))return!0}return!1}cachePPIDs(e,t,n,i){const o=Object.assign(Object.assign({clientId:{plain:e.clientId},userId:{plain:e.userId,hashed:t.userId},environmentId:{plain:e.environmentId,hashed:t.environmentId},trackerType:{plain:e.trackerType},trackerVersion:{plain:e.trackerVersion}},n?{idfv:{plain:n}}:{}),i?{anId:{plain:i}}:{});Rt.set(an,o)}hashPPIDs(e,t){return P(this,void 0,void 0,function*(){try{const n=new Headers({"Content-Type":"application/json"});return yield ie.post(t,n,e)}catch(e){return s("Error with hashing PPIDs",e),null}})}getNewPPIDs(e,t){return P(this,arguments,void 0,function*({clientId:e,instance:t},n){const i=yield((e,t)=>P(void 0,void 0,void 0,function*(){const n=yield e.getUserId();return n?`${vn[t]}:${n}`:null}))(t,n),o=yield(r=t,P(void 0,void 0,void 0,function*(){const e=yield r.getEnvironmentId();return e?`sdrn:schibsted:environment:${e}`:null}));var r;const a=window.advertory_idfv,d=window.advertory_anId;return Object.assign(Object.assign({clientId:{plain:e},userId:{plain:i},environmentId:{plain:o},trackerType:{plain:"Advertory"},trackerVersion:{plain:"1.0.0"}},a?{idfv:{plain:a}}:{}),d?{anId:{plain:d}}:{})})}createHasherPayload({clientId:e,trackerType:t,trackerVersion:n,userId:i,environmentId:o}){return{clientId:e.plain,trackerType:t.plain,trackerVersion:n.plain,userId:i.plain,environmentId:o.plain}}},fn=e=>P(void 0,void 0,void 0,function*(){const{pulse:t,tcf:n,pageContext:{countryCode:i,isMobileApp:o}}=e;if(!(yield ot(n,o,i,"setXandrPPIDs")))return;if(!t)return;(yield Promise.allSettled([hn.processPPIDs(t,null==n?void 0:n.timeout),mn.processPPIDs(t,i)])).forEach((e,t)=>{if("rejected"===e.status){s(`Cannot fetch PPIDs v${t+2}`,e.reason)}})}),yn=e=>{const{ppid1:t,ppid2:n}=hn.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=mn.getPPIDs();return{userIds:[{type:"extendedIDs",eids:(new gn).add(n,dn[e]).add(t,sn[e]).add(o,ln[e]).add(i,cn[e]).add(r,un[e]).add(a,pn[e]).buildEids()}]}},wn=()=>{const{ppid1:e,ppid2:t}=hn.getPPIDs();return{"aa-sch-schuserhash":e?"1":"0","aa-sch-schenvhash":t?"1":"0"}},bn=e=>{const{ppid1:t,ppid2:n}=hn.getPPIDs(),{ppid1:i,ppid2:o,idfv:r,anId:a}=mn.getPPIDs();if(!n)return{};return{userSync:{userIds:[{name:"pubProvidedId",params:{eids:(new gn).add(n,dn[e]).add(t,sn[e]).add(o,ln[e]).add(i,cn[e]).add(r,un[e]).add(a,pn[e]).buildRyEids()}}]}}},xn=e=>{const{ppid1:t,ppid2:n}=hn.getPPIDs(),{ppid1:i,ppid2:o}=mn.getPPIDs();return(new gn).add(n,dn[e]).add(t,sn[e]).add(o,ln[e]).add(i,cn[e]).buildRyEids()},kn=e=>P(void 0,void 0,void 0,function*(){const{ppid1:t,ppid2:n}=hn.getPPIDs(),{ppid1:i,ppid2:o}=mn.getPPIDs(),r=(new gn).add(n,dn[e]).add(t,sn[e]).add(o,ln[e]).add(i,cn[e]);return yield new Promise(e=>{e(r.buildVideoEids())})}),Cn=(e,...t)=>P(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,i)=>{const o=document.createElement("script");o.async=!0,o.src=e;const r=()=>{d(),n()},a=()=>{d(),i(new Error(`Failed to load ${e}`))},d=()=>{o.removeEventListener("load",r),o.removeEventListener("error",a),clearTimeout(s)};o.addEventListener("load",r),o.addEventListener("error",a);const s=setTimeout(()=>{d(),i(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(o)}).catch(e=>{console.error(e)}))}),In="advertory-fullscreen-scroll",En="advertory-fullscreen-scroll-wrapper",Tn="fullscreen-scroll-in-screen",Sn="in-screen",Pn=e=>e.includes("snoap.no"),An=e=>{var t,n,i,o,r;return!!(null===(r=null===(o=null===(i=null===(n=null===(t=window.apntag)||void 0===t?void 0:t.requests)||void 0===n?void 0:n.tags[e])||void 0===i?void 0:i.adResponse)||void 0===o?void 0:o.ads[1])||void 0===r?void 0:r.rtb)},On=ut([],()=>{const e=({width:e,height:t})=>{var n;const i=null===(n=document.querySelector("#sf_align"))||void 0===n?void 0:n.querySelector("div");if(!i)return;const{clientWidth:o,clientHeight:r}=i,a=e/o,d=t/r;i.style.transform=`scale(${a},${d})`,i.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:n}=window;e({width:t,height:n})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const n={width:innerWidth,height:innerHeight};e(n)});const n=window.frameElement;(null==n?void 0:n.contentWindow)?n.contentWindow.document.body.onload=t:document.body.onload=t}),jn=e=>{const t=ut([],()=>{new MutationObserver((e,t)=>{document.querySelector("iframe")&&((()=>{const e=document.querySelector("iframe");e&&(e.onload=()=>{if(!e.contentDocument)return;document.body.style.height="100%",document.documentElement.style.height="100%",e.height="100%",e.width="100%";const t=e.contentDocument.createElement("style");t.textContent="\n adfm-ad {\n height: 100% !important;\n width: 100% !important;\n }\n ",e.contentDocument.head.appendChild(t);const n=e.contentDocument.querySelector("iframe");if(!(null==n?void 0:n.contentDocument))return;const i=n.contentDocument.createElement("style");i.textContent="\n #image {\n background-size: cover !important;\n }\n ",new MutationObserver((e,t)=>{n.contentDocument&&(n.contentDocument.head.appendChild(i),t.disconnect())}).observe(e.contentDocument,{childList:!0,subtree:!0})})})(),t.disconnect())}).observe(document.body,{childList:!0,subtree:!0})}),n=document.createElement("script");n.textContent=`(${t})()`;return e+n.outerHTML},$n=e=>{if((e=>e.includes("google"))(e))return e;const t=document.createElement("div");t.innerHTML=e;const n=t.querySelector("img");if(!n)return e;n.style.width="100%",n.style.height="100%",n.style.objectFit="cover",n.style.position="fixed";return t.innerHTML},Ln=[],_n={},Nn=(e,t)=>{var n;const i=(null===(n=null==t?void 0:t.options)||void 0===n?void 0:n.fadingHeaderEnabled)||!1,o=new IntersectionObserver(e=>qn(e,i),{}),r=Dn(e);o.observe(e),i&&(_n[r]=Rn(e,null==t?void 0:t.options))},qn=(e,t)=>{e.forEach(({target:e,isIntersecting:n})=>{const i=Dn(e);n?(Fn(i,n),Mn(e,i,t)):(Fn(i,n),Bn(e,i,t))})},Fn=(e,t)=>{var n,i;const o=null===(n=document.getElementById(e))||void 0===n?void 0:n.querySelector("iframe");if(!o)return;const r=t?"showFullscreen":"hideFullscreen";null===(i=o.contentWindow)||void 0===i||i.postMessage(`advertory:${r}-${e}`,"*")},Dn=e=>{var t;return null===(t=e.children[0])||void 0===t?void 0:t.id},Mn=(e,t,n)=>{e.classList.add(Sn),document.body.classList.add(Tn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollInView")),Ln.includes(t)||Ln.push(t),n&&window.addEventListener("scroll",_n[t],{passive:!0})},Bn=(e,t,n)=>{Ln.includes(t)&&(n&&window.removeEventListener("scroll",_n[t]),document.body.classList.remove(Tn),e.classList.remove(Sn),window.dispatchEvent(new CustomEvent("advertory:fullscreenScrollNotInView")))},Rn=(e,t={fadingHeaderEnabled:!1,headerSelectors:[".js-masthead"],skyscraperSelectors:[".skyscraper_r"],headerZIndex:3})=>{const{headerSelectors:n=[".js-masthead"],skyscraperSelectors:i=[".skyscraper_r"],headerZIndex:o=3}=t,r=[],a=[];return n.forEach(e=>{var t;const n=null!==(t=document.querySelector(e))&&void 0!==t?t:document.querySelector("header");n&&r.push(n)}),i.forEach(e=>{const t=document.querySelector(e);t&&a.push(t)}),()=>{r.length&&Un(e,r,o,0),a.length&&Un(e,a,o,40)}},Un=(e,t,n,i)=>{const o=e.offsetHeight,r=window.scrollY,a=e.getBoundingClientRect().top+r;t.forEach(e=>{const t=e.offsetHeight;let d;d=a>r?(a-r)/t-i:(r+t-(a+o))/t;const s=d<=0;e.style.visibility=s?"hidden":"",e.style.zIndex=s?"":n.toString(),e.style.pointerEvents=s?"none":"all",e.style.opacity=d.toString()})};function zn(e){if(!e||"undefined"==typeof window)return;const t=document.createElement("style");return t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t),e}zn('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100vw !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);flex-shrink:0}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll:not([data-ad-label-custom])::before{text-transform:lowercase}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top:var(--advertory-political-box-offset, 0px)}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px) + var(--advertory-political-box-offset, 0px)) !important}.advertory-fullscreen-scroll::before{left:calc(50vw - 628px);width:calc(100% - 36px);max-width:1250px;text-align:left;background-color:hsla(0,0%,100%,.6);color:#212121;font-family:Ester Blenda,Arial,sans-serif;font-size:11px;font-weight:400;font-style:normal;line-height:1;margin:16px 2px;padding:10px;z-index:1;visibility:inherit !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll::before{left:16px}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:calc(50vw - 623px);right:unset}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:22px;right:unset}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]::before{padding-left:32px}.advertory-fullscreen-scroll>div[id*=utif]{display:block;width:var(--advertory-fullscreen-scroll-vw, 100vw) !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[id*=utif]{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important}.advertory-fullscreen-scroll>div[id*=utif]{overflow:hidden}.advertory-fullscreen-scroll>div[id*=utif]>iframe{display:block;height:inherit !important;width:inherit !important}.advertory-fullscreen-scroll>div[role=button]{z-index:2;opacity:1;background:rgba(0,0,0,0) !important;left:unset;position:fixed !important;right:calc(50vw - 623px);top:calc(19px + var(--advertory-political-box-offset, 0px)) !important;width:26px !important;height:26px !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[role=button]{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix) + 19px + var(--advertory-political-box-offset, 0px)) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');const Vn="left",Hn={no:{adText:"ANNONSE",adFrom:"ANNONSE FRA",adContent:"ANNONSØRINNHOLD",adContentFrom:"ANNONSØRINNHOLD FRA"},se:{adText:"ANNONS",adFrom:"ANNONS FRÅN",adContent:"EXTERN LÄNK",adContentFrom:"EXTERN LÄNK FRÅN"}};let Wn=null;const Kn=(e,t)=>{let n=e;return n=(e=>{const t=document.createElement("script");return t.textContent="\n window.addEventListener('message', function(event) {\n if (event.data === 'advertory:showFullscreen-'+document.body.id) {\n document.body.style.display = \"block\";\n } else if (event.data === 'advertory:hideFullscreen-'+document.body.id) {\n document.body.style.display = \"none\";\n }\n });\n ",e+t.outerHTML})(e),n=(e=>{const t=document.createElement("script");return t.textContent=`(${On})()`,e+t.outerHTML})(n),n=$n(n),n=(e=>{if(Pn(e))return e;const t=document.createElement("style");return t.textContent="\n .GoogleActiveViewClass, .GoogleActiveViewElement {\n transform: translate(calc(-50% + 50vw), 0);\n width: 100vw !important;\n height: 100vh !important;\n }\n .GoogleActiveViewClass img, .GoogleActiveViewElement img {\n width: 100vw;\n height: 100vh;\n object-fit: cover;\n }\n .GoogleActiveViewClass iframe {\n width: 100vw !important;\n height: 100vh !important;\n }\n ",e+t.outerHTML})(n),(e=>e.includes("adform"))(n)&&(n=(e=>{const t=document.createElement("script");t.textContent='\n var frame = window.frameElement;\n if (frame) {\n frame.style.removeProperty("width");\n frame.style.removeProperty("height");\n frame.contentWindow.document.body.onload = onLoad;\n } else {\n document.body.onload = onLoad;\n }\n \n function onLoad() {\n var iframe = document.querySelector("adfm-ad iframe");\n if (iframe) {\n var image = iframe.contentWindow.document.getElementById("image");\n if (!image) return;\n image.style.backgroundSize = "cover";\n } else {\n var iframe = document.querySelector(".adform-adbox iframe");\n if (iframe) {\n var style = document.createElement("style");\n style.textContent = "#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}";\n iframe.contentDocument.body.append(style);\n iframe.style = "width: 100vw; height: 100vh;";\n } else {\n var observer = new MutationObserver(function(mutations, obs) {\n for (var mutation of mutations) {\n var iframe = mutation.addedNodes[0];\n if (iframe && iframe.nodeName === "IFRAME") {\n iframe.style = "width: 100vw; height: 100vh;";\n iframe.dataset.contents += "<style>#banner {width: 100% !important; height: 100% !important;} #banner img {object-fit: cover;}</style>";\n obs.disconnect();\n }\n }\n });\n observer.observe(document.body, { childList: true, subtree: true });\n }\n }\n }\n ';const n=document.createElement("style");return n.textContent="\n html, body, adfm-ad, #sf_align, .adform-adbox, .adform-adbox img {\n width: 100% !important;\n height: 100% !important;\n object-fit: cover;\n max-width: 100vw;\n }\n ",e+n.outerHTML+t.outerHTML})(n)),(e=>e.includes("529299503"))(n)&&(n=jn(n)),(e=>e.includes("de17a"))(n)&&(n=(e=>Pn(e)?e:e.replace("<iframe ","<iframe onload=\"\n var f = document.querySelector('iframe');\n if (!f) return;\n var s = f.style;\n s.transform = 'scale(' + (window.innerHeight / Number(f.height)).toFixed(2) + ')';\n s.right = parseInt((Number(f.width) - window.innerWidth) / 2) + 'px';\n s.bottom = parseInt((Number(f.height) - window.innerHeight) / 2) + 'px';\n s.position = 'relative';\n \" "))(n)),Pn(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</iframe>","</iframe><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),(e=>e.includes("kreateam.io"))(n)&&(n=(e=>{let t=e.replace("<html>",'<html style="height: 100%;">');return t=t.replace("</div>","</div><style>#sf_align {height: 100%;} #sf_align iframe {height: 100vh;}</style>"),t=t.replace('<body style="','<body style="height: 100%; '),t})(n)),An(t)&&(n=(e=>{const t=document.createElement("script");t.textContent='var frame = window.frameElement;\n if (frame) {\n frame.style.width = "100vw";\n frame.style.height = "100vh";\n }';const n=document.createElement("div");return n.innerHTML=e,n.appendChild(t),n.innerHTML})(n)),n},Gn=()=>{Wn=null;const e=window.visualViewport,t=e?e.height:window.innerHeight,n=e?e.width:window.innerWidth,i=e?e.offsetLeft:0,o=document.documentElement;o.style.setProperty("--advertory-fullscreen-scroll-vh",`${t}px`),o.style.setProperty("--advertory-fullscreen-scroll-vw",`${n}px`),o.style.setProperty("--advertory-fullscreen-scroll-left",`${i}px`)},Xn=()=>{Wn||(Wn=window.requestAnimationFrame(Gn))},Jn=(e,t)=>{var n,i,o,r,a;const{pageContext:{countryCode:d,deviceType:s}}=f.get(),{targetId:l}=e,c=null==t?void 0:t.options;document.documentElement.style.setProperty("--advertory-ios-safe-area-top-fix",null!==(n=null==c?void 0:c.iosSafeAreaTopFix)&&void 0!==n?n:"0px"),((e,t)=>{var n;const{articlesContainerWidth:i=1302,backgroundColor:o="#fff",foregroundColor:r="#fff",margin:a,beforeContentValue:d=""}=e,s=null!==(n=null==a?void 0:a[t])&&void 0!==n?n:"16px 0",l=i/2,c=document.createElement("style");c.innerHTML=`\n :root {\n --background: linear-gradient(\n to right,\n ${o} 0px,\n ${o} calc(50% - ${l}px),\n ${r} calc(50% - ${l}px),\n ${r} calc(50% + ${l}px),\n ${o} calc(50% + ${l}px),\n ${o} 100%\n ) !important;\n \n --advertory-fullscreen-scroll-wrapper-margin: ${s};\n }\n \n .advertory-fullscreen-scroll-wrapper {\n ${d&&"clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);\n -webkit-clip-path: polygon(0 -16px, 100vw -16px, 100vw 100dvh, 0 100dvh);"}\n }\n\n .advertory-fullscreen-scroll-wrapper:before, .advertory-fullscreen-scroll-wrapper:after {\n background: var(--background);\n content: '${d}' !important;\n }`,c.id="ad-fullscreen-scroll-wrapper-style",document.head.appendChild(c)})(null!==(i=null==c?void 0:c.overlayStyles)&&void 0!==i?i:{},s);const u=document.getElementById(l),p=null==u?void 0:u.parentElement;if(!u||!p)return;Nn(p,t),u.className=In,Nn(p,t),u.className="advertory-fullscreen-scroll";const v=Qe(e,Se)?"absolute":"fixed";u.style.position=v,p.className=En,p.dataset.showTagSubscribeId=l,u.setAttribute("data-ad-label",null!==(o=null==c?void 0:c.annonsLabel)&&void 0!==o?o:Hn[d].adText),(null==c?void 0:c.annonsLabel)&&(u.dataset.adLabelCustom="true"),(null==c?void 0:c.cogwheelPosition)===Vn&&(u.dataset.moveCogwheelToTheLeft="true"),Xn(),window.addEventListener("resize",Xn),null===(r=window.visualViewport)||void 0===r||r.addEventListener("resize",Xn),null===(a=window.visualViewport)||void 0===a||a.addEventListener("scroll",Xn)},Yn=e=>{if(!(null==e?void 0:e.classList.contains(In)))return;e.classList.remove(In),e.removeAttribute("style"),e.removeAttribute("data-ad-label"),e.removeAttribute("data-ad-label-custom");const t=e.parentElement;(null==t?void 0:t.classList.contains(En))&&(t.classList.remove(En),t.classList.remove(Sn))};var Qn=Object.freeze({__proto__:null,createFullscreenScrollAd:Jn,modifyFullscreenScrollAd:({targetId:e})=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=An(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=An(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,Kn(t,e))},undoFullscreenScrollContainer:Yn});const Zn=e=>{var t;!document.querySelector(`#gdprAdTransparencyCogWheelButton-${e}`)&&(null===(t=window.gdpr)||void 0===t?void 0:t.setupButton)&&window.gdpr.setupButton(e)},ei=(e,t,n)=>{var i,o,r,a;const d=document.createElement("div");d.id=`${e}-button`,t.appendChild(d);(null===(o=null===(i=window.apntag.requests)||void 0===i?void 0:i.tags[e])||void 0===o?void 0:o.adResponse)||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]=Object.assign(Object.assign({},window.apntag.requests.tags[e]),{adResponse:{ads:[{creative_id:n}]}})),Zn(e);const s=d.firstElementChild;s&&t.insertBefore(s,d),d.remove()},ti="ad-loaded",ni=(e,t,n)=>P(void 0,void 0,void 0,function*(){yield $,yield L;new IntersectionObserver((t,i)=>{t.filter(({isIntersecting:e})=>e).forEach(()=>{n(),i.unobserve(e),i.disconnect()})},{rootMargin:`${t}px 0px ${t}px 0px`}).observe(e)}),ii=()=>P(void 0,void 0,void 0,function*(){const{prebid:e,tcf:t,pageContext:{countryCode:n,isMobileApp:i,deviceType:o},fullscreenScroll:r,appearanceConfig:a,placements:d}=f.get();if(!(null==e?void 0:e.enabled))return;const{initNativeAd:l}=f.getHandlers(),{getConsentAsync:c}=it(t,0,n),u=yield c(),p=(()=>{let e=!1,t=[];const n={relevantCb:{timeout:1e3},auctionCb:{timeout:2e3}};return{getCancel:()=>e,setCancel:t=>{e=t},events:n,failsafeOnTimeout:i=>{const o=nn(),{prebid:{relevantCallbackTimeout:r}={}}=f.get(),a="relevantCb"===i&&r?r:n[i].timeout,d=setTimeout(()=>{!n[i].done&&!e&&(console.warn(`Doing failsafe loadTags() call after waiting too long for '${i}'`),e=!0,o.loadTags&&o.loadTags())},a);t.push(d)},cleanup:()=>{t.forEach(e=>clearTimeout(e)),t=[],e=!1,n.relevantCb.done=!1,n.auctionCb.done=!1}}})(),v=nn(),g=(()=>{const{requests:{user:e={userIds:[]},keywords:t={}}={}}=nn();return{user:e,keywords:t}})();p.failsafeOnTimeout("relevantCb");const{user:{externalUid:h=""}={},keywords:m}=g;(()=>{const e=on();return e.cmd||(e.cmd=[]),e.cmd})().push(()=>{s("prebid relevantYieldQueue callback fired - RY took over");if(p.getCancel()||!v.loadTags)return s("core loadTags() call was cancelled",{cancel:p.getCancel(),apnTagLoadTags:!v.loadTags,condition:"or"}),void p.cleanup();const t=on();p.events.relevantCb.done=!0,p.failsafeOnTimeout("auctionCb");const c=u?{gdpr:{cmpApi:"iab",timeout:8e3}}:{cmpApi:"none"};s("prebid consentManagement",c),t.addPrebidConfig(Object.assign(Object.assign({consentManagement:c,enableSendAllBids:!1},bn(n)),rn(m,h))),s("core add prebid config",Object.assign(Object.assign({consentManagement:c,enableSendAllBids:!1},bn(n)),rn(m,h))),t.loadPrebid({configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{s("prebid auctionCb loadTags called by RY - prebid hands off to Xandr",{targetIds:e,cancelled:p.getCancel()}),p.getCancel()||(p.events.auctionCb.done=!0,v.loadTags(e)),p.cleanup()}},customNativeRender:e=>{oi(e,l)},directRenderFn:e=>{var t,n,l;const{settings:c,renderFn:u}=e,{bid:p,adDiv:v}=c||{};if(!v)return;const g=v.id,h=document.getElementById(g);if(!h)return;const m=null===(t=null==d?void 0:d[o])||void 0===t?void 0:t.find(e=>e.targetId===g),f=null!==(l=null!==(n=null==m?void 0:m.requestThreshold)&&void 0!==n?n:null==a?void 0:a.defaultThreshold[o])&&void 0!==l?l:0,y=Object.assign(Object.assign({},p),{targetId:g,banner:!0});s("prebid directRenderFn ad info",{targetId:g,width:null==p?void 0:p.width,height:null==p?void 0:p.height,adId:null==p?void 0:p.adId,creativeId:null==p?void 0:p.creativeId}),ni(h,f,()=>{var e;const t=u(c),n=De(y);if(s("prebid directRenderFn isFullscreenScrollAd",{targetId:g,isFullscreen:n,width:null==p?void 0:p.width,height:null==p?void 0:p.height}),n)s("prebid directRenderFn: creating fullscreen scroll container",{targetId:g}),Jn(y,r),(e=>{const t=()=>{const t=e.contentDocument;if(!(null==t?void 0:t.body))return;const n=()=>{const e=t.querySelector("iframe");if(!e)return!1;const n=()=>{var t;const n=null===(t=e.contentDocument)||void 0===t?void 0:t.querySelector(".adn-ttpa-container");n&&(n.style.setProperty("bottom","10px","important"),n.style.setProperty("top","unset","important"))};return e.addEventListener("load",n),n(),!0};if(n())return;const i=new MutationObserver(()=>{n()&&i.disconnect()});i.observe(t.body,{childList:!0,subtree:!0})};e.addEventListener("load",t),t()})(t),i&&h.style.setProperty("--advertory-political-box-offset","30px");else{s("prebid directRenderFn: NOT fullscreen scroll - undoing container",{targetId:g}),Yn(h),null===(e=null==h?void 0:h.parentElement)||void 0===e||e.classList.add("advertory-direct-render");const n=t.getAttribute("width");n&&(h.style.width=`${n}px`)}h.classList.add(ti),(null==p?void 0:p.creativeId)&&ei(g,h,Number(null==p?void 0:p.creativeId))})}}),s("core load prebid",{configId:e.configId,manageAdserver:!1,collapseEmptyDivs:!1,collapseBeforeAdFetch:!1,noGpt:!0,noSlotReload:!0,loadUnknownSlots:!0,apntagCalls:{showTag:()=>{},loadTags:e=>{p.getCancel()||(p.events.auctionCb.done=!0,v.loadTags(e))}},customNativeRender:e=>{oi(e,l)},directRenderFn:()=>{}})})}),oi=(e,t)=>{var n;const{divId:i,native:o,bid:r}=e,a=document.querySelectorAll(`[id^=${i}]`)[0],d=`RY-${a.id}`;((e,t)=>{e.childNodes.forEach(e=>e.style.cssText="position: absolute; z-index: -1;");const n=document.createElement("div");n.setAttribute("id",t),e.appendChild(n)})(a,d);const s=null===(n=a.getElementsByTagName("iframe")[0])||void 0===n?void 0:n.contentWindow;null==t||t({native:o,targetId:d},f.get()),null==s||s.postMessage(JSON.stringify({message:"Prebid Response",ad:"\x3c!-- nothing --\x3e",adId:r.adId}),"*")},ri=(e,t,n)=>{const i=document.getElementById(`div_utif_${e}`);if(!i)return;const{apntag:o}=window,[r,a]=t;if(!i.dataset.lockedsize&&a&&r)i.style.width=`${r}px`,i.style.height=`${a}px`,n&&(o.resizeAd(i.id,[r,a]),i.dataset.lockedsize="true",i.dataset.lockedwidth=r.toString(),i.dataset.lockedheight=a.toString());else if(null==i?void 0:i.dataset.lockedsize){const{lockedwidth:e,lockedheight:t}=i.dataset;e&&t&&o.resizeAd(i.id,[e,t])}},ai=["netboard","board"];class di{constructor(e,t){this.identityFacade=e,this.tracker=t}buildUrl(e,t){var n,i;const{editionName:o}=e,r=(()=>{const e=window.location.href;return new URL(e).searchParams.get("dre_override_inv_code")||""})(),a=JSON.stringify(null!==(i=null===(n=window.advertory)||void 0===n?void 0:n.renderedDrEditionAds)&&void 0!==i?i:[]),d=new URL("https://dr-edition-teaser-server.inventory.schibsted.io/editions"),{envId:s,spid:l}=t;return d.searchParams.append("editionName",o),r&&d.searchParams.append("urlData",r),a&&d.searchParams.append("excludedItems",a),l&&d.searchParams.append("spid",l),s&&d.searchParams.append("envid",s),d.toString()}fetchData(e){return P(this,void 0,void 0,function*(){var t,n,i;const o=yield this.identityFacade.getIdentityUser(),r=null!==(i=yield null===(n=null===(t=this.tracker)||void 0===t?void 0:t.getEnvironmentId)||void 0===n?void 0:n.call(t))&&void 0!==i?i:"",a=(null==o?void 0:o.userId)?String(o.userId):"",d=this.buildUrl(e,{envId:r,spid:a});try{s("Starting fetching DrEdition ad from URL:",d);const e=yield ie.get(d);return s("Fetch operation completed successfully."),e}catch(e){s("Error during fetch operation:",e)}return null})}}let si=class{getDrEditionUTMParams(e,t){var n;const{title:i="",clientName:o,creativeId:r}=null!==(n=null==e?void 0:e.pulseData)&&void 0!==n?n:{},{editionName:a}=t,d=i.replace(/<[^>]*>/g,"");return Object.assign({utm_source:"vgfront",utm_content:a,utm_campaign:o,utm_medium:d},r&&{utm_id:`df-${r}`})}getUrlSearchParams(e,t,n){if(!e)return"";const i=this.getDrEditionUTMParams(t,n),o=new URLSearchParams(decodeURIComponent(e.search)),r=new URLSearchParams(e.search);return Object.entries(i).forEach(([e,t])=>{o.has(e)||r.set(e,null!=t?t:"")}),r.toString().replace(/\+/g,"%20")}getUrlWithParams(e,t){var n;const i=null===(n=null==e?void 0:e.pulseData)||void 0===n?void 0:n.url;if(!i)return"";const o=this.getDrEditionUTMParams(e,t),r=new URL(i);return Object.entries(o).forEach(([e,t])=>{r.searchParams.has(e)||r.searchParams.set(e,null!=t?t:"")}),r.toString()}handleVideo(e,t){return P(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 li=e=>{const t=e.parentElement;t?t.classList.remove("dr-edition-lock-height"):s("Dr. Edition container does not have a parent element, cannot remove height lock.")};class ci{constructor(e,t,n,i){this.drEditionService=e,this.rendererManager=t,this.videoManager=n,this.pulseManager=i,this.drEditionAds=[]}fetchAndRenderAd(e,t){return P(this,void 0,void 0,function*(){var n,i;const{drEditionConfig:{options:{containerSelector:o}},renderAsBackfill:r=!1}=t,a=e.querySelector(o);if(!a)return void s(`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?(s("No Dr. Edition ads available to render. Collapsing whole placement."),X(e.id),void li(a)):((null==d?void 0:d.itemId)&&r&&(s("Dr. Edition ad available to render as a Xandr backfill."),J(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(a,d,t),yield null===(n=this.videoManager)||void 0===n?void 0:n.handle(d,t),li(a),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)):li(a))):(s("No Dr. Edition ads available to render. Hiding Dr. Edition and rendering Xandr backfill."),this.hideDrEdition(a),this.showBackfill(e),void li(a))})}observeAdView(e,t,n){this.observeCarousel(e,t,n)||((e,t,n={threshold:.5})=>{new IntersectionObserver(([e],n)=>{e.isIntersecting&&(t(),n.disconnect())},n).observe(e)})(e,()=>this.pulseManager.trackContentView(e,t,n),{threshold:.5})}showBackfill(e){var t;const n=e.querySelector(".fallback");if(!n)return;n.style.display="block";const i=null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"";J(i)}hideDrEdition(e){e.style.display="none"}observeCarousel(e,t,n){const i=e.querySelector(".dr-edition-slider");if(!i)return!1;let o=null;const r=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.intersectionRatio>=.9&&(o&&clearTimeout(o),o=setTimeout(()=>{e.target.onclick=()=>this.pulseManager.trackContentClick(e.target,t,n),this.pulseManager.trackContentView(e.target,t,n)},500)),[...i.children].forEach(e=>{r.observe(e)})})},{threshold:[.9]});return[...i.children].forEach(e=>{r.observe(e)}),!0}}class ui{constructor(e,t){this.newsroomStrategy=e,this.pulseManager=t}render(e,t,n){return P(this,void 0,void 0,function*(){if(!(null==t?void 0:t.itemId))return;const{getConsentAsync:i}=it(n.tcf,n.isMobileApp,n.country),o=yield i(),r=$t(n.device)?t.mobileHTML:t.desktopHTML,a=o?r:r.replace(/<img [^>]*class="tracking-pixel"[^>]*>/g,"");e.innerHTML=a,e.querySelectorAll("a").forEach(e=>{var i,o,r;e.search=null!==(r=null===(o=(i=this.newsroomStrategy).getUrlSearchParams)||void 0===o?void 0:o.call(i,e,t,n))&&void 0!==r?r:"",e.onclick=()=>this.pulseManager.trackContentClick(e,t,n)})})}}class pi{constructor(e){this.strategy=e}handle(e,t){return P(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 P(this,void 0,void 0,function*(){const t=e.drEditionConfig.options.videoScriptUrl,n=document.querySelector(`script[src="${t}"]`);if(t&&!window.autoplayQueue&&!n)try{yield Cn(t)}catch(e){s("Error! Failed to prepare SVP player script for Dr. Edition!",e)}})}createVideoElement(e,t){return P(this,void 0,void 0,function*(){const n=document.createElement("div"),{node:i}=e.videoConfiguration,o=[...document.querySelectorAll(`#${i}`)||[]].find(e=>0===e.children.length);if(this.handlePreviewVideo(e,t))return;this.strategy.handleVideo(n,e),null==o||o.appendChild(n),window.autoplayQueue=window.autoplayQueue||[],window.autoplayQueue.push(e=>{e.parse()});const r=null==o?void 0:o.parentNode;if(!r)return;const a=r.closest("a");r.addEventListener("click",e=>{const t=e.target.closest("a");a!==t&&t||(e.stopPropagation(),e.preventDefault())})})}handlePreviewVideo(e,t){var n,i,o;const{preview:{url:r,thumbnail:a}}=null!==(n=e.videoConfiguration)&&void 0!==n?n:{};if(!r)return!1;const d=document.querySelector(".dr-edition-preview .preview-video");return!!d&&(d.setAttribute("src",r),d.setAttribute("playsinline",""),!(!d||!a)&&(null===(o=(i=t.drEditionConfig.options).addPreviewVideo)||void 0===o||o.call(i,d),!0))}}let vi=class{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t,n,i){return{}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getTeaserElementText(e,t){if(!e)return"";const n=e.querySelector({title:".dr-edition-title",subtitle:".dr-edition-subtitle",image:"img.teaser-main-image"}[t]);if(!n)return"";if("image"===t)return n.src||"";const i=null==n?void 0:n.textContent;return i?i.trim():""}getEventTarget(e,t){const{itemId:n,pulseData:{url:i}={}}=t,o=this.getTeaserElementText(e,"title");return{id:n,name:this.normalizePlacementTitle(null!=o?o:""),type:"Page",url:i}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e,t,n){return P(this,void 0,void 0,function*(){var i,o,r,a,d,s,l,c;const u=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:n.editionName}});if(window.dispatchEvent(u),!this.pulse)return;const p=this.getEventInput(e,t,n,"view");(null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)?null===(r=null===(o=this.pulse)||void 0===o?void 0:o.trackLegacyViewUIElement)||void 0===r||r.call(o,p):(null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)?null===(s=null===(d=this.pulse)||void 0===d?void 0:d.trackViewUIElement)||void 0===s||s.call(d,p):null===(c=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===c||c.call(l,p)})}trackContentClick(e,t,n){return P(this,void 0,void 0,function*(){var i,o,r,a,d,s;if(!this.pulse)return;const l=this.getEventInput(e,t,n,"click");this.pulse.trackLegacyClickUIElement?null===(o=(i=this.pulse).trackLegacyClickUIElement)||void 0===o||o.call(i,l):this.pulse.trackClickUIElement?null===(a=(r=this.pulse).trackClickUIElement)||void 0===a||a.call(r,l):null===(s=(d=this.pulse).trackElementClick)||void 0===s||s.call(d,l)})}},gi=class extends vi{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r;const{pulseData:{title:a,clientName:d="",creativeId:s,url:l=""}={}}=t,{columnName:c,primaryPosition:u}=n,{publicUrl:p,urlPath:v}=null!==(r=null===(o=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.transformUrl)||void 0===o?void 0:o.call(i,l))&&void 0!==r?r:{publicUrl:l,urlPath:l?new URL(l).pathname:""};return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:a,placement:{columnName:c,primaryPosition:u},tags:[d,a,p,v].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:d,"spt:creativeId":s,pageTitle:a,publicUrl:p,urlPath:v},url:location.origin}}getEventInput(e,t,n){return{object:this.getEventBaseData(e,t,n),target:this.getEventTarget(e,t)}}},hi=class extends vi{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e,t,n){var i,o,r,a,d,s;const{itemId:l,pulseData:{clientName:c,creativeId:u}={}}=t,p=n.editionName,v=this.mapPageType(this.pageType),g=null===(i=this.newsroomStrategy)||void 0===i?void 0:i.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getPulseObjectId)||void 0===r?void 0:r.call(o))&&void 0!==a?a:p,"@type":"UIElement",position:p,elementType:"Article",custom:{customer:c,creativeId:null!=u?u:l},page:{"@id":null!=g?g:p,"@type":v,url:location.origin},tags:null===(s=null===(d=this.newsroomStrategy)||void 0===d?void 0:d.getTags)||void 0===s?void 0:s.call(d,e)}}getEventInput(e,t,n,i){return{object:this.getEventBaseData(e,t,n),partnerstudio:this.getEventPartnerstudioData(e,t,n,i),target:this.getEventTarget(e,t),provider:this.getProviderData()}}getEventPartnerstudioData(e,t,n,i){var o,r,a,d;const{pulseData:{algorithm:s="sov",clientName:l,creativeId:c,editionId:u,itemId:p,url:v,probability:g}={}}=t,h=Math.floor(Date.now()/1e3),m=this.getTeaserElementText(e,"title"),f=this.getTeaserElementText(e,"subtitle"),y=this.getTeaserElementText(e,"image"),w=null!==(d=null!==(a=null===(r=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getUrlWithParams)||void 0===r?void 0:r.call(o,t,n))&&void 0!==a?a:v)&&void 0!==d?d:"";return{algorithm:s,clientName:l,probability:g,creativeId:c,device:n.device,editionId:u,itemId:p,link:w,placement:n.editionName,subtitle:f,time:h,title:m,type:i,imageUrl:y,frontId:86,tracking_type:"ad",xandrAdLoaded:!1}}getProviderData(){return{productTag:"partnerstudio"}}};const mi={FRONT:"front"},fi=e=>P(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)))}))}),yi={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 P(this,void 0,void 0,function*(){yield Promise.resolve().then(function(){return Ya})})}})}};let wi=class{handleVideo(e,t){return P(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){yield P(void 0,void 0,void 0,function*(){return yield new Promise(e=>{var t;Boolean(null===(t=window.SVP)||void 0===t?void 0:t.Player)?e(!0):window.addEventListener("onSvpPlayerReady",()=>e(!0))})});const a=["ContentMutePlugin"],d=this.createPlayerOverlay(e);var s,l;l=d,null==(s=a)||s.forEach(e=>{yi[e](l)});const c={id:t,node:n,autoplay:i,mute:o,vendor:r,autopause:"viewable",maxBitrate:600,pulse:{provider:"e24"},recommended:{autoplay:!1,next:{countdown:10}},skin:{name:"e24-default",url:""}},u=yield fi(c);u.once("assetReady",()=>{((e,t)=>{null==t||t.forEach(t=>{const n=window.SVP.Player.Plugins.get(t);e.addPlugin(new n)})})(u,a)}),u.once("ready",()=>{const t=e;new MutationObserver(e=>{e.forEach(({type:e,attributeName:n})=>{"attributes"===e&&"class"===n&&(t.classList.contains("jw-state-playing")?d.classList.add("is-playing"):d.classList.remove("is-playing"),t.classList.contains("jw-flag-user-inactive")?d.classList.add("is-inactive"):d.classList.remove("is-inactive"))})}).observe(t,{attributes:!0,attributeFilter:["class"]})}),u.once("PulseStats:ready",()=>P(this,void 0,void 0,function*(){const e=yield u.getPlugin("PulseStats").getTracker();null==e||e.update({provider:{id:"e24",productTag:"partnerstudio"}})}))})}getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===mi.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}createPlayerOverlay(e){const t=document.createElement("div");t.classList.add("cm-custom-video-overlay"),e.parentElement&&(t.innerHTML=e.parentElement.innerHTML,e.parentElement.replaceChild(t,e));return t.addEventListener("click",e=>{e.stopPropagation(),e.preventDefault(),t.classList.add("has-interacted")}),t}};const bi="https://www.aftonbladet.se/video-player-extras/latest/";let xi=class{handleVideo(e,t){return P(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:{[`${bi}cta-button.js`]:{name:"CtaButton",options:{type:"unmute"}},[`${bi}external-link.js`]:{name:"ExternalLink"}}};yield fi(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 ki=e=>null!==e&&"object"==typeof e&&!Array.isArray(e);let Ci=class{handleVideo(e,t){return P(this,arguments,void 0,function*(e,{videoConfiguration:{id:t,node:n,autoplay:i,mute:o,vendor:r}}){const a={id:t,node:n,autoplay:i,mute:o,vendor:r,locale:"se",autopause:"viewable",maxBitrate:600,sharing:!1,recommended:!1,pulse:{provider:"svdse",decorator:(e,t)=>Object.assign(Object.assign({},ki(e)?e:{}),{provider:Object.assign(Object.assign({},ki(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 fi(a);d.once("PulseStats:ready",()=>P(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===mi.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}},Ii=class{handleVideo(e,t){}getPulseObjectId(){return""}getPulsePageId(e,t){return""}};const Ei=(e,t,n)=>{const{publisher:i,pageType:o,country:r}=e,a={[Dt.VG]:new si,[Dt.E24]:new wi,[Dt.AFTONBLADET]:new xi,[Dt.SVD]:new Ci}[i]||new Ii,d=new(r===w.SE?gi:hi)(n,a,o),s=new di(t,n),l=new ui(a,d),c=new pi(a);return new ci(s,l,c,d)},Ti=()=>P(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 Si{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 P(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 s("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return P(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 Pi=(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=Ei(n,i,o);e.forEach(e=>{var i,o;if(!e.isIntersecting)return;const a=e.target,d=null!==(i=a.dataset.editionName)&&void 0!==i?i:"",s=null!==(o=a.dataset.pulseColumnname)&&void 0!==o?o:"",l=Number(a.dataset.pulsePrimaryposition)||0;r.fetchAndRenderAd(a,Object.assign(Object.assign({},n),{editionName:d,columnName:s,primaryPosition:l})),t.unobserve(a)})})(i,o,e,t,n),{rootMargin:"400% 0px"});o.forEach(e=>r.observe(e))},Ai=()=>P(void 0,void 0,void 0,function*(){try{(()=>{const e=document.createElement("script");e.setAttribute("src","https://ads.inventory.schibsted.io/ad-service/ad-banner-sponsor-advertisement/ad.js"),e.setAttribute("type","text/javascript"),e.setAttribute("async","true"),document.head.appendChild(e)})(),(()=>{const e=document.createElement("div");e.setAttribute("id","ads-advertory-anchor"),e.classList.add("subscribe_box"),e.classList.add("ad-box"),e.classList.add("leftAd"),e.classList.add("netboard"),e.classList.add("advert"),e.classList.add("module"),e.classList.add("banner"),e.classList.add("leaderboard"),e.classList.add("adsbygoogle"),e.classList.add("ad-banner"),e.classList.add("ad-container"),e.classList.add("adsbox"),e.classList.add("sidebar-ads"),e.classList.add("banner-ads"),e.style.opacity="0",e.style.width="1px",e.style.height="1px",e.style.minWidth="0px",e.style.minHeight="0px",e.style.maxWidth="1px",e.style.maxHeight="1px",e.style.position="absolute",e.style.top="0",e.style.boxSizing="border-box",e.style.margin="0",e.style.padding="0",document.body.appendChild(e)})()}catch(e){console.error("Error running adblock scripts:",e)}}),Oi=()=>{const e=document.getElementById("ads-advertory-anchor");return!(e&&"none"!==getComputedStyle(e).display&&window.advertoryFluepapir)},ji=[],$i=(e,t)=>P(void 0,void 0,void 0,function*(){var n;const{pulse:i,tcf:o,drEdition:r,pageContext:{deviceType:a,publisher:d,pageType:l,countryCode:c,isMobileApp:u}}=e;if(!(yield ot(o,u,c,"handleDrEditionBackfill")))return;const p=((e,t)=>{var n,i;const{pageContext:{deviceType:o},placements:r,drEdition:a}=e,d=null===(n=null==a?void 0:a.options)||void 0===n?void 0:n.fallbackGlobalEditionName,s=r[o]||r.desktop,l=T(t.targetId),c=s.find(e=>e.targetId===l),u=ai.some(e=>l.startsWith(e)),p=ji.includes(l),v=(null===(i=null==c?void 0:c.drEdition)||void 0===i?void 0:i.editionName)||d;return c&&u&&!p&&v?(ji.push(l),Object.assign(Object.assign({},c),{drEdition:Object.assign(Object.assign({},c.drEdition),{editionName:v})})):null})(e,t);if(!p)return;if(!(null==i?void 0:i.instance))return void s("Pulse has not been passed as a prop, aborting");const v=yield Ti(),g=new Si(v),h=Ei({publisher:d,pageType:l,country:c},g,null==i?void 0:i.instance),m=document.getElementById(t.targetId);if(!m||!r)return;m.classList.value="";const f=document.createElement("div");f.className=r.options.containerSelector.replace(/^[.#:[\]]+/,""),m.innerHTML=f.outerHTML;const y={editionName:(null===(n=null==p?void 0:p.drEdition)||void 0===n?void 0:n.editionName)||"",drEditionConfig:r,device:a,tcf:o,isMobileApp:u,country:c,renderAsBackfill:!0};yield h.fetchAndRenderAd(m,y)}),Li=(e,t)=>{var n,i,o;if(!Oi())return void s("Ad block not enabled, Dr. Edition backfills will not be rendered");s("Ad block is enabled, Dr. Edition backfills will be rendered");const{pageContext:{deviceType:r},finnBlink:a}=e,d=null===(i=null===(n=null==a?void 0:a.replacementConfig)||void 0===n?void 0:n.adsToReplace)||void 0===i?void 0:i[r],l=null!==(o=null==d?void 0:d.map(([e])=>e))&&void 0!==o?o:[],c=new IntersectionObserver((t,n)=>P(void 0,void 0,void 0,function*(){for(const i of t){if(!i.isIntersecting)continue;const t=i.target;n.unobserve(t),yield $i(e,{targetId:t.id})}}),{rootMargin:"400% 0px"});t.filter(e=>!l.some(t=>e.targetId.startsWith(t))).forEach(e=>{const t=document.getElementById(e.targetId);t&&c.observe(t)})};var _i=Object.freeze({__proto__:null,DrEdition:({editionName:e,fallbackTargetId:t,children:i,pulseData:o,htmlAttributes:r})=>{const a=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},d=a(o,"data-pulse"),s=a(r,"data");return n.jsxs("div",Object.assign({className:"dr-edition-wrapper dr-edition-lock-height","data-edition-name":e},d,s,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":t,style:{display:"none"},children:i})]}))},getDrEditionManager:Ei,handleDrEdition:e=>P(void 0,void 0,void 0,function*(){var t;if(!e.drEdition)return;if(!(yield ot(e.tcf,e.pageContext.isMobileApp,e.pageContext.countryCode,"handleDrEdition")))return;const n=yield Ti(),i=new Si(n);Pi({publisher:e.pageContext.publisher,drEditionConfig:e.drEdition,device:e.pageContext.deviceType,pageType:e.pageContext.pageType,country:e.pageContext.countryCode},i,null===(t=e.pulse)||void 0===t?void 0:t.instance)}),handleDrEditionBackfill:$i,handleDrEditionBackfillOnAdblock:Li});const Ni="collapseAd",qi="hideAd",Fi="resizeAd",Di="renderDrEditionFallback",Mi="wallpaperImageUrl",Bi="wallpaperColor",Ri="velvet",Ui=[Fi,Mi,Bi,Ni,qi,Di,Ri];let zi;const Vi=e=>{if(!["http://acdn.adnxs-simple.com","https://acdn.adnxs-simple.com","https://crcdn01.adnxs-simple.com","http://crcdn01.adnxs-simple.com","https://acdn.adnxs.com","http://acdn.adnxs.com","https://adsdk.microsoft.com","https://adsdk.bing.net","https://adsdkprod.azureedge.net"].includes(e.origin.trim()))return;const{data:t}=e;if(!t)return;const n=(e=>{if("object"==typeof e)return e;if(M(e)){const t=e.replace(/^wallpaper:url:/,"");return{name:Mi,wallpaperImageUrl:t}}if(B(e)){const t=e.replace(/^wallpaper:color:/,"");return{name:Bi,wallpaperColor:t}}if(e.startsWith(Di)){const t=e.split(":")[1];return{name:Di,targetId:t}}if(e.startsWith(Ni)||e.startsWith(qi)){const t=e.split(":")[1];return{name:Ni,targetId:t}}if(e.includes("name")&&Ui.some(t=>e.includes(t)))try{return JSON.parse(e)}catch(e){}})(t);if(!n)return;if(!n.name||!Ui.some(e=>n.name===e))return;const{name:i,targetId:o,wallpaperImageUrl:r,wallpaperColor:a,cmd:d,size:s}=n;i===Ri&&d&&(d.includes("noScroll")&&(zi=(e=>{if(!e)return()=>{};const t=e.style.overflow;return e.style.setProperty("overflow","hidden"),()=>{e.style.setProperty("overflow",t)}})(document.querySelector("body"))),(d.includes("close")||d.includes("ended"))&&(null==zi||zi(),dispatchEvent(new CustomEvent("advertory:closeTakeover",{})))),i!==Ni&&i!==qi||!o||X(o),i===Fi&&o&&d&&ri(o,d),i===Di&&o&&(X(o),$i(f.get(),{targetId:o})),"resizeMediationAd"===i&&o&&s&&ri(o,s,!0),i===Mi&&r&&R(r),i===Bi&&a&&U(a)},Hi=()=>{const{pageContext:{publisher:e,countryCode:t},finnBlink:n}=f.get(),i=window.apntag,o={publisher:e,countryCode:t,finnBlink:n},r=e=>{J(e),j(()=>i.showTag(e))};return{withXandrAd:r,withFinnBlinkAd:e=>P(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return;const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ud});yield t(e,o,null)}),withFullAdsChain:e=>P(void 0,void 0,void 0,function*(){if(!(null==n?void 0:n.enabled))return void r(e);const{loadFinnBlinkAd:t}=yield Promise.resolve().then(function(){return ud});yield t(e,o,r,()=>P(void 0,void 0,void 0,function*(){if(!Q.getData("horseshoe").isAvailable)return;const{adjustAdToHorseshoe:t}=yield Promise.resolve().then(function(){return z});t(e)}))})}},Wi=(e,t)=>P(void 0,void 0,void 0,function*(){e.id.includes("wallpaper")||(yield ni(e,t,()=>((e,t,n)=>{const i="true"===n.dataset.isFinnBlinkOnlyPlacement;return We(t)&&i?(s(`loading finn blink ad for blink only placement for ${t}`),void Hi().withFinnBlinkAd(t)):We(t)?(s(`loading finn blink ad with full ads chain for ${t}`),void Hi().withFullAdsChain(t)):void j(()=>(s("core showTag",{id:t}),e.showTag(t)))})(window.apntag,(e=>{const t=e.dataset.showTagSubscribeId;return!e.id.length&&t?t:e.id})(e),e)))}),Ki=e=>({rootMargin:`${e}px 0px ${e}px 0px`}),Gi=new Map,Xi=["no-stavangeraftenblad","sa","no-aftenposten","aftenposten","no-bergenstidende","bt"],Ji=".brandstudio-premium-content-widget",Yi=({adWrapper:e,placementContainer:t})=>t.offsetHeight+(({adWrapper:e})=>{const{paddingTop:t,paddingBottom:n}=getComputedStyle(e);return parseFloat(t)+parseFloat(n)})({adWrapper:e}),Qi=({adWrapper:e,placementContainer:t})=>{const n=Yi({adWrapper:e,placementContainer:t});var i;null==e||e.style.setProperty("height",`${n}px`),ue(i=t),i.innerHTML=""},Zi=e=>{e&&e.style.getPropertyValue("height")&&e.style.removeProperty("height")},eo=({adWrapper:e,placementContainer:t})=>{const{pageContext:{publisher:n}}=f.get(),i=Xi.includes(n)&&Boolean(t.closest(Ji));const o=i?t.closest(Ji):null,r=new MutationObserver(t=>{t.forEach(({addedNodes:t})=>{t.forEach(t=>{const n=t instanceof HTMLElement,a=n&&t.matches("iframe, article")&&e;if(!n||!i&&!a||i&&!o)return;if(a)return Zi(e),void r.disconnect();const d=t.closest('[style*="height"]'),s=o;d&&s.contains(d)?Zi(d):s.hasAttribute("style")&&Zi(s),r.disconnect()})})});try{r.observe(t,{childList:!0,subtree:!0})}catch(e){r.disconnect()}},to=(e,t,n,i,o,r)=>{var a;const d=performance.now(),s=null!==(a=Gi.get(t))&&void 0!==a?a:0,l=((e,t)=>!!t&&e+t<(new Date).getTime())(i,o)&&n<0;d-s>=o&&l&&(Gi.set(t,d),((e,t,n)=>{const{pageContext:{countryCode:i}}=f.get(),o=null==n?void 0:n.parentElement;o&&n&&Qi({adWrapper:o,placementContainer:n}),j(()=>{e.setKeywords([t],{[`${b(i)}-adreload`]:"1"},{overrideKeyValue:!0}),e.refresh([t])})})(e,t,r))},no=(e,t,n)=>{const i=new IntersectionObserver((e,i)=>((e,t,n,i)=>{e.filter(({isIntersecting:e})=>e).forEach(e=>{const{target:o,boundingClientRect:r}=e;t(window.apntag,o.id,r.y,n,i,o)})})(e,to,t,n),Ki(300));i.observe(e)},io=(e,t=6)=>{const n=[];for(let i=0;i<e.length;i+=t){const o=e.slice(i,i+t);n.push(o)}return n},oo=()=>navigator&&navigator.userAgent.match(/chrome/i)?null:navigator&&navigator.userAgent.match(/apple/i),ro=(e,t=0)=>{const n=e.getBoundingClientRect(),i=window.innerHeight;return n.bottom>-t&&n.top<i+t},ao=e=>{const{refreshConfig:{visibilityStateRefreshEnabled:t=!1}={}}=f.get();if(!t)return;const n=()=>{"visible"===document.visibilityState&&document.removeEventListener("visibilitychange",n),po(e)};"visible"!==document.visibilityState&&document.addEventListener("visibilitychange",n)},so=(e,t,n)=>{const i=document.querySelectorAll('[data-bf-cache-refresh="true"]');for(const o of i){const i=e.find(e=>{var t,n;return e.targetId===(null===(t=o.firstElementChild)||void 0===t?void 0:t.id)&&(null===(n=e.refresh)||void 0===n?void 0:n.bfCache)}),r=null==i?void 0:i.requestThreshold;ro(o,r)&&i&&(ee(i.targetId),n.length&&o.classList.remove(...n),po([i],t))}},lo=e=>{const{refreshConfig:{backForwardNavigationRefreshEnabled:t=!1}={},siteSpecificConfig:{classesToRemoveOnRefresh:n=[]}={},pageContext:{isMobileApp:i}}=f.get();t&&(e.forEach(({targetId:e})=>{const t=co(e);t&&(t.dataset.bfCacheRefresh="true")}),i?((e,t)=>{document.addEventListener("visibilitychange",()=>{"visible"===document.visibilityState&&so(e,!0,t)})})(e,n):((e,t)=>{window.addEventListener("pageshow",n=>{const i=()=>{window.scrollY>0&&(window.removeEventListener("scroll",i),so(e,!1,t))};n.persisted&&(oo()?window.addEventListener("scroll",i,{passive:!0}):so(e,!1,t))})})(e,n))},co=e=>{var t,n;return null!==(n=null===(t=document.querySelector(`#${e}`))||void 0===t?void 0:t.parentElement)&&void 0!==n?n:null},uo=e=>{const{targetId:t,allowedFormats:n}=e,i=(e=>{if(!e)return[];try{return JSON.parse(e.dataset.adSizes||"[]")}catch(e){return[]}})(co(t)),o=(e=>1===e[0]&&1===e[1])(i),r={sizes:[i],allowedFormats:o?n:n.filter(e=>"native"!==e),allowSmallerSizes:!1};return o||(r.native=void 0),r},po=(e,t=!1)=>{const{queryConfig:{batchSize:n=h}={}}=f.get(),i=e.map(({targetId:e})=>e),o=io(i,n);if(t)for(const t of e){const e=uo(t);window.apntag.modifyTag(t.targetId,e)}for(const e of o)j(()=>window.apntag.refresh(e))},vo=e=>`externalImpId:'${e}'`,go=(e,t)=>t?Object.assign(Object.assign({},e),{"aa-sch-ssa-native-ad":"true","aa-sch-ssa-format":"NATIVE_CONTENT","aa-sch-ssa-market":"XNO","aa-sch-ssa-cat":["ssa_1","ssa_2","ssa_3","ssa_4","ssa_5","ssa_6","ssa_7","ssa_8","ssa_9","ssa_10","ssa_11","ssa_12","ssa_13","ssa_14","ssa_15","ssa_16","ssa_17","ssa_18","ssa_19","ssa_20","ssa_21","ssa_22","ssa_23","ssa_24","ssa_25","ssa_26","ssa_27","ssa_28","ssa_29","ssa_30"]}):e,ho=e=>{var t;const{pageSetup:{tag:{forwardExternalImpId:n=!1}={}}={},pulse:i}=f.get(),{targetId:o,sizes:r,keywords:a,allowedFormats:d,invCode:l,ssaNativeAdEnabled:c=!1,nativeCustomProperties:u,safeframeConfig:p,dynamicSizeWidthCheck:v=!1,globalPlacementId:g}=(e=>{var t;if(!e.takeoverCookieCapForSharedPlacement||ft())return e;const n=null===(t=e.keywords)||void 0===t?void 0:t["no-sno-adformat"],i=Array.isArray(n)?n.filter(e=>e!==lt):n,o=Object.assign(Object.assign({},e.keywords),n&&{"no-sno-adformat":i}),r=e.sizes.filter(([e,t])=>4!==e||4!==t);return Object.assign(Object.assign({},e),{sizes:r,keywords:o})})(e),h=Object.assign({invCode:l,sizes:r,targetId:o,keywords:go(a,c),allowedFormats:d,dynamicSizeWidthCheck:v,globalPlacementId:g},p&&{safeframeConfig:p}),m=(e=>{var t,n;const i=null===(n=null===(t=null==e?void 0:e.instance)||void 0===t?void 0:t.state)||void 0===n?void 0:n.pageViewId;return i?(s("Pulse state pageViewId is:",i),i):(s("Pulse state does not contain field pageViewId or it is empty"),"")})(i);n&&m&&(s("External Impression ID assigned to defineTag:",vo(m)),h.externalImpId=vo(m));const y=(e=>Object.entries({video:{required:!1},address:{required:!1},saleprice:{required:!1},rating:{required:!1},price:{required:!1},phone:{required:!1},likes:{required:!1},downloads:{required:!1},customIcon1:{required:!1},customIcon2:{required:!1},customDisplayUrl1:{required:!1},customBody1:{required:!1},customBody2:{required:!1},customBody3:{required:!1},customBody4:{required:!1},customBody5:{required:!1}}).reduce((t,[n,i])=>((null==e?void 0:e.includes(n))&&(t[n]=i),t),{customTitle1:{required:!1},customTitle2:{required:!1},customTitle3:{required:!1},customTitle4:{required:!1},title:{required:!1},body:{required:!1},image:{required:!1},icon:{required:!1},sponsoredBy:{required:!1},cta:{required:!1},clickUrl:{required:!1},desc2:{required:!1},displayUrl:{required:!1},description:{required:!1}}))(u);return(null===(t=e.allowedFormats)||void 0===t?void 0:t.includes("native"))&&(h.native=y),h},mo=e=>!e.includes("takeover")||ft(),fo=e=>{const{source:t}=e;return"csm"===t},yo=e=>{if(!e)return e;const{pageContext:{countryCode:t}}=f.get(),n=b(t),i=e[`${n}-targetid`],o=i?T(i[0]):"";return Object.assign(Object.assign({},e),i&&{[`${n}-targetid`]:[o]})},wo=e=>{const{pageContext:{countryCode:t}}=f.get(),n=b(t);return Object.assign(Object.assign(Object.assign(Object.assign({},e),e[`${n}-geo`]&&{[`${n}-geo`]:["geo-test-value"]}),e[`${n}-geofence`]&&{[`${n}-geofence`]:["geofence-test-value"]}),e[`${n}-weather`]&&{[`${n}-weather`]:["weather-test-value"]})},bo=e=>{(e=>{const t=new URLSearchParams(window.location.search);if("true"!==t.get("scrollToFirstInvCode"))return;const n=t.get("ast_override_inv_code");if(!n)return;const i=n.split(",")[0].split(":")[0],o=e.find(e=>e.invCode===i),r=document.querySelector(`[id^=${null==o?void 0:o.targetId}]`);r&&r.scrollIntoView({behavior:"smooth",block:"start"})})(e),(()=>{var e;const t=new URLSearchParams(window.location.search).get("scrollToDrEditionPlacement");if(!t)return;const n=null!==(e=document.querySelector(`[id*="${t}}"]`))&&void 0!==e?e:document.querySelector(`a[aria-label*="${t}"]`);n&&n.scrollIntoView({behavior:"smooth",block:"start"})})()},xo=(e,t)=>P(void 0,void 0,void 0,function*(){return yield new Promise(t=>{e().then(e=>{t(null!=e?e:null)}).catch(e=>{t(null)})})});zn(".advertory-brandmetrics-survey{width:100%}");const ko="advertory-brandmetrics-survey",Co="https://dr-edition-teaser-server.inventory.schibsted.io/xandr",Io=()=>P(void 0,void 0,void 0,function*(){return window.__tcfapi?{gdpr:1,gdpr_consent:yield(e=window.__tcfapi,new Promise((t,n)=>{e("addEventListener",2,(n,i)=>{var o;i||t(""),"tcloaded"!==n.eventStatus&&"useractioncomplete"!==n.eventStatus||(t(null!==(o=n.tcString)&&void 0!==o?o:""),e("removeEventListener",2,()=>{},n.listenerId))})}))}:{};var e}),Eo={pageContext:{publisher:"aftonbladet",countryCode:w.SE},memberId:9943,sectionKeyword:"se-aftonbladet-section",frontpageInvCodeTemplate:"se-aftonbladet-{deviceType}-front-{position}",additionalFilterKeys:["se-aftonbladet-navigation","se-aftonbladet-keyword_generator","se-aftonbladet-sponsor"],tcf:{enabled:!0,advertisingCMPSignalEnabled:!0,schibstedConsentToPayEnabled:!0},glimr:{enabled:!0,clientId:"OYGH3SXYFAQR78LVPNQD"}},To={nyheter:"nyheter",sport:"sportbladet",noje:"nojesbladet",family:"family",matdryck:"matdryck",wellness:"wellness",minekonomi:"minekonomi",resa:"resa",harligthemma:"harligthemma"},So=e=>(null==e?void 0:e.parent)?[...So(e.parent),e.shortPath||"unknown"]:[],Po=(e,t)=>t?"se-aftonbladet-{deviceType}-studio_{position}":`se-aftonbladet-tv-{deviceType}-${(e=>{var t;if(null===(t=null==e?void 0:e.metadata)||void 0===t?void 0:t.afp)return"afp";const[,n]=So(e);return To[n]||"ovrigaavdelningar"})(e)}_{position}`,Ao={aftonbladet:Eo},Oo={aftonbladet:(e,t)=>{if(!e)return null;return{invCode:Po(e,t),videoOverlayInvCode:"se-aftonbladet-{deviceType}-other-{position}",sections:So(e).join(":")}}},jo=e=>{switch(e){case"auto":return 1;case"silent":return 2;default:return 3}},$o=new Map([[1,"autoplay"],[2,"muted-autoplay"],[3,"click-to-play"]]),Lo="se-generic",_o="aa-sch",No="kv_",qo="pause",Fo="{deviceType}",Do="{position}",Mo="afp_",Bo=new Set(Object.values({PREROLL:"preroll",BUMPER:"bumper",MIDROLL:"midroll"})),Ro="1-1",Uo="16-9",zo="3-4",Vo="9-16",Ho="responsive",Wo={[Ro]:1,[Uo]:1.78,[Vo]:.56,[Ho]:1},Ko={[Ro]:1,[Uo]:1.78,[zo]:1.33,[Vo]:.56},Go=(e,t,n,i)=>{const{invCode:o="",videoOverlayInvCode:r}=null!=e?e:{},a=me===n?we:be,d=o.replace(Fo,a);return(e,n)=>{if(e===qo)return(e=>e.replace("tv-","").replace("-afp_","-afp-").replace(Do,qo).replace(/-([a-z]+)_/,"-article-"))(d);if(n&&Bo.has(e)){return(i&&r?r:t.frontpageInvCodeTemplate).replace(Fo,a).replace(Do,e)}return d.replace(Do,e)}},Xo=(e,t)=>{const n=Object.entries(e);return n.reduce((n,[i,o])=>{const r=Math.abs(e[n]-t);return Math.abs(o-t)<r?i:n},n[0][0])},Jo=()=>{var e,t;const n=jwplayer().getContainer(),i=null!==(t=null===(e=document.getElementById(n.id))||void 0===e?void 0:e.parentElement)&&void 0!==t?t:null;return i&&"number"==typeof i.offsetWidth&&"number"==typeof i.offsetHeight&&0!==i.offsetHeight?i.offsetWidth/i.offsetHeight:1},Yo=()=>{return(e=>{try{return decodeURIComponent(e)}catch(e){return""}})("undefined"!=typeof document&&null!==(t=null===(e=document.cookie.match("(^|;)\\s*_pulse2data\\s*=\\s*([^;]+)"))||void 0===e?void 0:e.pop())&&void 0!==t?t:"").split(",");var e,t},Qo=()=>{const e=null!==(t=Yo()[9])&&void 0!==t?t:null;var t;const n=(()=>{var e;return null!==(e=Yo()[2])&&void 0!==e?e:null})();return e?Number(Boolean(e))+Number(Boolean(n)):0},Zo=()=>Object.fromEntries(new URLSearchParams(window.location.search)),er=(e,t)=>P(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{publisher:i,countryCode:o}}=t,{width:r,height:a}={width:window.innerWidth,height:window.innerHeight},d={isMobileApp:e.isApp,countryCode:o,publisher:i,pageType:"front",deviceType:e.deviceType},s=(yield ot(n,e.isApp,o,"video"))?"1":"0",l=yield Io(),c=yield kn(o),u=yield at({tcf:n,pageContext:d}),p=null!==(v=window.location.pathname.split("/").slice(-2,-1).pop())&&void 0!==v?v:"";var v;const g=((e=1)=>Xo(Ko,Number(e.toFixed(2))))(e.instreamAspectRatio),h=(m=e.playerAspectRatio)?Xo(Wo,Number(m.toFixed(2))):Ho;var m,f;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${_o}-country_code`]:o,[`${_o}-publisher`]:i,[`${_o}-supply_type`]:(f=e.deviceType,f===me?fe:ye),[`kw_${_o}-page_type`]:"collection",[`${_o}-page_type`]:"collection",[`${Lo}-appmode`]:e.isAndroidApp?"hybrid":"notinapp",[`kw_${Lo}-page`]:"index",[`${Lo}-page`]:"index",[`${Lo}-screenheight`]:String(window.screen.height),[`${Lo}-screenwidth`]:String(window.screen.width),[`${Lo}-viewportheight`]:String(a),[`${Lo}-viewportwidth`]:String(r),[`${Lo}-loggedin`]:e.isUserLoggedIn?"yes":"no",[`${Lo}-mobile-os`]:jt(),[`${Lo}-audience`]:void 0,[`${Lo}-externalid_src`]:Qo(),[`${Lo}-tags`]:e.tags,[`${Lo}-articleid`]:p,"article-id":p},yield Qt(Object.assign(Object.assign({},t),{pageContext:d}))),u&&{external_uid:u}),e.isUserPresentOnFrontPage&&e.isInitialVideo&&{[`${Lo}-tvtags`]:"vinjett"}),e.pageAdsKeywords),Object.keys(Zo()).some(e=>e.includes(No))&&(()=>{const e=Zo(),t=Object.fromEntries(Object.entries(e).filter(([e])=>e.startsWith(No)).map(([e,t])=>[e.slice(3),t]));return Object.keys(t).length>0?t:void 0})()),{[t.sectionKeyword]:e.sections.split(":"),"aa-sch-cmp_advertising":s,"kw_aa-sch-cmp_advertising":s,"aa-sch-instream_player_aspectratio":g,"aa-sch-player_aspectratio":h}),l),{eids:c})}),tr=["se-generic-audience","se-generic-appversion","se-generic-sitemode","se-generic-pagegen","se-generic-viewportheight","se-generic-viewportwidth","se-generic-screenheight","se-generic-screenwidth","aa-sch-inventory_type"],nr=["aa-sch-publisher","se-generic-page","aa-sch-supply_type","se-generic-story","se-generic-section","se-generic-adformat","aa-sch-context_keyword","se-generic-tvtags","se-generic-test","aa-sch-cmp_advertising","aa-sch-instream_player_aspectratio","aa-sch-player_aspectratio"],ir=["external_uid","gdpr","gdpr_consent","eids","article-id"],or=(e,t)=>{const n=[...tr,...t.additionalFilterKeys];return Object.fromEntries(Object.entries(e).filter(([e])=>!n.includes(e)).map(([e,t])=>[e.includes("kw")||ir.includes(e)?e:`kw_${e}`,t]))},rr=e=>Object.fromEntries(Object.entries(e).filter(([e])=>nr.includes(e))),ar=(e,t)=>P(void 0,void 0,void 0,function*(){var n,i,o,r;const a=(e=>{var t;Ao[e]||l(`[video] No config found for publisher "${e}"`);return null!==(t=Ao[e])&&void 0!==t?t:Eo})(e.publisher),d=(e=>{var t;return null!==(t=Oo[e])&&void 0!==t?t:Oo.aftonbladet})(e.publisher)(e.assetSection,e.isLiveStudio),s="/"===window.location.pathname,c=null===(i=null===(n=t.attributes)||void 0===n?void 0:n.id)||void 0===i?void 0:i.toString(),u=e.assetId===c,p=null!==(o=Number(e.aspectRatio))&&void 0!==o?o:1,v=u?"preroll":"bumper";var g;return{siteConfig:a,siteVideoParams:d,isUserPresentOnFrontPage:s,adsKeywords:yield er({pageAdsKeywords:e.pageAdsKeywords,tags:(g=e.tags,g?g.filter(e=>e.slug).map(({slug:e})=>e).join(","):""),sections:null!==(r=null==d?void 0:d.sections)&&void 0!==r?r:"",isUserLoggedIn:e.isUserLoggedIn,isUserPresentOnFrontPage:s,isInitialVideo:u,instreamAspectRatio:p,playerAspectRatio:Jo(),isApp:e.isApp,deviceType:e.deviceType,isAndroidApp:e.isAndroidApp},a),prerollPlacementFormat:v,playbackMethod:jo(e.startMode)}}),dr=(e,t)=>{const{siteConfig:n,siteVideoParams:i,isUserPresentOnFrontPage:o,adsKeywords:r,prerollPlacementFormat:a,playbackMethod:d}=e,{invCode:s}=i||{},l=Go(i,n,t.deviceType,t.isUsedInOverlayVideoPlayer),c=((e="")=>t=>e.includes(Mo)?`${Mo}${t}`:t)(s),u=window.location.href;return{member:n.memberId,options:{autoplayMuted:!0,vpaidcontrols:!0},adSlots:{schedule:{preroll:{inv_code:l(a,o),"se-generic-playback-method":$o.get(d),"kw_se-generic-adformat":c(a)},midroll:{inv_code:l("midroll"),"kw_se-generic-adformat":c("midroll")},postroll:{inv_code:l("postroll"),"kw_se-generic-adformat":c("postroll")}},params:Object.assign(Object.assign(Object.assign({},or(r,n)),rr(r)),{vskippable:"0",referrer:u,vplaybackmethod:d})},adPlacements:{schedule:{pause:{invCode:l("pause"),sizes:[[825,424],[1280,720],[2,1]]}},params:{keywords:Object.assign(Object.assign({},r),{"se-generic-adformat":c("pause")})}}}},sr=e=>t=>P(void 0,void 0,void 0,function*(){const n=yield ar(e,t);return dr(n,e)}),lr={plcmtcnt:1,context:1,contextsubtype:10,plcmttype:1,assets:[{id:1,title:{len:100},required:0},{id:2,img:{type:1,hmin:10,wmin:10},required:0},{id:3,img:{type:3,hmin:10,wmin:10},required:0},{id:4,data:{type:2},required:0},{id:5,data:{type:12},required:0}],ver:"1.2",eventtrackers:[{event:1,methods:[1,2]}]},cr={no:"NOK",se:"SEK"},ur={no:"no",se:"sv"};class pr{buildFetchObject(e,t,n,i){return P(this,void 0,void 0,function*(){const{pageContext:{countryCode:o},pageOptions:r}=i,{invCode:a,xandrPlacementId:d}=e,s=yield Io(),l=(c=Object.assign(Object.assign({},t),n),Object.entries(c).flatMap(([e,t])=>void 0===t?[]:Array.isArray(t)?t.map(t=>`${e}=${t}`):[`${e}=${t}`]).join(","));var c;const u=new URL(window.location.href),p=(e=>{const{allowedFormats:t}=e;if(!t||t.includes("native"))return{request:JSON.stringify(lr),ver:"1.1"}})(e),v=(e=>{const{sizes:t,allowedFormats:n}=e;if((null==n?void 0:n.includes("banner"))&&t&&0!==t.length)return{format:t.map(([e,t])=>({w:e,h:t})),w:t[0][0],h:t[0][1]}})(e);return{id:O(36),imp:[Object.assign(Object.assign(Object.assign({id:a},p&&{native:p}),v&&{banner:v}),{secure:1,tagid:a,ext:{appnexus:Object.assign(Object.assign({},d&&{placement_id:d}),{code:a,keywords:l,use_pmt_rule:!1})}})],site:{domain:u.hostname,page:u.href,publisher:{id:String(r.publisherId),domain:u.hostname},ext:{amp:0}},device:{dnt:Number((null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)),ua:window.navigator.userAgent,h:screen.height,w:screen.width,language:(navigator.language||ur[o]||"no").split("-")[0]},regs:{ext:{gdpr:s.gdpr||0}},user:{id:yield at(i),ext:{consent:s.gdpr_consent||"",eids:xn(o)}},at:1,cur:[cr[o]],source:{tid:O(36)},ext:{prebid:{bidder:{appnexus:{member:r.member}}}}}})}fetchData(e,t,n,i){return P(this,void 0,void 0,function*(){try{s("Starting fetching Studio ad from Xandr:",Co);const o=new Headers({"Content-Type":"application/json"}),r=new URLSearchParams(window.location.search),a=new URLSearchParams(["openRTBDebugMemberOverride","openRTBNewsroomOverride","openRTBForceNativeDesc2Override"].flatMap(e=>{const t=r.get(e);return t?[[e,t]]:[]})),d=a.size>0?`${Co}?${a.toString()}`:Co,l=yield this.buildFetchObject(e,t,n,i),c=yield ie.post(d,o,l);return s("Fetch operation completed successfully.",c),c}catch(e){s("Error during fetch operation:",e)}return null})}}const vr=0,gr=3,hr=(e,t,n,i)=>{const o=t.parentElement;if(!o)return;const r=e?`-${e}`:"",a=i?`__${i}`:"",d=`advertory${r}-${n}${a}`,s=`advertory${r}-${n}-wrapper${a}`;t.classList.remove(...t.classList),o.classList.remove(...o.classList),t.classList.add(d),o.classList.add(s),t.dataset.adType=n},mr="finn-blink",fr="native-ad",yr=(e,t)=>{wr(e,t),xr(e,t)},wr=(e,t)=>{var n,i;const o=document.querySelector(`#${e.targetId}`);if(!o||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(i=null==t?void 0:t.clickLinkSelector)&&void 0!==i?i:"a.ad-link";(null==o?void 0:o.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const i of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])Cr(i)}),t.dataset.tracked="true")})},br=e=>{var t;const{native:{impressionTrackers:n}={}}=e,i=null==n?void 0:n.some(e=>e.includes("googleads")),o="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;i||!o?null==n||n.forEach(kr):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},xr=(e,t)=>{var n;let i=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:me])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!i)for(const n of t)if(n.isIntersecting){i=!0,br(e),c.disconnect();break}},s);c.observe(o)},kr=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?Cr(e):window.navigator.sendBeacon(e)},Cr=e=>{fetch(e,{method:"GET",mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Ir=e=>e.reduce((e,t)=>{if(!t.serverSidePlacement)return e.clientSidePlacements.push(t),e;const n=Math.random()<.5;return t.keywords=Object.assign(Object.assign({},t.keywords),{"aa-sch-prerenderer":n?"true":"false"}),n?e.serverSidePlacements.push(t):e.clientSidePlacements.push(t),e},{clientSidePlacements:[],serverSidePlacements:[]}),Er=(e,t)=>P(void 0,void 0,void 0,function*(){var n,i;const{pageContext:{deviceType:o},appearanceConfig:r}=t,a=null==r?void 0:r.defaultThreshold[o],d=null!==(n=e.requestThreshold)&&void 0!==n?n:a,l=document.getElementById(e.targetId);if(!l)return void s(`Server-side ad container not found: ${e.targetId}`);yield new Promise(e=>{new IntersectionObserver((t,n)=>{t.some(e=>e.isIntersecting)&&(n.disconnect(),e())},Ki(d)).observe(l)});const{prepareTag:c}=f.getHandlers(),u=Q.getData("alertoryConfigKeywords"),p=null!==(i=c(ho(e)).keywords)&&void 0!==i?i:{},v=new pr,g=yield v.fetchData(e,u,p,t);g&&(((e,t,n)=>{const i=n===ge?t.mobileHTML:t.desktopHTML;if(i){if(t.adType===vr){const n=document.createElement("iframe");n.width=String(t.bid.w),n.height=String(t.bid.h),n.style.overflow="hidden",n.style.border="none",n.srcdoc=`<style>html,body{margin:0;overflow:hidden;}</style>${i}`,e.appendChild(n)}else e.innerHTML=i;e.classList.add("ad-loaded")}})(l,g,o),g.adType===gr&&(hr(t.pageContext.publisher,l,fr,t.pageContext.pageType),yr({targetId:e.targetId,native:{clickTrackers:g.clickTrackers,impressionTrackers:g.impTrackers}},{deviceType:o,appearanceConfig:r,nativeTrackingConfig:t.nativeTrackingConfig,clickLinkSelector:"a"})),((e,t,n,i)=>{var o,r,a;let d;(null===(o=window.apntag.requests)||void 0===o?void 0:o.tags[e])||(null!==(r=(a=window.apntag).requests)&&void 0!==r||(a.requests={tags:{}}),window.apntag.requests.tags[e]={invCode:t,adResponse:{ads:[{creative_id:Number(null==i?void 0:i.adid)}]}}),!!n.querySelector("iframe")||(d=document.createElement("iframe"),n.appendChild(d)),ei(e,n,Number(null==i?void 0:i.adid)),null==d||d.remove()})(e.targetId,e.invCode,l,g.bid))}),Tr=(e,t)=>{e.forEach(e=>Er(e,t).catch(e=>{s("Failed to handle server-side ad:",e)}))},Sr=(e,t,n,i)=>{const o=document.querySelector(`#${e}`);o&&t&&(o.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:o}=t,r=i&&Object.values(Dt).includes(i);n&&r&&hr(i,e,fr,o)})(o,n),i())},Pr=(e,t)=>{var n,i;const o=document.querySelector(`#${e.targetId}`);if(!o||!(null===(n=e.native)||void 0===n?void 0:n.clickTrackers))return;const r=null!==(i=null==t?void 0:t.clickLinkSelector)&&void 0!==i?i:"a.ad-link";(null==o?void 0:o.querySelectorAll(r)).forEach(t=>{"true"!==t.dataset.tracked&&(t.addEventListener("click",()=>{var t,n;for(const i of null!==(n=null===(t=e.native)||void 0===t?void 0:t.clickTrackers)&&void 0!==n?n:[])$r(i)}),t.dataset.tracked="true")})},Ar=e=>{var t;const{native:{impressionTrackers:n}={}}=e,i=null==n?void 0:n.some(e=>e.includes("googleads")),o="function"==typeof(null===(t=window.apntag)||void 0===t?void 0:t.fireImpressionTrackers)&&!!e.tagId;i||!o?null==n||n.forEach(jr):window.apntag.fireImpressionTrackers(e);const r=new CustomEvent("advertory:nativeImpression",{detail:{ad:e}});window.dispatchEvent(r)},Or=(e,t)=>{var n;let i=!1;const o=document.querySelector(`#${e.targetId}`);if(!o||!e.native)return;const{deviceType:r,appearanceConfig:a,nativeTrackingConfig:{fireImpressionsBasedOnAppearanceThreshold:d=!1}={}}=t,s=d?{rootMargin:`${l=null!==(n=null==a?void 0:a.defaultThreshold[null!=r?r:me])&&void 0!==n?n:0}px 0px ${l}px 0px`}:{};var l;const c=new IntersectionObserver(t=>{if(!i)for(const n of t)if(n.isIntersecting){i=!0,Ar(e),c.disconnect();break}},s);c.observe(o)},jr=e=>{const t=e.includes("googleads");"function"!=typeof window.navigator.sendBeacon||t?$r(e):window.navigator.sendBeacon(e)},$r=e=>{ie.get(e,{mode:"no-cors"}).catch(t=>console.warn(`Tracker ${e} failed. Error: ${t||"Unknown"}`))},Lr=(()=>{const e=new Map,t=new Map;return{getTemplate:t=>e.get(t),setTemplate:(t,n)=>{e.set(t,n)},deleteTemplate:t=>{e.delete(t)},getAdjustment:e=>t.get(e),setAdjustment:(e,n)=>{t.set(e,n)},clear:()=>{e.clear(),t.clear()}}})(),_r=(e,t,n)=>{if(!n)return Promise.resolve(null);const i=((e,t,n)=>`${null!=n?n:oe}/${ae}/${e}/adjustments/${t}.json`)(e,n,t),o=Lr.getAdjustment(i);if(o)return o;const r=ie.get(i,{timeout:re}).catch(e=>(s("Failed to fetch native template adjustment",{error:e,url:i}),null));return Lr.setAdjustment(i,r),r},Nr=(e,t,n)=>P(void 0,void 0,void 0,function*(){const i=((e,t)=>`${null!=t?t:oe}/${ae}/${e}/default.json`)(e,n);let o=Lr.getTemplate(i);o||(o=ie.get(i,{timeout:re}).catch(e=>{throw s("Failed to fetch native template",{error:e,url:i}),Lr.deleteTemplate(i),e}),Lr.setTemplate(i,o));const r=_r(e,n,t),[a,d]=yield Promise.all([o,r]);return{schema:a,adjustment:d}}),qr=(e,t)=>{const{adjustmentOverrides:n}=e,i=S(e,["adjustmentOverrides"]);return Object.assign(Object.assign({},i),t.overrides&&{adjustmentOverrides:a({},t.overrides)})},Fr="desktop",Dr="mobile",Mr="container",Br="text",Rr="image",Ur="cogwheel",zr=e=>{if(e)return e===ge?Dr:Fr},Vr=(e,t,n)=>{var i,o,r,a,d,s,l,c,u,p,v,g,h;const m=t?null===(i=e.overrides)||void 0===i?void 0:i[t]:void 0,f=null===(o=null==n?void 0:n.default)||void 0===o?void 0:o[e.id],y=t?null===(r=null==n?void 0:n[t])||void 0===r?void 0:r[e.id]:void 0;if(null!==(s=null!==(d=null!==(a=null==y?void 0:y.hidden)&&void 0!==a?a:null==f?void 0:f.hidden)&&void 0!==d?d:null==m?void 0:m.hidden)&&void 0!==s?s:e.hidden)return null;const w=Object.assign(Object.assign(Object.assign(Object.assign({},e.styles),null==m?void 0:m.styles),null==f?void 0:f.styles),null==y?void 0:y.styles),b=null!==(u=null!==(c=null!==(l=null==y?void 0:y.tag)&&void 0!==l?l:null==f?void 0:f.tag)&&void 0!==c?c:null==m?void 0:m.tag)&&void 0!==u?u:e.tag,x=null!==(g=null!==(v=null!==(p=null==y?void 0:y.text)&&void 0!==p?p:null==f?void 0:f.text)&&void 0!==v?v:null==m?void 0:m.text)&&void 0!==g?g:e.text,k=null===(h=e.children)||void 0===h?void 0:h.map(e=>Vr(e,t,n)).filter(e=>null!==e),C={id:e.id,tag:b,type:e.type,name:e.name,styles:w,connections:e.connections};return void 0!==x&&(C.text=x),void 0!==k&&(C.children=k),C},Hr=e=>Object.entries(e).map(([e,t])=>`${(e=>e.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()))(e)}:${(e=>String(e).replace(/"/g,"&quot;"))(t)}`).join(";"),Wr={microsoftMonetize:{title:"title","body-text":"body",description:"body","sponsored-by":"sponsoredBy","call-to-action":"cta","display-url":"clickUrl","desc-2":"desc2",image:"image",icon:"icon","title-1":"customTitle1","title-2":"customTitle2","title-3":"customTitle3","title-4":"customTitle4","icon-1":"customIcon1","icon-2":"customIcon2","custom-display-url-1":"customDisplayUrl1","custom-body-1":"customBody1","custom-body-2":"customBody2","custom-body-3":"customBody3","custom-body-4":"customBody4","custom-body-5":"customBody5"}},Kr=(e,t)=>{const n=e[t];return null==n?"":"object"==typeof n&&"content"in n?n.content:"object"==typeof n&&"url"in n?n.url:String(n)};class Gr{constructor(e,t=!1){this.tag=e,this.voidElement=t,this.attributes=new Map,this.content=""}attr(e,t){return t&&this.attributes.set(e,t),this}children(e){return this.content=e,this}build(){const e=[...this.attributes].map(([e,t])=>` ${e}="${t}"`).join("");return this.voidElement?`<${this.tag}${e}>`:`<${this.tag}${e}>${this.content}</${this.tag}>`}}const Xr=(e,t,n="")=>{var i;return(null===(i=e.connections)||void 0===i?void 0:i.length)?((e,t)=>{const n=[];for(const i of e){const e=Wr[i.server];if(e)for(const o of i.properties){const i=e[o];if(!i)continue;const r=Kr(t,i);r&&n.push(r)}}return n.join(" ")})(e.connections,t):n},Jr=(e,t,n,i)=>{var o;const{tag:r,styles:a}=e,d=(null!==(o=e.children)&&void 0!==o?o:[]).map(e=>Qr(e,t,n,!1)).join(""),s=new Gr(r);return i(s),s.attr("href","a"===r?Xr(e,t):"").attr("style",Hr(a)).children(d).build()},Yr={[Mr]:(e,t,n,i)=>{var o;const r=null!==(o=n.publisher)&&void 0!==o?o:"shared";return Jr(e,t,n,t=>{i&&t.attr("class",`advertory-${r}-ad-native-${e.name.toLowerCase()}`)})},[Ur]:(e,t,n)=>Jr(e,t,n,e=>{n.containerId&&e.attr("id",`${n.containerId}-button`)}),[Br]:(e,t)=>{var n;return new Gr(e.tag).attr("style",Hr(e.styles)).children(Xr(e,t,null!==(n=e.text)&&void 0!==n?n:"")).build()},[Rr]:(e,t)=>new Gr("img",!0).attr("style",Hr(e.styles)).attr("src",Xr(e,t)).build()},Qr=(e,t,n,i=!0)=>{const o=Yr[e.type];return o?o(e,t,n,i):""},Zr=e=>(t,{publisher:n,containerId:i,deviceType:o})=>(({config:e,nativeData:t,breakpoint:n,adjustments:i,publisher:o,containerId:r})=>{const a=i?qr(e,i):e,d=Vr(a.root,n,a.adjustmentOverrides);return d?Qr(d,t,{breakpoint:n,publisher:o,containerId:r}):null})({config:e,nativeData:t,breakpoint:zr(o),publisher:n,containerId:i}),ea="default",ta=(e,t)=>P(void 0,void 0,void 0,function*(){var n,i,o,r,a;const d=document.querySelector(`#${e.targetId}`);if(!e.native||!d)return;const{desc2:l}=e.native,c=null==l?void 0:l.toLowerCase(),u=((e,t)=>{const n=K(W),i=new URLSearchParams(window.location.search).get(W),o=t.includes("native_recirc");return n&&i?i:(null==e?void 0:e.includes("recirc"))?o?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null})(e.targetId,null!=l?l:ea),p=(null!=u?u:c)||ea,v=null===(n=t.pageContext)||void 0===n?void 0:n.publisher;try{const{schema:n,adjustment:d}=yield Nr(p,v,null===(i=t.editory)||void 0===i?void 0:i.editoryUrl),s=d?qr(n,d):n,l=Zr(s),c={publisher:v,pageType:null===(o=t.pageContext)||void 0===o?void 0:o.pageType,deviceType:null===(r=t.pageContext)||void 0===r?void 0:r.deviceType,appearanceConfig:t.appearanceConfig,nativeTrackingConfig:t.nativeTrackingConfig,containerId:e.targetId,clickLinkSelector:"a"},u=l(e.native,c),{enabled:g=!0}=null!==(a=t.nativeTrackingConfig)&&void 0!==a?a:{};Sr(e.targetId,u,c,()=>{Zn(e.targetId),g&&((e,t)=>{Pr(e,t),Or(e,t)})(e,c)})}catch(e){s("Failed to render native ad from config",{error:e})}}),na="_adchoices_non_rtb",ia=e=>{const{tcf:{nonRtb:{invCodeSuffix:t=na}={}}={}}=f.get();return`${k(e)}${t}`},oa=(e,t)=>t?e:((e=>{e.filter(e=>!e.supportsNonRTB).forEach(e=>X(e.targetId))})(e),(e=>e.filter(e=>e.supportsNonRTB).map(e=>Object.assign(Object.assign({},e),{invCode:ia(e.invCode)})))(e)),ra=e=>`${Math.max(0,Math.round(e))}px`,aa=e=>{const{marginTop:t,marginBottom:n}=getComputedStyle(e);return e.getBoundingClientRect().height+parseFloat(t||"0")+parseFloat(n||"0")},da=(e,t)=>{const n=document.body;if(n)for(const t of Object.keys(e)){const i=e[t];n.style.setProperty(t,i)}},sa=()=>{const{pageSectionsSelectors:e}=f.get();(null==e?void 0:e.header)&&(e=>{const t=document.querySelector(e);if(!t)return;const n=aa(t);da({"--advertory-header-height":ra(n)})})(e.header)};let la,ca=[];const ua=["takeover","wallpaper"],pa=(e,t)=>{var n,i;const{initNativeAd:o}=f.getHandlers();null==o||o(e,null!==(i=null!=t?t:null===(n=window.advertory)||void 0===n?void 0:n.siteConfig)&&void 0!==i?i:f.get())},va=e=>{const t=(e=>{var t;const n=Q.getData("alertoryConfigKeywords"),{queryConfig:i,placements:o,tcf:r,glimr:a,appearanceConfig:d,pageContext:{publisher:s,countryCode:l,pageType:c,deviceType:u,isMobileApp:p=!1},pageOptions:{member:v},pageSetup:g,takeover:m,fullscreenScroll:f,fullWidth:y}=e,w=null!==(t=null==i?void 0:i.batchSize)&&void 0!==t?t:h;return{xandr:{member:v,keywords:n,tags:[]},advertory:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({pageContext:{publisher:s,countryCode:l,pageType:c,deviceType:u,isMobileApp:p},pageSetup:g,placements:o,tcf:r,queryConfig:Object.assign(Object.assign({},i),{batchSize:w})},a&&{glimr:a}),d&&{appearanceConfig:d}),m&&{takeover:m}),f&&{fullscreenScroll:f}),y&&{fullWidth:y})}})(e);window.advertory={initialized:!0,version:"3.10.4",siteConfig:e,alertoryConfig:t,renderNativeAd:pa}},ga=()=>P(void 0,void 0,void 0,function*(){const{pageOptions:e}=f.get(),{preparePageOptions:t}=f.getHandlers(),n=(()=>{var e,t;const{pageSetup:{pageOptions:n}={}}=f.get();return{sandboxAdIframe:null===(t=null===(e=null==n?void 0:n.options)||void 0===e?void 0:e.sandboxAdIframeEnabled)||void 0===t||t,sandboxAttributes:["allow-same-origin","allow-scripts","allow-top-navigation-by-user-activation","allow-popups","allow-popups-to-escape-sandbox","allow-forms"]}})(),i=yield P(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=f.get();return(yield ot(e,t,n,"page-options"))?{}:{userSync:{disabled:!0}}}),o=yield t(Object.assign(Object.assign(Object.assign({disablePsa:!0,enableSafeFrame:!0},e),{renderingManagement:Object.assign({},n)}),i));(e=>{const t=Q.getData("alertoryConfigKeywords");if(Object.keys(t).length)return;const n=wo(e);Q.setData("alertoryConfigKeywords",n)})(o.keywords),j(()=>la.setPageOpts(o))}),ha=e=>P(void 0,void 0,void 0,function*(){const{prebid:t,tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=f.get(),r=yield ot(n,i,o,"loadPlacements"),a=oa(e,r);ma(a);(null==t?void 0:t.enabled)&&r&&!G()?(s("core loadPlacements prebid enabled"),yield ii()):(s("core load tags invoked without prebid enabled"),fa(a))}),ma=e=>{const{prepareTag:t}=f.getHandlers(),n=[];(e=>{const t=["skyscraperright_1","topboard","wallpaper","skyscraperleft_1"];return e.sort((e,n)=>{const i=t.findIndex(t=>e.targetId.includes(t)),o=t.findIndex(e=>n.targetId.includes(e));return-1!==i&&-1===o?-1:-1===i&&-1!==o?1:i-o})})(e).forEach(e=>{s("core defineTags",{placement:e});const i=ho(e);if(mo(e.targetId)){const o=t(i),r=(e=>{const{allowedFormats:t,invCode:n,keywords:i,sizes:o}=e;return{adTypes:t,invCode:n,keywords:yo(i),sizes:o}})(o);n.push(r),j(()=>(s("core defineTag - add to the queue",{placement:e,preparedTag:o}),la.defineTag(o)))}}),(e=>{var t,n,i;(null===(i=null===(n=null===(t=window.advertory)||void 0===t?void 0:t.alertoryConfig)||void 0===n?void 0:n.xandr)||void 0===i?void 0:i.tags)&&e.length&&window.advertory.alertoryConfig.xandr.tags.push(e)})(n)},fa=e=>{const t=e.filter(({targetId:e})=>mo(e)).map(({targetId:e})=>e);t.length&&j(()=>(s("core loadTags",{placementsIdsToLoad:t}),la.loadTags([...t])))},ya=(e,t)=>P(void 0,void 0,void 0,function*(){const{appearanceConfig:n,pageContext:{deviceType:i}}=f.get(),{requestThreshold:o,refresh:r}=e,a=(e=>{const t=document.querySelector(`[data-show-tag-subscribe-id=${e.targetId}]`),n=document.querySelector(`#${e.targetId}`);return t||n})(t),d=null==n?void 0:n.defaultThreshold[i];a&&(s("core showAd - subscribe for show tag with thresholds",{placement:e,adObj:t,requestThreshold:o,deviceDefaultThreshold:d}),yield Wi(a,null!=o?o:d)),a&&(null==r?void 0:r.scroll)&&(s("core showAd - setup refreshing",{placement:e,adObj:t}),a.dataset.refresh=r.scroll.toString())}),wa=e=>e.some(({targetId:e})=>ua.some(t=>e.includes(t))),ba=e=>P(void 0,void 0,void 0,function*(){var t;if(!(null===(t=null===window||void 0===window?void 0:window.advertory)||void 0===t?void 0:t.initialized))return;const[n,i]=(e=>e.reduce(([e,t],n)=>{var i;return(null===(i=null==n?void 0:n.finnBlink)||void 0===i?void 0:i.loadOnlyFinnBlink)?[[...e,n],t]:[e,[...t,n]]},[[],[]]))(e),o=(e=>{const{queryConfig:{placementBatches:t,batchSize:n=h}={},pageContext:{deviceType:i}}=f.get(),o=Te(e),r=Object.keys((null==t?void 0:t[i])||{}).map(e=>o[e]||[]).filter(e=>e.length>0),a=new Set(r.flat().map(({targetId:e})=>e)),d=e.filter(({targetId:e})=>!a.has(e));return[...r,...io(d,n)]})(i);for(const e of o)wa(e)?(s("core loadAds without lazy loading",{placementsToLoad:e}),yield ha(e)):e.length&&(s("core loadAds with lazy loading",{placementsToLoad:e}),yield xa(e));const{finnBlink:r}=f.get();if((null==r?void 0:r.enabled)&&n.length>0){const{handleFinnBlinkOnlyPlacements:e}=yield Promise.resolve().then(function(){return ud});yield e(n)}}),xa=e=>P(void 0,void 0,void 0,function*(){const{queryConfig:{lazyLoadingV3:{enabled:t=!1,rootMargin:n="200% 0px"}={}}={}}=f.get(),i=[];if(!t)return s("lazy load is not enabled",{placements:e}),void(yield ha(e));const o=new IntersectionObserver((t,n)=>{t.filter(({isIntersecting:e,target:{id:t}})=>e&&!t.includes("wallpaper")).forEach(t=>{s("lazy load is enabled - handler start",{loadedTargetIds:i,placements:e});const o=e.every(e=>i.includes(e.targetId)),r=e.map(e=>e.targetId);!o&&i.push(...r),!o&&ha(e),s("lazy load is enabled - handler stop",{loadedTargetIds:i,placements:e,arePlacementsLoaded:o,targetIds:r}),n.disconnect()})},{rootMargin:n});e.forEach(e=>{const t=document.getElementById(e.targetId);t&&(s("lazy loading - observe element",{targetId:e.targetId,element:t}),o.observe(t))})}),ka=()=>P(void 0,void 0,void 0,function*(){const{siteEvents:e,initNativeAd:t}=f.getHandlers(),n=[];j(()=>{la.onEvent("adRequested",()=>{e.adRequested()}),la.onEvent("adAvailable",n=>P(void 0,void 0,void 0,function*(){var i,o,r,a,d,l;s("core adAvailable start",{placementsAvailable:ca,adObj:n,isFullscreenScrollAd:De(n),isFinnBlink:We(n.targetId),isNativeAd:Me(n),isMediation:fo(n),isTakeoverAd:Re(n),isCollapseAd:Ve(n),isWallpaperAd:ze(n)});const c=null===(r=null===(o=null===(i=null===window||void 0===window?void 0:window.apntag)||void 0===i?void 0:i.requests)||void 0===o?void 0:o.tags[n.targetId])||void 0===r?void 0:r.adResponse.ads;if(fo(n)&&c&&(null===(a=c[1])||void 0===a?void 0:a.rtb)&&(n.banner=null===(l=null===(d=c[1])||void 0===d?void 0:d.rtb)||void 0===l?void 0:l.banner),De(n)){const{modifyFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Qn});e(n)}const{widescreenSwitching:u,wallpaper:p,fullscreenScroll:v}=f.get();if(Xe(n)&&(null==u?void 0:u.enabled)){const{initWidescreenSwitching:e}=yield Promise.resolve().then(function(){return hd});e()}if(De(n)&&!We(n.targetId)){s("core adAvailable: creating fullscreen scroll container",{targetId:n.targetId,width:n.width,height:n.height,bannerWidth:n.banner&&"object"==typeof n.banner?n.banner.width:n.banner,bannerHeight:n.banner&&"object"==typeof n.banner?n.banner.height:void 0});const{createFullscreenScrollAd:e}=yield Promise.resolve().then(function(){return Qn});e(n,v)}if(!Me(n)||fo(n)||We(n.targetId)||null==t||t(n,f.get()),Re(n)&&!Ve(n)){const{modifyTakeoverAdContent:e,createTakeoverAd:t}=yield Promise.resolve().then(function(){return Nd});e(n.targetId),yield t(n)}if(ze(n)&&(null==p?void 0:p.enabled)){const{initWallpaperAd:e}=yield Promise.resolve().then(function(){return z});e(()=>j(()=>window.apntag.showTag(n.targetId)),p),Q.setData("wallpaper",{isAvailable:!0})}(e=>e.targetId.includes("skyscraperleft")&&!!e.banner)(n)&&Q.setData("horseshoe",{isAvailable:!0}),e.adAvailable(n);const g=ca.find(({targetId:e})=>e===n.targetId);g&&(yield ya(g,n),ca=ca.filter(e=>e.targetId!==g.targetId)),s("core adAvailable stop",{placementsAvailable:ca,adObj:n,isFullscreenScrollAd:De(n),isFinnBlink:We(n.targetId),isNativeAd:Me(n),isMediation:fo(n),isTakeoverAd:Re(n),isCollapseAd:Ve(n),isWallpaperAd:ze(n)})})),la.onEvent("adLoaded",i=>P(void 0,void 0,void 0,function*(){const{refreshConfig:o,appearanceConfig:r,wallpaper:a,adScaleConfig:d}=f.get(),s=document.getElementById(i.targetId);if(We(i.targetId)){const{displaySpecialFormatsForFinnFallback:e}=yield Promise.resolve().then(function(){return od});e(i)}if(n.includes(i.targetId)&&Me(i)&&(null==t||t(i,f.get()),At({adObj:i})),!n.includes(i.targetId)&&fo(i)&&n.push(i.targetId),Ve(i)&&X(i.targetId),Re(i)){const{modifyTakeoverIframe:e}=yield Promise.resolve().then(function(){return Nd});e(la,i.targetId)}if((e=>Qe(e,Ae))(i)){const{applyNinesixteenFormat:e}=yield Promise.resolve().then(function(){return Md});e(i)}if((e=>Qe(e,je))(i)){const{applyFullsquareFormat:e}=yield Promise.resolve().then(function(){return Md});e(i)}if(Be(i)){const{applyFullwidthFormat:e}=yield Promise.resolve().then(function(){return Md});e(i)}((e,t)=>{if(!(null==t?void 0:t.scrollRefreshEnabled))return;const{targetId:n}=e,i=document.querySelector(`#${n}`),o=null==i?void 0:i.parentElement;if(!o||!i)return;eo({adWrapper:o,placementContainer:i});const{delayTimeToNextRefresh:r=1e3}=t,a=(new Date).getTime();i&&"true"!==i.dataset.subscribedForRefresh&&(i.dataset.subscribedForRefresh="true",i.dataset.refresh&&no(i,a,r))})(i,o),(null==r?void 0:r.clearProbableDimensionsEnabled)&&Z(i.targetId);if(Q.getData("horseshoe").isAvailable&&(null==a?void 0:a.enabled)){const{adjustAdToHorseshoe:e}=yield Promise.resolve().then(function(){return z});e(i.targetId)}if(null==d?void 0:d.enabled){const{scaleAds:e,scaleAdIpadAirPortrait:t}=yield Promise.resolve().then(function(){return qt});e(i),t(i)}e.adLoaded(i),Zn(i.targetId),s&&(s.classList.add(ti),(e=>{var t,n;const{pageSectionsSelectors:i}=f.get(),o=null==i?void 0:i.mainFirstColumn,r=o?null===(t=document.querySelector(o))||void 0===t?void 0:t.clientWidth:void 0;r&&e.clientWidth>r&&(null===(n=e.parentElement)||void 0===n||n.setAttribute("data-two-column-ad-layout","true"))})(s)),At({adObj:i}),(e=>{var t;const n=null==e?void 0:e.targetId;if(!n)return;const i=null===(t=document.querySelector(`#${n}`))||void 0===t?void 0:t.parentElement;i&&((e,t)=>{const{height:n,width:i,native:o}=e;o?t.dataset.adSizes="[1,1]":n&&i&&(t.dataset.adSizes=`[${i},${n}]`)})(e,i)})(i),window.dispatchEvent(new CustomEvent("advertory:adLoaded",{detail:{targetId:i.targetId,adFormat:Ot(i)}}))})),la.onEvent("adNoBid",t=>P(void 0,void 0,void 0,function*(){var n;if(X(t.targetId),null===(n=f.get().drEdition)||void 0===n?void 0:n.enabled){const{handleDrEditionBackfill:e}=yield Promise.resolve().then(function(){return _i});yield e(f.get(),t)}if(Re(t)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return St});yield e(t)}e.adNoBid(t)})),la.onEvent("adError",(t,n)=>P(void 0,void 0,void 0,function*(){if(Re(n)){const{handleTakeoverCookieOnAdNotShown:e}=yield Promise.resolve().then(function(){return St});yield e(n)}e.adError(t,n)})),la.onEvent("adCollapse",()=>{e.adCollapse()}),la.onEvent("adRequestFailure",t=>P(void 0,void 0,void 0,function*(){X(t.targetId),yield $i(f.get(),t),e.adRequestFailure(t)})),la.onEvent("adBadRequest",t=>P(void 0,void 0,void 0,function*(){X(t.targetId),yield $i(f.get(),t),e.adBadRequest(t)})),la.onEvent("adLoadedMediated",t=>e.adLoadedMediated(t)),la.onEvent("adNoBidMediated",t=>P(void 0,void 0,void 0,function*(){yield $i(f.get(),t),e.adNoBidMediated(t)}))})}),Ca=(e,t)=>P(void 0,void 0,void 0,function*(){var n,i;if(!(null===(n=null===window||void 0===window?void 0:window.advertory)||void 0===n?void 0:n.initialized))return[];const{clearAds:o,reloadExistingAds:r,renderFinnBlinkPlacements:a,contextSelector:d}=null!=t?t:{},s=Object.keys(null!=e?e:{}).length>0;let l=[];if(o&&(l=null!==(i=pe())&&void 0!==i?i:[]),o&&!s)return[];o&&s&&(ca=[],Q.setData("wallpaper",{isAvailable:!1}),Q.setData("horseshoe",{isAvailable:!1})),r&&(pe(),document.querySelectorAll('[data-advertory-ad-rendered="true"]').forEach(e=>{J(e.id)})),yield ve(e),yield ga();const{clientSidePlacements:c,serverSidePlacements:u}=Ir(Ie(d)),p=[...c,...u];((e,t)=>{if(0===e.length)return;const n=new Set(t.map(({targetId:e})=>T(e)));e.filter(e=>n.has(e)).forEach(e=>J(e))})(l,p),((e,t)=>{if(0===e.length)return;const n=new Set(t.map(({targetId:e})=>T(e)));e.filter(e=>!n.has(e)).forEach(e=>Z(e))})(l,p);let v=c;return a&&(v=v.filter(e=>We(e.targetId))),Tr(u,f.get()),v.length>0&&(ca=[...ca,...v.map(e=>Object.assign({},e))],ao(v),lo(v),yield ba(v)),ca}),Ia=(e,t)=>P(void 0,void 0,void 0,function*(){var n;f.set(e),f.setHandlers(Object.assign(Object.assign({},t),e.customHandlers));const{norstat:i,kilkaya:o,rightColumnSplit:r,drEdition:a,finnBlink:d}=e;if(Q.initialize(),window.addEventListener("message",Vi,!1),la=window.apntag||{anq:[],defineTag:e=>({targetId:""}),showTag:e=>{},onEvent:(e,t,n)=>{},offEvent:(e,t)=>{},refresh:e=>{},modifyTag:(e,t)=>{},loadTags:e=>{},emitEvent:(e,t)=>{},setPageOpts:e=>{},resizeAd:(e,t,n)=>{},getAstVersion:()=>"",setEndpoint:(e,t)=>{},fireImpressionTrackers:e=>{},setKeywords:()=>{},clearRequest:()=>{}},window.apntag=la,s("Apn tag is set up on window"),yield Promise.allSettled([P(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=f.get();(yield ot(e,t,n,"xandr-endpoint"))||la.setEndpoint("ib.adnxs-simple.com",!0)}),P(void 0,void 0,void 0,function*(){if(G())return;const{prebid:e,tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=f.get(),o=yield ot(t,n,i,"prebid");(null==e?void 0:e.enabled)&&o&&(yield Cn(null==e?void 0:e.prebidUrl))}),fn(e),P(void 0,void 0,void 0,function*(){const{developerOptions:{astUrl:e}={}}=f.get();yield Cn(null!=e?e:"https://adsdk.microsoft.com/ast/ast.js")}),P(void 0,void 0,void 0,function*(){const{developerOptions:{gptUrl:e}={},tcf:t,pageContext:{isMobileApp:n,countryCode:i}}=f.get();(yield ot(t,n,i,"gpt-endpoint"))&&(yield Cn(null!=e?e:"https://securepubads.g.doubleclick.net/tag/js/gpt.js"))}),P(void 0,void 0,void 0,function*(){const{brandmetrics:{enabled:e,brandmetricsUrl:t}={},tcf:n,pageContext:{isMobileApp:i,countryCode:o}}=f.get(),{getConsentAsync:r}=it(n,0,o),a=yield r();if(e&&t&&a){if(yield Cn(t),document.querySelector(`.${ko}`))return window._brandmetrics=window._brandmetrics||[],void window._brandmetrics.push({cmd:"_loadsurvey"});new MutationObserver((e,t)=>{for(const n of e){if("childList"!==n.type)return;Array.from(n.addedNodes).some(e=>{var t;return null===(t=e.outerHTML)||void 0===t?void 0:t.includes(ko)})&&(t.disconnect(),window._brandmetrics=window._brandmetrics||[],window._brandmetrics.push({cmd:"_loadsurvey"}))}}).observe(document,{childList:!0,subtree:!0,attributes:!0})}}),Wt(),P(void 0,void 0,void 0,function*(){const{gdpr:{gdprUrl:e,allowHidingAds:t=!0}={}}=f.get();t&&(window.gdpr=window.gdpr||{},window.gdpr.allowHidingAds=!0),yield Cn(null!=e?e:"https://cogwheel.inventory.schibsted.io/prod/latest/gdpr-bundle.js")})]),null==i?void 0:i.enabled){const{loadNorstat:e}=yield Promise.resolve().then(function(){return Rd});yield e()}s("Libraries have been loaded and trackers have been set"),sa(),yield ka(),yield ga(),s("Page options have been set"),va(e),s("Advertory is setup on window");const{clientSidePlacements:l,serverSidePlacements:c}=Ir(Ie());if(ca=l,Tr(c,e),ao(ca),lo(ca),yield ba(ca),s("Ads has been loaded",ca),Li(e,ca),bo(ca),null==d?void 0:d.enabled){const{replaceAdsWithFinnBlink:t}=yield Promise.resolve().then(function(){return ud});yield t(null===(n=null==e?void 0:e.pageContext)||void 0===n?void 0:n.deviceType,e.finnBlink)}if(null==a?void 0:a.enabled){const{handleDrEdition:t}=yield Promise.resolve().then(function(){return _i});yield t(e)}if(null==r?void 0:r.enabled){const{initRightColumnSplit:t}=yield Promise.resolve().then(function(){return Gd});t(e.rightColumnSplit)}if(null==o?void 0:o.enabled){const{runKilkaya:t}=yield Promise.resolve().then(function(){return ms});yield t(e)}}),Ea=(e,t)=>P(void 0,void 0,void 0,function*(){s(`Received configuration passed to Advertory: ${JSON.stringify(e)}`),yield((e,t)=>P(void 0,void 0,void 0,function*(){var n,i;const{initConsentManager:o,getConsentAsync:r}=it(e.tcf,null===(n=e.pageContext)||void 0===n||n.isMobileApp,null===(i=e.pageContext)||void 0===i?void 0:i.countryCode),a=yield le(e);yield Ai(),yield xo(o),yield xo(r),s("TCF resolved successfully"),yield Ia(a,t),s("Run function resolved successfully")}))(e,t)}),Ta=["sponsor","seamless"],Sa=(e,t,n,i)=>{var o;const{image:r,icon:a,sponsoredBy:d,title:s,clickUrl:l,cta:c,body:u,desc2:p,video:v,description:g,customTitle1:h,customTitle2:m,customTitle3:f,customTitle4:y,customBody1:w,customBody2:b,customBody3:x,customBody4:k,customBody5:C,customIcon1:I,customIcon2:E,customDisplayUrl1:T}=e,S=(e,t="")=>{var n;return e?null!==(n=e.url)&&void 0!==n?n:e:t};return Object.assign({containerId:n,img:S(r),imgWidth:null==r?void 0:r.width,imgHeight:null==r?void 0:r.height,imgAltText:null!=s?s:"",logo:(()=>{var e;const t=Ta.some(e=>null==p?void 0:p.includes(e))&&"dark"===(null===(e=i.appearanceConfig)||void 0===e?void 0:e.theme)&&I;return S(t?I:a)})(),sponsoredBy:null!=d?d:"",title:null!=s?s:"",url:null!=l?l:"",cta:null!=c?c:"",description:null!==(o=null!=u?u:g)&&void 0!==o?o:"",desc2:null!=p?p:"",video:v,customTitle1:null!=h?h:"",customTitle2:null!=m?m:"",customTitle3:null!=f?f:"",customTitle4:null!=y?y:"",customBody1:null!=w?w:"",customBody2:null!=b?b:"",customBody3:null!=x?x:"",customBody4:null!=k?k:"",customBody5:null!=C?C:"",logo2:S(E),previewVideoSrc:null!=T?T:""},t)},Pa=(e,t)=>{const n=K(W),i=new URLSearchParams(window.location.search).get(W),o=t.includes("native_recirc");return n&&i?i:(null==e?void 0:e.includes("recirc"))?o?"native_recirc":"recirc":(null==e?void 0:e.includes("sponsor"))?"sponsorstripe":null},Aa=(e,t,n,i)=>{const o=document.querySelector(`#${e}`);o&&t&&(o.innerHTML=t,((e,t)=>{const n=e.parentElement,{publisher:i,pageType:o}=t,r=i&&Object.values(Dt).includes(i);n&&r&&hr(i,e,fr,o)})(o,n),i())},Oa=(e,t,n)=>{const i=((e,t,n)=>{var i;const{displayTemplates:o,videoTemplates:r}=n,a="default";if(!e.native)return null;const{native:d,targetId:s}=e,{desc2:l=a}=e.native,c=l.toLowerCase(),u=null!==(i=Pa(e.targetId,l))&&void 0!==i?i:c,p=Hn[t.language||w.NO],v=Sa(d,p,s,t);return(d.video?r[u]:o[u]||o.default)(v,t)})(e,t,n);Aa(e.targetId,i,t,()=>{const{nativeTrackingConfig:{enabled:n=!0}={}}=t;n&&yr(e,t)})},ja=e=>(t,n)=>{var i;const{targetId:o}=t,r=document.querySelector(`#${o}`);if(!r)return;const a=e.getOptions(null!=n?n:{});Oa(t,a,e.templates),null===(i=e.postProcess)||void 0===i||i.call(e,t,r)},$a=()=>{if(!window.location.search.includes("kv_"))return{};const e={},t=(()=>{const e=new URLSearchParams(window.location.search);return Object.fromEntries(e)})();return Object.keys(t).forEach(n=>{n.startsWith("kv_")&&(e[n.slice(3)]=t[n])}),e},La=e=>{const{siteSpecificConfig:t}=f.get(),n=(null==t?void 0:t.dynamicOutstreamFormats)||[];return 0!==n.length&&n.some(t=>e.includes(t))};class _a{constructor(){this.keywords={}}add(e){return Object.assign(this.keywords,e),this}addAsync(e){return P(this,void 0,void 0,function*(){return Object.assign(this.keywords,yield e),this})}addIf(e,t){return e&&Object.assign(this.keywords,t),this}addIfAsync(e,t){return P(this,void 0,void 0,function*(){return e&&Object.assign(this.keywords,yield t()),this})}build(){return this.keywords}}const Na=9826;class qa{constructor(){this.getSupplyTypeKeywords=()=>{const{pageContext:{deviceType:e,isMobileApp:t}}=f.get();if(t){return{"aa-sch-supply_type":`app_${e===ge?"phone":he}`}}return{"aa-sch-supply_type":`web_${this.getPageOptionsFormatDevice(e)}`}}}prepare(e){return P(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{keywords:Object.assign(Object.assign(Object.assign(Object.assign({},e.keywords),this.getSupplyTypeKeywords()),yield this.getFormattedExternalIdKeywords()),this.getHasContextKeywords(e.keywords)),user:{externalUid:yield this.getExternalUid(),dnt:yield this.isTrackingForbidden()}})})}getFormattedExternalIdKeywords(){return P(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return{"aa-sch-externalid_src":Number(!!e)+Number(!!t)}})}getUserId(){return(()=>{const e=rt("_pulse2data");return e?e.split(",")[2]:void 0})()}getExternalUid(){return P(this,void 0,void 0,function*(){return yield at(f.get())})}isTrackingForbidden(){return P(this,void 0,void 0,function*(){return(null===navigator||void 0===navigator?void 0:navigator.globalPrivacyControl)||"1"===(null===navigator||void 0===navigator?void 0:navigator.doNotTrack)||"DO_NOT_TRACK"===(yield this.getExternalUid())})}getMember(){const{pageOptions:{member:e},developerOptions:{testMember:t=Na}={}}=f.get();return"true"===V("inventory_test")?t:e}getCMPValue(e){return localStorage.getItem(`CMP:${e}`)?"0"===localStorage.getItem(`CMP:${e}`)?"0":"1":"0"}getPublisherKeywords(){const{pageContext:{publisher:e}}=f.get();return{"aa-sch-publisher":`${e}`}}getAnalyticsConsentKeywords(){return{"aa-sch-cmp_analytics":this.getCMPValue("analytics")}}getAdvertisingConsentKeywords(){return P(this,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=f.get(),{getConsentAsync:i}=it(e,0,n);return{"aa-sch-cmp_advertising":(yield i())?"1":"0"}})}getPageTypeKeywords(){const{pageContext:{pageType:e}}=f.get();return{"aa-sch-page_type":e}}getCountryCodeKeywords(e){return{"aa-sch-country_code":e}}getInventoryTypeKeywords(){return{"aa-sch-inventory_type":"editorial"}}getHasContextKeywords(e){const t=e["aa-sch-context_keyword"];return{"aa-sch-has_context_keyword":Array.isArray(t)&&t.length?1:0}}getPageOptionsFormatDevice(e="desktop"){return"mobile"===e?"phone":e}}const Fa=new qa;function Da(e=!1){var t,n;const i=null===(n=null===(t=window.navigator)||void 0===t?void 0:t.userAgent)||void 0===n?void 0:n.toLocaleLowerCase(),o=jt();return{OS:o,mobileOS:["ios","android"].includes(o)?o:"unknown",isHybridApp:i.includes("hermes"),appMode:e?"hybrid":"notinapp"}}Fa.prepare.bind(Fa);const Ma=["aLOLE","xBqQj","1KaqJ","1nzXzK","opm8zV","4qKXKR","Ad9QgE"];function Ba(e){return t=window.location.pathname.split("/").slice(-2,-1).pop()||"",Ma.includes(t)?{"no-sno-news-section":`${e}_doedsfall`}:{};var t}class Ra extends qa{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=f.get();return{"no-sno-device":this.getPageOptionsFormatDevice(e)}}}getAppTypeKeywords(){const{pageContext:{deviceType:e,isMobileApp:t}}=f.get(),{OS:n,isHybridApp:i}=Da(t);return{"no-sno-apptype":n&&e&&i?`${n}_${this.getPageOptionsFormatDevice()}_hybrid`:"none"}}getObituariesKeywords(e){return Ba(e)}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=f.get(),o=null!==(t=null===(e=n.keywords["no-sno-news-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan";return{"no-sno-section-page_type":`${o.split("_").pop()||o}_${"article"===i?"article":"front"}`}}}const Ua=new class extends Ra{prepare(e){return P(this,void 0,void 0,function*(){var t,n,i,o,r,a,d;const s=f.get(),l=null!==(i=null===(n=null===(t=s.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},c=null!==(a=null===(r=null===(o=s.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},u=null===(d=s.siteSpecificConfig)||void 0===d?void 0:d.publisherClassName,p=new _a;yield p.addAsync(this.getAdvertisingConsentKeywords()),yield p.addAsync(Qt(s,l.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield p.addIfAsync(c.externalIdSrc,()=>this.getFormattedExternalIdKeywords()),p.add(this.getSupplyTypeKeywords()).add(wn()).addIf(c.appType,this.getAppTypeKeywords()).addIf(c.device,this.getDeviceKeywords()).addIf(c.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(c.sectionPageType,this.getSectionPageTypeKeywords()).addIf(c.hasContext,this.getHasContextKeywords(e.keywords)).add(e.keywords).addIf(c.obituaries&&void 0!==u,void 0!==u?this.getObituariesKeywords(u):{});const v=p.build(),g=!1!==l.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:v,user:Object.assign(Object.assign({},yn(w.NO)),g?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},za=Ua.prepare.bind(Ua);class Va extends qa{constructor(){super(...arguments),this.getDeviceKeywords=()=>{const{pageContext:{deviceType:e}}=f.get();return{"se-generic-sitemode":this.getPageOptionsFormatDevice(e)}}}getScreenKeywords(){const e=function(){const e=window.innerWidth,t=window.innerHeight,n=document.documentElement.clientWidth,i=document.documentElement.clientHeight;return{width:e||n||0,height:t||i||0}}(),t={width:null!==(i=null===(n=window.screen)||void 0===n?void 0:n.width)&&void 0!==i?i:0,height:null!==(r=null===(o=window.screen)||void 0===o?void 0:o.height)&&void 0!==r?r:0};var n,i,o,r;return{"se-generic-viewportheight":e.height,"se-generic-viewportwidth":e.width,"se-generic-screenheight":t.height,"se-generic-screenwidth":t.width}}getExternalIdSrc(){return P(this,void 0,void 0,function*(){const e=yield this.getExternalUid(),t=this.getUserId();return e?{"se-generic-externalid_src":Number(!!e)+Number(!!t)}:{"se-generic-externalid_src":0}})}getAppTypeKeywords(){const{pageContext:{isMobileApp:e}}=f.get(),{appMode:t,mobileOS:n}=Da(e);return{"se-generic-appmode":t,"se-generic-mobileos":n}}getPublisherGroup(){return{"se-generic-publishergroup":"schibsted"}}getSectionPageTypeKeywords(){var e,t;const{pageOptions:n,pageContext:{pageType:i}}=f.get();return{"se-generic-section-page_type":`${null!==(t=null===(e=n.keywords["se-generic-section"])||void 0===e?void 0:e.toString())&&void 0!==t?t:"ettan"}_${"article"===i?"article":"front"}`}}}const Ha=new class extends Va{prepare(e){return P(this,void 0,void 0,function*(){var t,n,i,o,r,a;const d=f.get(),s=null!==(i=null===(n=null===(t=d.pageSetup)||void 0===t?void 0:t.pageOptions)||void 0===n?void 0:n.options)&&void 0!==i?i:{},l=null!==(a=null===(r=null===(o=d.pageSetup)||void 0===o?void 0:o.pageOptions)||void 0===r?void 0:r.keywords)&&void 0!==a?a:{},c=new _a;yield c.addAsync(this.getAdvertisingConsentKeywords()),yield c.addAsync(Qt(d,s.addPublisherToGeo?{addPublisherToGeo:!0}:void 0)),yield c.addIfAsync(l.externalIdSrc,()=>this.getExternalIdSrc()),yield c.addIfAsync(l.sdkVersion,()=>P(void 0,void 0,void 0,function*(){return{"se-generic-sdk-version":"function"==typeof window.apntag.getAstVersion?window.apntag.getAstVersion():""}})),c.add(this.getSupplyTypeKeywords()).add(wn()).addIf(l.appType,this.getAppTypeKeywords()).addIf(l.device,this.getDeviceKeywords()).addIf(l.screen,this.getScreenKeywords()).addIf(l.analyticsConsent,this.getAnalyticsConsentKeywords()).addIf(l.sectionPageType,this.getSectionPageTypeKeywords()).addIf(l.hasContext,this.getHasContextKeywords(e.keywords)).addIf(l.hasPlusMembership,{"se-generic-has_plus":"plus"===rt("X-AB-Site-Version")?"yes":"no"}).add(e.keywords);const u=c.build(),p=!1!==s.includeExternalUid;return Object.assign(Object.assign({},e),{keywords:u,user:Object.assign(Object.assign({},yn(w.SE)),p?{externalUid:yield this.getExternalUid()}:{}),member:this.getMember()})})}},Wa=Ha.prepare.bind(Ha);zn('@import"https://fonts.googleapis.com/css?family=Roboto:400,500&display=swap";.advertory-shared-ad-native-content-display-basic{width:100%;font-family:Roboto,sans-serif;color:#6d747e;text-align:left;background:#fff;position:relative;margin:0 auto;display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic *{line-height:normal}.advertory-shared-ad-native-content-display-basic .ad-info{top:0;right:8px;position:absolute}.advertory-shared-ad-native-content-display-basic .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic .ad-link{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-link:hover{text-decoration:none}.advertory-shared-ad-native-content-display-basic .ad-header{padding:5px 16px;background-color:#ffcd00;font-size:12px;text-transform:uppercase;color:#495057;font-weight:600}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper{display:flex;flex-direction:column}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{position:relative;padding-bottom:40%}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container{display:none}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper{position:absolute;height:100%;width:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-large-image-container .ad-large-image-wrapper .ad-large-image{object-fit:cover;min-width:100%;height:100%}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content{box-sizing:border-box;display:flex;background-color:#fffae6}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container{flex-grow:1;padding:16px}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:20px;color:#212529;font-weight:600;margin-bottom:16px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:22px}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-text-container .ad-sponsor{font-size:11px;color:gray;font-weight:600;text-transform:uppercase}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:none;max-width:175px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container{display:block}}.advertory-shared-ad-native-content-display-basic .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover;max-width:100%}.advertory-shared-ad-native-content-display-basic.article .ad-info{top:0;right:0;position:absolute;border-bottom-left-radius:50%;background:hsla(0,0%,100%,.6)}.advertory-shared-ad-native-content-display-basic.article .ad-info>div{position:initial !important}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{display:block}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container{padding:8px 16px;border-left:4px solid #ffcd00}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{display:flex;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper{margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-header-wrapper .ad-header{padding:2px 4px;font-size:11px}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:15px;margin-bottom:8px}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-text-container .ad-title{font-size:18px;margin-bottom:16px}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:16px 8px 16px 0}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container{padding:0}}.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:contain}@media screen and (min-width: 768px){.advertory-shared-ad-native-content-display-basic.article .ad-content-wrapper .ad-content .ad-small-image-container .ad-small-image{object-fit:cover}}');zn('.advertory-abo-ad-native-sponsorstripe{position:absolute;top:0;left:0;width:100%;height:1px;background:inherit;padding:0;margin:0;border:none;text-align:left}.advertory-abo-ad-native-sponsorstripe .ad-wrapper{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;max-width:980px;height:30px;padding:5px 15px;margin:auto;font-family:"Helvetica Neue",Arial,Roboto,sans-serif}.advertory-abo-ad-native-sponsorstripe .ad-logo{flex:0;height:20px;max-width:35%;max-height:inherit}.advertory-abo-ad-native-sponsorstripe .ad-title{margin-right:10px;padding-left:34px;font-size:13px;color:#fff}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper{display:grid;position:absolute;place-content:center;height:30px;min-width:30px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{display:inline-block;height:20px;width:20px;position:relative;border:solid 1px #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{content:"i";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:13px}.advertory-abo-ad-native-sponsorstripe .ad-description{font-size:13px;color:#fff;position:absolute;top:0;max-width:980px;min-height:30px;padding:15px 35px 15px 15px;margin-left:-15px;background-color:rgba(0,0,0,.9)}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper{position:absolute;top:15px;right:15px;place-content:center;height:16px;min-width:16px}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button{display:inline-block;height:16px;width:16px;position:relative;border:1px solid #fff;border-radius:50%;cursor:pointer}.advertory-abo-ad-native-sponsorstripe .ad-description .close-button-wrapper .close-button:before{content:"✕";color:#fff;position:absolute;left:50%;top:50%;transform:translate(-50%, -50%);font-size:10px;font-weight:bold}.advertory-abo-ad-native-sponsorstripe .ad-description .ad-description-readmore{color:#c7ecff}.advertory-abo-ad-native-sponsorstripe .ad-description.hide{display:none}@media screen and (min-width: 768px){.advertory-abo-ad-native-sponsorstripe .ad-wrapper{height:50px}.advertory-abo-ad-native-sponsorstripe .ad-wrapper .ad-description{min-height:50px}.advertory-abo-ad-native-sponsorstripe .ad-logo{height:40px}.advertory-abo-ad-native-sponsorstripe .ad-title{font-size:20px;padding-left:40px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button{height:30px;width:30px;border-width:2px}.advertory-abo-ad-native-sponsorstripe .info-button-wrapper .info-button:before{font-size:20px}}');const Ka={displayTemplates:{default:{NATIVE_TEMPLATE:({containerId:e,url:t,sponsoredBy:n,title:i,img:o,adText:r})=>(Promise.resolve().then(function(){return ys}),`<article class="advertory-no-ad-native-default">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_self">\n <div class="ad-content">\n <div class="ad-image-container">\n <img alt="${i}" class="ad-image" src="${o}" />\n </div>\n <div class="ad-text-container">\n <div class="ad-sponsor">\n <span class="ad-label">${r}</span> ${n}\n </div>\n <div class="ad-title">${i}</div>\n </div>\n </div>\n </a>\n </article>`)}.NATIVE_TEMPLATE,seamless:{NATIVE_SEAMLESS:({containerId:e,url:t,adText:n,img:i,cta:o,description:r,logo:a,sponsoredBy:d,title:s})=>(Promise.resolve().then(function(){return fs}),`<article class="advertory-shared-ad-native-seamless">\n <div class="ad-info" id="${e}-button"></div>\n <a class="ad-link" href="${t}" target="_blank">\n <div class="ad-content">\n <div class="ad-header">\n ${a&&`<img alt="${d}" class="ad-logo" src="${a}" loading="lazy" />`}\n <div class="ad-annons">${n}</div>\n </div>\n <div class="ad-image-container">\n <img alt="${s}" class="ad-image" src="${i}" loading="lazy">\n </div>\n <div class="ad-footer">\n <div class="ad-row">\n <div class="ad-text-wrapper">\n <div class="ad-description">${r}</div>\n <h2 class="ad-headline">${s}</h2>\n </div>\n <div class="ad-action">${o}</div>\n </div>\n </div>\n </div>\n </a>\n </article>`)}.NATIVE_SEAMLESS},videoTemplates:{}},Ga={prepareTag:e=>{var t;const{keywords:n,targetId:i,invCode:o,dynamicSizeWidthCheck:r,globalPlacementId:a}=e,{pageSetup:d,pageContext:{countryCode:s}}=f.get(),{tag:{useAppTabletInvCode:l=!0}={}}=null!=d?d:{},c=((e,t)=>{const{pageContext:{isMobileApp:n}}=f.get();return n?((e,t)=>e.replace(/wtb|wde|wph/g,e=>"wph"===e?"aph":t?"atb":e))(e,t):e})(o,l),u=(e=>{const{pageContext:{countryCode:t}}=f.get(),{keywords:n,dynamicSizeWidthCheck:i}=e,o=`${b(t)}-adformat`,r=n?n[o]:[];if(!r)return{};const a=(Array.isArray(r)?r:[r]).filter(e=>!(e in Fe)||window.innerWidth>=Fe[e]);return{[o]:i?a:r}})(e),p=(e=>{const{pageContext:{countryCode:t}}=f.get(),n=`${b(t)}-targetid`;return e?{[n]:[e]}:{}})(i),v=(e=>{var t;const[,n]=null!==(t=e.match(/-((w|a)(?:ph|de|tb))-/))&&void 0!==t?t:[];switch(n){case"wde":return{"aa-sch-supply_type":"web_desktop"};case"wtb":return{"aa-sch-supply_type":"web_tablet"};case"wph":return{"aa-sch-supply_type":"web_phone"};case"aph":return{"aa-sch-supply_type":"app_phone"};default:return}})(c),g=$a(),h=(e=>La(e)?{"aa-sch-dynamic-outstream":["true"]}:{})(o),m=((e,t)=>La(e)?Object.assign(Object.assign({},t),{playerSkin:{videoBackgroundColor:"#e6e7e8"}}):{})(o,{safeFrameAutoInitialSize:!0}),y=r&&e.sizes.length>0?e.sizes.filter(([e])=>e<=window.innerWidth):e.sizes,w=(new _a).add(null!=n?n:{}).add(u).add(p).add(null!=v?v:{}).add(h).add(g).addIf(null===(t=null==d?void 0:d.tag)||void 0===t?void 0:t.reloadKeywords,{[`${b(s)}-adreload`]:"0"}).build();return Object.assign(Object.assign({},e),{sizes:y,invCode:c,keywords:w,rendererOptions:m,globalPlacementId:a||c})},preparePageOptions:e=>P(void 0,void 0,void 0,function*(){const{pageContext:{countryCode:t}}=f.get();return yield t===w.SE?Wa(e):za(e)}),siteEvents:Ft,initNativeAd:(e,t)=>{var n,i,o;if(null===(i=null===(n=null==t?void 0:t.editory)||void 0===n?void 0:n.adNativeBuilder)||void 0===i?void 0:i.enabled)return void ta(e,t);const{targetId:r}=e;if(!document.querySelector(`#${r}`))return;const{pageType:a=mi.FRONT,deviceType:d}=null!==(o=null==t?void 0:t.pageContext)&&void 0!==o?o:{},{nativeTrackingConfig:s,appearanceConfig:l}=null!=t?t:{},c={language:w.NO,publisher:Dt.PENT,deviceType:d,pageType:a,nativeTrackingConfig:s,appearanceConfig:l};Oa(e,c,Ka)}},Xa=((e,t)=>({init:n=>Ea(Object.assign(Object.assign({},n),{siteSpecificConfig:t}),e),update:Ca,renderNativeAd:pa,getVideoPPIDs:kn,createInitNativeAd:ja,getVideoAdsConfig:sr}))(Ga,Mt),Ja=zn("[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 Ya=Object.freeze({__proto__:null,default:Ja});zn('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const Qa={Blink:"Blink"},Za=new Map,ed=e=>{var t;if(!Za.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,n]of Object.entries(Qa)){const i=e[t];null!=i&&(window[n]=i)}})(e)).catch(t=>{throw Za.delete(e),t});Za.set(e,t)}return null!==(t=Za.get(e))&&void 0!==t?t:Promise.resolve()},td="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",nd=(e,t)=>{const{siteSpecificConfig:{publisherClassName:n}={},pageContext:{pageType:i}}=f.get(),o=document.querySelector(`#${e}`);if(!o)return;if(o.classList.add("disable-cogwheel"),!n)return;hr(n,o,mr,null!=t?t:i);At({preferredTestIdData:{targetId:e,testId:"finn"}})},id=e=>{const{pageContext:{publisher:t=""}}=f.get(),n=document.querySelector(`#${e}`);if(!n)return;const i=`-${t}`;n.classList.remove(`advertory${i}-finn-blink`),n.classList.remove(`advertory${i}-finn-blink-wrapper`)};var od=Object.freeze({__proto__:null,displaySpecialFormatsForFinnFallback:e=>{const{fullscreenScroll:t}=f.get(),{initNativeAd:n}=f.getHandlers();De(e)&&Jn(e,t),Me(e)&&(null==n||n(e,f.get()))},finnBlinkLoaded:nd,xandrAdLoaded:id});const rd=e=>{var t,n;const i=document.querySelector(`[id^="${e}"]`);return null!==(n=null===(t=null==i?void 0:i.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==n?n:e},ad=(e,t)=>{const{finnBlink:{enabled:n}={}}=f.get(),i=(null==t?void 0:t.enabled)||(e=>{var t;const n=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!i||!n)return null;const{height:o,requireImage:r,position:a,offset:d}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${rd(e)}`,enabled:i,position:null!=a?a:e,height:null!=o?o:100,offset:null!=d?d:200,requireImage:r,advertoryTheme:null==t?void 0:t.advertoryTheme}},dd=(e,t,n)=>P(void 0,void 0,void 0,function*(){const{placements:i,pageContext:{deviceType:o},appearanceConfig:r}=f.get();s(`rendering finn blink ad for ${e}`);const a=T(e),d=i[o].find(e=>e.targetId===a),l=ad(e,null==d?void 0:d.finnBlink);if(!(null==l?void 0:l.enabled))return s(`Finn blink is not enabled on placement: ${e}`),n&&n(e),void id(e);if((e=>{var t;const n=rd(e),i=document.querySelector(`[id^="${n}"]`);return!!(null===(t=null==i?void 0:i.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void s(`Finn blink already loaded ${e}`);const{publisher:c,countryCode:u,finnBlink:p}=t,{sdkPayload:{channel:v}={}}=null!=p?p:{},g=null!=v?v:`${c}.${u}`,h="dark"===(null==r?void 0:r.theme)?"dark":"light";try{const e=yield P(void 0,void 0,void 0,function*(){const{ppid1:e}=mn.getPPIDs();return e});yield(m=Object.assign(Object.assign({},l),{channel:g,userId:e,theme:h}),P(void 0,void 0,void 0,function*(){const{userId:e,theme:t}=m,n=S(m,["userId","theme"]),i=window[Qa.Blink];if(!i)return;const o=new i({remote:"https://www.finn.no/distribution-front/external/carousel",userId:e,theme:t});yield o.inject(Object.assign({},n))})),nd(l.selector.replace("#",""),l.advertoryTheme)}catch(t){s(`Finn blink error ${t}`),n&&n(e),!n&&X(e),id(e)}var m}),sd=()=>P(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:n}}=f.get();return!!(yield ot(e,t,n,"finn-blink"))||(s("Skip loading finn blink ad due to missing TCF consent."),!1)}),ld=(e,t)=>{var n;(s(`Appending ${t.id} after ${e.id}`),e.parentElement&&(n=e.parentElement,!Array.from(n.children).some(e=>e.classList.contains("advertory-finn-blink-wrapper"))))?(e.parentElement.style.display="none",e.parentElement.insertAdjacentElement("afterend",t)):s(`Cannot perform afterend on: ${e.id}`)},cd=e=>document.querySelector(`#${e}`);var ud=Object.freeze({__proto__:null,handleFinnBlinkOnlyPlacements:e=>P(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:n}}=f.get(),i=null==t?void 0:t.defaultThreshold[n];for(const t of e){const{requestThreshold:e,targetId:n}=t,o=cd(n);o&&(yield Wi(o,null!=e?e:i))}}),loadFinnBlinkAd:(e,t,n,i)=>P(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:o}}=f.get();if(s(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield sd())||o)return n&&n(e),id(e),void(!n&&X(e));try{yield ed(td)}catch(e){console.error(e)}yield dd(e,t,n),i&&i()}),replaceAdsWithFinnBlink:(e,t)=>P(void 0,void 0,void 0,function*(){var n,i;if(!t)return;const{replacementConfig:o}=t,r=null===(n=null==o?void 0:o.adsToReplace)||void 0===n?void 0:n[e],a=null===(i=null==o?void 0:o.sizes)||void 0===i?void 0:i[e];Oi()&&r&&a?(yield sd())&&(yield ed(td),r.forEach(([e,t])=>{const n=document.querySelector(`[id^="${e}"]`);if(!n)return;const i=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=f.get(),n=document.createElement("div"),i=document.createElement("div");return i.id=e,n.appendChild(i),hr(t,i,mr),s(`Creating blink container for: ${e}`),n})(t);(e=>{s(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(n),ld(n,i),n.dataset.finnBlinkId=t,Hi().withFullAdsChain(e)})):s(`Finn blink configuration is incorrect: ${JSON.stringify(o)}`)})});const pd=1e4,vd=e=>e.some(e=>e.some(e=>!!e&&ro(e,0)));let gd;var hd=Object.freeze({__proto__:null,initWidescreenSwitching:()=>{const{widescreenSwitching:e}=f.get(),{enabled:t,options:{rotationInterval:n=pd,widescreenIdPrefix:i}={}}=null!=e?e:{};if(!t)return;const o=((e="widescreen")=>{const{pageSectionsSelectors:{right:t}={}}=f.get();return t?Array.from(document.querySelectorAll(t)).map(t=>Array.from(t.querySelectorAll(`div[id^="${e}"]`))):[]})(i);let r=0,a=Date.now(),d=vd(o);if(!o.length)return;gd&&window.removeEventListener("scroll",gd);const s=(e,t,n)=>{e.forEach(e=>{e&&e.style.setProperty(t,n)})},l=e=>1===e?0:1;(e=>{e.forEach(e=>{e[0]&&(e[0].style.display="block",e[0].style.opacity="1"),e[1]&&(e[1].style.display="none",e[1].style.opacity="")})})(o);const c=((e,t)=>{let n=null;return(...i)=>{null===n&&(e(...i),n=setTimeout(()=>{n=null},t))}})(()=>{d||(d=vd(o)||d,a=Date.now());Date.now()-a>=n&&((()=>{const e=l(r),t=o.map(e=>e[r]),n=o.map(t=>t[e]);s(t,"opacity","0"),setTimeout(()=>{s(t,"display","none"),s(n,"opacity","0"),s(n,"display","block"),setTimeout(()=>{s(n,"opacity","1")},450)},450)})(),r=l(r),a=Date.now())},1e3);gd=c,window.addEventListener("scroll",c)}});const md="#fff",fd="#0098da",yd=e=>"dark"===e,wd=(e,t,n,i)=>{if(!n)return;const o={[st]:()=>{const{buttonLabel:i}=It(n,t);["#advertory-welcome-page-scroll-label","#advertory-welcome-page-scroll-image"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(n.innerText=null!=i?i:"")})},[dt]:()=>{const{themeColors:o,logotype:r,buttonLabel:a,showArrowIcon:d}=It(n,t),s=((e,t)=>{var n,i,o,r;if(!e)return;const a=yd(t)?e.darkMode:void 0;return{backgroundColor:null!==(i=null!==(n=null==a?void 0:a.backgroundColor)&&void 0!==n?n:e.backgroundColor)&&void 0!==i?i:md,color:null!==(r=null!==(o=null==a?void 0:a.color)&&void 0!==o?o:e.color)&&void 0!==r?r:fd}})(o,i),l=((e,t)=>{var n,i;if(!e)return;const o=yd(t)?e.darkMode:void 0;return{url:null!==(n=null==o?void 0:o.url)&&void 0!==n?n:e.url,alt:null!==(i=null==o?void 0:o.alt)&&void 0!==i?i:e.alt}})(r,i);["#advertory-splash-close-label",".advertory-splash-close","#advertory-splash-logotype",".advertory-splash-navbar-wrapper"].forEach(t=>{const n=e.querySelector(`${t}`);if(n){if("#advertory-splash-close-label"===t&&(n.innerText=null!=a?a:""),".advertory-splash-close"===t&&!d){const e=n.querySelector("#advertory-splash-close-image");null==e||e.style.setProperty("display","none")}".advertory-splash-close"===t&&s&&(n.style.color=s.color),"#advertory-splash-logotype"===t&&l&&(n.setAttribute("src",l.url),n.setAttribute("alt",l.alt)),".advertory-splash-navbar-wrapper"===t&&s&&(n.style.setProperty("background-color",s.backgroundColor,"important"),n.style.color=s.color)}})},[lt]:()=>{const{buttonLabel:i,showArrowIcon:o,showCloseButton:r=!0}=It(n,t);["#advertory-topscroller-scroll-label","#advertory-topscroller-scroll-image",".advertory-topscroller-close"].forEach(t=>{const n=e.querySelector(`${t}`);n&&(".advertory-topscroller-close"!==t||r||(n.style.display="none"),"#advertory-topscroller-scroll-image"!==t||o||(n.style.display="none"),"#advertory-topscroller-scroll-label"===t&&(n.innerText=null!=i?i:""))})},[ct]:()=>{}};o[t]()},bd=(e,t=!0)=>{(e===st||e===lt)&&(e=>{e?setTimeout(()=>window.scrollTo(0,0),100):window.scrollTo(0,10)})(t)},xd=()=>{const e=parseInt(document.body.dataset.scrollY||"0",10);document.body.style.top="",window.scrollTo(0,e),document.body.classList.remove("page-locked")},kd=e=>{document.body.style.overflow=e?"initial":"hidden"},Cd=e=>{const t=Ed(e),n=Id(e);(e=>{e.classList.toggle("takeover-ad-hidden",!0)})(e),kd(!0),e.style.display="none",window.removeEventListener("keydown",t),window.removeEventListener("advertory:closeTakeover",n)},Id=e=>{const t=()=>Cd(e);return window.addEventListener("advertory:closeTakeover",t),xd(),t},Ed=e=>{const t=t=>{["Enter","Escape"].includes(t.key)&&Cd(e)};return xd(),window.addEventListener("keydown",t),t},Td=e=>{const t=e.querySelector(".advertory-splash-navbar-wrapper");t&&(Ed(e),Id(e),xd(),t.addEventListener("click",()=>{Cd(e)}),kd(!1))},Sd=e=>{(e=>{window.addEventListener("scroll",()=>{e.getBoundingClientRect().bottom,(e=>{const t=e.getBoundingClientRect().bottom;e.style.opacity=""+t/e.offsetHeight})(e)},{passive:!0})})(e),Id(e);const t=document.querySelector("header");document.querySelectorAll(".smooth-close-takeover").forEach(e=>e.addEventListener("click",()=>null==t?void 0:t.scrollIntoView({behavior:"smooth"})))},Pd=e=>{(e=>{window.addEventListener("advertory:closeTakeover",()=>Cd(e))})(e)},Ad=e=>{const{takeover:{splash:{showAnnonsLabel:t=!1}={}}={}}=f.get(),n=e.querySelectorAll(".advertory-splash-navbar-wrapper"),i=document.querySelector(".advertory-takeover-label");Array.from(n).forEach(e=>e.style.display="flex"),t&&i&&(i.style.display="flex",i.innerText=Hn.se.adText),e.classList.toggle("advertory-splash-wrapper",!0)},Od=e=>{const t=document.querySelectorAll(".advertory-topscroller-elements");Array.from(t).forEach(e=>e.style.display="flex");const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=Hn.no.adText,n.classList.add("takeover-topscroller-label"),e.classList.toggle("topscroller-wrapper",!0))},jd=e=>{const t=document.querySelectorAll(".advertory-welcome-page-elements");Array.from(t).forEach(e=>{e.style.display="flex",e.style.animation="elementsAnimation 1.5s ease-out forwards"});const n=document.querySelector(".advertory-takeover-label");n&&(n.style.display="flex",n.innerText=Hn.se.adText,e.classList.toggle("welcome-page-wrapper",!0))},$d=e=>{const t=document.querySelector(".advertory-takeover-label");t&&(t.style.display="flex",t.innerText=Hn.se.adText,e.classList.toggle("advertory-impact-wrapper",!0))},Ld=()=>{const e=document.querySelector(".welcome-page-wrapper, .topscroller-wrapper, .advertory-splash-wrapper");if(!e)return;let t=0;new IntersectionObserver(e=>{e.forEach(e=>{var n;if(e.isIntersecting){window.dispatchEvent(new CustomEvent("advertory:takeoverInView"));(null!==(n=Array.from(e.target.classList))&&void 0!==n?n:[]).includes("advertory-splash-wrapper")&&(()=>{const e=window.scrollY||0;document.body.dataset.scrollY=e.toString(),document.body.style.top="0",document.body.classList.add("page-locked"),document.documentElement.scrollTop=0})(),t++}else t>0&&window.dispatchEvent(new CustomEvent("advertory:takeoverNotInView"))})},{root:null,rootMargin:"0px",threshold:0}).observe(e)},_d=(e,t)=>{let n=e;return e.includes("529299503")&&(n=(e=>{const t=document.createElement("script");return t.textContent=`(${Tt})()`,e+t.outerHTML})(e)),n=$n(n),n};var Nd=Object.freeze({__proto__:null,createTakeoverAd:e=>P(void 0,void 0,void 0,function*(){const{takeover:t,appearanceConfig:n}=f.get(),{targetId:i}=e,o=document.querySelector(`#${i}`),r=document.querySelector(".advertory-takeover-wrapper");if(!o||!r||!t)return;const a=xt(e),d=r.offsetHeight,s=window.scrollY>d;r.style.display="block",!s&&bd(a,!1),((e,t)=>{({[st]:jd,[dt]:Ad,[lt]:Od,[ct]:$d})[t](e)})(r,a),Ld(),((e,t)=>{({[st]:Sd,[lt]:Sd,[dt]:Td,[ct]:Pd})[t](e)})(r,a),wd(r,a,t,null==n?void 0:n.theme),yield kt(),!s&&bd(a,!0),Et(e,a)}),modifyTakeoverAdContent:e=>{const t=(e=>{var t;const{requests:n}=window.apntag,i=An(e)?1:0;return null===(t=null==n?void 0:n.tags[e].adResponse.ads[i].rtb)||void 0===t?void 0:t.banner.content})(e);if(!t)return;((e,t)=>{const{requests:n}=window.apntag,i=An(e)?1:0,o=null==n?void 0:n.tags[e].adResponse.ads[i].rtb;o&&(o.banner.content=t)})(e,_d(t))},modifyTakeoverIframe:(e,t)=>{var n;const i="100%",o="100%";e.resizeAd(t,[i,o]);const r=null===(n=document.querySelector(`#div_utif_${t}`))||void 0===n?void 0:n.querySelector("iframe");if(!r)return;new MutationObserver(e=>{for(const t of e)if("attributes"===t.type&&"style"===t.attributeName){const e=window.getComputedStyle(r),t=e.width,n=e.height;t===i&&n===o||(r.style.width=i,r.style.height=o)}}).observe(r,{attributes:!0,attributeFilter:["style"]})}});const qd=(e,t)=>{t.left&&(e.style.left=t.left),t.marginLeft&&(e.style.marginLeft=t.marginLeft)},Fd=(e,t,n)=>{var i,o;const r=document.querySelector(`#${e.targetId}`),{siteSpecificConfig:{publisherClassName:a,fullWidthFormatClassName:d}={},fullWidth:s,pageContext:{deviceType:l}}=f.get();if(!r)return null;const c=r.parentElement,u=$t(l)||n;if(r.style.width=u?"100vw":"100%",r.style.position="relative",c&&(c.style.width=u?"100vw":"100%",c.style.position="relative"),a&&d){const e=`advertory-${a}-${d}`;r.classList.add(`${e}__${t}`),null==c||c.classList.add(`${e}-wrapper__${t}`)}const p=null===(o=null===(i=null==s?void 0:s.options)||void 0===i?void 0:i.styles)||void 0===o?void 0:o[l],v=(null==s?void 0:s.enabled)&&p;return!v&&c&&u&&(c.style.left="50%",c.style.marginLeft="-50vw"),v&&p.adContainer&&qd(r,p.adContainer),v&&p.adContainerWrapper&&c&&qd(c,p.adContainerWrapper),r},Dd=(e,t,n,i,o)=>{const r=Fd(e,i,o);if(!r)return void s("[Ad full width] adContainer not found");const a=r.querySelector("iframe"),d=null==a?void 0:a.parentElement;if(!a||!d)return void s("[Ad full width] iframe or iframeWrapper not found");const l=`calc(100vw / ${t}px)`;s(`[Ad full width] ratioWidth ${t}, ratioHeight ${n}, adObjWidth: ${e.width}, scaleFactor ${l}`),d.style.transform=`scale(${l})`,d.style.transformOrigin="left top",r.style.aspectRatio=`${t} / ${n}`};var Md=Object.freeze({__proto__:null,applyFullsquareFormat:e=>{Dd(e,1080,1080,"fullsquare-ad",!0)},applyFullwidthFormat:e=>{const t=Fd(e,"fullwidth-ad",!1);if(!t)return;const n=t.querySelector("iframe");if(!n)return;const{deviceType:i}=f.get().pageContext;n.style.width=$t(i)?"100vw":"100%",(null==n?void 0:n.parentElement)&&(n.parentElement.style.width=$t(i)?"100vw":"100%")},applyNinesixteenFormat:e=>{Dd(e,1080,1920,"ninesixteen-ad",!0)}});const Bd=e=>e===w.NO?"schibsted":"schibstedse";var Rd=Object.freeze({__proto__:null,getCampaign:Bd,loadNorstat:()=>P(void 0,void 0,void 0,function*(){const{norstat:{enabled:e}={},pageContext:{countryCode:t,isMobileApp:n},tcf:i}=f.get(),o=yield ot(i,n,t,"norstat");if(!e||n||!o)return;const r=(e=>{const{ppid1:t,ppid2:n}=hn.getPPIDs(),{ppid1:i,ppid2:o}=mn.getPPIDs(),r=(new gn).add(n,dn[e]).add(t,sn[e]).add(o,ln[e]).add(i,cn[e]);return`${r.buildNorstatPath()}?${r.buildNorstatQuery("alias").toString()}`})(t);((e,t,...n)=>{P(void 0,[e,t,...n],void 0,function*(e,t,n=!0){if(document.getElementById(t))return;const i=document.createElement("img");i.src=e,i.id=null!=t?t:"",n&&(i.style.display="none"),document.body.appendChild(i)})})(`https://sch-map.norstatsurveys.com/api/nids/${Bd(t)}/map/${r}`,"norstat")})});const Ud=".advertory-right-column-track",zd="--advertory-right-column-track-height",Vd=e=>e.getBoundingClientRect().top+window.scrollY,Hd=(e,t)=>`${e}-${t}`,Wd=(e,t,n)=>{var i;const o=Array.from(null!==(i=e.querySelectorAll(t))&&void 0!==i?i:[]),r=(e=>e.map(e=>{var t;return null===(t=document.querySelector(`[id^="${e}"]`))||void 0===t?void 0:t.parentElement}).map((e,t)=>({point:e,originalIndex:t})).filter(e=>Boolean(e.point)))(n);if(0===r.length)return;const a=Vd(e);r.forEach(({point:e,originalIndex:t})=>{((e,t,n)=>{const i=Vd(e),o=Hd(zd,t),r=i-n,a=Hd("--advertory-right-column-split-point-height",t),d=aa(e);da({[o]:ra(r),[a]:ra(d)})})(e,t+1,a),(e=>{const t=null==e?void 0:e.id;if(!t)return;const n=Hd("--advertory-right-column-ad-height",t),i=aa(e);da({[n]:ra(i)})})(o[t])});((e,t)=>{const n=Vd(e)-t;da({[zd]:ra(n)})})(r[Math.min(o.length,r.length-1)].point,a)};let Kd=!1;var Gd=Object.freeze({__proto__:null,initRightColumnSplit:e=>{if(!(null==e?void 0:e.enabled)||Kd)return;const{splitPointIDs:t,adSelector:n,trackSelector:i=Ud}=e,o=document.querySelector(i);if(!o)return;Kd=!0;const r=()=>{Wd(o,n,t)};r(),window.addEventListener("resize",r),window.addEventListener("orientationchange",r),window.addEventListener("load",r),window.addEventListener("advertory:adLoaded",()=>{requestAnimationFrame(r)});new ResizeObserver(r).observe(o)}});class Xd{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];const{host:i,pathname:o}=new URL(n);if(!i.includes("www.vg.no")&&!o.includes("annonsorinnhold"))return[n];const r=o.split("/");return r.length?[...r.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class Jd{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class Yd{constructor(e,t){this.pulse=e,this.newsroomStrategy=t}getEventInput(e,t){return{}}parseKilkayaData(e){const t=e.querySelector("article");if(!t)return{};const n=t.dataset.k5aTeaserAnalytics;try{return n?JSON.parse(n):{}}catch(e){return{}}}mapPageType(e){return{front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[e||"front"]||"Frontpage"}getArticleId(){return location.pathname.split("/").slice(-2,-1).pop()||""}getEventTarget(e){const{url:t,title:n,itemId:i}=this.parseKilkayaData(e);return{id:i,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}trackContentView(e){return P(this,void 0,void 0,function*(){var t,n,i,o,r,a,d,s,l;const c=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:null===(t=this.parseKilkayaData(e))||void 0===t?void 0:t.placement}});if(window.dispatchEvent(c),!this.pulse)return;const u=this.getEventInput(e,"view");(null===(n=this.pulse)||void 0===n?void 0:n.trackLegacyViewUIElement)?null===(o=null===(i=this.pulse)||void 0===i?void 0:i.trackLegacyViewUIElement)||void 0===o||o.call(i,u):(null===(r=this.pulse)||void 0===r?void 0:r.trackViewUIElement)?null===(d=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===d||d.call(a,u):null===(l=null===(s=this.pulse)||void 0===s?void 0:s.trackElementView)||void 0===l||l.call(s,u)})}trackContentClick(e){return P(this,void 0,void 0,function*(){var t,n,i,o,r,a;if(!this.pulse)return;const d=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,d):this.pulse.trackClickUIElement?null===(o=(i=this.pulse).trackClickUIElement)||void 0===o||o.call(i,d):null===(a=(r=this.pulse).trackElementClick)||void 0===a||a.call(r,d)})}}class Qd extends Yd{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,i,o,r,a;const{clientName:d,creativeId:s,itemId:l,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),p=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(o=null===(i=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===i?void 0:i.call(n))&&void 0!==o?o:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:d,creativeId:null!=s?s:l},page:{"@id":null!=p?p:c,"@type":u,url:location.origin},tags:null===(a=null===(r=this.newsroomStrategy)||void 0===r?void 0:r.getTags)||void 0===a?void 0:a.call(r,e)}}getEventTarget(e){const{link:t,itemId:n,title:i}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:t}}getEventInput(e,t){return{object:this.getEventBaseData(e),partnerstudio:this.getEventPartnerstudioData(e,t),target:this.getEventTarget(e),provider:this.getProviderData()}}getEventPartnerstudioData(e,t){const n=this.parseKilkayaData(e);return Object.assign(Object.assign({},n),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}const Zd=/^glci_/,es="gender_",ts="geo_",ns="male",is="female";class os extends Yd{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getPlacementData(e){var t;const n=e.closest(".kilkaya-wrapper");return{columnName:null!==(t=null==n?void 0:n.dataset.pulseColumnname)&&void 0!==t?t:"",primaryPosition:Number(null==n?void 0:n.dataset.pulsePrimaryposition)||0}}getEventBaseData(e){var t,n;const{title:i="",clientName:o="",creativeId:r="",link:a=""}=this.parseKilkayaData(e),{columnName:d,primaryPosition:s}=this.getPlacementData(e),l={publicUrl:a,urlPath:a?new URL(a).pathname:""},{publicUrl:c,urlPath:u}=a&&(null===(n=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===n?void 0:n.call(t,a))||l;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:i,placement:{columnName:d,primaryPosition:s},tags:[o,i,c,u].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:o,"spt:creativeId":r,pageTitle:i,publicUrl:c,urlPath:u},url:location.origin}}getEventTarget(e){const{link:t,itemId:n,title:i}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=i?i:""),type:"Page",url:t}}getEventInput(e){return{object:this.getEventBaseData(e),target:this.getEventTarget(e)}}}const rs="[data-k5a-teaser-analytics]",as=(e,t,n,i)=>{const o=document.querySelectorAll("k5a-stream");if(!o.length)return;const r=new(i===w.SE?os:Qd)(e,t,n),a=new WeakMap,d=e=>{const t=a.get(e);t&&(t.disconnect(),a.delete(e))},s=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,i=n.querySelector(rs);Boolean(null==i?void 0:i.dataset.k5aTeaserAnalytics)?(r.trackContentView(n),t.unobserve(e.target),d(n)):((e,t)=>{if(a.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(rs);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(r.trackContentView(e),t.unobserve(e),d(e))});n.observe(e,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]}),a.set(e,n)})(n,t)})},{threshold:.5});o.forEach(e=>{s.observe(e),e.addEventListener("click",()=>r.trackContentClick(e))})},ds=()=>P(void 0,void 0,void 0,function*(){try{const t=yield(e=500,P(void 0,void 0,void 0,function*(){return Promise.race([Ti(),new Promise(t=>setTimeout(()=>t(void 0),e))])})),n=new Si(t),i=yield n.getIdentityUser(),{gender:o}=null!=i?i:{};return o===ns||o===is?`${es}${o}`:void 0}catch(e){return}var e}),ss=()=>P(void 0,void 0,void 0,function*(){const e=[],t=yield ds(),n=(()=>{const e=tn().map(e=>`${ts}${e.replace(Zd,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e});class ls{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===mi.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${t}`}getTags(e){var t;let n;if(n=e instanceof HTMLAnchorElement?e.href:null===(t=null==e?void 0:e.querySelector("a"))||void 0===t?void 0:t.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:i}=new URL(n),o=i.split("/").filter(Boolean);return o.length?[...o.slice(1),n]:[n]}}class cs{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class us{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class ps{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class vs{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===mi.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class gs{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""}}class hs{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n,countryCode:i}}){if(!(null==e?void 0:e.instance))return;const o={[Dt.VG]:new Xd,[Dt.E24]:new ls,"no-aftenposten":new cs,[Dt.BT]:new us,"no-bergenstidende":new us,[Dt.SA]:new ps,"no-stavangeraftenblad":new ps,[Dt.SVD]:new vs,[Dt.AFTONBLADET]:new gs}[n]||new Jd;as(e.instance,o,t,i)}injectKilkayaMeta(e){return P(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield ss();t.textContent=`var k5aMeta = { consent: ${e}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(t)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",e=>{var t;const n=null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.streamSlot;if(s(`Kilkaya event for slot: ${n}`),!n)return void s("Kilkaya slot empty, Xandr backfill won't be loaded");const i=n.parentElement;i?(s(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(i)):s("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}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:"";J(i)}loadKilkayaScript(e){return P(this,void 0,void 0,function*(){yield Cn(e)})}run(e){return P(this,void 0,void 0,function*(){var t,n;const{tcf:i,pageContext:{isMobileApp:o,countryCode:r},kilkaya:a}=e;if(!(null==a?void 0:a.enabled))return;const d=yield ot(i,o,r,"kilkaya");d&&(this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(d),yield this.loadKilkayaScript(null!==(n=null===(t=a.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(e))})}}var ms=Object.freeze({__proto__:null,Kilkaya:({placementName:e,slotTag:t,fallbackTargetId:i,children:o,pulseData:r,htmlAttributes:a})=>{const d=(e,t)=>{const n={};if(!e)return n;for(const[i,o]of Object.entries(e)){n[t?`${t}-${i}`:i]=String(o)}return n},s=d(r,"data-pulse"),l=d(a,"data");return n.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},s,l,{children:[n.jsx("div",{className:"inscreen-target"}),n.jsx("k5a-stream",{name:e,"slot-tag":t}),n.jsx("div",{className:"container"}),n.jsx("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},runKilkaya:e=>P(void 0,void 0,void 0,function*(){const t=new hs;yield t.run(e)})});zn('.advertory-shared-ad-native-seamless{position:relative;overflow:hidden;border-radius:10px}.advertory-shared-ad-native-seamless .ad-info{position:absolute;top:0;right:0;z-index:1}.advertory-shared-ad-native-seamless .ad-info div[role=button]{top:0;right:0;left:auto;transform:none;background-color:hsla(0,0%,100%,.45);border-bottom-left-radius:13px}.advertory-shared-ad-native-seamless .ad-link{text-decoration:none;color:inherit}.advertory-shared-ad-native-seamless .ad-link .ad-content{position:relative;min-width:320px;height:100%;margin:0 auto;padding:8px 8px 0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;background-color:var(--color-background-secondary, #ffffff);color:var(--color-text-primary, #333)}.advertory-shared-ad-native-seamless .ad-link .ad-content .ad-header{padding:0 0 8px 10px;margin-right:18px;display:flex;justify-content:space-between;gap:50px}.advertory-shared-ad-native-seamless .ad-link .ad-content .ad-header .ad-logo{max-width:100%;max-height:45px;min-width:0;object-fit:contain;object-position:left center}.advertory-shared-ad-native-seamless .ad-link .ad-content .ad-header .ad-annons{flex-shrink:0;margin-left:auto;margin-right:5px;font-size:10px;font-weight:400;color:var(--color-text-primary, #333);white-space:nowrap;line-height:.7;text-transform:lowercase}.advertory-shared-ad-native-seamless .ad-link .ad-content .ad-image-container{width:100%;aspect-ratio:1/1;overflow:hidden;display:flex;justify-content:center;align-items:center}.advertory-shared-ad-native-seamless .ad-link .ad-content .ad-image-container .ad-image{height:100%;width:auto;max-width:100%;object-fit:cover}@media screen and (min-width: 768px){.advertory-shared-ad-native-seamless .ad-link .ad-content .ad-image-container{aspect-ratio:1.91/1}}.advertory-shared-ad-native-seamless .ad-link .ad-content .ad-footer{display:flex;flex-direction:column;justify-content:center;padding:13px 10px}.advertory-shared-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row{display:flex;align-items:center;justify-content:space-between}.advertory-shared-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row .ad-text-wrapper{display:flex;flex-direction:column;gap:5px;flex-grow:1;padding-right:8px;align-items:start}.advertory-shared-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row .ad-text-wrapper .ad-description{font-size:15.5px;font-weight:500;text-align:left;word-spacing:-1px;color:var(--color-text-primary, #111111)}@media screen and (min-width: 768px){.advertory-shared-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row .ad-text-wrapper .ad-description{font-size:18px}}.advertory-shared-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row .ad-text-wrapper .ad-headline{margin:0;font-size:16px;font-weight:400;line-height:1.2;word-spacing:-1px;text-align:left;color:var(--color-text-secondary, #111111)}@media screen and (min-width: 768px){.advertory-shared-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row .ad-text-wrapper .ad-headline{font-size:18px}}.advertory-shared-ad-native-seamless .ad-link .ad-content .ad-footer .ad-row .ad-action{flex-shrink:0;padding:10px 14px;font-size:14px;line-height:1;color:var(--color-text-on-accent, #111111);white-space:nowrap;background-color:var(--color-accent, #d9d9d9);border-radius:99px;font-weight:500}');var fs=Object.freeze({__proto__:null});zn('.advertory-no-ad-native-default{width:calc(100% - 32px);min-height:250px;margin:auto;color:#dfdfdf;font-family:"Inter",sans-serif;font-weight:600;text-align:left;position:relative;box-sizing:border-box;text-decoration:none;display:table;table-layout:fixed;font-size:14px}@media screen and (min-width: 768px){.advertory-no-ad-native-default{width:580px;height:400px}}.advertory-no-ad-native-default *{box-sizing:border-box;line-height:normal;text-transform:none}.advertory-no-ad-native-default .ad-info{position:absolute;top:0;left:0;height:26px;width:26px;z-index:1000;background-color:#dfdfdf;border-bottom-right-radius:13px;transform:none;transform-origin:center}.advertory-no-ad-native-default .ad-link{display:block;text-decoration:none;color:#000;background-color:rgba(0,0,0,0);border:1px solid #dfdfdf}.advertory-no-ad-native-default .ad-content{display:block}.advertory-no-ad-native-default .ad-image-container{background-color:#dfdfdf;display:flex;position:relative;line-height:0}.advertory-no-ad-native-default .ad-image-container .ad-image{position:static;width:100%;aspect-ratio:1.91;height:auto}.advertory-no-ad-native-default .ad-text-container{background:#f5faff;overflow:auto;padding:8px}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container{padding:12px 16px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:12px;margin:0;text-transform:uppercase;display:block}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-sponsor{font-size:14px;margin-right:8px}}.advertory-no-ad-native-default .ad-text-container .ad-sponsor .ad-label{font-weight:600;color:#fff;background-color:#467aae;display:inline-block;padding:4px 6px;border-radius:4px;border:none;margin-right:4px}.advertory-no-ad-native-default .ad-text-container .ad-title{margin:4px 0 0 0;line-height:normal;color:#000;font-size:18px;display:flex;flex-direction:column;justify-content:center}@media screen and (min-width: 768px){.advertory-no-ad-native-default .ad-text-container .ad-title{margin:12px 0 0 0;font-size:28px}}.advertory-vg-native-ad__front .advertory-no-ad-native-default{width:100%;height:auto}.advertory-aftenposten-native-ad-wrapper__front{justify-content:center}.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(-40px + 4rem)}@media screen and (min-width: 768px){.advertory-e24-native-ad-wrapper__article{margin-bottom:calc(12px + .75rem)}}');var ys=Object.freeze({__proto__:null});module.exports=Xa;