@schibsted/advertory 3.18.0 → 3.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (437) hide show
  1. package/aftenposten/cjs/index.js +1 -1
  2. package/aftenposten/es/{_auto-entry_aftenposten-DNQJWDRJ.js → _auto-entry_aftenposten-Tve0PdPg.js} +1 -1
  3. package/aftenposten/es/{events-CrUg0OPQ.js → events-xQDHepfd.js} +1 -1
  4. package/aftenposten/es/identity-facade-B1A7Z8yI.js +1 -0
  5. package/aftenposten/es/{index-CRmEgEA-.js → index-BFDpivf7.js} +1 -1
  6. package/aftenposten/es/{index-B8H4adn8.js → index-BR2fDQ3t.js} +1 -1
  7. package/aftenposten/es/{index-Baw9qoIS.js → index-C8BGU0H-.js} +1 -1
  8. package/aftenposten/es/index-CEc919BP.js +1 -0
  9. package/aftenposten/es/{index-oxCgGc0x.js → index-DLSHhMHq.js} +1 -1
  10. package/aftenposten/es/{index-D32eGxZe.js → index-DbMF7ZzI.js} +1 -1
  11. package/aftenposten/es/index-DdQ7ku5W.js +1 -0
  12. package/aftenposten/es/{index-CukHpBrP.js → index-DoNUR1U3.js} +1 -1
  13. package/aftenposten/es/index.js +1 -1
  14. package/aftenposten/es/{styles-De8j1a-R.js → styles-BNvjI7Zm.js} +1 -1
  15. package/aftenposten/es/{styles-CnQw6LZA.js → styles-BfymPmLm.js} +1 -1
  16. package/aftenposten/es/{styles-te1Pc83x.js → styles-C-DhtppN.js} +1 -1
  17. package/aftenposten/es/{styles-D_6_RmQo.js → styles-CCqSli4X.js} +1 -1
  18. package/aftenposten/es/{styles-C2cUV2b9.js → styles-CJ54OWq6.js} +1 -1
  19. package/aftenposten/es/{styles-DU53ed9M.js → styles-Cmayky32.js} +1 -1
  20. package/aftenposten/es/{styles-D5ApGFNI.js → styles-Cu6_bWyx.js} +1 -1
  21. package/aftenposten/es/{styles-DOKeZ3h-.js → styles-DWHjxzlg.js} +1 -1
  22. package/aftenposten/es/{styles-B4tTww6V.js → styles-D_weffQF.js} +1 -1
  23. package/aftenposten/es/{styles-DHu1uaqZ.js → styles-DuXHeE-l.js} +1 -1
  24. package/aftenposten/es/{styles-oO_QUZ2K.js → styles-K7tpE8_Y.js} +1 -1
  25. package/aftenpostenv2/es/{_auto-entry_aftenpostenv2-BtdjJBRi.js → _auto-entry_aftenpostenv2-DWtGX9qk.js} +1 -1
  26. package/aftenpostenv2/es/{events-BrKUU6S-.js → events-DtEgEZu5.js} +1 -1
  27. package/aftenpostenv2/es/identity-facade-Cqco51UF.js +1 -0
  28. package/aftenpostenv2/es/{index-Bva5GG_A.js → index-1bMBECFZ.js} +1 -1
  29. package/aftenpostenv2/es/{index-ynKvMWyD.js → index-Bm7xOUah.js} +1 -1
  30. package/aftenpostenv2/es/{index-Do7nyVpB.js → index-CeVnQlsp.js} +1 -1
  31. package/aftenpostenv2/es/index-DSjPd2s4.js +1 -0
  32. package/aftenpostenv2/es/index-DnJSE16l.js +1 -0
  33. package/aftenpostenv2/es/{index-DLyPNdxl.js → index-FNm09Hu5.js} +1 -1
  34. package/aftenpostenv2/es/{index-DYl7sSG_.js → index-gy-9pNJD.js} +1 -1
  35. package/aftenpostenv2/es/{index-B3eSx0AF.js → index-rvkEfm4F.js} +1 -1
  36. package/aftenpostenv2/es/index.js +1 -1
  37. package/aftenpostenv2/es/{styles-DyvLGuPw.js → styles--ODSHkGx.js} +1 -1
  38. package/aftenpostenv2/es/{styles-BJBUx_yM.js → styles-3ZwXsuxG.js} +1 -1
  39. package/aftenpostenv2/es/{styles-ZLshTJTG.js → styles-BQirFtLP.js} +1 -1
  40. package/aftenpostenv2/es/{styles-Bdvoy-5V.js → styles-BZw7HTv7.js} +1 -1
  41. package/aftenpostenv2/es/{styles-Cp2Dp8Rx.js → styles-CYRnGCOf.js} +1 -1
  42. package/aftenpostenv2/es/{styles-CArxNqcE.js → styles-CoE8ldJR.js} +1 -1
  43. package/aftenpostenv2/es/{styles-DsNPVIp7.js → styles-Cx18n8ID.js} +1 -1
  44. package/aftenpostenv2/es/{styles-CkIPdN9M.js → styles-DJAn92kg.js} +1 -1
  45. package/aftenpostenv2/es/{styles-jtekW9Qf.js → styles-DrPAORY8.js} +1 -1
  46. package/aftenpostenv2/es/{styles-BukZbfMI.js → styles-fzCBUGam.js} +1 -1
  47. package/aftenpostenv2/es/{styles-44Ytvc9u.js → styles-v_gZvJl3.js} +1 -1
  48. package/aftonbladet/cjs/index.js +1 -1
  49. package/aftonbladet/es/{_auto-entry_aftonbladet-CznwHJ9L.js → _auto-entry_aftonbladet-gwuJYn5k.js} +1 -1
  50. package/aftonbladet/es/{events-DJJwehoG.js → events-Dn4HgHY0.js} +1 -1
  51. package/aftonbladet/es/identity-facade-YCmvHQL4.js +1 -0
  52. package/aftonbladet/es/{index-BTr2EHBG.js → index-9s1OEytQ.js} +1 -1
  53. package/aftonbladet/es/{index-DHQi_Gb5.js → index-C8L28Sbb.js} +1 -1
  54. package/aftonbladet/es/{index-CcK3t2zJ.js → index-CNoND9KG.js} +1 -1
  55. package/aftonbladet/es/{index-L7Igeo8s.js → index-D-l1zaRE.js} +1 -1
  56. package/aftonbladet/es/index-D7tEeN2y.js +1 -0
  57. package/aftonbladet/es/{index-C7WHdqMB.js → index-DxIRmf9j.js} +1 -1
  58. package/aftonbladet/es/index-Hmt-WETp.js +1 -0
  59. package/aftonbladet/es/{index-BMlpU8aw.js → index-lHJ8rPdO.js} +1 -1
  60. package/aftonbladet/es/index.js +1 -1
  61. package/aftonbladet/es/{styles-BwQI8Har.js → styles-4zXciFo4.js} +1 -1
  62. package/aftonbladet/es/{styles-B24gjaYN.js → styles-BLS5TzS8.js} +1 -1
  63. package/aftonbladet/es/{styles-Du4kYdG3.js → styles-C_NEx-3s.js} +1 -1
  64. package/aftonbladet/es/{styles-DpD1yUu5.js → styles-D4M4fmOm.js} +1 -1
  65. package/aftonbladet/es/{styles-B8-C3HbP.js → styles-DkBKPNDs.js} +1 -1
  66. package/aftonbladet/es/{styles-Bs-L9RIM.js → styles-Dkb_Bh3e.js} +1 -1
  67. package/aftonbladet/es/{styles-C2KNA6_Q.js → styles-DuNRDVxB.js} +1 -1
  68. package/aftonbladetv2/es/{_auto-entry_aftonbladetv2-Cuo_y3Oe.js → _auto-entry_aftonbladetv2-DaiGRw9V.js} +1 -1
  69. package/aftonbladetv2/es/{events-pCNuOORU.js → events-BcI_eHc7.js} +1 -1
  70. package/aftonbladetv2/es/identity-facade-C2_1gsAa.js +1 -0
  71. package/aftonbladetv2/es/{index-DZF6xWvX.js → index-7IyWH9Pi.js} +1 -1
  72. package/aftonbladetv2/es/{index-DmNGezFs.js → index-BPVgqjSK.js} +1 -1
  73. package/aftonbladetv2/es/index-BrbM5bYX.js +1 -0
  74. package/aftonbladetv2/es/{index-FxbhCpIm.js → index-C87hTI7W.js} +1 -1
  75. package/aftonbladetv2/es/{index-Df0qhN5Y.js → index-D1j_NWjg.js} +1 -1
  76. package/aftonbladetv2/es/index-D6cUOv7e.js +1 -0
  77. package/aftonbladetv2/es/{index-nAn7C_ww.js → index-Deh_hDuT.js} +1 -1
  78. package/aftonbladetv2/es/{index-ChI1Xtav.js → index-DfiXnG3N.js} +1 -1
  79. package/aftonbladetv2/es/index.js +1 -1
  80. package/aftonbladetv2/es/{styles-DzMy_ylE.js → styles-B17PRnLw.js} +1 -1
  81. package/aftonbladetv2/es/{styles-3aKR0OYZ.js → styles-BK5VBwQb.js} +1 -1
  82. package/aftonbladetv2/es/{styles-Duqf6IZA.js → styles-BVD-shyq.js} +1 -1
  83. package/aftonbladetv2/es/{styles-m7_3GfZS.js → styles-CIwSexMs.js} +1 -1
  84. package/aftonbladetv2/es/{styles-WUl2O9SJ.js → styles-ClbFUK7m.js} +1 -1
  85. package/aftonbladetv2/es/{styles-xrODYqc8.js → styles-D5Hbe4BD.js} +1 -1
  86. package/aftonbladetv2/es/{styles-BPm6_Tyf.js → styles-DoMnjSM2.js} +1 -1
  87. package/bt/cjs/index.js +1 -1
  88. package/bt/es/{_auto-entry_bt-CZB9FTXD.js → _auto-entry_bt-D1MD_xdz.js} +1 -1
  89. package/bt/es/{events-DE_uZlA1.js → events-YRqEmDeJ.js} +1 -1
  90. package/bt/es/identity-facade-BjI4-cFT.js +1 -0
  91. package/bt/es/{index-CODK_zJ9.js → index-78QagF5C.js} +1 -1
  92. package/bt/es/{index-B0a_Oa4i.js → index-B3i9CLRJ.js} +1 -1
  93. package/bt/es/{index-CSofW9eD.js → index-BMuNECOp.js} +1 -1
  94. package/bt/es/index-BOCFWXjz.js +1 -0
  95. package/bt/es/{index-Dr3GcIfK.js → index-CJms3bV6.js} +1 -1
  96. package/bt/es/{index-Du1q8PZU.js → index-D31HelSe.js} +1 -1
  97. package/bt/es/{index-Cd2KH2u-.js → index-DPURtZv7.js} +1 -1
  98. package/bt/es/index-vl1Q4LBE.js +1 -0
  99. package/bt/es/index.js +1 -1
  100. package/bt/es/{styles-imkAc2uq.js → styles-BByyc3sq.js} +1 -1
  101. package/bt/es/{styles-Bta58nId.js → styles-BVlkZfXV.js} +1 -1
  102. package/{sa/es/styles-CiDiUkgA.js → bt/es/styles-C1RQLfGY.js} +1 -1
  103. package/bt/es/{styles-B_fc-kdO.js → styles-CkzFP96P.js} +1 -1
  104. package/{vg/es/styles-1n8j2EjV.js → bt/es/styles-Cxm0surD.js} +1 -1
  105. package/bt/es/{styles-D4NwmlBA.js → styles-D8GThw3e.js} +1 -1
  106. package/bt/es/{styles-CSxhZElM.js → styles-D8ovgsaK.js} +1 -1
  107. package/bt/es/{styles-BscvjspQ.js → styles-DQtRkDqG.js} +1 -1
  108. package/bt/es/{styles-BM5_s_r7.js → styles-Dsk0btPX.js} +1 -1
  109. package/bt/es/{styles-BvkvfBxv.js → styles-Qg4AW4zT.js} +1 -1
  110. package/btv2/es/{_auto-entry_btv2-jyP99ykN.js → _auto-entry_btv2-4dXVMldo.js} +1 -1
  111. package/{sav2/es/events-BM5FbEtd.js → btv2/es/events-DMH43tLi.js} +1 -1
  112. package/btv2/es/identity-facade-BhICwE-t.js +1 -0
  113. package/btv2/es/{index-DV0c6Xrq.js → index-C4AnfrKp.js} +1 -1
  114. package/btv2/es/index-CWZH5cCc.js +1 -0
  115. package/{omni/es/index-DoPgNVgH.js → btv2/es/index-C_4mn5_g.js} +1 -1
  116. package/btv2/es/{index-B5UitQXo.js → index-DAFsfJ9t.js} +1 -1
  117. package/{sav2/es/index-Heoe_AIr.js → btv2/es/index-DAOWTrWO.js} +1 -1
  118. package/btv2/es/{index-CBJLiIfz.js → index-DFGzN5x9.js} +1 -1
  119. package/btv2/es/{index-C9BTFt3G.js → index-hRBAHHA1.js} +1 -1
  120. package/btv2/es/index-l1O-tlpN.js +1 -0
  121. package/btv2/es/index.js +1 -1
  122. package/btv2/es/{styles-CVY_OoAs.js → styles-BVRqiO2h.js} +1 -1
  123. package/{sav2/es/styles-Jp_tDrzp.js → btv2/es/styles-BkMkQCbs.js} +1 -1
  124. package/btv2/es/{styles-BSPiAJfQ.js → styles-CMKS_Jvj.js} +1 -1
  125. package/btv2/es/{styles-CkiWn-pK.js → styles-CVrRZHar.js} +1 -1
  126. package/btv2/es/{styles-BInms_h5.js → styles-Dg9ALvok.js} +1 -1
  127. package/btv2/es/{styles-B2feTcg_.js → styles-Ds8u5Def.js} +1 -1
  128. package/{sav2/es/styles-CK4Np9Dz.js → btv2/es/styles-UOd4vRaH.js} +1 -1
  129. package/{sav2/es/styles-CjU4l-SU.js → btv2/es/styles-a3-2JcCe.js} +1 -1
  130. package/btv2/es/{styles-x4cDdw2y.js → styles-uRz4QDyG.js} +1 -1
  131. package/e24/es/_auto-entry_e24-BlFIZILi.js +1 -0
  132. package/e24/es/{events-DF8f8UTH.js → events-CwvQGu-m.js} +1 -1
  133. package/e24/es/{index-Woi0QIyP.js → index-BbGstTBs.js} +1 -1
  134. package/e24/es/{index-CP6Im7lE.js → index-BmM9Q_Fm.js} +1 -1
  135. package/e24/es/{index-BQJbsM6e.js → index-Cmi93XZ-.js} +1 -1
  136. package/e24/es/{index-BsmbZsXV.js → index-Cy5SA-Ed.js} +1 -1
  137. package/e24/es/index-D-uX9uoo.js +1 -0
  138. package/e24/es/index-DDX95Sij.js +1 -0
  139. package/e24/es/{index-CYHnZe0J.js → index-DG9t2woh.js} +1 -1
  140. package/e24/es/{index-BeeAlBuD.js → index-DS6u_jwd.js} +1 -1
  141. package/e24/es/index.js +1 -1
  142. package/e24/es/{styles-jZ8udc-A.js → styles-B6xU6J45.js} +1 -1
  143. package/e24/es/{styles-Bz0tFWFB.js → styles-BxvgdFG4.js} +1 -1
  144. package/e24/es/{styles-Bfd45Pjf.js → styles-CJzB5pSG.js} +1 -1
  145. package/e24/es/{styles-BhEr5ezW.js → styles-ChBYY8bm.js} +1 -1
  146. package/e24/es/{styles-C4GttOVW.js → styles-Cl1I905Q.js} +1 -1
  147. package/e24/es/{styles-Cmrihndl.js → styles-DEJwGPrm.js} +1 -1
  148. package/{tv4/es/styles-B-tvI5HI.js → e24/es/styles-DF27RJ5O.js} +1 -1
  149. package/e24/es/{styles-DjdLwJ-N.js → styles-Dflg9p-h.js} +1 -1
  150. package/e24/es/{styles-SI2Tr_RP.js → styles-Do2kU3xu.js} +1 -1
  151. package/e24/es/{styles-CElrg8qK.js → styles-Dwf1vw4U.js} +1 -1
  152. package/e24/es/{styles-D3LLw4RS.js → styles-aNb4-iQ2.js} +1 -1
  153. package/e24/es/{styles-D3vWLz7X.js → styles-qPuQBHOZ.js} +1 -1
  154. package/fotbollskanalen/cjs/index.js +1 -1
  155. package/fotbollskanalen/es/{_auto-entry_fotbollskanalen-BoGkrwkH.js → _auto-entry_fotbollskanalen-DRg32rfb.js} +1 -1
  156. package/fotbollskanalen/es/{events-XgL2a9Ad.js → events-CWXuTPQI.js} +1 -1
  157. package/fotbollskanalen/es/identity-facade-DjclF_1k.js +1 -0
  158. package/fotbollskanalen/es/{index-D5gs6mRS.js → index-B502oNgV.js} +1 -1
  159. package/fotbollskanalen/es/index-B5X2tzCJ.js +1 -0
  160. package/fotbollskanalen/es/{index-B4s9_MRH.js → index-DPO2qCL6.js} +1 -1
  161. package/fotbollskanalen/es/{index-Bb-DsC59.js → index-DrVft5FF.js} +1 -1
  162. package/fotbollskanalen/es/{index-D3vJg6of.js → index-KuC48Gth.js} +1 -1
  163. package/fotbollskanalen/es/{index-D3_ErBOr.js → index-UzsfNA_u.js} +1 -1
  164. package/fotbollskanalen/es/{index-CABM14sH.js → index-_1063RUZ.js} +1 -1
  165. package/fotbollskanalen/es/index-tOea9GR8.js +1 -0
  166. package/fotbollskanalen/es/index.js +1 -1
  167. package/fotbollskanalen/es/{styles-Be0tghxV.js → styles-B_dFAksr.js} +1 -1
  168. package/fotbollskanalen/es/{styles-hLRHR3gJ.js → styles-BijNP6ET.js} +1 -1
  169. package/fotbollskanalen/es/{styles-Bvv8u7Ja.js → styles-CVCPktwj.js} +1 -1
  170. package/fotbollskanalen/es/{styles-5gUPsWW9.js → styles-DGEkhUjm.js} +1 -1
  171. package/fotbollskanalen/es/{styles-CoTOpYRX.js → styles-S1QWzSdb.js} +1 -1
  172. package/godt/cjs/index.js +1 -1
  173. package/kilkaya/cjs/index.js +1 -1
  174. package/kilkaya/es/index.js +1 -1
  175. package/klart/cjs/index.js +1 -1
  176. package/koket/cjs/index.js +1 -1
  177. package/koket/es/{_auto-entry_koket-BITL2_K1.js → _auto-entry_koket-BHg0RvvL.js} +1 -1
  178. package/koket/es/{events-CJe7o002.js → events-mbYajTsn.js} +1 -1
  179. package/koket/es/identity-facade-BDC_83uu.js +1 -0
  180. package/koket/es/index-BAq2NOWx.js +1 -0
  181. package/koket/es/index-BFYKJukh.js +1 -0
  182. package/koket/es/{index-D76GM_Dq.js → index-Bxy5DWVd.js} +1 -1
  183. package/koket/es/{index-Dxz_IhQv.js → index-CXmUpEcC.js} +1 -1
  184. package/koket/es/{index-D2ikK49F.js → index-CcgdzAMk.js} +1 -1
  185. package/koket/es/{index-DnTZqSNs.js → index-CmPLF2Z6.js} +1 -1
  186. package/koket/es/{index-CSA4jvBm.js → index-Di7VhOpX.js} +1 -1
  187. package/koket/es/{index-DUMFbWv2.js → index-PevTPzLn.js} +1 -1
  188. package/koket/es/index.js +1 -1
  189. package/{svdv2/es/styles-DQ_w0XU-.js → koket/es/styles-BbTxS441.js} +1 -1
  190. package/koket/es/{styles-D7VFY5X2.js → styles-CSh9_vAt.js} +1 -1
  191. package/{svdv2/es/styles-XF3Es5pU.js → koket/es/styles-Co5ZqMbg.js} +1 -1
  192. package/koket/es/{styles-_ywNTArC.js → styles-DFdUAMLD.js} +1 -1
  193. package/koket/es/{styles-B5AKPQcZ.js → styles-DsywZyMH.js} +1 -1
  194. package/minmote/cjs/index.js +1 -1
  195. package/mtv/es/{_auto-entry_mtv-D53dvC1i.js → _auto-entry_mtv-DfNaThKA.js} +1 -1
  196. package/mtv/es/identity-facade-D_-1QlSb.js +1 -0
  197. package/mtv/es/index-D7_oA5KZ.js +1 -0
  198. package/mtv/es/{index-TbvSGRB5.js → index-DV7Ugpbb.js} +1 -1
  199. package/mtv/es/{index-DIuXGid2.js → index-Dw0iebnS.js} +1 -1
  200. package/mtv/es/index-p610-MLD.js +1 -0
  201. package/mtv/es/index.js +1 -1
  202. package/mtv/es/{styles-BpMDR0GA.js → styles-BMAOyNUZ.js} +1 -1
  203. package/omni/es/{_auto-entry_omni-BVChM78_.js → _auto-entry_omni-Dqd2l-yE.js} +1 -1
  204. package/{tvnu/es/events-Dn2KJr0j.js → omni/es/events-K68kj4rV.js} +1 -1
  205. package/omni/es/identity-facade-Duta4qyh.js +1 -0
  206. package/omni/es/{index-DS_3fMAL.js → index-2sqkxCUP.js} +1 -1
  207. package/omni/es/{index-DUL7FQvO.js → index-6RrI5Xc8.js} +1 -1
  208. package/omni/es/{index-DEd1G3aM.js → index-C0tOd4WT.js} +1 -1
  209. package/omni/es/{index-ChmcSFS1.js → index-Chrat1gK.js} +1 -1
  210. package/omni/es/{index-fF0V2I_V.js → index-DOsDI_Kk.js} +1 -1
  211. package/{btv2/es/index-DpxleBMV.js → omni/es/index-DzypmlB0.js} +1 -1
  212. package/omni/es/index-IIqMYioz.js +1 -0
  213. package/omni/es/index-amUvs-_W.js +1 -0
  214. package/omni/es/index.js +1 -1
  215. package/omni/es/{styles-kHuAMSyr.js → styles-BYS1P-tF.js} +1 -1
  216. package/omni/es/{styles-CW92yIpD.js → styles-Bow7auoh.js} +1 -1
  217. package/omni/es/{styles-BdEe5Ynl.js → styles-CV0NQhKX.js} +1 -1
  218. package/package.json +1 -1
  219. package/pent/cjs/index.js +1 -1
  220. package/sa/cjs/index.js +1 -1
  221. package/sa/es/{_auto-entry_sa-J8OfTxac.js → _auto-entry_sa-DyqGrGx4.js} +1 -1
  222. package/sa/es/{events-C3BMo9Uo.js → events-CgW4jEAG.js} +1 -1
  223. package/sa/es/identity-facade-Daj6yMGJ.js +1 -0
  224. package/sa/es/{index-Cx1T5nb9.js → index-B-VUvpKF.js} +1 -1
  225. package/sa/es/index-BQTjJitn.js +1 -0
  226. package/sa/es/{index-DFBOTrjK.js → index-Bn65l6Sc.js} +1 -1
  227. package/sa/es/{index-fKdGZ7GD.js → index-C6w0pjh-.js} +1 -1
  228. package/sa/es/{index-CawIeUqK.js → index-CW8otao7.js} +1 -1
  229. package/sa/es/{index-CuD4xNFU.js → index-CuH6WR7s.js} +1 -1
  230. package/sa/es/{index-Cto0_xo8.js → index-D61ZK7Cb.js} +1 -1
  231. package/sa/es/index-tbR32a6N.js +1 -0
  232. package/sa/es/index.js +1 -1
  233. package/sa/es/{styles-BMtPMhSP.js → styles-B09eEPL5.js} +1 -1
  234. package/sa/es/{styles-B3bE3oeO.js → styles-B0IbKP96.js} +1 -1
  235. package/sa/es/{styles-G5IDTsth.js → styles-CJQupH56.js} +1 -1
  236. package/sa/es/{styles-CL6zmM-h.js → styles-CK_iyyOw.js} +1 -1
  237. package/sa/es/{styles-DjWc-g-U.js → styles-Ca3-DJZq.js} +1 -1
  238. package/{vg/es/styles-3vc-o84P.js → sa/es/styles-CzG_TYUC.js} +1 -1
  239. package/{vg/es/styles-CzX1ajop.js → sa/es/styles-D5V5ppDj.js} +1 -1
  240. package/sa/es/{styles-BvRBg64g.js → styles-DHZkBRdL.js} +1 -1
  241. package/sa/es/{styles-DnI_syRT.js → styles-DcQMUe8C.js} +1 -1
  242. package/sa/es/{styles-KY5KJOnA.js → styles-Y4cCQABF.js} +1 -1
  243. package/sav2/es/{_auto-entry_sav2-nmDgZMyM.js → _auto-entry_sav2-oUKXN5Cv.js} +1 -1
  244. package/{omni/es/events-Dcpm5emQ.js → sav2/es/events-5-DW8DNa.js} +1 -1
  245. package/sav2/es/identity-facade-BROor3DB.js +1 -0
  246. package/sav2/es/{index-CXNd1xW1.js → index-BV_Oux9-.js} +1 -1
  247. package/{tvnu/es/index-DFmrpUUo.js → sav2/es/index-Coz-p9iZ.js} +1 -1
  248. package/sav2/es/index-DBju8vD1.js +1 -0
  249. package/sav2/es/{index-BgbkIwOq.js → index-DSPOhBze.js} +1 -1
  250. package/{tvnu/es/index-C3LNZYqg.js → sav2/es/index-MPeNVDBL.js} +1 -1
  251. package/sav2/es/index-R5XLuH8n.js +1 -0
  252. package/sav2/es/{index-CqZ5h5be.js → index-UGWFEB3j.js} +1 -1
  253. package/sav2/es/{index-CwfU7lhW.js → index-ehh4zyl6.js} +1 -1
  254. package/sav2/es/index.js +1 -1
  255. package/sav2/es/{styles-eYX3EHRu.js → styles-B8y3G3FO.js} +1 -1
  256. package/sav2/es/{styles-9CZX0c_O.js → styles-CfBbNztv.js} +1 -1
  257. package/sav2/es/{styles-DmiRDUDx.js → styles-Cfjk3GeF.js} +1 -1
  258. package/{vgv2/es/styles-CFJwqIst.js → sav2/es/styles-CqS3_D5H.js} +1 -1
  259. package/sav2/es/{styles-BKirbOEP.js → styles-D-aY7Kms.js} +1 -1
  260. package/{vgv2/es/styles-NmqmsWTa.js → sav2/es/styles-D3AEgmZ7.js} +1 -1
  261. package/{btv2/es/styles-DTzc8iL0.js → sav2/es/styles-DKWFSmJx.js} +1 -1
  262. package/{vgv2/es/styles-ctQS7q-2.js → sav2/es/styles-DLd-glgd.js} +1 -1
  263. package/sav2/es/{styles-B4ork19U.js → styles-DkEzbye-.js} +1 -1
  264. package/svd/cjs/index.js +1 -1
  265. package/svd/es/{_auto-entry_svd-BOBXC1NB.js → _auto-entry_svd-BJDmLwK4.js} +1 -1
  266. package/svd/es/{events-C1VnSaGH.js → events-CJEzzOkM.js} +1 -1
  267. package/svd/es/identity-facade-G8xOuiES.js +1 -0
  268. package/svd/es/index-7pMjf183.js +1 -0
  269. package/svd/es/{index-C0zYrhS8.js → index-BGuy7q75.js} +1 -1
  270. package/{tv4/es/index-B4Kh7kpG.js → svd/es/index-ByFum0Ht.js} +1 -1
  271. package/svd/es/{index-DkAKiA6e.js → index-CdeqDRiL.js} +1 -1
  272. package/{tv4/es/index-BsfijWz0.js → svd/es/index-D8-w2Zrr.js} +1 -1
  273. package/svd/es/{index-CbwiRx-g.js → index-DaCqWD2C.js} +1 -1
  274. package/svd/es/index-De8cMolp.js +1 -0
  275. package/svd/es/{index-B3Ok5Zxi.js → index-KJC6As1v.js} +1 -1
  276. package/svd/es/index.js +1 -1
  277. package/svd/es/{styles-CYqkTmPz.js → styles-BOupZnrK.js} +1 -1
  278. package/svd/es/{styles-4soJ7u-x.js → styles-C27QJnxq.js} +1 -1
  279. package/{tv4/es/styles-BjfL5pmp.js → svd/es/styles-Czwz7iv9.js} +1 -1
  280. package/svd/es/{styles-Dul2qFeg.js → styles-D0qm6kVv.js} +1 -1
  281. package/svd/es/{styles-C3IWf8aj.js → styles-D6FUS2Lx.js} +1 -1
  282. package/{tv4/es/styles-DwosxoLg.js → svd/es/styles-D9r9OnLQ.js} +1 -1
  283. package/svd/es/{styles-B6yIVgo2.js → styles-aqr9svHM.js} +1 -1
  284. package/svdv2/es/{_auto-entry_svdv2-C-1qQWmF.js → _auto-entry_svdv2-CLreTPmH.js} +1 -1
  285. package/svdv2/es/{events-Dd2yn2PL.js → events-KCadTxl3.js} +1 -1
  286. package/svdv2/es/identity-facade-6XLh3tPd.js +1 -0
  287. package/svdv2/es/{index-ZVx6osQq.js → index-B8RbMmJ8.js} +1 -1
  288. package/svdv2/es/index-BBT24FDS.js +1 -0
  289. package/svdv2/es/{index-B1Msxa1O.js → index-CCn-OmI-.js} +1 -1
  290. package/svdv2/es/index-CQXOnY9t.js +1 -0
  291. package/svdv2/es/{index-C_Hy2D6G.js → index-DWku1ORo.js} +1 -1
  292. package/svdv2/es/{index-D7ABApW9.js → index-Dg6mY90s.js} +1 -1
  293. package/svdv2/es/{index-CgvIVueE.js → index-DuGmh88D.js} +1 -1
  294. package/svdv2/es/{index-vayJTGli.js → index-wb3kiAkb.js} +1 -1
  295. package/svdv2/es/index.js +1 -1
  296. package/svdv2/es/{styles-CEborJgX.js → styles-BtVQF7bs.js} +1 -1
  297. package/svdv2/es/{styles-Bz8f24X2.js → styles-BuvxUEbh.js} +1 -1
  298. package/svdv2/es/{styles-Xcws2oR2.js → styles-CEKLrR1u.js} +1 -1
  299. package/svdv2/es/{styles-B0JQvBQt.js → styles-CzH_1sLm.js} +1 -1
  300. package/svdv2/es/{styles-BGCZCbcv.js → styles-DNEg4Iyo.js} +1 -1
  301. package/{koket/es/styles-CvVaiJbk.js → svdv2/es/styles-DeJhuM1w.js} +1 -1
  302. package/svdv2/es/{styles-CqjB4SkE.js → styles-PQSqNTuq.js} +1 -1
  303. package/{koket/es/styles-If56BndQ.js → svdv2/es/styles-bdRhUD4i.js} +1 -1
  304. package/tek/cjs/index.js +1 -1
  305. package/tv4/cjs/index.js +1 -1
  306. package/tv4/es/{_auto-entry_tv4-DrT58fo2.js → _auto-entry_tv4-CBLGjHou.js} +1 -1
  307. package/tv4/es/{events-CA_qpiiH.js → events-C66ndP0f.js} +1 -1
  308. package/tv4/es/identity-facade-Byb8x97X.js +1 -0
  309. package/tv4/es/index-C06nqWj8.js +1 -0
  310. package/{svd/es/index-t-VmRR6x.js → tv4/es/index-CmryMy4l.js} +1 -1
  311. package/tv4/es/{index-iFXY2RDG.js → index-CnO0y594.js} +1 -1
  312. package/tv4/es/index-D4MnNwZH.js +1 -0
  313. package/tv4/es/{index-1faQFOdm.js → index-DYGzrH19.js} +1 -1
  314. package/{svd/es/index-B0d8xAfM.js → tv4/es/index-DePsb88V.js} +1 -1
  315. package/tv4/es/{index-DJfxqylY.js → index-IHhoDSFm.js} +1 -1
  316. package/tv4/es/{index-DGUaN9RI.js → index-VnOUEyPC.js} +1 -1
  317. package/tv4/es/index.js +1 -1
  318. package/{e24/es/styles-BQnfcenF.js → tv4/es/styles-BDKGAK5o.js} +1 -1
  319. package/{svd/es/styles-CtcLRY0n.js → tv4/es/styles-BHRB_mp-.js} +1 -1
  320. package/tv4/es/{styles-DYdmZGFU.js → styles-Bpwmf5SO.js} +1 -1
  321. package/tv4/es/{styles-CMOqiTdr.js → styles-BqOiKQK-.js} +1 -1
  322. package/{svd/es/styles-B62zkTco.js → tv4/es/styles-CNdrS2sT.js} +1 -1
  323. package/tvnu/cjs/index.js +1 -1
  324. package/tvnu/es/{_auto-entry_tvnu-BN6qNwOY.js → _auto-entry_tvnu-BwxgbyD2.js} +1 -1
  325. package/{btv2/es/events-BqMvV7di.js → tvnu/es/events-DAuZVg9R.js} +1 -1
  326. package/tvnu/es/identity-facade-NomeYive.js +1 -0
  327. package/tvnu/es/{index-BTKg4emk.js → index-BfjWCLvz.js} +1 -1
  328. package/tvnu/es/index-BxKvAcWF.js +1 -0
  329. package/{btv2/es/index-CNOhmWcU.js → tvnu/es/index-ByPGwuny.js} +1 -1
  330. package/tvnu/es/{index-BjEOq_zN.js → index-D1CmJu8a.js} +1 -1
  331. package/{sav2/es/index-C5WrRc-b.js → tvnu/es/index-DtReuiTF.js} +1 -1
  332. package/tvnu/es/{index-CR8jWo2c.js → index-DvJP2BFc.js} +1 -1
  333. package/tvnu/es/index-XMGOKdOu.js +1 -0
  334. package/tvnu/es/{index-CCfVOFWB.js → index-dpIRNaul.js} +1 -1
  335. package/tvnu/es/index.js +1 -1
  336. package/{btv2/es/styles-UQhKSng8.js → tvnu/es/styles-C3UIWT_6.js} +1 -1
  337. package/tvnu/es/{styles-DWXHDRlP.js → styles-CJ-D06Ze.js} +1 -1
  338. package/tvnu/es/{styles-DQHdlPhl.js → styles-CkBdQxSE.js} +1 -1
  339. package/tvnu/es/{styles-D3x4jf-j.js → styles-ieCYZ2BR.js} +1 -1
  340. package/vg/cjs/index.js +1 -1
  341. package/vg/es/_auto-entry_vg-CZCnWz9h.js +1 -0
  342. package/vg/es/{events-BfqUtz1_.js → events-azOYx0q1.js} +1 -1
  343. package/vg/es/index-B5wDCTqX.js +1 -0
  344. package/vg/es/{index-CTaICLSw.js → index-BEOyX2Wr.js} +1 -1
  345. package/vg/es/{index-C_JV8JF_.js → index-C-p2n13h.js} +1 -1
  346. package/vg/es/{index-BJB7jY6x.js → index-CDwF0YQd.js} +1 -1
  347. package/vg/es/{index-CDqvLPgT.js → index-CGf-bWSP.js} +1 -1
  348. package/vg/es/{index-x8PwNet6.js → index-CKhvsgVy.js} +1 -1
  349. package/vg/es/{index-CuWR3e5A.js → index-CwCLyscs.js} +1 -1
  350. package/vg/es/index-GXg9GWOy.js +1 -0
  351. package/vg/es/index.js +1 -1
  352. package/vg/es/{styles-CC05R_3-.js → styles-BRFXPOOo.js} +1 -1
  353. package/{sa/es/styles-CcFDd5SA.js → vg/es/styles-BX8TjOhH.js} +1 -1
  354. package/vg/es/{styles-pTQEVgFw.js → styles-BXTr-tOf.js} +1 -1
  355. package/vg/es/{styles-BsguFks5.js → styles-BbqBATF4.js} +1 -1
  356. package/vg/es/{styles-CNRmBQ4c.js → styles-BzpRtGlm.js} +1 -1
  357. package/vg/es/{styles-Q9SKc1Hh.js → styles-CGPMvWKF.js} +1 -1
  358. package/vg/es/{styles--yOXPdjG.js → styles-CluX5NBm.js} +1 -1
  359. package/{bt/es/styles-BmrHJiYo.js → vg/es/styles-ConMXAAa.js} +1 -1
  360. package/vg/es/{styles-CgOAOEfA.js → styles-CrdVtM5r.js} +1 -1
  361. package/vg/es/{styles-DK6OtLji.js → styles-D8pQb7vJ.js} +1 -1
  362. package/vg/es/{styles-L2IpsHbq.js → styles-btaPzyxf.js} +1 -1
  363. package/vg/es/{styles-Di-6gMqt.js → styles-qoJJL703.js} +1 -1
  364. package/{bt/es/styles-C9A3YE-k.js → vg/es/styles-r7kx75rx.js} +1 -1
  365. package/vg/es/{styles-CVbJvaly.js → styles-saWjZ7Vw.js} +1 -1
  366. package/vg/es/{styles-B-9EIsrQ.js → styles-v287uw0Q.js} +1 -1
  367. package/vg/es/{styles-BmpqqoHg.js → styles-vLVEdNtd.js} +1 -1
  368. package/vgv2/es/_auto-entry_vgv2-Jn4NMMCE.js +1 -0
  369. package/vgv2/es/events-DllI3OCE.js +1 -0
  370. package/vgv2/es/{index-DG8kZFha.js → index-1W9g-nvN.js} +1 -1
  371. package/vgv2/es/{index-DYYNBjmC.js → index-2cJe-Eef.js} +1 -1
  372. package/vgv2/es/{index-D57YFxL2.js → index-BT-sPtHS.js} +1 -1
  373. package/vgv2/es/{index-MIhy6YLN.js → index-B_ydkmG-.js} +1 -1
  374. package/vgv2/es/{index-DVRyKCSg.js → index-CU7M1MUX.js} +1 -1
  375. package/vgv2/es/{index-BgPYv31C.js → index-D00u_Vrz.js} +1 -1
  376. package/vgv2/es/index-D7a67PWC.js +1 -0
  377. package/vgv2/es/index-DcUpfciw.js +1 -0
  378. package/vgv2/es/index.js +1 -1
  379. package/{sav2/es/styles-C30jV7ky.js → vgv2/es/styles-B8Xt4Rvd.js} +1 -1
  380. package/{tvnu/es/styles-D12Q2zLD.js → vgv2/es/styles-BDDajuUD.js} +1 -1
  381. package/vgv2/es/{styles-DOULAbPJ.js → styles-BNc9ub3p.js} +1 -1
  382. package/vgv2/es/{styles-DikRMMY4.js → styles-BqNKW7Qs.js} +1 -1
  383. package/vgv2/es/{styles-Dn0aUcYr.js → styles-BsxHydq2.js} +1 -1
  384. package/{btv2/es/styles-CaJ8VnX_.js → vgv2/es/styles-Bvy3Pr5x.js} +1 -1
  385. package/vgv2/es/{styles-C1IfNQfL.js → styles-CHiCEnI8.js} +1 -1
  386. package/vgv2/es/{styles-DPSrcrqr.js → styles-D0rdjk3q.js} +1 -1
  387. package/vgv2/es/{styles-D6H8kUXu.js → styles-D3PM0A4u.js} +1 -1
  388. package/vgv2/es/{styles-ridlIX7w.js → styles-DDwrDy_L.js} +1 -1
  389. package/vgv2/es/{styles-BdeVHtB7.js → styles-DcLW6Ufi.js} +1 -1
  390. package/vgv2/es/styles-DeXRJf7-.js +1 -0
  391. package/vgv2/es/{styles-Bhz17umu.js → styles-DiGH9BWs.js} +1 -1
  392. package/vgv2/es/{styles-BdY5gfHd.js → styles-Doih5h9g.js} +1 -1
  393. package/vgv2/es/{styles-CQVrfUUl.js → styles-i7ormIJY.js} +1 -1
  394. package/vgv2/es/{styles-CTcizZ-Q.js → styles-yWE21nMi.js} +1 -1
  395. package/aftenposten/es/index-B88se93R.js +0 -1
  396. package/aftenposten/es/index-DkODCj7Y.js +0 -1
  397. package/aftenpostenv2/es/index-DSAe15TH.js +0 -1
  398. package/aftenpostenv2/es/index-dOfoy9xz.js +0 -1
  399. package/aftonbladet/es/index-BfGlK5AK.js +0 -1
  400. package/aftonbladet/es/index-DX1V8TfP.js +0 -1
  401. package/aftonbladetv2/es/index-BG9zfrXp.js +0 -1
  402. package/aftonbladetv2/es/index-CG-_IAXO.js +0 -1
  403. package/bt/es/index-PV9x_biL.js +0 -1
  404. package/bt/es/index-vemxQymc.js +0 -1
  405. package/btv2/es/index-CMZC7H8g.js +0 -1
  406. package/btv2/es/index-DxvAY5Lc.js +0 -1
  407. package/e24/es/_auto-entry_e24-o2zJnnp7.js +0 -1
  408. package/e24/es/index-Cmwd1gSI.js +0 -1
  409. package/e24/es/index-v06i8ZMq.js +0 -1
  410. package/fotbollskanalen/es/index-CxQRsQ7s.js +0 -1
  411. package/fotbollskanalen/es/index-uHEsJIAw.js +0 -1
  412. package/koket/es/index-Bj4wpTgt.js +0 -1
  413. package/koket/es/index-D_t1L0Jw.js +0 -1
  414. package/mtv/es/index-BZztN2dU.js +0 -1
  415. package/mtv/es/index-DT8GWwa8.js +0 -1
  416. package/omni/es/index-B5L9LdZe.js +0 -1
  417. package/omni/es/index-D8Du6qKy.js +0 -1
  418. package/sa/es/index-Du-rhVYT.js +0 -1
  419. package/sa/es/index-DxUp0ZXa.js +0 -1
  420. package/sav2/es/index-BMjVrYV7.js +0 -1
  421. package/sav2/es/index-CFCEtWva.js +0 -1
  422. package/svd/es/index-CB5fxcjW.js +0 -1
  423. package/svd/es/index-CPMzs4OC.js +0 -1
  424. package/svdv2/es/index-Cm2XNnkR.js +0 -1
  425. package/svdv2/es/index-DjDdQPHz.js +0 -1
  426. package/tv4/es/index-BM8z6Ixi.js +0 -1
  427. package/tv4/es/index-CuR9OppE.js +0 -1
  428. package/tvnu/es/index-C-17pOoR.js +0 -1
  429. package/tvnu/es/index-vd3IGMiX.js +0 -1
  430. package/vg/es/_auto-entry_vg-Trd8pvQs.js +0 -1
  431. package/vg/es/index-DeQUkpYq.js +0 -1
  432. package/vg/es/index-DkPggcF3.js +0 -1
  433. package/vgv2/es/_auto-entry_vgv2-B3OjjjK2.js +0 -1
  434. package/vgv2/es/events-Bq8LUFIZ.js +0 -1
  435. package/vgv2/es/index-BWIZzC2g.js +0 -1
  436. package/vgv2/es/index-Cqg9XYLx.js +0 -1
  437. package/vgv2/es/styles-8OZXx9WD.js +0 -1
@@ -1 +0,0 @@
1
- import{i as n,_ as e,c as i,l as t,g as o,a as r,b as l,d,h as a,e as s,u as c,f as u,A as f,s as v}from"./_auto-entry_fotbollskanalen-BoGkrwkH.js";import{xandrAdLoaded as p,finnBlinkLoaded as m}from"./events-XgL2a9Ad.js";import"react/jsx-runtime";n('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const y={Blink:"Blink"},h=new Map,g=n=>{var e;if(!h.has(n)){const e=import(/* webpackIgnore: true */n).then(n=>(n=>{for(const[e,i]of Object.entries(y)){const t=n[e];null!=t&&(window[i]=t)}})(n)).catch(e=>{throw h.delete(n),e});h.set(n,e)}return null!==(e=h.get(n))&&void 0!==e?e:Promise.resolve()},b="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",k=n=>{var e,i;const t=document.querySelector(`[id^="${n}"]`);return null!==(i=null===(e=null==t?void 0:t.dataset)||void 0===e?void 0:e.finnBlinkId)&&void 0!==i?i:n},$=(n,e)=>{const{finnBlink:{enabled:t}={}}=i.get(),o=(null==e?void 0:e.enabled)||(n=>{var e;const i=document.querySelector(`[id^="${n}"]`);return!!(null===(e=null==i?void 0:i.dataset)||void 0===e?void 0:e.noBidAd)})(n);if(!o||!t)return null;const{height:r,requireImage:l,position:d,offset:a}=(null==e?void 0:e.sdkPayload)||{};return{selector:`#${k(n)}`,enabled:o,position:null!=d?d:n,height:null!=r?r:100,offset:null!=a?a:200,requireImage:l,advertoryTheme:null==e?void 0:e.advertoryTheme}},w=(n,a,s)=>e(void 0,void 0,void 0,function*(){const{placements:c,pageContext:{deviceType:u},appearanceConfig:f}=i.get();t(`rendering finn blink ad for ${n}`);const v=o(n),h=c[u].find(n=>n.targetId===v),g=$(n,null==h?void 0:h.finnBlink);if(!(null==g?void 0:g.enabled))return t(`Finn blink is not enabled on placement: ${n}`),s&&s(n),void p(n);if((n=>{var e;const i=k(n),t=document.querySelector(`[id^="${i}"]`);return!!(null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains("finn"))})(n))return void t(`Finn blink already loaded ${n}`);const{publisher:b,countryCode:w,finnBlink:C}=a,{sdkPayload:{channel:x}={}}=null!=C?C:{},I=null!=x?x:`${b}.${w}`,j="dark"===(null==f?void 0:f.theme)?"dark":"light";try{const n=yield r();yield(B=Object.assign(Object.assign({},g),{channel:I,userId:n,theme:j}),e(void 0,void 0,void 0,function*(){const{userId:n,theme:e}=B,i=d(B,["userId","theme"]),t=window[y.Blink];if(!t)return;const o=new t({remote:"https://www.finn.no/distribution-front/external/carousel",userId:n,theme:e});yield o.inject(Object.assign({},i))})),m(g.selector.replace("#",""),g.advertoryTheme)}catch(e){t(`Finn blink error ${e}`),s&&s(n),!s&&l(n),p(n)}var B}),C=()=>e(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{isMobileApp:e,countryCode:o}}=i.get();return!!(yield a(n,e,o,"finn-blink"))||(t("Skip loading finn blink ad due to missing TCF consent."),!1)}),x=(n,o,r,d)=>e(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:e}}=i.get();if(t(`loadFinnBlinkAd: loading finn blink ad for ${n}`),!(yield C())||e)return r&&r(n),p(n),void(!r&&l(n));try{yield g(b)}catch(n){console.error(n)}yield w(n,o,r),d&&d()}),I=(n,e)=>{var i;(t(`Appending ${e.id} after ${n.id}`),n.parentElement&&(i=n.parentElement,!Array.from(i.children).some(n=>n.classList.contains("advertory-finn-blink-wrapper"))))?(n.parentElement.style.display="none",n.parentElement.insertAdjacentElement("afterend",e)):t(`Cannot perform afterend on: ${n.id}`)},j=(n,o)=>e(void 0,void 0,void 0,function*(){var e,r;if(!o)return;const{replacementConfig:l}=o,d=null===(e=null==l?void 0:l.adsToReplace)||void 0===e?void 0:e[n],a=null===(r=null==l?void 0:l.sizes)||void 0===r?void 0:r[n];s()&&d&&a?(yield C())&&(yield g(b),d.forEach(([n,e])=>{const o=document.querySelector(`[id^="${n}"]`);if(!o)return;const r=(n=>{const{siteSpecificConfig:{publisherClassName:e}={}}=i.get(),o=document.createElement("div"),r=document.createElement("div");return r.id=n,o.appendChild(r),u(e,r,f.FINN_BLINK),t(`Creating blink container for: ${n}`),o})(e);(n=>{t(`Hiding old ad container: ${n.id}`),n.style.setProperty("display","none","important")})(o),I(o,r),o.dataset.finnBlinkId=e,c().withFullAdsChain(n)})):t(`Finn blink configuration is incorrect: ${JSON.stringify(l)}`)}),B=n=>document.querySelector(`#${n}`),A=n=>e(void 0,void 0,void 0,function*(){if(!n.length)return;const{appearanceConfig:e,pageContext:{deviceType:t}}=i.get(),o=null==e?void 0:e.defaultThreshold[t];for(const e of n){const{requestThreshold:n,targetId:i}=e,t=B(i);t&&(yield v(t,null!=n?n:o))}});export{A as handleFinnBlinkOnlyPlacements,x as loadFinnBlinkAd,j as replaceAdsWithFinnBlink};
@@ -1 +0,0 @@
1
- import{o as t,w as e,C as n,_ as a,l as r,p as i,P as s,q as o,r as l,h as d,N as c}from"./_auto-entry_fotbollskanalen-BoGkrwkH.js";import{jsxs as u,jsx as g}from"react/jsx-runtime";class p{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];const{host:a,pathname:r}=new URL(n);if(!a.includes("www.vg.no")&&!r.includes("annonsorinnhold"))return[n];const i=r.split("/");return i.length?[...i.filter(Boolean).slice(1).map(t=>t),n]:[n]}}class v{getPulseObjectId(){return""}getPulsePageId(t,e){return""}}const h="[data-k5a-teaser-analytics]";class m extends t{constructor(t,e,n,a){super(t,""),this.root=e,this.newsroomStrategy=n,this.pageType=a}getTargetId(){return this.root.id}buildAdObject(){return this.getEventInput("view")}parseKilkayaData(){const t=this.root.querySelector("article");if(!t)return{};const e=t.dataset.k5aTeaserAnalytics;try{return e?JSON.parse(e):{}}catch(t){return{}}}mapPageType(t){var e;return null!==(e={front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[null!=t?t:"front"])&&void 0!==e?e:"Frontpage"}getArticleId(){var t;return null!==(t=location.pathname.split("/").slice(-2,-1).pop())&&void 0!==t?t:""}getPlacementData(){var t,e;const n=this.root.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,secondaryPosition:Number(null==n?void 0:n.dataset.pulseSecondaryposition)||0,slot:null!==(e=null==n?void 0:n.dataset.slotTag)&&void 0!==e?e:""}}getEventTarget(){const{link:t,itemId:e,title:n}=this.parseKilkayaData();return{id:e,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(t){return t.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}waitForAnalyticsData(t){const e=this.root.querySelector(h);if(Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics))return void t();const n=new MutationObserver(()=>{const e=this.root.querySelector(h);Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics)&&(n.disconnect(),t())});n.observe(this.root,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]})}trackLoad(){}trackImpression(){e(this.root,()=>this.waitForAnalyticsData(()=>{var t,e;const n=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:this.parseKilkayaData().placement}});window.dispatchEvent(n);const a=this.getEventInput("view");this.pulse.trackLegacyViewUIElement?this.pulse.trackLegacyViewUIElement(a):this.pulse.trackViewUIElement?this.pulse.trackViewUIElement(a):null===(e=(t=this.pulse).trackElementView)||void 0===e||e.call(t,a)}))}trackEngagement(t){var e,n;const a=this.getEventInput("click");this.pulse.trackLegacyClickUIElement?this.pulse.trackLegacyClickUIElement(a):this.pulse.trackClickUIElement?this.pulse.trackClickUIElement(a):null===(n=(e=this.pulse).trackElementClick)||void 0===n||n.call(e,a)}}class y extends m{getEventBaseData(){var t,e,n,a;const{clientName:r,creativeId:i,itemId:s,placement:o}=this.parseKilkayaData(),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(null!==(e=this.pageType)&&void 0!==e?e:"front",this.getArticleId());return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",position:o,elementType:"Article",custom:{customer:r,creativeId:null!=i?i:s},page:{"@id":null!=g?g:o,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(a=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===a?void 0:a.call(n,this.root)})}getEventInput(t){return{object:this.getEventBaseData(),partnerstudio:this.getEventPartnerstudioData(t),target:this.getEventTarget(),provider:this.getProviderData()}}getEventPartnerstudioData(t){return Object.assign(Object.assign({},this.parseKilkayaData()),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}class k extends m{getEventBaseData(){var t,e;const{title:n="",clientName:a="",creativeId:r="",link:i="",itemId:s=""}=this.parseKilkayaData(),{columnName:o,primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u={publicUrl:i,urlPath:i?new URL(i).pathname:""},{publicUrl:g,urlPath:p}=i&&(null===(e=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===e?void 0:e.call(t,i))||u;return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:n,placement:{columnName:o,primaryPosition:l,secondaryPosition:d,source:c},tags:[a,n,g,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:a,"spt:creativeId":r,pageTitle:n,publicUrl:g,urlPath:p},url:location.origin})}getEventInput(t){return{object:this.getEventBaseData(),target:this.getEventTarget()}}}class f{constructor(t){this.identity=t,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return a(this,void 0,void 0,function*(){var t;try{const e=yield null===(t=this.identity)||void 0===t?void 0:t.getUser();return null!=e?e:null}catch(t){return r("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return a(this,void 0,void 0,function*(){var t,e;return null!==(e=yield null===(t=this.identity)||void 0===t?void 0:t.isLoggedIn())&&void 0!==e&&e})}onIdentityLogout(t){var e;null===(e=this.identity)||void 0===e||e.on("logout",t)}}const b=/^glci_/,I="gender_",P="geo_",w="male",E="female",T=()=>a(void 0,void 0,void 0,function*(){try{const e=yield(t=500,a(void 0,void 0,void 0,function*(){return Promise.race([a(void 0,void 0,void 0,function*(){return yield new Promise(t=>{if("undefined"!=typeof window)if(window.Identity)t(window.Identity);else{const e=()=>{t(window.Identity)};window.addEventListener("identity-initialized",e,{once:!0})}else t(void 0)})}),new Promise(e=>setTimeout(()=>e(void 0),t))])})),n=new f(e),r=yield n.getIdentityUser(),{gender:i}=null!=r?r:{};return i===w||i===E?`${I}${i}`:void 0}catch(t){return}var t}),U=()=>a(void 0,void 0,void 0,function*(){const t=[],e=yield T(),n=(()=>{const t=i().map(t=>`${P}${t.replace(b,"")}`);return Array.from(new Set(t))})();return e&&t.push(e),n&&t.push(...n),t});class S{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${e}`}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:a}=new URL(n),r=a.split("/").filter(Boolean);return r.length?[...r.slice(1),n]:[n]}}class A{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class L{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class j{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class O{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.svd.se"===e?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${e}`}}class D{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.aftonbladet.se"===e?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class K{handleKilkayaStreamTracking({pulse:t,pageContext:{pageType:e,publisher:a,countryCode:r}}){if(!(null==t?void 0:t.instance))return;const i={[c.VG]:new p,[c.E24]:new S,"no-aftenposten":new A,[c.BT]:new L,"no-bergenstidende":new L,[c.SA]:new j,"no-stavangeraftenblad":new j,[c.SVD]:new O,[c.AFTONBLADET]:new D}[a]||new v;((t,e,a,r)=>{const i=document.querySelectorAll("k5a-stream");i.length&&i.forEach(i=>{const s=r===n.SE?new k(t,i,e):new y(t,i,e,a);s.trackImpression(),i.addEventListener("click",()=>s.trackEngagement())})})(t.instance,i,e,r)}injectKilkayaMeta(t){return a(this,void 0,void 0,function*(){const e=document.createElement("script"),n=yield U();e.textContent=`var k5aMeta = { consent: ${t}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(e)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",t=>{var e;const n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.streamSlot;if(r(`Kilkaya event for slot: ${n}`),!n)return void r("Kilkaya slot empty, Xandr backfill won't be loaded");const a=n.parentElement;a?(r(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(a)):r("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(t){var e;const n=t.querySelector(".fallback");if(!n)return;n.style.display="flex";const a=null!==(e=n.dataset.fallbackTargetId)&&void 0!==e?e:"";o(a)}loadKilkayaScript(t){return a(this,void 0,void 0,function*(){yield l(t)})}run(t){return a(this,void 0,void 0,function*(){var e,n;const{tcf:a,pageContext:{isMobileApp:r,countryCode:i},kilkaya:s}=t;if(!(null==s?void 0:s.enabled))return;const o=yield d(a,r,i,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(o),yield this.loadKilkayaScript(null!==(n=null===(e=s.options)||void 0===e?void 0:e.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(t)})}}const N=({placementName:t,slotTag:e,fallbackTargetId:n,children:a,pulseData:r,htmlAttributes:i})=>{const s=(t,e)=>{const n={};if(!t)return n;for(const[a,r]of Object.entries(t)){n[e?`${e}-${a}`:a]=String(r)}return n},o=s(r,"data-pulse"),l=s(i,"data");return u("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"},"data-slot-tag":e},o,l,{children:[g("div",{className:"inscreen-target"}),g("k5a-stream",{name:t,"slot-tag":e}),g("div",{className:"container"}),g("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:a})]}))},$=t=>a(void 0,void 0,void 0,function*(){const e=new K;yield e.run(t)});export{N as Kilkaya,$ as runKilkaya};
@@ -1 +0,0 @@
1
- import{i as n,_ as e,c as i,l as t,g as o,a as r,b as d,d as l,h as a,e as s,u as c,f as u,A as f,s as v}from"./_auto-entry_koket-BITL2_K1.js";import{xandrAdLoaded as p,finnBlinkLoaded as m}from"./events-CJe7o002.js";import"react/jsx-runtime";n('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const y={Blink:"Blink"},h=new Map,g=n=>{var e;if(!h.has(n)){const e=import(/* webpackIgnore: true */n).then(n=>(n=>{for(const[e,i]of Object.entries(y)){const t=n[e];null!=t&&(window[i]=t)}})(n)).catch(e=>{throw h.delete(n),e});h.set(n,e)}return null!==(e=h.get(n))&&void 0!==e?e:Promise.resolve()},b="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",k=n=>{var e,i;const t=document.querySelector(`[id^="${n}"]`);return null!==(i=null===(e=null==t?void 0:t.dataset)||void 0===e?void 0:e.finnBlinkId)&&void 0!==i?i:n},$=(n,e)=>{const{finnBlink:{enabled:t}={}}=i.get(),o=(null==e?void 0:e.enabled)||(n=>{var e;const i=document.querySelector(`[id^="${n}"]`);return!!(null===(e=null==i?void 0:i.dataset)||void 0===e?void 0:e.noBidAd)})(n);if(!o||!t)return null;const{height:r,requireImage:d,position:l,offset:a}=(null==e?void 0:e.sdkPayload)||{};return{selector:`#${k(n)}`,enabled:o,position:null!=l?l:n,height:null!=r?r:100,offset:null!=a?a:200,requireImage:d,advertoryTheme:null==e?void 0:e.advertoryTheme}},w=(n,a,s)=>e(void 0,void 0,void 0,function*(){const{placements:c,pageContext:{deviceType:u},appearanceConfig:f}=i.get();t(`rendering finn blink ad for ${n}`);const v=o(n),h=c[u].find(n=>n.targetId===v),g=$(n,null==h?void 0:h.finnBlink);if(!(null==g?void 0:g.enabled))return t(`Finn blink is not enabled on placement: ${n}`),s&&s(n),void p(n);if((n=>{var e;const i=k(n),t=document.querySelector(`[id^="${i}"]`);return!!(null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains("finn"))})(n))return void t(`Finn blink already loaded ${n}`);const{publisher:b,countryCode:w,finnBlink:C}=a,{sdkPayload:{channel:x}={}}=null!=C?C:{},I=null!=x?x:`${b}.${w}`,j="dark"===(null==f?void 0:f.theme)?"dark":"light";try{const n=yield r();yield(B=Object.assign(Object.assign({},g),{channel:I,userId:n,theme:j}),e(void 0,void 0,void 0,function*(){const{userId:n,theme:e}=B,i=l(B,["userId","theme"]),t=window[y.Blink];if(!t)return;const o=new t({remote:"https://www.finn.no/distribution-front/external/carousel",userId:n,theme:e});yield o.inject(Object.assign({},i))})),m(g.selector.replace("#",""),g.advertoryTheme)}catch(e){t(`Finn blink error ${e}`),s&&s(n),!s&&d(n),p(n)}var B}),C=()=>e(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{isMobileApp:e,countryCode:o}}=i.get();return!!(yield a(n,e,o,"finn-blink"))||(t("Skip loading finn blink ad due to missing TCF consent."),!1)}),x=(n,o,r,l)=>e(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:e}}=i.get();if(t(`loadFinnBlinkAd: loading finn blink ad for ${n}`),!(yield C())||e)return r&&r(n),p(n),void(!r&&d(n));try{yield g(b)}catch(n){console.error(n)}yield w(n,o,r),l&&l()}),I=(n,e)=>{var i;(t(`Appending ${e.id} after ${n.id}`),n.parentElement&&(i=n.parentElement,!Array.from(i.children).some(n=>n.classList.contains("advertory-finn-blink-wrapper"))))?(n.parentElement.style.display="none",n.parentElement.insertAdjacentElement("afterend",e)):t(`Cannot perform afterend on: ${n.id}`)},j=(n,o)=>e(void 0,void 0,void 0,function*(){var e,r;if(!o)return;const{replacementConfig:d}=o,l=null===(e=null==d?void 0:d.adsToReplace)||void 0===e?void 0:e[n],a=null===(r=null==d?void 0:d.sizes)||void 0===r?void 0:r[n];s()&&l&&a?(yield C())&&(yield g(b),l.forEach(([n,e])=>{const o=document.querySelector(`[id^="${n}"]`);if(!o)return;const r=(n=>{const{siteSpecificConfig:{publisherClassName:e}={}}=i.get(),o=document.createElement("div"),r=document.createElement("div");return r.id=n,o.appendChild(r),u(e,r,f.FINN_BLINK),t(`Creating blink container for: ${n}`),o})(e);(n=>{t(`Hiding old ad container: ${n.id}`),n.style.setProperty("display","none","important")})(o),I(o,r),o.dataset.finnBlinkId=e,c().withFullAdsChain(n)})):t(`Finn blink configuration is incorrect: ${JSON.stringify(d)}`)}),B=n=>document.querySelector(`#${n}`),A=n=>e(void 0,void 0,void 0,function*(){if(!n.length)return;const{appearanceConfig:e,pageContext:{deviceType:t}}=i.get(),o=null==e?void 0:e.defaultThreshold[t];for(const e of n){const{requestThreshold:n,targetId:i}=e,t=B(i);t&&(yield v(t,null!=n?n:o))}});export{A as handleFinnBlinkOnlyPlacements,x as loadFinnBlinkAd,j as replaceAdsWithFinnBlink};
@@ -1 +0,0 @@
1
- import{o as t,w as e,C as n,_ as a,l as r,p as i,P as s,q as o,r as l,h as d,N as c}from"./_auto-entry_koket-BITL2_K1.js";import{jsxs as u,jsx as g}from"react/jsx-runtime";class p{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];const{host:a,pathname:r}=new URL(n);if(!a.includes("www.vg.no")&&!r.includes("annonsorinnhold"))return[n];const i=r.split("/");return i.length?[...i.filter(Boolean).slice(1).map(t=>t),n]:[n]}}class v{getPulseObjectId(){return""}getPulsePageId(t,e){return""}}const h="[data-k5a-teaser-analytics]";class m extends t{constructor(t,e,n,a){super(t,""),this.root=e,this.newsroomStrategy=n,this.pageType=a}getTargetId(){return this.root.id}buildAdObject(){return this.getEventInput("view")}parseKilkayaData(){const t=this.root.querySelector("article");if(!t)return{};const e=t.dataset.k5aTeaserAnalytics;try{return e?JSON.parse(e):{}}catch(t){return{}}}mapPageType(t){var e;return null!==(e={front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[null!=t?t:"front"])&&void 0!==e?e:"Frontpage"}getArticleId(){var t;return null!==(t=location.pathname.split("/").slice(-2,-1).pop())&&void 0!==t?t:""}getPlacementData(){var t,e;const n=this.root.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,secondaryPosition:Number(null==n?void 0:n.dataset.pulseSecondaryposition)||0,slot:null!==(e=null==n?void 0:n.dataset.slotTag)&&void 0!==e?e:""}}getEventTarget(){const{link:t,itemId:e,title:n}=this.parseKilkayaData();return{id:e,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(t){return t.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}waitForAnalyticsData(t){const e=this.root.querySelector(h);if(Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics))return void t();const n=new MutationObserver(()=>{const e=this.root.querySelector(h);Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics)&&(n.disconnect(),t())});n.observe(this.root,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]})}trackLoad(){}trackImpression(){e(this.root,()=>this.waitForAnalyticsData(()=>{var t,e;const n=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:this.parseKilkayaData().placement}});window.dispatchEvent(n);const a=this.getEventInput("view");this.pulse.trackLegacyViewUIElement?this.pulse.trackLegacyViewUIElement(a):this.pulse.trackViewUIElement?this.pulse.trackViewUIElement(a):null===(e=(t=this.pulse).trackElementView)||void 0===e||e.call(t,a)}))}trackEngagement(t){var e,n;const a=this.getEventInput("click");this.pulse.trackLegacyClickUIElement?this.pulse.trackLegacyClickUIElement(a):this.pulse.trackClickUIElement?this.pulse.trackClickUIElement(a):null===(n=(e=this.pulse).trackElementClick)||void 0===n||n.call(e,a)}}class y extends m{getEventBaseData(){var t,e,n,a;const{clientName:r,creativeId:i,itemId:s,placement:o}=this.parseKilkayaData(),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(null!==(e=this.pageType)&&void 0!==e?e:"front",this.getArticleId());return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",position:o,elementType:"Article",custom:{customer:r,creativeId:null!=i?i:s},page:{"@id":null!=g?g:o,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(a=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===a?void 0:a.call(n,this.root)})}getEventInput(t){return{object:this.getEventBaseData(),partnerstudio:this.getEventPartnerstudioData(t),target:this.getEventTarget(),provider:this.getProviderData()}}getEventPartnerstudioData(t){return Object.assign(Object.assign({},this.parseKilkayaData()),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}class k extends m{getEventBaseData(){var t,e;const{title:n="",clientName:a="",creativeId:r="",link:i="",itemId:s=""}=this.parseKilkayaData(),{columnName:o,primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u={publicUrl:i,urlPath:i?new URL(i).pathname:""},{publicUrl:g,urlPath:p}=i&&(null===(e=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===e?void 0:e.call(t,i))||u;return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:n,placement:{columnName:o,primaryPosition:l,secondaryPosition:d,source:c},tags:[a,n,g,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:a,"spt:creativeId":r,pageTitle:n,publicUrl:g,urlPath:p},url:location.origin})}getEventInput(t){return{object:this.getEventBaseData(),target:this.getEventTarget()}}}class f{constructor(t){this.identity=t,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return a(this,void 0,void 0,function*(){var t;try{const e=yield null===(t=this.identity)||void 0===t?void 0:t.getUser();return null!=e?e:null}catch(t){return r("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return a(this,void 0,void 0,function*(){var t,e;return null!==(e=yield null===(t=this.identity)||void 0===t?void 0:t.isLoggedIn())&&void 0!==e&&e})}onIdentityLogout(t){var e;null===(e=this.identity)||void 0===e||e.on("logout",t)}}const b=/^glci_/,I="gender_",P="geo_",w="male",E="female",T=()=>a(void 0,void 0,void 0,function*(){try{const e=yield(t=500,a(void 0,void 0,void 0,function*(){return Promise.race([a(void 0,void 0,void 0,function*(){return yield new Promise(t=>{if("undefined"!=typeof window)if(window.Identity)t(window.Identity);else{const e=()=>{t(window.Identity)};window.addEventListener("identity-initialized",e,{once:!0})}else t(void 0)})}),new Promise(e=>setTimeout(()=>e(void 0),t))])})),n=new f(e),r=yield n.getIdentityUser(),{gender:i}=null!=r?r:{};return i===w||i===E?`${I}${i}`:void 0}catch(t){return}var t}),U=()=>a(void 0,void 0,void 0,function*(){const t=[],e=yield T(),n=(()=>{const t=i().map(t=>`${P}${t.replace(b,"")}`);return Array.from(new Set(t))})();return e&&t.push(e),n&&t.push(...n),t});class S{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${e}`}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:a}=new URL(n),r=a.split("/").filter(Boolean);return r.length?[...r.slice(1),n]:[n]}}class A{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class L{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class j{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class O{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.svd.se"===e?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${e}`}}class D{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.aftonbladet.se"===e?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class K{handleKilkayaStreamTracking({pulse:t,pageContext:{pageType:e,publisher:a,countryCode:r}}){if(!(null==t?void 0:t.instance))return;const i={[c.VG]:new p,[c.E24]:new S,"no-aftenposten":new A,[c.BT]:new L,"no-bergenstidende":new L,[c.SA]:new j,"no-stavangeraftenblad":new j,[c.SVD]:new O,[c.AFTONBLADET]:new D}[a]||new v;((t,e,a,r)=>{const i=document.querySelectorAll("k5a-stream");i.length&&i.forEach(i=>{const s=r===n.SE?new k(t,i,e):new y(t,i,e,a);s.trackImpression(),i.addEventListener("click",()=>s.trackEngagement())})})(t.instance,i,e,r)}injectKilkayaMeta(t){return a(this,void 0,void 0,function*(){const e=document.createElement("script"),n=yield U();e.textContent=`var k5aMeta = { consent: ${t}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(e)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",t=>{var e;const n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.streamSlot;if(r(`Kilkaya event for slot: ${n}`),!n)return void r("Kilkaya slot empty, Xandr backfill won't be loaded");const a=n.parentElement;a?(r(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(a)):r("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(t){var e;const n=t.querySelector(".fallback");if(!n)return;n.style.display="flex";const a=null!==(e=n.dataset.fallbackTargetId)&&void 0!==e?e:"";o(a)}loadKilkayaScript(t){return a(this,void 0,void 0,function*(){yield l(t)})}run(t){return a(this,void 0,void 0,function*(){var e,n;const{tcf:a,pageContext:{isMobileApp:r,countryCode:i},kilkaya:s}=t;if(!(null==s?void 0:s.enabled))return;const o=yield d(a,r,i,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(o),yield this.loadKilkayaScript(null!==(n=null===(e=s.options)||void 0===e?void 0:e.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(t)})}}const N=({placementName:t,slotTag:e,fallbackTargetId:n,children:a,pulseData:r,htmlAttributes:i})=>{const s=(t,e)=>{const n={};if(!t)return n;for(const[a,r]of Object.entries(t)){n[e?`${e}-${a}`:a]=String(r)}return n},o=s(r,"data-pulse"),l=s(i,"data");return u("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"},"data-slot-tag":e},o,l,{children:[g("div",{className:"inscreen-target"}),g("k5a-stream",{name:t,"slot-tag":e}),g("div",{className:"container"}),g("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:a})]}))},$=t=>a(void 0,void 0,void 0,function*(){const e=new K;yield e.run(t)});export{N as Kilkaya,$ as runKilkaya};
@@ -1 +0,0 @@
1
- import{A as t,S as e,O as n,_ as a,E as r,T as i,U as s,V as o,J as l,W as d}from"./_auto-entry_mtv-D53dvC1i.js";import{jsxs as c,jsx as u}from"react/jsx-runtime";class g{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];const{host:a,pathname:r}=new URL(n);if(!a.includes("www.vg.no")&&!r.includes("annonsorinnhold"))return[n];const i=r.split("/");return i.length?[...i.filter(Boolean).slice(1).map(t=>t),n]:[n]}}class p{getPulseObjectId(){return""}getPulsePageId(t,e){return""}}const v="[data-k5a-teaser-analytics]";class m extends t{constructor(t,e,n,a){super(t,""),this.root=e,this.newsroomStrategy=n,this.pageType=a}getTargetId(){return this.root.id}buildAdObject(){return this.getEventInput("view")}parseKilkayaData(){const t=this.root.querySelector("article");if(!t)return{};const e=t.dataset.k5aTeaserAnalytics;try{return e?JSON.parse(e):{}}catch(t){return{}}}mapPageType(t){var e;return null!==(e={front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[null!=t?t:"front"])&&void 0!==e?e:"Frontpage"}getArticleId(){var t;return null!==(t=location.pathname.split("/").slice(-2,-1).pop())&&void 0!==t?t:""}getPlacementData(){var t,e;const n=this.root.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,secondaryPosition:Number(null==n?void 0:n.dataset.pulseSecondaryposition)||0,slot:null!==(e=null==n?void 0:n.dataset.slotTag)&&void 0!==e?e:""}}getEventTarget(){const{link:t,itemId:e,title:n}=this.parseKilkayaData();return{id:e,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(t){return t.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}waitForAnalyticsData(t){const e=this.root.querySelector(v);if(Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics))return void t();const n=new MutationObserver(()=>{const e=this.root.querySelector(v);Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics)&&(n.disconnect(),t())});n.observe(this.root,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]})}trackLoad(){}trackImpression(){e(this.root,()=>this.waitForAnalyticsData(()=>{var t,e;const n=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:this.parseKilkayaData().placement}});window.dispatchEvent(n);const a=this.getEventInput("view");this.pulse.trackLegacyViewUIElement?this.pulse.trackLegacyViewUIElement(a):this.pulse.trackViewUIElement?this.pulse.trackViewUIElement(a):null===(e=(t=this.pulse).trackElementView)||void 0===e||e.call(t,a)}))}trackEngagement(t){var e,n;const a=this.getEventInput("click");this.pulse.trackLegacyClickUIElement?this.pulse.trackLegacyClickUIElement(a):this.pulse.trackClickUIElement?this.pulse.trackClickUIElement(a):null===(n=(e=this.pulse).trackElementClick)||void 0===n||n.call(e,a)}}class h extends m{getEventBaseData(){var t,e,n,a;const{clientName:r,creativeId:i,itemId:s,placement:o}=this.parseKilkayaData(),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(null!==(e=this.pageType)&&void 0!==e?e:"front",this.getArticleId());return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",position:o,elementType:"Article",custom:{customer:r,creativeId:null!=i?i:s},page:{"@id":null!=g?g:o,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(a=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===a?void 0:a.call(n,this.root)})}getEventInput(t){return{object:this.getEventBaseData(),partnerstudio:this.getEventPartnerstudioData(t),target:this.getEventTarget(),provider:this.getProviderData()}}getEventPartnerstudioData(t){return Object.assign(Object.assign({},this.parseKilkayaData()),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}class y extends m{getEventBaseData(){var t,e;const{title:n="",clientName:a="",creativeId:r="",link:i="",itemId:s=""}=this.parseKilkayaData(),{columnName:o,primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u={publicUrl:i,urlPath:i?new URL(i).pathname:""},{publicUrl:g,urlPath:p}=i&&(null===(e=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===e?void 0:e.call(t,i))||u;return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:n,placement:{columnName:o,primaryPosition:l,secondaryPosition:d,source:c},tags:[a,n,g,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:a,"spt:creativeId":r,pageTitle:n,publicUrl:g,urlPath:p},url:location.origin})}getEventInput(t){return{object:this.getEventBaseData(),target:this.getEventTarget()}}}class k{constructor(t){this.identity=t,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return a(this,void 0,void 0,function*(){var t;try{const e=yield null===(t=this.identity)||void 0===t?void 0:t.getUser();return null!=e?e:null}catch(t){return r("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return a(this,void 0,void 0,function*(){var t,e;return null!==(e=yield null===(t=this.identity)||void 0===t?void 0:t.isLoggedIn())&&void 0!==e&&e})}onIdentityLogout(t){var e;null===(e=this.identity)||void 0===e||e.on("logout",t)}}const f=/^glci_/,b="gender_",I="geo_",P="male",w="female",E=()=>a(void 0,void 0,void 0,function*(){try{const e=yield(t=500,a(void 0,void 0,void 0,function*(){return Promise.race([a(void 0,void 0,void 0,function*(){return yield new Promise(t=>{if("undefined"!=typeof window)if(window.Identity)t(window.Identity);else{const e=()=>{t(window.Identity)};window.addEventListener("identity-initialized",e,{once:!0})}else t(void 0)})}),new Promise(e=>setTimeout(()=>e(void 0),t))])})),n=new k(e),r=yield n.getIdentityUser(),{gender:i}=null!=r?r:{};return i===P||i===w?`${b}${i}`:void 0}catch(t){return}var t}),T=()=>a(void 0,void 0,void 0,function*(){const t=[],e=yield E(),n=(()=>{const t=i().map(t=>`${I}${t.replace(f,"")}`);return Array.from(new Set(t))})();return e&&t.push(e),n&&t.push(...n),t}),U="front";class S{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===U?"sdrn:e24:frontpage:front":`sdrn:e24:article:${e}`}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:a}=new URL(n),r=a.split("/").filter(Boolean);return r.length?[...r.slice(1),n]:[n]}}class A{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class L{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class j{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class D{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.svd.se"===e?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===U?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${e}`}}class O{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.aftonbladet.se"===e?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class K{handleKilkayaStreamTracking({pulse:t,pageContext:{pageType:e,publisher:a,countryCode:r}}){if(!(null==t?void 0:t.instance))return;const i={[d.VG]:new g,[d.E24]:new S,"no-aftenposten":new A,[d.BT]:new L,"no-bergenstidende":new L,[d.SA]:new j,"no-stavangeraftenblad":new j,[d.SVD]:new D,[d.AFTONBLADET]:new O}[a]||new p;((t,e,a,r)=>{const i=document.querySelectorAll("k5a-stream");i.length&&i.forEach(i=>{const s=r===n.SE?new y(t,i,e):new h(t,i,e,a);s.trackImpression(),i.addEventListener("click",()=>s.trackEngagement())})})(t.instance,i,e,r)}injectKilkayaMeta(t){return a(this,void 0,void 0,function*(){const e=document.createElement("script"),n=yield T();e.textContent=`var k5aMeta = { consent: ${t}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(e)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",t=>{var e;const n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.streamSlot;if(r(`Kilkaya event for slot: ${n}`),!n)return void r("Kilkaya slot empty, Xandr backfill won't be loaded");const a=n.parentElement;a?(r(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(a)):r("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(t){var e;const n=t.querySelector(".fallback");if(!n)return;n.style.display="flex";const a=null!==(e=n.dataset.fallbackTargetId)&&void 0!==e?e:"";s(a)}loadKilkayaScript(t){return a(this,void 0,void 0,function*(){yield o(t)})}run(t){return a(this,void 0,void 0,function*(){var e,n;const{tcf:a,pageContext:{isMobileApp:r,countryCode:i},kilkaya:s}=t;if(!(null==s?void 0:s.enabled))return;const o=yield l(a,r,i,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(o),yield this.loadKilkayaScript(null!==(n=null===(e=s.options)||void 0===e?void 0:e.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(t)})}}const $=({placementName:t,slotTag:e,fallbackTargetId:n,children:a,pulseData:r,htmlAttributes:i})=>{const s=(t,e)=>{const n={};if(!t)return n;for(const[a,r]of Object.entries(t)){n[e?`${e}-${a}`:a]=String(r)}return n},o=s(r,"data-pulse"),l=s(i,"data");return c("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"},"data-slot-tag":e},o,l,{children:[u("div",{className:"inscreen-target"}),u("k5a-stream",{name:t,"slot-tag":e}),u("div",{className:"container"}),u("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:a})]}))},B=t=>a(void 0,void 0,void 0,function*(){const e=new K;yield e.run(t)});export{$ as Kilkaya,B as runKilkaya};
@@ -1 +0,0 @@
1
- import{i as e,a as t,b as r,c as n,d as i,e as o,f as a,g as l,h as d,j as s,k as c,l as v,m as p,n as f,o as u,p as h,q as m,r as y,s as g,t as b,u as w,v as x,w as k,x as I,y as $,A as C,z as S,B as j,C as E,D as T,_ as q,E as A,F,G as B,H as O,I as N,J as L,K as z,L as P,M as _}from"./_auto-entry_mtv-D53dvC1i.js";import"react/jsx-runtime";const D={nativeAd:e=>x(e)&&!a(e),buyrecipe:w,fullwidthAd:b,fullscreenScroll:g,topscroller:e=>h(e)&&y(),splash:e=>h(e)&&m(e.width,e.height),welcomePage:h,wallpaper:u,skyscraper:f,lFormat:p,hFormat:v,toppanorama:c,topboard:s,widescreen:d,insider:l,sponsorstripe:a,brandboard:t=>o(t)&&!k(t)&&!e(t),outstream:i,netboard:e=>r(e)||n(e),panorama:t,midboard:e},H=({adObj:e,preferredTestIdData:t})=>{var r,n;const i=null!==(r=null==t?void 0:t.targetId)&&void 0!==r?r:null==e?void 0:e.targetId;if(!i)return;const o=null===(n=document.querySelector(`#${i}`))||void 0===n?void 0:n.parentElement;if(!o)return;if(((e,t)=>{var r,n,i,o;const a=null===(o=null===(i=null===(n=null===(r=window.apntag)||void 0===r?void 0:r.requests)||void 0===n?void 0:n.tags)||void 0===i?void 0:i[e])||void 0===o?void 0:o.invCode;a&&(t.dataset.invCode=a)})(i,o),null==t?void 0:t.testId)return void(o.dataset.testid=t.testId);const a="DIV"===(null==o?void 0:o.tagName);e&&a&&((e,t)=>{var r,n;for(const[i,o]of Object.entries(D))if(o(e)){if("nativeAd"===i){const o="default";t.dataset.testid=`${i}-${null!==(n=null===(r=null==e?void 0:e.native)||void 0===r?void 0:r.desc2)&&void 0!==n?n:o}`;break}t.dataset.testid=i;break}})(e,o)};I('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const W={Blink:"Blink"},M=new Map,K=e=>{var t;if(!M.has(e)){const t=import(/* webpackIgnore: true */e).then(e=>(e=>{for(const[t,r]of Object.entries(W)){const n=e[t];null!=n&&(window[r]=n)}})(e)).catch(t=>{throw M.delete(e),t});M.set(e,t)}return null!==(t=M.get(e))&&void 0!==t?t:Promise.resolve()},J="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js";$([],()=>{const e=({width:e,height:t})=>{var r;const n=null===(r=document.querySelector("#sf_align"))||void 0===r?void 0:r.querySelector("div");if(!n)return;const{clientWidth:i,clientHeight:o}=n,a=e/i,l=t/o;n.style.transform=`scale(${a},${l})`,n.style.transformOrigin="left top"},t=()=>{const{innerWidth:t,innerHeight:r}=window;e({width:t,height:r})};window.addEventListener("resize",t=>{if(!t.currentTarget)return;const r={width:innerWidth,height:innerHeight};e(r)});const r=window.frameElement;(null==r?void 0:r.contentWindow)?r.contentWindow.document.body.onload=t:document.body.onload=t}),I('body.fullscreen-scroll-in-screen{overflow-x:hidden}.advertory-fullscreen-scroll-wrapper{visibility:hidden;overflow:visible;width:100vw !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;position:relative;margin:var(--advertory-fullscreen-scroll-wrapper-margin);z-index:1;display:block !important;min-height:250px;padding:0 !important;clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);-webkit-clip-path:polygon(0 0, 100vw 0, 100vw 100dvh, 0 100dvh);flex-shrink:0}.advertory-fullscreen-scroll-wrapper>div{position:fixed;top:0;left:0;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important;width:100vw !important;overflow:hidden}html[data-app-platform=iOS] .advertory-fullscreen-scroll-wrapper>div{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important;top:unset !important;bottom:env(safe-area-inset-bottom) !important}.advertory-fullscreen-scroll-wrapper>div>iframe{height:inherit !important;width:inherit !important;display:none !important}.advertory-fullscreen-scroll-wrapper.in-screen{visibility:visible;overflow:visible;width:100vw !important}.advertory-fullscreen-scroll-wrapper.in-screen>div>iframe{display:block !important}.advertory-fullscreen-scroll-wrapper.in-screen:before{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-150dvh;padding:0 !important}.advertory-fullscreen-scroll-wrapper.in-screen:after{content:"";width:100vw;height:150dvh;position:relative !important;display:block;transform:translateX(-50%);overflow:visible;z-index:1;left:50%;top:-50dvh}.advertory-fullscreen-scroll{position:fixed;top:var(--advertory-fullscreen-scroll-top, 0px);left:var(--advertory-fullscreen-scroll-left, 0px);width:var(--advertory-fullscreen-scroll-vw, 100vw);height:var(--advertory-fullscreen-scroll-vh, 100vh);overflow:hidden}.advertory-fullscreen-scroll:not([data-ad-label-custom])::before{text-transform:lowercase}.advertory-fullscreen-scroll::before{content:attr(data-ad-label);box-sizing:border-box;position:fixed;top:var(--advertory-political-box-offset, 0px)}html[data-app-platform=iOS] .advertory-fullscreen-scroll::before{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix, 0px) + var(--advertory-political-box-offset, 0px)) !important}.advertory-fullscreen-scroll::before{left:calc(50vw - 628px);width:calc(100% - 36px);max-width:1250px;text-align:left;background-color:hsla(0,0%,100%,.6);color:#212121;font-family:Ester Blenda,Arial,sans-serif;font-size:11px;font-weight:400;font-style:normal;line-height:1;margin:16px 2px;padding:10px;z-index:1;visibility:inherit !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll::before{left:16px}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:calc(50vw - 623px);right:unset}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]>div[role=button]{left:22px;right:unset}}.advertory-fullscreen-scroll[data-move-cogwheel-to-the-left=true]::before{padding-left:32px}.advertory-fullscreen-scroll>div[id*=utif]{display:block;width:var(--advertory-fullscreen-scroll-vw, 100vw) !important;height:var(--advertory-fullscreen-scroll-vh, 100vh) !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[id*=utif]{height:calc(var(--advertory-fullscreen-scroll-vh, 100vh) - env(safe-area-inset-top) + var(--advertory-ios-safe-area-top-fix, 0px) - env(safe-area-inset-bottom)) !important}.advertory-fullscreen-scroll>div[id*=utif]{overflow:hidden}.advertory-fullscreen-scroll>div[id*=utif]>iframe{display:block;height:inherit !important;width:inherit !important}.advertory-fullscreen-scroll>div[role=button]{z-index:2;opacity:1;background:rgba(0,0,0,0) !important;left:unset;position:fixed !important;right:calc(50vw - 623px);top:calc(19px + var(--advertory-political-box-offset, 0px)) !important;width:26px !important;height:26px !important}html[data-app-platform=iOS] .advertory-fullscreen-scroll>div[role=button]{top:calc(env(safe-area-inset-top) - var(--advertory-ios-safe-area-top-fix) + 19px + var(--advertory-political-box-offset, 0px)) !important}@media screen and (max-width: 1290px){.advertory-fullscreen-scroll>div[role=button]{right:22px}}');class X extends C{constructor(e,t){var r;super(e.pulse.instance,null!==(r=e.pageContext.publisher)&&void 0!==r?r:""),this.blinkParams=e,this.targetId=t}getTargetId(){return this.targetId}computeInvCode(){const{pageContext:{deviceType:e},placements:t}=this.blinkParams;if(e)return S(e,this.targetId,t)}buildAdObject(){const e=X.extractAdFormat(this.targetId);return{objectId:this.targetId,objectSdrn:`sdrn:${this.publisher}:ad-slot:${e}`,platform:"blink",adFormat:e}}}const G=e=>{const{pageContext:{publisher:t=""}}=j.get(),r=document.querySelector(`#${e}`);if(!r)return;const n=`-${t}`;r.classList.remove(`advertory${n}-finn-blink`),r.classList.remove(`advertory${n}-finn-blink-wrapper`)},R=e=>{var t,r;const n=document.querySelector(`[id^="${e}"]`);return null!==(r=null===(t=null==n?void 0:n.dataset)||void 0===t?void 0:t.finnBlinkId)&&void 0!==r?r:e},V=(e,t)=>{const{finnBlink:{enabled:r}={}}=j.get(),n=(null==t?void 0:t.enabled)||(e=>{var t;const r=document.querySelector(`[id^="${e}"]`);return!!(null===(t=null==r?void 0:r.dataset)||void 0===t?void 0:t.noBidAd)})(e);if(!n||!r)return null;const{height:i,requireImage:o,position:a,offset:l}=(null==t?void 0:t.sdkPayload)||{};return{selector:`#${R(e)}`,enabled:n,position:null!=a?a:e,height:null!=i?i:100,offset:null!=l?l:200,requireImage:o,advertoryTheme:null==t?void 0:t.advertoryTheme}},Q=(e,t,r)=>q(void 0,void 0,void 0,function*(){const{placements:n,pageContext:{deviceType:i},appearanceConfig:o}=j.get();A(`rendering finn blink ad for ${e}`);const a=F(e),l=n[i].find(e=>e.targetId===a),d=V(e,null==l?void 0:l.finnBlink);if(!(null==d?void 0:d.enabled))return A(`Finn blink is not enabled on placement: ${e}`),r&&r(e),void G(e);if((e=>{var t;const r=R(e),n=document.querySelector(`[id^="${r}"]`);return!!(null===(t=null==n?void 0:n.classList)||void 0===t?void 0:t.contains("finn"))})(e))return void A(`Finn blink already loaded ${e}`);const{publisher:s,countryCode:c,finnBlink:v}=t,{sdkPayload:{channel:p}={}}=null!=v?v:{},f=null!=p?p:`${s}.${c}`,u="dark"===(null==o?void 0:o.theme)?"dark":"light";try{const e=yield B();yield(h=Object.assign(Object.assign({},d),{channel:f,userId:e,theme:u}),q(void 0,void 0,void 0,function*(){const{userId:e,theme:t}=h,r=N(h,["userId","theme"]),n=window[W.Blink];if(!n)return;const i=new n({remote:"https://www.finn.no/distribution-front/external/carousel",userId:e,theme:t});yield i.inject(Object.assign({},r))})),((e,t)=>{const{siteSpecificConfig:{publisherClassName:r}={},pageContext:{pageType:n},pulse:i}=j.get(),o=document.querySelector(`#${e}`);if(!o)return;if(o.classList.add("disable-cogwheel"),(null==i?void 0:i.instance)&&i.adTrackingEnabled){const t=new X(j.get(),e);t.trackLoad(),t.trackImpression(),o.addEventListener("click",()=>t.trackEngagement())}E(r,o,T.FINN_BLINK,null!=t?t:n),H({preferredTestIdData:{targetId:e,testId:"finn"}})})(d.selector.replace("#",""),d.advertoryTheme)}catch(t){A(`Finn blink error ${t}`),r&&r(e),!r&&O(e),G(e)}var h}),U=()=>q(void 0,void 0,void 0,function*(){const{tcf:e,pageContext:{isMobileApp:t,countryCode:r}}=j.get();return!!(yield L(e,t,r,"finn-blink"))||(A("Skip loading finn blink ad due to missing TCF consent."),!1)}),Y=(e,t,r,n)=>q(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:i}}=j.get();if(A(`loadFinnBlinkAd: loading finn blink ad for ${e}`),!(yield U())||i)return r&&r(e),G(e),void(!r&&O(e));try{yield K(J)}catch(e){console.error(e)}yield Q(e,t,r),n&&n()}),Z=(e,t)=>{var r;(A(`Appending ${t.id} after ${e.id}`),e.parentElement&&(r=e.parentElement,!Array.from(r.children).some(e=>e.classList.contains("advertory-finn-blink-wrapper"))))?(e.parentElement.style.display="none",e.parentElement.insertAdjacentElement("afterend",t)):A(`Cannot perform afterend on: ${e.id}`)},ee=(e,t)=>q(void 0,void 0,void 0,function*(){var r,n;if(!t)return;const{replacementConfig:i}=t,o=null===(r=null==i?void 0:i.adsToReplace)||void 0===r?void 0:r[e],a=null===(n=null==i?void 0:i.sizes)||void 0===n?void 0:n[e];z()&&o&&a?(yield U())&&(yield K(J),o.forEach(([e,t])=>{const r=document.querySelector(`[id^="${e}"]`);if(!r)return;const n=(e=>{const{siteSpecificConfig:{publisherClassName:t}={}}=j.get(),r=document.createElement("div"),n=document.createElement("div");return n.id=e,r.appendChild(n),E(t,n,T.FINN_BLINK),A(`Creating blink container for: ${e}`),r})(t);(e=>{A(`Hiding old ad container: ${e.id}`),e.style.setProperty("display","none","important")})(r),Z(r,n),r.dataset.finnBlinkId=t,P().withFullAdsChain(e)})):A(`Finn blink configuration is incorrect: ${JSON.stringify(i)}`)}),te=e=>document.querySelector(`#${e}`),re=e=>q(void 0,void 0,void 0,function*(){if(!e.length)return;const{appearanceConfig:t,pageContext:{deviceType:r}}=j.get(),n=null==t?void 0:t.defaultThreshold[r];for(const t of e){const{requestThreshold:e,targetId:r}=t,i=te(r);i&&(yield _(i,null!=e?e:n))}});export{re as handleFinnBlinkOnlyPlacements,Y as loadFinnBlinkAd,ee as replaceAdsWithFinnBlink};
@@ -1 +0,0 @@
1
- import{i as n,_ as e,c as i,l as t,g as o,a as r,b as d,d as l,h as a,e as s,u as c,f as u,A as f,s as v}from"./_auto-entry_omni-BVChM78_.js";import{xandrAdLoaded as p,finnBlinkLoaded as m}from"./events-Dcpm5emQ.js";import"react/jsx-runtime";n('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const y={Blink:"Blink"},h=new Map,g=n=>{var e;if(!h.has(n)){const e=import(/* webpackIgnore: true */n).then(n=>(n=>{for(const[e,i]of Object.entries(y)){const t=n[e];null!=t&&(window[i]=t)}})(n)).catch(e=>{throw h.delete(n),e});h.set(n,e)}return null!==(e=h.get(n))&&void 0!==e?e:Promise.resolve()},b="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",k=n=>{var e,i;const t=document.querySelector(`[id^="${n}"]`);return null!==(i=null===(e=null==t?void 0:t.dataset)||void 0===e?void 0:e.finnBlinkId)&&void 0!==i?i:n},$=(n,e)=>{const{finnBlink:{enabled:t}={}}=i.get(),o=(null==e?void 0:e.enabled)||(n=>{var e;const i=document.querySelector(`[id^="${n}"]`);return!!(null===(e=null==i?void 0:i.dataset)||void 0===e?void 0:e.noBidAd)})(n);if(!o||!t)return null;const{height:r,requireImage:d,position:l,offset:a}=(null==e?void 0:e.sdkPayload)||{};return{selector:`#${k(n)}`,enabled:o,position:null!=l?l:n,height:null!=r?r:100,offset:null!=a?a:200,requireImage:d,advertoryTheme:null==e?void 0:e.advertoryTheme}},w=(n,a,s)=>e(void 0,void 0,void 0,function*(){const{placements:c,pageContext:{deviceType:u},appearanceConfig:f}=i.get();t(`rendering finn blink ad for ${n}`);const v=o(n),h=c[u].find(n=>n.targetId===v),g=$(n,null==h?void 0:h.finnBlink);if(!(null==g?void 0:g.enabled))return t(`Finn blink is not enabled on placement: ${n}`),s&&s(n),void p(n);if((n=>{var e;const i=k(n),t=document.querySelector(`[id^="${i}"]`);return!!(null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains("finn"))})(n))return void t(`Finn blink already loaded ${n}`);const{publisher:b,countryCode:w,finnBlink:C}=a,{sdkPayload:{channel:x}={}}=null!=C?C:{},I=null!=x?x:`${b}.${w}`,j="dark"===(null==f?void 0:f.theme)?"dark":"light";try{const n=yield r();yield(B=Object.assign(Object.assign({},g),{channel:I,userId:n,theme:j}),e(void 0,void 0,void 0,function*(){const{userId:n,theme:e}=B,i=l(B,["userId","theme"]),t=window[y.Blink];if(!t)return;const o=new t({remote:"https://www.finn.no/distribution-front/external/carousel",userId:n,theme:e});yield o.inject(Object.assign({},i))})),m(g.selector.replace("#",""),g.advertoryTheme)}catch(e){t(`Finn blink error ${e}`),s&&s(n),!s&&d(n),p(n)}var B}),C=()=>e(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{isMobileApp:e,countryCode:o}}=i.get();return!!(yield a(n,e,o,"finn-blink"))||(t("Skip loading finn blink ad due to missing TCF consent."),!1)}),x=(n,o,r,l)=>e(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:e}}=i.get();if(t(`loadFinnBlinkAd: loading finn blink ad for ${n}`),!(yield C())||e)return r&&r(n),p(n),void(!r&&d(n));try{yield g(b)}catch(n){console.error(n)}yield w(n,o,r),l&&l()}),I=(n,e)=>{var i;(t(`Appending ${e.id} after ${n.id}`),n.parentElement&&(i=n.parentElement,!Array.from(i.children).some(n=>n.classList.contains("advertory-finn-blink-wrapper"))))?(n.parentElement.style.display="none",n.parentElement.insertAdjacentElement("afterend",e)):t(`Cannot perform afterend on: ${n.id}`)},j=(n,o)=>e(void 0,void 0,void 0,function*(){var e,r;if(!o)return;const{replacementConfig:d}=o,l=null===(e=null==d?void 0:d.adsToReplace)||void 0===e?void 0:e[n],a=null===(r=null==d?void 0:d.sizes)||void 0===r?void 0:r[n];s()&&l&&a?(yield C())&&(yield g(b),l.forEach(([n,e])=>{const o=document.querySelector(`[id^="${n}"]`);if(!o)return;const r=(n=>{const{siteSpecificConfig:{publisherClassName:e}={}}=i.get(),o=document.createElement("div"),r=document.createElement("div");return r.id=n,o.appendChild(r),u(e,r,f.FINN_BLINK),t(`Creating blink container for: ${n}`),o})(e);(n=>{t(`Hiding old ad container: ${n.id}`),n.style.setProperty("display","none","important")})(o),I(o,r),o.dataset.finnBlinkId=e,c().withFullAdsChain(n)})):t(`Finn blink configuration is incorrect: ${JSON.stringify(d)}`)}),B=n=>document.querySelector(`#${n}`),A=n=>e(void 0,void 0,void 0,function*(){if(!n.length)return;const{appearanceConfig:e,pageContext:{deviceType:t}}=i.get(),o=null==e?void 0:e.defaultThreshold[t];for(const e of n){const{requestThreshold:n,targetId:i}=e,t=B(i);t&&(yield v(t,null!=n?n:o))}});export{A as handleFinnBlinkOnlyPlacements,x as loadFinnBlinkAd,j as replaceAdsWithFinnBlink};
@@ -1 +0,0 @@
1
- import{o as t,w as e,C as n,_ as a,l as r,p as i,P as s,q as o,r as l,h as d,N as c}from"./_auto-entry_omni-BVChM78_.js";import{jsxs as u,jsx as g}from"react/jsx-runtime";class p{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];const{host:a,pathname:r}=new URL(n);if(!a.includes("www.vg.no")&&!r.includes("annonsorinnhold"))return[n];const i=r.split("/");return i.length?[...i.filter(Boolean).slice(1).map(t=>t),n]:[n]}}class v{getPulseObjectId(){return""}getPulsePageId(t,e){return""}}const m="[data-k5a-teaser-analytics]";class h extends t{constructor(t,e,n,a){super(t,""),this.root=e,this.newsroomStrategy=n,this.pageType=a}getTargetId(){return this.root.id}buildAdObject(){return this.getEventInput("view")}parseKilkayaData(){const t=this.root.querySelector("article");if(!t)return{};const e=t.dataset.k5aTeaserAnalytics;try{return e?JSON.parse(e):{}}catch(t){return{}}}mapPageType(t){var e;return null!==(e={front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[null!=t?t:"front"])&&void 0!==e?e:"Frontpage"}getArticleId(){var t;return null!==(t=location.pathname.split("/").slice(-2,-1).pop())&&void 0!==t?t:""}getPlacementData(){var t,e;const n=this.root.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,secondaryPosition:Number(null==n?void 0:n.dataset.pulseSecondaryposition)||0,slot:null!==(e=null==n?void 0:n.dataset.slotTag)&&void 0!==e?e:""}}getEventTarget(){const{link:t,itemId:e,title:n}=this.parseKilkayaData();return{id:e,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(t){return t.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}waitForAnalyticsData(t){const e=this.root.querySelector(m);if(Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics))return void t();const n=new MutationObserver(()=>{const e=this.root.querySelector(m);Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics)&&(n.disconnect(),t())});n.observe(this.root,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]})}trackLoad(){}trackImpression(){e(this.root,()=>this.waitForAnalyticsData(()=>{var t,e;const n=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:this.parseKilkayaData().placement}});window.dispatchEvent(n);const a=this.getEventInput("view");this.pulse.trackLegacyViewUIElement?this.pulse.trackLegacyViewUIElement(a):this.pulse.trackViewUIElement?this.pulse.trackViewUIElement(a):null===(e=(t=this.pulse).trackElementView)||void 0===e||e.call(t,a)}))}trackEngagement(t){var e,n;const a=this.getEventInput("click");this.pulse.trackLegacyClickUIElement?this.pulse.trackLegacyClickUIElement(a):this.pulse.trackClickUIElement?this.pulse.trackClickUIElement(a):null===(n=(e=this.pulse).trackElementClick)||void 0===n||n.call(e,a)}}class y extends h{getEventBaseData(){var t,e,n,a;const{clientName:r,creativeId:i,itemId:s,placement:o}=this.parseKilkayaData(),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(null!==(e=this.pageType)&&void 0!==e?e:"front",this.getArticleId());return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",position:o,elementType:"Article",custom:{customer:r,creativeId:null!=i?i:s},page:{"@id":null!=g?g:o,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(a=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===a?void 0:a.call(n,this.root)})}getEventInput(t){return{object:this.getEventBaseData(),partnerstudio:this.getEventPartnerstudioData(t),target:this.getEventTarget(),provider:this.getProviderData()}}getEventPartnerstudioData(t){return Object.assign(Object.assign({},this.parseKilkayaData()),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}class k extends h{getEventBaseData(){var t,e;const{title:n="",clientName:a="",creativeId:r="",link:i="",itemId:s=""}=this.parseKilkayaData(),{columnName:o,primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u={publicUrl:i,urlPath:i?new URL(i).pathname:""},{publicUrl:g,urlPath:p}=i&&(null===(e=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===e?void 0:e.call(t,i))||u;return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:n,placement:{columnName:o,primaryPosition:l,secondaryPosition:d,source:c},tags:[a,n,g,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:a,"spt:creativeId":r,pageTitle:n,publicUrl:g,urlPath:p},url:location.origin})}getEventInput(t){return{object:this.getEventBaseData(),target:this.getEventTarget()}}}class f{constructor(t){this.identity=t,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return a(this,void 0,void 0,function*(){var t;try{const e=yield null===(t=this.identity)||void 0===t?void 0:t.getUser();return null!=e?e:null}catch(t){return r("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return a(this,void 0,void 0,function*(){var t,e;return null!==(e=yield null===(t=this.identity)||void 0===t?void 0:t.isLoggedIn())&&void 0!==e&&e})}onIdentityLogout(t){var e;null===(e=this.identity)||void 0===e||e.on("logout",t)}}const b=/^glci_/,I="gender_",P="geo_",w="male",E="female",T=()=>a(void 0,void 0,void 0,function*(){try{const e=yield(t=500,a(void 0,void 0,void 0,function*(){return Promise.race([a(void 0,void 0,void 0,function*(){return yield new Promise(t=>{if("undefined"!=typeof window)if(window.Identity)t(window.Identity);else{const e=()=>{t(window.Identity)};window.addEventListener("identity-initialized",e,{once:!0})}else t(void 0)})}),new Promise(e=>setTimeout(()=>e(void 0),t))])})),n=new f(e),r=yield n.getIdentityUser(),{gender:i}=null!=r?r:{};return i===w||i===E?`${I}${i}`:void 0}catch(t){return}var t}),U=()=>a(void 0,void 0,void 0,function*(){const t=[],e=yield T(),n=(()=>{const t=i().map(t=>`${P}${t.replace(b,"")}`);return Array.from(new Set(t))})();return e&&t.push(e),n&&t.push(...n),t});class S{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${e}`}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:a}=new URL(n),r=a.split("/").filter(Boolean);return r.length?[...r.slice(1),n]:[n]}}class A{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class L{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class j{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class O{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.svd.se"===e?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${e}`}}class D{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.aftonbladet.se"===e?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class K{handleKilkayaStreamTracking({pulse:t,pageContext:{pageType:e,publisher:a,countryCode:r}}){if(!(null==t?void 0:t.instance))return;const i={[c.VG]:new p,[c.E24]:new S,"no-aftenposten":new A,[c.BT]:new L,"no-bergenstidende":new L,[c.SA]:new j,"no-stavangeraftenblad":new j,[c.SVD]:new O,[c.AFTONBLADET]:new D}[a]||new v;((t,e,a,r)=>{const i=document.querySelectorAll("k5a-stream");i.length&&i.forEach(i=>{const s=r===n.SE?new k(t,i,e):new y(t,i,e,a);s.trackImpression(),i.addEventListener("click",()=>s.trackEngagement())})})(t.instance,i,e,r)}injectKilkayaMeta(t){return a(this,void 0,void 0,function*(){const e=document.createElement("script"),n=yield U();e.textContent=`var k5aMeta = { consent: ${t}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(e)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",t=>{var e;const n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.streamSlot;if(r(`Kilkaya event for slot: ${n}`),!n)return void r("Kilkaya slot empty, Xandr backfill won't be loaded");const a=n.parentElement;a?(r(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(a)):r("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(t){var e;const n=t.querySelector(".fallback");if(!n)return;n.style.display="flex";const a=null!==(e=n.dataset.fallbackTargetId)&&void 0!==e?e:"";o(a)}loadKilkayaScript(t){return a(this,void 0,void 0,function*(){yield l(t)})}run(t){return a(this,void 0,void 0,function*(){var e,n;const{tcf:a,pageContext:{isMobileApp:r,countryCode:i},kilkaya:s}=t;if(!(null==s?void 0:s.enabled))return;const o=yield d(a,r,i,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(o),yield this.loadKilkayaScript(null!==(n=null===(e=s.options)||void 0===e?void 0:e.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(t)})}}const N=({placementName:t,slotTag:e,fallbackTargetId:n,children:a,pulseData:r,htmlAttributes:i})=>{const s=(t,e)=>{const n={};if(!t)return n;for(const[a,r]of Object.entries(t)){n[e?`${e}-${a}`:a]=String(r)}return n},o=s(r,"data-pulse"),l=s(i,"data");return u("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"},"data-slot-tag":e},o,l,{children:[g("div",{className:"inscreen-target"}),g("k5a-stream",{name:t,"slot-tag":e}),g("div",{className:"container"}),g("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:a})]}))},$=t=>a(void 0,void 0,void 0,function*(){const e=new K;yield e.run(t)});export{N as Kilkaya,$ as runKilkaya};
@@ -1 +0,0 @@
1
- import{i as n,_ as e,c as i,l as t,g as o,a as r,b as d,d as l,h as a,e as s,u as c,f as u,A as f,s as v}from"./_auto-entry_sa-J8OfTxac.js";import{xandrAdLoaded as p,finnBlinkLoaded as m}from"./events-C3BMo9Uo.js";import"react/jsx-runtime";n('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const y={Blink:"Blink"},h=new Map,g=n=>{var e;if(!h.has(n)){const e=import(/* webpackIgnore: true */n).then(n=>(n=>{for(const[e,i]of Object.entries(y)){const t=n[e];null!=t&&(window[i]=t)}})(n)).catch(e=>{throw h.delete(n),e});h.set(n,e)}return null!==(e=h.get(n))&&void 0!==e?e:Promise.resolve()},b="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",k=n=>{var e,i;const t=document.querySelector(`[id^="${n}"]`);return null!==(i=null===(e=null==t?void 0:t.dataset)||void 0===e?void 0:e.finnBlinkId)&&void 0!==i?i:n},$=(n,e)=>{const{finnBlink:{enabled:t}={}}=i.get(),o=(null==e?void 0:e.enabled)||(n=>{var e;const i=document.querySelector(`[id^="${n}"]`);return!!(null===(e=null==i?void 0:i.dataset)||void 0===e?void 0:e.noBidAd)})(n);if(!o||!t)return null;const{height:r,requireImage:d,position:l,offset:a}=(null==e?void 0:e.sdkPayload)||{};return{selector:`#${k(n)}`,enabled:o,position:null!=l?l:n,height:null!=r?r:100,offset:null!=a?a:200,requireImage:d,advertoryTheme:null==e?void 0:e.advertoryTheme}},w=(n,a,s)=>e(void 0,void 0,void 0,function*(){const{placements:c,pageContext:{deviceType:u},appearanceConfig:f}=i.get();t(`rendering finn blink ad for ${n}`);const v=o(n),h=c[u].find(n=>n.targetId===v),g=$(n,null==h?void 0:h.finnBlink);if(!(null==g?void 0:g.enabled))return t(`Finn blink is not enabled on placement: ${n}`),s&&s(n),void p(n);if((n=>{var e;const i=k(n),t=document.querySelector(`[id^="${i}"]`);return!!(null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains("finn"))})(n))return void t(`Finn blink already loaded ${n}`);const{publisher:b,countryCode:w,finnBlink:C}=a,{sdkPayload:{channel:x}={}}=null!=C?C:{},I=null!=x?x:`${b}.${w}`,j="dark"===(null==f?void 0:f.theme)?"dark":"light";try{const n=yield r();yield(B=Object.assign(Object.assign({},g),{channel:I,userId:n,theme:j}),e(void 0,void 0,void 0,function*(){const{userId:n,theme:e}=B,i=l(B,["userId","theme"]),t=window[y.Blink];if(!t)return;const o=new t({remote:"https://www.finn.no/distribution-front/external/carousel",userId:n,theme:e});yield o.inject(Object.assign({},i))})),m(g.selector.replace("#",""),g.advertoryTheme)}catch(e){t(`Finn blink error ${e}`),s&&s(n),!s&&d(n),p(n)}var B}),C=()=>e(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{isMobileApp:e,countryCode:o}}=i.get();return!!(yield a(n,e,o,"finn-blink"))||(t("Skip loading finn blink ad due to missing TCF consent."),!1)}),x=(n,o,r,l)=>e(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:e}}=i.get();if(t(`loadFinnBlinkAd: loading finn blink ad for ${n}`),!(yield C())||e)return r&&r(n),p(n),void(!r&&d(n));try{yield g(b)}catch(n){console.error(n)}yield w(n,o,r),l&&l()}),I=(n,e)=>{var i;(t(`Appending ${e.id} after ${n.id}`),n.parentElement&&(i=n.parentElement,!Array.from(i.children).some(n=>n.classList.contains("advertory-finn-blink-wrapper"))))?(n.parentElement.style.display="none",n.parentElement.insertAdjacentElement("afterend",e)):t(`Cannot perform afterend on: ${n.id}`)},j=(n,o)=>e(void 0,void 0,void 0,function*(){var e,r;if(!o)return;const{replacementConfig:d}=o,l=null===(e=null==d?void 0:d.adsToReplace)||void 0===e?void 0:e[n],a=null===(r=null==d?void 0:d.sizes)||void 0===r?void 0:r[n];s()&&l&&a?(yield C())&&(yield g(b),l.forEach(([n,e])=>{const o=document.querySelector(`[id^="${n}"]`);if(!o)return;const r=(n=>{const{siteSpecificConfig:{publisherClassName:e}={}}=i.get(),o=document.createElement("div"),r=document.createElement("div");return r.id=n,o.appendChild(r),u(e,r,f.FINN_BLINK),t(`Creating blink container for: ${n}`),o})(e);(n=>{t(`Hiding old ad container: ${n.id}`),n.style.setProperty("display","none","important")})(o),I(o,r),o.dataset.finnBlinkId=e,c().withFullAdsChain(n)})):t(`Finn blink configuration is incorrect: ${JSON.stringify(d)}`)}),B=n=>document.querySelector(`#${n}`),A=n=>e(void 0,void 0,void 0,function*(){if(!n.length)return;const{appearanceConfig:e,pageContext:{deviceType:t}}=i.get(),o=null==e?void 0:e.defaultThreshold[t];for(const e of n){const{requestThreshold:n,targetId:i}=e,t=B(i);t&&(yield v(t,null!=n?n:o))}});export{A as handleFinnBlinkOnlyPlacements,x as loadFinnBlinkAd,j as replaceAdsWithFinnBlink};
@@ -1 +0,0 @@
1
- import{o as t,w as e,C as n,_ as a,l as r,p as i,P as s,q as o,r as l,h as d,N as c}from"./_auto-entry_sa-J8OfTxac.js";import{jsxs as u,jsx as g}from"react/jsx-runtime";class p{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];const{host:a,pathname:r}=new URL(n);if(!a.includes("www.vg.no")&&!r.includes("annonsorinnhold"))return[n];const i=r.split("/");return i.length?[...i.filter(Boolean).slice(1).map(t=>t),n]:[n]}}class v{getPulseObjectId(){return""}getPulsePageId(t,e){return""}}const h="[data-k5a-teaser-analytics]";class m extends t{constructor(t,e,n,a){super(t,""),this.root=e,this.newsroomStrategy=n,this.pageType=a}getTargetId(){return this.root.id}buildAdObject(){return this.getEventInput("view")}parseKilkayaData(){const t=this.root.querySelector("article");if(!t)return{};const e=t.dataset.k5aTeaserAnalytics;try{return e?JSON.parse(e):{}}catch(t){return{}}}mapPageType(t){var e;return null!==(e={front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[null!=t?t:"front"])&&void 0!==e?e:"Frontpage"}getArticleId(){var t;return null!==(t=location.pathname.split("/").slice(-2,-1).pop())&&void 0!==t?t:""}getPlacementData(){var t,e;const n=this.root.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,secondaryPosition:Number(null==n?void 0:n.dataset.pulseSecondaryposition)||0,slot:null!==(e=null==n?void 0:n.dataset.slotTag)&&void 0!==e?e:""}}getEventTarget(){const{link:t,itemId:e,title:n}=this.parseKilkayaData();return{id:e,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(t){return t.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}waitForAnalyticsData(t){const e=this.root.querySelector(h);if(Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics))return void t();const n=new MutationObserver(()=>{const e=this.root.querySelector(h);Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics)&&(n.disconnect(),t())});n.observe(this.root,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]})}trackLoad(){}trackImpression(){e(this.root,()=>this.waitForAnalyticsData(()=>{var t,e;const n=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:this.parseKilkayaData().placement}});window.dispatchEvent(n);const a=this.getEventInput("view");this.pulse.trackLegacyViewUIElement?this.pulse.trackLegacyViewUIElement(a):this.pulse.trackViewUIElement?this.pulse.trackViewUIElement(a):null===(e=(t=this.pulse).trackElementView)||void 0===e||e.call(t,a)}))}trackEngagement(t){var e,n;const a=this.getEventInput("click");this.pulse.trackLegacyClickUIElement?this.pulse.trackLegacyClickUIElement(a):this.pulse.trackClickUIElement?this.pulse.trackClickUIElement(a):null===(n=(e=this.pulse).trackElementClick)||void 0===n||n.call(e,a)}}class y extends m{getEventBaseData(){var t,e,n,a;const{clientName:r,creativeId:i,itemId:s,placement:o}=this.parseKilkayaData(),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(null!==(e=this.pageType)&&void 0!==e?e:"front",this.getArticleId());return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",position:o,elementType:"Article",custom:{customer:r,creativeId:null!=i?i:s},page:{"@id":null!=g?g:o,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(a=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===a?void 0:a.call(n,this.root)})}getEventInput(t){return{object:this.getEventBaseData(),partnerstudio:this.getEventPartnerstudioData(t),target:this.getEventTarget(),provider:this.getProviderData()}}getEventPartnerstudioData(t){return Object.assign(Object.assign({},this.parseKilkayaData()),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}class k extends m{getEventBaseData(){var t,e;const{title:n="",clientName:a="",creativeId:r="",link:i="",itemId:s=""}=this.parseKilkayaData(),{columnName:o,primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u={publicUrl:i,urlPath:i?new URL(i).pathname:""},{publicUrl:g,urlPath:p}=i&&(null===(e=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===e?void 0:e.call(t,i))||u;return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:n,placement:{columnName:o,primaryPosition:l,secondaryPosition:d,source:c},tags:[a,n,g,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:a,"spt:creativeId":r,pageTitle:n,publicUrl:g,urlPath:p},url:location.origin})}getEventInput(t){return{object:this.getEventBaseData(),target:this.getEventTarget()}}}class f{constructor(t){this.identity=t,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return a(this,void 0,void 0,function*(){var t;try{const e=yield null===(t=this.identity)||void 0===t?void 0:t.getUser();return null!=e?e:null}catch(t){return r("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return a(this,void 0,void 0,function*(){var t,e;return null!==(e=yield null===(t=this.identity)||void 0===t?void 0:t.isLoggedIn())&&void 0!==e&&e})}onIdentityLogout(t){var e;null===(e=this.identity)||void 0===e||e.on("logout",t)}}const b=/^glci_/,I="gender_",P="geo_",w="male",E="female",T=()=>a(void 0,void 0,void 0,function*(){try{const e=yield(t=500,a(void 0,void 0,void 0,function*(){return Promise.race([a(void 0,void 0,void 0,function*(){return yield new Promise(t=>{if("undefined"!=typeof window)if(window.Identity)t(window.Identity);else{const e=()=>{t(window.Identity)};window.addEventListener("identity-initialized",e,{once:!0})}else t(void 0)})}),new Promise(e=>setTimeout(()=>e(void 0),t))])})),n=new f(e),r=yield n.getIdentityUser(),{gender:i}=null!=r?r:{};return i===w||i===E?`${I}${i}`:void 0}catch(t){return}var t}),U=()=>a(void 0,void 0,void 0,function*(){const t=[],e=yield T(),n=(()=>{const t=i().map(t=>`${P}${t.replace(b,"")}`);return Array.from(new Set(t))})();return e&&t.push(e),n&&t.push(...n),t});class S{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${e}`}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:a}=new URL(n),r=a.split("/").filter(Boolean);return r.length?[...r.slice(1),n]:[n]}}class A{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class L{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class j{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class O{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.svd.se"===e?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${e}`}}class D{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.aftonbladet.se"===e?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class K{handleKilkayaStreamTracking({pulse:t,pageContext:{pageType:e,publisher:a,countryCode:r}}){if(!(null==t?void 0:t.instance))return;const i={[c.VG]:new p,[c.E24]:new S,"no-aftenposten":new A,[c.BT]:new L,"no-bergenstidende":new L,[c.SA]:new j,"no-stavangeraftenblad":new j,[c.SVD]:new O,[c.AFTONBLADET]:new D}[a]||new v;((t,e,a,r)=>{const i=document.querySelectorAll("k5a-stream");i.length&&i.forEach(i=>{const s=r===n.SE?new k(t,i,e):new y(t,i,e,a);s.trackImpression(),i.addEventListener("click",()=>s.trackEngagement())})})(t.instance,i,e,r)}injectKilkayaMeta(t){return a(this,void 0,void 0,function*(){const e=document.createElement("script"),n=yield U();e.textContent=`var k5aMeta = { consent: ${t}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(e)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",t=>{var e;const n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.streamSlot;if(r(`Kilkaya event for slot: ${n}`),!n)return void r("Kilkaya slot empty, Xandr backfill won't be loaded");const a=n.parentElement;a?(r(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(a)):r("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(t){var e;const n=t.querySelector(".fallback");if(!n)return;n.style.display="flex";const a=null!==(e=n.dataset.fallbackTargetId)&&void 0!==e?e:"";o(a)}loadKilkayaScript(t){return a(this,void 0,void 0,function*(){yield l(t)})}run(t){return a(this,void 0,void 0,function*(){var e,n;const{tcf:a,pageContext:{isMobileApp:r,countryCode:i},kilkaya:s}=t;if(!(null==s?void 0:s.enabled))return;const o=yield d(a,r,i,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(o),yield this.loadKilkayaScript(null!==(n=null===(e=s.options)||void 0===e?void 0:e.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(t)})}}const N=({placementName:t,slotTag:e,fallbackTargetId:n,children:a,pulseData:r,htmlAttributes:i})=>{const s=(t,e)=>{const n={};if(!t)return n;for(const[a,r]of Object.entries(t)){n[e?`${e}-${a}`:a]=String(r)}return n},o=s(r,"data-pulse"),l=s(i,"data");return u("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"},"data-slot-tag":e},o,l,{children:[g("div",{className:"inscreen-target"}),g("k5a-stream",{name:t,"slot-tag":e}),g("div",{className:"container"}),g("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:a})]}))},$=t=>a(void 0,void 0,void 0,function*(){const e=new K;yield e.run(t)});export{N as Kilkaya,$ as runKilkaya};
@@ -1 +0,0 @@
1
- import{i as n,_ as e,c as i,l as t,g as o,a as r,b as d,d as l,h as a,e as s,u as c,f as u,A as f,s as v}from"./_auto-entry_sav2-nmDgZMyM.js";import{xandrAdLoaded as p,finnBlinkLoaded as m}from"./events-BM5FbEtd.js";import"react/jsx-runtime";n('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const y={Blink:"Blink"},h=new Map,g=n=>{var e;if(!h.has(n)){const e=import(/* webpackIgnore: true */n).then(n=>(n=>{for(const[e,i]of Object.entries(y)){const t=n[e];null!=t&&(window[i]=t)}})(n)).catch(e=>{throw h.delete(n),e});h.set(n,e)}return null!==(e=h.get(n))&&void 0!==e?e:Promise.resolve()},b="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",k=n=>{var e,i;const t=document.querySelector(`[id^="${n}"]`);return null!==(i=null===(e=null==t?void 0:t.dataset)||void 0===e?void 0:e.finnBlinkId)&&void 0!==i?i:n},$=(n,e)=>{const{finnBlink:{enabled:t}={}}=i.get(),o=(null==e?void 0:e.enabled)||(n=>{var e;const i=document.querySelector(`[id^="${n}"]`);return!!(null===(e=null==i?void 0:i.dataset)||void 0===e?void 0:e.noBidAd)})(n);if(!o||!t)return null;const{height:r,requireImage:d,position:l,offset:a}=(null==e?void 0:e.sdkPayload)||{};return{selector:`#${k(n)}`,enabled:o,position:null!=l?l:n,height:null!=r?r:100,offset:null!=a?a:200,requireImage:d,advertoryTheme:null==e?void 0:e.advertoryTheme}},w=(n,a,s)=>e(void 0,void 0,void 0,function*(){const{placements:c,pageContext:{deviceType:u},appearanceConfig:f}=i.get();t(`rendering finn blink ad for ${n}`);const v=o(n),h=c[u].find(n=>n.targetId===v),g=$(n,null==h?void 0:h.finnBlink);if(!(null==g?void 0:g.enabled))return t(`Finn blink is not enabled on placement: ${n}`),s&&s(n),void p(n);if((n=>{var e;const i=k(n),t=document.querySelector(`[id^="${i}"]`);return!!(null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains("finn"))})(n))return void t(`Finn blink already loaded ${n}`);const{publisher:b,countryCode:w,finnBlink:C}=a,{sdkPayload:{channel:x}={}}=null!=C?C:{},I=null!=x?x:`${b}.${w}`,j="dark"===(null==f?void 0:f.theme)?"dark":"light";try{const n=yield r();yield(B=Object.assign(Object.assign({},g),{channel:I,userId:n,theme:j}),e(void 0,void 0,void 0,function*(){const{userId:n,theme:e}=B,i=l(B,["userId","theme"]),t=window[y.Blink];if(!t)return;const o=new t({remote:"https://www.finn.no/distribution-front/external/carousel",userId:n,theme:e});yield o.inject(Object.assign({},i))})),m(g.selector.replace("#",""),g.advertoryTheme)}catch(e){t(`Finn blink error ${e}`),s&&s(n),!s&&d(n),p(n)}var B}),C=()=>e(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{isMobileApp:e,countryCode:o}}=i.get();return!!(yield a(n,e,o,"finn-blink"))||(t("Skip loading finn blink ad due to missing TCF consent."),!1)}),x=(n,o,r,l)=>e(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:e}}=i.get();if(t(`loadFinnBlinkAd: loading finn blink ad for ${n}`),!(yield C())||e)return r&&r(n),p(n),void(!r&&d(n));try{yield g(b)}catch(n){console.error(n)}yield w(n,o,r),l&&l()}),I=(n,e)=>{var i;(t(`Appending ${e.id} after ${n.id}`),n.parentElement&&(i=n.parentElement,!Array.from(i.children).some(n=>n.classList.contains("advertory-finn-blink-wrapper"))))?(n.parentElement.style.display="none",n.parentElement.insertAdjacentElement("afterend",e)):t(`Cannot perform afterend on: ${n.id}`)},j=(n,o)=>e(void 0,void 0,void 0,function*(){var e,r;if(!o)return;const{replacementConfig:d}=o,l=null===(e=null==d?void 0:d.adsToReplace)||void 0===e?void 0:e[n],a=null===(r=null==d?void 0:d.sizes)||void 0===r?void 0:r[n];s()&&l&&a?(yield C())&&(yield g(b),l.forEach(([n,e])=>{const o=document.querySelector(`[id^="${n}"]`);if(!o)return;const r=(n=>{const{siteSpecificConfig:{publisherClassName:e}={}}=i.get(),o=document.createElement("div"),r=document.createElement("div");return r.id=n,o.appendChild(r),u(e,r,f.FINN_BLINK),t(`Creating blink container for: ${n}`),o})(e);(n=>{t(`Hiding old ad container: ${n.id}`),n.style.setProperty("display","none","important")})(o),I(o,r),o.dataset.finnBlinkId=e,c().withFullAdsChain(n)})):t(`Finn blink configuration is incorrect: ${JSON.stringify(d)}`)}),B=n=>document.querySelector(`#${n}`),A=n=>e(void 0,void 0,void 0,function*(){if(!n.length)return;const{appearanceConfig:e,pageContext:{deviceType:t}}=i.get(),o=null==e?void 0:e.defaultThreshold[t];for(const e of n){const{requestThreshold:n,targetId:i}=e,t=B(i);t&&(yield v(t,null!=n?n:o))}});export{A as handleFinnBlinkOnlyPlacements,x as loadFinnBlinkAd,j as replaceAdsWithFinnBlink};
@@ -1 +0,0 @@
1
- import{o as t,w as e,C as n,_ as a,l as r,p as i,P as s,q as o,r as l,h as d,N as c}from"./_auto-entry_sav2-nmDgZMyM.js";import{jsxs as u,jsx as g}from"react/jsx-runtime";class p{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];const{host:a,pathname:r}=new URL(n);if(!a.includes("www.vg.no")&&!r.includes("annonsorinnhold"))return[n];const i=r.split("/");return i.length?[...i.filter(Boolean).slice(1).map(t=>t),n]:[n]}}class v{getPulseObjectId(){return""}getPulsePageId(t,e){return""}}const h="[data-k5a-teaser-analytics]";class m extends t{constructor(t,e,n,a){super(t,""),this.root=e,this.newsroomStrategy=n,this.pageType=a}getTargetId(){return this.root.id}buildAdObject(){return this.getEventInput("view")}parseKilkayaData(){const t=this.root.querySelector("article");if(!t)return{};const e=t.dataset.k5aTeaserAnalytics;try{return e?JSON.parse(e):{}}catch(t){return{}}}mapPageType(t){var e;return null!==(e={front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[null!=t?t:"front"])&&void 0!==e?e:"Frontpage"}getArticleId(){var t;return null!==(t=location.pathname.split("/").slice(-2,-1).pop())&&void 0!==t?t:""}getPlacementData(){var t,e;const n=this.root.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,secondaryPosition:Number(null==n?void 0:n.dataset.pulseSecondaryposition)||0,slot:null!==(e=null==n?void 0:n.dataset.slotTag)&&void 0!==e?e:""}}getEventTarget(){const{link:t,itemId:e,title:n}=this.parseKilkayaData();return{id:e,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(t){return t.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}waitForAnalyticsData(t){const e=this.root.querySelector(h);if(Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics))return void t();const n=new MutationObserver(()=>{const e=this.root.querySelector(h);Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics)&&(n.disconnect(),t())});n.observe(this.root,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]})}trackLoad(){}trackImpression(){e(this.root,()=>this.waitForAnalyticsData(()=>{var t,e;const n=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:this.parseKilkayaData().placement}});window.dispatchEvent(n);const a=this.getEventInput("view");this.pulse.trackLegacyViewUIElement?this.pulse.trackLegacyViewUIElement(a):this.pulse.trackViewUIElement?this.pulse.trackViewUIElement(a):null===(e=(t=this.pulse).trackElementView)||void 0===e||e.call(t,a)}))}trackEngagement(t){var e,n;const a=this.getEventInput("click");this.pulse.trackLegacyClickUIElement?this.pulse.trackLegacyClickUIElement(a):this.pulse.trackClickUIElement?this.pulse.trackClickUIElement(a):null===(n=(e=this.pulse).trackElementClick)||void 0===n||n.call(e,a)}}class y extends m{getEventBaseData(){var t,e,n,a;const{clientName:r,creativeId:i,itemId:s,placement:o}=this.parseKilkayaData(),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(null!==(e=this.pageType)&&void 0!==e?e:"front",this.getArticleId());return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",position:o,elementType:"Article",custom:{customer:r,creativeId:null!=i?i:s},page:{"@id":null!=g?g:o,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(a=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===a?void 0:a.call(n,this.root)})}getEventInput(t){return{object:this.getEventBaseData(),partnerstudio:this.getEventPartnerstudioData(t),target:this.getEventTarget(),provider:this.getProviderData()}}getEventPartnerstudioData(t){return Object.assign(Object.assign({},this.parseKilkayaData()),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}class k extends m{getEventBaseData(){var t,e;const{title:n="",clientName:a="",creativeId:r="",link:i="",itemId:s=""}=this.parseKilkayaData(),{columnName:o,primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u={publicUrl:i,urlPath:i?new URL(i).pathname:""},{publicUrl:g,urlPath:p}=i&&(null===(e=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===e?void 0:e.call(t,i))||u;return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:n,placement:{columnName:o,primaryPosition:l,secondaryPosition:d,source:c},tags:[a,n,g,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:a,"spt:creativeId":r,pageTitle:n,publicUrl:g,urlPath:p},url:location.origin})}getEventInput(t){return{object:this.getEventBaseData(),target:this.getEventTarget()}}}class f{constructor(t){this.identity=t,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return a(this,void 0,void 0,function*(){var t;try{const e=yield null===(t=this.identity)||void 0===t?void 0:t.getUser();return null!=e?e:null}catch(t){return r("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return a(this,void 0,void 0,function*(){var t,e;return null!==(e=yield null===(t=this.identity)||void 0===t?void 0:t.isLoggedIn())&&void 0!==e&&e})}onIdentityLogout(t){var e;null===(e=this.identity)||void 0===e||e.on("logout",t)}}const b=/^glci_/,I="gender_",P="geo_",w="male",E="female",T=()=>a(void 0,void 0,void 0,function*(){try{const e=yield(t=500,a(void 0,void 0,void 0,function*(){return Promise.race([a(void 0,void 0,void 0,function*(){return yield new Promise(t=>{if("undefined"!=typeof window)if(window.Identity)t(window.Identity);else{const e=()=>{t(window.Identity)};window.addEventListener("identity-initialized",e,{once:!0})}else t(void 0)})}),new Promise(e=>setTimeout(()=>e(void 0),t))])})),n=new f(e),r=yield n.getIdentityUser(),{gender:i}=null!=r?r:{};return i===w||i===E?`${I}${i}`:void 0}catch(t){return}var t}),U=()=>a(void 0,void 0,void 0,function*(){const t=[],e=yield T(),n=(()=>{const t=i().map(t=>`${P}${t.replace(b,"")}`);return Array.from(new Set(t))})();return e&&t.push(e),n&&t.push(...n),t});class S{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${e}`}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:a}=new URL(n),r=a.split("/").filter(Boolean);return r.length?[...r.slice(1),n]:[n]}}class A{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class L{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class j{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class O{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.svd.se"===e?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${e}`}}class D{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.aftonbladet.se"===e?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class K{handleKilkayaStreamTracking({pulse:t,pageContext:{pageType:e,publisher:a,countryCode:r}}){if(!(null==t?void 0:t.instance))return;const i={[c.VG]:new p,[c.E24]:new S,"no-aftenposten":new A,[c.BT]:new L,"no-bergenstidende":new L,[c.SA]:new j,"no-stavangeraftenblad":new j,[c.SVD]:new O,[c.AFTONBLADET]:new D}[a]||new v;((t,e,a,r)=>{const i=document.querySelectorAll("k5a-stream");i.length&&i.forEach(i=>{const s=r===n.SE?new k(t,i,e):new y(t,i,e,a);s.trackImpression(),i.addEventListener("click",()=>s.trackEngagement())})})(t.instance,i,e,r)}injectKilkayaMeta(t){return a(this,void 0,void 0,function*(){const e=document.createElement("script"),n=yield U();e.textContent=`var k5aMeta = { consent: ${t}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(e)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",t=>{var e;const n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.streamSlot;if(r(`Kilkaya event for slot: ${n}`),!n)return void r("Kilkaya slot empty, Xandr backfill won't be loaded");const a=n.parentElement;a?(r(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(a)):r("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(t){var e;const n=t.querySelector(".fallback");if(!n)return;n.style.display="flex";const a=null!==(e=n.dataset.fallbackTargetId)&&void 0!==e?e:"";o(a)}loadKilkayaScript(t){return a(this,void 0,void 0,function*(){yield l(t)})}run(t){return a(this,void 0,void 0,function*(){var e,n;const{tcf:a,pageContext:{isMobileApp:r,countryCode:i},kilkaya:s}=t;if(!(null==s?void 0:s.enabled))return;const o=yield d(a,r,i,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(o),yield this.loadKilkayaScript(null!==(n=null===(e=s.options)||void 0===e?void 0:e.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(t)})}}const N=({placementName:t,slotTag:e,fallbackTargetId:n,children:a,pulseData:r,htmlAttributes:i})=>{const s=(t,e)=>{const n={};if(!t)return n;for(const[a,r]of Object.entries(t)){n[e?`${e}-${a}`:a]=String(r)}return n},o=s(r,"data-pulse"),l=s(i,"data");return u("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"},"data-slot-tag":e},o,l,{children:[g("div",{className:"inscreen-target"}),g("k5a-stream",{name:t,"slot-tag":e}),g("div",{className:"container"}),g("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:a})]}))},$=t=>a(void 0,void 0,void 0,function*(){const e=new K;yield e.run(t)});export{N as Kilkaya,$ as runKilkaya};
@@ -1 +0,0 @@
1
- import{o as t,w as e,C as n,_ as a,l as r,p as i,P as s,q as o,r as l,h as d,N as c}from"./_auto-entry_svd-BOBXC1NB.js";import{jsxs as u,jsx as g}from"react/jsx-runtime";class p{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];const{host:a,pathname:r}=new URL(n);if(!a.includes("www.vg.no")&&!r.includes("annonsorinnhold"))return[n];const i=r.split("/");return i.length?[...i.filter(Boolean).slice(1).map(t=>t),n]:[n]}}class v{getPulseObjectId(){return""}getPulsePageId(t,e){return""}}const h="[data-k5a-teaser-analytics]";class m extends t{constructor(t,e,n,a){super(t,""),this.root=e,this.newsroomStrategy=n,this.pageType=a}getTargetId(){return this.root.id}buildAdObject(){return this.getEventInput("view")}parseKilkayaData(){const t=this.root.querySelector("article");if(!t)return{};const e=t.dataset.k5aTeaserAnalytics;try{return e?JSON.parse(e):{}}catch(t){return{}}}mapPageType(t){var e;return null!==(e={front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[null!=t?t:"front"])&&void 0!==e?e:"Frontpage"}getArticleId(){var t;return null!==(t=location.pathname.split("/").slice(-2,-1).pop())&&void 0!==t?t:""}getPlacementData(){var t,e;const n=this.root.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,secondaryPosition:Number(null==n?void 0:n.dataset.pulseSecondaryposition)||0,slot:null!==(e=null==n?void 0:n.dataset.slotTag)&&void 0!==e?e:""}}getEventTarget(){const{link:t,itemId:e,title:n}=this.parseKilkayaData();return{id:e,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(t){return t.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}waitForAnalyticsData(t){const e=this.root.querySelector(h);if(Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics))return void t();const n=new MutationObserver(()=>{const e=this.root.querySelector(h);Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics)&&(n.disconnect(),t())});n.observe(this.root,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]})}trackLoad(){}trackImpression(){e(this.root,()=>this.waitForAnalyticsData(()=>{var t,e;const n=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:this.parseKilkayaData().placement}});window.dispatchEvent(n);const a=this.getEventInput("view");this.pulse.trackLegacyViewUIElement?this.pulse.trackLegacyViewUIElement(a):this.pulse.trackViewUIElement?this.pulse.trackViewUIElement(a):null===(e=(t=this.pulse).trackElementView)||void 0===e||e.call(t,a)}))}trackEngagement(t){var e,n;const a=this.getEventInput("click");this.pulse.trackLegacyClickUIElement?this.pulse.trackLegacyClickUIElement(a):this.pulse.trackClickUIElement?this.pulse.trackClickUIElement(a):null===(n=(e=this.pulse).trackElementClick)||void 0===n||n.call(e,a)}}class y extends m{getEventBaseData(){var t,e,n,a;const{clientName:r,creativeId:i,itemId:s,placement:o}=this.parseKilkayaData(),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(null!==(e=this.pageType)&&void 0!==e?e:"front",this.getArticleId());return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",position:o,elementType:"Article",custom:{customer:r,creativeId:null!=i?i:s},page:{"@id":null!=g?g:o,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(a=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===a?void 0:a.call(n,this.root)})}getEventInput(t){return{object:this.getEventBaseData(),partnerstudio:this.getEventPartnerstudioData(t),target:this.getEventTarget(),provider:this.getProviderData()}}getEventPartnerstudioData(t){return Object.assign(Object.assign({},this.parseKilkayaData()),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}class k extends m{getEventBaseData(){var t,e;const{title:n="",clientName:a="",creativeId:r="",link:i="",itemId:s=""}=this.parseKilkayaData(),{columnName:o,primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u={publicUrl:i,urlPath:i?new URL(i).pathname:""},{publicUrl:g,urlPath:p}=i&&(null===(e=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===e?void 0:e.call(t,i))||u;return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:n,placement:{columnName:o,primaryPosition:l,secondaryPosition:d,source:c},tags:[a,n,g,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:a,"spt:creativeId":r,pageTitle:n,publicUrl:g,urlPath:p},url:location.origin})}getEventInput(t){return{object:this.getEventBaseData(),target:this.getEventTarget()}}}class f{constructor(t){this.identity=t,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return a(this,void 0,void 0,function*(){var t;try{const e=yield null===(t=this.identity)||void 0===t?void 0:t.getUser();return null!=e?e:null}catch(t){return r("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return a(this,void 0,void 0,function*(){var t,e;return null!==(e=yield null===(t=this.identity)||void 0===t?void 0:t.isLoggedIn())&&void 0!==e&&e})}onIdentityLogout(t){var e;null===(e=this.identity)||void 0===e||e.on("logout",t)}}const b=/^glci_/,I="gender_",P="geo_",w="male",E="female",T=()=>a(void 0,void 0,void 0,function*(){try{const e=yield(t=500,a(void 0,void 0,void 0,function*(){return Promise.race([a(void 0,void 0,void 0,function*(){return yield new Promise(t=>{if("undefined"!=typeof window)if(window.Identity)t(window.Identity);else{const e=()=>{t(window.Identity)};window.addEventListener("identity-initialized",e,{once:!0})}else t(void 0)})}),new Promise(e=>setTimeout(()=>e(void 0),t))])})),n=new f(e),r=yield n.getIdentityUser(),{gender:i}=null!=r?r:{};return i===w||i===E?`${I}${i}`:void 0}catch(t){return}var t}),U=()=>a(void 0,void 0,void 0,function*(){const t=[],e=yield T(),n=(()=>{const t=i().map(t=>`${P}${t.replace(b,"")}`);return Array.from(new Set(t))})();return e&&t.push(e),n&&t.push(...n),t});class S{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${e}`}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:a}=new URL(n),r=a.split("/").filter(Boolean);return r.length?[...r.slice(1),n]:[n]}}class A{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class L{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class j{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class O{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.svd.se"===e?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${e}`}}class D{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.aftonbladet.se"===e?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class K{handleKilkayaStreamTracking({pulse:t,pageContext:{pageType:e,publisher:a,countryCode:r}}){if(!(null==t?void 0:t.instance))return;const i={[c.VG]:new p,[c.E24]:new S,"no-aftenposten":new A,[c.BT]:new L,"no-bergenstidende":new L,[c.SA]:new j,"no-stavangeraftenblad":new j,[c.SVD]:new O,[c.AFTONBLADET]:new D}[a]||new v;((t,e,a,r)=>{const i=document.querySelectorAll("k5a-stream");i.length&&i.forEach(i=>{const s=r===n.SE?new k(t,i,e):new y(t,i,e,a);s.trackImpression(),i.addEventListener("click",()=>s.trackEngagement())})})(t.instance,i,e,r)}injectKilkayaMeta(t){return a(this,void 0,void 0,function*(){const e=document.createElement("script"),n=yield U();e.textContent=`var k5aMeta = { consent: ${t}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(e)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",t=>{var e;const n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.streamSlot;if(r(`Kilkaya event for slot: ${n}`),!n)return void r("Kilkaya slot empty, Xandr backfill won't be loaded");const a=n.parentElement;a?(r(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(a)):r("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(t){var e;const n=t.querySelector(".fallback");if(!n)return;n.style.display="flex";const a=null!==(e=n.dataset.fallbackTargetId)&&void 0!==e?e:"";o(a)}loadKilkayaScript(t){return a(this,void 0,void 0,function*(){yield l(t)})}run(t){return a(this,void 0,void 0,function*(){var e,n;const{tcf:a,pageContext:{isMobileApp:r,countryCode:i},kilkaya:s}=t;if(!(null==s?void 0:s.enabled))return;const o=yield d(a,r,i,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(o),yield this.loadKilkayaScript(null!==(n=null===(e=s.options)||void 0===e?void 0:e.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(t)})}}const N=({placementName:t,slotTag:e,fallbackTargetId:n,children:a,pulseData:r,htmlAttributes:i})=>{const s=(t,e)=>{const n={};if(!t)return n;for(const[a,r]of Object.entries(t)){n[e?`${e}-${a}`:a]=String(r)}return n},o=s(r,"data-pulse"),l=s(i,"data");return u("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"},"data-slot-tag":e},o,l,{children:[g("div",{className:"inscreen-target"}),g("k5a-stream",{name:t,"slot-tag":e}),g("div",{className:"container"}),g("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:a})]}))},$=t=>a(void 0,void 0,void 0,function*(){const e=new K;yield e.run(t)});export{N as Kilkaya,$ as runKilkaya};
@@ -1 +0,0 @@
1
- import{i as n,_ as e,c as i,l as t,g as o,a as r,b as d,d as l,h as a,e as s,u as c,f as u,A as f,s as v}from"./_auto-entry_svd-BOBXC1NB.js";import{xandrAdLoaded as p,finnBlinkLoaded as m}from"./events-C1VnSaGH.js";import"react/jsx-runtime";n('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const y={Blink:"Blink"},h=new Map,g=n=>{var e;if(!h.has(n)){const e=import(/* webpackIgnore: true */n).then(n=>(n=>{for(const[e,i]of Object.entries(y)){const t=n[e];null!=t&&(window[i]=t)}})(n)).catch(e=>{throw h.delete(n),e});h.set(n,e)}return null!==(e=h.get(n))&&void 0!==e?e:Promise.resolve()},b="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",k=n=>{var e,i;const t=document.querySelector(`[id^="${n}"]`);return null!==(i=null===(e=null==t?void 0:t.dataset)||void 0===e?void 0:e.finnBlinkId)&&void 0!==i?i:n},$=(n,e)=>{const{finnBlink:{enabled:t}={}}=i.get(),o=(null==e?void 0:e.enabled)||(n=>{var e;const i=document.querySelector(`[id^="${n}"]`);return!!(null===(e=null==i?void 0:i.dataset)||void 0===e?void 0:e.noBidAd)})(n);if(!o||!t)return null;const{height:r,requireImage:d,position:l,offset:a}=(null==e?void 0:e.sdkPayload)||{};return{selector:`#${k(n)}`,enabled:o,position:null!=l?l:n,height:null!=r?r:100,offset:null!=a?a:200,requireImage:d,advertoryTheme:null==e?void 0:e.advertoryTheme}},w=(n,a,s)=>e(void 0,void 0,void 0,function*(){const{placements:c,pageContext:{deviceType:u},appearanceConfig:f}=i.get();t(`rendering finn blink ad for ${n}`);const v=o(n),h=c[u].find(n=>n.targetId===v),g=$(n,null==h?void 0:h.finnBlink);if(!(null==g?void 0:g.enabled))return t(`Finn blink is not enabled on placement: ${n}`),s&&s(n),void p(n);if((n=>{var e;const i=k(n),t=document.querySelector(`[id^="${i}"]`);return!!(null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains("finn"))})(n))return void t(`Finn blink already loaded ${n}`);const{publisher:b,countryCode:w,finnBlink:C}=a,{sdkPayload:{channel:x}={}}=null!=C?C:{},I=null!=x?x:`${b}.${w}`,j="dark"===(null==f?void 0:f.theme)?"dark":"light";try{const n=yield r();yield(B=Object.assign(Object.assign({},g),{channel:I,userId:n,theme:j}),e(void 0,void 0,void 0,function*(){const{userId:n,theme:e}=B,i=l(B,["userId","theme"]),t=window[y.Blink];if(!t)return;const o=new t({remote:"https://www.finn.no/distribution-front/external/carousel",userId:n,theme:e});yield o.inject(Object.assign({},i))})),m(g.selector.replace("#",""),g.advertoryTheme)}catch(e){t(`Finn blink error ${e}`),s&&s(n),!s&&d(n),p(n)}var B}),C=()=>e(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{isMobileApp:e,countryCode:o}}=i.get();return!!(yield a(n,e,o,"finn-blink"))||(t("Skip loading finn blink ad due to missing TCF consent."),!1)}),x=(n,o,r,l)=>e(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:e}}=i.get();if(t(`loadFinnBlinkAd: loading finn blink ad for ${n}`),!(yield C())||e)return r&&r(n),p(n),void(!r&&d(n));try{yield g(b)}catch(n){console.error(n)}yield w(n,o,r),l&&l()}),I=(n,e)=>{var i;(t(`Appending ${e.id} after ${n.id}`),n.parentElement&&(i=n.parentElement,!Array.from(i.children).some(n=>n.classList.contains("advertory-finn-blink-wrapper"))))?(n.parentElement.style.display="none",n.parentElement.insertAdjacentElement("afterend",e)):t(`Cannot perform afterend on: ${n.id}`)},j=(n,o)=>e(void 0,void 0,void 0,function*(){var e,r;if(!o)return;const{replacementConfig:d}=o,l=null===(e=null==d?void 0:d.adsToReplace)||void 0===e?void 0:e[n],a=null===(r=null==d?void 0:d.sizes)||void 0===r?void 0:r[n];s()&&l&&a?(yield C())&&(yield g(b),l.forEach(([n,e])=>{const o=document.querySelector(`[id^="${n}"]`);if(!o)return;const r=(n=>{const{siteSpecificConfig:{publisherClassName:e}={}}=i.get(),o=document.createElement("div"),r=document.createElement("div");return r.id=n,o.appendChild(r),u(e,r,f.FINN_BLINK),t(`Creating blink container for: ${n}`),o})(e);(n=>{t(`Hiding old ad container: ${n.id}`),n.style.setProperty("display","none","important")})(o),I(o,r),o.dataset.finnBlinkId=e,c().withFullAdsChain(n)})):t(`Finn blink configuration is incorrect: ${JSON.stringify(d)}`)}),B=n=>document.querySelector(`#${n}`),A=n=>e(void 0,void 0,void 0,function*(){if(!n.length)return;const{appearanceConfig:e,pageContext:{deviceType:t}}=i.get(),o=null==e?void 0:e.defaultThreshold[t];for(const e of n){const{requestThreshold:n,targetId:i}=e,t=B(i);t&&(yield v(t,null!=n?n:o))}});export{A as handleFinnBlinkOnlyPlacements,x as loadFinnBlinkAd,j as replaceAdsWithFinnBlink};
@@ -1 +0,0 @@
1
- import{o as t,w as e,C as n,_ as a,l as r,p as i,P as s,q as o,r as l,h as d,N as c}from"./_auto-entry_svdv2-C-1qQWmF.js";import{jsxs as u,jsx as g}from"react/jsx-runtime";class p{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];const{host:a,pathname:r}=new URL(n);if(!a.includes("www.vg.no")&&!r.includes("annonsorinnhold"))return[n];const i=r.split("/");return i.length?[...i.filter(Boolean).slice(1).map(t=>t),n]:[n]}}class v{getPulseObjectId(){return""}getPulsePageId(t,e){return""}}const h="[data-k5a-teaser-analytics]";class m extends t{constructor(t,e,n,a){super(t,""),this.root=e,this.newsroomStrategy=n,this.pageType=a}getTargetId(){return this.root.id}buildAdObject(){return this.getEventInput("view")}parseKilkayaData(){const t=this.root.querySelector("article");if(!t)return{};const e=t.dataset.k5aTeaserAnalytics;try{return e?JSON.parse(e):{}}catch(t){return{}}}mapPageType(t){var e;return null!==(e={front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[null!=t?t:"front"])&&void 0!==e?e:"Frontpage"}getArticleId(){var t;return null!==(t=location.pathname.split("/").slice(-2,-1).pop())&&void 0!==t?t:""}getPlacementData(){var t,e;const n=this.root.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,secondaryPosition:Number(null==n?void 0:n.dataset.pulseSecondaryposition)||0,slot:null!==(e=null==n?void 0:n.dataset.slotTag)&&void 0!==e?e:""}}getEventTarget(){const{link:t,itemId:e,title:n}=this.parseKilkayaData();return{id:e,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(t){return t.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}waitForAnalyticsData(t){const e=this.root.querySelector(h);if(Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics))return void t();const n=new MutationObserver(()=>{const e=this.root.querySelector(h);Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics)&&(n.disconnect(),t())});n.observe(this.root,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]})}trackLoad(){}trackImpression(){e(this.root,()=>this.waitForAnalyticsData(()=>{var t,e;const n=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:this.parseKilkayaData().placement}});window.dispatchEvent(n);const a=this.getEventInput("view");this.pulse.trackLegacyViewUIElement?this.pulse.trackLegacyViewUIElement(a):this.pulse.trackViewUIElement?this.pulse.trackViewUIElement(a):null===(e=(t=this.pulse).trackElementView)||void 0===e||e.call(t,a)}))}trackEngagement(t){var e,n;const a=this.getEventInput("click");this.pulse.trackLegacyClickUIElement?this.pulse.trackLegacyClickUIElement(a):this.pulse.trackClickUIElement?this.pulse.trackClickUIElement(a):null===(n=(e=this.pulse).trackElementClick)||void 0===n||n.call(e,a)}}class y extends m{getEventBaseData(){var t,e,n,a;const{clientName:r,creativeId:i,itemId:s,placement:o}=this.parseKilkayaData(),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(null!==(e=this.pageType)&&void 0!==e?e:"front",this.getArticleId());return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",position:o,elementType:"Article",custom:{customer:r,creativeId:null!=i?i:s},page:{"@id":null!=g?g:o,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(a=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===a?void 0:a.call(n,this.root)})}getEventInput(t){return{object:this.getEventBaseData(),partnerstudio:this.getEventPartnerstudioData(t),target:this.getEventTarget(),provider:this.getProviderData()}}getEventPartnerstudioData(t){return Object.assign(Object.assign({},this.parseKilkayaData()),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}class k extends m{getEventBaseData(){var t,e;const{title:n="",clientName:a="",creativeId:r="",link:i="",itemId:s=""}=this.parseKilkayaData(),{columnName:o,primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u={publicUrl:i,urlPath:i?new URL(i).pathname:""},{publicUrl:g,urlPath:p}=i&&(null===(e=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===e?void 0:e.call(t,i))||u;return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:n,placement:{columnName:o,primaryPosition:l,secondaryPosition:d,source:c},tags:[a,n,g,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:a,"spt:creativeId":r,pageTitle:n,publicUrl:g,urlPath:p},url:location.origin})}getEventInput(t){return{object:this.getEventBaseData(),target:this.getEventTarget()}}}class f{constructor(t){this.identity=t,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return a(this,void 0,void 0,function*(){var t;try{const e=yield null===(t=this.identity)||void 0===t?void 0:t.getUser();return null!=e?e:null}catch(t){return r("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return a(this,void 0,void 0,function*(){var t,e;return null!==(e=yield null===(t=this.identity)||void 0===t?void 0:t.isLoggedIn())&&void 0!==e&&e})}onIdentityLogout(t){var e;null===(e=this.identity)||void 0===e||e.on("logout",t)}}const b=/^glci_/,I="gender_",P="geo_",w="male",E="female",T=()=>a(void 0,void 0,void 0,function*(){try{const e=yield(t=500,a(void 0,void 0,void 0,function*(){return Promise.race([a(void 0,void 0,void 0,function*(){return yield new Promise(t=>{if("undefined"!=typeof window)if(window.Identity)t(window.Identity);else{const e=()=>{t(window.Identity)};window.addEventListener("identity-initialized",e,{once:!0})}else t(void 0)})}),new Promise(e=>setTimeout(()=>e(void 0),t))])})),n=new f(e),r=yield n.getIdentityUser(),{gender:i}=null!=r?r:{};return i===w||i===E?`${I}${i}`:void 0}catch(t){return}var t}),U=()=>a(void 0,void 0,void 0,function*(){const t=[],e=yield T(),n=(()=>{const t=i().map(t=>`${P}${t.replace(b,"")}`);return Array.from(new Set(t))})();return e&&t.push(e),n&&t.push(...n),t});class S{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${e}`}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:a}=new URL(n),r=a.split("/").filter(Boolean);return r.length?[...r.slice(1),n]:[n]}}class A{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class L{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class j{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class O{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.svd.se"===e?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${e}`}}class D{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.aftonbladet.se"===e?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class K{handleKilkayaStreamTracking({pulse:t,pageContext:{pageType:e,publisher:a,countryCode:r}}){if(!(null==t?void 0:t.instance))return;const i={[c.VG]:new p,[c.E24]:new S,"no-aftenposten":new A,[c.BT]:new L,"no-bergenstidende":new L,[c.SA]:new j,"no-stavangeraftenblad":new j,[c.SVD]:new O,[c.AFTONBLADET]:new D}[a]||new v;((t,e,a,r)=>{const i=document.querySelectorAll("k5a-stream");i.length&&i.forEach(i=>{const s=r===n.SE?new k(t,i,e):new y(t,i,e,a);s.trackImpression(),i.addEventListener("click",()=>s.trackEngagement())})})(t.instance,i,e,r)}injectKilkayaMeta(t){return a(this,void 0,void 0,function*(){const e=document.createElement("script"),n=yield U();e.textContent=`var k5aMeta = { consent: ${t}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(e)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",t=>{var e;const n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.streamSlot;if(r(`Kilkaya event for slot: ${n}`),!n)return void r("Kilkaya slot empty, Xandr backfill won't be loaded");const a=n.parentElement;a?(r(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(a)):r("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(t){var e;const n=t.querySelector(".fallback");if(!n)return;n.style.display="flex";const a=null!==(e=n.dataset.fallbackTargetId)&&void 0!==e?e:"";o(a)}loadKilkayaScript(t){return a(this,void 0,void 0,function*(){yield l(t)})}run(t){return a(this,void 0,void 0,function*(){var e,n;const{tcf:a,pageContext:{isMobileApp:r,countryCode:i},kilkaya:s}=t;if(!(null==s?void 0:s.enabled))return;const o=yield d(a,r,i,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(o),yield this.loadKilkayaScript(null!==(n=null===(e=s.options)||void 0===e?void 0:e.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(t)})}}const N=({placementName:t,slotTag:e,fallbackTargetId:n,children:a,pulseData:r,htmlAttributes:i})=>{const s=(t,e)=>{const n={};if(!t)return n;for(const[a,r]of Object.entries(t)){n[e?`${e}-${a}`:a]=String(r)}return n},o=s(r,"data-pulse"),l=s(i,"data");return u("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"},"data-slot-tag":e},o,l,{children:[g("div",{className:"inscreen-target"}),g("k5a-stream",{name:t,"slot-tag":e}),g("div",{className:"container"}),g("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:a})]}))},$=t=>a(void 0,void 0,void 0,function*(){const e=new K;yield e.run(t)});export{N as Kilkaya,$ as runKilkaya};
@@ -1 +0,0 @@
1
- import{i as n,_ as e,c as i,l as t,g as o,a as r,b as d,d as l,h as a,e as s,u as c,f as u,A as f,s as v}from"./_auto-entry_svdv2-C-1qQWmF.js";import{xandrAdLoaded as p,finnBlinkLoaded as m}from"./events-Dd2yn2PL.js";import"react/jsx-runtime";n('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const y={Blink:"Blink"},h=new Map,g=n=>{var e;if(!h.has(n)){const e=import(/* webpackIgnore: true */n).then(n=>(n=>{for(const[e,i]of Object.entries(y)){const t=n[e];null!=t&&(window[i]=t)}})(n)).catch(e=>{throw h.delete(n),e});h.set(n,e)}return null!==(e=h.get(n))&&void 0!==e?e:Promise.resolve()},b="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",k=n=>{var e,i;const t=document.querySelector(`[id^="${n}"]`);return null!==(i=null===(e=null==t?void 0:t.dataset)||void 0===e?void 0:e.finnBlinkId)&&void 0!==i?i:n},$=(n,e)=>{const{finnBlink:{enabled:t}={}}=i.get(),o=(null==e?void 0:e.enabled)||(n=>{var e;const i=document.querySelector(`[id^="${n}"]`);return!!(null===(e=null==i?void 0:i.dataset)||void 0===e?void 0:e.noBidAd)})(n);if(!o||!t)return null;const{height:r,requireImage:d,position:l,offset:a}=(null==e?void 0:e.sdkPayload)||{};return{selector:`#${k(n)}`,enabled:o,position:null!=l?l:n,height:null!=r?r:100,offset:null!=a?a:200,requireImage:d,advertoryTheme:null==e?void 0:e.advertoryTheme}},w=(n,a,s)=>e(void 0,void 0,void 0,function*(){const{placements:c,pageContext:{deviceType:u},appearanceConfig:f}=i.get();t(`rendering finn blink ad for ${n}`);const v=o(n),h=c[u].find(n=>n.targetId===v),g=$(n,null==h?void 0:h.finnBlink);if(!(null==g?void 0:g.enabled))return t(`Finn blink is not enabled on placement: ${n}`),s&&s(n),void p(n);if((n=>{var e;const i=k(n),t=document.querySelector(`[id^="${i}"]`);return!!(null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains("finn"))})(n))return void t(`Finn blink already loaded ${n}`);const{publisher:b,countryCode:w,finnBlink:C}=a,{sdkPayload:{channel:x}={}}=null!=C?C:{},I=null!=x?x:`${b}.${w}`,j="dark"===(null==f?void 0:f.theme)?"dark":"light";try{const n=yield r();yield(B=Object.assign(Object.assign({},g),{channel:I,userId:n,theme:j}),e(void 0,void 0,void 0,function*(){const{userId:n,theme:e}=B,i=l(B,["userId","theme"]),t=window[y.Blink];if(!t)return;const o=new t({remote:"https://www.finn.no/distribution-front/external/carousel",userId:n,theme:e});yield o.inject(Object.assign({},i))})),m(g.selector.replace("#",""),g.advertoryTheme)}catch(e){t(`Finn blink error ${e}`),s&&s(n),!s&&d(n),p(n)}var B}),C=()=>e(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{isMobileApp:e,countryCode:o}}=i.get();return!!(yield a(n,e,o,"finn-blink"))||(t("Skip loading finn blink ad due to missing TCF consent."),!1)}),x=(n,o,r,l)=>e(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:e}}=i.get();if(t(`loadFinnBlinkAd: loading finn blink ad for ${n}`),!(yield C())||e)return r&&r(n),p(n),void(!r&&d(n));try{yield g(b)}catch(n){console.error(n)}yield w(n,o,r),l&&l()}),I=(n,e)=>{var i;(t(`Appending ${e.id} after ${n.id}`),n.parentElement&&(i=n.parentElement,!Array.from(i.children).some(n=>n.classList.contains("advertory-finn-blink-wrapper"))))?(n.parentElement.style.display="none",n.parentElement.insertAdjacentElement("afterend",e)):t(`Cannot perform afterend on: ${n.id}`)},j=(n,o)=>e(void 0,void 0,void 0,function*(){var e,r;if(!o)return;const{replacementConfig:d}=o,l=null===(e=null==d?void 0:d.adsToReplace)||void 0===e?void 0:e[n],a=null===(r=null==d?void 0:d.sizes)||void 0===r?void 0:r[n];s()&&l&&a?(yield C())&&(yield g(b),l.forEach(([n,e])=>{const o=document.querySelector(`[id^="${n}"]`);if(!o)return;const r=(n=>{const{siteSpecificConfig:{publisherClassName:e}={}}=i.get(),o=document.createElement("div"),r=document.createElement("div");return r.id=n,o.appendChild(r),u(e,r,f.FINN_BLINK),t(`Creating blink container for: ${n}`),o})(e);(n=>{t(`Hiding old ad container: ${n.id}`),n.style.setProperty("display","none","important")})(o),I(o,r),o.dataset.finnBlinkId=e,c().withFullAdsChain(n)})):t(`Finn blink configuration is incorrect: ${JSON.stringify(d)}`)}),B=n=>document.querySelector(`#${n}`),A=n=>e(void 0,void 0,void 0,function*(){if(!n.length)return;const{appearanceConfig:e,pageContext:{deviceType:t}}=i.get(),o=null==e?void 0:e.defaultThreshold[t];for(const e of n){const{requestThreshold:n,targetId:i}=e,t=B(i);t&&(yield v(t,null!=n?n:o))}});export{A as handleFinnBlinkOnlyPlacements,x as loadFinnBlinkAd,j as replaceAdsWithFinnBlink};
@@ -1 +0,0 @@
1
- import{o as t,w as e,C as n,_ as a,l as r,p as i,P as s,q as o,r as l,h as d,N as c}from"./_auto-entry_tv4-DrT58fo2.js";import{jsxs as u,jsx as g}from"react/jsx-runtime";class p{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];const{host:a,pathname:r}=new URL(n);if(!a.includes("www.vg.no")&&!r.includes("annonsorinnhold"))return[n];const i=r.split("/");return i.length?[...i.filter(Boolean).slice(1).map(t=>t),n]:[n]}}class v{getPulseObjectId(){return""}getPulsePageId(t,e){return""}}const h="[data-k5a-teaser-analytics]";class m extends t{constructor(t,e,n,a){super(t,""),this.root=e,this.newsroomStrategy=n,this.pageType=a}getTargetId(){return this.root.id}buildAdObject(){return this.getEventInput("view")}parseKilkayaData(){const t=this.root.querySelector("article");if(!t)return{};const e=t.dataset.k5aTeaserAnalytics;try{return e?JSON.parse(e):{}}catch(t){return{}}}mapPageType(t){var e;return null!==(e={front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[null!=t?t:"front"])&&void 0!==e?e:"Frontpage"}getArticleId(){var t;return null!==(t=location.pathname.split("/").slice(-2,-1).pop())&&void 0!==t?t:""}getPlacementData(){var t,e;const n=this.root.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,secondaryPosition:Number(null==n?void 0:n.dataset.pulseSecondaryposition)||0,slot:null!==(e=null==n?void 0:n.dataset.slotTag)&&void 0!==e?e:""}}getEventTarget(){const{link:t,itemId:e,title:n}=this.parseKilkayaData();return{id:e,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(t){return t.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}waitForAnalyticsData(t){const e=this.root.querySelector(h);if(Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics))return void t();const n=new MutationObserver(()=>{const e=this.root.querySelector(h);Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics)&&(n.disconnect(),t())});n.observe(this.root,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]})}trackLoad(){}trackImpression(){e(this.root,()=>this.waitForAnalyticsData(()=>{var t,e;const n=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:this.parseKilkayaData().placement}});window.dispatchEvent(n);const a=this.getEventInput("view");this.pulse.trackLegacyViewUIElement?this.pulse.trackLegacyViewUIElement(a):this.pulse.trackViewUIElement?this.pulse.trackViewUIElement(a):null===(e=(t=this.pulse).trackElementView)||void 0===e||e.call(t,a)}))}trackEngagement(t){var e,n;const a=this.getEventInput("click");this.pulse.trackLegacyClickUIElement?this.pulse.trackLegacyClickUIElement(a):this.pulse.trackClickUIElement?this.pulse.trackClickUIElement(a):null===(n=(e=this.pulse).trackElementClick)||void 0===n||n.call(e,a)}}class y extends m{getEventBaseData(){var t,e,n,a;const{clientName:r,creativeId:i,itemId:s,placement:o}=this.parseKilkayaData(),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(null!==(e=this.pageType)&&void 0!==e?e:"front",this.getArticleId());return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",position:o,elementType:"Article",custom:{customer:r,creativeId:null!=i?i:s},page:{"@id":null!=g?g:o,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(a=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===a?void 0:a.call(n,this.root)})}getEventInput(t){return{object:this.getEventBaseData(),partnerstudio:this.getEventPartnerstudioData(t),target:this.getEventTarget(),provider:this.getProviderData()}}getEventPartnerstudioData(t){return Object.assign(Object.assign({},this.parseKilkayaData()),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}class k extends m{getEventBaseData(){var t,e;const{title:n="",clientName:a="",creativeId:r="",link:i="",itemId:s=""}=this.parseKilkayaData(),{columnName:o,primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u={publicUrl:i,urlPath:i?new URL(i).pathname:""},{publicUrl:g,urlPath:p}=i&&(null===(e=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===e?void 0:e.call(t,i))||u;return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:n,placement:{columnName:o,primaryPosition:l,secondaryPosition:d,source:c},tags:[a,n,g,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:a,"spt:creativeId":r,pageTitle:n,publicUrl:g,urlPath:p},url:location.origin})}getEventInput(t){return{object:this.getEventBaseData(),target:this.getEventTarget()}}}class f{constructor(t){this.identity=t,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return a(this,void 0,void 0,function*(){var t;try{const e=yield null===(t=this.identity)||void 0===t?void 0:t.getUser();return null!=e?e:null}catch(t){return r("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return a(this,void 0,void 0,function*(){var t,e;return null!==(e=yield null===(t=this.identity)||void 0===t?void 0:t.isLoggedIn())&&void 0!==e&&e})}onIdentityLogout(t){var e;null===(e=this.identity)||void 0===e||e.on("logout",t)}}const b=/^glci_/,I="gender_",P="geo_",w="male",E="female",T=()=>a(void 0,void 0,void 0,function*(){try{const e=yield(t=500,a(void 0,void 0,void 0,function*(){return Promise.race([a(void 0,void 0,void 0,function*(){return yield new Promise(t=>{if("undefined"!=typeof window)if(window.Identity)t(window.Identity);else{const e=()=>{t(window.Identity)};window.addEventListener("identity-initialized",e,{once:!0})}else t(void 0)})}),new Promise(e=>setTimeout(()=>e(void 0),t))])})),n=new f(e),r=yield n.getIdentityUser(),{gender:i}=null!=r?r:{};return i===w||i===E?`${I}${i}`:void 0}catch(t){return}var t}),U=()=>a(void 0,void 0,void 0,function*(){const t=[],e=yield T(),n=(()=>{const t=i().map(t=>`${P}${t.replace(b,"")}`);return Array.from(new Set(t))})();return e&&t.push(e),n&&t.push(...n),t});class S{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${e}`}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:a}=new URL(n),r=a.split("/").filter(Boolean);return r.length?[...r.slice(1),n]:[n]}}class A{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class L{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class j{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class O{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.svd.se"===e?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${e}`}}class D{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.aftonbladet.se"===e?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class K{handleKilkayaStreamTracking({pulse:t,pageContext:{pageType:e,publisher:a,countryCode:r}}){if(!(null==t?void 0:t.instance))return;const i={[c.VG]:new p,[c.E24]:new S,"no-aftenposten":new A,[c.BT]:new L,"no-bergenstidende":new L,[c.SA]:new j,"no-stavangeraftenblad":new j,[c.SVD]:new O,[c.AFTONBLADET]:new D}[a]||new v;((t,e,a,r)=>{const i=document.querySelectorAll("k5a-stream");i.length&&i.forEach(i=>{const s=r===n.SE?new k(t,i,e):new y(t,i,e,a);s.trackImpression(),i.addEventListener("click",()=>s.trackEngagement())})})(t.instance,i,e,r)}injectKilkayaMeta(t){return a(this,void 0,void 0,function*(){const e=document.createElement("script"),n=yield U();e.textContent=`var k5aMeta = { consent: ${t}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(e)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",t=>{var e;const n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.streamSlot;if(r(`Kilkaya event for slot: ${n}`),!n)return void r("Kilkaya slot empty, Xandr backfill won't be loaded");const a=n.parentElement;a?(r(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(a)):r("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(t){var e;const n=t.querySelector(".fallback");if(!n)return;n.style.display="flex";const a=null!==(e=n.dataset.fallbackTargetId)&&void 0!==e?e:"";o(a)}loadKilkayaScript(t){return a(this,void 0,void 0,function*(){yield l(t)})}run(t){return a(this,void 0,void 0,function*(){var e,n;const{tcf:a,pageContext:{isMobileApp:r,countryCode:i},kilkaya:s}=t;if(!(null==s?void 0:s.enabled))return;const o=yield d(a,r,i,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(o),yield this.loadKilkayaScript(null!==(n=null===(e=s.options)||void 0===e?void 0:e.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(t)})}}const N=({placementName:t,slotTag:e,fallbackTargetId:n,children:a,pulseData:r,htmlAttributes:i})=>{const s=(t,e)=>{const n={};if(!t)return n;for(const[a,r]of Object.entries(t)){n[e?`${e}-${a}`:a]=String(r)}return n},o=s(r,"data-pulse"),l=s(i,"data");return u("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"},"data-slot-tag":e},o,l,{children:[g("div",{className:"inscreen-target"}),g("k5a-stream",{name:t,"slot-tag":e}),g("div",{className:"container"}),g("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:a})]}))},$=t=>a(void 0,void 0,void 0,function*(){const e=new K;yield e.run(t)});export{N as Kilkaya,$ as runKilkaya};
@@ -1 +0,0 @@
1
- import{i as n,_ as e,c as i,l as t,g as o,a as r,b as d,d as l,h as a,e as s,u as c,f as u,A as f,s as v}from"./_auto-entry_tv4-DrT58fo2.js";import{xandrAdLoaded as p,finnBlinkLoaded as m}from"./events-CA_qpiiH.js";import"react/jsx-runtime";n('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const y={Blink:"Blink"},h=new Map,g=n=>{var e;if(!h.has(n)){const e=import(/* webpackIgnore: true */n).then(n=>(n=>{for(const[e,i]of Object.entries(y)){const t=n[e];null!=t&&(window[i]=t)}})(n)).catch(e=>{throw h.delete(n),e});h.set(n,e)}return null!==(e=h.get(n))&&void 0!==e?e:Promise.resolve()},b="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",k=n=>{var e,i;const t=document.querySelector(`[id^="${n}"]`);return null!==(i=null===(e=null==t?void 0:t.dataset)||void 0===e?void 0:e.finnBlinkId)&&void 0!==i?i:n},$=(n,e)=>{const{finnBlink:{enabled:t}={}}=i.get(),o=(null==e?void 0:e.enabled)||(n=>{var e;const i=document.querySelector(`[id^="${n}"]`);return!!(null===(e=null==i?void 0:i.dataset)||void 0===e?void 0:e.noBidAd)})(n);if(!o||!t)return null;const{height:r,requireImage:d,position:l,offset:a}=(null==e?void 0:e.sdkPayload)||{};return{selector:`#${k(n)}`,enabled:o,position:null!=l?l:n,height:null!=r?r:100,offset:null!=a?a:200,requireImage:d,advertoryTheme:null==e?void 0:e.advertoryTheme}},w=(n,a,s)=>e(void 0,void 0,void 0,function*(){const{placements:c,pageContext:{deviceType:u},appearanceConfig:f}=i.get();t(`rendering finn blink ad for ${n}`);const v=o(n),h=c[u].find(n=>n.targetId===v),g=$(n,null==h?void 0:h.finnBlink);if(!(null==g?void 0:g.enabled))return t(`Finn blink is not enabled on placement: ${n}`),s&&s(n),void p(n);if((n=>{var e;const i=k(n),t=document.querySelector(`[id^="${i}"]`);return!!(null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains("finn"))})(n))return void t(`Finn blink already loaded ${n}`);const{publisher:b,countryCode:w,finnBlink:C}=a,{sdkPayload:{channel:x}={}}=null!=C?C:{},I=null!=x?x:`${b}.${w}`,j="dark"===(null==f?void 0:f.theme)?"dark":"light";try{const n=yield r();yield(B=Object.assign(Object.assign({},g),{channel:I,userId:n,theme:j}),e(void 0,void 0,void 0,function*(){const{userId:n,theme:e}=B,i=l(B,["userId","theme"]),t=window[y.Blink];if(!t)return;const o=new t({remote:"https://www.finn.no/distribution-front/external/carousel",userId:n,theme:e});yield o.inject(Object.assign({},i))})),m(g.selector.replace("#",""),g.advertoryTheme)}catch(e){t(`Finn blink error ${e}`),s&&s(n),!s&&d(n),p(n)}var B}),C=()=>e(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{isMobileApp:e,countryCode:o}}=i.get();return!!(yield a(n,e,o,"finn-blink"))||(t("Skip loading finn blink ad due to missing TCF consent."),!1)}),x=(n,o,r,l)=>e(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:e}}=i.get();if(t(`loadFinnBlinkAd: loading finn blink ad for ${n}`),!(yield C())||e)return r&&r(n),p(n),void(!r&&d(n));try{yield g(b)}catch(n){console.error(n)}yield w(n,o,r),l&&l()}),I=(n,e)=>{var i;(t(`Appending ${e.id} after ${n.id}`),n.parentElement&&(i=n.parentElement,!Array.from(i.children).some(n=>n.classList.contains("advertory-finn-blink-wrapper"))))?(n.parentElement.style.display="none",n.parentElement.insertAdjacentElement("afterend",e)):t(`Cannot perform afterend on: ${n.id}`)},j=(n,o)=>e(void 0,void 0,void 0,function*(){var e,r;if(!o)return;const{replacementConfig:d}=o,l=null===(e=null==d?void 0:d.adsToReplace)||void 0===e?void 0:e[n],a=null===(r=null==d?void 0:d.sizes)||void 0===r?void 0:r[n];s()&&l&&a?(yield C())&&(yield g(b),l.forEach(([n,e])=>{const o=document.querySelector(`[id^="${n}"]`);if(!o)return;const r=(n=>{const{siteSpecificConfig:{publisherClassName:e}={}}=i.get(),o=document.createElement("div"),r=document.createElement("div");return r.id=n,o.appendChild(r),u(e,r,f.FINN_BLINK),t(`Creating blink container for: ${n}`),o})(e);(n=>{t(`Hiding old ad container: ${n.id}`),n.style.setProperty("display","none","important")})(o),I(o,r),o.dataset.finnBlinkId=e,c().withFullAdsChain(n)})):t(`Finn blink configuration is incorrect: ${JSON.stringify(d)}`)}),B=n=>document.querySelector(`#${n}`),A=n=>e(void 0,void 0,void 0,function*(){if(!n.length)return;const{appearanceConfig:e,pageContext:{deviceType:t}}=i.get(),o=null==e?void 0:e.defaultThreshold[t];for(const e of n){const{requestThreshold:n,targetId:i}=e,t=B(i);t&&(yield v(t,null!=n?n:o))}});export{A as handleFinnBlinkOnlyPlacements,x as loadFinnBlinkAd,j as replaceAdsWithFinnBlink};
@@ -1 +0,0 @@
1
- import{o as t,w as e,C as n,_ as a,l as r,p as i,P as s,q as o,r as l,h as d,N as c}from"./_auto-entry_tvnu-BN6qNwOY.js";import{jsxs as u,jsx as g}from"react/jsx-runtime";class p{getPulseObjectId(){return"sdrn:vg:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:vg:frontpage:front"}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];const{host:a,pathname:r}=new URL(n);if(!a.includes("www.vg.no")&&!r.includes("annonsorinnhold"))return[n];const i=r.split("/");return i.length?[...i.filter(Boolean).slice(1).map(t=>t),n]:[n]}}class v{getPulseObjectId(){return""}getPulsePageId(t,e){return""}}const h="[data-k5a-teaser-analytics]";class m extends t{constructor(t,e,n,a){super(t,""),this.root=e,this.newsroomStrategy=n,this.pageType=a}getTargetId(){return this.root.id}buildAdObject(){return this.getEventInput("view")}parseKilkayaData(){const t=this.root.querySelector("article");if(!t)return{};const e=t.dataset.k5aTeaserAnalytics;try{return e?JSON.parse(e):{}}catch(t){return{}}}mapPageType(t){var e;return null!==(e={front:"Frontpage",article:"Article",section:"Article",collection:"Article",other:"Article"}[null!=t?t:"front"])&&void 0!==e?e:"Frontpage"}getArticleId(){var t;return null!==(t=location.pathname.split("/").slice(-2,-1).pop())&&void 0!==t?t:""}getPlacementData(){var t,e;const n=this.root.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,secondaryPosition:Number(null==n?void 0:n.dataset.pulseSecondaryposition)||0,slot:null!==(e=null==n?void 0:n.dataset.slotTag)&&void 0!==e?e:""}}getEventTarget(){const{link:t,itemId:e,title:n}=this.parseKilkayaData();return{id:e,name:this.normalizePlacementTitle(null!=n?n:""),type:"Page",url:t}}normalizePlacementTitle(t){return t.replace(/<[^>]+>/gi,"").replace(/[^a-z0-9æøå\s_-]/gi,"")}waitForAnalyticsData(t){const e=this.root.querySelector(h);if(Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics))return void t();const n=new MutationObserver(()=>{const e=this.root.querySelector(h);Boolean(null==e?void 0:e.dataset.k5aTeaserAnalytics)&&(n.disconnect(),t())});n.observe(this.root,{attributes:!0,childList:!0,subtree:!0,attributeFilter:["data-k5a-teaser-analytics"]})}trackLoad(){}trackImpression(){e(this.root,()=>this.waitForAnalyticsData(()=>{var t,e;const n=new CustomEvent("advertory:partnerstudioAdImpression",{detail:{ad:this.parseKilkayaData().placement}});window.dispatchEvent(n);const a=this.getEventInput("view");this.pulse.trackLegacyViewUIElement?this.pulse.trackLegacyViewUIElement(a):this.pulse.trackViewUIElement?this.pulse.trackViewUIElement(a):null===(e=(t=this.pulse).trackElementView)||void 0===e||e.call(t,a)}))}trackEngagement(t){var e,n;const a=this.getEventInput("click");this.pulse.trackLegacyClickUIElement?this.pulse.trackLegacyClickUIElement(a):this.pulse.trackClickUIElement?this.pulse.trackClickUIElement(a):null===(n=(e=this.pulse).trackElementClick)||void 0===n||n.call(e,a)}}class y extends m{getEventBaseData(){var t,e,n,a;const{clientName:r,creativeId:i,itemId:s,placement:o}=this.parseKilkayaData(),{primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u=this.mapPageType(this.pageType),g=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.getPulsePageId(null!==(e=this.pageType)&&void 0!==e?e:"front",this.getArticleId());return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",position:o,elementType:"Article",custom:{customer:r,creativeId:null!=i?i:s},page:{"@id":null!=g?g:o,"@type":u,url:location.origin},placement:{primaryPosition:l,secondaryPosition:d,source:c},tags:null===(a=null===(n=this.newsroomStrategy)||void 0===n?void 0:n.getTags)||void 0===a?void 0:a.call(n,this.root)})}getEventInput(t){return{object:this.getEventBaseData(),partnerstudio:this.getEventPartnerstudioData(t),target:this.getEventTarget(),provider:this.getProviderData()}}getEventPartnerstudioData(t){return Object.assign(Object.assign({},this.parseKilkayaData()),{type:t,tracking_type:"ad",xandrAdLoaded:!1})}getProviderData(){return{productTag:"partnerstudio"}}}class k extends m{getEventBaseData(){var t,e;const{title:n="",clientName:a="",creativeId:r="",link:i="",itemId:s=""}=this.parseKilkayaData(),{columnName:o,primaryPosition:l,secondaryPosition:d,slot:c}=this.getPlacementData(),u={publicUrl:i,urlPath:i?new URL(i).pathname:""},{publicUrl:g,urlPath:p}=i&&(null===(e=null===(t=this.newsroomStrategy)||void 0===t?void 0:t.transformUrl)||void 0===e?void 0:e.call(t,i))||u;return Object.assign(Object.assign({},s&&{"@id":`sdrn:kilkaya:teaser:${s}`}),{"@type":"UIElement",elementType:"Teaser",layout:{elementSize:"large",imageUrl:"",name:"large"},name:n,placement:{columnName:o,primaryPosition:l,secondaryPosition:d,source:c},tags:[a,n,g,p].filter(Boolean),"spt:custom":{is_sponsored:!0,sponsor:a,"spt:creativeId":r,pageTitle:n,publicUrl:g,urlPath:p},url:location.origin})}getEventInput(t){return{object:this.getEventBaseData(),target:this.getEventTarget()}}}class f{constructor(t){this.identity=t,this.getIdentityUser=this.getIdentityUser.bind(this),this.isUserLoggedIn=this.isUserLoggedIn.bind(this),this.onIdentityLogout=this.onIdentityLogout.bind(this)}getIdentityUser(){return a(this,void 0,void 0,function*(){var t;try{const e=yield null===(t=this.identity)||void 0===t?void 0:t.getUser();return null!=e?e:null}catch(t){return r("[Privacy Broker] User is not logged in."),null}})}isUserLoggedIn(){return a(this,void 0,void 0,function*(){var t,e;return null!==(e=yield null===(t=this.identity)||void 0===t?void 0:t.isLoggedIn())&&void 0!==e&&e})}onIdentityLogout(t){var e;null===(e=this.identity)||void 0===e||e.on("logout",t)}}const b=/^glci_/,I="gender_",P="geo_",w="male",E="female",T=()=>a(void 0,void 0,void 0,function*(){try{const e=yield(t=500,a(void 0,void 0,void 0,function*(){return Promise.race([a(void 0,void 0,void 0,function*(){return yield new Promise(t=>{if("undefined"!=typeof window)if(window.Identity)t(window.Identity);else{const e=()=>{t(window.Identity)};window.addEventListener("identity-initialized",e,{once:!0})}else t(void 0)})}),new Promise(e=>setTimeout(()=>e(void 0),t))])})),n=new f(e),r=yield n.getIdentityUser(),{gender:i}=null!=r?r:{};return i===w||i===E?`${I}${i}`:void 0}catch(t){return}var t}),U=()=>a(void 0,void 0,void 0,function*(){const t=[],e=yield T(),n=(()=>{const t=i().map(t=>`${P}${t.replace(b,"")}`);return Array.from(new Set(t))})();return e&&t.push(e),n&&t.push(...n),t});class S{getPulseObjectId(){return"sdrn:e24:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:e24:frontpage:front":`sdrn:e24:article:${e}`}getTags(t){var e;let n;if(n=t instanceof HTMLAnchorElement?t.href:null===(e=null==t?void 0:t.querySelector("a"))||void 0===e?void 0:e.href,!n)return[];if(!n.includes("https://e24.no/annonsorinnhold/"))return[n];const{pathname:a}=new URL(n),r=a.split("/").filter(Boolean);return r.length?[...r.slice(1),n]:[n]}}class A{getPulseObjectId(){return"sdrn:aftenposten:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:aftenposten:frontpage:Frontpage"}}class L{getPulseObjectId(){return"sdrn:bt:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:bt:frontpage:Frontpage"}}class j{getPulseObjectId(){return"sdrn:stavangeraftenblad:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(){return"sdrn:stavangeraftenblad:frontpage:Frontpage"}}class O{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.svd.se"===e?{publicUrl:`https://svd.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return"sdrn:svdse:content:partnerstudio:element:partnerstudio:stats"}getPulsePageId(t,e){return t===s.FRONT?"sdrn:svdse:frontpage:front":`sdrn:svdse:article:${e}`}}class D{transformUrl(t){const{hostname:e,pathname:n}=new URL(t);return"brand-studio.aftonbladet.se"===e?{publicUrl:`https://aftonbladet.se/brand-studio${n}`,urlPath:`/brand-studio${n}`}:{publicUrl:t,urlPath:n}}getPulseObjectId(){return""}getPulsePageId(){return""}}class K{handleKilkayaStreamTracking({pulse:t,pageContext:{pageType:e,publisher:a,countryCode:r}}){if(!(null==t?void 0:t.instance))return;const i={[c.VG]:new p,[c.E24]:new S,"no-aftenposten":new A,[c.BT]:new L,"no-bergenstidende":new L,[c.SA]:new j,"no-stavangeraftenblad":new j,[c.SVD]:new O,[c.AFTONBLADET]:new D}[a]||new v;((t,e,a,r)=>{const i=document.querySelectorAll("k5a-stream");i.length&&i.forEach(i=>{const s=r===n.SE?new k(t,i,e):new y(t,i,e,a);s.trackImpression(),i.addEventListener("click",()=>s.trackEngagement())})})(t.instance,i,e,r)}injectKilkayaMeta(t){return a(this,void 0,void 0,function*(){const e=document.createElement("script"),n=yield U();e.textContent=`var k5aMeta = { consent: ${t}, cntTag: ${JSON.stringify(n)} };`,document.head.appendChild(e)})}observeForKilkayaBackfills(){document.addEventListener("K5A:EmptyStreamSlot",t=>{var e;const n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.streamSlot;if(r(`Kilkaya event for slot: ${n}`),!n)return void r("Kilkaya slot empty, Xandr backfill won't be loaded");const a=n.parentElement;a?(r(`Kilkaya placement ${n.getAttribute("name")} has not been loaded, loading Xandr backfill`),this.showBackfill(a)):r("Kilkaya parent slot empty, Xandr backfill won't be loaded")})}showBackfill(t){var e;const n=t.querySelector(".fallback");if(!n)return;n.style.display="flex";const a=null!==(e=n.dataset.fallbackTargetId)&&void 0!==e?e:"";o(a)}loadKilkayaScript(t){return a(this,void 0,void 0,function*(){yield l(t)})}run(t){return a(this,void 0,void 0,function*(){var e,n;const{tcf:a,pageContext:{isMobileApp:r,countryCode:i},kilkaya:s}=t;if(!(null==s?void 0:s.enabled))return;const o=yield d(a,r,i,"kilkaya");this.observeForKilkayaBackfills(),yield this.injectKilkayaMeta(o),yield this.loadKilkayaScript(null!==(n=null===(e=s.options)||void 0===e?void 0:e.kilkayaUrl)&&void 0!==n?n:""),this.handleKilkayaStreamTracking(t)})}}const N=({placementName:t,slotTag:e,fallbackTargetId:n,children:a,pulseData:r,htmlAttributes:i})=>{const s=(t,e)=>{const n={};if(!t)return n;for(const[a,r]of Object.entries(t)){n[e?`${e}-${a}`:a]=String(r)}return n},o=s(r,"data-pulse"),l=s(i,"data");return u("div",Object.assign({className:"kilkaya-wrapper kilkaya-lock-height",style:{width:"100%"},"data-slot-tag":e},o,l,{children:[g("div",{className:"inscreen-target"}),g("k5a-stream",{name:t,"slot-tag":e}),g("div",{className:"container"}),g("div",{className:"fallback","data-fallback-target-id":n,style:{display:"none"},children:a})]}))},$=t=>a(void 0,void 0,void 0,function*(){const e=new K;yield e.run(t)});export{N as Kilkaya,$ as runKilkaya};
@@ -1 +0,0 @@
1
- import{i as n,_ as e,c as i,l as t,g as o,a as r,b as d,d as l,h as a,e as s,u as c,f as u,A as f,s as v}from"./_auto-entry_tvnu-BN6qNwOY.js";import{xandrAdLoaded as p,finnBlinkLoaded as m}from"./events-Dn2KJr0j.js";import"react/jsx-runtime";n('.advertory-finn-blink-wrapper{height:100%;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink-wrapper:not(.brandboard-container){width:100%;margin-inline:auto}.advertory-finn-blink{width:100%;height:500px;max-width:580px;display:flex !important;align-items:center;justify-content:center}.advertory-finn-blink::before{content:"" !important}.advertory-finn-blink iframe{max-width:100%}');const y={Blink:"Blink"},h=new Map,g=n=>{var e;if(!h.has(n)){const e=import(/* webpackIgnore: true */n).then(n=>(n=>{for(const[e,i]of Object.entries(y)){const t=n[e];null!=t&&(window[i]=t)}})(n)).catch(e=>{throw h.delete(n),e});h.set(n,e)}return null!==(e=h.get(n))&&void 0!==e?e:Promise.resolve()},b="https://assets.finn.no/pkg/distribution-fixed/v1/FINNExternalDistribution.modern.js",k=n=>{var e,i;const t=document.querySelector(`[id^="${n}"]`);return null!==(i=null===(e=null==t?void 0:t.dataset)||void 0===e?void 0:e.finnBlinkId)&&void 0!==i?i:n},$=(n,e)=>{const{finnBlink:{enabled:t}={}}=i.get(),o=(null==e?void 0:e.enabled)||(n=>{var e;const i=document.querySelector(`[id^="${n}"]`);return!!(null===(e=null==i?void 0:i.dataset)||void 0===e?void 0:e.noBidAd)})(n);if(!o||!t)return null;const{height:r,requireImage:d,position:l,offset:a}=(null==e?void 0:e.sdkPayload)||{};return{selector:`#${k(n)}`,enabled:o,position:null!=l?l:n,height:null!=r?r:100,offset:null!=a?a:200,requireImage:d,advertoryTheme:null==e?void 0:e.advertoryTheme}},w=(n,a,s)=>e(void 0,void 0,void 0,function*(){const{placements:c,pageContext:{deviceType:u},appearanceConfig:f}=i.get();t(`rendering finn blink ad for ${n}`);const v=o(n),h=c[u].find(n=>n.targetId===v),g=$(n,null==h?void 0:h.finnBlink);if(!(null==g?void 0:g.enabled))return t(`Finn blink is not enabled on placement: ${n}`),s&&s(n),void p(n);if((n=>{var e;const i=k(n),t=document.querySelector(`[id^="${i}"]`);return!!(null===(e=null==t?void 0:t.classList)||void 0===e?void 0:e.contains("finn"))})(n))return void t(`Finn blink already loaded ${n}`);const{publisher:b,countryCode:w,finnBlink:C}=a,{sdkPayload:{channel:x}={}}=null!=C?C:{},I=null!=x?x:`${b}.${w}`,j="dark"===(null==f?void 0:f.theme)?"dark":"light";try{const n=yield r();yield(B=Object.assign(Object.assign({},g),{channel:I,userId:n,theme:j}),e(void 0,void 0,void 0,function*(){const{userId:n,theme:e}=B,i=l(B,["userId","theme"]),t=window[y.Blink];if(!t)return;const o=new t({remote:"https://www.finn.no/distribution-front/external/carousel",userId:n,theme:e});yield o.inject(Object.assign({},i))})),m(g.selector.replace("#",""),g.advertoryTheme)}catch(e){t(`Finn blink error ${e}`),s&&s(n),!s&&d(n),p(n)}var B}),C=()=>e(void 0,void 0,void 0,function*(){const{tcf:n,pageContext:{isMobileApp:e,countryCode:o}}=i.get();return!!(yield a(n,e,o,"finn-blink"))||(t("Skip loading finn blink ad due to missing TCF consent."),!1)}),x=(n,o,r,l)=>e(void 0,void 0,void 0,function*(){const{pageContext:{isMobileApp:e}}=i.get();if(t(`loadFinnBlinkAd: loading finn blink ad for ${n}`),!(yield C())||e)return r&&r(n),p(n),void(!r&&d(n));try{yield g(b)}catch(n){console.error(n)}yield w(n,o,r),l&&l()}),I=(n,e)=>{var i;(t(`Appending ${e.id} after ${n.id}`),n.parentElement&&(i=n.parentElement,!Array.from(i.children).some(n=>n.classList.contains("advertory-finn-blink-wrapper"))))?(n.parentElement.style.display="none",n.parentElement.insertAdjacentElement("afterend",e)):t(`Cannot perform afterend on: ${n.id}`)},j=(n,o)=>e(void 0,void 0,void 0,function*(){var e,r;if(!o)return;const{replacementConfig:d}=o,l=null===(e=null==d?void 0:d.adsToReplace)||void 0===e?void 0:e[n],a=null===(r=null==d?void 0:d.sizes)||void 0===r?void 0:r[n];s()&&l&&a?(yield C())&&(yield g(b),l.forEach(([n,e])=>{const o=document.querySelector(`[id^="${n}"]`);if(!o)return;const r=(n=>{const{siteSpecificConfig:{publisherClassName:e}={}}=i.get(),o=document.createElement("div"),r=document.createElement("div");return r.id=n,o.appendChild(r),u(e,r,f.FINN_BLINK),t(`Creating blink container for: ${n}`),o})(e);(n=>{t(`Hiding old ad container: ${n.id}`),n.style.setProperty("display","none","important")})(o),I(o,r),o.dataset.finnBlinkId=e,c().withFullAdsChain(n)})):t(`Finn blink configuration is incorrect: ${JSON.stringify(d)}`)}),B=n=>document.querySelector(`#${n}`),A=n=>e(void 0,void 0,void 0,function*(){if(!n.length)return;const{appearanceConfig:e,pageContext:{deviceType:t}}=i.get(),o=null==e?void 0:e.defaultThreshold[t];for(const e of n){const{requestThreshold:n,targetId:i}=e,t=B(i);t&&(yield v(t,null!=n?n:o))}});export{A as handleFinnBlinkOnlyPlacements,x as loadFinnBlinkAd,j as replaceAdsWithFinnBlink};