@schibsted/advertory 3.16.5 → 3.17.0

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 (504) hide show
  1. package/ad-native/cjs/index.d.ts +14 -6
  2. package/ad-native/cjs/index.js +1 -1
  3. package/ad-native/es/index.d.ts +14 -6
  4. package/ad-native/es/index.js +1 -1
  5. package/aftenposten/cjs/index.d.ts +14 -6
  6. package/aftenposten/cjs/index.js +1 -1
  7. package/aftenposten/es/_auto-entry_aftenposten-DeEHeijF.js +1 -0
  8. package/aftenposten/es/events-Bxv2-lJi.js +1 -0
  9. package/aftenposten/es/{index-DQGbdXJH.js → index-ARShBeWt.js} +1 -1
  10. package/aftenposten/es/index-C0VUsW-8.js +1 -0
  11. package/aftenposten/es/{index-CS7Ab372.js → index-C1rTtlM8.js} +1 -1
  12. package/aftenposten/es/index-CUAvvws0.js +1 -0
  13. package/{aftonbladet/es/index-B-9GeVqx.js → aftenposten/es/index-D76l_EB9.js} +1 -1
  14. package/aftenposten/es/{index-DRw2tzN7.js → index-Dq_NBswZ.js} +1 -1
  15. package/aftenposten/es/{index-B8-3dAzZ.js → index-Ds1ErtTb.js} +1 -1
  16. package/aftenposten/es/{index-Db4A-lKt.js → index-Dsdyzi26.js} +1 -1
  17. package/aftenposten/es/index.d.ts +14 -6
  18. package/aftenposten/es/index.js +1 -1
  19. package/aftenposten/es/{styles-DbteVOM6.js → styles-B5ltPSCd.js} +1 -1
  20. package/aftenposten/es/{styles-x5cJhAzP.js → styles-BGQJjU9F.js} +1 -1
  21. package/aftenposten/es/{styles-Cmgz7g7s.js → styles-BRYU8SLU.js} +1 -1
  22. package/aftenposten/es/{styles-CshnwzG0.js → styles-DQI5_O21.js} +1 -1
  23. package/aftenposten/es/{styles-C3V8Btu3.js → styles-DxPblond.js} +1 -1
  24. package/aftenposten/es/{styles-CfAyG-Uc.js → styles-MoZa5WqG.js} +1 -1
  25. package/aftenposten/es/{styles-BVFhT7Fm.js → styles-Mw1wWiYF.js} +1 -1
  26. package/aftenposten/es/{styles-D4hQIIqP.js → styles-PFPNyVM6.js} +1 -1
  27. package/aftenposten/es/{styles-BxGxExCF.js → styles-ayVZc-Ln.js} +1 -1
  28. package/aftenposten/es/{styles-qYagS0GU.js → styles-iIXw22I9.js} +1 -1
  29. package/aftenposten/es/{styles-BqwkhLCB.js → styles-m2fX9LPC.js} +1 -1
  30. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-BYwW77G6.js +1 -0
  31. package/aftenpostenv2/es/events-s0KndXbM.js +1 -0
  32. package/aftenpostenv2/es/index--O8yOGIu.js +1 -0
  33. package/aftenpostenv2/es/{index-lqm-o7Po.js → index-BFeK-LWW.js} +1 -1
  34. package/aftenpostenv2/es/{index-DoEPQvRY.js → index-C9CJOoSj.js} +1 -1
  35. package/aftenpostenv2/es/{index-CCgqrIq1.js → index-CEtZZCY9.js} +1 -1
  36. package/aftenpostenv2/es/index-DkpkomjT.js +1 -0
  37. package/aftenpostenv2/es/{index-BVUcPqHw.js → index-DxDq_Po1.js} +1 -1
  38. package/aftenpostenv2/es/{index-BZnCLvE4.js → index-fHDpymU-.js} +1 -1
  39. package/aftenpostenv2/es/{index-DiBksfGt.js → index-qp1DWE-W.js} +1 -1
  40. package/aftenpostenv2/es/index.d.ts +14 -6
  41. package/aftenpostenv2/es/index.js +1 -1
  42. package/aftenpostenv2/es/{styles-Dfd6TOhp.js → styles-BGPmyGPM.js} +1 -1
  43. package/aftenpostenv2/es/{styles-PnO4KF4Z.js → styles-BNyLMe8E.js} +1 -1
  44. package/aftenpostenv2/es/{styles-BeZfyt5D.js → styles-BV30yZL6.js} +1 -1
  45. package/aftenpostenv2/es/{styles-qz3icO2I.js → styles-BVctDUCm.js} +1 -1
  46. package/aftenpostenv2/es/{styles-C-SPFJ1u.js → styles-BWKsmmOH.js} +1 -1
  47. package/aftenpostenv2/es/{styles-BGkSuxfG.js → styles-BniIe7BL.js} +1 -1
  48. package/aftenpostenv2/es/{styles-CN1ZGodG.js → styles-CASQXqQF.js} +1 -1
  49. package/aftenpostenv2/es/{styles-DT0w-UuZ.js → styles-CiMnH_dj.js} +1 -1
  50. package/aftenpostenv2/es/{styles-Cz4wgX8T.js → styles-CmhIK7dX.js} +1 -1
  51. package/aftenpostenv2/es/{styles-xro3TPE2.js → styles-D_GncrAP.js} +1 -1
  52. package/aftenpostenv2/es/{styles-C23QTq8C.js → styles-vsx5sf3R.js} +1 -1
  53. package/aftonbladet/cjs/index.d.ts +14 -6
  54. package/aftonbladet/cjs/index.js +1 -1
  55. package/aftonbladet/es/_auto-entry_aftonbladet-DVgMcFE2.js +1 -0
  56. package/aftonbladet/es/events-CXtxgpgZ.js +1 -0
  57. package/aftonbladet/es/{index-BlZB6F-_.js → index-3VDyqZtr.js} +1 -1
  58. package/aftonbladet/es/{index-BxavM0ix.js → index-BKt6R8I5.js} +1 -1
  59. package/{aftenposten/es/index-BR5XIfB1.js → aftonbladet/es/index-BWenmT-y.js} +1 -1
  60. package/aftonbladet/es/{index-BiQjBDTx.js → index-Bk_fQFBZ.js} +1 -1
  61. package/aftonbladet/es/{index-CACHUzk8.js → index-Bs1pDCKo.js} +1 -1
  62. package/aftonbladet/es/index-CHCNCZ9K.js +1 -0
  63. package/aftonbladet/es/index-CZSLakFQ.js +1 -0
  64. package/aftonbladet/es/{index-DY3lTbNz.js → index-D5UwsDK_.js} +1 -1
  65. package/aftonbladet/es/index.d.ts +14 -6
  66. package/aftonbladet/es/index.js +1 -1
  67. package/aftonbladet/es/{styles-BwoNWGMU.js → styles-B-UFBebp.js} +1 -1
  68. package/aftonbladet/es/{styles-DdWa3WR4.js → styles-BXKXVqt9.js} +1 -1
  69. package/aftonbladet/es/{styles-WB5MQdr8.js → styles-BiUtMr4i.js} +1 -1
  70. package/aftonbladet/es/{styles-CSY6WCee.js → styles-BiY81X1b.js} +1 -1
  71. package/aftonbladet/es/{styles-DSk80Xw5.js → styles-BvjHoiBQ.js} +1 -1
  72. package/aftonbladet/es/{styles-DHhYeLQg.js → styles-DBjCHe1k.js} +1 -1
  73. package/aftonbladet/es/{styles-BUwUWMkk.js → styles-DQhBtndR.js} +1 -1
  74. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-BHW11wOD.js +1 -0
  75. package/aftonbladetv2/es/events-Cbt7fIRG.js +1 -0
  76. package/aftonbladetv2/es/{index-BS_cgiVx.js → index-BXtOYeYP.js} +1 -1
  77. package/aftonbladetv2/es/index-Bu4I_y4M.js +1 -0
  78. package/aftonbladetv2/es/{index-CJK6gbdV.js → index-CwLQoNTT.js} +1 -1
  79. package/aftonbladetv2/es/{index-BAszEASA.js → index-D3Ia-EZk.js} +1 -1
  80. package/aftonbladetv2/es/{index-CMsqVKG_.js → index-D3Z17gr_.js} +1 -1
  81. package/aftonbladetv2/es/{index-GptaM2G6.js → index-D9yXYYbn.js} +1 -1
  82. package/aftonbladetv2/es/{index-CmBDcRgQ.js → index-DAL6SHFK.js} +1 -1
  83. package/aftonbladetv2/es/index-DWfqDsJT.js +1 -0
  84. package/aftonbladetv2/es/index.d.ts +14 -6
  85. package/aftonbladetv2/es/index.js +1 -1
  86. package/aftonbladetv2/es/{styles-C9uP2Yjh.js → styles-Bs-Cq1AY.js} +1 -1
  87. package/aftonbladetv2/es/{styles-DtHKest_.js → styles-CAyL6mdq.js} +1 -1
  88. package/aftonbladetv2/es/{styles-BUZTzbbN.js → styles-CTPt9Lgs.js} +1 -1
  89. package/aftonbladetv2/es/{styles-DeL7yXUR.js → styles-DG43gS2D.js} +1 -1
  90. package/aftonbladetv2/es/{styles-HIZnvE3y.js → styles-DZWmX5Rm.js} +1 -1
  91. package/aftonbladetv2/es/{styles-DrxvzT3b.js → styles-LMk-cSXD.js} +1 -1
  92. package/aftonbladetv2/es/{styles-9SQCcTFw.js → styles-lyuZaRpv.js} +1 -1
  93. package/bt/cjs/index.d.ts +14 -6
  94. package/bt/cjs/index.js +1 -1
  95. package/bt/es/_auto-entry_bt-Cd6ZI3Y6.js +1 -0
  96. package/bt/es/events-BVx4-U4K.js +1 -0
  97. package/bt/es/{index-BKqjZpW8.js → index-8Q4fU44W.js} +1 -1
  98. package/bt/es/{index-Cd67JkoX.js → index-BB1Uiz1J.js} +1 -1
  99. package/bt/es/index-BCzNukhO.js +1 -0
  100. package/bt/es/{index-CYDruSxp.js → index-BKnUo_Ri.js} +1 -1
  101. package/bt/es/{index-D_rnTuTK.js → index-C8b5gUJK.js} +1 -1
  102. package/{sa/es/index-9_ir-rcM.js → bt/es/index-Cwye_iJR.js} +1 -1
  103. package/bt/es/index-TSx_71q5.js +1 -0
  104. package/bt/es/{index-vE82QAjA.js → index-Xvt21gk6.js} +1 -1
  105. package/bt/es/index.d.ts +14 -6
  106. package/bt/es/index.js +1 -1
  107. package/bt/es/{styles-BJwiaOeV.js → styles-5t3tPKaG.js} +1 -1
  108. package/bt/es/{styles-D5T2ZpmU.js → styles-B7WDt48u.js} +1 -1
  109. package/bt/es/{styles-C3WS_t8v.js → styles-B7bRH-o5.js} +1 -1
  110. package/bt/es/{styles-D5xd7Hvt.js → styles-BbsXjAr9.js} +1 -1
  111. package/bt/es/{styles-Dxi9bw8S.js → styles-C9yeEU4B.js} +1 -1
  112. package/bt/es/{styles-6EXR5zYV.js → styles-CrVD1qCz.js} +1 -1
  113. package/bt/es/{styles-W-qv8i7u.js → styles-DMYjKKm7.js} +1 -1
  114. package/bt/es/{styles-DI3iahFH.js → styles-DX-lqUeD.js} +1 -1
  115. package/{sa/es/styles-CvGSGzSO.js → bt/es/styles-DyRc3czz.js} +1 -1
  116. package/bt/es/{styles-D_uzW3WW.js → styles-W6gDPTHn.js} +1 -1
  117. package/btv2/es/_auto-entry_btv2-Dr8STkQH.js +1 -0
  118. package/btv2/es/events-DNGi246N.js +1 -0
  119. package/btv2/es/{index-CO-rmFyi.js → index-4w40g94z.js} +1 -1
  120. package/btv2/es/{index-eb9jjS0f.js → index-B3QHgFOn.js} +1 -1
  121. package/{sav2/es/index-D4kR1aOA.js → btv2/es/index-BNV3AQ1d.js} +1 -1
  122. package/btv2/es/{index-CI9qR038.js → index-C-949J-6.js} +1 -1
  123. package/btv2/es/{index-CwQrOubz.js → index-DX9lYOEU.js} +1 -1
  124. package/btv2/es/index-Dl2Nf50P.js +1 -0
  125. package/btv2/es/{index-tjtRkdna.js → index-TpkuLu67.js} +1 -1
  126. package/btv2/es/index-sP1GW5L_.js +1 -0
  127. package/btv2/es/index.d.ts +14 -6
  128. package/btv2/es/index.js +1 -1
  129. package/{sav2/es/styles-JzezxrZr.js → btv2/es/styles-BGMihtNt.js} +1 -1
  130. package/{sav2/es/styles-DVdw9LnQ.js → btv2/es/styles-CFzk1f5W.js} +1 -1
  131. package/btv2/es/{styles-DtOFNwbp.js → styles-CKniyrya.js} +1 -1
  132. package/btv2/es/{styles-DF73Rp9s.js → styles-CY1egQLD.js} +1 -1
  133. package/btv2/es/{styles-CjAmkfwB.js → styles-CiYsInQU.js} +1 -1
  134. package/{vgv2/es/styles-CVtSN6IJ.js → btv2/es/styles-DN5m4mgm.js} +1 -1
  135. package/btv2/es/{styles-Drq6h0oi.js → styles-DPf3Hj9N.js} +1 -1
  136. package/{sav2/es/styles-BxI8QNaZ.js → btv2/es/styles-GUQHV5pf.js} +1 -1
  137. package/btv2/es/{styles-CYv9ccwN.js → styles-vlKcL7Qc.js} +1 -1
  138. package/e24/es/_auto-entry_e24-CMuPQ38R.js +1 -0
  139. package/e24/es/events-jJcm18p4.js +1 -0
  140. package/e24/es/{index-DzcT99p3.js → index-AEQHRILF.js} +1 -1
  141. package/e24/es/{index-CBF-dEe0.js → index-BRNTHOOz.js} +1 -1
  142. package/e24/es/index-BfMok4R1.js +1 -0
  143. package/e24/es/{index-CclIZUlD.js → index-CMCTb_6z.js} +1 -1
  144. package/{svd/es/index-BjBgwVgk.js → e24/es/index-CviRGV6d.js} +1 -1
  145. package/e24/es/{index-CdLXLLrr.js → index-DFq55Kwd.js} +1 -1
  146. package/e24/es/{index-DZc8k80J.js → index-DXC-qyte.js} +1 -1
  147. package/e24/es/{index-1AQljQ04.js → index-DsDhFC37.js} +1 -1
  148. package/e24/es/index.d.ts +14 -6
  149. package/e24/es/index.js +1 -1
  150. package/e24/es/{styles-7mXTCMFW.js → styles-92DbtnTF.js} +1 -1
  151. package/e24/es/{styles-CcW-Lo_s.js → styles-BCiwdDb8.js} +1 -1
  152. package/e24/es/{styles-OfdgLarb.js → styles-BdYM4hiY.js} +1 -1
  153. package/e24/es/{styles-DaDDz2Ik.js → styles-CLKB0Gnh.js} +1 -1
  154. package/e24/es/{styles-mu020Pov.js → styles-CRZPpzOz.js} +1 -1
  155. package/e24/es/{styles-BJDXJ_zX.js → styles-CY5RZWFx.js} +1 -1
  156. package/{tv4/es/styles-CyRqFFvK.js → e24/es/styles-CaIeNjZd.js} +1 -1
  157. package/e24/es/{styles-CtBvPN4a.js → styles-CaVeDJSk.js} +1 -1
  158. package/e24/es/{styles-CP89sUxz.js → styles-CjIbXs6u.js} +1 -1
  159. package/e24/es/{styles-xcdIFrAQ.js → styles-DKqcP_WQ.js} +1 -1
  160. package/e24/es/{styles-BA1aQZwV.js → styles-F9IKnOTo.js} +1 -1
  161. package/e24/es/{styles-DAhegP-P.js → styles-ZwUMHNel.js} +1 -1
  162. package/editory/cjs/index.d.ts +14 -6
  163. package/editory/es/index.d.ts +14 -6
  164. package/fotbollskanalen/cjs/index.d.ts +14 -6
  165. package/fotbollskanalen/cjs/index.js +1 -1
  166. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-DBQE9Sqq.js +1 -0
  167. package/fotbollskanalen/es/events-DFY5OXo8.js +1 -0
  168. package/fotbollskanalen/es/{index-Dz4VZObJ.js → index-B4WaoWH4.js} +1 -1
  169. package/fotbollskanalen/es/{index-ClH7lZYd.js → index-BNulCeAW.js} +1 -1
  170. package/fotbollskanalen/es/index-BgXwGgRF.js +1 -0
  171. package/fotbollskanalen/es/{index-BiQvWbga.js → index-Bspibtho.js} +1 -1
  172. package/fotbollskanalen/es/{index-CC5lc9r1.js → index-CUC_45dO.js} +1 -1
  173. package/fotbollskanalen/es/{index-B062g8iH.js → index-DSzMmVMi.js} +1 -1
  174. package/fotbollskanalen/es/{index-CVZdf_Rx.js → index-DqzGpDHE.js} +1 -1
  175. package/fotbollskanalen/es/index-_0sIAPUS.js +1 -0
  176. package/fotbollskanalen/es/index.d.ts +14 -6
  177. package/fotbollskanalen/es/index.js +1 -1
  178. package/fotbollskanalen/es/{styles-hbIy9al3.js → styles-BZqjq4mb.js} +1 -1
  179. package/fotbollskanalen/es/{styles-kIeF5Tee.js → styles-BmLteRhg.js} +1 -1
  180. package/fotbollskanalen/es/{styles-PUd99r1p.js → styles-CZpIXjyN.js} +1 -1
  181. package/fotbollskanalen/es/{styles-CYR96zEK.js → styles-Dysotb08.js} +1 -1
  182. package/fotbollskanalen/es/{styles-CqUKBxOa.js → styles-mFuiPoD5.js} +1 -1
  183. package/godt/cjs/index.d.ts +14 -6
  184. package/godt/cjs/index.js +1 -1
  185. package/kilkaya/cjs/index.d.ts +12 -6
  186. package/kilkaya/cjs/index.js +1 -1
  187. package/kilkaya/es/index.d.ts +12 -6
  188. package/kilkaya/es/index.js +1 -1
  189. package/klart/cjs/index.d.ts +14 -6
  190. package/klart/cjs/index.js +1 -1
  191. package/koket/cjs/index.d.ts +14 -6
  192. package/koket/cjs/index.js +1 -1
  193. package/koket/es/_auto-entry_koket-Dz-qx3Jv.js +1 -0
  194. package/koket/es/events-D8-Schg1.js +1 -0
  195. package/koket/es/{index-CiNrNpCh.js → index-B2ge48bj.js} +1 -1
  196. package/koket/es/index-BuYkggjm.js +1 -0
  197. package/koket/es/{index-BuYqePxS.js → index-CU8qqX2O.js} +1 -1
  198. package/koket/es/index-DDjwtmbb.js +1 -0
  199. package/koket/es/{index-CjQupFNS.js → index-DOCEkx14.js} +1 -1
  200. package/koket/es/{index-CJCSxpIT.js → index-DpR-4QVt.js} +1 -1
  201. package/koket/es/{index-yZxvx-bT.js → index-Z_VUjgP0.js} +1 -1
  202. package/koket/es/{index-CyHpFA0R.js → index-kM1fczgb.js} +1 -1
  203. package/koket/es/index.d.ts +14 -6
  204. package/koket/es/index.js +1 -1
  205. package/koket/es/{styles-MHpJAgKy.js → styles-BEhM1KWg.js} +1 -1
  206. package/koket/es/{styles-Bk2LqxJH.js → styles-CeL_HW5w.js} +1 -1
  207. package/{svdv2/es/styles-20l0ZXp-.js → koket/es/styles-Do1tuzki.js} +1 -1
  208. package/koket/es/{styles-D4lGHCAj.js → styles-LKdNCZIN.js} +1 -1
  209. package/{svdv2/es/styles-DGs-Apb5.js → koket/es/styles-ulsUkrWE.js} +1 -1
  210. package/minmote/cjs/index.d.ts +14 -6
  211. package/minmote/cjs/index.js +1 -1
  212. package/mtv/es/{_auto-entry_mtv-B3cjM82G.js → _auto-entry_mtv-B453H7Ed.js} +1 -1
  213. package/mtv/es/events-D1J-nlHl.js +1 -0
  214. package/{tv4/es/index-DY_KbzcE.js → mtv/es/index-B-Hc1BIw.js} +1 -1
  215. package/mtv/es/index-CFA1LPwY.js +1 -0
  216. package/mtv/es/index-Ck8M4dSC.js +1 -0
  217. package/mtv/es/{index-Dmzvy7Ik.js → index-DIr0kArr.js} +1 -1
  218. package/mtv/es/{index-DSI_fVUO.js → index-D_HMpAYl.js} +1 -1
  219. package/mtv/es/{index-CB2gEQ-J.js → index-DxDekWIX.js} +1 -1
  220. package/mtv/es/{index-KJr93ura.js → index-Ft7iLn6n.js} +1 -1
  221. package/mtv/es/{index-Dbca8Wdz.js → index-Y357TZLq.js} +1 -1
  222. package/mtv/es/index.d.ts +14 -6
  223. package/mtv/es/index.js +1 -1
  224. package/mtv/es/{styles-BmP7USe-.js → styles-Cs6qF9ko.js} +1 -1
  225. package/omni/es/_auto-entry_omni-DTqrIVcr.js +1 -0
  226. package/omni/es/events-DJsjeZi7.js +1 -0
  227. package/omni/es/{index-B5HK22Vl.js → index-BIchVbRg.js} +1 -1
  228. package/{tvnu/es/index-BYfYGSNg.js → omni/es/index-BIeMkeTF.js} +1 -1
  229. package/omni/es/{index-azZyW1ts.js → index-Bxp9oX7P.js} +1 -1
  230. package/omni/es/{index-DeIz92Od.js → index-CmhFrvl7.js} +1 -1
  231. package/{sav2/es/index-BBYMFdN4.js → omni/es/index-DTnfTq9B.js} +1 -1
  232. package/omni/es/index-Dwfmx6le.js +1 -0
  233. package/omni/es/{index-BYeRVmag.js → index-Is1qOfec.js} +1 -1
  234. package/omni/es/index-krqhkGbq.js +1 -0
  235. package/omni/es/index.d.ts +14 -6
  236. package/omni/es/index.js +1 -1
  237. package/omni/es/{styles-5P3kLgDF.js → styles-CEeens3C.js} +1 -1
  238. package/omni/es/{styles-OyV9dOII.js → styles-D6YRGiDZ.js} +1 -1
  239. package/omni/es/{styles-B2m8oYtD.js → styles-W7YgB3nI.js} +1 -1
  240. package/package.json +10 -10
  241. package/pent/cjs/index.d.ts +14 -6
  242. package/pent/cjs/index.js +1 -1
  243. package/{tracker → pulse}/cjs/index.d.ts +73 -67
  244. package/{tracker → pulse}/es/index.d.ts +73 -67
  245. package/sa/cjs/index.d.ts +14 -6
  246. package/sa/cjs/index.js +1 -1
  247. package/sa/es/_auto-entry_sa-xdSYfQW3.js +1 -0
  248. package/sa/es/events-Bh-uRJzK.js +1 -0
  249. package/sa/es/index-2luBqlxH.js +1 -0
  250. package/sa/es/{index-JYy4qQG6.js → index-BFsoLtKL.js} +1 -1
  251. package/sa/es/{index-DjrN0SZA.js → index-BH9i-LMX.js} +1 -1
  252. package/{bt/es/index-DKXXF8LP.js → sa/es/index-BOHQ5u1E.js} +1 -1
  253. package/sa/es/{index-YBmHpWiF.js → index-CbLFl7dG.js} +1 -1
  254. package/sa/es/{index-BwYbEx4x.js → index-CqZ_ASgU.js} +1 -1
  255. package/sa/es/index-DMiiKjDB.js +1 -0
  256. package/sa/es/{index-tU1ZiQ84.js → index-DVT2NnVF.js} +1 -1
  257. package/sa/es/index.d.ts +14 -6
  258. package/sa/es/index.js +1 -1
  259. package/sa/es/{styles-D-UU6pn-.js → styles-1N-EyzRS.js} +1 -1
  260. package/sa/es/{styles-h_zr_l4P.js → styles-5ijn5rkW.js} +1 -1
  261. package/sa/es/{styles-B_F8cP4o.js → styles-BHnvSwej.js} +1 -1
  262. package/sa/es/{styles-C89JtUkk.js → styles-BtHbk3d3.js} +1 -1
  263. package/sa/es/{styles-B-0aJxO5.js → styles-CudS_Jfu.js} +1 -1
  264. package/sa/es/{styles-BqdPsBYd.js → styles-D0XZJZ_u.js} +1 -1
  265. package/sa/es/{styles-DHMlzVqk.js → styles-DWR8dexV.js} +1 -1
  266. package/{vg/es/styles-BftlUeQl.js → sa/es/styles-Nf_wFxeb.js} +1 -1
  267. package/{vg/es/styles-oBIOt5yi.js → sa/es/styles-ZN8rvN9i.js} +1 -1
  268. package/sa/es/{styles-CDviFw25.js → styles-_XQZ6Tn3.js} +1 -1
  269. package/sav2/es/_auto-entry_sav2-BVr5g7DJ.js +1 -0
  270. package/sav2/es/events-DAJmyc4h.js +1 -0
  271. package/sav2/es/{index-ChVfVb8c.js → index-B2yiGjA8.js} +1 -1
  272. package/{tvnu/es/index-9zzx0gCz.js → sav2/es/index-B5VFiOMq.js} +1 -1
  273. package/sav2/es/{index-C23z_Fdq.js → index-C15vv8ea.js} +1 -1
  274. package/sav2/es/index-DSty9oAd.js +1 -0
  275. package/{omni/es/index-C6VmXAJr.js → sav2/es/index-FgKAoZ9H.js} +1 -1
  276. package/sav2/es/{index-DcwVCopY.js → index-ilVJq0DX.js} +1 -1
  277. package/{omni/es/index-CjsV26d4.js → sav2/es/index-nGVErSfz.js} +1 -1
  278. package/sav2/es/index-sQz-BGiD.js +1 -0
  279. package/sav2/es/index.d.ts +14 -6
  280. package/sav2/es/index.js +1 -1
  281. package/sav2/es/{styles-8a9zXaFT.js → styles-BPkm8e2X.js} +1 -1
  282. package/sav2/es/{styles-BDOtpcw6.js → styles-BrbD9PGj.js} +1 -1
  283. package/{vgv2/es/styles-BRaFX7WV.js → sav2/es/styles-BxsJsqSj.js} +1 -1
  284. package/{vgv2/es/styles-DdWYCYVG.js → sav2/es/styles-Cfx2vrpe.js} +1 -1
  285. package/{btv2/es/styles-oQ-oCuDf.js → sav2/es/styles-CtG2ZcEn.js} +1 -1
  286. package/sav2/es/{styles-ufHG0oA7.js → styles-CvKXPhnQ.js} +1 -1
  287. package/{btv2/es/styles-B_dmaxLE.js → sav2/es/styles-D4UiNBaQ.js} +1 -1
  288. package/sav2/es/{styles-TjcJMIfU.js → styles-DIa-JALL.js} +1 -1
  289. package/sav2/es/{styles-BdYV3edn.js → styles-Do-nYoLf.js} +1 -1
  290. package/svd/cjs/index.d.ts +14 -6
  291. package/svd/cjs/index.js +1 -1
  292. package/svd/es/_auto-entry_svd-BI_musJH.js +1 -0
  293. package/svd/es/events-AzZqXY1e.js +1 -0
  294. package/svd/es/index-3tXrBnvR.js +1 -0
  295. package/svd/es/{index-qRGuRdwE.js → index-B5qMTXMv.js} +1 -1
  296. package/{e24/es/index-C8tM3PuE.js → svd/es/index-C6AyRPjp.js} +1 -1
  297. package/svd/es/{index-AeCqP2yF.js → index-CiQQfKzW.js} +1 -1
  298. package/svd/es/index-D2pQJkg7.js +1 -0
  299. package/svd/es/{index-EeYKrIpw.js → index-D3Kb5QDm.js} +1 -1
  300. package/svd/es/{index-BH-0-UAm.js → index-DQB77O8y.js} +1 -1
  301. package/svd/es/{index-8Ph4DfEH.js → index-DqQq_CDi.js} +1 -1
  302. package/svd/es/index.d.ts +14 -6
  303. package/svd/es/index.js +1 -1
  304. package/svd/es/{styles-b5Mbel64.js → styles-AM0IHaSl.js} +1 -1
  305. package/svd/es/{styles-D3WtFJrl.js → styles-BHDwNZdf.js} +1 -1
  306. package/svd/es/{styles-BChXpFwa.js → styles-BpTekKgG.js} +1 -1
  307. package/svd/es/{styles-BOkVHh6p.js → styles-DDYRyrMQ.js} +1 -1
  308. package/svd/es/{styles-DnyHMYOV.js → styles-DRe5NfOe.js} +1 -1
  309. package/svd/es/{styles-B5eopUSV.js → styles-DtDS6S5M.js} +1 -1
  310. package/svd/es/{styles-D-LLlesE.js → styles-HgxHSPD5.js} +1 -1
  311. package/svdv2/es/_auto-entry_svdv2-DwTY7gwO.js +1 -0
  312. package/svdv2/es/events-EqTZTo4x.js +1 -0
  313. package/svdv2/es/{index-Dw7hXBBy.js → index-B-j8vFhK.js} +1 -1
  314. package/svdv2/es/{index-CmbZidp2.js → index-BDQkqw2L.js} +1 -1
  315. package/svdv2/es/{index-B-AiFnZ_.js → index-Cisx61f2.js} +1 -1
  316. package/svdv2/es/{index-BXDYT3_1.js → index-CzlQfFXE.js} +1 -1
  317. package/svdv2/es/index-EH8jUH-U.js +1 -0
  318. package/svdv2/es/{index-DLpvDR-I.js → index-G6M1R7mQ.js} +1 -1
  319. package/svdv2/es/{index-zYd4nbC3.js → index-MtFSLZJj.js} +1 -1
  320. package/svdv2/es/index-MvS7LwUU.js +1 -0
  321. package/svdv2/es/index.d.ts +14 -6
  322. package/svdv2/es/index.js +1 -1
  323. package/svdv2/es/{styles-CHpGV0wA.js → styles-B4A3kcMR.js} +1 -1
  324. package/{koket/es/styles-CJJn5fT9.js → svdv2/es/styles-B4mm7Oep.js} +1 -1
  325. package/svdv2/es/{styles-BH67mOg3.js → styles-BWvnhcRh.js} +1 -1
  326. package/svdv2/es/{styles-BJvoH6Jk.js → styles-D2vhLdOF.js} +1 -1
  327. package/{koket/es/styles-CaOTkmnD.js → svdv2/es/styles-D8X2M74O.js} +1 -1
  328. package/svdv2/es/{styles-C6NxggPn.js → styles-DEU4zSc4.js} +1 -1
  329. package/svdv2/es/{styles-Ci4Nbw0U.js → styles-Xi49B3Hp.js} +1 -1
  330. package/svdv2/es/{styles-DOO5Er36.js → styles-giyR-dVh.js} +1 -1
  331. package/tek/cjs/index.d.ts +14 -6
  332. package/tek/cjs/index.js +1 -1
  333. package/tv4/cjs/index.d.ts +14 -6
  334. package/tv4/cjs/index.js +1 -1
  335. package/tv4/es/_auto-entry_tv4-RFlZhi23.js +1 -0
  336. package/tv4/es/events-BvpAX5y8.js +1 -0
  337. package/tv4/es/{index-DwQGPNxM.js → index-B_gbOYij.js} +1 -1
  338. package/{mtv/es/index-3eJV2uf4.js → tv4/es/index-C-UPg3Sf.js} +1 -1
  339. package/tv4/es/index-CNz-Jeu8.js +1 -0
  340. package/tv4/es/{index-BMT26b41.js → index-CRSOPoHX.js} +1 -1
  341. package/tv4/es/{index-CvsR27tZ.js → index-D5SSA8ki.js} +1 -1
  342. package/tv4/es/{index-E2lf1BUb.js → index-DfcQFyBF.js} +1 -1
  343. package/tv4/es/index-j1rVQC5A.js +1 -0
  344. package/tv4/es/{index-Xw6gVmp3.js → index-lvr5lsa1.js} +1 -1
  345. package/tv4/es/index.d.ts +14 -6
  346. package/tv4/es/index.js +1 -1
  347. package/tv4/es/{styles-C04Zu8QC.js → styles-BAB9z9HL.js} +1 -1
  348. package/tv4/es/{styles-lCSubF4z.js → styles-BeHZulse.js} +1 -1
  349. package/tv4/es/{styles-Ctd-ZhYW.js → styles-D0YXoDqA.js} +1 -1
  350. package/{e24/es/styles-MloIpb_Z.js → tv4/es/styles-DrPo1mde.js} +1 -1
  351. package/tv4/es/{styles-dezj9l9t.js → styles-Vvkr2oP2.js} +1 -1
  352. package/tvnu/cjs/index.d.ts +14 -6
  353. package/tvnu/cjs/index.js +1 -1
  354. package/tvnu/es/_auto-entry_tvnu-DXVYaAzG.js +1 -0
  355. package/tvnu/es/events-oee8fOzn.js +1 -0
  356. package/tvnu/es/{index-DxcZwOdu.js → index-7qyef6kD.js} +1 -1
  357. package/tvnu/es/{index-C5hTShPW.js → index-B6N_5RMM.js} +1 -1
  358. package/{btv2/es/index-CAmnFTcf.js → tvnu/es/index-BPqod6Fg.js} +1 -1
  359. package/{sav2/es/index-BjACVq8t.js → tvnu/es/index-BlywnArN.js} +1 -1
  360. package/tvnu/es/{index-OazPvFTJ.js → index-D05ux0EY.js} +1 -1
  361. package/tvnu/es/{index-CFiCKgVo.js → index-DpT18tBb.js} +1 -1
  362. package/tvnu/es/index-qSk_hLIs.js +1 -0
  363. package/tvnu/es/index-xrdb1iaR.js +1 -0
  364. package/tvnu/es/index.d.ts +14 -6
  365. package/tvnu/es/index.js +1 -1
  366. package/tvnu/es/{styles-C8-5xecc.js → styles-BfU3CoTt.js} +1 -1
  367. package/{btv2/es/styles-wKCi4pBU.js → tvnu/es/styles-Bhct-6Vu.js} +1 -1
  368. package/tvnu/es/{styles-BDIRHptp.js → styles-C6nHIAXx.js} +1 -1
  369. package/tvnu/es/{styles-Cmst0_AX.js → styles-FoXQhZqd.js} +1 -1
  370. package/types/index.d.ts +14 -6
  371. package/vg/cjs/index.d.ts +14 -6
  372. package/vg/cjs/index.js +1 -1
  373. package/vg/es/_auto-entry_vg-DQLWY_R2.js +1 -0
  374. package/vg/es/events-B7q-NF9U.js +1 -0
  375. package/vg/es/{index-B1W-5bVk.js → index-BKtVhTvs.js} +1 -1
  376. package/vg/es/{index-C_4WJjcD.js → index-Bbk2lzFF.js} +1 -1
  377. package/vg/es/{index-BRtI2l1B.js → index-CyBOJwBu.js} +1 -1
  378. package/vg/es/{index-dtOp4Ft_.js → index-DAsq1Ptc.js} +1 -1
  379. package/vg/es/{index-DmMlC8yI.js → index-DHJNarUV.js} +1 -1
  380. package/vg/es/{index-BHzyngn6.js → index-DUIWPX_1.js} +1 -1
  381. package/vg/es/{index-Cq6BvtL_.js → index-ZZ4ShVz0.js} +1 -1
  382. package/vg/es/index-z2xfgR2S.js +1 -0
  383. package/vg/es/index.d.ts +14 -6
  384. package/vg/es/index.js +1 -1
  385. package/vg/es/{styles-C3VlGdBE.js → styles-B3WKPeMn.js} +1 -1
  386. package/vg/es/{styles-BRmjwW06.js → styles-B6g2m-ot.js} +1 -1
  387. package/vg/es/{styles-FCeEywSP.js → styles-BSkyRlcf.js} +1 -1
  388. package/vg/es/{styles-DtXm-Ref.js → styles-B_t2SZht.js} +1 -1
  389. package/vg/es/{styles-3vINy5hq.js → styles-B_xJTnKq.js} +1 -1
  390. package/vg/es/{styles-D5X2JwN6.js → styles-BhJlPd_Z.js} +1 -1
  391. package/{bt/es/styles-DATz2nfg.js → vg/es/styles-C3TeyIFu.js} +1 -1
  392. package/vg/es/{styles-B2_Ei2-8.js → styles-CE3Cldo6.js} +1 -1
  393. package/vg/es/{styles-C0TalB3F.js → styles-CMiS8G2G.js} +1 -1
  394. package/vg/es/{styles-BMzmUOJN.js → styles-CTsUdOeH.js} +1 -1
  395. package/vg/es/{styles-CuM4XL4r.js → styles-Dalw-rfT.js} +1 -1
  396. package/vg/es/{styles-BynvHO9c.js → styles-Ddwl9FKA.js} +1 -1
  397. package/vg/es/{styles-Ctk7QEVg.js → styles-JHiG-CVa.js} +1 -1
  398. package/vg/es/{styles-Ca-_g_6k.js → styles-efoK-usP.js} +1 -1
  399. package/{sa/es/styles-Dr725TOe.js → vg/es/styles-o63Bc_9O.js} +1 -1
  400. package/vg/es/{styles-D4eGgyZx.js → styles-qdbBzoLB.js} +1 -1
  401. package/vgv2/es/_auto-entry_vgv2-C7nbSyxw.js +1 -0
  402. package/vgv2/es/events-Dp1vC5Bd.js +1 -0
  403. package/vgv2/es/{index-CafbPF86.js → index-47v0nNpx.js} +1 -1
  404. package/vgv2/es/index-BFxrXWGC.js +1 -0
  405. package/vgv2/es/{index-xGSpaSdE.js → index-BlGWO9BO.js} +1 -1
  406. package/vgv2/es/{index-C-vtYSIl.js → index-CGqa79bg.js} +1 -1
  407. package/vgv2/es/{index-ApiYb4Jt.js → index-Cb0l1qxT.js} +1 -1
  408. package/vgv2/es/{index-ClLzNthF.js → index-CuJ--u5F.js} +1 -1
  409. package/vgv2/es/{index-CHpRUEKy.js → index-D-Qw-Ctt.js} +1 -1
  410. package/vgv2/es/index-DGAfzfRX.js +1 -0
  411. package/vgv2/es/index.d.ts +14 -6
  412. package/vgv2/es/index.js +1 -1
  413. package/vgv2/es/{styles-DH1S9E-P.js → styles-BBKEaIU9.js} +1 -1
  414. package/vgv2/es/{styles-jcmV6KpN.js → styles-BnIMZIgM.js} +1 -1
  415. package/vgv2/es/{styles-Xi9QM1Ib.js → styles-Brmtqrkz.js} +1 -1
  416. package/vgv2/es/{styles-sUixzFmN.js → styles-BwBie4YA.js} +1 -1
  417. package/vgv2/es/{styles-DORfMAqC.js → styles-C00b6ch1.js} +1 -1
  418. package/vgv2/es/{styles-DHYmekJh.js → styles-CNv9QjiT.js} +1 -1
  419. package/{btv2/es/styles-CJqhpmvB.js → vgv2/es/styles-CWknyZKE.js} +1 -1
  420. package/vgv2/es/{styles-XevVA7vP.js → styles-CeT_UM3Q.js} +1 -1
  421. package/vgv2/es/{styles-DRZLQWC9.js → styles-CeubT2mO.js} +1 -1
  422. package/{tvnu/es/styles-CdRqPKMc.js → vgv2/es/styles-Cwzu6dls.js} +1 -1
  423. package/{sav2/es/styles-DG_UYGmv.js → vgv2/es/styles-D5b2Ytdl.js} +1 -1
  424. package/vgv2/es/{styles-C-KCy1Kj.js → styles-DSR-holV.js} +1 -1
  425. package/vgv2/es/{styles-D0HFCOfi.js → styles-DXAwvzMq.js} +1 -1
  426. package/vgv2/es/{styles-BsM7FFsM.js → styles-Dm2TCMhS.js} +1 -1
  427. package/vgv2/es/styles-b420Zw-n.js +1 -0
  428. package/vgv2/es/{styles-B3tp8X5j.js → styles-cyu8frWQ.js} +1 -1
  429. package/aftenposten/es/_auto-entry_aftenposten-b0y6e9cl.js +0 -1
  430. package/aftenposten/es/events-DPNnYlfA.js +0 -1
  431. package/aftenposten/es/index-CN2oVSgJ.js +0 -1
  432. package/aftenposten/es/index-DHc_dP2Z.js +0 -1
  433. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-BLiPUAZ4.js +0 -1
  434. package/aftenpostenv2/es/events-DvmFMPMT.js +0 -1
  435. package/aftenpostenv2/es/index-3Qxcwyk4.js +0 -1
  436. package/aftenpostenv2/es/index-CYSeTeEv.js +0 -1
  437. package/aftonbladet/es/_auto-entry_aftonbladet-Bjlb4roy.js +0 -1
  438. package/aftonbladet/es/events-BajOdJr2.js +0 -1
  439. package/aftonbladet/es/index-BrjN2etN.js +0 -1
  440. package/aftonbladet/es/index-Cmwj6Oyf.js +0 -1
  441. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-Bm4ucKUa.js +0 -1
  442. package/aftonbladetv2/es/events-BoHrcmNf.js +0 -1
  443. package/aftonbladetv2/es/index-D2cSv_ZE.js +0 -1
  444. package/aftonbladetv2/es/index-XIy7hYZP.js +0 -1
  445. package/bt/es/_auto-entry_bt-DZ1dqndN.js +0 -1
  446. package/bt/es/events-tSdmJX0c.js +0 -1
  447. package/bt/es/index-XfeF_trd.js +0 -1
  448. package/bt/es/index-lKXFyrjV.js +0 -1
  449. package/btv2/es/_auto-entry_btv2-DHXIwMdb.js +0 -1
  450. package/btv2/es/events-Dy3xkIfQ.js +0 -1
  451. package/btv2/es/index-D1XmRKBk.js +0 -1
  452. package/btv2/es/index-DiDbJpSB.js +0 -1
  453. package/e24/es/_auto-entry_e24-Ccim4RT9.js +0 -1
  454. package/e24/es/events-Dsfcuo7x.js +0 -1
  455. package/e24/es/index-DllTZl0h.js +0 -1
  456. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-Bmf_9elh.js +0 -1
  457. package/fotbollskanalen/es/events-Cpw3ehR3.js +0 -1
  458. package/fotbollskanalen/es/index-Bs07rQzu.js +0 -1
  459. package/fotbollskanalen/es/index-CtOzQCgD.js +0 -1
  460. package/koket/es/_auto-entry_koket-BX9WzHD2.js +0 -1
  461. package/koket/es/events-Dp2GC5Vw.js +0 -1
  462. package/koket/es/index-BcMo8ZRV.js +0 -1
  463. package/koket/es/index-DGiTI497.js +0 -1
  464. package/mtv/es/events-DKT9xuzN.js +0 -1
  465. package/mtv/es/index-DRw9YeDg.js +0 -1
  466. package/mtv/es/index-DvOGa6J_.js +0 -1
  467. package/omni/es/_auto-entry_omni-h74CS6jz.js +0 -1
  468. package/omni/es/events-DGa3i45v.js +0 -1
  469. package/omni/es/index-CiPdtUk_.js +0 -1
  470. package/omni/es/index-D-UZw0Ix.js +0 -1
  471. package/sa/es/_auto-entry_sa-DtF0Jp_m.js +0 -1
  472. package/sa/es/events-t6Dioh-2.js +0 -1
  473. package/sa/es/index-B2H4G3ec.js +0 -1
  474. package/sa/es/index-DGgiXu9v.js +0 -1
  475. package/sav2/es/_auto-entry_sav2-B988cMVA.js +0 -1
  476. package/sav2/es/events-BH3lVEmT.js +0 -1
  477. package/sav2/es/index-DG0pgqM3.js +0 -1
  478. package/sav2/es/index-oDkS5sGI.js +0 -1
  479. package/svd/es/_auto-entry_svd-B3OGyfzI.js +0 -1
  480. package/svd/es/events-DRX-i4s2.js +0 -1
  481. package/svd/es/index-DykSatgR.js +0 -1
  482. package/svd/es/index-wtkCMbUC.js +0 -1
  483. package/svdv2/es/_auto-entry_svdv2-f1IlGTNa.js +0 -1
  484. package/svdv2/es/events-CXtnujik.js +0 -1
  485. package/svdv2/es/index-DJM2OdYx.js +0 -1
  486. package/svdv2/es/index-a1M3M8Wp.js +0 -1
  487. package/tv4/es/_auto-entry_tv4-CQCQFWRY.js +0 -1
  488. package/tv4/es/events-CpiHfOZJ.js +0 -1
  489. package/tv4/es/index-DBPML9U9.js +0 -1
  490. package/tv4/es/index-KoUFIm4v.js +0 -1
  491. package/tvnu/es/_auto-entry_tvnu-Dlrnxn0a.js +0 -1
  492. package/tvnu/es/events-DTV23Jiy.js +0 -1
  493. package/tvnu/es/index-CkKHFPG2.js +0 -1
  494. package/tvnu/es/index-vqrL4y93.js +0 -1
  495. package/vg/es/_auto-entry_vg-DxRZkQt7.js +0 -1
  496. package/vg/es/events-BpqeJPlQ.js +0 -1
  497. package/vg/es/index-446mhKqk.js +0 -1
  498. package/vgv2/es/_auto-entry_vgv2-DXKn5yIm.js +0 -1
  499. package/vgv2/es/events-BFEoOcat.js +0 -1
  500. package/vgv2/es/index-9Lax4_hx.js +0 -1
  501. package/vgv2/es/index-BgS-z4vY.js +0 -1
  502. package/vgv2/es/styles-eIQqqEL1.js +0 -1
  503. /package/{tracker → pulse}/cjs/index.js +0 -0
  504. /package/{tracker → pulse}/es/index.js +0 -0
@@ -98,6 +98,7 @@ interface AstAdObj {
98
98
  subtype?: string;
99
99
  renderer_url?: string;
100
100
  bidderId?: number | undefined;
101
+ uuid: string;
101
102
  }
102
103
  interface SafeFrameConfig {
103
104
  allowExpansionByPush?: boolean;
@@ -153,6 +154,13 @@ declare const DeviceTypes: {
153
154
  };
154
155
  type DeviceType = (typeof DeviceTypes)[keyof typeof DeviceTypes];
155
156
 
157
+ interface AdvertisingIdentifiers {
158
+ xandr?: {
159
+ ppId1?: string;
160
+ ppId2?: string;
161
+ };
162
+ }
163
+
156
164
  /**
157
165
  * SDK-agnostic shape of the pulse tracker instance advertory actually calls.
158
166
  * getActor is typed Promise<unknown> — nothing in this codebase reads its
@@ -168,12 +176,6 @@ interface PulseInstance {
168
176
  };
169
177
  }
170
178
 
171
- interface AdvertisingIdentifiers {
172
- xandr?: {
173
- ppId1?: string;
174
- ppId2?: string;
175
- };
176
- }
177
179
  interface PulseLegacyExtras {
178
180
  trackElementView?: (eventInput: unknown) => Promise<void>;
179
181
  trackElementClick?: (eventInput: unknown) => Promise<void>;
@@ -181,11 +183,15 @@ interface PulseLegacyExtras {
181
183
  trackViewUIElement?: (eventInput: unknown) => Promise<void>;
182
184
  trackLegacyViewUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
183
185
  trackLegacyClickUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
186
+ trackImpressionAd?: (eventInput: unknown) => Promise<unknown>;
187
+ trackEngagementAd?: (eventInput: unknown) => Promise<unknown>;
188
+ trackLoadAd?: (eventInput: unknown) => Promise<unknown>;
184
189
  }
185
190
  interface PulseConfig {
186
191
  clientId: string;
187
192
  instance: PulseInstance & PulseLegacyExtras;
188
193
  hasherUrl?: string;
194
+ adTrackingEnabled?: boolean;
189
195
  }
190
196
 
191
197
  declare const Newsrooms: {
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime");function t(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="svd",r="vg",i="sa",o="bt",a="aftonbladet",s="e24";class l{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:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class d{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class c{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:r}=this.parseKilkayaData(e);return{id:r,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 t(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;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===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return t(this,void 0,void 0,function*(){var t,n,r,i,o,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class u extends c{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),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 g=/^glci_/,v="gender_",p="geo_",f="male",y="female";class h extends c{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:r="",clientName:i="",creativeId:o="",link:a=""}=this.parseKilkayaData(e),{columnName:s,primaryPosition:l}=this.getPlacementData(e),d={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))||d;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:r,placement:{columnName:s,primaryPosition:l},tags:[i,r,c,u].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:i,"spt:creativeId":o,pageTitle:r,publicUrl:c,urlPath:u},url:location.origin}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:t}}getEventInput(e){return{object:this.getEventBaseData(e),target:this.getEventTarget(e)}}}const m="no",b="se",w="[data-k5a-teaser-analytics]",k=(e,t,n,r)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new(r===b?h:u)(e,t,n),a=new WeakMap,s=e=>{const t=a.get(e);t&&(t.disconnect(),a.delete(e))},l=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(w);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),s(n)):((e,t)=>{if(a.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(w);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),s(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=>{l.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})},P=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},T=(e,t)=>{console.warn("[Advertory WARN]: ",e)},E=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 P("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(P("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{P("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{P("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);P("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),C="cmp:loaded";let S="undefined"!=typeof window?window._tcf_:void 0,I=!1;const A=(e,n,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(P("TCF bypass param detected, returning consent: true"),!0):(P("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(I)return null;if(!S)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=S.getConsentedToAllSync();return P(`TCF consented to all is: ${t}`),S.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(P("Getting TCF consent manager..."),window._tcf_)return P("TCF consent manager is already available"),S=window._tcf_,void e(S);P("TCF consent manager is not available");const n=()=>{P("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(S=window._tcf_,e(S)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(C,n),I=!0,t(new Error("Timeout waiting for CMP to load"))},o);P("Listening for CMP loaded event..."),document.addEventListener(C,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return P(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===b,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===m;if(t||n)return P("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield E(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!S)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{P("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);S.onTcfReady(()=>{P("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),S.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class O{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return t(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return P("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return t(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}function j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U,L;var _=j(function(){if(L)return U;L=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(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 o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},U=s}());const M={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},N=(e,t)=>_(e,t,M),$=(e,t)=>Object.assign(Object.assign({},e),t),D=(e,t)=>{var n;return N(null!==(n=e)&&void 0!==n?n:{},t)},x={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},B=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||T("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||T("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||T("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||T("pageContext.deviceType is required."),n||T("pageOptions is required."),r||T("placements is required."),(null==i?void 0:i.defaultThreshold)||T("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,i;const o=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===(r=e.widescreenSwitching)||void 0===r?void 0:r.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==o?void 0:o[t])&&T(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},F={placements:(e,t)=>t,takeover:D,refreshConfig:$,editory:D,appearanceConfig:D,pageContext:$,pageOptions:$,pageSectionsSelectors:$,tcf:$};class K{set(e){B(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");((e,t)=>{const n=e;for(const e of Object.keys(F)){const r=t[e];void 0!==r&&(n[e]=F[e](n[e],r))}})(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=N(K.DEFAULT_SITE_HANDLERS,e)}}K.DEFAULT_SITE_HANDLERS={siteEvents:x,initNativeAd:()=>{}};const q=new K;q.modifyConfigProperties.bind(q);const R=864e5,V=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return P("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=R)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=R)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return P("Error with parsing localStorage data"),null}}}})(),z=e=>e.startsWith("glci_"),H=()=>{var e;return((e=[])=>e.filter(z))(null!==(e=(()=>{const e=V.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},J=()=>t(void 0,void 0,void 0,function*(){try{const n=yield(e=500,t(void 0,void 0,void 0,function*(){return Promise.race([t(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new O(n),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===f||o===y?`${v}${o}`:void 0}catch(e){return}var e}),W=()=>t(void 0,void 0,void 0,function*(){const e=[],t=yield J(),n=(()=>{const e=H().map(e=>`${p}${e.replace(g,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),X="front";class G{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===X?"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:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class Q{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class Y{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class Z{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class ee{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===X?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class te{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 ne{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:c,countryCode:u}}){if(!(null==e?void 0:e.instance))return;const g={[r]:new l,[s]:new G,"no-aftenposten":new Q,[o]:new Y,"no-bergenstidende":new Y,[i]:new Z,"no-stavangeraftenblad":new Z,[n]:new ee,[a]:new te}[c]||new d;k(e.instance,g,t,u)}injectKilkayaMeta(e){return t(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield W();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(P(`Kilkaya event for slot: ${n}`),!n)return void P("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(P(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):P("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="flex";(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"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return t(this,void 0,void 0,function*(){yield((e,...n)=>t(void 0,[e,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return t(this,void 0,void 0,function*(){var n,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,n,r,...i)=>t(void 0,[e,n,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return P(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return P(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=A(e,0,n);return(yield i())?(P(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(P(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(n=s.options)||void 0===n?void 0:n.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e)})}}exports.Kilkaya=({placementName:t,slotTag:n,fallbackTargetId:r,children:i,pulseData:o,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},l=s(o,"data-pulse"),d=s(a,"data");return e.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},l,d,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("k5a-stream",{name:t,"slot-tag":n}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":r,style:{display:"none"},children:i})]}))},exports.runKilkaya=e=>t(void 0,void 0,void 0,function*(){const t=new ne;yield t.run(e)});
1
+ "use strict";var e=require("react/jsx-runtime");function t(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const n="svd",r="vg",i="sa",o="bt",a="aftonbladet",s="e24";class l{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:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class d{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const c=(e,t)=>{new IntersectionObserver((e,n)=>{for(const r of e)if(r.intersectionRatio>=.5){n.disconnect(),t();break}},{threshold:.5}).observe(e)};class u{constructor(e,t){this.pulse=e,this.publisher=t}static extractAdFormat(e){return e.replace(/_\d.*$/,"")}computeInvCode(){}buildPlacement(e){return{placementId:null!=e?e:""}}trackLoad(){var e,t;null===(t=(e=this.pulse).trackLoadAd)||void 0===t||t.call(e,{object:this.buildAdObject(),placement:this.buildPlacement(this.computeInvCode())})}trackImpression(){const e=document.querySelector(`#${this.getTargetId()}`);e&&c(e,()=>{var e,t;return null===(t=(e=this.pulse).trackImpressionAd)||void 0===t?void 0:t.call(e,{object:this.buildAdObject(),placement:this.buildPlacement(this.computeInvCode())})})}trackEngagement(e){var t,n;null===(n=(t=this.pulse).trackEngagementAd)||void 0===n||n.call(t,{object:this.buildAdObject(),placement:this.buildPlacement(null!=e?e:this.computeInvCode()),engagement:{action:"Click",elementName:this.getTargetId()}})}}const g="[data-k5a-teaser-analytics]";class p extends u{constructor(e,t,n,r){super(e,""),this.root=t,this.newsroomStrategy=n,this.pageType=r}getTargetId(){return this.root.id}buildAdObject(){return this.getEventInput("view")}parseKilkayaData(){const e=this.root.querySelector("article");if(!e)return{};const t=e.dataset.k5aTeaserAnalytics;try{return t?JSON.parse(t):{}}catch(e){return{}}}mapPageType(e){var t;return null!==(t={front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[null!=e?e:"front"])&&void 0!==t?t:"Frontpage"}getArticleId(){var e;return null!==(e=location.pathname.split("/").slice(-2,-1).pop())&&void 0!==e?e:""}getPlacementData(){var e,t;const n=this.root.closest(".kilkaya-wrapper");return{columnName:null!==(e=null==n?void 0:n.dataset.pulseColumnname)&&void 0!==e?e:"",primaryPosition:Number(null==n?void 0:n.dataset.pulsePrimaryposition)||0,secondaryPosition:Number(null==n?void 0:n.dataset.pulseSecondaryposition)||0,slot:null!==(t=null==n?void 0:n.dataset.slotTag)&&void 0!==t?t:""}}getEventTarget(){const{link:e,itemId:t,title:n}=this.parseKilkayaData();return{id:t,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:e}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}waitForAnalyticsData(e){const t=this.root.querySelector(g);if(Boolean(null==t?void 0:t.dataset.k5aTeaserAnalytics))return void e();const n=new MutationObserver(()=>{const t=this.root.querySelector(g);Boolean(null==t?void 0:t.dataset.k5aTeaserAnalytics)&&(n.disconnect(),e())});n.observe(this.root,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]})}trackLoad(){}trackImpression(){c(this.root,()=>this.waitForAnalyticsData(()=>{var e,t;const n=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:this.parseKilkayaData().placement}});window.dispatchEvent(n);const r=this.getEventInput("view");this.pulse.trackLegacyViewUIElement?this.pulse.trackLegacyViewUIElement(r):this.pulse.trackViewUIElement?this.pulse.trackViewUIElement(r):null===(t=(e=this.pulse).trackElementView)||void 0===t||t.call(e,r)}))}trackEngagement(e){var t,n;const r=this.getEventInput("click");this.pulse.trackLegacyClickUIElement?this.pulse.trackLegacyClickUIElement(r):this.pulse.trackClickUIElement?this.pulse.trackClickUIElement(r):null===(n=(t=this.pulse).trackElementClick)||void 0===n||n.call(t,r)}}class v extends p{getEventBaseData(){var e,t,n,r;const{clientName:i,creativeId:o,itemId:a,placement:s}=this.parseKilkayaData(),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u=this.mapPageType(this.pageType),g=null===(e=this.newsroomStrategy)||void 0===e?void 0:e.getPulsePageId(null!==(t=this.pageType)&&void 0!==t?t:"front",this.getArticleId());return Object.assign(Object.assign({},a&&{"@id":`sdrn:kilkaya:teaser:${a}`}),{"@type":"UIElement",position:s,elementType:"Article",custom:{customer:i,creativeId:null!=o?o:a},page:{"@id":null!=g?g:s,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===r?void 0:r.call(n,this.root)})}getEventInput(e){return{object:this.getEventBaseData(),partnerstudio:this.getEventPartnerstudioData(e),target:this.getEventTarget(),provider:this.getProviderData()}}getEventPartnerstudioData(e){return Object.assign(Object.assign({},this.parseKilkayaData()),{type:e,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}class m extends p{getEventBaseData(){var e,t;const{title:n="",clientName:r="",creativeId:i="",link:o="",itemId:a=""}=this.parseKilkayaData(),{columnName:s,primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u={publicUrl:o,urlPath:o?new URL(o).pathname:""},{publicUrl:g,urlPath:p}=o&&(null===(t=null===(e=this.newsroomStrategy)||void 0===e?void 0:e.transformUrl)||void 0===t?void 0:t.call(e,o))||u;return Object.assign(Object.assign({},a&&{"@id":`sdrn:kilkaya:teaser:${a}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:n,placement:{columnName:s,primaryPosition:l,secondaryPosition:d,source:c},tags:[r,n,g,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:r,"spt:creativeId":i,pageTitle:n,publicUrl:g,urlPath:p},url:location.origin})}getEventInput(e){return{object:this.getEventBaseData(),target:this.getEventTarget()}}}const h="no",f="se",y=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},b=(e,t)=>{console.warn("[Advertory WARN]: ",e)},w=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 y("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(y("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{y("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{y("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);y("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),k="cmp:loaded";let P="undefined"!=typeof window?window._tcf_:void 0,T=!1;const E=(e,n,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(y("TCF bypass param detected, returning consent: true"),!0):(y("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(T)return null;if(!P)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=P.getConsentedToAllSync();return y(`TCF consented to all is: ${t}`),P.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(y("Getting TCF consent manager..."),window._tcf_)return y("TCF consent manager is already available"),P=window._tcf_,void e(P);y("TCF consent manager is not available");const n=()=>{y("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(P=window._tcf_,e(P)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(k,n),T=!0,t(new Error("Timeout waiting for CMP to load"))},o);y("Listening for CMP loaded event..."),document.addEventListener(k,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>t(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return y(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===f,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===h;if(t||n)return y("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield w(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!P)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{y("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);P.onTcfReady(()=>{y("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),P.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class I{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return t(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return y("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return t(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}function C(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var A,S;var O=C(function(){if(S)return A;S=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(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 o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},A=s}());const j={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},L=(e,t)=>O(e,t,j),U=(e,t)=>Object.assign(Object.assign({},e),t),_=(e,t)=>{var n;return L(null!==(n=e)&&void 0!==n?n:{},t)},N={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},$=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||b("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||b("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||b("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||b("pageContext.deviceType is required."),n||b("pageOptions is required."),r||b("placements is required."),(null==i?void 0:i.defaultThreshold)||b("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,i;const o=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===(r=e.widescreenSwitching)||void 0===r?void 0:r.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==o?void 0:o[t])&&b(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},M={placements:(e,t)=>t,takeover:_,refreshConfig:U,editory:_,appearanceConfig:_,pageContext:U,pageOptions:U,pageSectionsSelectors:U,tcf:U};class x{set(e){$(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");((e,t)=>{const n=e;for(const e of Object.keys(M)){const r=t[e];void 0!==r&&(n[e]=M[e](n[e],r))}})(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=L(x.DEFAULT_SITE_HANDLERS,e)}}x.DEFAULT_SITE_HANDLERS={siteEvents:N,initNativeAd:()=>{}};const D=new x;D.modifyConfigProperties.bind(D);const F=864e5,B=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return y("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=F)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=F)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return y("Error with parsing localStorage data"),null}}}})(),q=e=>e.startsWith("glci_"),K=()=>{var e;return((e=[])=>e.filter(q))(null!==(e=(()=>{const e=B.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},R=/^glci_/,V="gender_",H="geo_",z="male",J="female",W=()=>t(void 0,void 0,void 0,function*(){try{const n=yield(e=500,t(void 0,void 0,void 0,function*(){return Promise.race([t(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new I(n),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===z||o===J?`${V}${o}`:void 0}catch(e){return}var e}),X=()=>t(void 0,void 0,void 0,function*(){const e=[],t=yield W(),n=(()=>{const e=K().map(e=>`${H}${e.replace(R,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),G="front";class Q{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===G?"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:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class Y{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class Z{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class ee{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class te{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===G?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class ne{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 re{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:c,countryCode:u}}){if(!(null==e?void 0:e.instance))return;const g={[r]:new l,[s]:new Q,"no-aftenposten":new Y,[o]:new Z,"no-bergenstidende":new Z,[i]:new ee,"no-stavangeraftenblad":new ee,[n]:new te,[a]:new ne}[c]||new d;((e,t,n,r)=>{const i=document.querySelectorAll("k5a-stream");i.length&&i.forEach(i=>{const o=r===f?new m(e,i,t):new v(e,i,t,n);o.trackImpression(),i.addEventListener("click",()=>o.trackEngagement())})})(e.instance,g,t,u)}injectKilkayaMeta(e){return t(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield X();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(y(`Kilkaya event for slot: ${n}`),!n)return void y("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(y(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):y("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="flex";(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"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return t(this,void 0,void 0,function*(){yield((e,...n)=>t(void 0,[e,...n],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return t(this,void 0,void 0,function*(){var n,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,n,r,...i)=>t(void 0,[e,n,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return y(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return y(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=E(e,0,n);return(yield i())?(y(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(y(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(n=s.options)||void 0===n?void 0:n.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e)})}}exports.Kilkaya=({placementName:t,slotTag:n,fallbackTargetId:r,children:i,pulseData:o,htmlAttributes:a})=>{const s=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},l=s(o,"data-pulse"),d=s(a,"data");return e.jsxs("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"},"data-slot-tag":n},l,d,{children:[e.jsx("div",{className:"inscreen-target"}),e.jsx("k5a-stream",{name:t,"slot-tag":n}),e.jsx("div",{className:"container"}),e.jsx("div",{className:"fallback","data-fallback-target-id":r,style:{display:"none"},children:i})]}))},exports.runKilkaya=e=>t(void 0,void 0,void 0,function*(){const t=new re;yield t.run(e)});
@@ -98,6 +98,7 @@ interface AstAdObj {
98
98
  subtype?: string;
99
99
  renderer_url?: string;
100
100
  bidderId?: number | undefined;
101
+ uuid: string;
101
102
  }
102
103
  interface SafeFrameConfig {
103
104
  allowExpansionByPush?: boolean;
@@ -153,6 +154,13 @@ declare const DeviceTypes: {
153
154
  };
154
155
  type DeviceType = (typeof DeviceTypes)[keyof typeof DeviceTypes];
155
156
 
157
+ interface AdvertisingIdentifiers {
158
+ xandr?: {
159
+ ppId1?: string;
160
+ ppId2?: string;
161
+ };
162
+ }
163
+
156
164
  /**
157
165
  * SDK-agnostic shape of the pulse tracker instance advertory actually calls.
158
166
  * getActor is typed Promise<unknown> — nothing in this codebase reads its
@@ -168,12 +176,6 @@ interface PulseInstance {
168
176
  };
169
177
  }
170
178
 
171
- interface AdvertisingIdentifiers {
172
- xandr?: {
173
- ppId1?: string;
174
- ppId2?: string;
175
- };
176
- }
177
179
  interface PulseLegacyExtras {
178
180
  trackElementView?: (eventInput: unknown) => Promise<void>;
179
181
  trackElementClick?: (eventInput: unknown) => Promise<void>;
@@ -181,11 +183,15 @@ interface PulseLegacyExtras {
181
183
  trackViewUIElement?: (eventInput: unknown) => Promise<void>;
182
184
  trackLegacyViewUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
183
185
  trackLegacyClickUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
186
+ trackImpressionAd?: (eventInput: unknown) => Promise<unknown>;
187
+ trackEngagementAd?: (eventInput: unknown) => Promise<unknown>;
188
+ trackLoadAd?: (eventInput: unknown) => Promise<unknown>;
184
189
  }
185
190
  interface PulseConfig {
186
191
  clientId: string;
187
192
  instance: PulseInstance & PulseLegacyExtras;
188
193
  hasherUrl?: string;
194
+ adTrackingEnabled?: boolean;
189
195
  }
190
196
 
191
197
  declare const Newsrooms: {
@@ -1 +1 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const r="svd",i="vg",o="sa",a="bt",s="aftonbladet",l="e24";class d{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:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class c{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}class u{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:r}=this.parseKilkayaData(e);return{id:r,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 n(this,void 0,void 0,function*(){var t,n,r,i,o,a,s,l,d;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===(r=this.pulse)||void 0===r?void 0:r.trackLegacyViewUIElement)||void 0===i||i.call(r,u):(null===(o=this.pulse)||void 0===o?void 0:o.trackViewUIElement)?null===(s=null===(a=this.pulse)||void 0===a?void 0:a.trackViewUIElement)||void 0===s||s.call(a,u):null===(d=null===(l=this.pulse)||void 0===l?void 0:l.trackElementView)||void 0===d||d.call(l,u)})}trackContentClick(e){return n(this,void 0,void 0,function*(){var t,n,r,i,o,a;if(!this.pulse)return;const s=this.getEventInput(e,"click");this.pulse.trackLegacyClickUIElement?null===(n=(t=this.pulse).trackLegacyClickUIElement)||void 0===n||n.call(t,s):this.pulse.trackClickUIElement?null===(i=(r=this.pulse).trackClickUIElement)||void 0===i||i.call(r,s):null===(a=(o=this.pulse).trackElementClick)||void 0===a||a.call(o,s)})}}class g extends u{constructor(e,t,n){super(e,t),this.pulse=e,this.newsroomStrategy=t,this.pageType=n}getEventBaseData(e){var t,n,r,i,o,a;const{clientName:s,creativeId:l,itemId:d,placement:c}=this.parseKilkayaData(e),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(this.pageType||"front",this.getArticleId());return{"@id":null!==(i=null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getPulseObjectId)||void 0===r?void 0:r.call(n))&&void 0!==i?i:c,"@type":"UIElement",position:c,elementType:"Article",custom:{customer:s,creativeId:null!=l?l:d},page:{"@id":null!=g?g:c,"@type":u,url:location.origin},tags:null===(a=null===(o=this.newsroomStrategy)||void 0===o?void 0:o.getTags)||void 0===a?void 0:a.call(o,e)}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),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 v=/^glci_/,p="gender_",f="geo_",h="male",m="female";class y extends u{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:r="",clientName:i="",creativeId:o="",link:a=""}=this.parseKilkayaData(e),{columnName:s,primaryPosition:l}=this.getPlacementData(e),d={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))||d;return{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:r,placement:{columnName:s,primaryPosition:l},tags:[i,r,c,u].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:i,"spt:creativeId":o,pageTitle:r,publicUrl:c,urlPath:u},url:location.origin}}getEventTarget(e){const{link:t,itemId:n,title:r}=this.parseKilkayaData(e);return{id:n,name:this.normalizePlacementTitle(null!=r?r:""),type:"Page",url:t}}getEventInput(e){return{object:this.getEventBaseData(e),target:this.getEventTarget(e)}}}const b="no",w="se",k="[data-k5a-teaser-analytics]",P=(e,t,n,r)=>{const i=document.querySelectorAll("k5a-stream");if(!i.length)return;const o=new(r===w?y:g)(e,t,n),a=new WeakMap,s=e=>{const t=a.get(e);t&&(t.disconnect(),a.delete(e))},l=new IntersectionObserver((e,t)=>{e.forEach(e=>{if(!e.isIntersecting)return;const n=e.target,r=n.querySelector(k);Boolean(null==r?void 0:r.dataset.k5aTeaserAnalytics)?(o.trackContentView(n),t.unobserve(e.target),s(n)):((e,t)=>{if(a.has(e))return;const n=new MutationObserver(()=>{const n=e.querySelector(k);Boolean(null==n?void 0:n.dataset.k5aTeaserAnalytics)&&(o.trackContentView(e),t.unobserve(e),s(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=>{l.observe(e),e.addEventListener("click",()=>o.trackContentClick(e))})},T=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},E=(e,t)=>{console.warn("[Advertory WARN]: ",e)},C=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 T("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(T("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{T("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{T("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);T("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),S="cmp:loaded";let I="undefined"!=typeof window?window._tcf_:void 0,A=!1;const O=(e,t,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(T("TCF bypass param detected, returning consent: true"),!0):(T("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(A)return null;if(!I)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=I.getConsentedToAllSync();return T(`TCF consented to all is: ${t}`),I.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(T("Getting TCF consent manager..."),window._tcf_)return T("TCF consent manager is already available"),I=window._tcf_,void e(I);T("TCF consent manager is not available");const n=()=>{T("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(I=window._tcf_,e(I)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(S,n),A=!0,t(new Error("Timeout waiting for CMP to load"))},o);T("Listening for CMP loaded event..."),document.addEventListener(S,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return T(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===w,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===b;if(t||n)return T("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield C(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!I)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{T("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);I.onTcfReady(()=>{T("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),I.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class U{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return n(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return T("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return n(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}function j(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var L,_;var M=j(function(){if(_)return L;_=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(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 o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},L=s}());const N={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},$=(e,t)=>M(e,t,N),D=(e,t)=>Object.assign(Object.assign({},e),t),B=(e,t)=>{var n;return $(null!==(n=e)&&void 0!==n?n:{},t)},F={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},K=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||E("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||E("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||E("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||E("pageContext.deviceType is required."),n||E("pageOptions is required."),r||E("placements is required."),(null==i?void 0:i.defaultThreshold)||E("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,i;const o=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===(r=e.widescreenSwitching)||void 0===r?void 0:r.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==o?void 0:o[t])&&E(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},q={placements:(e,t)=>t,takeover:B,refreshConfig:D,editory:B,appearanceConfig:B,pageContext:D,pageOptions:D,pageSectionsSelectors:D,tcf:D};class x{set(e){K(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");((e,t)=>{const n=e;for(const e of Object.keys(q)){const r=t[e];void 0!==r&&(n[e]=q[e](n[e],r))}})(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=$(x.DEFAULT_SITE_HANDLERS,e)}}x.DEFAULT_SITE_HANDLERS={siteEvents:F,initNativeAd:()=>{}};const R=new x;R.modifyConfigProperties.bind(R);const V=864e5,z=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return T("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=V)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=V)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return T("Error with parsing localStorage data"),null}}}})(),H=e=>e.startsWith("glci_"),J=()=>{var e;return((e=[])=>e.filter(H))(null!==(e=(()=>{const e=z.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},W=()=>n(void 0,void 0,void 0,function*(){try{const t=yield(e=500,n(void 0,void 0,void 0,function*(){return Promise.race([n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new U(t),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===h||o===m?`${p}${o}`:void 0}catch(e){return}var e}),X=()=>n(void 0,void 0,void 0,function*(){const e=[],t=yield W(),n=(()=>{const e=J().map(e=>`${f}${e.replace(v,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),G="front";class Q{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===G?"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:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class Y{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class Z{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class ee{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class te{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===G?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class ne{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 re{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n,countryCode:u}}){if(!(null==e?void 0:e.instance))return;const g={[i]:new d,[l]:new Q,"no-aftenposten":new Y,[a]:new Z,"no-bergenstidende":new Z,[o]:new ee,"no-stavangeraftenblad":new ee,[r]:new te,[s]:new ne}[n]||new c;P(e.instance,g,t,u)}injectKilkayaMeta(e){return n(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield X();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(T(`Kilkaya event for slot: ${n}`),!n)return void T("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(T(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):T("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="flex";(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"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return n(this,void 0,void 0,function*(){yield((e,...t)=>n(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return n(this,void 0,void 0,function*(){var t,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,t,r,...i)=>n(void 0,[e,t,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return T(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return T(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=O(e,0,n);return(yield i())?(T(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(T(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(t=s.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e)})}}const ie=({placementName:n,slotTag:r,fallbackTargetId:i,children:o,pulseData:a,htmlAttributes:s})=>{const l=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},d=l(a,"data-pulse"),c=l(s,"data");return e("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"}},d,c,{children:[t("div",{className:"inscreen-target"}),t("k5a-stream",{name:n,"slot-tag":r}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},oe=e=>n(void 0,void 0,void 0,function*(){const t=new re;yield t.run(e)});export{ie as Kilkaya,oe as runKilkaya};
1
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";function n(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})}"function"==typeof SuppressedError&&SuppressedError;const r="svd",i="vg",o="sa",a="bt",s="aftonbladet",l="e24";class d{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:r,pathname:i}=new URL(n);if(!r.includes("www.vg.no")&&!i.includes("annonsorinnhold"))return[n];const o=i.split("/");return o.length?[...o.filter(Boolean).slice(1).map(e=>e),n]:[n]}}class c{getPulseObjectId(){return""}getPulsePageId(e,t){return""}}const u=(e,t)=>{new IntersectionObserver((e,n)=>{for(const r of e)if(r.intersectionRatio>=.5){n.disconnect(),t();break}},{threshold:.5}).observe(e)};class g{constructor(e,t){this.pulse=e,this.publisher=t}static extractAdFormat(e){return e.replace(/_\d.*$/,"")}computeInvCode(){}buildPlacement(e){return{placementId:null!=e?e:""}}trackLoad(){var e,t;null===(t=(e=this.pulse).trackLoadAd)||void 0===t||t.call(e,{object:this.buildAdObject(),placement:this.buildPlacement(this.computeInvCode())})}trackImpression(){const e=document.querySelector(`#${this.getTargetId()}`);e&&u(e,()=>{var e,t;return null===(t=(e=this.pulse).trackImpressionAd)||void 0===t?void 0:t.call(e,{object:this.buildAdObject(),placement:this.buildPlacement(this.computeInvCode())})})}trackEngagement(e){var t,n;null===(n=(t=this.pulse).trackEngagementAd)||void 0===n||n.call(t,{object:this.buildAdObject(),placement:this.buildPlacement(null!=e?e:this.computeInvCode()),engagement:{action:"Click",elementName:this.getTargetId()}})}}const p="[data-k5a-teaser-analytics]";class v extends g{constructor(e,t,n,r){super(e,""),this.root=t,this.newsroomStrategy=n,this.pageType=r}getTargetId(){return this.root.id}buildAdObject(){return this.getEventInput("view")}parseKilkayaData(){const e=this.root.querySelector("article");if(!e)return{};const t=e.dataset.k5aTeaserAnalytics;try{return t?JSON.parse(t):{}}catch(e){return{}}}mapPageType(e){var t;return null!==(t={front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[null!=e?e:"front"])&&void 0!==t?t:"Frontpage"}getArticleId(){var e;return null!==(e=location.pathname.split("/").slice(-2,-1).pop())&&void 0!==e?e:""}getPlacementData(){var e,t;const n=this.root.closest(".kilkaya-wrapper");return{columnName:null!==(e=null==n?void 0:n.dataset.pulseColumnname)&&void 0!==e?e:"",primaryPosition:Number(null==n?void 0:n.dataset.pulsePrimaryposition)||0,secondaryPosition:Number(null==n?void 0:n.dataset.pulseSecondaryposition)||0,slot:null!==(t=null==n?void 0:n.dataset.slotTag)&&void 0!==t?t:""}}getEventTarget(){const{link:e,itemId:t,title:n}=this.parseKilkayaData();return{id:t,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:e}}normalizePlacementTitle(e){return e.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}waitForAnalyticsData(e){const t=this.root.querySelector(p);if(Boolean(null==t?void 0:t.dataset.k5aTeaserAnalytics))return void e();const n=new MutationObserver(()=>{const t=this.root.querySelector(p);Boolean(null==t?void 0:t.dataset.k5aTeaserAnalytics)&&(n.disconnect(),e())});n.observe(this.root,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]})}trackLoad(){}trackImpression(){u(this.root,()=>this.waitForAnalyticsData(()=>{var e,t;const n=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:this.parseKilkayaData().placement}});window.dispatchEvent(n);const r=this.getEventInput("view");this.pulse.trackLegacyViewUIElement?this.pulse.trackLegacyViewUIElement(r):this.pulse.trackViewUIElement?this.pulse.trackViewUIElement(r):null===(t=(e=this.pulse).trackElementView)||void 0===t||t.call(e,r)}))}trackEngagement(e){var t,n;const r=this.getEventInput("click");this.pulse.trackLegacyClickUIElement?this.pulse.trackLegacyClickUIElement(r):this.pulse.trackClickUIElement?this.pulse.trackClickUIElement(r):null===(n=(t=this.pulse).trackElementClick)||void 0===n||n.call(t,r)}}class m extends v{getEventBaseData(){var e,t,n,r;const{clientName:i,creativeId:o,itemId:a,placement:s}=this.parseKilkayaData(),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u=this.mapPageType(this.pageType),g=null===(e=this.newsroomStrategy)||void 0===e?void 0:e.getPulsePageId(null!==(t=this.pageType)&&void 0!==t?t:"front",this.getArticleId());return Object.assign(Object.assign({},a&&{"@id":`sdrn:kilkaya:teaser:${a}`}),{"@type":"UIElement",position:s,elementType:"Article",custom:{customer:i,creativeId:null!=o?o:a},page:{"@id":null!=g?g:s,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(r=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===r?void 0:r.call(n,this.root)})}getEventInput(e){return{object:this.getEventBaseData(),partnerstudio:this.getEventPartnerstudioData(e),target:this.getEventTarget(),provider:this.getProviderData()}}getEventPartnerstudioData(e){return Object.assign(Object.assign({},this.parseKilkayaData()),{type:e,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}class h extends v{getEventBaseData(){var e,t;const{title:n="",clientName:r="",creativeId:i="",link:o="",itemId:a=""}=this.parseKilkayaData(),{columnName:s,primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u={publicUrl:o,urlPath:o?new URL(o).pathname:""},{publicUrl:g,urlPath:p}=o&&(null===(t=null===(e=this.newsroomStrategy)||void 0===e?void 0:e.transformUrl)||void 0===t?void 0:t.call(e,o))||u;return Object.assign(Object.assign({},a&&{"@id":`sdrn:kilkaya:teaser:${a}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:n,placement:{columnName:s,primaryPosition:l,secondaryPosition:d,source:c},tags:[r,n,g,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:r,"spt:creativeId":i,pageTitle:n,publicUrl:g,urlPath:p},url:location.origin})}getEventInput(e){return{object:this.getEventBaseData(),target:this.getEventTarget()}}}const f="no",y="se",b=(e,t)=>{const n="[Advertory LOG]: ";location.search.includes("ast_debug=true")&&(t?console.log(n,e,t):console.log(n,e))},w=(e,t)=>{console.warn("[Advertory WARN]: ",e)},k=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 b("Advertising permission value obtained synchronously: ",e),Boolean(t)})();if(null!==n)return void t(n);let r=!1;const i=e=>{r||(b("Resolving advertising permission value obtained"),r=!0,t(e))},o=setTimeout(()=>{b("Advertising permission timed out, resolving with false"),i(!1)},3e3);window._tcf_.onTcfReady(()=>{b("On Tcf Ready called, waiting for permission"),clearTimeout(o)}),window._tcf_.getPermission("CMP:advertising",e=>{clearTimeout(o);const t=Number(e);b("Advertising permission value obtained asynchronously: ",e),i(Boolean(t))})}),P="cmp:loaded";let T="undefined"!=typeof window?window._tcf_:void 0,E=!1;const I=(e,t,r)=>{const i=!!(null==e?void 0:e.enabled),o=(null==e?void 0:e.timeout)||3e3,a=(s="bypass_tcf",new URLSearchParams(window.location.search).get(s));var s;const l=()=>{if(!(null==e?void 0:e.enabled))return!0;if(((e,t)=>e?!!t&&(b("TCF bypass param detected, returning consent: true"),!0):(b("TCF is not enabled, returning consent: true"),!0))(i,a))return!0;if(E)return null;if(!T)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=T.getConsentedToAllSync();return b(`TCF consented to all is: ${t}`),T.getConsentedToAllSync()};return{initConsentManager:()=>(null==e?void 0:e.enabled)?new Promise((e,t)=>{if(b("Getting TCF consent manager..."),window._tcf_)return b("TCF consent manager is already available"),T=window._tcf_,void e(T);b("TCF consent manager is not available");const n=()=>{b("CMP loaded, resolving consent manager..."),r&&clearTimeout(r),window._tcf_?(T=window._tcf_,e(T)):t(new Error("CMP loaded but window._tcf_ is not defined"))},r=setTimeout(()=>{document.removeEventListener(P,n),E=!0,t(new Error("Timeout waiting for CMP to load"))},o);b("Listening for CMP loaded event..."),document.addEventListener(P,n,{once:!0})}):Promise.resolve(null),getConsentSync:l,getConsentAsync:()=>n(void 0,void 0,void 0,function*(){if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return b(`Schibsted Ad Choices override value is set, returning override value: ${e.schibstedAdChoicesOverrideValue}`),Boolean(Number(e.schibstedAdChoicesOverrideValue));const t=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===y,n=(null==e?void 0:e.advertisingCMPSignalEnabled)&&r===f;if(t||n)return b("Schibsted Ad Choices is enabled, getting advertising permissions..."),yield k(e);if(!(null==e?void 0:e.enabled))return!0;const i=l();return null!==i?i:yield new Promise((e,t)=>{try{if(!T)throw new Error("[Advertory]: getConsentAsync method was called before the tcfManager was available.");let t=!1;const n=n=>{t||(t=!0,e(n))},r=setTimeout(()=>{b("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);T.onTcfReady(()=>{b("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),T.isConsentedToAll(t=>{clearTimeout(r),e(t)})}catch(e){t(e)}})})}};class C{constructor(e){this.identity=e,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return n(this,void 0,void 0,function*(){var e;try{const t=yield null===(e=this.identity)||void 0===e?void 0:e.getUser();return null!=t?t:null}catch(e){return b("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return n(this,void 0,void 0,function*(){var e,t;return null!==(t=yield null===(e=this.identity)||void 0===e?void 0:e.isLoggedIn())&&void 0!==t&&t})}onIdentityLogout(e){var t;null===(t=this.identity)||void 0===t||t.on("logout",e)}}function A(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var S,O;var j=A(function(){if(O)return S;O=1;var e=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var n=Object.prototype.toString.call(e);return"[object RegExp]"===n||"[object Date]"===n||function(e){return e.$$typeof===t}(e)}(e)},t="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function n(e,t){return!1!==t.clone&&t.isMergeableObject(e)?s((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function r(e,t,r){return e.concat(t).map(function(e){return n(e,r)})}function i(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 o(e,t){try{return t in e}catch(e){return!1}}function a(e,t,r){var a={};return r.isMergeableObject(e)&&i(e).forEach(function(t){a[t]=n(e[t],r)}),i(t).forEach(function(i){(function(e,t){return o(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,i)||(o(e,i)&&r.isMergeableObject(t[i])?a[i]=function(e,t){if(!t.customMerge)return s;var n=t.customMerge(e);return"function"==typeof n?n:s}(i,r)(e[i],t[i],r):a[i]=n(t[i],r))}),a}function s(t,i,o){(o=o||{}).arrayMerge=o.arrayMerge||r,o.isMergeableObject=o.isMergeableObject||e,o.cloneUnlessOtherwiseSpecified=n;var s=Array.isArray(i);return s===Array.isArray(t)?s?o.arrayMerge(t,i,o):a(t,i,o):n(i,o)}return s.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return s(e,n,t)},{})},S=s}());const L={arrayMerge:(e,t)=>t,isMergeableObject:e=>"object"==typeof e&&null!==e&&e.constructor===Object},U=(e,t)=>j(e,t,L),_=(e,t)=>Object.assign(Object.assign({},e),t),N=(e,t)=>{var n;return U(null!==(n=e)&&void 0!==n?n:{},t)},$={adRequested:()=>{},adAvailable:e=>{},adLoaded:e=>{},adNoBid:e=>{},adError:(e,t)=>{},adCollapse:()=>{},adRequestFailure:e=>{},adBadRequest:e=>{},adLoadedMediated:e=>{},adNoBidMediated:e=>{}},M=e=>{(e=>{const{pageContext:t,pageOptions:n,placements:r,appearanceConfig:i}=null!=e?e:{};(null==t?void 0:t.publisher)||w("pageContext.publisher is required."),(null==t?void 0:t.countryCode)||w("pageContext.countryCode is required."),(null==t?void 0:t.pageType)||w("pageContext.pageType is required."),(null==t?void 0:t.deviceType)||w("pageContext.deviceType is required."),n||w("pageOptions is required."),r||w("placements is required."),(null==i?void 0:i.defaultThreshold)||w("appearanceConfig.defaultThreshold is required.")})(e),(e=>{var t,n,r,i;const o=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===(r=e.widescreenSwitching)||void 0===r?void 0:r.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==o?void 0:o[t])&&w(`pageSectionsSelectors.${t} is required when ${n} is enabled.`)})(e)},D={placements:(e,t)=>t,takeover:N,refreshConfig:_,editory:N,appearanceConfig:N,pageContext:_,pageOptions:_,pageSectionsSelectors:_,tcf:_};class F{set(e){M(e),this.config=e}modifyConfigProperties(e){if(!this.config)throw new Error("Config was accessed before it had been initialized.");((e,t)=>{const n=e;for(const e of Object.keys(D)){const r=t[e];void 0!==r&&(n[e]=D[e](n[e],r))}})(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=U(F.DEFAULT_SITE_HANDLERS,e)}}F.DEFAULT_SITE_HANDLERS={siteEvents:$,initNativeAd:()=>{}};const B=new F;B.modifyConfigProperties.bind(B);const x=864e5,q=(()=>{const e=e=>{const t=window.localStorage.getItem(e);if(!t)return null;try{return JSON.parse(t)}catch(e){return b("Error with parsing localStorage data"),null}},t=(e,t)=>{window.localStorage.setItem(e,JSON.stringify(t))};return{get:e,set:t,setWithTimestamp:(e,n,r=x)=>{const i={data:n,expirationTime:(new Date).getTime()+r};t(e,JSON.stringify(i))},getByTimestamp:(t,n=x)=>{const r=e(t);if(!r)return null;if(!n)return r;try{const{expirationTime:e,data:t}=JSON.parse(r);return(new Date).getTime()<=e?t:null}catch(e){return b("Error with parsing localStorage data"),null}}}})(),R=e=>e.startsWith("glci_"),K=()=>{var e;return((e=[])=>e.filter(R))(null!==(e=(()=>{const e=q.getByTimestamp("glimrTags");return e&&"string"!=typeof e?null==e?void 0:e.tags:null})())&&void 0!==e?e:[])},V=/^glci_/,H="gender_",z="geo_",J="male",W="female",X=()=>n(void 0,void 0,void 0,function*(){try{const t=yield(e=500,n(void 0,void 0,void 0,function*(){return Promise.race([n(void 0,void 0,void 0,function*(){return yield new Promise(e=>{if("undefined"!=typeof window)if(window.Identity)e(window.Identity);else{const t=()=>{e(window.Identity)};window.addEventListener("identity-initialized",t,{once:!0})}else e(void 0)})}),new Promise(t=>setTimeout(()=>t(void 0),e))])})),r=new C(t),i=yield r.getIdentityUser(),{gender:o}=null!=i?i:{};return o===J||o===W?`${H}${o}`:void 0}catch(e){return}var e}),G=()=>n(void 0,void 0,void 0,function*(){const e=[],t=yield X(),n=(()=>{const e=K().map(e=>`${z}${e.replace(V,"")}`);return Array.from(new Set(e))})();return t&&e.push(t),n&&e.push(...n),e}),Q="front";class Y{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(e,t){return e===Q?"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:r}=new URL(n),i=r.split("/").filter(Boolean);return i.length?[...i.slice(1),n]:[n]}}class Z{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class ee{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class te{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class ne{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===Q?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${t}`}}class re{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 ie{handleKilkayaStreamTracking({pulse:e,pageContext:{pageType:t,publisher:n,countryCode:u}}){if(!(null==e?void 0:e.instance))return;const g={[i]:new d,[l]:new Y,"no-aftenposten":new Z,[a]:new ee,"no-bergenstidende":new ee,[o]:new te,"no-stavangeraftenblad":new te,[r]:new ne,[s]:new re}[n]||new c;((e,t,n,r)=>{const i=document.querySelectorAll("k5a-stream");i.length&&i.forEach(i=>{const o=r===y?new h(e,i,t):new m(e,i,t,n);o.trackImpression(),i.addEventListener("click",()=>o.trackEngagement())})})(e.instance,g,t,u)}injectKilkayaMeta(e){return n(this,void 0,void 0,function*(){const t=document.createElement("script"),n=yield G();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(b(`Kilkaya event for slot: ${n}`),!n)return void b("Kilkaya slot empty, Xandr backfill won't be loaded");const r=n.parentElement;r?(b(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(r)):b("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="flex";(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"))})(null!==(t=n.dataset.fallbackTargetId)&&void 0!==t?t:"")}loadKilkayaScript(e){return n(this,void 0,void 0,function*(){yield((e,...t)=>n(void 0,[e,...t],void 0,function*(e,{timeout:t}={timeout:1e3}){document.querySelector(`script[src="${e}"]:not([type="module"])`)||(yield new Promise((n,r)=>{const i=document.createElement("script");i.async=!0,i.src=e;const o=()=>{s(),n()},a=()=>{s(),r(new Error(`Failed to load ${e}`))},s=()=>{i.removeEventListener("load",o),i.removeEventListener("error",a),clearTimeout(l)};i.addEventListener("load",o),i.addEventListener("error",a);const l=setTimeout(()=>{s(),r(new Error(`Loading script timed out: ${e}`))},t);document.head.appendChild(i)}).catch(e=>{console.error(e)}))}))(e)})}run(e){return n(this,void 0,void 0,function*(){var t,r;const{tcf:i,pageContext:{isMobileApp:o,countryCode:a},kilkaya:s}=e;if(!(null==s?void 0:s.enabled))return;const l=yield((e,t,r,...i)=>n(void 0,[e,t,r,...i],void 0,function*(e,t,n,r="NOT SPECIFIED FEATURE"){if(!(null==e?void 0:e.schibstedConsentToPayEnabled))return b(`Schibsted Consent to Pay is not enabled, returning true for ${r}`),!0;if(null==e?void 0:e.schibstedAdChoicesOverrideValue)return b(`Schibsted Ad Choices override value is set, returning override value: ${null==e?void 0:e.schibstedAdChoicesOverrideValue} for ${r}`),Boolean(Number(null==e?void 0:e.schibstedAdChoicesOverrideValue));const{getConsentAsync:i}=I(e,0,n);return(yield i())?(b(`Schibsted Ad Choices consent given according to TCF consent manager for ${r}`),!0):(b(`Schibsted Ad Choices consent not given according to TCF consent manager for ${r}`),!1)}))(i,o,a,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(l),yield this.loadKilkayaScript(null!==(r=null===(t=s.options)||void 0===t?void 0:t.kilkayaUrl)&&void 0!==r?r:""),this.handleKilkayaStreamTracking(e)})}}const oe=({placementName:n,slotTag:r,fallbackTargetId:i,children:o,pulseData:a,htmlAttributes:s})=>{const l=(e,t)=>{const n={};if(!e)return n;for(const[r,i]of Object.entries(e)){n[t?`${t}-${r}`:r]=String(i)}return n},d=l(a,"data-pulse"),c=l(s,"data");return e("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"},"data-slot-tag":r},d,c,{children:[t("div",{className:"inscreen-target"}),t("k5a-stream",{name:n,"slot-tag":r}),t("div",{className:"container"}),t("div",{className:"fallback","data-fallback-target-id":i,style:{display:"none"},children:o})]}))},ae=e=>n(void 0,void 0,void 0,function*(){const t=new ie;yield t.run(e)});export{oe as Kilkaya,ae as runKilkaya};
@@ -96,6 +96,7 @@ interface AstAdObj {
96
96
  subtype?: string;
97
97
  renderer_url?: string;
98
98
  bidderId?: number | undefined;
99
+ uuid: string;
99
100
  }
100
101
  interface AstAdError {
101
102
  code: number;
@@ -298,6 +299,13 @@ declare const DeviceTypes: {
298
299
  };
299
300
  type DeviceType = (typeof DeviceTypes)[keyof typeof DeviceTypes];
300
301
 
302
+ interface AdvertisingIdentifiers {
303
+ xandr?: {
304
+ ppId1?: string;
305
+ ppId2?: string;
306
+ };
307
+ }
308
+
301
309
  /**
302
310
  * SDK-agnostic shape of the pulse tracker instance advertory actually calls.
303
311
  * getActor is typed Promise<unknown> — nothing in this codebase reads its
@@ -313,12 +321,6 @@ interface PulseInstance {
313
321
  };
314
322
  }
315
323
 
316
- interface AdvertisingIdentifiers {
317
- xandr?: {
318
- ppId1?: string;
319
- ppId2?: string;
320
- };
321
- }
322
324
  interface PulseLegacyExtras {
323
325
  trackElementView?: (eventInput: unknown) => Promise<void>;
324
326
  trackElementClick?: (eventInput: unknown) => Promise<void>;
@@ -326,11 +328,15 @@ interface PulseLegacyExtras {
326
328
  trackViewUIElement?: (eventInput: unknown) => Promise<void>;
327
329
  trackLegacyViewUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
328
330
  trackLegacyClickUIElement?: (eventInput: unknown, trackOptions?: unknown) => Promise<unknown>;
331
+ trackImpressionAd?: (eventInput: unknown) => Promise<unknown>;
332
+ trackEngagementAd?: (eventInput: unknown) => Promise<unknown>;
333
+ trackLoadAd?: (eventInput: unknown) => Promise<unknown>;
329
334
  }
330
335
  interface PulseConfig {
331
336
  clientId: string;
332
337
  instance: PulseInstance & PulseLegacyExtras;
333
338
  hasherUrl?: string;
339
+ adTrackingEnabled?: boolean;
334
340
  }
335
341
 
336
342
  declare const Newsrooms: {
@@ -395,6 +401,7 @@ interface Options {
395
401
  language?: Country;
396
402
  pageType?: PageType;
397
403
  deviceType?: DeviceType;
404
+ placements?: Placements;
398
405
  appearanceConfig?: AppearanceConfig;
399
406
  nativeTrackingConfig?: NativeTrackingConfig;
400
407
  adPlacementFormat?: string;
@@ -403,6 +410,7 @@ interface Options {
403
410
  clickLinkSelector?: string;
404
411
  containerId?: string;
405
412
  sponsorstripeConfig?: SponsorstripeConfig;
413
+ pulse?: PulseConfig;
406
414
  }
407
415
  interface AdNativeTemplates {
408
416
  [templatesName: string]: (nativeData: AdNativeData, options: Options) => string | null;