@ebrains/vue 0.9.2-beta → 0.9.3-beta

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 (261) hide show
  1. package/analytics-44b1416b-3vYuu4Xs.mjs +28 -0
  2. package/analytics-44b1416b-ol77SdQE.js +1 -0
  3. package/arrow-diagonal-black-8f0494c3-CYl9yYTl.mjs +4 -0
  4. package/arrow-diagonal-black-8f0494c3-DqsB6ni-.js +1 -0
  5. package/arrow-right-9322ba8a-DBcxNU_p.js +3 -0
  6. package/arrow-right-9322ba8a-DHq-_PPe.mjs +6 -0
  7. package/bluesky-cc5edd2d-DaFQc-pr.js +12 -0
  8. package/bluesky-cc5edd2d-DfuDDO5h.mjs +15 -0
  9. package/bookmark-c200037c-CIcZ51ZQ.js +14 -0
  10. package/bookmark-c200037c-ClkCtyRY.mjs +17 -0
  11. package/chevron-down-6144c823-DWGlv9eV.mjs +13 -0
  12. package/chevron-down-6144c823-D_8976Ke.js +10 -0
  13. package/chevron-left-ca6c66e1-DANhLw_T.mjs +12 -0
  14. package/chevron-left-ca6c66e1-uCH5SUhm.js +9 -0
  15. package/chevron-right-b88ed2d4-C7dkTMvP.js +3 -0
  16. package/chevron-right-b88ed2d4-CgEZBvy7.mjs +6 -0
  17. package/chevron-up-c66bd477-ByW7R48t.js +10 -0
  18. package/chevron-up-c66bd477-CETJkshq.mjs +13 -0
  19. package/close-87fc0d63-Cbd-ScJr.js +3 -0
  20. package/close-87fc0d63-DtDU2HIU.mjs +6 -0
  21. package/color-2554aad6-CCcV5UJZ.mjs +131 -0
  22. package/color-2554aad6-D1hFGX4H.js +1 -0
  23. package/color-primary-palette_6.entry-CloKiAKI.mjs +300 -0
  24. package/color-primary-palette_6.entry-DnBuZqiu.js +1 -0
  25. package/components-section.entry-BZl-upvI.js +162 -0
  26. package/components-section.entry-DEtf0V8r.mjs +351 -0
  27. package/copy-03b72cb6-B_WCNQrG.mjs +6 -0
  28. package/copy-03b72cb6-CZAFAegx.js +3 -0
  29. package/correct-use-of-colors.entry-CvrVVhIA.mjs +59 -0
  30. package/correct-use-of-colors.entry-ajROARV6.js +1 -0
  31. package/docs-palettes.entry-CegYRhKo.js +1 -0
  32. package/docs-palettes.entry-OWUmgE8-.mjs +22 -0
  33. package/docs-tokens.entry-BIwcLv8t.js +1 -0
  34. package/docs-tokens.entry-D720jRIB.mjs +30 -0
  35. package/eds-accordion.entry-Ct4upGzD.mjs +48 -0
  36. package/eds-accordion.entry-D5Qn9bWB.js +4 -0
  37. package/eds-alert.entry-D9ClanEp.js +739 -0
  38. package/eds-alert.entry-D9R2BeLM.mjs +825 -0
  39. package/eds-app-root.entry-C-CwU-8Y.js +1 -0
  40. package/eds-app-root.entry-DPM5X6uN.mjs +25 -0
  41. package/eds-avatar_27.entry-7vAHtj7m.mjs +33545 -0
  42. package/eds-avatar_27.entry-CnmtSNAS.js +31838 -0
  43. package/eds-card-desc_2.entry-1GoZmzeQ.mjs +53 -0
  44. package/eds-card-desc_2.entry-BfOXVZi0.js +1 -0
  45. package/eds-card-generic.entry-BKpFgWlR.js +1 -0
  46. package/eds-card-generic.entry-CT7jqo3p.mjs +56 -0
  47. package/eds-card-project.entry-BbLZfxAE.js +1 -0
  48. package/eds-card-project.entry-O11d3day.mjs +44 -0
  49. package/eds-card-section.entry-BWDrARpV.js +1 -0
  50. package/eds-card-section.entry-CXFOGMeJ.mjs +30 -0
  51. package/eds-card-tags.entry-Debtxwjy.mjs +13 -0
  52. package/eds-card-tags.entry-Do7oGWtS.js +1 -0
  53. package/eds-card-tool.entry-CXluEgpO.mjs +56 -0
  54. package/eds-card-tool.entry-kxsYfCOl.js +1 -0
  55. package/eds-card-wrapper.entry-DnHxiCgs.js +1 -0
  56. package/eds-card-wrapper.entry-Dyrfqp6K.mjs +24 -0
  57. package/eds-code-block.entry-B2tVEczx.js +9 -0
  58. package/eds-code-block.entry-BIGwear1.mjs +1623 -0
  59. package/eds-cookies-preference.entry-BwTBWuc7.mjs +20 -0
  60. package/eds-cookies-preference.entry-mbjVkbaf.js +1 -0
  61. package/eds-feedback.entry-CxE8Mda2.js +1 -0
  62. package/eds-feedback.entry-DQZP2iFN.mjs +53 -0
  63. package/eds-frame.entry-BzGgy3Ya.mjs +67 -0
  64. package/eds-frame.entry-CGFInzxQ.js +1 -0
  65. package/eds-icon-arrow-diagonal.entry-BzMthIH3.js +1 -0
  66. package/eds-icon-arrow-diagonal.entry-D0nObc1G.mjs +13 -0
  67. package/eds-icon-arrow-right.entry-BGLDpWIT.mjs +13 -0
  68. package/eds-icon-arrow-right.entry-DPLcd0Dg.js +1 -0
  69. package/eds-icon-bluesky.entry-ZXTtFyYw.mjs +13 -0
  70. package/eds-icon-bluesky.entry-bnwTCSoD.js +1 -0
  71. package/eds-icon-bookmark.entry-BV8nKCLz.mjs +13 -0
  72. package/eds-icon-bookmark.entry-vBTnOEht.js +1 -0
  73. package/eds-icon-chevron-down.entry-9YeZRA_B.mjs +13 -0
  74. package/eds-icon-chevron-down.entry-BNSIoEMh.js +1 -0
  75. package/eds-icon-chevron-left.entry-BBKqN2RH.js +1 -0
  76. package/eds-icon-chevron-left.entry-Bm5LaJAt.mjs +13 -0
  77. package/eds-icon-chevron-right.entry-ChbDkmms.mjs +13 -0
  78. package/eds-icon-chevron-right.entry-CieI-tuC.js +1 -0
  79. package/eds-icon-chevron-up.entry-BqkKRoL-.js +1 -0
  80. package/eds-icon-chevron-up.entry-D3DkXrLO.mjs +13 -0
  81. package/eds-icon-close.entry-4xYgUnOY.js +1 -0
  82. package/eds-icon-close.entry-DQv18xqh.mjs +13 -0
  83. package/eds-icon-copy.entry-C7-kaujN.mjs +13 -0
  84. package/eds-icon-copy.entry-DQl13_LK.js +1 -0
  85. package/eds-icon-eu.entry-B8fNjCUv.js +1 -0
  86. package/eds-icon-eu.entry-DR5lezcj.mjs +13 -0
  87. package/eds-icon-external.entry-BaIofxzF.js +1 -0
  88. package/eds-icon-external.entry-DvY_6Ld0.mjs +13 -0
  89. package/eds-icon-facebook.entry-D7FANZCQ.mjs +13 -0
  90. package/eds-icon-facebook.entry-Do2GEkmS.js +1 -0
  91. package/eds-icon-gitlab.entry-D7FC3Vn4.mjs +13 -0
  92. package/eds-icon-gitlab.entry-p78Zzlxs.js +1 -0
  93. package/eds-icon-linkedin.entry-BYQGxGkX.js +1 -0
  94. package/eds-icon-linkedin.entry-CchbiOIO.mjs +13 -0
  95. package/eds-icon-loader.entry-C8zfXt5G.mjs +13 -0
  96. package/eds-icon-loader.entry-Cw7oYrm3.js +1 -0
  97. package/eds-icon-mastodon.entry-BOgFKnbj.mjs +13 -0
  98. package/eds-icon-mastodon.entry-C_TXVQJB.js +1 -0
  99. package/eds-icon-menu.entry-BtdrFvM4.js +1 -0
  100. package/eds-icon-menu.entry-Dl7Xqhc3.mjs +13 -0
  101. package/eds-icon-minus.entry-BA5Al4_F.js +1 -0
  102. package/eds-icon-minus.entry-Bfm78Q48.mjs +13 -0
  103. package/eds-icon-more.entry-CHzRpt-L.mjs +13 -0
  104. package/eds-icon-more.entry-mAUgJoHF.js +1 -0
  105. package/eds-icon-paper.entry-DEiOlvnw.mjs +13 -0
  106. package/eds-icon-paper.entry-DtE79_lg.js +1 -0
  107. package/eds-icon-plus.entry-BCc2gk-Y.js +1 -0
  108. package/eds-icon-plus.entry-DxdfImnp.mjs +13 -0
  109. package/eds-icon-portal.entry-DgJxnehb.js +1 -0
  110. package/eds-icon-portal.entry-DygPWj8q.mjs +13 -0
  111. package/eds-icon-private.entry-BtxnzDjj.js +1 -0
  112. package/eds-icon-private.entry-ClDqtUa4.mjs +13 -0
  113. package/eds-icon-public.entry-BKL5QMPS.js +1 -0
  114. package/eds-icon-public.entry-D0qOA8dF.mjs +13 -0
  115. package/eds-icon-search.entry-BPeHLF3h.js +1 -0
  116. package/eds-icon-search.entry-iegCSWzH.mjs +13 -0
  117. package/eds-icon-star.entry-BP6oBKRH.mjs +13 -0
  118. package/eds-icon-star.entry-DSHqvj6t.js +1 -0
  119. package/eds-icon-success.entry-B2vqFpAU.mjs +13 -0
  120. package/eds-icon-success.entry-DoaW0KlM.js +1 -0
  121. package/eds-icon-thumbs-down.entry-CFMyu-CY.js +1 -0
  122. package/eds-icon-thumbs-down.entry-CmV8Km2F.mjs +13 -0
  123. package/eds-icon-thumbs-up.entry-8RPnzfnW.js +1 -0
  124. package/eds-icon-thumbs-up.entry-DhfFxKPT.mjs +13 -0
  125. package/eds-icon-tutorial.entry-B3NRKCnl.mjs +13 -0
  126. package/eds-icon-tutorial.entry-ImfBSV9b.js +1 -0
  127. package/eds-icon-twitter.entry-BLvpOiN-.js +1 -0
  128. package/eds-icon-twitter.entry-Da3X1sWO.mjs +13 -0
  129. package/eds-icon-unknown.entry--9_uerA-.js +1 -0
  130. package/eds-icon-unknown.entry-DH3YcJSO.mjs +13 -0
  131. package/eds-icon-updown.entry-BU4FzzAC.js +1 -0
  132. package/eds-icon-updown.entry-D6t6TWtG.mjs +13 -0
  133. package/eds-icon-user.entry-pb-JM7tE.mjs +13 -0
  134. package/eds-icon-user.entry-yNOw7Z1J.js +1 -0
  135. package/eds-icon-youtube.entry-CIx5D-1i.mjs +13 -0
  136. package/eds-icon-youtube.entry-CNH9Mxfw.js +1 -0
  137. package/eds-login_2.entry-shWfmpH4.mjs +981 -0
  138. package/eds-login_2.entry-swrZnwUp.js +9 -0
  139. package/eds-matomo-notice.entry-DD0R8UUN.mjs +90 -0
  140. package/eds-matomo-notice.entry-cucI3F6F.js +1 -0
  141. package/eds-pagination_2.entry-Cmqe9RbB.mjs +258 -0
  142. package/eds-pagination_2.entry-DFO92YFs.js +1 -0
  143. package/eds-progress-bar.entry-CIkJEHf9.mjs +21 -0
  144. package/eds-progress-bar.entry-CUoQ0OmO.js +1 -0
  145. package/eds-rating.entry-BJZaV3ft.js +1 -0
  146. package/eds-rating.entry-BaneuoOA.mjs +61 -0
  147. package/eds-section-core_2.entry-dmjdE4gJ.mjs +39 -0
  148. package/eds-section-core_2.entry-wnSqKsfm.js +1 -0
  149. package/eds-spinner.entry-BwIR2ZO2.mjs +36 -0
  150. package/eds-spinner.entry-Cdu4PTNJ.js +1 -0
  151. package/eds-switch.entry-8g9JkW0c.js +1 -0
  152. package/eds-switch.entry-BOxsYeYC.mjs +20 -0
  153. package/eds-tabs.entry-CdlLmrmB.js +7794 -0
  154. package/eds-tabs.entry-DRJv1vVW.mjs +7897 -0
  155. package/eds-timeline.entry-AsApD57a.mjs +7839 -0
  156. package/eds-timeline.entry-MDj5oqZG.js +7794 -0
  157. package/eds-toast-manager.entry-Bri3h_MP.mjs +36 -0
  158. package/eds-toast-manager.entry-zrDxthPz.js +1 -0
  159. package/eds-toast.entry-B1RS9m4v.js +3 -0
  160. package/eds-toast.entry-BNYlJ84c.mjs +61 -0
  161. package/eds-tooltip.entry-B6UpJ0wf.js +1 -0
  162. package/eds-tooltip.entry-Ci5te9B_.mjs +77 -0
  163. package/eds-trl.entry-CuUDfGYw.js +1 -0
  164. package/eds-trl.entry-Dz7LP4G1.mjs +34 -0
  165. package/eu-9ddde93a-BFtIQw9B.js +28 -0
  166. package/eu-9ddde93a-ft4szvR5.mjs +31 -0
  167. package/facebook-9cb5c17f-BcUhbrj6.mjs +15 -0
  168. package/facebook-9cb5c17f-Y_gvQ682.js +12 -0
  169. package/generated/components.d.ts +40 -0
  170. package/generated/vue-component-lib/utils.d.ts +16 -0
  171. package/incorrect-use-of-colors.entry-CYXsk3TR.mjs +42 -0
  172. package/incorrect-use-of-colors.entry-CfmdbA7l.js +1 -0
  173. package/index-39c58238-BwYCDOHZ.mjs +44 -0
  174. package/index-39c58238-SQ-JC-LH.js +1 -0
  175. package/index-7ljGsgwC.js +21 -0
  176. package/index-l365C9dI.mjs +3617 -0
  177. package/index.d.ts +1 -0
  178. package/index.js +1 -0
  179. package/index.mjs +42 -0
  180. package/linkedin-e8650abb-BkDrkjzY.js +26 -0
  181. package/linkedin-e8650abb-DYMdsale.mjs +29 -0
  182. package/loader-c9628637-ChpnbJkv.mjs +31 -0
  183. package/loader-c9628637-Vj8Wt1e8.js +28 -0
  184. package/logo-color-7f1fd803-CFgbXdt8.mjs +116 -0
  185. package/logo-color-7f1fd803-DRD3vZVn.js +113 -0
  186. package/logo-color-margins-ff8ce71b-B9nMsY9Q.mjs +119 -0
  187. package/logo-color-margins-ff8ce71b-Dk06zr1Z.js +116 -0
  188. package/logo-space.entry-DxZ7v-wS.js +6 -0
  189. package/logo-space.entry-GOUZQmu9.mjs +19 -0
  190. package/logo-variations-horizontal_2.entry-CRdycvC5.js +7 -0
  191. package/logo-variations-horizontal_2.entry-DimbU2IU.mjs +29 -0
  192. package/logo-variations-tabs.entry-5kLk6tXo.js +1 -0
  193. package/logo-variations-tabs.entry-Uc3TLufg.mjs +22 -0
  194. package/logo-white-no-bg-f382f86f-DXYn3NwV.js +1011 -0
  195. package/logo-white-no-bg-f382f86f-YhfmNmGG.mjs +1022 -0
  196. package/logo-wrong-usage.entry-13RSC-bu.js +1 -0
  197. package/logo-wrong-usage.entry-CYcqaVbn.mjs +14 -0
  198. package/mastodon-3703ec61-C7iI4Hk0.mjs +15 -0
  199. package/mastodon-3703ec61-C9v6Olc-.js +12 -0
  200. package/menu-340ea948-BpnYX3gY.mjs +12 -0
  201. package/menu-340ea948-ZdelWVw3.js +9 -0
  202. package/minus-b30a7c71-BPAvqHzH.mjs +12 -0
  203. package/minus-b30a7c71-DqCTe6Qh.js +9 -0
  204. package/mono-53f70232-DGi2XDlR.mjs +12 -0
  205. package/mono-53f70232-DgAsWvoQ.js +9 -0
  206. package/more-4449d549-D4HA1cRq.js +11 -0
  207. package/more-4449d549-rI9hOpEp.mjs +14 -0
  208. package/package.json +1 -1
  209. package/paper-8e74ea31-BvGrc1Vo.mjs +16 -0
  210. package/paper-8e74ea31-C4CV6tlB.js +13 -0
  211. package/plus-89c07be2-BTXnjg5K.js +10 -0
  212. package/plus-89c07be2-DyT9I4-L.mjs +13 -0
  213. package/portal-d6c8ce56-Cj61ldo8.mjs +19 -0
  214. package/portal-d6c8ce56-NpSrdNZ_.js +16 -0
  215. package/private-1c25ff8e-D3Fo36q6.js +23 -0
  216. package/private-1c25ff8e-Dz82_Xf8.mjs +26 -0
  217. package/public-d4d8c585-BJKDD5F6.mjs +17 -0
  218. package/public-d4d8c585-lV6QxdPw.js +14 -0
  219. package/search-fbcd79c2-BMxCaeEk.js +10 -0
  220. package/search-fbcd79c2-rfV0PlHP.mjs +13 -0
  221. package/sharedUtils-a550989c-Ci3Tx3jc.mjs +15 -0
  222. package/sharedUtils-a550989c-m4pF1Vqy.js +1 -0
  223. package/star-0da9b5e9-B3-jr0yE.js +3 -0
  224. package/star-0da9b5e9-DX8_iFmu.mjs +6 -0
  225. package/success-443809da-BD23vltm.mjs +19 -0
  226. package/success-443809da-BUEhLsAD.js +16 -0
  227. package/svg-repository.entry-Ck1z1CpA.js +173 -0
  228. package/svg-repository.entry-IIRiiFbB.mjs +301 -0
  229. package/thumbs-down-a18fd049-CzuBAj99.mjs +6 -0
  230. package/thumbs-down-a18fd049-DTNIbYbm.js +3 -0
  231. package/thumbs-up-c19a71bc-CjLv5Wgw.mjs +7 -0
  232. package/thumbs-up-c19a71bc-w8Z8gegt.js +4 -0
  233. package/toastManager-d9eee791-CEYNwx25.mjs +30 -0
  234. package/toastManager-d9eee791-DvR_vUPI.js +1 -0
  235. package/token-list_3.entry-CLlUT7ge.js +1 -0
  236. package/token-list_3.entry-CQ9aUIVd.mjs +247 -0
  237. package/token-ratios.entry-DkgSpwqw.mjs +25 -0
  238. package/token-ratios.entry-Dtrkv16c.js +1 -0
  239. package/token-typography.entry-CgJdJgCR.js +2 -0
  240. package/token-typography.entry-CrMCS1R0.mjs +213 -0
  241. package/tutotial-150ee1fd-DFdyoHVA.mjs +28 -0
  242. package/tutotial-150ee1fd-DjN_JBL5.js +25 -0
  243. package/twitter-ac21b505-CGWVGWM9.mjs +15 -0
  244. package/twitter-ac21b505-DDdHS4hB.js +12 -0
  245. package/unknown-ed01a24c-B0AcMuip.js +20 -0
  246. package/unknown-ed01a24c-DonOUpIC.mjs +23 -0
  247. package/up-and-down-d747abee-CWoZjUyq.js +10 -0
  248. package/up-and-down-d747abee-D7g6H0T0.mjs +13 -0
  249. package/user-71ebdc15-BBKQbcQD.js +14 -0
  250. package/user-71ebdc15-CoHlCtJg.mjs +17 -0
  251. package/youtube-efbfbdc4-BLTH1Jl9.js +12 -0
  252. package/youtube-efbfbdc4-BfySbfjR.mjs +15 -0
  253. package/.eslintrc.json +0 -18
  254. package/project.json +0 -9
  255. package/src/generated/components.ts +0 -374
  256. package/src/generated/vue-component-lib/utils.ts +0 -236
  257. package/src/index.ts +0 -1
  258. package/src/vue-shims.d.ts +0 -5
  259. package/tsconfig.json +0 -18
  260. package/tsconfig.lib.json +0 -27
  261. package/vite.config.ts +0 -71
@@ -0,0 +1,9 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("./index-7ljGsgwC.js"),R=require("./toastManager-d9eee791-DvR_vUPI.js");function G(u){if(!(this instanceof G))throw new Error("The 'Keycloak' constructor must be invoked with 'new'.");if(typeof u!="string"&&!V(u))throw new Error("The 'Keycloak' constructor must be provided with a configuration object, or a URL to a JSON configuration file.");if(V(u)){const r="oidcProvider"in u?["clientId"]:["url","realm","clientId"];for(const t of r)if(!u[t])throw new Error(`The configuration object is missing the required '${t}' property.`)}var e=this,p,w=[],I,h={enable:!0,callbackList:[],interval:5};e.didInitialize=!1;var P=!0,_=q(console.info),M=q(console.warn);globalThis.isSecureContext||M(`[KEYCLOAK] Keycloak JS must be used in a 'secure context' to function properly as it relies on browser APIs that are otherwise not available.
2
+ Continuing to run your application insecurely will lead to unexpected behavior and breakage.
3
+
4
+ For more information see: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts`),e.init=function(r={}){if(e.didInitialize)throw new Error("A 'Keycloak' instance can only be initialized once.");e.didInitialize=!0,e.authenticated=!1,I=ae();var t=["default","cordova","cordova-native"];if(t.indexOf(r.adapter)>-1?p=N(r.adapter):typeof r.adapter=="object"?p=r.adapter:window.Cordova||window.cordova?p=N("cordova"):p=N(),typeof r.useNonce<"u"&&(P=r.useNonce),typeof r.checkLoginIframe<"u"&&(h.enable=r.checkLoginIframe),r.checkLoginIframeInterval&&(h.interval=r.checkLoginIframeInterval),r.onLoad==="login-required"&&(e.loginRequired=!0),r.responseMode)if(r.responseMode==="query"||r.responseMode==="fragment")e.responseMode=r.responseMode;else throw"Invalid value for responseMode";if(r.flow){switch(r.flow){case"standard":e.responseType="code";break;case"implicit":e.responseType="id_token token";break;case"hybrid":e.responseType="code id_token token";break;default:throw"Invalid value for flow"}e.flow=r.flow}if(r.timeSkew!=null&&(e.timeSkew=r.timeSkew),r.redirectUri&&(e.redirectUri=r.redirectUri),r.silentCheckSsoRedirectUri&&(e.silentCheckSsoRedirectUri=r.silentCheckSsoRedirectUri),typeof r.silentCheckSsoFallback=="boolean"?e.silentCheckSsoFallback=r.silentCheckSsoFallback:e.silentCheckSsoFallback=!0,typeof r.pkceMethod<"u"){if(r.pkceMethod!=="S256"&&r.pkceMethod!==!1)throw new TypeError(`Invalid value for pkceMethod', expected 'S256' or false but got ${r.pkceMethod}.`);e.pkceMethod=r.pkceMethod}else e.pkceMethod="S256";typeof r.enableLogging=="boolean"?e.enableLogging=r.enableLogging:e.enableLogging=!1,r.logoutMethod==="POST"?e.logoutMethod="POST":e.logoutMethod="GET",typeof r.scope=="string"&&(e.scope=r.scope),typeof r.acrValues=="string"&&(e.acrValues=r.acrValues),typeof r.messageReceiveTimeout=="number"&&r.messageReceiveTimeout>0?e.messageReceiveTimeout=r.messageReceiveTimeout:e.messageReceiveTimeout=1e4,e.responseMode||(e.responseMode="fragment"),e.responseType||(e.responseType="code",e.flow="standard");var s=g(),i=g();i.promise.then(function(){e.onReady&&e.onReady(e.authenticated),s.setSuccess(e.authenticated)}).catch(function(o){s.setError(o)});var a=re();function c(){var o=function(d){d||(f.prompt="none"),r.locale&&(f.locale=r.locale),e.login(f).then(function(){i.setSuccess()}).catch(function(m){i.setError(m)})},l=async function(){var d=document.createElement("iframe"),m=await e.createLoginUrl({prompt:"none",redirectUri:e.silentCheckSsoRedirectUri});d.setAttribute("src",m),d.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),d.setAttribute("title","keycloak-silent-check-sso"),d.style.display="none",document.body.appendChild(d);var y=function(U){if(!(U.origin!==window.location.origin||d.contentWindow!==U.source)){var b=E(U.data);T(b,i),document.body.removeChild(d),window.removeEventListener("message",y)}};window.addEventListener("message",y)},f={};switch(r.onLoad){case"check-sso":h.enable?K().then(function(){L().then(function(d){d?i.setSuccess():e.silentCheckSsoRedirectUri?l():o(!1)}).catch(function(d){i.setError(d)})}):e.silentCheckSsoRedirectUri?l():o(!1);break;case"login-required":o(!0);break;default:throw"Invalid value for onLoad"}}function n(){var o=E(window.location.href);if(o&&window.history.replaceState(window.history.state,null,o.newUrl),o&&o.valid)return K().then(function(){T(o,i)}).catch(function(l){i.setError(l)});r.token&&r.refreshToken?(C(r.token,r.refreshToken,r.idToken),h.enable?K().then(function(){L().then(function(l){l?(e.onAuthSuccess&&e.onAuthSuccess(),i.setSuccess(),H()):i.setSuccess()}).catch(function(l){i.setError(l)})}):e.updateToken(-1).then(function(){e.onAuthSuccess&&e.onAuthSuccess(),i.setSuccess()}).catch(function(l){e.onAuthError&&e.onAuthError(),r.onLoad?c():i.setError(l)})):r.onLoad?c():i.setSuccess()}return a.then(function(){oe().then(n).catch(function(o){s.setError(o)})}),a.catch(function(o){s.setError(o)}),s.promise},e.login=function(r){return p.login(r)};function X(r){if(typeof crypto>"u"||typeof crypto.getRandomValues>"u")throw new Error("Web Crypto API is not available.");return crypto.getRandomValues(new Uint8Array(r))}function B(r){return $(r,"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")}function $(r,t){for(var s=X(r),i=new Array(r),a=0;a<r;a++)i[a]=t.charCodeAt(s[a]%t.length);return String.fromCharCode.apply(null,i)}async function Q(r,t){if(r!=="S256")throw new TypeError(`Invalid value for 'pkceMethod', expected 'S256' but got '${r}'.`);const s=new Uint8Array(await se(t));return ie(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}function Z(r){var t={id_token:{acr:r}};return JSON.stringify(t)}e.createLoginUrl=async function(r){var t=F(),s=F(),i=p.redirectUri(r),a={state:t,nonce:s,redirectUri:encodeURIComponent(i),loginOptions:r};r&&r.prompt&&(a.prompt=r.prompt);var c;r&&r.action=="register"?c=e.endpoints.register():c=e.endpoints.authorize();var n=r&&r.scope||e.scope;n?n.indexOf("openid")===-1&&(n="openid "+n):n="openid";var o=c+"?client_id="+encodeURIComponent(e.clientId)+"&redirect_uri="+encodeURIComponent(i)+"&state="+encodeURIComponent(t)+"&response_mode="+encodeURIComponent(e.responseMode)+"&response_type="+encodeURIComponent(e.responseType)+"&scope="+encodeURIComponent(n);if(P&&(o=o+"&nonce="+encodeURIComponent(s)),r&&r.prompt&&(o+="&prompt="+encodeURIComponent(r.prompt)),r&&typeof r.maxAge=="number"&&(o+="&max_age="+encodeURIComponent(r.maxAge)),r&&r.loginHint&&(o+="&login_hint="+encodeURIComponent(r.loginHint)),r&&r.idpHint&&(o+="&kc_idp_hint="+encodeURIComponent(r.idpHint)),r&&r.action&&r.action!="register"&&(o+="&kc_action="+encodeURIComponent(r.action)),r&&r.locale&&(o+="&ui_locales="+encodeURIComponent(r.locale)),r&&r.acr){var l=Z(r.acr);o+="&claims="+encodeURIComponent(l)}if((r&&r.acrValues||e.acrValues)&&(o+="&acr_values="+encodeURIComponent(r.acrValues||e.acrValues)),e.pkceMethod)try{const f=B(96),d=await Q(e.pkceMethod,f);a.pkceCodeVerifier=f,o+="&code_challenge="+d,o+="&code_challenge_method="+e.pkceMethod}catch(f){throw new Error("Failed to generate PKCE challenge.",{cause:f})}return I.add(a),o},e.logout=function(r){return p.logout(r)},e.createLogoutUrl=function(r){if(((r==null?void 0:r.logoutMethod)??e.logoutMethod)==="POST")return e.endpoints.logout();var s=e.endpoints.logout()+"?client_id="+encodeURIComponent(e.clientId)+"&post_logout_redirect_uri="+encodeURIComponent(p.redirectUri(r,!1));return e.idToken&&(s+="&id_token_hint="+encodeURIComponent(e.idToken)),s},e.register=function(r){return p.register(r)},e.createRegisterUrl=async function(r){return r||(r={}),r.action="register",await e.createLoginUrl(r)},e.createAccountUrl=function(r){var t=S(),s=void 0;return typeof t<"u"&&(s=t+"/account?referrer="+encodeURIComponent(e.clientId)+"&referrer_uri="+encodeURIComponent(p.redirectUri(r))),s},e.accountManagement=function(){return p.accountManagement()},e.hasRealmRole=function(r){var t=e.realmAccess;return!!t&&t.roles.indexOf(r)>=0},e.hasResourceRole=function(r,t){if(!e.resourceAccess)return!1;var s=e.resourceAccess[t||e.clientId];return!!s&&s.roles.indexOf(r)>=0},e.loadUserProfile=function(){var r=S()+"/account",t=new XMLHttpRequest;t.open("GET",r,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+e.token);var s=g();return t.onreadystatechange=function(){t.readyState==4&&(t.status==200?(e.profile=JSON.parse(t.responseText),s.setSuccess(e.profile)):s.setError())},t.send(),s.promise},e.loadUserInfo=function(){var r=e.endpoints.userinfo(),t=new XMLHttpRequest;t.open("GET",r,!0),t.setRequestHeader("Accept","application/json"),t.setRequestHeader("Authorization","bearer "+e.token);var s=g();return t.onreadystatechange=function(){t.readyState==4&&(t.status==200?(e.userInfo=JSON.parse(t.responseText),s.setSuccess(e.userInfo)):s.setError())},t.send(),s.promise},e.isTokenExpired=function(r){if(!e.tokenParsed||!e.refreshToken&&e.flow!="implicit")throw"Not authenticated";if(e.timeSkew==null)return _("[KEYCLOAK] Unable to determine if token is expired as timeskew is not set"),!0;var t=e.tokenParsed.exp-Math.ceil(new Date().getTime()/1e3)+e.timeSkew;if(r){if(isNaN(r))throw"Invalid minValidity";t-=r}return t<0},e.updateToken=function(r){var t=g();if(!e.refreshToken)return t.setError(),t.promise;r=r||5;var s=function(){var a=!1;if(r==-1?(a=!0,_("[KEYCLOAK] Refreshing token: forced refresh")):(!e.tokenParsed||e.isTokenExpired(r))&&(a=!0,_("[KEYCLOAK] Refreshing token: token expired")),!a)t.setSuccess(!1);else{var c="grant_type=refresh_token&refresh_token="+e.refreshToken,n=e.endpoints.token();if(w.push(t),w.length==1){var o=new XMLHttpRequest;o.open("POST",n,!0),o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.withCredentials=!0,c+="&client_id="+encodeURIComponent(e.clientId);var l=new Date().getTime();o.onreadystatechange=function(){if(o.readyState==4)if(o.status==200){_("[KEYCLOAK] Token refreshed"),l=(l+new Date().getTime())/2;var f=JSON.parse(o.responseText);C(f.access_token,f.refresh_token,f.id_token,l),e.onAuthRefreshSuccess&&e.onAuthRefreshSuccess();for(var d=w.pop();d!=null;d=w.pop())d.setSuccess(!0)}else{M("[KEYCLOAK] Failed to refresh token"),o.status==400&&e.clearToken(),e.onAuthRefreshError&&e.onAuthRefreshError();for(var d=w.pop();d!=null;d=w.pop())d.setError("Failed to refresh token: An unexpected HTTP error occurred while attempting to refresh the token.")}},o.send(c)}}};if(h.enable){var i=L();i.then(function(){s()}).catch(function(a){t.setError(a)})}else s();return t.promise},e.clearToken=function(){e.token&&(C(null,null,null),e.onAuthLogout&&e.onAuthLogout(),e.loginRequired&&e.login())};function S(){if(typeof e.authServerUrl<"u")return e.authServerUrl.charAt(e.authServerUrl.length-1)=="/"?e.authServerUrl+"realms/"+encodeURIComponent(e.realm):e.authServerUrl+"/realms/"+encodeURIComponent(e.realm)}function ee(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}function T(r,t){var s=r.code,i=r.error,a=r.prompt,c=new Date().getTime();if(r.kc_action_status&&e.onActionUpdate&&e.onActionUpdate(r.kc_action_status,r.kc_action),i){if(a!="none")if(r.error_description&&r.error_description==="authentication_expired")e.login(r.loginOptions);else{var n={error:i,error_description:r.error_description};e.onAuthError&&e.onAuthError(n),t&&t.setError(n)}else t&&t.setSuccess();return}else e.flow!="standard"&&(r.access_token||r.id_token)&&d(r.access_token,null,r.id_token,!0);if(e.flow!="implicit"&&s){var o="code="+s+"&grant_type=authorization_code",l=e.endpoints.token(),f=new XMLHttpRequest;f.open("POST",l,!0),f.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o+="&client_id="+encodeURIComponent(e.clientId),o+="&redirect_uri="+r.redirectUri,r.pkceCodeVerifier&&(o+="&code_verifier="+r.pkceCodeVerifier),f.withCredentials=!0,f.onreadystatechange=function(){if(f.readyState==4)if(f.status==200){var m=JSON.parse(f.responseText);d(m.access_token,m.refresh_token,m.id_token,e.flow==="standard"),H()}else e.onAuthError&&e.onAuthError(),t&&t.setError()},f.send(o)}function d(m,y,U,b){c=(c+new Date().getTime())/2,C(m,y,U,c),P&&e.idTokenParsed&&e.idTokenParsed.nonce!=r.storedNonce?(_("[KEYCLOAK] Invalid nonce, clearing token"),e.clearToken(),t&&t.setError()):b&&(e.onAuthSuccess&&e.onAuthSuccess(),t&&t.setSuccess())}}function re(){var r=g(),t;typeof u=="string"&&(t=u);function s(n){n?e.endpoints={authorize:function(){return n.authorization_endpoint},token:function(){return n.token_endpoint},logout:function(){if(!n.end_session_endpoint)throw"Not supported by the OIDC server";return n.end_session_endpoint},checkSessionIframe:function(){if(!n.check_session_iframe)throw"Not supported by the OIDC server";return n.check_session_iframe},register:function(){throw'Redirection to "Register user" page not supported in standard OIDC mode'},userinfo:function(){if(!n.userinfo_endpoint)throw"Not supported by the OIDC server";return n.userinfo_endpoint}}:e.endpoints={authorize:function(){return S()+"/protocol/openid-connect/auth"},token:function(){return S()+"/protocol/openid-connect/token"},logout:function(){return S()+"/protocol/openid-connect/logout"},checkSessionIframe:function(){return S()+"/protocol/openid-connect/login-status-iframe.html"},thirdPartyCookiesIframe:function(){return S()+"/protocol/openid-connect/3p-cookies/step1.html"},register:function(){return S()+"/protocol/openid-connect/registrations"},userinfo:function(){return S()+"/protocol/openid-connect/userinfo"}}}if(t){var i=new XMLHttpRequest;i.open("GET",t,!0),i.setRequestHeader("Accept","application/json"),i.onreadystatechange=function(){if(i.readyState==4)if(i.status==200||J(i)){var n=JSON.parse(i.responseText);e.authServerUrl=n["auth-server-url"],e.realm=n.realm,e.clientId=n.resource,s(null),r.setSuccess()}else r.setError()},i.send()}else{e.clientId=u.clientId;var a=u.oidcProvider;if(!a)e.authServerUrl=u.url,e.realm=u.realm,s(null),r.setSuccess();else if(typeof a=="string"){var c;a.charAt(a.length-1)=="/"?c=a+".well-known/openid-configuration":c=a+"/.well-known/openid-configuration";var i=new XMLHttpRequest;i.open("GET",c,!0),i.setRequestHeader("Accept","application/json"),i.onreadystatechange=function(){if(i.readyState==4)if(i.status==200||J(i)){var o=JSON.parse(i.responseText);s(o),r.setSuccess()}else r.setError()},i.send()}else s(a),r.setSuccess()}return r.promise}function J(r){return r.status==0&&r.responseText&&r.responseURL.startsWith("file:")}function C(r,t,s,i){if(e.tokenTimeoutHandle&&(clearTimeout(e.tokenTimeoutHandle),e.tokenTimeoutHandle=null),t?(e.refreshToken=t,e.refreshTokenParsed=O(t)):(delete e.refreshToken,delete e.refreshTokenParsed),s?(e.idToken=s,e.idTokenParsed=O(s)):(delete e.idToken,delete e.idTokenParsed),r){if(e.token=r,e.tokenParsed=O(r),e.sessionId=e.tokenParsed.sid,e.authenticated=!0,e.subject=e.tokenParsed.sub,e.realmAccess=e.tokenParsed.realm_access,e.resourceAccess=e.tokenParsed.resource_access,i&&(e.timeSkew=Math.floor(i/1e3)-e.tokenParsed.iat),e.timeSkew!=null&&(_("[KEYCLOAK] Estimated time difference between browser and server is "+e.timeSkew+" seconds"),e.onTokenExpired)){var a=(e.tokenParsed.exp-new Date().getTime()/1e3+e.timeSkew)*1e3;_("[KEYCLOAK] Token expires in "+Math.round(a/1e3)+" s"),a<=0?e.onTokenExpired():e.tokenTimeoutHandle=setTimeout(e.onTokenExpired,a)}}else delete e.token,delete e.tokenParsed,delete e.subject,delete e.realmAccess,delete e.resourceAccess,e.authenticated=!1}function F(){if(typeof crypto>"u"||typeof crypto.randomUUID>"u")throw new Error("Web Crypto API is not available.");return crypto.randomUUID()}function E(r){var t=te(r);if(t){var s=I.get(t.state);return s&&(t.valid=!0,t.redirectUri=s.redirectUri,t.storedNonce=s.nonce,t.prompt=s.prompt,t.pkceCodeVerifier=s.pkceCodeVerifier,t.loginOptions=s.loginOptions),t}}function te(r){var t;switch(e.flow){case"standard":t=["code","state","session_state","kc_action_status","kc_action","iss"];break;case"implicit":t=["access_token","token_type","id_token","state","session_state","expires_in","kc_action_status","kc_action","iss"];break;case"hybrid":t=["access_token","token_type","id_token","code","state","session_state","expires_in","kc_action_status","kc_action","iss"];break}t.push("error"),t.push("error_description"),t.push("error_uri");var s=r.indexOf("?"),i=r.indexOf("#"),a,c;if(e.responseMode==="query"&&s!==-1?(a=r.substring(0,s),c=Y(r.substring(s+1,i!==-1?i:r.length),t),c.paramsString!==""&&(a+="?"+c.paramsString),i!==-1&&(a+=r.substring(i))):e.responseMode==="fragment"&&i!==-1&&(a=r.substring(0,i),c=Y(r.substring(i+1),t),c.paramsString!==""&&(a+="#"+c.paramsString)),c&&c.oauthParams){if(e.flow==="standard"||e.flow==="hybrid"){if((c.oauthParams.code||c.oauthParams.error)&&c.oauthParams.state)return c.oauthParams.newUrl=a,c.oauthParams}else if(e.flow==="implicit"&&(c.oauthParams.access_token||c.oauthParams.error)&&c.oauthParams.state)return c.oauthParams.newUrl=a,c.oauthParams}}function Y(r,t){for(var s=r.split("&"),i={paramsString:"",oauthParams:{}},a=0;a<s.length;a++){var c=s[a].indexOf("="),n=s[a].slice(0,c);t.indexOf(n)!==-1?i.oauthParams[n]=s[a].slice(c+1):(i.paramsString!==""&&(i.paramsString+="&"),i.paramsString+=s[a])}return i}function g(){var r={setSuccess:function(t){r.resolve(t)},setError:function(t){r.reject(t)}};return r.promise=new Promise(function(t,s){r.resolve=t,r.reject=s}),r}function ne(r,t,s){var i=null,a=new Promise(function(c,n){i=setTimeout(function(){n({error:s})},t)});return Promise.race([r,a]).finally(function(){clearTimeout(i)})}function K(){var r=g();if(!h.enable||h.iframe)return r.setSuccess(),r.promise;var t=document.createElement("iframe");h.iframe=t,t.onload=function(){var a=e.endpoints.authorize();a.charAt(0)==="/"?h.iframeOrigin=ee():h.iframeOrigin=a.substring(0,a.indexOf("/",8)),r.setSuccess()};var s=e.endpoints.checkSessionIframe();t.setAttribute("src",s),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-session-iframe"),t.style.display="none",document.body.appendChild(t);var i=function(a){if(!(a.origin!==h.iframeOrigin||h.iframe.contentWindow!==a.source)&&(a.data=="unchanged"||a.data=="changed"||a.data=="error")){a.data!="unchanged"&&e.clearToken();for(var c=h.callbackList.splice(0,h.callbackList.length),n=c.length-1;n>=0;--n){var o=c[n];a.data=="error"?o.setError():o.setSuccess(a.data=="unchanged")}}};return window.addEventListener("message",i,!1),r.promise}function H(){h.enable&&e.token&&setTimeout(function(){L().then(function(r){r&&H()})},h.interval*1e3)}function L(){var r=g();if(h.iframe&&h.iframeOrigin){var t=e.clientId+" "+(e.sessionId?e.sessionId:"");h.callbackList.push(r);var s=h.iframeOrigin;h.callbackList.length==1&&h.iframe.contentWindow.postMessage(t,s)}else r.setSuccess();return r.promise}function oe(){var r=g();if((h.enable||e.silentCheckSsoRedirectUri)&&typeof e.endpoints.thirdPartyCookiesIframe=="function"){var t=document.createElement("iframe");t.setAttribute("src",e.endpoints.thirdPartyCookiesIframe()),t.setAttribute("sandbox","allow-storage-access-by-user-activation allow-scripts allow-same-origin"),t.setAttribute("title","keycloak-3p-check-iframe"),t.style.display="none",document.body.appendChild(t);var s=function(i){t.contentWindow===i.source&&(i.data!=="supported"&&i.data!=="unsupported"||(i.data==="unsupported"&&(M(`[KEYCLOAK] Your browser is blocking access to 3rd-party cookies, this means:
5
+
6
+ - It is not possible to retrieve tokens without redirecting to the Keycloak server (a.k.a. no support for silent authentication).
7
+ - It is not possible to automatically detect changes to the session status (such as the user logging out in another tab).
8
+
9
+ For more information see: https://www.keycloak.org/securing-apps/javascript-adapter#_modern_browsers`),h.enable=!1,e.silentCheckSsoFallback&&(e.silentCheckSsoRedirectUri=!1)),document.body.removeChild(t),window.removeEventListener("message",s),r.setSuccess()))};window.addEventListener("message",s,!1)}else r.setSuccess();return ne(r.promise,e.messageReceiveTimeout,"Timeout when waiting for 3rd party check iframe message.")}function N(r){if(!r||r=="default")return{login:async function(n){return window.location.assign(await e.createLoginUrl(n)),g().promise},logout:async function(n){if(((n==null?void 0:n.logoutMethod)??e.logoutMethod)==="GET"){window.location.replace(e.createLogoutUrl(n));return}const l=document.createElement("form");l.setAttribute("method","POST"),l.setAttribute("action",e.createLogoutUrl(n)),l.style.display="none";const f={id_token_hint:e.idToken,client_id:e.clientId,post_logout_redirect_uri:p.redirectUri(n,!1)};for(const[d,m]of Object.entries(f)){const y=document.createElement("input");y.setAttribute("type","hidden"),y.setAttribute("name",d),y.setAttribute("value",m),l.appendChild(y)}document.body.appendChild(l),l.submit()},register:async function(n){return window.location.assign(await e.createRegisterUrl(n)),g().promise},accountManagement:function(){var n=e.createAccountUrl();if(typeof n<"u")window.location.href=n;else throw"Not supported by the OIDC server";return g().promise},redirectUri:function(n,o){return n&&n.redirectUri?n.redirectUri:e.redirectUri?e.redirectUri:location.href}};if(r=="cordova"){h.enable=!1;var t=function(n,o,l){return window.cordova&&window.cordova.InAppBrowser?window.cordova.InAppBrowser.open(n,o,l):window.open(n,o,l)},s=function(n){return n&&n.cordovaOptions?Object.keys(n.cordovaOptions).reduce(function(o,l){return o[l]=n.cordovaOptions[l],o},{}):{}},i=function(n){return Object.keys(n).reduce(function(o,l){return o.push(l+"="+n[l]),o},[]).join(",")},a=function(n){var o=s(n);return o.location="no",n&&n.prompt=="none"&&(o.hidden="yes"),i(o)},c=function(){return e.redirectUri||"http://localhost"};return{login:async function(n){var o=g(),l=a(n),f=await e.createLoginUrl(n),d=t(f,"_blank",l),m=!1,y=!1,U=function(){y=!0,d.close()};return d.addEventListener("loadstart",function(b){if(b.url.indexOf(c())==0){var z=E(b.url);T(z,o),U(),m=!0}}),d.addEventListener("loaderror",function(b){if(!m)if(b.url.indexOf(c())==0){var z=E(b.url);T(z,o),U(),m=!0}else o.setError(),U()}),d.addEventListener("exit",function(b){y||o.setError({reason:"closed_by_user"})}),o.promise},logout:function(n){var o=g(),l=e.createLogoutUrl(n),f=t(l,"_blank","location=no,hidden=yes,clearcache=yes"),d;return f.addEventListener("loadstart",function(m){m.url.indexOf(c())==0&&f.close()}),f.addEventListener("loaderror",function(m){m.url.indexOf(c())==0||(d=!0),f.close()}),f.addEventListener("exit",function(m){d?o.setError():(e.clearToken(),o.setSuccess())}),o.promise},register:async function(n){var o=g(),l=await e.createRegisterUrl(),f=a(n),d=t(l,"_blank",f);return d.addEventListener("loadstart",function(m){if(m.url.indexOf(c())==0){d.close();var y=E(m.url);T(y,o)}}),o.promise},accountManagement:function(){var n=e.createAccountUrl();if(typeof n<"u"){var o=t(n,"_blank","location=no");o.addEventListener("loadstart",function(l){l.url.indexOf(c())==0&&o.close()})}else throw"Not supported by the OIDC server"},redirectUri:function(n){return c()}}}if(r=="cordova-native")return h.enable=!1,{login:async function(n){var o=g(),l=await e.createLoginUrl(n);return universalLinks.subscribe("keycloak",function(f){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var d=E(f.url);T(d,o)}),window.cordova.plugins.browsertab.openUrl(l),o.promise},logout:function(n){var o=g(),l=e.createLogoutUrl(n);return universalLinks.subscribe("keycloak",function(f){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close(),e.clearToken(),o.setSuccess()}),window.cordova.plugins.browsertab.openUrl(l),o.promise},register:async function(n){var o=g(),l=await e.createRegisterUrl(n);return universalLinks.subscribe("keycloak",function(f){universalLinks.unsubscribe("keycloak"),window.cordova.plugins.browsertab.close();var d=E(f.url);T(d,o)}),window.cordova.plugins.browsertab.openUrl(l),o.promise},accountManagement:function(){var n=e.createAccountUrl();if(typeof n<"u")window.cordova.plugins.browsertab.openUrl(n);else throw"Not supported by the OIDC server"},redirectUri:function(n){return n&&n.redirectUri?n.redirectUri:e.redirectUri?e.redirectUri:"http://localhost"}};throw"invalid adapter type: "+r}const A="kc-callback-";var D=function(){if(!(this instanceof D))return new D;localStorage.setItem("kc-test","test"),localStorage.removeItem("kc-test");var r=this;function t(){const c=Date.now();for(const[n,o]of i()){const l=a(o);(l===null||l<c)&&localStorage.removeItem(n)}}function s(){for(const[c]of i())localStorage.removeItem(c)}function i(){return Object.entries(localStorage).filter(([c])=>c.startsWith(A))}function a(c){let n;try{n=JSON.parse(c)}catch{return null}return V(n)&&"expires"in n&&typeof n.expires=="number"?n.expires:null}r.get=function(c){if(c){var n=A+c,o=localStorage.getItem(n);return o&&(localStorage.removeItem(n),o=JSON.parse(o)),t(),o}},r.add=function(c){t();const n=A+c.state,o=JSON.stringify({...c,expires:Date.now()+60*60*1e3});try{localStorage.setItem(n,o)}catch{s(),localStorage.setItem(n,o)}}},j=function(){if(!(this instanceof j))return new j;var r=this;r.get=function(a){if(a){var c=s(A+a);if(i(A+a,"",t(-100)),c)return JSON.parse(c)}},r.add=function(a){i(A+a.state,JSON.stringify(a),t(60))},r.removeItem=function(a){i(a,"",t(-100))};var t=function(a){var c=new Date;return c.setTime(c.getTime()+a*60*1e3),c},s=function(a){for(var c=a+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var l=n[o];l.charAt(0)==" ";)l=l.substring(1);if(l.indexOf(c)==0)return l.substring(c.length,l.length)}return""},i=function(a,c,n){var o=a+"="+c+"; expires="+n.toUTCString()+"; ";document.cookie=o}};function ae(){try{return new D}catch{}return new j}function q(r){return function(){e.enableLogging&&r.apply(console,Array.prototype.slice.call(arguments))}}}function ie(u){const e=String.fromCodePoint(...u);return btoa(e)}async function se(u){const p=new TextEncoder().encode(u);if(typeof crypto>"u"||typeof crypto.subtle>"u")throw new Error("Web Crypto API is not available.");return await crypto.subtle.digest("SHA-256",p)}function O(u){const[e,p]=u.split(".");if(typeof p!="string")throw new Error("Unable to decode token, payload not found.");let w;try{w=ce(p)}catch(I){throw new Error("Unable to decode token, payload is not a valid Base64URL value.",{cause:I})}try{return JSON.parse(w)}catch(I){throw new Error("Unable to decode token, payload is not a valid JSON value.",{cause:I})}}function ce(u){let e=u.replaceAll("-","+").replaceAll("_","/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("Input is not of the correct length.")}try{return le(e)}catch{return atob(e)}}function le(u){return decodeURIComponent(atob(u).replace(/(.)/g,(e,p)=>{let w=p.charCodeAt(0).toString(16).toUpperCase();return w.length<2&&(w="0"+w),"%"+w}))}function V(u){return typeof u=="object"&&u!==null}let k=null,x=null;function ue(u,e=!0){return x?(console.log("Keycloak already initialized, returning from cache"),x):(k||(k=new G({url:u.url,realm:u.realm,clientId:u.clientId})),x=k.init({onLoad:e?"check-sso":"login-required",checkLoginIframe:!1}).then(p=>p).catch(p=>(console.error("Failed to initialize Keycloak:",p),!1)),x)}function de(){return k!=null&&k.authenticated&&(k!=null&&k.idTokenParsed)?{fullname:k.idTokenParsed.name,email:k.idTokenParsed.email,lastname:k.idTokenParsed.family_name,firstname:k.idTokenParsed.given_name,username:k.idTokenParsed.preferred_username,background:"grey",token:k.token,sub:k.idTokenParsed.sub}:{}}function fe(){if(k)k.login();else throw new Error("Keycloak is not initialized.")}function he(){if(k)k.logout();else throw new Error("Keycloak is not initialized.")}function pe(){return!!(k!=null&&k.authenticated)}async function me(u){try{const e=await fetch(u,{method:"HEAD",mode:"no-cors"});return e.ok||e.type==="opaque"}catch{return!1}}const ke=class{constructor(u){v.registerInstance(this,u),this.keycloak=v.createEvent(this,"keycloak",7),this.auth=v.createEvent(this,"auth",7),this.handleLogin=async()=>{if(!this.authenticated)try{await fe()}catch(e){R.toast.show(e.message,"error")}},this.handleLogout=async()=>{try{await he()}catch(e){R.toast.show(e.message,"error")}this.authenticated=!1,this.user=null},this.keycloakUrl=void 0,this.keycloakRealm=void 0,this.keycloakClientId=void 0,this.authenticated=!1,this.user=null,this.serverAvailable=!1}async componentWillLoad(){if(!this.keycloakUrl||!this.keycloakRealm||!this.keycloakClientId){console.error("Keycloak configuration props are missing.");return}if(this.serverAvailable=await me(`${this.keycloakUrl}/realms/${this.keycloakRealm}`),!this.serverAvailable){R.toast.show("Keycloak server is unavailable.","error");return}await this.initAuth()}async initAuth(){try{const u=await ue({url:this.keycloakUrl,realm:this.keycloakRealm,clientId:this.keycloakClientId},!0);this.keycloak.emit({init:u}),pe()&&(this.user=de(),this.authenticated=!0,this.auth.emit({authenticated:this.authenticated,user:this.user}))}catch(u){R.toast.show(u.message,"error")}}render(){return v.h("div",{key:"041846174aaad541acce03588a087793d10daa1e",class:"block"},!this.authenticated&&v.h("eds-button",{key:"360a84ec79a15c9293e3898b77df649c469d9529",label:"Login",intent:"primary","extra-class":"text-default","aria-label":"Login",triggerClick:this.handleLogin.bind(this)}))}},ge=".splash-overlay{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:9999999;background-color:var(--grey-200);display:flex;flex-direction:column;align-items:center;justify-content:center}.logo-container{width:200px;height:200px;margin-bottom:1rem}.content-container{position:relative;width:5rem;height:5rem;display:flex;align-items:center;justify-content:center}",ve=ge,W=class{constructor(u){v.registerInstance(this,u),this.splash=v.createEvent(this,"splash",7),this.inverse=!1,this.initPromise=void 0,this.isVisible=!0}componentWillLoad(){this.initPromise&&this.handleInitPromise(this.initPromise)}async watchInitPromise(u){u&&this.handleInitPromise(u)}async handleInitPromise(u){try{await u,this.hideSplash()}catch(e){this.splash.emit({type:"error",message:e.message||"Unknown error"})}}handleHideSplash(){this.hideSplash()}hideSplash(){this.isVisible=!1,this.splash.emit({type:"hidden",message:"Splash screen hidden successfully"})}render(){return this.isVisible?v.h(v.Host,null,v.h("div",{class:"splash-overlay",style:{background:this.inverse?"black":"var(--grey-200)"}},v.h("div",{class:"logo-container"},this.inverse?v.h("eds-logo",{orientation:"vertical",type:"color-white"}):v.h("eds-logo",{orientation:"vertical",type:"color"})),v.h("div",{class:"content-container"},v.h("eds-spinner",{size:"1rem",thickness:"3px","border-color":"var(--grey-400)","bottom-color":"var(--grey-900)",background:"none",fullscreen:!1})))):null}static get watchers(){return{initPromise:["watchInitPromise"]}}};W.style=ve;exports.eds_login=ke;exports.eds_splash_screen=W;
@@ -0,0 +1,90 @@
1
+ import { r as o, c as a, h as t, g as n } from "./index-l365C9dI.mjs";
2
+ import { m as i, a as r } from "./analytics-44b1416b-3vYuu4Xs.mjs";
3
+ const l = ".fixed{position:fixed}.absolute{position:absolute}.w-full{width:100%}.bottom-0{bottom:0rem}.bottom-4{bottom:0.25rem}.p-4{padding:0.25rem}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.z-10{z-index:10}.z-\\[999999\\]{z-index:999999}.left-0{left:0rem}.left-1\\/2{left:50%}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex{display:flex}.gap-12{gap:0.75rem}.gap-20{gap:1.25rem}.gap-4{gap:0.25rem}@media (min-width: 750px){.md\\:left-1\\/2{left:50%}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}}", c = l, d = class {
4
+ constructor(e) {
5
+ o(this, e), this.consent = a(this, "consent", 7), this.heading = "Analytics Consent", this.description = "We use anonymous analytics to improve our services. No data is collected unless you give your consent. If you don't wish to send data right now, you can always re-enable analytics later by clicking the Cookies Preference button in the footer. However, by opting in today, you're joining a community that shapes our product's future—all while keeping your data completely anonymous.", this.optOutMessage = "You are already part of our community, and your anonymous data helps shape our product's future! Rest assured, your privacy is fully protected.", this.forceShow = !1, this.showNotice = !0;
6
+ }
7
+ /**
8
+ * Listens for global custom events to open the matomo-consent.
9
+ */
10
+ toggleCookiesConsent() {
11
+ this.showNotice = !this.showNotice;
12
+ }
13
+ /**
14
+ * Checks if the consent cookie exists.
15
+ */
16
+ hasCookieConsent() {
17
+ return !!document.cookie.split("; ").find((e) => e.startsWith("mtm_consent="));
18
+ }
19
+ /**
20
+ * Checks if the user has opted out after has opted in.
21
+ */
22
+ optedOut() {
23
+ return !!document.cookie.split("; ").find((e) => e.startsWith("mtm_consent_removed"));
24
+ }
25
+ /**
26
+ * Generate a unique storage key based on appId or the app's domain.
27
+ */
28
+ getStorageKey() {
29
+ return `${window.location.host}-matomo-deferred`;
30
+ }
31
+ /**
32
+ * Check cookies and sessionStorage (unless forceShow is true) to decide if the notice should be shown.
33
+ */
34
+ componentWillLoad() {
35
+ if (localStorage.getItem(`${window.location.host}-matomo-consent-given`) === "out" || this.optedOut()) {
36
+ this.showNotice = !1;
37
+ return;
38
+ }
39
+ if (this.forceShow)
40
+ this.showNotice = !0;
41
+ else if (this.hasCookieConsent())
42
+ this.showNotice = !1;
43
+ else {
44
+ const s = sessionStorage.getItem(this.getStorageKey());
45
+ this.showNotice = !s;
46
+ }
47
+ }
48
+ componentDidLoad() {
49
+ this.el.shadowRoot.querySelectorAll("eds-button").forEach((s) => {
50
+ this.emitContext(s);
51
+ });
52
+ }
53
+ emitContext(e) {
54
+ const s = new CustomEvent("parentContext", {
55
+ detail: {
56
+ componentName: this.el.tagName.toLowerCase(),
57
+ identifier: null
58
+ }
59
+ });
60
+ e.dispatchEvent(s);
61
+ }
62
+ optInAnalytics() {
63
+ i(), localStorage.removeItem(`${window.location.host}-matomo-consent-given`), this.hideNotice(), this.consent.emit("in");
64
+ }
65
+ optOutAnalytics() {
66
+ r(), this.hideNotice(), this.consent.emit("out");
67
+ }
68
+ noThanks() {
69
+ localStorage.setItem(`${window.location.host}-matomo-consent-given`, "out"), this.hideNotice();
70
+ }
71
+ deferDecision() {
72
+ sessionStorage.setItem(this.getStorageKey(), "true"), this.hideNotice(), this.consent.emit("defer");
73
+ }
74
+ keepMeIn() {
75
+ this.hideNotice();
76
+ }
77
+ hideNotice() {
78
+ this.showNotice = !1;
79
+ }
80
+ render() {
81
+ return this.showNotice ? t("div", { class: "fixed bottom-0 p-8 z-[999999] grow md:left-1/2 md:-translate-x-1/2 md:-translate-y-1/2 justify-center" }, t("eds-accordion", { title: this.heading, description: this.hasCookieConsent() ? this.optOutMessage : this.description, switchBg: !0, expanded: !0 }, this.hasCookieConsent() ? t("div", { class: "flex items-center gap-4" }, this.optedOut() ? t("eds-button", { intent: "primary", label: "Opt me in again", "aria-label": "Opt me in again", onClick: () => this.optInAnalytics() }) : t("eds-button", { intent: "primary", label: "Keep Me In", "aria-label": "Keep Me In", onClick: () => this.keepMeIn() }), t("eds-button", { intent: "ghostInverse", label: "Opt-out", "aria-label": "Opt-out from analytics", onClick: () => this.optOutAnalytics() })) : t("div", { class: "flex items-center gap-4" }, t("eds-button", { intent: "primary", label: "I agree", "aria-label": "Opt-in for analytics", onClick: () => this.optInAnalytics() }), t("eds-button", { intent: "ghost", label: "No, thanks", "aria-label": "Opt-out from analytics", onClick: () => this.noThanks() }), t("eds-button", { intent: "ghost", label: "Ask me later", "aria-label": "Defer analytics decision", onClick: () => this.deferDecision() })))) : null;
82
+ }
83
+ get el() {
84
+ return n(this);
85
+ }
86
+ };
87
+ d.style = c;
88
+ export {
89
+ d as eds_matomo_notice
90
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-7ljGsgwC.js"),o=require("./analytics-44b1416b-ol77SdQE.js"),n=".fixed{position:fixed}.absolute{position:absolute}.w-full{width:100%}.bottom-0{bottom:0rem}.bottom-4{bottom:0.25rem}.p-4{padding:0.25rem}.p-6{padding:0.375rem}.p-8{padding:0.5rem}.z-10{z-index:10}.z-\\[999999\\]{z-index:999999}.left-0{left:0rem}.left-1\\/2{left:50%}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.flex{display:flex}.gap-12{gap:0.75rem}.gap-20{gap:1.25rem}.gap-4{gap:0.25rem}@media (min-width: 750px){.md\\:left-1\\/2{left:50%}.md\\:flex{display:flex}.md\\:hidden{display:none}.md\\:-translate-x-1\\/2{--tw-translate-x:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.md\\:-translate-y-1\\/2{--tw-translate-y:-50%;transform:translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}}",i=n,a=class{constructor(e){t.registerInstance(this,e),this.consent=t.createEvent(this,"consent",7),this.heading="Analytics Consent",this.description="We use anonymous analytics to improve our services. No data is collected unless you give your consent. If you don't wish to send data right now, you can always re-enable analytics later by clicking the Cookies Preference button in the footer. However, by opting in today, you're joining a community that shapes our product's future—all while keeping your data completely anonymous.",this.optOutMessage="You are already part of our community, and your anonymous data helps shape our product's future! Rest assured, your privacy is fully protected.",this.forceShow=!1,this.showNotice=!0}toggleCookiesConsent(){this.showNotice=!this.showNotice}hasCookieConsent(){return!!document.cookie.split("; ").find(e=>e.startsWith("mtm_consent="))}optedOut(){return!!document.cookie.split("; ").find(e=>e.startsWith("mtm_consent_removed"))}getStorageKey(){return`${window.location.host}-matomo-deferred`}componentWillLoad(){if(localStorage.getItem(`${window.location.host}-matomo-consent-given`)==="out"||this.optedOut()){this.showNotice=!1;return}if(this.forceShow)this.showNotice=!0;else if(this.hasCookieConsent())this.showNotice=!1;else{const s=sessionStorage.getItem(this.getStorageKey());this.showNotice=!s}}componentDidLoad(){this.el.shadowRoot.querySelectorAll("eds-button").forEach(s=>{this.emitContext(s)})}emitContext(e){const s=new CustomEvent("parentContext",{detail:{componentName:this.el.tagName.toLowerCase(),identifier:null}});e.dispatchEvent(s)}optInAnalytics(){o.matomoOptIn(),localStorage.removeItem(`${window.location.host}-matomo-consent-given`),this.hideNotice(),this.consent.emit("in")}optOutAnalytics(){o.matomoOptOut(),this.hideNotice(),this.consent.emit("out")}noThanks(){localStorage.setItem(`${window.location.host}-matomo-consent-given`,"out"),this.hideNotice()}deferDecision(){sessionStorage.setItem(this.getStorageKey(),"true"),this.hideNotice(),this.consent.emit("defer")}keepMeIn(){this.hideNotice()}hideNotice(){this.showNotice=!1}render(){return this.showNotice?t.h("div",{class:"fixed bottom-0 p-8 z-[999999] grow md:left-1/2 md:-translate-x-1/2 md:-translate-y-1/2 justify-center"},t.h("eds-accordion",{title:this.heading,description:this.hasCookieConsent()?this.optOutMessage:this.description,switchBg:!0,expanded:!0},this.hasCookieConsent()?t.h("div",{class:"flex items-center gap-4"},this.optedOut()?t.h("eds-button",{intent:"primary",label:"Opt me in again","aria-label":"Opt me in again",onClick:()=>this.optInAnalytics()}):t.h("eds-button",{intent:"primary",label:"Keep Me In","aria-label":"Keep Me In",onClick:()=>this.keepMeIn()}),t.h("eds-button",{intent:"ghostInverse",label:"Opt-out","aria-label":"Opt-out from analytics",onClick:()=>this.optOutAnalytics()})):t.h("div",{class:"flex items-center gap-4"},t.h("eds-button",{intent:"primary",label:"I agree","aria-label":"Opt-in for analytics",onClick:()=>this.optInAnalytics()}),t.h("eds-button",{intent:"ghost",label:"No, thanks","aria-label":"Opt-out from analytics",onClick:()=>this.noThanks()}),t.h("eds-button",{intent:"ghost",label:"Ask me later","aria-label":"Defer analytics decision",onClick:()=>this.deferDecision()})))):null}get el(){return t.getElement(this)}};a.style=i;exports.eds_matomo_notice=a;
@@ -0,0 +1,258 @@
1
+ import { r as h, h as i, g as d } from "./index-l365C9dI.mjs";
2
+ import { s as g } from "./analytics-44b1416b-3vYuu4Xs.mjs";
3
+ import { p as c } from "./sharedUtils-a550989c-Ci3Tx3jc.mjs";
4
+ const f = "ul,menu{list-style:none;margin:0;padding:0}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.f-ui-02-light{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}.text-lightest{color:var(--grey-500)}.mb-28{margin-bottom:1.75rem}.w-full{width:100%}.w-20{width:1.25rem}.h-20{height:1.25rem}.h-28{height:1.75rem}.h-32{height:2rem}.h-36{height:2.25rem}.text-center{text-align:center}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-8{-moz-column-gap:0.5rem;column-gap:0.5rem}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.\\!p-8{padding:0.5rem !important}.ml-4{margin-left:0.25rem}.mr-4{margin-right:0.25rem}.hidden{display:none}.gap-1{gap:0.0625rem}.py-4{padding-top:0.25rem;padding-bottom:0.25rem}.transition-colors{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}@media (min-width: 900px){.lg\\:\\!pr-12{padding-right:0.75rem !important}.lg\\:flex{display:flex}}", u = f, p = class {
5
+ constructor(t) {
6
+ h(this, t), this.currentPage = void 0, this.lastPage = void 0, this.perPage = 10, this.total = 0, this.url = "", this.mode = "default", this.prevLabel = "Prev", this.nextLabel = "Next", this.prevUrl = "", this.nextUrl = "", this.links = [];
7
+ }
8
+ /** Lifecycle hook to generate pagination links on component load */
9
+ componentWillLoad() {
10
+ this.mode === "default" && this.generateLinks();
11
+ }
12
+ componentDidLoad() {
13
+ this.hostEl.shadowRoot.querySelectorAll("eds-link").forEach((e) => {
14
+ this.emitContext(e);
15
+ });
16
+ }
17
+ /**
18
+ * Emits a custom event called `parentContext` for a given link element.
19
+ * This event provides context information about the breadcrumb component.
20
+ *
21
+ * @param linkElement - The link element to which the event will be dispatched.
22
+ */
23
+ emitContext(t) {
24
+ const e = new CustomEvent("parentContext", {
25
+ detail: {
26
+ componentName: this.hostEl.tagName.toLowerCase(),
27
+ identifier: null
28
+ }
29
+ });
30
+ t.dispatchEvent(e);
31
+ }
32
+ onPageOrLastPageChange() {
33
+ this.mode === "default" && this.generateLinks();
34
+ }
35
+ /**
36
+ * Checks if the current page is the first page
37
+ * @returns {boolean} - true if current page is the first page
38
+ */
39
+ isFirstPage() {
40
+ return this.currentPage === 1;
41
+ }
42
+ /**
43
+ * Checks if the current page is the last page
44
+ * @returns {boolean} - true if current page is the last page
45
+ */
46
+ isLastPage() {
47
+ return this.currentPage === this.lastPage;
48
+ }
49
+ /**
50
+ * Generates a pagination link object
51
+ * @param {number} page - Page number for the link
52
+ * @returns {Link} - Link object with page details
53
+ */
54
+ generateLink(t) {
55
+ const e = this.url.includes("?");
56
+ return {
57
+ ariaLabel: `Page ${t}`,
58
+ url: `${this.url}${e ? "&" : "?"}page=${t}`,
59
+ label: t.toString(),
60
+ current: this.currentPage === t,
61
+ disabled: !1
62
+ };
63
+ }
64
+ /** Generates pagination links based on the last page and current page */
65
+ generateLinks() {
66
+ this.lastPage && this.lastPage > 5 ? this.links = this.getPaginationGenerator(this.currentPage || 1, this.lastPage).map((t) => typeof t == "number" ? this.generateLink(t) : t) : this.lastPage && (this.links = Array.from({ length: this.lastPage }).map((t, e) => this.generateLink(e + 1)));
67
+ }
68
+ /**
69
+ * Creates a pagination range based on delta, current, and total pages
70
+ * @param {number} current - Current page number
71
+ * @param {number} total - Total number of pages
72
+ * @param {number} delta - Range of pages to display around the current page
73
+ * @returns {(number | string)[]} - Range of page numbers or ellipses
74
+ */
75
+ getPaginationGenerator(t, e) {
76
+ const a = [];
77
+ if (e <= 5)
78
+ for (let n = 1; n <= e; n++)
79
+ a.push(n);
80
+ else {
81
+ a.push(1), t - 1 > 2 && a.push("...");
82
+ for (let n = Math.max(2, t - 1); n <= Math.min(e - 1, t + 1); n++)
83
+ a.push(n);
84
+ t + 1 < e - 1 && a.push("..."), a.push(e);
85
+ }
86
+ return a;
87
+ }
88
+ /**
89
+ * Formats the current page results information for display
90
+ * @returns {string} - Formatted page result information
91
+ */
92
+ pageResults() {
93
+ return this.total > 0 ? this.total > this.perPage ? `${this.perPage * ((this.currentPage || 1) - 1) + 1} - ${this.perPage * (this.currentPage || 1) >= this.total ? this.total : this.perPage * (this.currentPage || 1)} of ${this.total}` : `${this.total}` : "";
94
+ }
95
+ /**
96
+ * Handles a page click event, updating the current page and dispatching an event
97
+ * @param {MouseEvent} event - Click event
98
+ * @param {number} newPage - New page number
99
+ */
100
+ handlePageClick(t, e) {
101
+ if (this.mode !== "navigator" && (t.preventDefault(), e !== this.currentPage)) {
102
+ this.links = this.links.map((a) => typeof a == "object" ? Object.assign(Object.assign({}, a), { current: parseInt(a.label) === e }) : a);
103
+ const s = new CustomEvent("page", {
104
+ detail: e,
105
+ bubbles: !0,
106
+ composed: !0
107
+ });
108
+ this.hostEl.dispatchEvent(s), this.currentPage = e;
109
+ }
110
+ }
111
+ render() {
112
+ return i("div", { key: "1d53f69179791434224f152503c0b81c4cfc7cd3" }, this.total > 0 && this.mode === "default" && i("p", { key: "00ae324b49d62a74feee9d1cde21d67cd726ecf0", class: "f-ui-03 text-lightest mb-28 w-full text-center" }, i("span", { key: "dedf2ce2700eae9d1386b305ec1d1904b133f992", class: "sr-only" }, "Results:"), this.pageResults()), this.mode === "navigator" || this.lastPage && this.lastPage > 1 ? i("nav", { "aria-label": "Pagination" }, i("ul", { class: "flex items-center justify-center gap-x-8" }, i("li", { class: "mr-auto" }, i("eds-link", { label: this.prevLabel, url: this.mode === "navigator" ? this.prevUrl || "#" : this.isFirstPage() ? "#" : this.generateLink(this.currentPage - 1).url, disabled: this.mode === "navigator" ? !this.prevUrl : this.isFirstPage(), "aria-label": "Previous page", icon: "chevron-left", "icon-pos": "left", size: "small", "icon-small": "true", intent: "strong", "hide-label-on-small-screen": !0, class: "!p-8 lg:!pr-12", onClick: (t) => {
113
+ this.mode === "default" && (this.isFirstPage() ? t.preventDefault() : this.handlePageClick(t, (this.currentPage || 1) - 1));
114
+ } })), this.mode === "default" && this.links.map((t, e) => i("li", { key: e, class: "f-ui-02 flex h-36 items-center justify-center" }, typeof t == "string" ? i("span", { class: "flex items-center justify-center" }, t) : i("eds-link", { url: t.url, "aria-label": t.ariaLabel, label: t.label, current: t.current, size: "small", class: "!p-8", intent: t.current ? "secondary" : "ghost", onClick: (s) => this.handlePageClick(s, parseInt(t.label)) }))), i("li", { class: "ml-auto" }, i("eds-link", { label: this.nextLabel, url: this.mode === "navigator" ? this.nextUrl || "#" : this.isLastPage() ? "#" : this.generateLink(this.currentPage + 1).url, disabled: this.mode === "navigator" ? !this.nextUrl : this.isLastPage(), "aria-label": "Next page", size: "small", "icon-small": "true", icon: "chevron-right", intent: "strong", "hide-label-on-small-screen": !0, class: "!p-8 lg:!pl-12 flex items-center gap-1 py-4 transition-colors", onClick: (t) => {
115
+ this.mode === "default" && (this.isLastPage() ? t.preventDefault() : this.handlePageClick(t, (this.currentPage || 1) + 1));
116
+ } })))) : null);
117
+ }
118
+ get hostEl() {
119
+ return d(this);
120
+ }
121
+ static get watchers() {
122
+ return {
123
+ currentPage: ["onPageOrLastPageChange"],
124
+ lastPage: ["onPageOrLastPageChange"]
125
+ };
126
+ }
127
+ };
128
+ p.style = u;
129
+ const m = "table{text-indent:0;border-color:inherit;border-collapse:collapse;}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.pt-32{padding-top:2rem}.pt-40{padding-top:2.5rem}.pt-48{padding-top:3rem}.pb-28{padding-bottom:1.75rem}.pb-60{padding-bottom:3.75rem}.mt-20{margin-top:1.25rem}.mt-28{margin-top:1.75rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.overflow-x-auto{overflow-x:auto}.mt-6{margin-top:0.375rem}.p-0{padding:0rem}.m-0{margin:0rem}.border{border-width:1px}.border-softer{border:1px solid rgba(0, 0, 0, .1)}.even\\:bg-inverse-softer:nth-child(even){background-color:rgba(255, 255, 255, .15)}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.text-center{text-align:center}.break-words{overflow-wrap:anywhere}", b = m, v = class {
130
+ constructor(t) {
131
+ h(this, t), this.handleResize = () => {
132
+ this.updateContainerWidth();
133
+ }, this.data = null, this.endpoint = null, this.config = {}, this.rowsPerPage = 10, this.paginationEnabled = !0, this.searchEnabled = !1, this.hostWidth = void 0, this.columnSize = "default", this.tbData = [], this.columns = [], this.currentPage = 1, this.parsedConfig = {}, this.totalRows = 0, this.searchQuery = "", this.containerWidth = 0;
134
+ }
135
+ handleDataChange() {
136
+ this.parseData();
137
+ }
138
+ handleConfigChange() {
139
+ this.parseConfig();
140
+ }
141
+ componentWillLoad() {
142
+ this.parseConfig(), this.data ? this.parseData() : this.endpoint && this.fetchData();
143
+ }
144
+ componentDidLoad() {
145
+ this.updateContainerWidth(), window.addEventListener("resize", this.handleResize), this.setupPaginationListener();
146
+ }
147
+ componentDidUpdate() {
148
+ this.setupPaginationListener();
149
+ }
150
+ disconnectedCallback() {
151
+ window.removeEventListener("resize", this.handleResize);
152
+ }
153
+ updateContainerWidth() {
154
+ this.hostWidth && this.hostWidth.trim() !== "" ? this.containerWidth = Number(this.hostWidth) : this.hostEl.parentElement instanceof HTMLElement ? this.containerWidth = this.hostEl.parentElement.getBoundingClientRect().width : this.containerWidth = 400;
155
+ }
156
+ parseData() {
157
+ try {
158
+ this.tbData = c(this.data), this.totalRows = this.tbData.length, this.updateColumns(), this.currentPage = 1;
159
+ } catch (t) {
160
+ console.error("Failed to parse data:", t), this.tbData = [];
161
+ }
162
+ }
163
+ parseConfig() {
164
+ try {
165
+ this.parsedConfig = typeof this.config == "string" ? JSON.parse(this.config) : this.config;
166
+ } catch (t) {
167
+ console.error("Failed to parse config:", t), this.parsedConfig = {};
168
+ }
169
+ }
170
+ async fetchData() {
171
+ try {
172
+ const e = await (await fetch(this.endpoint)).json();
173
+ this.data = e;
174
+ } catch (t) {
175
+ console.error("Failed to fetch data:", t);
176
+ }
177
+ }
178
+ setupPaginationListener() {
179
+ if (!this.shouldEnablePagination())
180
+ return;
181
+ const t = this.hostEl.shadowRoot.querySelector("eds-pagination");
182
+ t && !t.hasAttribute("listener-attached") && (t.addEventListener("page", (e) => this.handlePageChange(e.detail)), t.setAttribute("listener-attached", "true"));
183
+ }
184
+ getFilteredRows() {
185
+ return this.tbData.filter((t) => Object.values(t).some((e) => e.toString().toLowerCase().includes(this.searchQuery.toLowerCase())));
186
+ }
187
+ getPaginatedRows() {
188
+ const t = this.getFilteredRows();
189
+ this.totalRows = t.length;
190
+ const e = (this.currentPage - 1) * this.rowsPerPage;
191
+ return t.slice(e, e + this.rowsPerPage);
192
+ }
193
+ handlePageChange(t) {
194
+ this.currentPage = t, g({
195
+ category: "ui-component",
196
+ parentContext: null,
197
+ tag: `${this.hostEl.tagName.toLowerCase()}/eds-pagination`,
198
+ name: `${t}` || "",
199
+ action: "page"
200
+ });
201
+ }
202
+ handleSearch(t) {
203
+ this.searchQuery = t.target.value, this.currentPage = 1;
204
+ }
205
+ renderCell(t, e) {
206
+ var s;
207
+ const a = (s = this.parsedConfig[e]) === null || s === void 0 ? void 0 : s.format;
208
+ return a === "uppercase" ? t == null ? void 0 : t.toString().toUpperCase() : a === "svg" ? i("div", { innerHTML: t }) : a === "bold" ? i("strong", null, t) : a === "code" ? i("code", null, t) : t;
209
+ }
210
+ shouldEnablePagination() {
211
+ return this.paginationEnabled && this.totalRows > this.rowsPerPage;
212
+ }
213
+ updateColumns() {
214
+ this.columns = this.tbData.length > 0 ? Object.keys(this.tbData[0]) : [];
215
+ }
216
+ getVisibleColumnsCount() {
217
+ return this.columns.filter((t) => {
218
+ var e;
219
+ return !(!((e = this.parsedConfig[t]) === null || e === void 0) && e.hidden);
220
+ }).length;
221
+ }
222
+ divisionFactor() {
223
+ let t = 1;
224
+ return this.columnSize === "medium" ? t = 2 : this.columnSize === "large" && (t = 4), t;
225
+ }
226
+ render() {
227
+ const t = this.hostWidth && this.hostWidth.trim() !== "" ? Number(this.hostWidth) : this.containerWidth || 400, e = this.getVisibleColumnsCount(), s = e > 0 ? Math.floor(t / e * this.divisionFactor()) : 100, a = this.getPaginatedRows(), n = Math.ceil(this.totalRows / this.rowsPerPage);
228
+ return i("div", { key: "9ac7ad4f02237c02eaf5d3b351ded21bce29bd6c" }, this.searchEnabled && i("div", { key: "1cecf9a9089391c3bce72dd53a6f5ffa92692661" }, i("eds-input-field", {
229
+ key: 1,
230
+ name: "search",
231
+ "aria-label": "Search",
232
+ type: "text",
233
+ placeholder: "Search...",
234
+ // @ts-ignore
235
+ onInput: (o) => this.handleSearch(o)
236
+ })), i("div", { key: "435bbfd0a4dd3ddd0a7766863cdd8c2eaf41eb8f", class: "mt-20" }, i("table", { key: "4785490532015b7069be068e80135220f37c3955", class: "block overflow-x-auto mt-6 p-0" }, i("thead", { key: "8a99a961cf350bca26b1f73b8ffd6c8e1c48378f" }, i("tr", { key: "a4ee04e342687830e905a3bd5217e53e513f0167", class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((o) => {
237
+ var r;
238
+ return !(!((r = this.parsedConfig[o]) === null || r === void 0) && r.hidden) && i("th", { class: "m-0 py-8 border border-softer f-ui-02 break-words", style: { minWidth: `${s - 4}px` } }, o);
239
+ }))), i("tbody", { key: "3c764ac7137d1b21f45003c6df5324e7d0db749f" }, a.map((o) => i("tr", { class: "m-0 p-0 border border-softer even:bg-inverse-softer" }, this.columns.map((r) => {
240
+ var l;
241
+ return !(!((l = this.parsedConfig[r]) === null || l === void 0) && l.hidden) && i("td", { class: "text-center border border-softer m-0 py-8 f-ui-2 break-words", style: { minWidth: `${s - 4}px` } }, this.renderCell(o[r], r));
242
+ })))))), this.shouldEnablePagination() && i("div", { key: "98a1179b45fbc1b2f079825c899410ef4faf8c45", class: "mt-20" }, i("eds-pagination", { key: "662c479139658ea7f3d2a3955c77e24d44dd6e74", currentPage: this.currentPage, lastPage: n, perPage: this.rowsPerPage, total: this.totalRows, mode: "default" })));
243
+ }
244
+ get hostEl() {
245
+ return d(this);
246
+ }
247
+ static get watchers() {
248
+ return {
249
+ data: ["handleDataChange", "parseData"],
250
+ config: ["handleConfigChange"]
251
+ };
252
+ }
253
+ };
254
+ v.style = b;
255
+ export {
256
+ p as eds_pagination,
257
+ v as eds_table
258
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-7ljGsgwC.js"),g=require("./analytics-44b1416b-ol77SdQE.js"),c=require("./sharedUtils-a550989c-m4pF1Vqy.js"),u="ul,menu{list-style:none;margin:0;padding:0}.f-ui-03{font-family:var(--f-ui-03-fontFamily);font-weight:var(--f-ui-03-fontWeight);font-size:var(--f-ui-03-fontSize);line-height:var(--f-ui-03-lineHeight);letter-spacing:var(--f-ui-03-letterSpacing)}.f-ui-03-light{font-family:var(--f-ui-03-light-fontFamily);font-weight:var(--f-ui-03-light-fontWeight);font-size:var(--f-ui-03-light-fontSize);line-height:var(--f-ui-03-light-lineHeight);letter-spacing:var(--f-ui-03-light-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.f-ui-02-light{font-family:var(--f-ui-02-light-fontFamily);font-weight:var(--f-ui-02-light-fontWeight);font-size:var(--f-ui-02-light-fontSize);line-height:var(--f-ui-02-light-lineHeight);letter-spacing:var(--f-ui-02-light-letterSpacing)}.text-lightest{color:var(--grey-500)}.mb-28{margin-bottom:1.75rem}.w-full{width:100%}.w-20{width:1.25rem}.h-20{height:1.25rem}.h-28{height:1.75rem}.h-32{height:2rem}.h-36{height:2.25rem}.text-center{text-align:center}.flex{display:flex}.inline-flex{display:inline-flex}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-x-8{-moz-column-gap:0.5rem;column-gap:0.5rem}.mr-auto{margin-right:auto}.ml-auto{margin-left:auto}.\\!p-8{padding:0.5rem !important}.ml-4{margin-left:0.25rem}.mr-4{margin-right:0.25rem}.hidden{display:none}.gap-1{gap:0.0625rem}.py-4{padding-top:0.25rem;padding-bottom:0.25rem}.transition-colors{transition-property:color, background-color, border-color, text-decoration-color, fill, stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}@media (min-width: 900px){.lg\\:\\!pr-12{padding-right:0.75rem !important}.lg\\:flex{display:flex}}",f=u,h=class{constructor(t){i.registerInstance(this,t),this.currentPage=void 0,this.lastPage=void 0,this.perPage=10,this.total=0,this.url="",this.mode="default",this.prevLabel="Prev",this.nextLabel="Next",this.prevUrl="",this.nextUrl="",this.links=[]}componentWillLoad(){this.mode==="default"&&this.generateLinks()}componentDidLoad(){this.hostEl.shadowRoot.querySelectorAll("eds-link").forEach(e=>{this.emitContext(e)})}emitContext(t){const e=new CustomEvent("parentContext",{detail:{componentName:this.hostEl.tagName.toLowerCase(),identifier:null}});t.dispatchEvent(e)}onPageOrLastPageChange(){this.mode==="default"&&this.generateLinks()}isFirstPage(){return this.currentPage===1}isLastPage(){return this.currentPage===this.lastPage}generateLink(t){const e=this.url.includes("?");return{ariaLabel:`Page ${t}`,url:`${this.url}${e?"&":"?"}page=${t}`,label:t.toString(),current:this.currentPage===t,disabled:!1}}generateLinks(){this.lastPage&&this.lastPage>5?this.links=this.getPaginationGenerator(this.currentPage||1,this.lastPage).map(t=>typeof t=="number"?this.generateLink(t):t):this.lastPage&&(this.links=Array.from({length:this.lastPage}).map((t,e)=>this.generateLink(e+1)))}getPaginationGenerator(t,e){const a=[];if(e<=5)for(let n=1;n<=e;n++)a.push(n);else{a.push(1),t-1>2&&a.push("...");for(let n=Math.max(2,t-1);n<=Math.min(e-1,t+1);n++)a.push(n);t+1<e-1&&a.push("..."),a.push(e)}return a}pageResults(){return this.total>0?this.total>this.perPage?`${this.perPage*((this.currentPage||1)-1)+1} - ${this.perPage*(this.currentPage||1)>=this.total?this.total:this.perPage*(this.currentPage||1)} of ${this.total}`:`${this.total}`:""}handlePageClick(t,e){if(this.mode!=="navigator"&&(t.preventDefault(),e!==this.currentPage)){this.links=this.links.map(a=>typeof a=="object"?Object.assign(Object.assign({},a),{current:parseInt(a.label)===e}):a);const s=new CustomEvent("page",{detail:e,bubbles:!0,composed:!0});this.hostEl.dispatchEvent(s),this.currentPage=e}}render(){return i.h("div",{key:"1d53f69179791434224f152503c0b81c4cfc7cd3"},this.total>0&&this.mode==="default"&&i.h("p",{key:"00ae324b49d62a74feee9d1cde21d67cd726ecf0",class:"f-ui-03 text-lightest mb-28 w-full text-center"},i.h("span",{key:"dedf2ce2700eae9d1386b305ec1d1904b133f992",class:"sr-only"},"Results:"),this.pageResults()),this.mode==="navigator"||this.lastPage&&this.lastPage>1?i.h("nav",{"aria-label":"Pagination"},i.h("ul",{class:"flex items-center justify-center gap-x-8"},i.h("li",{class:"mr-auto"},i.h("eds-link",{label:this.prevLabel,url:this.mode==="navigator"?this.prevUrl||"#":this.isFirstPage()?"#":this.generateLink(this.currentPage-1).url,disabled:this.mode==="navigator"?!this.prevUrl:this.isFirstPage(),"aria-label":"Previous page",icon:"chevron-left","icon-pos":"left",size:"small","icon-small":"true",intent:"strong","hide-label-on-small-screen":!0,class:"!p-8 lg:!pr-12",onClick:t=>{this.mode==="default"&&(this.isFirstPage()?t.preventDefault():this.handlePageClick(t,(this.currentPage||1)-1))}})),this.mode==="default"&&this.links.map((t,e)=>i.h("li",{key:e,class:"f-ui-02 flex h-36 items-center justify-center"},typeof t=="string"?i.h("span",{class:"flex items-center justify-center"},t):i.h("eds-link",{url:t.url,"aria-label":t.ariaLabel,label:t.label,current:t.current,size:"small",class:"!p-8",intent:t.current?"secondary":"ghost",onClick:s=>this.handlePageClick(s,parseInt(t.label))}))),i.h("li",{class:"ml-auto"},i.h("eds-link",{label:this.nextLabel,url:this.mode==="navigator"?this.nextUrl||"#":this.isLastPage()?"#":this.generateLink(this.currentPage+1).url,disabled:this.mode==="navigator"?!this.nextUrl:this.isLastPage(),"aria-label":"Next page",size:"small","icon-small":"true",icon:"chevron-right",intent:"strong","hide-label-on-small-screen":!0,class:"!p-8 lg:!pl-12 flex items-center gap-1 py-4 transition-colors",onClick:t=>{this.mode==="default"&&(this.isLastPage()?t.preventDefault():this.handlePageClick(t,(this.currentPage||1)+1))}})))):null)}get hostEl(){return i.getElement(this)}static get watchers(){return{currentPage:["onPageOrLastPageChange"],lastPage:["onPageOrLastPageChange"]}}};h.style=f;const p="table{text-indent:0;border-color:inherit;border-collapse:collapse;}.container{width:calc(var(--container-width, 100%) - (2 * var(--breakout-container-outer-gutter, var(--container-outer-gutter, var(--outer-gutter, 0)))));margin-right:auto;margin-left:auto}.container>*{--container-outer-gutter:0;--breakout-container-outer-gutter:0}.pt-32{padding-top:2rem}.pt-40{padding-top:2.5rem}.pt-48{padding-top:3rem}.pb-28{padding-bottom:1.75rem}.pb-60{padding-bottom:3.75rem}.mt-20{margin-top:1.25rem}.mt-28{margin-top:1.75rem}.block{display:block}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.overflow-x-auto{overflow-x:auto}.mt-6{margin-top:0.375rem}.p-0{padding:0rem}.m-0{margin:0rem}.border{border-width:1px}.border-softer{border:1px solid rgba(0, 0, 0, .1)}.even\\:bg-inverse-softer:nth-child(even){background-color:rgba(255, 255, 255, .15)}.px-20{padding-left:1.25rem;padding-right:1.25rem}.py-8{padding-top:0.5rem;padding-bottom:0.5rem}.f-ui-01{font-family:var(--f-ui-01-fontFamily);font-weight:var(--f-ui-01-fontWeight);font-size:var(--f-ui-01-fontSize);line-height:var(--f-ui-01-lineHeight);letter-spacing:var(--f-ui-01-letterSpacing)}.f-ui-02{font-family:var(--f-ui-02-fontFamily);font-weight:var(--f-ui-02-fontWeight);font-size:var(--f-ui-02-fontSize);line-height:var(--f-ui-02-lineHeight);letter-spacing:var(--f-ui-02-letterSpacing)}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.text-center{text-align:center}.break-words{overflow-wrap:anywhere}",m=p,d=class{constructor(t){i.registerInstance(this,t),this.handleResize=()=>{this.updateContainerWidth()},this.data=null,this.endpoint=null,this.config={},this.rowsPerPage=10,this.paginationEnabled=!0,this.searchEnabled=!1,this.hostWidth=void 0,this.columnSize="default",this.tbData=[],this.columns=[],this.currentPage=1,this.parsedConfig={},this.totalRows=0,this.searchQuery="",this.containerWidth=0}handleDataChange(){this.parseData()}handleConfigChange(){this.parseConfig()}componentWillLoad(){this.parseConfig(),this.data?this.parseData():this.endpoint&&this.fetchData()}componentDidLoad(){this.updateContainerWidth(),window.addEventListener("resize",this.handleResize),this.setupPaginationListener()}componentDidUpdate(){this.setupPaginationListener()}disconnectedCallback(){window.removeEventListener("resize",this.handleResize)}updateContainerWidth(){this.hostWidth&&this.hostWidth.trim()!==""?this.containerWidth=Number(this.hostWidth):this.hostEl.parentElement instanceof HTMLElement?this.containerWidth=this.hostEl.parentElement.getBoundingClientRect().width:this.containerWidth=400}parseData(){try{this.tbData=c.parseData(this.data),this.totalRows=this.tbData.length,this.updateColumns(),this.currentPage=1}catch(t){console.error("Failed to parse data:",t),this.tbData=[]}}parseConfig(){try{this.parsedConfig=typeof this.config=="string"?JSON.parse(this.config):this.config}catch(t){console.error("Failed to parse config:",t),this.parsedConfig={}}}async fetchData(){try{const e=await(await fetch(this.endpoint)).json();this.data=e}catch(t){console.error("Failed to fetch data:",t)}}setupPaginationListener(){if(!this.shouldEnablePagination())return;const t=this.hostEl.shadowRoot.querySelector("eds-pagination");t&&!t.hasAttribute("listener-attached")&&(t.addEventListener("page",e=>this.handlePageChange(e.detail)),t.setAttribute("listener-attached","true"))}getFilteredRows(){return this.tbData.filter(t=>Object.values(t).some(e=>e.toString().toLowerCase().includes(this.searchQuery.toLowerCase())))}getPaginatedRows(){const t=this.getFilteredRows();this.totalRows=t.length;const e=(this.currentPage-1)*this.rowsPerPage;return t.slice(e,e+this.rowsPerPage)}handlePageChange(t){this.currentPage=t,g.sendAnalytics({category:"ui-component",parentContext:null,tag:`${this.hostEl.tagName.toLowerCase()}/eds-pagination`,name:`${t}`||"",action:"page"})}handleSearch(t){this.searchQuery=t.target.value,this.currentPage=1}renderCell(t,e){var s;const a=(s=this.parsedConfig[e])===null||s===void 0?void 0:s.format;return a==="uppercase"?t==null?void 0:t.toString().toUpperCase():a==="svg"?i.h("div",{innerHTML:t}):a==="bold"?i.h("strong",null,t):a==="code"?i.h("code",null,t):t}shouldEnablePagination(){return this.paginationEnabled&&this.totalRows>this.rowsPerPage}updateColumns(){this.columns=this.tbData.length>0?Object.keys(this.tbData[0]):[]}getVisibleColumnsCount(){return this.columns.filter(t=>{var e;return!(!((e=this.parsedConfig[t])===null||e===void 0)&&e.hidden)}).length}divisionFactor(){let t=1;return this.columnSize==="medium"?t=2:this.columnSize==="large"&&(t=4),t}render(){const t=this.hostWidth&&this.hostWidth.trim()!==""?Number(this.hostWidth):this.containerWidth||400,e=this.getVisibleColumnsCount(),s=e>0?Math.floor(t/e*this.divisionFactor()):100,a=this.getPaginatedRows(),n=Math.ceil(this.totalRows/this.rowsPerPage);return i.h("div",{key:"9ac7ad4f02237c02eaf5d3b351ded21bce29bd6c"},this.searchEnabled&&i.h("div",{key:"1cecf9a9089391c3bce72dd53a6f5ffa92692661"},i.h("eds-input-field",{key:1,name:"search","aria-label":"Search",type:"text",placeholder:"Search...",onInput:o=>this.handleSearch(o)})),i.h("div",{key:"435bbfd0a4dd3ddd0a7766863cdd8c2eaf41eb8f",class:"mt-20"},i.h("table",{key:"4785490532015b7069be068e80135220f37c3955",class:"block overflow-x-auto mt-6 p-0"},i.h("thead",{key:"8a99a961cf350bca26b1f73b8ffd6c8e1c48378f"},i.h("tr",{key:"a4ee04e342687830e905a3bd5217e53e513f0167",class:"m-0 p-0 border border-softer even:bg-inverse-softer"},this.columns.map(o=>{var r;return!(!((r=this.parsedConfig[o])===null||r===void 0)&&r.hidden)&&i.h("th",{class:"m-0 py-8 border border-softer f-ui-02 break-words",style:{minWidth:`${s-4}px`}},o)}))),i.h("tbody",{key:"3c764ac7137d1b21f45003c6df5324e7d0db749f"},a.map(o=>i.h("tr",{class:"m-0 p-0 border border-softer even:bg-inverse-softer"},this.columns.map(r=>{var l;return!(!((l=this.parsedConfig[r])===null||l===void 0)&&l.hidden)&&i.h("td",{class:"text-center border border-softer m-0 py-8 f-ui-2 break-words",style:{minWidth:`${s-4}px`}},this.renderCell(o[r],r))})))))),this.shouldEnablePagination()&&i.h("div",{key:"98a1179b45fbc1b2f079825c899410ef4faf8c45",class:"mt-20"},i.h("eds-pagination",{key:"662c479139658ea7f3d2a3955c77e24d44dd6e74",currentPage:this.currentPage,lastPage:n,perPage:this.rowsPerPage,total:this.totalRows,mode:"default"})))}get hostEl(){return i.getElement(this)}static get watchers(){return{data:["handleDataChange","parseData"],config:["handleConfigChange"]}}};d.style=m;exports.eds_pagination=h;exports.eds_table=d;
@@ -0,0 +1,21 @@
1
+ import { r as t, h as r } from "./index-l365C9dI.mjs";
2
+ const a = ".w-full{width:100%}.h-full{height:100%}.bg-default{background-color:var(--grey-200)}.rounded-lg{border-radius:16px}.h-24{height:1.5rem}.border{border-width:1px}.border-softer{border:2px solid rgba(0, 0, 0, .1 )}.overflow-hidden{overflow:hidden}.bg-accent{background-color:var(--green-500)}.bg-\\[\\#0034CB\\]{--tw-text-opacity:1;background-color:rgb(0 52 203 / var(--tw-text-opacity))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-300{transition-duration:300ms}.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}", o = a, i = class {
3
+ constructor(e) {
4
+ t(this, e), this.value = 0;
5
+ }
6
+ /**
7
+ * Method to update the progress value externally.
8
+ * @param newValue The new progress value (0-100).
9
+ */
10
+ async updateValue(e) {
11
+ this.value = Math.min(100, Math.max(0, e));
12
+ }
13
+ render() {
14
+ const e = this.value;
15
+ return r("div", { key: "0f47fedbf9d44887f65b399e184215f0937b1df1", role: "progressbar", "aria-valuemin": "0", "aria-valuemax": "100", "aria-valuenow": e, "aria-valuetext": `${e}%`, class: "outer w-full bg-default rounded-lg h-24 border border-softer overflow-hidden" }, r("div", { key: "a2d095d778842c969832ea6b1ba7f7ef917d1390", class: "inner h-full rounded-lg bg-accent transition-all duration-300 flex items-center justify-center text-default f-body-02", style: { width: `${e}%` } }, e, "%"));
16
+ }
17
+ };
18
+ i.style = o;
19
+ export {
20
+ i as eds_progress_bar
21
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-7ljGsgwC.js"),a=".w-full{width:100%}.h-full{height:100%}.bg-default{background-color:var(--grey-200)}.rounded-lg{border-radius:16px}.h-24{height:1.5rem}.border{border-width:1px}.border-softer{border:2px solid rgba(0, 0, 0, .1 )}.overflow-hidden{overflow:hidden}.bg-accent{background-color:var(--green-500)}.bg-\\[\\#0034CB\\]{--tw-text-opacity:1;background-color:rgb(0 52 203 / var(--tw-text-opacity))}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-300{transition-duration:300ms}.flex{display:flex}.items-center{align-items:center}.justify-center{justify-content:center}.text-default{color:var(--black)}.text-inverse{color:var(--white)}.f-body-02{font-family:var(--f-body-02-fontFamily);font-weight:var(--f-body-02-fontWeight);font-size:var(--f-body-02-fontSize);line-height:var(--f-body-02-lineHeight);letter-spacing:var(--f-body-02-letterSpacing)}",o=a,t=class{constructor(e){r.registerInstance(this,e),this.value=0}async updateValue(e){this.value=Math.min(100,Math.max(0,e))}render(){const e=this.value;return r.h("div",{key:"0f47fedbf9d44887f65b399e184215f0937b1df1",role:"progressbar","aria-valuemin":"0","aria-valuemax":"100","aria-valuenow":e,"aria-valuetext":`${e}%`,class:"outer w-full bg-default rounded-lg h-24 border border-softer overflow-hidden"},r.h("div",{key:"a2d095d778842c969832ea6b1ba7f7ef917d1390",class:"inner h-full rounded-lg bg-accent transition-all duration-300 flex items-center justify-center text-default f-body-02",style:{width:`${e}%`}},e,"%"))}};t.style=o;exports.eds_progress_bar=t;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index-7ljGsgwC.js"),s=":host{display:inline-block}.block{display:block}.stars{display:flex;gap:0.25rem;cursor:pointer}.star{color:var(--star-empty-color, #ccc);transition:color 0.2s ease-in-out}.star.filled{color:var(--green-500);}.star:hover,.star.filled:hover{transform:scale(1.2)}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.my-4{margin-top:0.25rem;margin-bottom:0.25rem}.my-8{margin-top:0.5rem;margin-bottom:0.5rem}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.0625rem * var(--tw-space-x-reverse));margin-left:calc(0.0625rem * calc(1 - var(--tw-space-x-reverse)))}",o=s,n=class{constructor(e){r.registerInstance(this,e),this.rating=r.createEvent(this,"rating",7),this.ratingType="star",this.ratingCount=5,this.selectedRating=0}componentDidLoad(){this.el.shadowRoot.querySelectorAll("eds-button").forEach(t=>{this.emitContext(t)})}emitContext(e){const t=new CustomEvent("parentContext",{detail:{componentName:this.el.tagName.toLowerCase(),identifier:this.selectedRating}});e.dispatchEvent(t)}handleClick(e){this.selectedRating=e,this.rating.emit(e)}render(){return r.h("div",{key:"d1650c37f02bf467f888d0afd0a025198bc0eedc",role:"radiogroup",class:"stars flex space-x-1 my-8"},Array.from({length:this.ratingCount},(e,t)=>{const a=t+1,i=a<=this.selectedRating;return r.h("eds-button",{icon:this.ratingType,role:"radio","aria-checked":i?"true":"false","aria-label":this.ratingType,onClick:()=>this.handleClick(a),tabIndex:this.selectedRating===0&&t===0||i?0:-1,intent:i?"primary":"ghost",size:"large","extra-class":"p-2"})}))}get el(){return r.getElement(this)}};n.style=o;exports.eds_rating=n;
@@ -0,0 +1,61 @@
1
+ import { r as s, c as n, h as i, g as o } from "./index-l365C9dI.mjs";
2
+ const l = ":host{display:inline-block}.block{display:block}.stars{display:flex;gap:0.25rem;cursor:pointer}.star{color:var(--star-empty-color, #ccc);transition:color 0.2s ease-in-out}.star.filled{color:var(--green-500);}.star:hover,.star.filled:hover{transform:scale(1.2)}.flex{display:flex}.inline-flex{display:inline-flex}.flex-col{flex-direction:column}.mt-4{margin-top:0.25rem}.mt-6{margin-top:0.375rem}.mt-8{margin-top:0.5rem}.my-4{margin-top:0.25rem;margin-bottom:0.25rem}.my-8{margin-top:0.5rem;margin-bottom:0.5rem}.my-16{margin-top:1rem;margin-bottom:1rem}.my-20{margin-top:1.25rem;margin-bottom:1.25rem}.space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(0.0625rem * var(--tw-space-x-reverse));margin-left:calc(0.0625rem * calc(1 - var(--tw-space-x-reverse)))}", c = l, m = class {
3
+ constructor(t) {
4
+ s(this, t), this.rating = n(this, "rating", 7), this.ratingType = "star", this.ratingCount = 5, this.selectedRating = 0;
5
+ }
6
+ /**
7
+ * Lifecycle method that runs when the component has fully loaded.
8
+ * It emits a custom event for each `eds-button` element contained within the breadcrumb.
9
+ */
10
+ componentDidLoad() {
11
+ this.el.shadowRoot.querySelectorAll("eds-button").forEach((e) => {
12
+ this.emitContext(e);
13
+ });
14
+ }
15
+ /**
16
+ * Emits a custom event called `parentContext` for a given link element.
17
+ * This event provides context information about the breadcrumb component.
18
+ *
19
+ * @param btnElement - The link element to which the event will be dispatched.
20
+ */
21
+ emitContext(t) {
22
+ const e = new CustomEvent("parentContext", {
23
+ detail: {
24
+ componentName: this.el.tagName.toLowerCase(),
25
+ identifier: this.selectedRating
26
+ }
27
+ });
28
+ t.dispatchEvent(e);
29
+ }
30
+ /**
31
+ * Handles the click event on a star.
32
+ * @param rating - The selected rating value.
33
+ */
34
+ handleClick(t) {
35
+ this.selectedRating = t, this.rating.emit(t);
36
+ }
37
+ render() {
38
+ return i("div", { key: "d1650c37f02bf467f888d0afd0a025198bc0eedc", role: "radiogroup", class: "stars flex space-x-1 my-8" }, Array.from({ length: this.ratingCount }, (t, e) => {
39
+ const a = e + 1, r = a <= this.selectedRating;
40
+ return i("eds-button", {
41
+ icon: this.ratingType,
42
+ role: "radio",
43
+ "aria-checked": r ? "true" : "false",
44
+ "aria-label": this.ratingType,
45
+ onClick: () => this.handleClick(a),
46
+ tabIndex: this.selectedRating === 0 && e === 0 || r ? 0 : -1,
47
+ intent: r ? "primary" : "ghost",
48
+ size: "large",
49
+ "extra-class": "p-2"
50
+ // Optional padding or styling for the star button
51
+ });
52
+ }));
53
+ }
54
+ get el() {
55
+ return o(this);
56
+ }
57
+ };
58
+ m.style = c;
59
+ export {
60
+ m as eds_rating
61
+ };
@@ -0,0 +1,39 @@
1
+ import { r as t, h as s } from "./index-l365C9dI.mjs";
2
+ const a = "", n = a, h = class {
3
+ constructor(e) {
4
+ t(this, e), this.tag = "section", this.sectionTitle = "", this.headingLevel = "h2";
5
+ }
6
+ render() {
7
+ const e = this.tag;
8
+ return s(e, { key: "f07162204271dca0f1ec8a3d309ab9d38a9fff4f" }, s("eds-section-heading", { key: "c4db2a67151fcec22306f624b071725518292e65", headingLevel: this.headingLevel, sectionTitle: this.sectionTitle }), s("slot", { key: "e610f4777f1b334e20482862504085f5317a63df" }));
9
+ }
10
+ };
11
+ h.style = n;
12
+ const c = class {
13
+ constructor(e) {
14
+ t(this, e), this.sectionTitle = void 0, this.withContainer = !0, this.headingLevel = "h2", this.tag = "div", this.spacingLarge = !1;
15
+ }
16
+ getHeadingClass() {
17
+ return {
18
+ h1: "f-heading-01",
19
+ h2: "f-heading-02",
20
+ h3: "f-heading-03",
21
+ h4: "f-heading-04",
22
+ h5: "f-heading-05",
23
+ h6: "f-heading-06"
24
+ }[this.headingLevel];
25
+ }
26
+ render() {
27
+ const e = this.tag, i = this.headingLevel;
28
+ return s(e, { key: "efa6dd7e228db2b86961efdff9b5dd9729a1a24b", class: {
29
+ "ui-section-header flex flex-wrap items-center justify-between gap-x-12 gap-y-8": !0,
30
+ container: this.withContainer,
31
+ "pt-48": this.spacingLarge,
32
+ "pt-28": !this.spacingLarge
33
+ } }, s(i, { key: "dd50f0fe3baf084c71dc4c8fa745484645a58f76", class: this.getHeadingClass() }, this.sectionTitle));
34
+ }
35
+ };
36
+ export {
37
+ h as eds_section_core,
38
+ c as eds_section_heading
39
+ };