@schibsted/advertory 3.15.0 → 3.16.1

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 (466) hide show
  1. package/ad-native/cjs/index.d.ts +18 -17
  2. package/ad-native/cjs/index.js +1 -1
  3. package/ad-native/es/index.d.ts +18 -17
  4. package/ad-native/es/index.js +1 -1
  5. package/aftenposten/cjs/index.d.ts +19 -17
  6. package/aftenposten/cjs/index.js +1 -1
  7. package/aftenposten/es/_auto-entry_aftenposten-GZ1sIv1t.js +1 -0
  8. package/aftenposten/es/{events-D8pWSmsg.js → events-9aIAp3gb.js} +1 -1
  9. package/aftenposten/es/{index-BpDhcw-E.js → index--NjIeMtq.js} +1 -1
  10. package/aftenposten/es/index-30zysrFs.js +1 -0
  11. package/aftenposten/es/{index-D_ZfDX7n.js → index-BA-uAuq5.js} +1 -1
  12. package/aftenposten/es/{index-CabG87Qj.js → index-BVGbDJhd.js} +1 -1
  13. package/aftenposten/es/index-CsMbuvbk.js +1 -0
  14. package/aftenposten/es/{index-CVNgEU97.js → index-EH44nci2.js} +1 -1
  15. package/aftenposten/es/{index-MwzGrVXl.js → index-FoC85Ozh.js} +1 -1
  16. package/aftenposten/es/{index-D7IIvMmD.js → index-MgWt_TgD.js} +1 -1
  17. package/aftenposten/es/index.d.ts +19 -17
  18. package/aftenposten/es/index.js +1 -1
  19. package/aftenposten/es/{styles-DLcI0XaA.js → styles-B6gcjTFZ.js} +1 -1
  20. package/aftenposten/es/{styles-Ndioyk21.js → styles-BOatZiuY.js} +1 -1
  21. package/aftenposten/es/{styles-BY1YXXd9.js → styles-BgLgXAac.js} +1 -1
  22. package/aftenposten/es/{styles-BLV3pNDc.js → styles-CkvreCPA.js} +1 -1
  23. package/aftenposten/es/{styles---H38acf.js → styles-DbROuDap.js} +1 -1
  24. package/aftenposten/es/{styles-BSpQ9wrB.js → styles-DnzkzFYy.js} +1 -1
  25. package/aftenposten/es/{styles-CmGvzh7N.js → styles-DzeNAXt8.js} +1 -1
  26. package/aftenposten/es/{styles-BsjNe66H.js → styles-U6Y_NE5t.js} +1 -1
  27. package/aftenposten/es/{styles-Bf3o4iGL.js → styles-kKKme7zm.js} +1 -1
  28. package/aftenposten/es/{styles-D-GEnM2K.js → styles-vnHs6WQc.js} +1 -1
  29. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-CaNJKb4R.js +1 -0
  30. package/aftenpostenv2/es/{events-D0AzPHgD.js → events-BvPoR-c6.js} +1 -1
  31. package/aftenpostenv2/es/{index-DRBmTJEh.js → index-BD7C7fw5.js} +1 -1
  32. package/aftenpostenv2/es/{index-BzzsRi1p.js → index-BniSDWQY.js} +1 -1
  33. package/aftenpostenv2/es/{index-DLg5TKvF.js → index-ByqTDqyE.js} +1 -1
  34. package/aftenpostenv2/es/{index-DccyhRzR.js → index-DB2YNAa3.js} +1 -1
  35. package/aftenpostenv2/es/{index-DHIaSS0w.js → index-DZ-pmGqE.js} +1 -1
  36. package/aftenpostenv2/es/{index-CT3bnylL.js → index-DriKC_vw.js} +1 -1
  37. package/aftenpostenv2/es/index-Dx8UGDg7.js +1 -0
  38. package/aftenpostenv2/es/index-HPe6c_F5.js +1 -0
  39. package/aftenpostenv2/es/index.d.ts +19 -17
  40. package/aftenpostenv2/es/index.js +1 -1
  41. package/aftenpostenv2/es/{styles-Bt7FhUi7.js → styles-BUE7bmeP.js} +1 -1
  42. package/aftenpostenv2/es/{styles-BnzCRfJC.js → styles-CJpZfRlb.js} +1 -1
  43. package/aftenpostenv2/es/{styles-CFWM6WfN.js → styles-CNqqdiG4.js} +1 -1
  44. package/aftenpostenv2/es/{styles-Drs3vx54.js → styles-DDeBWoDk.js} +1 -1
  45. package/aftenpostenv2/es/{styles-zFiHo4Mv.js → styles-DjKWfNks.js} +1 -1
  46. package/aftenpostenv2/es/{styles-Cjxj5X-y.js → styles-DunKuWvX.js} +1 -1
  47. package/aftenpostenv2/es/{styles-BsZpcwGt.js → styles-Rtn-DTwE.js} +1 -1
  48. package/aftenpostenv2/es/{styles-D7sCt52w.js → styles-W5GbsZdD.js} +1 -1
  49. package/aftenpostenv2/es/{styles-DNU8Xu50.js → styles-hV6a0b1r.js} +1 -1
  50. package/aftenpostenv2/es/{styles-C2PryDI0.js → styles-iyzS4Ma0.js} +1 -1
  51. package/aftonbladet/cjs/index.d.ts +19 -17
  52. package/aftonbladet/cjs/index.js +1 -1
  53. package/aftonbladet/es/_auto-entry_aftonbladet-Bfy9UWBs.js +1 -0
  54. package/aftonbladet/es/{events-p54Iu8vF.js → events-B2qPC0JI.js} +1 -1
  55. package/aftonbladet/es/{index-CjAwtnM1.js → index-BWw2Jrn7.js} +1 -1
  56. package/aftonbladet/es/{index-D4qCky3j.js → index-Bugwgjoa.js} +1 -1
  57. package/aftonbladet/es/{index-DfE4pXnF.js → index-CJwtf88D.js} +1 -1
  58. package/aftonbladet/es/{index-ci4R4rww.js → index-Dt0MASUp.js} +1 -1
  59. package/aftonbladet/es/{index-D1w-ivv6.js → index-OJZczvhD.js} +1 -1
  60. package/aftonbladet/es/index-jAChk_u0.js +1 -0
  61. package/aftonbladet/es/{index-CfSNT4C2.js → index-qxHVT5-m.js} +1 -1
  62. package/aftonbladet/es/{index-Bsr4MaXs.js → index-utB-ictd.js} +1 -1
  63. package/aftonbladet/es/index.d.ts +19 -17
  64. package/aftonbladet/es/index.js +1 -1
  65. package/aftonbladet/es/{styles-Dn54iRJh.js → styles-BfU0oD0-.js} +1 -1
  66. package/aftonbladet/es/{styles-CFMH3DPn.js → styles-BtWT613k.js} +1 -1
  67. package/aftonbladet/es/{styles-q3_G2IY5.js → styles-BvHu62wy.js} +1 -1
  68. package/aftonbladet/es/{styles-CEvgmr2F.js → styles-ByZpua9r.js} +1 -1
  69. package/aftonbladet/es/{styles-v8yXPogn.js → styles-Dsz5cfi3.js} +1 -1
  70. package/aftonbladet/es/{styles-0NsCHKhy.js → styles-gDX0ygo6.js} +1 -1
  71. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-IvxL0Pnz.js +1 -0
  72. package/aftonbladetv2/es/{events-eXnWwS1R.js → events-69bfW6xs.js} +1 -1
  73. package/aftonbladetv2/es/{index-Bch45NKd.js → index-3Eg4bvN_.js} +1 -1
  74. package/aftonbladetv2/es/{index-cv7jnXrH.js → index-B1cui3dt.js} +1 -1
  75. package/aftonbladetv2/es/index-BO-lR9nN.js +1 -0
  76. package/aftonbladetv2/es/{index-CadxQurG.js → index-CCktfCvC.js} +1 -1
  77. package/aftonbladetv2/es/{index-DIOnmfnX.js → index-DM-UfNNR.js} +1 -1
  78. package/aftonbladetv2/es/{index-CBUT5K4r.js → index-DSHSFVOb.js} +1 -1
  79. package/aftonbladetv2/es/{index-D1ULWRDx.js → index-DxWp479k.js} +1 -1
  80. package/aftonbladetv2/es/{index-DMqn_IZm.js → index-XSC5wNbQ.js} +1 -1
  81. package/aftonbladetv2/es/index.d.ts +19 -17
  82. package/aftonbladetv2/es/index.js +1 -1
  83. package/aftonbladetv2/es/{styles-C7szoH8D.js → styles-BFd21r21.js} +1 -1
  84. package/aftonbladetv2/es/{styles-zT8eWXsS.js → styles-BOaYZk7z.js} +1 -1
  85. package/aftonbladetv2/es/{styles-DULiC4js.js → styles-C-DpQ4RN.js} +1 -1
  86. package/aftonbladetv2/es/{styles-CujdGQ5S.js → styles-C7hRmfCU.js} +1 -1
  87. package/aftonbladetv2/es/{styles-DP7lB0tL.js → styles-CFZMoqbF.js} +1 -1
  88. package/aftonbladetv2/es/{styles-B5F5zUBs.js → styles-wCf8sRxI.js} +1 -1
  89. package/brandmetrics/cjs/index.js +1 -1
  90. package/brandmetrics/es/index.js +1 -1
  91. package/bt/cjs/index.d.ts +19 -17
  92. package/bt/cjs/index.js +1 -1
  93. package/bt/es/_auto-entry_bt-tWNc5glw.js +1 -0
  94. package/bt/es/{events-rj14pRWj.js → events-DTmcdrxG.js} +1 -1
  95. package/{sa/es/index-B3ltZ2Im.js → bt/es/index-81Oz-qGy.js} +1 -1
  96. package/bt/es/{index-DwF6_7Fr.js → index-Bg3TR55E.js} +1 -1
  97. package/bt/es/index-C02orzbP.js +1 -0
  98. package/bt/es/{index-BDRHm2Nu.js → index-C3TLCBe7.js} +1 -1
  99. package/bt/es/{index-D6W9gnkz.js → index-CInJ1xs9.js} +1 -1
  100. package/{sa/es/index-BqJ1WPAJ.js → bt/es/index-CTbYJElV.js} +1 -1
  101. package/bt/es/{index-BDz1HlN9.js → index-DBw0XYaH.js} +1 -1
  102. package/bt/es/{index-x77EPzPH.js → index-JHvfgnk5.js} +1 -1
  103. package/bt/es/index.d.ts +19 -17
  104. package/bt/es/index.js +1 -1
  105. package/{sa/es/styles-BbMqylP3.js → bt/es/styles--PbZr0ha.js} +1 -1
  106. package/bt/es/{styles-B0MKj30a.js → styles-Bl-Xa0ds.js} +1 -1
  107. package/bt/es/{styles-CWMO-ZDL.js → styles-BtKlcdvg.js} +1 -1
  108. package/bt/es/{styles--Rfzvghi.js → styles-BxDsJfWn.js} +1 -1
  109. package/bt/es/{styles-D3ESKF3v.js → styles-C99hwDpY.js} +1 -1
  110. package/bt/es/{styles-8VZJFOAE.js → styles-CM32ZnCk.js} +1 -1
  111. package/bt/es/{styles-Byoy8_H9.js → styles-D4kL714Y.js} +1 -1
  112. package/bt/es/{styles-BMzFrQLz.js → styles-DXyo7Fs5.js} +1 -1
  113. package/{sa/es/styles-C7lwVpQD.js → bt/es/styles-DeBo1zSc.js} +1 -1
  114. package/btv2/es/_auto-entry_btv2-nAWn20u1.js +1 -0
  115. package/{omni/es/events-DNR4Qw8_.js → btv2/es/events-BnQ0qhIr.js} +1 -1
  116. package/{omni/es/index-BaBVL5Ud.js → btv2/es/index-BAuez-R4.js} +1 -1
  117. package/btv2/es/{index-fGrh7N-w.js → index-BleJMqM8.js} +1 -1
  118. package/btv2/es/{index-D49iNH3k.js → index-D90U_1Qo.js} +1 -1
  119. package/btv2/es/index-DE84wIEB.js +1 -0
  120. package/btv2/es/{index-BIdcGwbC.js → index-DR8jG0pq.js} +1 -1
  121. package/btv2/es/{index-DS_73ZWC.js → index-DcuLYQyJ.js} +1 -1
  122. package/btv2/es/{index-B5XndCUs.js → index-ESsS5hjq.js} +1 -1
  123. package/{sav2/es/index-DX6MrZdd.js → btv2/es/index-mey4R2Qb.js} +1 -1
  124. package/btv2/es/index.d.ts +19 -17
  125. package/btv2/es/index.js +1 -1
  126. package/btv2/es/{styles-CGp-VlPi.js → styles-BRhHEVrd.js} +1 -1
  127. package/btv2/es/{styles-Cx_8Y6Cg.js → styles-CBjR7FnE.js} +1 -1
  128. package/{sav2/es/styles-CY3ZZwxO.js → btv2/es/styles-CbJDTmCV.js} +1 -1
  129. package/btv2/es/{styles-BDmL6oOb.js → styles-D-pB6fGr.js} +1 -1
  130. package/btv2/es/{styles-DTN0yzBV.js → styles-D8De12bq.js} +1 -1
  131. package/{sav2/es/styles-jzSfAnLz.js → btv2/es/styles-DRddXCLA.js} +1 -1
  132. package/{sav2/es/styles-BLK_9Ant.js → btv2/es/styles-DeMpu9UC.js} +1 -1
  133. package/btv2/es/{styles-DyuMInjp.js → styles-ud_EY6B3.js} +1 -1
  134. package/common/cjs/index.js +1 -1
  135. package/common/es/index.js +1 -1
  136. package/e24/es/_auto-entry_e24-DvdknnzM.js +1 -0
  137. package/e24/es/{events-BrI0rzBQ.js → events-Rm1n0noG.js} +1 -1
  138. package/e24/es/{index-CqQXC6mF.js → index-BNA5NZfB.js} +1 -1
  139. package/e24/es/index-Bi6PDC4c.js +1 -0
  140. package/e24/es/index-CGLozHmr.js +1 -0
  141. package/e24/es/{index-DjweqiVg.js → index-CWIhbVPw.js} +1 -1
  142. package/e24/es/{index-OnKBw5e5.js → index-CXlRMveE.js} +1 -1
  143. package/e24/es/{index-B1RWWDA4.js → index-CevbMYIC.js} +1 -1
  144. package/e24/es/{index-NE0Lh0jl.js → index-DEI-wJhu.js} +1 -1
  145. package/e24/es/{index-Bn00DU_j.js → index-DnMmQpmq.js} +1 -1
  146. package/e24/es/index.d.ts +19 -17
  147. package/e24/es/index.js +1 -1
  148. package/e24/es/{styles-DOHgKGcp.js → styles-BL3psmJI.js} +1 -1
  149. package/e24/es/{styles-lPDidEBC.js → styles-BO7pwS_U.js} +1 -1
  150. package/e24/es/{styles-As4sWC1w.js → styles-BPI4B5gA.js} +1 -1
  151. package/e24/es/{styles-R0mK5AJ4.js → styles-C9DgPMO0.js} +1 -1
  152. package/e24/es/{styles-BejDP2r8.js → styles-CD9vs2Ja.js} +1 -1
  153. package/e24/es/{styles--C4eEm_t.js → styles-CHfJkS4o.js} +1 -1
  154. package/e24/es/{styles-Q-b3Qw_Z.js → styles-CIpLr1xP.js} +1 -1
  155. package/e24/es/{styles-nrXb8MPO.js → styles-Cl9qoAPs.js} +1 -1
  156. package/e24/es/{styles-DPOzTob1.js → styles-DJAMs49M.js} +1 -1
  157. package/{tv4/es/styles-Crm3pezD.js → e24/es/styles-JdFLdy5Z.js} +1 -1
  158. package/e24/es/{styles-HsQZ6qZs.js → styles-rncULcNW.js} +1 -1
  159. package/editory/cjs/index.d.ts +18 -17
  160. package/editory/cjs/index.js +1 -1
  161. package/editory/es/index.d.ts +18 -17
  162. package/editory/es/index.js +1 -1
  163. package/fotbollskanalen/cjs/index.d.ts +19 -17
  164. package/fotbollskanalen/cjs/index.js +1 -1
  165. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-DPyblSMF.js +1 -0
  166. package/fotbollskanalen/es/{events-DpB36fIX.js → events-D6ksBWHo.js} +1 -1
  167. package/fotbollskanalen/es/{index-CB2-7fAK.js → index-BRVt_-Mn.js} +1 -1
  168. package/fotbollskanalen/es/{index-CUA2eNGE.js → index-Cr8Mal6K.js} +1 -1
  169. package/fotbollskanalen/es/{index-kFg83CZS.js → index-DOn9ov7p.js} +1 -1
  170. package/fotbollskanalen/es/{index-BsObvNq4.js → index-DVeOnxq3.js} +1 -1
  171. package/fotbollskanalen/es/index-DwPddK-e.js +1 -0
  172. package/fotbollskanalen/es/index-LYi5uIYu.js +1 -0
  173. package/fotbollskanalen/es/{index-CtmIMfBu.js → index-My4323ov.js} +1 -1
  174. package/fotbollskanalen/es/{index-OGQEy9H9.js → index-lcwcTlOs.js} +1 -1
  175. package/fotbollskanalen/es/index.d.ts +19 -17
  176. package/fotbollskanalen/es/index.js +1 -1
  177. package/fotbollskanalen/es/{styles-CvqKtsSK.js → styles-B8RWIS0n.js} +1 -1
  178. package/fotbollskanalen/es/{styles-B19q7540.js → styles-CQtxVBX-.js} +1 -1
  179. package/fotbollskanalen/es/{styles-CjtCSs6I.js → styles-D457Igc-.js} +1 -1
  180. package/fotbollskanalen/es/{styles-J_UB-3gD.js → styles-DZEYG8hY.js} +1 -1
  181. package/glimr/cjs/index.js +1 -1
  182. package/glimr/es/index.js +1 -1
  183. package/godt/cjs/index.d.ts +19 -17
  184. package/godt/cjs/index.js +1 -1
  185. package/kilkaya/cjs/index.d.ts +18 -17
  186. package/kilkaya/cjs/index.js +1 -1
  187. package/kilkaya/es/index.d.ts +18 -17
  188. package/kilkaya/es/index.js +1 -1
  189. package/klart/cjs/index.d.ts +19 -17
  190. package/klart/cjs/index.js +1 -1
  191. package/koket/cjs/index.d.ts +19 -17
  192. package/koket/cjs/index.js +1 -1
  193. package/koket/es/_auto-entry_koket-DUVKlIP1.js +1 -0
  194. package/koket/es/{events-DfRbJxyU.js → events-Cz_3ieSv.js} +1 -1
  195. package/koket/es/{index-BnfNHEXx.js → index-B8eeceuk.js} +1 -1
  196. package/koket/es/index-BoYKeek-.js +1 -0
  197. package/koket/es/{index-DDbpDX-g.js → index-CQG7p8FU.js} +1 -1
  198. package/koket/es/{index-CJ1W571o.js → index-CbF7vThc.js} +1 -1
  199. package/{svdv2/es/index-lp9D_VqW.js → koket/es/index-DRjNvGuy.js} +1 -1
  200. package/koket/es/{index-D85uO69N.js → index-DUcH6MTv.js} +1 -1
  201. package/koket/es/index-DiS6pnqp.js +1 -0
  202. package/koket/es/{index-Cqr-buJd.js → index-DyKqdWUd.js} +1 -1
  203. package/koket/es/index.d.ts +19 -17
  204. package/koket/es/index.js +1 -1
  205. package/{svdv2/es/styles-Cuxjxnz7.js → koket/es/styles-87UmJ0fd.js} +1 -1
  206. package/koket/es/{styles-CqURRP3E.js → styles-CH964apH.js} +1 -1
  207. package/koket/es/{styles-BDu9ZZwO.js → styles-CYIKwjx2.js} +1 -1
  208. package/{svdv2/es/styles-CpD30RLC.js → koket/es/styles-DPzIWi6-.js} +1 -1
  209. package/minmote/cjs/index.d.ts +19 -17
  210. package/minmote/cjs/index.js +1 -1
  211. package/mtv/es/_auto-entry_mtv-SFi7HmQz.js +1 -0
  212. package/mtv/es/{events-BTYIrHRZ.js → events-Efp-IsoA.js} +1 -1
  213. package/mtv/es/{index-C1LxbEmw.js → index-62ZhEiLS.js} +1 -1
  214. package/mtv/es/{index-DeSJppRQ.js → index-B5JHZdJ_.js} +1 -1
  215. package/mtv/es/{index-DJlsLpQx.js → index-CCxLaTeK.js} +1 -1
  216. package/mtv/es/{index-BO-i3sCG.js → index-CHACHVva.js} +1 -1
  217. package/{svd/es/index-BYkihgZA.js → mtv/es/index-CtlqPalQ.js} +1 -1
  218. package/mtv/es/{index-CLQvYoC-.js → index-DRSCuKvn.js} +1 -1
  219. package/mtv/es/index-DU7dK1tv.js +1 -0
  220. package/mtv/es/{index-DeKzJSAu.js → index-FOfQp-cn.js} +1 -1
  221. package/mtv/es/index.d.ts +19 -17
  222. package/mtv/es/index.js +1 -1
  223. package/omni/es/_auto-entry_omni-DViPCAlv.js +1 -0
  224. package/{tvnu/es/events-BEMqLH7z.js → omni/es/events-LRAT_Bvo.js} +1 -1
  225. package/{tvnu/es/index-TDZ9OAcd.js → omni/es/index-9bwaIdG0.js} +1 -1
  226. package/omni/es/{index-D6MzZqfs.js → index-B9uQXXEv.js} +1 -1
  227. package/omni/es/{index-CMF_JH0-.js → index-BTgrUU-i.js} +1 -1
  228. package/{btv2/es/index-CMrcaT3O.js → omni/es/index-BW4d0akI.js} +1 -1
  229. package/omni/es/{index-CTHSWhc8.js → index-BXtYpATo.js} +1 -1
  230. package/omni/es/index-BhFw5lTE.js +1 -0
  231. package/omni/es/{index-B94lMokz.js → index-D69As6fp.js} +1 -1
  232. package/omni/es/{index-BWjQ3CYh.js → index-DDjGpUEr.js} +1 -1
  233. package/omni/es/index.d.ts +19 -17
  234. package/omni/es/index.js +1 -1
  235. package/omni/es/{styles-cOSLf7Mq.js → styles-BA5p-L5N.js} +1 -1
  236. package/omni/es/{styles-DPl5PPP2.js → styles-DOcAV6ju.js} +1 -1
  237. package/package.json +1 -1
  238. package/pent/cjs/index.d.ts +19 -17
  239. package/pent/cjs/index.js +1 -1
  240. package/sa/cjs/index.d.ts +19 -17
  241. package/sa/cjs/index.js +1 -1
  242. package/sa/es/_auto-entry_sa-DeD3MVP7.js +1 -0
  243. package/sa/es/{events-DI3diJFL.js → events-BecgCWsy.js} +1 -1
  244. package/sa/es/{index-BDXsIVrg.js → index-BX40s81H.js} +1 -1
  245. package/sa/es/index-BwMYBcbq.js +1 -0
  246. package/{bt/es/index-DsnsTH-b.js → sa/es/index-C24tchc6.js} +1 -1
  247. package/sa/es/index-CUpj-JB4.js +1 -0
  248. package/sa/es/{index-CIec2YTJ.js → index-Cr-FUyBl.js} +1 -1
  249. package/{bt/es/index-hyiU7O-x.js → sa/es/index-CyyVcWqy.js} +1 -1
  250. package/sa/es/{index-DIE4Q0G2.js → index-D4L1qme2.js} +1 -1
  251. package/sa/es/{index-x0P5jn9g.js → index-o90qAp4u.js} +1 -1
  252. package/sa/es/index.d.ts +19 -17
  253. package/sa/es/index.js +1 -1
  254. package/sa/es/{styles-C_xDTp9G.js → styles-B2HTeuqJ.js} +1 -1
  255. package/sa/es/{styles-Bql3BSp8.js → styles-B2vQP2K8.js} +1 -1
  256. package/{vg/es/styles-CwuBd-eA.js → sa/es/styles-CHsNl2Mc.js} +1 -1
  257. package/{bt/es/styles-DO5qqVdH.js → sa/es/styles-CfUywXvc.js} +1 -1
  258. package/sa/es/{styles-xs6TvmhP.js → styles-Cqr_RRge.js} +1 -1
  259. package/sa/es/{styles-KT6z0K0Z.js → styles-CxPsuwAd.js} +1 -1
  260. package/{vg/es/styles-Cmp2KkM3.js → sa/es/styles-CzYN_LTX.js} +1 -1
  261. package/sa/es/{styles-BKH-itvT.js → styles-D2LetjR-.js} +1 -1
  262. package/sa/es/{styles-Dtb1biv9.js → styles-s8Z00lKl.js} +1 -1
  263. package/sav2/es/_auto-entry_sav2-Db0fRSt6.js +1 -0
  264. package/sav2/es/{events-CthRG9py.js → events-DNGKF8ss.js} +1 -1
  265. package/sav2/es/{index-Cna6rmoX.js → index-BC5EQ5Ki.js} +1 -1
  266. package/sav2/es/{index-BmWOJlaN.js → index-ByTXDT_0.js} +1 -1
  267. package/sav2/es/index-C64lmG2i.js +1 -0
  268. package/sav2/es/index-CPDnPdKS.js +1 -0
  269. package/sav2/es/{index-CKJyI3N1.js → index-DNZIrN_q.js} +1 -1
  270. package/sav2/es/{index-DazqwtUU.js → index-WaOZoUNd.js} +1 -1
  271. package/sav2/es/{index-B_Q5_GSE.js → index-mPgiXuj_.js} +1 -1
  272. package/{omni/es/index-BOWJ6T50.js → sav2/es/index-yMvxNIY0.js} +1 -1
  273. package/sav2/es/index.d.ts +19 -17
  274. package/sav2/es/index.js +1 -1
  275. package/sav2/es/{styles-ClAYlm1m.js → styles-B1UQfDYG.js} +1 -1
  276. package/{vgv2/es/styles-D-TJ0YZd.js → sav2/es/styles-B4aRq6IG.js} +1 -1
  277. package/sav2/es/{styles-BI4HpZVa.js → styles-BgGC9MUo.js} +1 -1
  278. package/{vgv2/es/styles-Bk79ACwC.js → sav2/es/styles-C4fHpc7i.js} +1 -1
  279. package/sav2/es/{styles-Bofifucv.js → styles-Ch2FCI84.js} +1 -1
  280. package/{vgv2/es/styles-DybsoR0o.js → sav2/es/styles-CnzK_mxw.js} +1 -1
  281. package/{btv2/es/styles-CnimDhRk.js → sav2/es/styles-DOEtsbP-.js} +1 -1
  282. package/sav2/es/{styles-k9X55Rnn.js → styles-DdbJdwhY.js} +1 -1
  283. package/svd/cjs/index.d.ts +19 -17
  284. package/svd/cjs/index.js +1 -1
  285. package/svd/es/_auto-entry_svd-WUu3yvXG.js +1 -0
  286. package/{tv4/es/events-4KySLBAR.js → svd/es/events-DwWjYZVp.js} +1 -1
  287. package/svd/es/{index-Bs3plEt-.js → index-B0Iu8vXY.js} +1 -1
  288. package/svd/es/{index-rgHeIyun.js → index-B1METJ1o.js} +1 -1
  289. package/svd/es/index-B4iY0GvE.js +1 -0
  290. package/{mtv/es/index-bmZLGjIV.js → svd/es/index-BLUgliOO.js} +1 -1
  291. package/svd/es/{index-4W_iswyV.js → index-B_0eYGGR.js} +1 -1
  292. package/svd/es/index-CkyGbTvE.js +1 -0
  293. package/svd/es/{index-Dnhi0clS.js → index-DMzJ_nHd.js} +1 -1
  294. package/svd/es/{index-Br0CeQZV.js → index-DrXg3pVq.js} +1 -1
  295. package/svd/es/index.d.ts +19 -17
  296. package/svd/es/index.js +1 -1
  297. package/svd/es/{styles-W_yUrhBw.js → styles-Bw2I5Pno.js} +1 -1
  298. package/svd/es/{styles-BIrjOvbj.js → styles-C7zlSwvb.js} +1 -1
  299. package/svd/es/{styles-CN1yvQo7.js → styles-CMm02bEb.js} +1 -1
  300. package/svd/es/{styles-DtE4dGMU.js → styles-Cztov_Wv.js} +1 -1
  301. package/svd/es/{styles-CBeC-1fu.js → styles-D_77In5Q.js} +1 -1
  302. package/svd/es/{styles-oIL8ePVu.js → styles-S2TTOwZN.js} +1 -1
  303. package/svdv2/es/_auto-entry_svdv2-DR7G4Tmi.js +1 -0
  304. package/svdv2/es/{events-By9jQ9Ir.js → events-CnhlqoBJ.js} +1 -1
  305. package/svdv2/es/{index-D5-Q3bOj.js → index--fJ82juM.js} +1 -1
  306. package/svdv2/es/{index-D7tbEeNI.js → index-B6wuVCpl.js} +1 -1
  307. package/svdv2/es/index-BPZlMFDy.js +1 -0
  308. package/svdv2/es/{index-CYeHwSoY.js → index-BRFrDRYx.js} +1 -1
  309. package/svdv2/es/{index-BgpRT2YF.js → index-Biygcry-.js} +1 -1
  310. package/svdv2/es/{index-CXgz-X13.js → index-BjBJaPcv.js} +1 -1
  311. package/svdv2/es/index-CAsNKuIv.js +1 -0
  312. package/{koket/es/index-BlZzrwzV.js → svdv2/es/index-CDAstSaK.js} +1 -1
  313. package/svdv2/es/index.d.ts +19 -17
  314. package/svdv2/es/index.js +1 -1
  315. package/{koket/es/styles-CP3fGIq5.js → svdv2/es/styles-BUKp899c.js} +1 -1
  316. package/svdv2/es/{styles-4IN-ROzv.js → styles-CjYRO2UV.js} +1 -1
  317. package/svdv2/es/{styles-zHKSAqF4.js → styles-DFmU-6t8.js} +1 -1
  318. package/svdv2/es/{styles-D8SLFgsU.js → styles-DPA1dHCJ.js} +1 -1
  319. package/svdv2/es/{styles-BDbvDGco.js → styles-Dc1aKfSv.js} +1 -1
  320. package/svdv2/es/{styles-CK3cpdWI.js → styles-DcRNPjTa.js} +1 -1
  321. package/{koket/es/styles-Bon_993j.js → svdv2/es/styles-H5EW2MNs.js} +1 -1
  322. package/tek/cjs/index.d.ts +19 -17
  323. package/tek/cjs/index.js +1 -1
  324. package/tracker/cjs/index.d.ts +18 -17
  325. package/tracker/es/index.d.ts +18 -17
  326. package/tv4/cjs/index.d.ts +19 -17
  327. package/tv4/cjs/index.js +1 -1
  328. package/tv4/es/_auto-entry_tv4-FaljvrBE.js +1 -0
  329. package/{svd/es/events-DCpY41Cg.js → tv4/es/events-DefiGdDS.js} +1 -1
  330. package/tv4/es/{index-D4P-NvdT.js → index-B2vpMEPe.js} +1 -1
  331. package/tv4/es/index-BxNrZ8Yf.js +1 -0
  332. package/tv4/es/{index-BUm2iJCL.js → index-Db5YHoZP.js} +1 -1
  333. package/tv4/es/{index-wC373CoD.js → index-DvOZYkPa.js} +1 -1
  334. package/tv4/es/{index-xBKjwvS1.js → index-HYqE7h04.js} +1 -1
  335. package/tv4/es/{index-BDOkY4IN.js → index-KFLtqJjc.js} +1 -1
  336. package/tv4/es/{index-yMXj6DRW.js → index-KvBxcsvd.js} +1 -1
  337. package/tv4/es/{index-CFbaMlxi.js → index-ghGeOxNq.js} +1 -1
  338. package/tv4/es/index.d.ts +19 -17
  339. package/tv4/es/index.js +1 -1
  340. package/tv4/es/{styles-m2zKugmR.js → styles-B-DC8wXs.js} +1 -1
  341. package/tv4/es/{styles-gV6NqYu-.js → styles-BUyPd9Y0.js} +1 -1
  342. package/tv4/es/{styles-Bmq51bK_.js → styles-DCjlr5xQ.js} +1 -1
  343. package/{e24/es/styles-CKcjc5a0.js → tv4/es/styles-N6wd6A_B.js} +1 -1
  344. package/tvnu/cjs/index.d.ts +19 -17
  345. package/tvnu/cjs/index.js +1 -1
  346. package/tvnu/es/_auto-entry_tvnu-DMZPquXT.js +1 -0
  347. package/{btv2/es/events-BjiorpRK.js → tvnu/es/events-Dqb-GF2f.js} +1 -1
  348. package/{omni/es/index-DgqG_a5X.js → tvnu/es/index-B6cU8hsW.js} +1 -1
  349. package/{vgv2/es/index-0bMMbnRN.js → tvnu/es/index-C2YotjJU.js} +1 -1
  350. package/{sav2/es/index-CruDB6CF.js → tvnu/es/index-C3xnIzU_.js} +1 -1
  351. package/tvnu/es/{index-BMReWNC9.js → index-C4WAB55h.js} +1 -1
  352. package/tvnu/es/{index-Bm-S3SYD.js → index-CSHenyQ5.js} +1 -1
  353. package/tvnu/es/index-D10N_Zgv.js +1 -0
  354. package/tvnu/es/{index-D1zU2Yxs.js → index-DmOrGvYz.js} +1 -1
  355. package/tvnu/es/{index-EsfYbPbT.js → index-DyTc9ILh.js} +1 -1
  356. package/tvnu/es/index.d.ts +19 -17
  357. package/tvnu/es/index.js +1 -1
  358. package/tvnu/es/{styles-8eD0eK-_.js → styles--UYsw4aM.js} +1 -1
  359. package/tvnu/es/{styles-B5GgV2tN.js → styles-C3fwDL-v.js} +1 -1
  360. package/{btv2/es/styles-DEZqUzVC.js → tvnu/es/styles-CK4taMCz.js} +1 -1
  361. package/types/index.d.ts +20 -18
  362. package/vg/cjs/index.d.ts +19 -17
  363. package/vg/cjs/index.js +1 -1
  364. package/vg/es/_auto-entry_vg-1XkGX2QP.js +1 -0
  365. package/vg/es/{events-CRsvxUE3.js → events-Dh51wHYO.js} +1 -1
  366. package/vg/es/{index-BSsLrKNL.js → index--wXT3-oU.js} +1 -1
  367. package/vg/es/index-0fVLBcRa.js +1 -0
  368. package/vg/es/{index-CGvHyIoW.js → index-4grZKfL5.js} +1 -1
  369. package/vg/es/{index-ywUd_exl.js → index-7QAcfKPx.js} +1 -1
  370. package/vg/es/{index-DkIhalKX.js → index-C6lcq7AL.js} +1 -1
  371. package/vg/es/{index-Bq7MDB3X.js → index-DntkqQFS.js} +1 -1
  372. package/vg/es/{index-CAX8dYg4.js → index-jA-C4Ij5.js} +1 -1
  373. package/vg/es/{index-Dpp2Yjnl.js → index-yUtgdiUg.js} +1 -1
  374. package/vg/es/index.d.ts +19 -17
  375. package/vg/es/index.js +1 -1
  376. package/vg/es/{styles-CbcwYAlK.js → styles-5MAzs4Zu.js} +1 -1
  377. package/vg/es/{styles-kYMBLoHJ.js → styles-86UDRaJW.js} +1 -1
  378. package/vg/es/{styles-hZZ-Ymzt.js → styles-8GyQTQgv.js} +1 -1
  379. package/vg/es/{styles-BXprVqIK.js → styles-B0UF7LfE.js} +1 -1
  380. package/{sa/es/styles-ElFuh5MJ.js → vg/es/styles-B5V4FI_M.js} +1 -1
  381. package/{bt/es/styles-BMLCr-Gn.js → vg/es/styles-BGZm-9jT.js} +1 -1
  382. package/vg/es/{styles-CxK9hwR7.js → styles-BJMVnrSG.js} +1 -1
  383. package/vg/es/{styles-BdsbGPQT.js → styles-BN1Q3jGC.js} +1 -1
  384. package/vg/es/{styles-DTxKzHkJ.js → styles-BRu4TSPJ.js} +1 -1
  385. package/vg/es/{styles-DKRPp5sN.js → styles-C1WJ3vz7.js} +1 -1
  386. package/vg/es/{styles-6GpAwbSQ.js → styles-C6Is07pg.js} +1 -1
  387. package/vg/es/{styles-CTTv6Ja7.js → styles-CJthc8yt.js} +1 -1
  388. package/vg/es/{styles-DEEmZAAU.js → styles-DBnEP0fU.js} +1 -1
  389. package/vg/es/{styles-C8eMLGoZ.js → styles-DNhpQVYO.js} +1 -1
  390. package/vg/es/{styles-CRDS-l-x.js → styles-vl99wLbR.js} +1 -1
  391. package/vgv2/es/_auto-entry_vgv2-DvxBVvmD.js +1 -0
  392. package/vgv2/es/{events-C6zZZ0wR.js → events-C2yf-22F.js} +1 -1
  393. package/vgv2/es/{index-CZZXITop.js → index-BBWjZxsJ.js} +1 -1
  394. package/vgv2/es/{index-DV4idJT3.js → index-Bu60pgL9.js} +1 -1
  395. package/vgv2/es/{index-CwSAcYYf.js → index-DEn2V_8g.js} +1 -1
  396. package/vgv2/es/index-DWFmomps.js +1 -0
  397. package/{tvnu/es/index-C9T8MdQO.js → vgv2/es/index-DdgcFF8X.js} +1 -1
  398. package/vgv2/es/{index-Dw8awMET.js → index-Ddv1JfSR.js} +1 -1
  399. package/vgv2/es/{index-8wTVjUza.js → index-Dl_xMnPv.js} +1 -1
  400. package/vgv2/es/{index-GgW8CmxR.js → index-sQtq8Z9r.js} +1 -1
  401. package/vgv2/es/index.d.ts +19 -17
  402. package/vgv2/es/index.js +1 -1
  403. package/vgv2/es/{styles-CvQ29OHO.js → styles-0x-jssVm.js} +1 -1
  404. package/vgv2/es/{styles-BLNXZPYf.js → styles-B2AEj_Tc.js} +1 -1
  405. package/vgv2/es/{styles-VwuX1N09.js → styles-BFeY1omF.js} +1 -1
  406. package/vgv2/es/{styles-DAHzAObz.js → styles-Bl_9N8LI.js} +1 -1
  407. package/vgv2/es/{styles-jsqPoIHl.js → styles-BpuYPyfl.js} +1 -1
  408. package/vgv2/es/{styles-B-WZKfZF.js → styles-By6TnGB5.js} +1 -1
  409. package/vgv2/es/{styles-CLydlrr4.js → styles-COz3RfmR.js} +1 -1
  410. package/vgv2/es/{styles-GFXYVwWk.js → styles-C_XPLUFA.js} +1 -1
  411. package/vgv2/es/{styles-DJalsPbI.js → styles-Cmc8MKa3.js} +1 -1
  412. package/{tvnu/es/styles-BkBzkoE7.js → vgv2/es/styles-DELeZqx6.js} +1 -1
  413. package/vgv2/es/{styles-BYxNSj9N.js → styles-DT7y8IAa.js} +1 -1
  414. package/vgv2/es/{styles-BqMBA6sc.js → styles-HDvKLHsD.js} +1 -1
  415. package/{sav2/es/styles-DsIS4sUA.js → vgv2/es/styles-MXrAxOVD.js} +1 -1
  416. package/{btv2/es/styles-BcfarAWx.js → vgv2/es/styles-mGmN7rNj.js} +1 -1
  417. package/vgv2/es/{styles-B8F-fTVB.js → styles-xB4_HpKs.js} +1 -1
  418. package/video/cjs/index.js +1 -1
  419. package/video/es/index.js +1 -1
  420. package/aftenposten/es/_auto-entry_aftenposten-RBEMGbJM.js +0 -1
  421. package/aftenposten/es/index-C8KzO_Bo.js +0 -1
  422. package/aftenposten/es/index-ChMcrS9k.js +0 -1
  423. package/aftenpostenv2/es/_auto-entry_aftenpostenv2-BQuke4cU.js +0 -1
  424. package/aftenpostenv2/es/index-C6ViniMz.js +0 -1
  425. package/aftenpostenv2/es/index-VxOMsbBZ.js +0 -1
  426. package/aftonbladet/es/_auto-entry_aftonbladet-CAArVKie.js +0 -1
  427. package/aftonbladet/es/index-B0seJE6d.js +0 -1
  428. package/aftonbladetv2/es/_auto-entry_aftonbladetv2-Bhr4jHWC.js +0 -1
  429. package/aftonbladetv2/es/index-Bs17skju.js +0 -1
  430. package/bt/es/_auto-entry_bt-Dk176YDo.js +0 -1
  431. package/bt/es/index-CT1ewpbE.js +0 -1
  432. package/btv2/es/_auto-entry_btv2-C3BMfR9N.js +0 -1
  433. package/btv2/es/index-DRKjsTZi.js +0 -1
  434. package/btv2/es/index-Dq_ikWoX.js +0 -1
  435. package/e24/es/_auto-entry_e24-BIxvA8qH.js +0 -1
  436. package/e24/es/index-jIqxCG8Y.js +0 -1
  437. package/e24/es/index-zNXfc029.js +0 -1
  438. package/fotbollskanalen/es/_auto-entry_fotbollskanalen-C0bG9s2e.js +0 -1
  439. package/fotbollskanalen/es/index-Bip66ufO.js +0 -1
  440. package/fotbollskanalen/es/index-DFOvO8Gk.js +0 -1
  441. package/koket/es/_auto-entry_koket-CfdwxTqe.js +0 -1
  442. package/koket/es/index-4zfKSkHr.js +0 -1
  443. package/koket/es/index-eql9xeF3.js +0 -1
  444. package/mtv/es/_auto-entry_mtv-BDbckjio.js +0 -1
  445. package/mtv/es/index-CMcYIr5B.js +0 -1
  446. package/omni/es/_auto-entry_omni-kPi2t184.js +0 -1
  447. package/sa/es/_auto-entry_sa-BVVMzNzi.js +0 -1
  448. package/sa/es/index-CTtjQOs5.js +0 -1
  449. package/sa/es/index-_j0q3jV3.js +0 -1
  450. package/sav2/es/_auto-entry_sav2-D82eD4oc.js +0 -1
  451. package/sav2/es/index-6GP1iTRr.js +0 -1
  452. package/svd/es/_auto-entry_svd-CoRlxzCg.js +0 -1
  453. package/svd/es/index-CBa5CgPk.js +0 -1
  454. package/svd/es/index-CYJD814U.js +0 -1
  455. package/svdv2/es/_auto-entry_svdv2-C6rMJno8.js +0 -1
  456. package/svdv2/es/index-BvcATPFW.js +0 -1
  457. package/svdv2/es/index-ZE10OS6e.js +0 -1
  458. package/tv4/es/_auto-entry_tv4-CunA1-4L.js +0 -1
  459. package/tv4/es/index-DgOoHYbO.js +0 -1
  460. package/tvnu/es/_auto-entry_tvnu-DE4GbG57.js +0 -1
  461. package/tvnu/es/index-CauAadba.js +0 -1
  462. package/tvnu/es/index-DuNHAdA7.js +0 -1
  463. package/vg/es/_auto-entry_vg-DoO28oQo.js +0 -1
  464. package/vg/es/index-CVP91nhn.js +0 -1
  465. package/vgv2/es/_auto-entry_vgv2-Cmle-i6b.js +0 -1
  466. package/vgv2/es/index-Hd2EKHnJ.js +0 -1
@@ -1,5 +1,23 @@
1
1
  import { ReactNode } from 'react';
2
2
 
3
+ declare const PageTypes: {
4
+ readonly FRONT: "front";
5
+ readonly ARTICLE: "article";
6
+ readonly SECTION: "section";
7
+ readonly COLLECTION: "collection";
8
+ readonly OTHER: "other";
9
+ };
10
+ type PageType = (typeof PageTypes)[keyof typeof PageTypes];
11
+
12
+ declare const Countries: {
13
+ readonly NO: "no";
14
+ readonly SE: "se";
15
+ };
16
+ type Country = (typeof Countries)[keyof typeof Countries];
17
+
18
+ type AstKeywordValue = Array<string> | string | number | Array<number> | undefined;
19
+ type Keywords = Record<string, AstKeywordValue>;
20
+
3
21
  type AstAdType = 'banner' | 'video' | 'native' | 'outstream';
4
22
  interface AstBanner {
5
23
  content: string;
@@ -80,8 +98,6 @@ interface AstAdObj {
80
98
  renderer_url?: string;
81
99
  bidderId?: number | undefined;
82
100
  }
83
- type AstKeywordValue = Array<string> | string | number | Array<number> | undefined;
84
- type Keywords = Record<string, AstKeywordValue>;
85
101
  interface SafeFrameConfig {
86
102
  allowExpansionByPush?: boolean;
87
103
  allowExpansionByOverlay?: boolean;
@@ -136,21 +152,6 @@ declare const DeviceTypes: {
136
152
  };
137
153
  type DeviceType = (typeof DeviceTypes)[keyof typeof DeviceTypes];
138
154
 
139
- declare const Countries: {
140
- readonly NO: "no";
141
- readonly SE: "se";
142
- };
143
- type Country = (typeof Countries)[keyof typeof Countries];
144
-
145
- declare const PageTypes: {
146
- readonly FRONT: "front";
147
- readonly ARTICLE: "article";
148
- readonly SECTION: "section";
149
- readonly COLLECTION: "collection";
150
- readonly OTHER: "other";
151
- };
152
- type PageType = (typeof PageTypes)[keyof typeof PageTypes];
153
-
154
155
  /**
155
156
  * SDK-agnostic shape of the pulse tracker instance advertory actually calls.
156
157
  * getActor is typed Promise<unknown> — nothing in this codebase reads its
@@ -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 I="undefined"!=typeof window?window._tcf_:void 0,S=!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(S)return null;if(!I)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=I.getConsentedToAllSync();return P(`TCF consented to all is: ${t}`),I.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"),I=window._tcf_,void e(I);P("TCF consent manager is not available");const n=()=>{P("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(C,n),S=!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(!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(()=>{P("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);I.onTcfReady(()=>{P("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),I.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:$,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="block";(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");l&&(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""}}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");l&&(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,5 +1,23 @@
1
1
  import { ReactNode } from 'react';
2
2
 
3
+ declare const PageTypes: {
4
+ readonly FRONT: "front";
5
+ readonly ARTICLE: "article";
6
+ readonly SECTION: "section";
7
+ readonly COLLECTION: "collection";
8
+ readonly OTHER: "other";
9
+ };
10
+ type PageType = (typeof PageTypes)[keyof typeof PageTypes];
11
+
12
+ declare const Countries: {
13
+ readonly NO: "no";
14
+ readonly SE: "se";
15
+ };
16
+ type Country = (typeof Countries)[keyof typeof Countries];
17
+
18
+ type AstKeywordValue = Array<string> | string | number | Array<number> | undefined;
19
+ type Keywords = Record<string, AstKeywordValue>;
20
+
3
21
  type AstAdType = 'banner' | 'video' | 'native' | 'outstream';
4
22
  interface AstBanner {
5
23
  content: string;
@@ -80,8 +98,6 @@ interface AstAdObj {
80
98
  renderer_url?: string;
81
99
  bidderId?: number | undefined;
82
100
  }
83
- type AstKeywordValue = Array<string> | string | number | Array<number> | undefined;
84
- type Keywords = Record<string, AstKeywordValue>;
85
101
  interface SafeFrameConfig {
86
102
  allowExpansionByPush?: boolean;
87
103
  allowExpansionByOverlay?: boolean;
@@ -136,21 +152,6 @@ declare const DeviceTypes: {
136
152
  };
137
153
  type DeviceType = (typeof DeviceTypes)[keyof typeof DeviceTypes];
138
154
 
139
- declare const Countries: {
140
- readonly NO: "no";
141
- readonly SE: "se";
142
- };
143
- type Country = (typeof Countries)[keyof typeof Countries];
144
-
145
- declare const PageTypes: {
146
- readonly FRONT: "front";
147
- readonly ARTICLE: "article";
148
- readonly SECTION: "section";
149
- readonly COLLECTION: "collection";
150
- readonly OTHER: "other";
151
- };
152
- type PageType = (typeof PageTypes)[keyof typeof PageTypes];
153
-
154
155
  /**
155
156
  * SDK-agnostic shape of the pulse tracker instance advertory actually calls.
156
157
  * getActor is typed Promise<unknown> — nothing in this codebase reads its
@@ -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))})}),I="cmp:loaded";let S="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(!S)throw new Error("[Advertory]: getConsentSync method was called before the tcfManager was available.");const t=S.getConsentedToAllSync();return T(`TCF consented to all is: ${t}`),S.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"),S=window._tcf_,void e(S);T("TCF consent manager is not available");const n=()=>{T("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(I,n),A=!0,t(new Error("Timeout waiting for CMP to load"))},o);T("Listening for CMP loaded event..."),document.addEventListener(I,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(!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(()=>{T("TCF isConsentedToAll timed out, resolving with false"),n(!1)},o);S.onTcfReady(()=>{T("On Tcf Ready called, waiting for consent"),clearTimeout(r)}),S.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,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="block";(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");l&&(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""}}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");l&&(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,3 +1,21 @@
1
+ declare const PageTypes: {
2
+ readonly FRONT: "front";
3
+ readonly ARTICLE: "article";
4
+ readonly SECTION: "section";
5
+ readonly COLLECTION: "collection";
6
+ readonly OTHER: "other";
7
+ };
8
+ type PageType = (typeof PageTypes)[keyof typeof PageTypes];
9
+
10
+ declare const Countries: {
11
+ readonly NO: "no";
12
+ readonly SE: "se";
13
+ };
14
+ type Country = (typeof Countries)[keyof typeof Countries];
15
+
16
+ type AstKeywordValue = Array<string> | string | number | Array<number> | undefined;
17
+ type Keywords = Record<string, AstKeywordValue>;
18
+
1
19
  type AstAdType = 'banner' | 'video' | 'native' | 'outstream';
2
20
  interface AstBanner {
3
21
  content: string;
@@ -99,8 +117,6 @@ interface Events {
99
117
  interface AstNativeItem {
100
118
  required: boolean;
101
119
  }
102
- type AstKeywordValue = Array<string> | string | number | Array<number> | undefined;
103
- type Keywords = Record<string, AstKeywordValue>;
104
120
  type AstKeywords = Record<string, AstKeywordValue> & {
105
121
  'se-generic-adformat'?: Array<string>;
106
122
  'se-generic-targetid'?: Array<string>;
@@ -281,21 +297,6 @@ declare const DeviceTypes: {
281
297
  };
282
298
  type DeviceType = (typeof DeviceTypes)[keyof typeof DeviceTypes];
283
299
 
284
- declare const Countries: {
285
- readonly NO: "no";
286
- readonly SE: "se";
287
- };
288
- type Country = (typeof Countries)[keyof typeof Countries];
289
-
290
- declare const PageTypes: {
291
- readonly FRONT: "front";
292
- readonly ARTICLE: "article";
293
- readonly SECTION: "section";
294
- readonly COLLECTION: "collection";
295
- readonly OTHER: "other";
296
- };
297
- type PageType = (typeof PageTypes)[keyof typeof PageTypes];
298
-
299
300
  /**
300
301
  * SDK-agnostic shape of the pulse tracker instance advertory actually calls.
301
302
  * getActor is typed Promise<unknown> — nothing in this codebase reads its
@@ -809,6 +810,7 @@ interface UpdatableSiteConfig {
809
810
  tcf?: SiteConfig['tcf'];
810
811
  pageContext?: Partial<PageContext>;
811
812
  pageOptions?: Partial<AstPageOptions>;
813
+ pageSectionsSelectors?: Partial<PageSectionsSelectors>;
812
814
  appearanceConfig?: Partial<AppearanceConfig>;
813
815
  }
814
816