keycloakify 10.0.0-rc.8 → 10.0.0-rc.80

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 (824) hide show
  1. package/PUBLIC_URL.d.ts +1 -1
  2. package/PUBLIC_URL.js +3 -3
  3. package/PUBLIC_URL.js.map +1 -1
  4. package/README.md +2 -3
  5. package/account/DefaultPage.d.ts +5 -0
  6. package/account/{Fallback.js → DefaultPage.js} +3 -3
  7. package/account/DefaultPage.js.map +1 -0
  8. package/account/{kcContext → KcContext}/KcContext.d.ts +13 -0
  9. package/account/KcContext/KcContext.js.map +1 -0
  10. package/account/KcContext/getKcContextMock.d.ts +24 -0
  11. package/account/KcContext/getKcContextMock.js +28 -0
  12. package/account/KcContext/getKcContextMock.js.map +1 -0
  13. package/account/KcContext/index.d.ts +2 -0
  14. package/account/KcContext/index.js +2 -0
  15. package/account/KcContext/index.js.map +1 -0
  16. package/account/{kcContext → KcContext}/kcContextMocks.d.ts +1 -1
  17. package/account/KcContext/kcContextMocks.js +143 -0
  18. package/account/KcContext/kcContextMocks.js.map +1 -0
  19. package/account/Template.d.ts +2 -2
  20. package/account/Template.js +12 -12
  21. package/account/Template.js.map +1 -1
  22. package/account/TemplateProps.d.ts +3 -5
  23. package/account/i18n/baseMessages/ar.d.ts +2 -0
  24. package/account/i18n/baseMessages/ar.js +3 -1
  25. package/account/i18n/baseMessages/ar.js.map +1 -1
  26. package/account/i18n/baseMessages/ca.d.ts +2 -0
  27. package/account/i18n/baseMessages/ca.js +3 -1
  28. package/account/i18n/baseMessages/ca.js.map +1 -1
  29. package/account/i18n/baseMessages/cs.d.ts +2 -0
  30. package/account/i18n/baseMessages/cs.js +3 -1
  31. package/account/i18n/baseMessages/cs.js.map +1 -1
  32. package/account/i18n/baseMessages/da.d.ts +2 -0
  33. package/account/i18n/baseMessages/da.js +3 -1
  34. package/account/i18n/baseMessages/da.js.map +1 -1
  35. package/account/i18n/baseMessages/de.d.ts +2 -0
  36. package/account/i18n/baseMessages/de.js +3 -1
  37. package/account/i18n/baseMessages/de.js.map +1 -1
  38. package/account/i18n/baseMessages/el.d.ts +2 -0
  39. package/account/i18n/baseMessages/el.js +3 -1
  40. package/account/i18n/baseMessages/el.js.map +1 -1
  41. package/account/i18n/baseMessages/en.d.ts +2 -0
  42. package/account/i18n/baseMessages/en.js +3 -1
  43. package/account/i18n/baseMessages/en.js.map +1 -1
  44. package/account/i18n/baseMessages/es.d.ts +2 -0
  45. package/account/i18n/baseMessages/es.js +3 -1
  46. package/account/i18n/baseMessages/es.js.map +1 -1
  47. package/account/i18n/baseMessages/fa.d.ts +2 -0
  48. package/account/i18n/baseMessages/fa.js +3 -1
  49. package/account/i18n/baseMessages/fa.js.map +1 -1
  50. package/account/i18n/baseMessages/fi.d.ts +2 -0
  51. package/account/i18n/baseMessages/fi.js +3 -1
  52. package/account/i18n/baseMessages/fi.js.map +1 -1
  53. package/account/i18n/baseMessages/fr.d.ts +2 -0
  54. package/account/i18n/baseMessages/fr.js +3 -1
  55. package/account/i18n/baseMessages/fr.js.map +1 -1
  56. package/account/i18n/baseMessages/hu.d.ts +2 -0
  57. package/account/i18n/baseMessages/hu.js +3 -1
  58. package/account/i18n/baseMessages/hu.js.map +1 -1
  59. package/account/i18n/baseMessages/index.d.ts +18 -0
  60. package/account/i18n/baseMessages/index.js.map +1 -1
  61. package/account/i18n/baseMessages/it.d.ts +2 -0
  62. package/account/i18n/baseMessages/it.js +3 -1
  63. package/account/i18n/baseMessages/it.js.map +1 -1
  64. package/account/i18n/baseMessages/ja.d.ts +2 -0
  65. package/account/i18n/baseMessages/ja.js +3 -1
  66. package/account/i18n/baseMessages/ja.js.map +1 -1
  67. package/account/i18n/baseMessages/lt.d.ts +2 -0
  68. package/account/i18n/baseMessages/lt.js +3 -1
  69. package/account/i18n/baseMessages/lt.js.map +1 -1
  70. package/account/i18n/baseMessages/lv.d.ts +2 -0
  71. package/account/i18n/baseMessages/lv.js +3 -1
  72. package/account/i18n/baseMessages/lv.js.map +1 -1
  73. package/account/i18n/baseMessages/nl.d.ts +2 -0
  74. package/account/i18n/baseMessages/nl.js +3 -1
  75. package/account/i18n/baseMessages/nl.js.map +1 -1
  76. package/account/i18n/baseMessages/no.d.ts +2 -0
  77. package/account/i18n/baseMessages/no.js +3 -1
  78. package/account/i18n/baseMessages/no.js.map +1 -1
  79. package/account/i18n/baseMessages/pl.d.ts +2 -0
  80. package/account/i18n/baseMessages/pl.js +3 -1
  81. package/account/i18n/baseMessages/pl.js.map +1 -1
  82. package/account/i18n/baseMessages/pt-BR.d.ts +2 -0
  83. package/account/i18n/baseMessages/pt-BR.js +3 -1
  84. package/account/i18n/baseMessages/pt-BR.js.map +1 -1
  85. package/account/i18n/baseMessages/ru.d.ts +2 -0
  86. package/account/i18n/baseMessages/ru.js +3 -1
  87. package/account/i18n/baseMessages/ru.js.map +1 -1
  88. package/account/i18n/baseMessages/sk.d.ts +2 -0
  89. package/account/i18n/baseMessages/sk.js +3 -1
  90. package/account/i18n/baseMessages/sk.js.map +1 -1
  91. package/account/i18n/baseMessages/sv.d.ts +2 -0
  92. package/account/i18n/baseMessages/sv.js +3 -1
  93. package/account/i18n/baseMessages/sv.js.map +1 -1
  94. package/account/i18n/baseMessages/th.d.ts +2 -0
  95. package/account/i18n/baseMessages/th.js +3 -1
  96. package/account/i18n/baseMessages/th.js.map +1 -1
  97. package/account/i18n/baseMessages/tr.d.ts +2 -0
  98. package/account/i18n/baseMessages/tr.js +3 -1
  99. package/account/i18n/baseMessages/tr.js.map +1 -1
  100. package/account/i18n/baseMessages/uk.d.ts +2 -0
  101. package/account/i18n/baseMessages/uk.js +3 -1
  102. package/account/i18n/baseMessages/uk.js.map +1 -1
  103. package/account/i18n/baseMessages/zh-CN.d.ts +2 -0
  104. package/account/i18n/baseMessages/zh-CN.js +3 -1
  105. package/account/i18n/baseMessages/zh-CN.js.map +1 -1
  106. package/account/i18n/i18n.d.ts +34 -35
  107. package/account/i18n/i18n.js +116 -97
  108. package/account/i18n/i18n.js.map +1 -1
  109. package/account/i18n/index.d.ts +5 -1
  110. package/account/i18n/index.js +2 -1
  111. package/account/i18n/index.js.map +1 -1
  112. package/account/i18n/useI18n.d.ts +13 -0
  113. package/account/i18n/useI18n.js +26 -0
  114. package/account/i18n/useI18n.js.map +1 -0
  115. package/account/index.d.ts +3 -7
  116. package/account/index.js +1 -5
  117. package/account/index.js.map +1 -1
  118. package/account/lib/kcClsx.d.ts +9 -0
  119. package/account/lib/kcClsx.js +19 -0
  120. package/account/lib/kcClsx.js.map +1 -0
  121. package/account/pages/Account.d.ts +1 -1
  122. package/account/pages/Account.js +7 -6
  123. package/account/pages/Account.js.map +1 -1
  124. package/account/pages/Applications.d.ts +1 -1
  125. package/account/pages/Applications.js +7 -8
  126. package/account/pages/Applications.js.map +1 -1
  127. package/account/pages/FederatedIdentity.d.ts +3 -3
  128. package/account/pages/FederatedIdentity.js +1 -1
  129. package/account/pages/FederatedIdentity.js.map +1 -1
  130. package/account/pages/Log.d.ts +1 -1
  131. package/account/pages/Log.js +3 -3
  132. package/account/pages/Log.js.map +1 -1
  133. package/account/pages/PageProps.d.ts +4 -6
  134. package/account/pages/Password.d.ts +1 -1
  135. package/account/pages/Password.js +16 -13
  136. package/account/pages/Password.js.map +1 -1
  137. package/account/pages/Sessions.d.ts +1 -1
  138. package/account/pages/Sessions.js +3 -4
  139. package/account/pages/Sessions.js.map +1 -1
  140. package/account/pages/Totp.d.ts +1 -1
  141. package/account/pages/Totp.js +5 -10
  142. package/account/pages/Totp.js.map +1 -1
  143. package/bin/180.index.js +4664 -0
  144. package/bin/193.index.js +160 -0
  145. package/bin/266.index.js +806 -0
  146. package/bin/304.index.js +1108 -0
  147. package/bin/36.index.js +9980 -0
  148. package/bin/430.index.js +1349 -0
  149. package/bin/440.index.js +1455 -0
  150. package/bin/453.index.js +769 -0
  151. package/bin/456.index.js +6200 -0
  152. package/bin/490.index.js +75195 -0
  153. package/bin/525.index.js +41826 -0
  154. package/bin/526.index.js +973 -0
  155. package/bin/538.index.js +108 -0
  156. package/bin/720.index.js +243 -0
  157. package/bin/751.index.js +732 -0
  158. package/bin/837.index.js +794 -0
  159. package/bin/877.index.js +275 -0
  160. package/bin/932.index.js +269 -0
  161. package/bin/97.index.js +676 -0
  162. package/bin/main.js +7679 -146380
  163. package/bin/shared/KeycloakVersionRange.d.ts +5 -0
  164. package/bin/shared/KeycloakVersionRange.js.map +1 -0
  165. package/bin/shared/buildContext.d.ts +67 -0
  166. package/bin/shared/buildContext.js.map +1 -0
  167. package/bin/shared/constants.d.ts +17 -0
  168. package/bin/shared/constants.js +58 -0
  169. package/bin/shared/constants.js.map +1 -0
  170. package/bin/shared/copyKeycloakResourcesToPublic.d.ts +8 -0
  171. package/bin/shared/copyKeycloakResourcesToPublic.js.map +1 -0
  172. package/bin/shared/downloadKeycloakDefaultTheme.d.ts +10 -0
  173. package/bin/shared/downloadKeycloakDefaultTheme.js.map +1 -0
  174. package/bin/shared/downloadKeycloakStaticResources.d.ts +9 -0
  175. package/bin/shared/downloadKeycloakStaticResources.js.map +1 -0
  176. package/bin/shared/generateKcGenTs.d.ts +12 -0
  177. package/bin/shared/generateKcGenTs.js.map +1 -0
  178. package/bin/shared/metaInfKeycloakThemes.d.ts +13 -0
  179. package/bin/shared/metaInfKeycloakThemes.js.map +1 -0
  180. package/bin/shared/promptKeycloakVersion.d.ts +7 -0
  181. package/bin/shared/promptKeycloakVersion.js.map +1 -0
  182. package/lib/BASE_URL.js.map +1 -1
  183. package/lib/getKcClsx.d.ts +11 -0
  184. package/lib/getKcClsx.js +55 -0
  185. package/lib/getKcClsx.js.map +1 -0
  186. package/login/{Fallback.d.ts → DefaultPage.d.ts} +7 -6
  187. package/login/{Fallback.js → DefaultPage.js} +2 -2
  188. package/login/DefaultPage.js.map +1 -0
  189. package/login/{kcContext → KcContext}/KcContext.d.ts +36 -17
  190. package/login/KcContext/KcContext.js.map +1 -0
  191. package/login/KcContext/getKcContextMock.d.ts +24 -0
  192. package/login/KcContext/getKcContextMock.js +28 -0
  193. package/login/KcContext/getKcContextMock.js.map +1 -0
  194. package/login/KcContext/index.d.ts +2 -0
  195. package/login/KcContext/index.js +2 -0
  196. package/login/KcContext/index.js.map +1 -0
  197. package/login/{kcContext → KcContext}/kcContextMocks.d.ts +1 -1
  198. package/login/KcContext/kcContextMocks.js +334 -0
  199. package/login/KcContext/kcContextMocks.js.map +1 -0
  200. package/login/Template.d.ts +2 -2
  201. package/login/Template.js +23 -23
  202. package/login/Template.js.map +1 -1
  203. package/login/TemplateProps.d.ts +3 -5
  204. package/login/UserProfileFormFields.d.ts +3 -20
  205. package/login/UserProfileFormFields.js +78 -122
  206. package/login/UserProfileFormFields.js.map +1 -1
  207. package/login/UserProfileFormFieldsProps.d.ts +24 -0
  208. package/login/UserProfileFormFieldsProps.js +2 -0
  209. package/login/UserProfileFormFieldsProps.js.map +1 -0
  210. package/login/i18n/baseMessages/ar.d.ts +9 -0
  211. package/login/i18n/baseMessages/ar.js +10 -1
  212. package/login/i18n/baseMessages/ar.js.map +1 -1
  213. package/login/i18n/baseMessages/ca.d.ts +10 -1
  214. package/login/i18n/baseMessages/ca.js +11 -2
  215. package/login/i18n/baseMessages/ca.js.map +1 -1
  216. package/login/i18n/baseMessages/cs.d.ts +9 -0
  217. package/login/i18n/baseMessages/cs.js +10 -1
  218. package/login/i18n/baseMessages/cs.js.map +1 -1
  219. package/login/i18n/baseMessages/da.d.ts +9 -0
  220. package/login/i18n/baseMessages/da.js +10 -1
  221. package/login/i18n/baseMessages/da.js.map +1 -1
  222. package/login/i18n/baseMessages/de.d.ts +9 -0
  223. package/login/i18n/baseMessages/de.js +10 -1
  224. package/login/i18n/baseMessages/de.js.map +1 -1
  225. package/login/i18n/baseMessages/el.d.ts +9 -1
  226. package/login/i18n/baseMessages/el.js +10 -2
  227. package/login/i18n/baseMessages/el.js.map +1 -1
  228. package/login/i18n/baseMessages/en.d.ts +10 -1
  229. package/login/i18n/baseMessages/en.js +11 -2
  230. package/login/i18n/baseMessages/en.js.map +1 -1
  231. package/login/i18n/baseMessages/es.d.ts +10 -1
  232. package/login/i18n/baseMessages/es.js +11 -2
  233. package/login/i18n/baseMessages/es.js.map +1 -1
  234. package/login/i18n/baseMessages/fa.d.ts +9 -1
  235. package/login/i18n/baseMessages/fa.js +10 -2
  236. package/login/i18n/baseMessages/fa.js.map +1 -1
  237. package/login/i18n/baseMessages/fi.d.ts +9 -0
  238. package/login/i18n/baseMessages/fi.js +10 -1
  239. package/login/i18n/baseMessages/fi.js.map +1 -1
  240. package/login/i18n/baseMessages/fr.d.ts +9 -0
  241. package/login/i18n/baseMessages/fr.js +10 -1
  242. package/login/i18n/baseMessages/fr.js.map +1 -1
  243. package/login/i18n/baseMessages/hu.d.ts +10 -1
  244. package/login/i18n/baseMessages/hu.js +11 -2
  245. package/login/i18n/baseMessages/hu.js.map +1 -1
  246. package/login/i18n/baseMessages/index.d.ts +109 -2
  247. package/login/i18n/baseMessages/index.js.map +1 -1
  248. package/login/i18n/baseMessages/it.d.ts +9 -0
  249. package/login/i18n/baseMessages/it.js +10 -1
  250. package/login/i18n/baseMessages/it.js.map +1 -1
  251. package/login/i18n/baseMessages/ja.d.ts +9 -0
  252. package/login/i18n/baseMessages/ja.js +10 -1
  253. package/login/i18n/baseMessages/ja.js.map +1 -1
  254. package/login/i18n/baseMessages/lt.d.ts +9 -0
  255. package/login/i18n/baseMessages/lt.js +10 -1
  256. package/login/i18n/baseMessages/lt.js.map +1 -1
  257. package/login/i18n/baseMessages/lv.d.ts +9 -0
  258. package/login/i18n/baseMessages/lv.js +10 -1
  259. package/login/i18n/baseMessages/lv.js.map +1 -1
  260. package/login/i18n/baseMessages/nl.d.ts +9 -0
  261. package/login/i18n/baseMessages/nl.js +10 -1
  262. package/login/i18n/baseMessages/nl.js.map +1 -1
  263. package/login/i18n/baseMessages/no.d.ts +9 -0
  264. package/login/i18n/baseMessages/no.js +10 -1
  265. package/login/i18n/baseMessages/no.js.map +1 -1
  266. package/login/i18n/baseMessages/pl.d.ts +9 -0
  267. package/login/i18n/baseMessages/pl.js +10 -1
  268. package/login/i18n/baseMessages/pl.js.map +1 -1
  269. package/login/i18n/baseMessages/pt-BR.d.ts +9 -0
  270. package/login/i18n/baseMessages/pt-BR.js +10 -1
  271. package/login/i18n/baseMessages/pt-BR.js.map +1 -1
  272. package/login/i18n/baseMessages/ru.d.ts +9 -0
  273. package/login/i18n/baseMessages/ru.js +10 -1
  274. package/login/i18n/baseMessages/ru.js.map +1 -1
  275. package/login/i18n/baseMessages/sk.d.ts +9 -0
  276. package/login/i18n/baseMessages/sk.js +10 -1
  277. package/login/i18n/baseMessages/sk.js.map +1 -1
  278. package/login/i18n/baseMessages/sv.d.ts +9 -0
  279. package/login/i18n/baseMessages/sv.js +10 -1
  280. package/login/i18n/baseMessages/sv.js.map +1 -1
  281. package/login/i18n/baseMessages/th.d.ts +9 -0
  282. package/login/i18n/baseMessages/th.js +10 -1
  283. package/login/i18n/baseMessages/th.js.map +1 -1
  284. package/login/i18n/baseMessages/tr.d.ts +9 -0
  285. package/login/i18n/baseMessages/tr.js +10 -1
  286. package/login/i18n/baseMessages/tr.js.map +1 -1
  287. package/login/i18n/baseMessages/uk.d.ts +9 -0
  288. package/login/i18n/baseMessages/uk.js +10 -1
  289. package/login/i18n/baseMessages/uk.js.map +1 -1
  290. package/login/i18n/baseMessages/zh-CN.d.ts +10 -1
  291. package/login/i18n/baseMessages/zh-CN.js +11 -2
  292. package/login/i18n/baseMessages/zh-CN.js.map +1 -1
  293. package/login/i18n/i18n.d.ts +38 -37
  294. package/login/i18n/i18n.js +132 -99
  295. package/login/i18n/i18n.js.map +1 -1
  296. package/login/i18n/index.d.ts +5 -1
  297. package/login/i18n/index.js +2 -1
  298. package/login/i18n/index.js.map +1 -1
  299. package/login/i18n/useI18n.d.ts +13 -0
  300. package/login/i18n/useI18n.js +26 -0
  301. package/login/i18n/useI18n.js.map +1 -0
  302. package/login/index.d.ts +3 -7
  303. package/login/index.js +1 -5
  304. package/login/index.js.map +1 -1
  305. package/login/lib/kcClsx.d.ts +9 -0
  306. package/login/lib/kcClsx.js +130 -0
  307. package/login/lib/kcClsx.js.map +1 -0
  308. package/login/lib/useDownloadTerms.d.ts +15 -5
  309. package/login/lib/useDownloadTerms.js +37 -21
  310. package/login/lib/useDownloadTerms.js.map +1 -1
  311. package/login/lib/useUserProfileForm.d.ts +20 -8
  312. package/login/lib/useUserProfileForm.js +402 -295
  313. package/login/lib/useUserProfileForm.js.map +1 -1
  314. package/login/pages/Code.d.ts +1 -1
  315. package/login/pages/Code.js +3 -3
  316. package/login/pages/Code.js.map +1 -1
  317. package/login/pages/DeleteAccountConfirm.d.ts +1 -1
  318. package/login/pages/DeleteAccountConfirm.js +7 -4
  319. package/login/pages/DeleteAccountConfirm.js.map +1 -1
  320. package/login/pages/DeleteCredential.d.ts +1 -1
  321. package/login/pages/DeleteCredential.js +3 -4
  322. package/login/pages/DeleteCredential.js.map +1 -1
  323. package/login/pages/Error.d.ts +1 -1
  324. package/login/pages/Error.js +1 -1
  325. package/login/pages/Error.js.map +1 -1
  326. package/login/pages/FrontchannelLogout.d.ts +1 -1
  327. package/login/pages/FrontchannelLogout.js +1 -1
  328. package/login/pages/FrontchannelLogout.js.map +1 -1
  329. package/login/pages/IdpReviewUserProfile.d.ts +4 -3
  330. package/login/pages/IdpReviewUserProfile.js +4 -5
  331. package/login/pages/IdpReviewUserProfile.js.map +1 -1
  332. package/login/pages/Info.d.ts +1 -1
  333. package/login/pages/Info.js +5 -7
  334. package/login/pages/Info.js.map +1 -1
  335. package/login/pages/Login.d.ts +1 -1
  336. package/login/pages/Login.js +7 -7
  337. package/login/pages/Login.js.map +1 -1
  338. package/login/pages/LoginConfigTotp.d.ts +1 -1
  339. package/login/pages/LoginConfigTotp.js +6 -7
  340. package/login/pages/LoginConfigTotp.js.map +1 -1
  341. package/login/pages/LoginIdpLinkConfirm.d.ts +1 -1
  342. package/login/pages/LoginIdpLinkConfirm.js +3 -4
  343. package/login/pages/LoginIdpLinkConfirm.js.map +1 -1
  344. package/login/pages/LoginIdpLinkEmail.d.ts +2 -2
  345. package/login/pages/LoginIdpLinkEmail.js +1 -1
  346. package/login/pages/LoginIdpLinkEmail.js.map +1 -1
  347. package/login/pages/LoginOauth2DeviceVerifyUserCode.d.ts +3 -3
  348. package/login/pages/LoginOauth2DeviceVerifyUserCode.js +3 -4
  349. package/login/pages/LoginOauth2DeviceVerifyUserCode.js.map +1 -1
  350. package/login/pages/LoginOauthGrant.d.ts +3 -3
  351. package/login/pages/LoginOauthGrant.js +4 -5
  352. package/login/pages/LoginOauthGrant.js.map +1 -1
  353. package/login/pages/LoginOtp.d.ts +1 -1
  354. package/login/pages/LoginOtp.js +3 -4
  355. package/login/pages/LoginOtp.js.map +1 -1
  356. package/login/pages/LoginPageExpired.d.ts +1 -1
  357. package/login/pages/LoginPageExpired.js +1 -1
  358. package/login/pages/LoginPageExpired.js.map +1 -1
  359. package/login/pages/LoginPassword.d.ts +1 -1
  360. package/login/pages/LoginPassword.js +6 -6
  361. package/login/pages/LoginPassword.js.map +1 -1
  362. package/login/pages/LoginRecoveryAuthnCodeConfig.d.ts +1 -1
  363. package/login/pages/LoginRecoveryAuthnCodeConfig.js +16 -16
  364. package/login/pages/LoginRecoveryAuthnCodeConfig.js.map +1 -1
  365. package/login/pages/LoginRecoveryAuthnCodeInput.d.ts +1 -1
  366. package/login/pages/LoginRecoveryAuthnCodeInput.js +3 -4
  367. package/login/pages/LoginRecoveryAuthnCodeInput.js.map +1 -1
  368. package/login/pages/LoginResetOtp.d.ts +1 -1
  369. package/login/pages/LoginResetOtp.js +3 -4
  370. package/login/pages/LoginResetOtp.js.map +1 -1
  371. package/login/pages/LoginResetPassword.d.ts +1 -1
  372. package/login/pages/LoginResetPassword.js +4 -5
  373. package/login/pages/LoginResetPassword.js.map +1 -1
  374. package/login/pages/LoginUpdatePassword.d.ts +1 -1
  375. package/login/pages/LoginUpdatePassword.js +7 -8
  376. package/login/pages/LoginUpdatePassword.js.map +1 -1
  377. package/login/pages/LoginUpdateProfile.d.ts +4 -3
  378. package/login/pages/LoginUpdateProfile.js +5 -9
  379. package/login/pages/LoginUpdateProfile.js.map +1 -1
  380. package/login/pages/LoginUsername.d.ts +1 -1
  381. package/login/pages/LoginUsername.js +5 -5
  382. package/login/pages/LoginUsername.js.map +1 -1
  383. package/login/pages/LoginVerifyEmail.d.ts +1 -1
  384. package/login/pages/LoginVerifyEmail.js +1 -1
  385. package/login/pages/LoginVerifyEmail.js.map +1 -1
  386. package/login/pages/LoginX509Info.d.ts +1 -1
  387. package/login/pages/LoginX509Info.js +3 -4
  388. package/login/pages/LoginX509Info.js.map +1 -1
  389. package/login/pages/LogoutConfirm.d.ts +1 -1
  390. package/login/pages/LogoutConfirm.js +3 -4
  391. package/login/pages/LogoutConfirm.js.map +1 -1
  392. package/login/pages/PageProps.d.ts +3 -5
  393. package/login/pages/Register.d.ts +4 -3
  394. package/login/pages/Register.js +12 -17
  395. package/login/pages/Register.js.map +1 -1
  396. package/login/pages/SamlPostForm.d.ts +1 -1
  397. package/login/pages/SamlPostForm.js +1 -1
  398. package/login/pages/SamlPostForm.js.map +1 -1
  399. package/login/pages/SelectAuthenticator.d.ts +2 -2
  400. package/login/pages/SelectAuthenticator.js +3 -7
  401. package/login/pages/SelectAuthenticator.js.map +1 -1
  402. package/login/pages/Terms.d.ts +2 -2
  403. package/login/pages/Terms.js +8 -7
  404. package/login/pages/Terms.js.map +1 -1
  405. package/login/pages/UpdateEmail.d.ts +3 -2
  406. package/login/pages/UpdateEmail.js +6 -10
  407. package/login/pages/UpdateEmail.js.map +1 -1
  408. package/login/pages/WebauthnAuthenticate.d.ts +1 -1
  409. package/login/pages/WebauthnAuthenticate.js +25 -22
  410. package/login/pages/WebauthnAuthenticate.js.map +1 -1
  411. package/login/pages/WebauthnError.d.ts +1 -1
  412. package/login/pages/WebauthnError.js +4 -5
  413. package/login/pages/WebauthnError.js.map +1 -1
  414. package/login/pages/WebauthnRegister.d.ts +1 -1
  415. package/login/pages/WebauthnRegister.js +15 -16
  416. package/login/pages/WebauthnRegister.js.map +1 -1
  417. package/package.json +433 -319
  418. package/src/PUBLIC_URL.ts +3 -3
  419. package/src/account/{Fallback.tsx → DefaultPage.tsx} +5 -5
  420. package/src/account/{kcContext → KcContext}/KcContext.ts +24 -2
  421. package/src/account/KcContext/getKcContextMock.ts +69 -0
  422. package/src/account/KcContext/index.ts +2 -0
  423. package/src/account/KcContext/kcContextMocks.ts +190 -0
  424. package/src/account/Template.tsx +14 -16
  425. package/src/account/TemplateProps.ts +4 -5
  426. package/src/account/i18n/baseMessages/ar.ts +3 -1
  427. package/src/account/i18n/baseMessages/ca.ts +3 -1
  428. package/src/account/i18n/baseMessages/cs.ts +3 -1
  429. package/src/account/i18n/baseMessages/da.ts +3 -1
  430. package/src/account/i18n/baseMessages/de.ts +3 -1
  431. package/src/account/i18n/baseMessages/el.ts +3 -1
  432. package/src/account/i18n/baseMessages/en.ts +3 -1
  433. package/src/account/i18n/baseMessages/es.ts +3 -1
  434. package/src/account/i18n/baseMessages/fa.ts +3 -1
  435. package/src/account/i18n/baseMessages/fi.ts +3 -1
  436. package/src/account/i18n/baseMessages/fr.ts +3 -1
  437. package/src/account/i18n/baseMessages/hu.ts +3 -1
  438. package/src/account/i18n/baseMessages/it.ts +3 -1
  439. package/src/account/i18n/baseMessages/ja.ts +3 -1
  440. package/src/account/i18n/baseMessages/lt.ts +3 -1
  441. package/src/account/i18n/baseMessages/lv.ts +3 -1
  442. package/src/account/i18n/baseMessages/nl.ts +3 -1
  443. package/src/account/i18n/baseMessages/no.ts +3 -1
  444. package/src/account/i18n/baseMessages/pl.ts +3 -1
  445. package/src/account/i18n/baseMessages/pt-BR.ts +3 -1
  446. package/src/account/i18n/baseMessages/ru.ts +3 -1
  447. package/src/account/i18n/baseMessages/sk.ts +3 -1
  448. package/src/account/i18n/baseMessages/sv.ts +3 -1
  449. package/src/account/i18n/baseMessages/th.ts +3 -1
  450. package/src/account/i18n/baseMessages/tr.ts +3 -1
  451. package/src/account/i18n/baseMessages/uk.ts +3 -1
  452. package/src/account/i18n/baseMessages/zh-CN.ts +3 -1
  453. package/src/account/i18n/i18n.tsx +201 -142
  454. package/src/account/i18n/index.ts +5 -1
  455. package/src/account/i18n/useI18n.ts +44 -0
  456. package/src/account/index.ts +3 -10
  457. package/src/account/lib/kcClsx.ts +25 -0
  458. package/src/account/pages/Account.tsx +12 -18
  459. package/src/account/pages/Applications.tsx +8 -9
  460. package/src/account/pages/FederatedIdentity.tsx +3 -3
  461. package/src/account/pages/Log.tsx +5 -5
  462. package/src/account/pages/PageProps.ts +4 -6
  463. package/src/account/pages/Password.tsx +17 -19
  464. package/src/account/pages/Sessions.tsx +5 -6
  465. package/src/account/pages/Totp.tsx +18 -38
  466. package/src/bin/add-story.ts +104 -0
  467. package/src/bin/copy-keycloak-resources-to-public.ts +3 -6
  468. package/src/bin/eject-page.ts +256 -0
  469. package/src/bin/initialize-email-theme.ts +30 -26
  470. package/src/bin/keycloakify/buildJars/buildJar.ts +138 -77
  471. package/src/bin/keycloakify/buildJars/buildJars.ts +35 -31
  472. package/src/bin/keycloakify/buildJars/extensionVersions.ts +3 -2
  473. package/src/bin/keycloakify/buildJars/generatePom.ts +19 -11
  474. package/src/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.ts +42 -10
  475. package/src/bin/keycloakify/generateFtl/generateFtl.ts +64 -42
  476. package/src/bin/keycloakify/generateFtl/{ftl_object_to_js_code_declaring_an_object.ftl → kcContextDeclarationTemplate.ftl} +232 -193
  477. package/src/bin/keycloakify/generateResources/bringInAccountV1.ts +89 -0
  478. package/src/bin/keycloakify/{generateSrcMainResources → generateResources}/generateMessageProperties.ts +47 -53
  479. package/src/bin/keycloakify/generateResources/generateResources.ts +42 -0
  480. package/src/bin/keycloakify/generateResources/generateResourcesForMainTheme.ts +299 -0
  481. package/src/bin/keycloakify/generateResources/generateResourcesForThemeVariant.ts +70 -0
  482. package/src/bin/keycloakify/generateResources/index.ts +1 -0
  483. package/src/bin/keycloakify/{generateSrcMainResources → generateResources}/readExtraPageNames.ts +21 -7
  484. package/src/bin/keycloakify/{generateSrcMainResources → generateResources}/readFieldNameUsage.ts +34 -7
  485. package/src/bin/keycloakify/keycloakify.ts +50 -16
  486. package/src/bin/keycloakify/replacers/replaceImportsInCssCode.ts +42 -46
  487. package/src/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.ts +14 -11
  488. package/src/bin/keycloakify/replacers/replaceImportsInJsCode/vite.ts +31 -16
  489. package/src/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.ts +53 -18
  490. package/src/bin/main.ts +96 -44
  491. package/src/bin/shared/KeycloakVersionRange.ts +4 -2
  492. package/src/bin/shared/buildContext.ts +768 -0
  493. package/src/bin/shared/constants.ts +8 -4
  494. package/src/bin/shared/copyKeycloakResourcesToPublic.ts +35 -21
  495. package/src/bin/shared/downloadKeycloakDefaultTheme.ts +276 -0
  496. package/src/bin/shared/downloadKeycloakStaticResources.ts +30 -26
  497. package/src/bin/shared/generateKcGenTs.ts +68 -0
  498. package/src/bin/shared/metaInfKeycloakThemes.ts +25 -19
  499. package/src/bin/shared/promptKeycloakVersion.ts +39 -15
  500. package/src/bin/start-keycloak/appBuild.ts +129 -0
  501. package/src/bin/start-keycloak/index.ts +1 -0
  502. package/src/bin/start-keycloak/keycloakifyBuild.ts +42 -0
  503. package/src/bin/start-keycloak/myrealm-realm-18.json +2155 -0
  504. package/src/bin/start-keycloak/myrealm-realm-19.json +2186 -0
  505. package/src/bin/start-keycloak/myrealm-realm-20.json +2197 -0
  506. package/src/bin/start-keycloak/myrealm-realm-21.json +2201 -0
  507. package/src/bin/start-keycloak/myrealm-realm-23.json +2150 -0
  508. package/src/bin/start-keycloak/myrealm-realm-24.json +2318 -0
  509. package/src/bin/start-keycloak/myrealm-realm-25.json +2400 -0
  510. package/src/bin/start-keycloak/start-keycloak.ts +451 -0
  511. package/src/bin/tools/SemVer.ts +32 -13
  512. package/src/bin/tools/String.prototype.replaceAll.ts +9 -2
  513. package/src/bin/tools/crawl.ts +4 -1
  514. package/src/bin/tools/crc32.ts +42 -24
  515. package/src/bin/tools/downloadAndExtractArchive/downloadAndExtractArchive.ts +262 -0
  516. package/src/bin/tools/{fetchProxyOptions.ts → downloadAndExtractArchive/fetchProxyOptions.ts} +39 -8
  517. package/src/bin/tools/downloadAndExtractArchive/index.ts +1 -0
  518. package/src/bin/tools/escapeStringForPropertiesFile.ts +64 -0
  519. package/src/bin/tools/extractArchive.ts +140 -0
  520. package/src/bin/tools/getAbsoluteAndInOsFormatPath.ts +10 -2
  521. package/src/bin/tools/getNpmWorkspaceRootDirPath.ts +52 -6
  522. package/src/bin/tools/octokit-addons/getLatestsSemVersionedTag.ts +8 -2
  523. package/src/bin/tools/octokit-addons/listTags.ts +15 -4
  524. package/src/bin/tools/partitionPromiseSettledResults.ts +12 -3
  525. package/src/bin/tools/readThisNpmPackageVersion.ts +5 -1
  526. package/src/bin/tools/transformCodebase.ts +29 -10
  527. package/src/bin/tools/trimIndent.ts +4 -1
  528. package/src/bin/tsconfig.json +4 -3
  529. package/src/bin/update-kc-gen.ts +13 -0
  530. package/src/lib/getKcClsx.ts +89 -0
  531. package/src/login/{Fallback.tsx → DefaultPage.tsx} +7 -6
  532. package/src/login/{kcContext → KcContext}/KcContext.ts +58 -30
  533. package/src/login/KcContext/getKcContextMock.ts +69 -0
  534. package/src/login/KcContext/index.ts +8 -0
  535. package/src/login/KcContext/kcContextMocks.ts +583 -0
  536. package/src/login/Template.tsx +54 -57
  537. package/src/login/TemplateProps.ts +3 -6
  538. package/src/login/UserProfileFormFields.tsx +125 -210
  539. package/src/login/UserProfileFormFieldsProps.tsx +22 -0
  540. package/src/login/i18n/baseMessages/ar.ts +10 -1
  541. package/src/login/i18n/baseMessages/ca.ts +11 -2
  542. package/src/login/i18n/baseMessages/cs.ts +10 -1
  543. package/src/login/i18n/baseMessages/da.ts +10 -1
  544. package/src/login/i18n/baseMessages/de.ts +10 -1
  545. package/src/login/i18n/baseMessages/el.ts +10 -2
  546. package/src/login/i18n/baseMessages/en.ts +11 -2
  547. package/src/login/i18n/baseMessages/es.ts +11 -2
  548. package/src/login/i18n/baseMessages/fa.ts +10 -2
  549. package/src/login/i18n/baseMessages/fi.ts +10 -1
  550. package/src/login/i18n/baseMessages/fr.ts +10 -1
  551. package/src/login/i18n/baseMessages/hu.ts +11 -2
  552. package/src/login/i18n/baseMessages/it.ts +10 -1
  553. package/src/login/i18n/baseMessages/ja.ts +10 -1
  554. package/src/login/i18n/baseMessages/lt.ts +10 -1
  555. package/src/login/i18n/baseMessages/lv.ts +10 -1
  556. package/src/login/i18n/baseMessages/nl.ts +10 -1
  557. package/src/login/i18n/baseMessages/no.ts +10 -1
  558. package/src/login/i18n/baseMessages/pl.ts +10 -1
  559. package/src/login/i18n/baseMessages/pt-BR.ts +10 -1
  560. package/src/login/i18n/baseMessages/ru.ts +10 -1
  561. package/src/login/i18n/baseMessages/sk.ts +10 -1
  562. package/src/login/i18n/baseMessages/sv.ts +10 -1
  563. package/src/login/i18n/baseMessages/th.ts +10 -1
  564. package/src/login/i18n/baseMessages/tr.ts +10 -1
  565. package/src/login/i18n/baseMessages/uk.ts +10 -1
  566. package/src/login/i18n/baseMessages/zh-CN.ts +11 -2
  567. package/src/login/i18n/i18n.tsx +231 -143
  568. package/src/login/i18n/index.ts +5 -1
  569. package/src/login/i18n/useI18n.ts +44 -0
  570. package/src/login/index.ts +3 -10
  571. package/src/login/lib/kcClsx.ts +143 -0
  572. package/src/login/lib/useDownloadTerms.tsx +88 -0
  573. package/src/login/lib/useUserProfileForm.tsx +480 -351
  574. package/src/login/pages/Code.tsx +8 -5
  575. package/src/login/pages/DeleteAccountConfirm.tsx +15 -10
  576. package/src/login/pages/DeleteCredential.tsx +9 -7
  577. package/src/login/pages/Error.tsx +9 -2
  578. package/src/login/pages/FrontchannelLogout.tsx +6 -3
  579. package/src/login/pages/IdpReviewUserProfile.tsx +20 -21
  580. package/src/login/pages/Info.tsx +5 -8
  581. package/src/login/pages/Login.tsx +34 -53
  582. package/src/login/pages/LoginConfigTotp.tsx +35 -39
  583. package/src/login/pages/LoginIdpLinkConfirm.tsx +7 -18
  584. package/src/login/pages/LoginIdpLinkEmail.tsx +9 -3
  585. package/src/login/pages/LoginOauth2DeviceVerifyUserCode.tsx +24 -23
  586. package/src/login/pages/LoginOauthGrant.tsx +14 -20
  587. package/src/login/pages/LoginOtp.tsx +27 -30
  588. package/src/login/pages/LoginPageExpired.tsx +2 -2
  589. package/src/login/pages/LoginPassword.tsx +21 -31
  590. package/src/login/pages/LoginRecoveryAuthnCodeConfig.tsx +34 -34
  591. package/src/login/pages/LoginRecoveryAuthnCodeInput.tsx +19 -22
  592. package/src/login/pages/LoginResetOtp.tsx +19 -22
  593. package/src/login/pages/LoginResetPassword.tsx +21 -24
  594. package/src/login/pages/LoginUpdatePassword.tsx +40 -50
  595. package/src/login/pages/LoginUpdateProfile.tsx +32 -30
  596. package/src/login/pages/LoginUsername.tsx +23 -34
  597. package/src/login/pages/LoginVerifyEmail.tsx +5 -2
  598. package/src/login/pages/LoginX509Info.tsx +24 -33
  599. package/src/login/pages/LogoutConfirm.tsx +8 -14
  600. package/src/login/pages/PageProps.ts +3 -5
  601. package/src/login/pages/Register.tsx +48 -59
  602. package/src/login/pages/SamlPostForm.tsx +2 -2
  603. package/src/login/pages/SelectAuthenticator.tsx +23 -24
  604. package/src/login/pages/Terms.tsx +25 -24
  605. package/src/login/pages/UpdateEmail.tsx +30 -33
  606. package/src/login/pages/WebauthnAuthenticate.tsx +40 -44
  607. package/src/login/pages/WebauthnError.tsx +15 -19
  608. package/src/login/pages/WebauthnRegister.tsx +28 -37
  609. package/src/tools/Array.prototype.every.ts +4 -1
  610. package/src/tools/ExtractAfterStartingWith.ts +4 -0
  611. package/src/tools/LazyOrNot.ts +3 -1
  612. package/src/tools/Object.fromEntries.ts +23 -0
  613. package/src/tools/StatefulObservable/README.md +16 -0
  614. package/src/tools/StatefulObservable/StatefulObservable.ts +58 -0
  615. package/src/tools/StatefulObservable/hooks/index.ts +2 -0
  616. package/src/tools/StatefulObservable/hooks/useObservable.ts +25 -0
  617. package/src/tools/StatefulObservable/hooks/useRerenderOnChange.ts +19 -0
  618. package/src/tools/StatefulObservable/index.ts +2 -0
  619. package/src/tools/ValueOf.ts +2 -0
  620. package/src/tools/clsx.ts +6 -42
  621. package/src/tools/clsx_withTransform.ts +55 -0
  622. package/src/tools/deepAssign.ts +57 -19
  623. package/src/tools/formatNumber.ts +7 -3
  624. package/src/tools/react-markdown.ts +3 -0
  625. package/src/tools/structuredCloneButFunctions.ts +24 -0
  626. package/src/tools/useConstCallback.ts +3 -1
  627. package/src/tools/useInsertLinkTags.ts +78 -74
  628. package/src/tools/useInsertScriptTags.ts +69 -73
  629. package/src/tools/useOnFirstMount.ts +18 -0
  630. package/src/tools/useSetClassName.ts +4 -1
  631. package/src/vite-plugin/vite-plugin.ts +73 -37
  632. package/stories/account/pages/Account.stories.tsx +18 -0
  633. package/stories/account/pages/FederatedIdentity.stories.tsx +38 -0
  634. package/stories/account/pages/Log.stories.tsx +356 -0
  635. package/stories/account/pages/Password.stories.tsx +28 -0
  636. package/stories/account/pages/Sessions.stories.tsx +59 -0
  637. package/stories/account/pages/Totp.stories.tsx +182 -0
  638. package/stories/login/pages/Code.stories.tsx +18 -0
  639. package/stories/login/pages/DeleteAccountConfirm.stories.tsx +18 -0
  640. package/stories/login/pages/DeleteCredential.stories.tsx +18 -0
  641. package/stories/login/pages/Error.stories.tsx +28 -0
  642. package/stories/login/pages/FrontchannelLogout.stories.tsx +18 -0
  643. package/stories/login/pages/IdpReviewUserProfile.stories.tsx +18 -0
  644. package/stories/login/pages/Info.stories.tsx +52 -0
  645. package/stories/login/pages/Login.stories.tsx +221 -0
  646. package/stories/login/pages/LoginConfigTotp.stories.tsx +43 -0
  647. package/stories/login/pages/LoginDeviceVerifyUserCode.stories.tsx +18 -0
  648. package/stories/login/pages/LoginIdpLinkConfirm.stories.tsx +18 -0
  649. package/stories/login/pages/LoginIdpLinkEmail.stories.tsx +18 -0
  650. package/stories/login/pages/LoginOauth2DeviceVerifyUserCode.stories.tsx +18 -0
  651. package/stories/login/pages/LoginOauthGrant.stories.tsx +18 -0
  652. package/stories/login/pages/LoginOtp.stories.tsx +18 -0
  653. package/stories/login/pages/LoginPageExpired.stories.tsx +18 -0
  654. package/stories/login/pages/LoginPassword.stories.tsx +18 -0
  655. package/stories/login/pages/LoginRecoveryAuthnCodeConfig.stories.tsx +18 -0
  656. package/stories/login/pages/LoginRecoveryAuthnCodeInput.stories.tsx +18 -0
  657. package/stories/login/pages/LoginResetOtp.stories.tsx +18 -0
  658. package/stories/login/pages/LoginResetPassword.stories.tsx +31 -0
  659. package/stories/login/pages/LoginUpdatePassword.stories.tsx +18 -0
  660. package/stories/login/pages/LoginUpdateProfile.stories.tsx +18 -0
  661. package/stories/login/pages/LoginUsername.stories.tsx +31 -0
  662. package/stories/login/pages/LoginVerifyEmail.stories.tsx +30 -0
  663. package/stories/login/pages/LoginX509Info.stories.tsx +18 -0
  664. package/stories/login/pages/LogoutConfirm.stories.tsx +18 -0
  665. package/stories/login/pages/Register.stories.tsx +135 -0
  666. package/stories/login/pages/SamlPostForm.stories.tsx +18 -0
  667. package/stories/login/pages/SelectAuthenticator.stories.tsx +43 -0
  668. package/stories/login/pages/Terms.stories.tsx +42 -0
  669. package/stories/login/pages/UpdateEmail.stories.tsx +18 -0
  670. package/stories/login/pages/WebauthnAuthenticate.stories.tsx +18 -0
  671. package/stories/login/pages/WebauthnError.stories.tsx +18 -0
  672. package/stories/login/pages/WebauthnRegister.stories.tsx +18 -0
  673. package/tools/Array.prototype.every.js +2 -1
  674. package/tools/Array.prototype.every.js.map +1 -1
  675. package/tools/ExtractAfterStartingWith.d.ts +1 -0
  676. package/tools/ExtractAfterStartingWith.js +2 -0
  677. package/tools/ExtractAfterStartingWith.js.map +1 -0
  678. package/tools/HTMLElement.prototype.prepend.js.map +1 -1
  679. package/tools/Object.fromEntries.d.ts +1 -0
  680. package/tools/Object.fromEntries.js +17 -0
  681. package/tools/Object.fromEntries.js.map +1 -0
  682. package/tools/StatefulObservable/StatefulObservable.d.ts +8 -0
  683. package/tools/StatefulObservable/StatefulObservable.js +36 -0
  684. package/tools/StatefulObservable/StatefulObservable.js.map +1 -0
  685. package/tools/StatefulObservable/hooks/index.d.ts +2 -0
  686. package/tools/StatefulObservable/hooks/index.js +3 -0
  687. package/tools/StatefulObservable/hooks/index.js.map +1 -0
  688. package/tools/StatefulObservable/hooks/useObservable.d.ts +8 -0
  689. package/tools/StatefulObservable/hooks/useObservable.js +17 -0
  690. package/tools/StatefulObservable/hooks/useObservable.js.map +1 -0
  691. package/tools/StatefulObservable/hooks/useRerenderOnChange.d.ts +5 -0
  692. package/tools/StatefulObservable/hooks/useRerenderOnChange.js +14 -0
  693. package/tools/StatefulObservable/hooks/useRerenderOnChange.js.map +1 -0
  694. package/tools/StatefulObservable/index.d.ts +2 -0
  695. package/tools/StatefulObservable/index.js +3 -0
  696. package/tools/StatefulObservable/index.js.map +1 -0
  697. package/tools/ValueOf.d.ts +2 -0
  698. package/tools/ValueOf.js +2 -0
  699. package/tools/ValueOf.js.map +1 -0
  700. package/tools/clsx.d.ts +3 -2
  701. package/tools/clsx.js +5 -41
  702. package/tools/clsx.js.map +1 -1
  703. package/tools/clsx_withTransform.d.ts +5 -0
  704. package/tools/clsx_withTransform.js +43 -0
  705. package/tools/clsx_withTransform.js.map +1 -0
  706. package/tools/deepAssign.d.ts +1 -0
  707. package/tools/deepAssign.js +41 -16
  708. package/tools/deepAssign.js.map +1 -1
  709. package/tools/formatNumber.js +2 -1
  710. package/tools/formatNumber.js.map +1 -1
  711. package/tools/react-markdown.d.ts +3 -0
  712. package/tools/react-markdown.js +4 -0
  713. package/tools/react-markdown.js.map +1 -0
  714. package/tools/structuredCloneButFunctions.d.ts +7 -0
  715. package/tools/structuredCloneButFunctions.js +19 -0
  716. package/tools/structuredCloneButFunctions.js.map +1 -0
  717. package/tools/useConstCallback.js.map +1 -1
  718. package/tools/useInsertLinkTags.d.ts +11 -6
  719. package/tools/useInsertLinkTags.js +53 -52
  720. package/tools/useInsertLinkTags.js.map +1 -1
  721. package/tools/useInsertScriptTags.d.ts +15 -6
  722. package/tools/useInsertScriptTags.js +56 -61
  723. package/tools/useInsertScriptTags.js.map +1 -1
  724. package/tools/useOnFirstMount.d.ts +2 -0
  725. package/tools/useOnFirstMount.js +15 -0
  726. package/tools/useOnFirstMount.js.map +1 -0
  727. package/tools/useSetClassName.js.map +1 -1
  728. package/vite-plugin/index.d.ts +1 -0
  729. package/vite-plugin/index.js +53394 -0
  730. package/vite-plugin/vite-plugin.d.ts +5 -0
  731. package/account/Fallback.d.ts +0 -5
  732. package/account/Fallback.js.map +0 -1
  733. package/account/kcContext/KcContext.js.map +0 -1
  734. package/account/kcContext/createGetKcContext.d.ts +0 -19
  735. package/account/kcContext/createGetKcContext.js +0 -73
  736. package/account/kcContext/createGetKcContext.js.map +0 -1
  737. package/account/kcContext/getKcContext.d.ts +0 -13
  738. package/account/kcContext/getKcContext.js +0 -13
  739. package/account/kcContext/getKcContext.js.map +0 -1
  740. package/account/kcContext/getKcContextFromWindow.d.ts +0 -8
  741. package/account/kcContext/getKcContextFromWindow.js +0 -5
  742. package/account/kcContext/getKcContextFromWindow.js.map +0 -1
  743. package/account/kcContext/index.d.ts +0 -1
  744. package/account/kcContext/index.js +0 -2
  745. package/account/kcContext/index.js.map +0 -1
  746. package/account/kcContext/kcContextMocks.js +0 -215
  747. package/account/kcContext/kcContextMocks.js.map +0 -1
  748. package/account/lib/useGetClassName.d.ts +0 -7
  749. package/account/lib/useGetClassName.js +0 -19
  750. package/account/lib/useGetClassName.js.map +0 -1
  751. package/lib/isStorybook.d.ts +0 -1
  752. package/lib/isStorybook.js +0 -2
  753. package/lib/isStorybook.js.map +0 -1
  754. package/lib/useGetClassName.d.ts +0 -10
  755. package/lib/useGetClassName.js +0 -14
  756. package/lib/useGetClassName.js.map +0 -1
  757. package/login/Fallback.js.map +0 -1
  758. package/login/kcContext/KcContext.js.map +0 -1
  759. package/login/kcContext/createGetKcContext.d.ts +0 -19
  760. package/login/kcContext/createGetKcContext.js +0 -109
  761. package/login/kcContext/createGetKcContext.js.map +0 -1
  762. package/login/kcContext/getKcContext.d.ts +0 -13
  763. package/login/kcContext/getKcContext.js +0 -13
  764. package/login/kcContext/getKcContext.js.map +0 -1
  765. package/login/kcContext/getKcContextFromWindow.d.ts +0 -8
  766. package/login/kcContext/getKcContextFromWindow.js +0 -5
  767. package/login/kcContext/getKcContextFromWindow.js.map +0 -1
  768. package/login/kcContext/index.d.ts +0 -1
  769. package/login/kcContext/index.js +0 -2
  770. package/login/kcContext/index.js.map +0 -1
  771. package/login/kcContext/kcContextMocks.js +0 -390
  772. package/login/kcContext/kcContextMocks.js.map +0 -1
  773. package/login/lib/useGetClassName.d.ts +0 -7
  774. package/login/lib/useGetClassName.js +0 -130
  775. package/login/lib/useGetClassName.js.map +0 -1
  776. package/src/account/kcContext/createGetKcContext.ts +0 -108
  777. package/src/account/kcContext/getKcContext.ts +0 -21
  778. package/src/account/kcContext/getKcContextFromWindow.ts +0 -11
  779. package/src/account/kcContext/index.ts +0 -1
  780. package/src/account/kcContext/kcContextMocks.ts +0 -260
  781. package/src/account/lib/useGetClassName.ts +0 -20
  782. package/src/bin/download-builtin-keycloak-theme.ts +0 -30
  783. package/src/bin/eject-keycloak-page.ts +0 -126
  784. package/src/bin/keycloakify/generateSrcMainResources/bringInAccountV1.ts +0 -79
  785. package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResources.ts +0 -32
  786. package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForMainTheme.ts +0 -261
  787. package/src/bin/keycloakify/generateSrcMainResources/generateSrcMainResourcesForThemeVariant.ts +0 -56
  788. package/src/bin/keycloakify/generateSrcMainResources/index.ts +0 -1
  789. package/src/bin/keycloakify/generateStartKeycloakTestingContainer.ts +0 -60
  790. package/src/bin/keycloakify/replacers/replaceImportsInInlineCssCode.ts +0 -24
  791. package/src/bin/shared/buildOptions.ts +0 -277
  792. package/src/bin/shared/downloadAndUnzip.ts +0 -203
  793. package/src/bin/shared/downloadBuiltinKeycloakTheme.ts +0 -264
  794. package/src/bin/shared/getJarFileBasename.ts +0 -9
  795. package/src/bin/shared/getThemeSrcDirPath.ts +0 -47
  796. package/src/bin/start-keycloak.ts +0 -236
  797. package/src/bin/tools/unzip.ts +0 -141
  798. package/src/lib/isStorybook.ts +0 -1
  799. package/src/lib/useGetClassName.ts +0 -18
  800. package/src/login/kcContext/createGetKcContext.ts +0 -159
  801. package/src/login/kcContext/getKcContext.ts +0 -21
  802. package/src/login/kcContext/getKcContextFromWindow.ts +0 -11
  803. package/src/login/kcContext/index.ts +0 -1
  804. package/src/login/kcContext/kcContextMocks.ts +0 -630
  805. package/src/login/lib/useDownloadTerms.ts +0 -57
  806. package/src/login/lib/useGetClassName.ts +0 -132
  807. package/src/tools/AndByDiscriminatingKey.ts +0 -25
  808. package/src/tools/Markdown.ts +0 -3
  809. package/src/tools/deepClone.ts +0 -17
  810. package/src/tools/memoize.ts +0 -55
  811. package/tools/AndByDiscriminatingKey.d.ts +0 -5
  812. package/tools/AndByDiscriminatingKey.js +0 -2
  813. package/tools/AndByDiscriminatingKey.js.map +0 -1
  814. package/tools/Markdown.d.ts +0 -2
  815. package/tools/Markdown.js +0 -3
  816. package/tools/Markdown.js.map +0 -1
  817. package/tools/deepClone.d.ts +0 -2
  818. package/tools/deepClone.js +0 -14
  819. package/tools/deepClone.js.map +0 -1
  820. package/tools/memoize.d.ts +0 -7
  821. package/tools/memoize.js +0 -38
  822. package/tools/memoize.js.map +0 -1
  823. /package/account/{kcContext → KcContext}/KcContext.js +0 -0
  824. /package/login/{kcContext → KcContext}/KcContext.js +0 -0
@@ -0,0 +1,1455 @@
1
+ "use strict";
2
+ exports.id = 440;
3
+ exports.ids = [440];
4
+ exports.modules = {
5
+
6
+ /***/ 73817:
7
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
+
9
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
+ /* harmony export */ "k": () => (/* binding */ generateMessageProperties)
11
+ /* harmony export */ });
12
+ /* harmony import */ var _tools_crawl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73036);
13
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71017);
14
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
15
+ /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(57147);
16
+ /* harmony import */ var fs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fs__WEBPACK_IMPORTED_MODULE_2__);
17
+ /* harmony import */ var tsafe_symToStr__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(47986);
18
+ /* harmony import */ var evt_tools_reducers_removeDuplicates__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(78300);
19
+ /* harmony import */ var evt_tools_reducers_removeDuplicates__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(evt_tools_reducers_removeDuplicates__WEBPACK_IMPORTED_MODULE_4__);
20
+ /* harmony import */ var recast__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(48128);
21
+ /* harmony import */ var _babel_parser__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(85026);
22
+ /* harmony import */ var _babel_generator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(92332);
23
+ /* harmony import */ var _babel_types__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7912);
24
+ /* harmony import */ var _babel_types__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_babel_types__WEBPACK_IMPORTED_MODULE_8__);
25
+ /* harmony import */ var _tools_escapeStringForPropertiesFile__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(27190);
26
+ /* harmony import */ var _tools_getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(58822);
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+ function generateMessageProperties(params) {
40
+ const { themeSrcDirPath, themeType } = params;
41
+ let files = (0,_tools_crawl__WEBPACK_IMPORTED_MODULE_0__/* .crawl */ .J)({
42
+ dirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(themeSrcDirPath, themeType),
43
+ returnedPathsType: "absolute"
44
+ });
45
+ files = files.filter(file => {
46
+ const regex = /\.(js|ts|tsx)$/;
47
+ return regex.test(file);
48
+ });
49
+ files = files.sort((a, b) => {
50
+ const regex = /\.i18n\.(ts|js|tsx)$/;
51
+ const aIsI18nFile = regex.test(a);
52
+ const bIsI18nFile = regex.test(b);
53
+ return aIsI18nFile === bIsI18nFile ? 0 : aIsI18nFile ? -1 : 1;
54
+ });
55
+ files = files.sort((a, b) => a.length - b.length);
56
+ files = files.filter(file => (0,fs__WEBPACK_IMPORTED_MODULE_2__.readFileSync)(file).toString("utf8").includes("createUseI18n"));
57
+ const extraMessages = files
58
+ .map(file => {
59
+ const root = recast__WEBPACK_IMPORTED_MODULE_5__/* .parse */ .Qc((0,fs__WEBPACK_IMPORTED_MODULE_2__.readFileSync)(file).toString("utf8"), {
60
+ parser: {
61
+ parse: (code) => _babel_parser__WEBPACK_IMPORTED_MODULE_6__/* .parse */ .Qc(code, {
62
+ sourceType: "module",
63
+ plugins: ["typescript"]
64
+ }),
65
+ generator: _babel_generator__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP,
66
+ types: _babel_types__WEBPACK_IMPORTED_MODULE_8__
67
+ }
68
+ });
69
+ const codes = [];
70
+ recast__WEBPACK_IMPORTED_MODULE_5__/* .visit */ .Vn(root, {
71
+ visitCallExpression: function (path) {
72
+ if (path.node.callee.type === "Identifier" &&
73
+ path.node.callee.name === "createUseI18n") {
74
+ codes.push((0,_babel_generator__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP)(path.node.arguments[0]).code);
75
+ }
76
+ this.traverse(path);
77
+ }
78
+ });
79
+ return codes;
80
+ })
81
+ .flat()
82
+ .map(code => {
83
+ let extraMessages = {};
84
+ try {
85
+ eval(`${(0,tsafe_symToStr__WEBPACK_IMPORTED_MODULE_3__/* .symToStr */ .r)({ extraMessages })} = ${code}`);
86
+ }
87
+ catch (_a) {
88
+ console.warn([
89
+ "WARNING: Make sure that the first argument of createUseI18n can be evaluated in a javascript",
90
+ "runtime where only the node globals are available.",
91
+ "This is important because we need to put your i18n messages in messages_*.properties files",
92
+ "or they won't be available server side.",
93
+ "\n",
94
+ "The following code could not be evaluated:",
95
+ "\n",
96
+ code
97
+ ].join(" "));
98
+ }
99
+ return extraMessages;
100
+ });
101
+ const languageTags = [
102
+ ...extraMessages.map(extraMessage => Object.keys(extraMessage)).flat(),
103
+ ...fs__WEBPACK_IMPORTED_MODULE_2__.readdirSync((0,path__WEBPACK_IMPORTED_MODULE_1__.join)((0,_tools_getThisCodebaseRootDirPath__WEBPACK_IMPORTED_MODULE_9__/* .getThisCodebaseRootDirPath */ .e)(), "src", themeType, "i18n", "baseMessages"))
104
+ .filter(baseName => baseName !== "index.ts")
105
+ .map(baseName => baseName.replace(/\.ts$/, ""))
106
+ ].reduce(...(0,evt_tools_reducers_removeDuplicates__WEBPACK_IMPORTED_MODULE_4__.removeDuplicates)());
107
+ const keyValueMapByLanguageTag = {};
108
+ for (const languageTag of languageTags) {
109
+ const keyValueMap = {
110
+ termsText: ""
111
+ };
112
+ for (const extraMessage of extraMessages) {
113
+ const keyValueMap_i = extraMessage[languageTag];
114
+ if (keyValueMap_i === undefined) {
115
+ continue;
116
+ }
117
+ for (const [key, value] of Object.entries(keyValueMap_i)) {
118
+ if (key !== "termsText" && keyValueMap[key] !== undefined) {
119
+ console.warn([
120
+ "WARNING: The following key is defined multiple times:",
121
+ "\n",
122
+ key,
123
+ "\n",
124
+ "The following value will be ignored:",
125
+ "\n",
126
+ value,
127
+ "\n",
128
+ "The following value was already defined:",
129
+ "\n",
130
+ keyValueMap[key]
131
+ ].join(" "));
132
+ continue;
133
+ }
134
+ keyValueMap[key] = value;
135
+ }
136
+ }
137
+ keyValueMapByLanguageTag[languageTag] = keyValueMap;
138
+ }
139
+ const out = [];
140
+ for (const [languageTag, keyValueMap] of Object.entries(keyValueMapByLanguageTag)) {
141
+ const propertiesFileSource = Object.entries(keyValueMap)
142
+ .map(([key, value]) => `${key}=${(0,_tools_escapeStringForPropertiesFile__WEBPACK_IMPORTED_MODULE_10__/* .escapeStringForPropertiesFile */ .y)(value)}`)
143
+ .join("\n");
144
+ out.push({
145
+ languageTag,
146
+ propertiesFileSource: ["", "parent=base", "", propertiesFileSource, ""].join("\n")
147
+ });
148
+ }
149
+ return out;
150
+ }
151
+ //# sourceMappingURL=generateMessageProperties.js.map
152
+
153
+ /***/ }),
154
+
155
+ /***/ 46440:
156
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
157
+
158
+ // ESM COMPAT FLAG
159
+ __webpack_require__.r(__webpack_exports__);
160
+
161
+ // EXPORTS
162
+ __webpack_require__.d(__webpack_exports__, {
163
+ "command": () => (/* reexport */ command)
164
+ });
165
+
166
+ // EXTERNAL MODULE: ./node_modules/tsafe/assert.js
167
+ var assert = __webpack_require__(88078);
168
+ // EXTERNAL MODULE: ./dist/bin/tools/transformCodebase.js
169
+ var transformCodebase = __webpack_require__(60332);
170
+ // EXTERNAL MODULE: external "fs"
171
+ var external_fs_ = __webpack_require__(57147);
172
+ var external_fs_default = /*#__PURE__*/__webpack_require__.n(external_fs_);
173
+ // EXTERNAL MODULE: external "path"
174
+ var external_path_ = __webpack_require__(71017);
175
+ // EXTERNAL MODULE: ./dist/bin/shared/constants.js
176
+ var constants = __webpack_require__(173);
177
+ ;// CONCATENATED MODULE: ./dist/bin/tools/String.prototype.replaceAll.js
178
+ function replaceAll(string, searchValue, replaceValue) {
179
+ if (string.replaceAll !== undefined) {
180
+ return string.replaceAll(searchValue, replaceValue);
181
+ }
182
+ // If the searchValue is a string
183
+ if (typeof searchValue === "string") {
184
+ // Escape special characters in the string to be used in a regex
185
+ var escapedSearchValue = searchValue.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
186
+ var regex = new RegExp(escapedSearchValue, "g");
187
+ return string.replace(regex, replaceValue);
188
+ }
189
+ // If the searchValue is a global RegExp, use it directly
190
+ if (searchValue instanceof RegExp && searchValue.global) {
191
+ return string.replace(searchValue, replaceValue);
192
+ }
193
+ // If the searchValue is a non-global RegExp, throw an error
194
+ if (searchValue instanceof RegExp) {
195
+ throw new TypeError("replaceAll must be called with a global RegExp");
196
+ }
197
+ // Convert searchValue to string if it's not a string or RegExp
198
+ var searchString = String(searchValue);
199
+ var regexFromString = new RegExp(searchString.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "g");
200
+ return string.replace(regexFromString, replaceValue);
201
+ }
202
+ //# sourceMappingURL=String.prototype.replaceAll.js.map
203
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/replacers/replaceImportsInJsCode/vite.js
204
+
205
+
206
+
207
+
208
+ (0,assert.assert)();
209
+ function replaceImportsInJsCode_vite(params) {
210
+ const { jsCode, buildContext, basenameOfAssetsFiles, systemType = external_path_.sep === "/" ? "posix" : "win32" } = params;
211
+ const { relative: pathRelative, sep: pathSep } = external_path_[systemType];
212
+ let fixedJsCode = jsCode;
213
+ replace_base_javacript_import: {
214
+ if (buildContext.urlPathname === undefined) {
215
+ break replace_base_javacript_import;
216
+ }
217
+ // Optimization
218
+ if (!jsCode.includes(buildContext.urlPathname)) {
219
+ break replace_base_javacript_import;
220
+ }
221
+ // Replace `Hv=function(e){return"/abcde12345/"+e}` by `Hv=function(e){return"/"+e}`
222
+ fixedJsCode = fixedJsCode.replace(new RegExp(`([\\w\\$][\\w\\d\\$]*)=function\\(([\\w\\$][\\w\\d\\$]*)\\)\\{return"${replaceAll(buildContext.urlPathname, "/", "\\/")}"\\+\\2\\}`, "g"), (...[, funcName, paramName]) => `${funcName}=function(${paramName}){return"/"+${paramName}}`);
223
+ }
224
+ replace_javascript_relatives_import_paths: {
225
+ // Example: "assets/ or "foo/bar/"
226
+ const staticDir = (() => {
227
+ let out = pathRelative(buildContext.projectBuildDirPath, buildContext.assetsDirPath);
228
+ out = replaceAll(out, pathSep, "/") + "/";
229
+ if (out === "/") {
230
+ throw new Error(`The assetsDirPath must be a subdirectory of projectBuildDirPath`);
231
+ }
232
+ return out;
233
+ })();
234
+ // Optimization
235
+ if (!jsCode.includes(staticDir)) {
236
+ break replace_javascript_relatives_import_paths;
237
+ }
238
+ basenameOfAssetsFiles
239
+ .map(basenameOfAssetsFile => `${staticDir}${basenameOfAssetsFile}`)
240
+ .forEach(relativePathOfAssetFile => {
241
+ var _a;
242
+ fixedJsCode = replaceAll(fixedJsCode, `"${relativePathOfAssetFile}"`, `(window.kcContext.url.resourcesPath.substring(1) + "/${constants/* basenameOfTheKeycloakifyResourcesDir */.M}/${relativePathOfAssetFile}")`);
243
+ fixedJsCode = replaceAll(fixedJsCode, `"${(_a = buildContext.urlPathname) !== null && _a !== void 0 ? _a : "/"}${relativePathOfAssetFile}"`, `(window.kcContext.url.resourcesPath + "/${constants/* basenameOfTheKeycloakifyResourcesDir */.M}/${relativePathOfAssetFile}")`);
244
+ });
245
+ }
246
+ return { fixedJsCode };
247
+ }
248
+ //# sourceMappingURL=vite.js.map
249
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/replacers/replaceImportsInJsCode/webpack.js
250
+
251
+
252
+
253
+
254
+ (0,assert.assert)();
255
+ function replaceImportsInJsCode_webpack(params) {
256
+ const { jsCode, buildContext, systemType = external_path_.sep === "/" ? "posix" : "win32" } = params;
257
+ const { relative: pathRelative, sep: pathSep } = external_path_[systemType];
258
+ let fixedJsCode = jsCode;
259
+ if (buildContext.urlPathname !== undefined) {
260
+ // "__esModule",{value:!0})},n.p="/foo-bar/",function(){if("undefined" -> ... n.p="/" ...
261
+ fixedJsCode = fixedJsCode.replace(new RegExp(`,([a-zA-Z]\\.[a-zA-Z])="${replaceAll(buildContext.urlPathname, "/", "\\/")}",`, "g"), (...[, assignTo]) => `,${assignTo}="/",`);
262
+ }
263
+ // Example: "static/ or "foo/bar/"
264
+ const staticDir = (() => {
265
+ let out = pathRelative(buildContext.projectBuildDirPath, buildContext.assetsDirPath);
266
+ out = replaceAll(out, pathSep, "/") + "/";
267
+ if (out === "/") {
268
+ throw new Error(`The assetsDirPath must be a subdirectory of projectBuildDirPath`);
269
+ }
270
+ return out;
271
+ })();
272
+ const getReplaceArgs = (language) => [
273
+ new RegExp(`([a-zA-Z_]+)\\.([a-zA-Z]+)=(function\\(([a-z]+)\\){return|([a-z]+)=>)"${staticDir.replace(/\//g, "\\/")}${language}\\/"`, "g"),
274
+ (...[, n, u, matchedFunction, eForFunction]) => {
275
+ const isArrowFunction = matchedFunction.includes("=>");
276
+ const e = isArrowFunction
277
+ ? matchedFunction.replace("=>", "").trim()
278
+ : eForFunction;
279
+ return `
280
+ ${n}[(function(){
281
+ var pd = Object.getOwnPropertyDescriptor(${n}, "p");
282
+ if( pd === undefined || pd.configurable ){
283
+ Object.defineProperty(${n}, "p", {
284
+ get: function() { return window.kcContext.url.resourcesPath; },
285
+ set: function() {}
286
+ });
287
+ }
288
+ return "${u}";
289
+ })()] = ${isArrowFunction ? `${e} =>` : `function(${e}) { return `} "/${constants/* basenameOfTheKeycloakifyResourcesDir */.M}/${staticDir}${language}/"`
290
+ .replace(/\s+/g, " ")
291
+ .trim();
292
+ }
293
+ ];
294
+ fixedJsCode = fixedJsCode
295
+ .replace(...getReplaceArgs("js"))
296
+ .replace(...getReplaceArgs("css"))
297
+ .replace(new RegExp(`[a-zA-Z]+\\.[a-zA-Z]+\\+"${staticDir.replace(/\//g, "\\/")}`, "g"), `window.kcContext.url.resourcesPath + "/${constants/* basenameOfTheKeycloakifyResourcesDir */.M}/${staticDir}`);
298
+ return { fixedJsCode };
299
+ }
300
+ //# sourceMappingURL=webpack.js.map
301
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/replacers/replaceImportsInJsCode/replaceImportsInJsCode.js
302
+
303
+
304
+
305
+
306
+ (0,assert.assert)();
307
+ function replaceImportsInJsCode(params) {
308
+ const { jsCode, buildContext } = params;
309
+ const { fixedJsCode } = (() => {
310
+ switch (buildContext.bundler) {
311
+ case "vite":
312
+ return replaceImportsInJsCode_vite({
313
+ jsCode,
314
+ buildContext,
315
+ basenameOfAssetsFiles: readAssetsDirSync({
316
+ assetsDirPath: params.buildContext.assetsDirPath
317
+ })
318
+ });
319
+ case "webpack":
320
+ return replaceImportsInJsCode_webpack({
321
+ jsCode,
322
+ buildContext
323
+ });
324
+ }
325
+ })();
326
+ return { fixedJsCode };
327
+ }
328
+ const { readAssetsDirSync } = (() => {
329
+ let cache = undefined;
330
+ function readAssetsDirSync(params) {
331
+ const { assetsDirPath } = params;
332
+ if (cache !== undefined && cache.assetsDirPath === assetsDirPath) {
333
+ return cache.basenameOfAssetsFiles;
334
+ }
335
+ const basenameOfAssetsFiles = external_fs_.readdirSync(assetsDirPath);
336
+ cache = {
337
+ assetsDirPath,
338
+ basenameOfAssetsFiles
339
+ };
340
+ return basenameOfAssetsFiles;
341
+ }
342
+ return { readAssetsDirSync };
343
+ })();
344
+ //# sourceMappingURL=replaceImportsInJsCode.js.map
345
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/replacers/replaceImportsInJsCode/index.js
346
+
347
+ //# sourceMappingURL=index.js.map
348
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/replacers/replaceImportsInCssCode.js
349
+
350
+
351
+
352
+ (0,assert.assert)();
353
+ function replaceImportsInCssCode(params) {
354
+ const { cssCode, cssFileRelativeDirPath, buildContext } = params;
355
+ const fixedCssCode = cssCode.replace(/url\(["']?(\/[^/][^)"']+)["']?\)/g, (match, assetFileAbsoluteUrlPathname) => {
356
+ if (buildContext.urlPathname !== undefined) {
357
+ if (!assetFileAbsoluteUrlPathname.startsWith(buildContext.urlPathname)) {
358
+ // NOTE: Should never happen
359
+ return match;
360
+ }
361
+ assetFileAbsoluteUrlPathname = assetFileAbsoluteUrlPathname.replace(buildContext.urlPathname, "/");
362
+ }
363
+ inline_style_in_html: {
364
+ if (cssFileRelativeDirPath !== undefined) {
365
+ break inline_style_in_html;
366
+ }
367
+ return `url(\${url.resourcesPath}/${constants/* basenameOfTheKeycloakifyResourcesDir */.M}${assetFileAbsoluteUrlPathname})`;
368
+ }
369
+ const assetFileRelativeUrlPathname = external_path_.posix.relative(cssFileRelativeDirPath.replace(/\\/g, "/"), assetFileAbsoluteUrlPathname.replace(/^\//, ""));
370
+ return `url(${assetFileRelativeUrlPathname})`;
371
+ });
372
+ return { fixedCssCode };
373
+ }
374
+ //# sourceMappingURL=replaceImportsInCssCode.js.map
375
+ // EXTERNAL MODULE: ./node_modules/cheerio/lib/esm/index.js + 76 modules
376
+ var esm = __webpack_require__(87182);
377
+ // EXTERNAL MODULE: ./dist/bin/tools/getThisCodebaseRootDirPath.js
378
+ var getThisCodebaseRootDirPath = __webpack_require__(58822);
379
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateFtl/generateFtl.js
380
+
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+ (0,assert.assert)();
389
+ function generateFtlFilesCodeFactory(params) {
390
+ var _a;
391
+ const { themeName, indexHtmlCode, buildContext, keycloakifyVersion, themeType, fieldNames } = params;
392
+ const $ = esm/* default.load */.ZP.load(indexHtmlCode);
393
+ fix_imports_statements: {
394
+ $("script:not([src])").each((...[, element]) => {
395
+ const jsCode = $(element).html();
396
+ (0,assert.assert)(jsCode !== null);
397
+ const { fixedJsCode } = replaceImportsInJsCode({
398
+ jsCode,
399
+ buildContext
400
+ });
401
+ $(element).text(fixedJsCode);
402
+ });
403
+ $("style").each((...[, element]) => {
404
+ const cssCode = $(element).html();
405
+ (0,assert.assert)(cssCode !== null);
406
+ const { fixedCssCode } = replaceImportsInCssCode({
407
+ cssCode,
408
+ cssFileRelativeDirPath: undefined,
409
+ buildContext
410
+ });
411
+ $(element).text(fixedCssCode);
412
+ });
413
+ [
414
+ ["link", "href"],
415
+ ["script", "src"]
416
+ ].forEach(([selector, attrName]) => $(selector).each((...[, element]) => {
417
+ var _a;
418
+ const href = $(element).attr(attrName);
419
+ if (href === undefined) {
420
+ return;
421
+ }
422
+ $(element).attr(attrName, href.replace(new RegExp(`^${((_a = buildContext.urlPathname) !== null && _a !== void 0 ? _a : "/").replace(/\//g, "\\/")}`), `\${url.resourcesPath}/${constants/* basenameOfTheKeycloakifyResourcesDir */.M}/`));
423
+ }));
424
+ }
425
+ //FTL is no valid html, we can't insert with cheerio, we put placeholder for injecting later.
426
+ const kcContextDeclarationTemplateFtl = external_fs_.readFileSync((0,external_path_.join)((0,getThisCodebaseRootDirPath/* getThisCodebaseRootDirPath */.e)(), "src", "bin", "keycloakify", "generateFtl", "kcContextDeclarationTemplate.ftl"))
427
+ .toString("utf8")
428
+ .replace("FIELD_NAMES_eKsIY4ZsZ4xeM", fieldNames.map(name => `"${name}"`).join(", "))
429
+ .replace("KEYCLOAKIFY_VERSION_xEdKd3xEdr", keycloakifyVersion)
430
+ .replace("KEYCLOAKIFY_THEME_VERSION_sIgKd3xEdr3dx", buildContext.themeVersion)
431
+ .replace("KEYCLOAKIFY_THEME_TYPE_dExKd3xEdr", themeType)
432
+ .replace("KEYCLOAKIFY_THEME_NAME_cXxKd3xEer", themeName)
433
+ .replace("RESOURCES_COMMON_cLsLsMrtDkpVv", constants/* resources_common */.z0)
434
+ .replace("USER_DEFINED_EXCLUSIONS_eKsaY4ZsZ4eMr2", (_a = buildContext.kcContextExclusionsFtlCode) !== null && _a !== void 0 ? _a : "");
435
+ const ftlObjectToJsCodeDeclaringAnObjectPlaceholder = '{ "x": "vIdLqMeOed9sdLdIdOxdK0d" }';
436
+ $("head").prepend(`<script>\n${ftlObjectToJsCodeDeclaringAnObjectPlaceholder}\n</script>`);
437
+ // Remove part of the document marked as ignored.
438
+ {
439
+ const startTags = $('meta[name="keycloakify-ignore-start"]');
440
+ startTags.each((...[, startTag]) => {
441
+ const $startTag = $(startTag);
442
+ const $endTag = $startTag
443
+ .nextAll('meta[name="keycloakify-ignore-end"]')
444
+ .first();
445
+ if ($endTag.length) {
446
+ let currentNode = $startTag.next();
447
+ while (currentNode.length && !currentNode.is($endTag)) {
448
+ currentNode.remove();
449
+ currentNode = $startTag.next();
450
+ }
451
+ $startTag.remove();
452
+ $endTag.remove();
453
+ }
454
+ });
455
+ }
456
+ const partiallyFixedIndexHtmlCode = $.html();
457
+ function generateFtlFilesCode(params) {
458
+ const { pageId } = params;
459
+ const $ = esm/* default.load */.ZP.load(partiallyFixedIndexHtmlCode);
460
+ let ftlCode = $.html();
461
+ Object.entries({
462
+ [ftlObjectToJsCodeDeclaringAnObjectPlaceholder]: kcContextDeclarationTemplateFtl,
463
+ PAGE_ID_xIgLsPgGId9D8e: pageId
464
+ }).map(([searchValue, replaceValue]) => (ftlCode = ftlCode.replace(searchValue, replaceValue)));
465
+ return { ftlCode };
466
+ }
467
+ return { generateFtlFilesCode };
468
+ }
469
+ //# sourceMappingURL=generateFtl.js.map
470
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateFtl/index.js
471
+
472
+ //# sourceMappingURL=index.js.map
473
+ // EXTERNAL MODULE: ./dist/bin/shared/downloadKeycloakStaticResources.js
474
+ var downloadKeycloakStaticResources = __webpack_require__(62190);
475
+ // EXTERNAL MODULE: ./dist/bin/tools/crawl.js
476
+ var crawl = __webpack_require__(73036);
477
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/readFieldNameUsage.js
478
+
479
+
480
+
481
+
482
+ /** Assumes the theme type exists */
483
+ function readFieldNameUsage(params) {
484
+ const { themeSrcDirPath, themeType } = params;
485
+ const fieldNames = new Set();
486
+ for (const srcDirPath of [
487
+ (0,external_path_.join)((0,getThisCodebaseRootDirPath/* getThisCodebaseRootDirPath */.e)(), "src", themeType),
488
+ (0,external_path_.join)(themeSrcDirPath, themeType)
489
+ ]) {
490
+ const filePaths = (0,crawl/* crawl */.J)({
491
+ dirPath: srcDirPath,
492
+ returnedPathsType: "absolute"
493
+ }).filter(filePath => /\.(ts|tsx|js|jsx)$/.test(filePath));
494
+ for (const filePath of filePaths) {
495
+ const rawSourceFile = external_fs_.readFileSync(filePath).toString("utf8");
496
+ if (!rawSourceFile.includes("messagesPerField")) {
497
+ continue;
498
+ }
499
+ for (const functionName of [
500
+ "printIfExists",
501
+ "existsError",
502
+ "get",
503
+ "exists",
504
+ "getFirstError"
505
+ ]) {
506
+ if (!rawSourceFile.includes(functionName)) {
507
+ continue;
508
+ }
509
+ try {
510
+ rawSourceFile
511
+ .split(functionName)
512
+ .filter(part => part.startsWith("("))
513
+ .map(part => {
514
+ let [p1] = part.split(")");
515
+ p1 = p1.slice(1);
516
+ return p1;
517
+ })
518
+ .map(part => {
519
+ return part
520
+ .split(",")
521
+ .map(a => a.trim())
522
+ .filter((...[, i]) => functionName !== "printIfExists" ? true : i === 0)
523
+ .filter(a => a.startsWith('"') ||
524
+ a.startsWith("'") ||
525
+ a.startsWith("`"))
526
+ .filter(a => a.endsWith('"') ||
527
+ a.endsWith("'") ||
528
+ a.endsWith("`"))
529
+ .map(a => a.slice(1).slice(0, -1));
530
+ })
531
+ .flat()
532
+ .forEach(fieldName => fieldNames.add(fieldName));
533
+ }
534
+ catch (_a) { }
535
+ }
536
+ }
537
+ }
538
+ return Array.from(fieldNames);
539
+ }
540
+ //# sourceMappingURL=readFieldNameUsage.js.map
541
+ // EXTERNAL MODULE: ./node_modules/tsafe/id.js
542
+ var id = __webpack_require__(43047);
543
+ // EXTERNAL MODULE: ./node_modules/evt/tools/reducers/removeDuplicates.js
544
+ var removeDuplicates = __webpack_require__(78300);
545
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/readExtraPageNames.js
546
+
547
+
548
+
549
+
550
+
551
+
552
+ function readExtraPagesNames(params) {
553
+ const { themeSrcDirPath, themeType } = params;
554
+ const filePaths = (0,crawl/* crawl */.J)({
555
+ dirPath: (0,external_path_.join)(themeSrcDirPath, themeType),
556
+ returnedPathsType: "absolute"
557
+ }).filter(filePath => /\.(ts|tsx|js|jsx)$/.test(filePath));
558
+ const candidateFilePaths = filePaths.filter(filePath => /[kK]cContext\.[^.]+$/.test(filePath));
559
+ if (candidateFilePaths.length === 0) {
560
+ candidateFilePaths.push(...filePaths);
561
+ }
562
+ const extraPages = [];
563
+ for (const candidateFilPath of candidateFilePaths) {
564
+ const rawSourceFile = external_fs_.readFileSync(candidateFilPath).toString("utf8");
565
+ extraPages.push(...Array.from(rawSourceFile.matchAll(/["']?pageId["']?\s*:\s*["']([^.]+.ftl)["']/g), m => m[1]));
566
+ }
567
+ return extraPages.reduce(...(0,removeDuplicates.removeDuplicates)()).filter(pageId => {
568
+ switch (themeType) {
569
+ case "account":
570
+ return !(0,id.id)(constants/* accountThemePageIds */.UX).includes(pageId);
571
+ case "login":
572
+ return !(0,id.id)(constants/* loginThemePageIds */.sj).includes(pageId);
573
+ }
574
+ });
575
+ }
576
+ //# sourceMappingURL=readExtraPageNames.js.map
577
+ // EXTERNAL MODULE: ./dist/bin/keycloakify/generateResources/generateMessageProperties.js
578
+ var generateMessageProperties = __webpack_require__(73817);
579
+ // EXTERNAL MODULE: ./dist/bin/shared/downloadKeycloakDefaultTheme.js + 3 modules
580
+ var downloadKeycloakDefaultTheme = __webpack_require__(47802);
581
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/bringInAccountV1.js
582
+
583
+
584
+
585
+
586
+
587
+
588
+ (0,assert.assert)();
589
+ async function bringInAccountV1(params) {
590
+ const { resourcesDirPath, buildContext } = params;
591
+ const { defaultThemeDirPath } = await (0,downloadKeycloakDefaultTheme/* downloadKeycloakDefaultTheme */.x)({
592
+ keycloakVersion: constants/* lastKeycloakVersionWithAccountV1 */.v$,
593
+ buildContext
594
+ });
595
+ const accountV1DirPath = (0,external_path_.join)(resourcesDirPath, "theme", constants/* accountV1ThemeName */.y_, "account");
596
+ (0,transformCodebase/* transformCodebase */.N)({
597
+ srcDirPath: (0,external_path_.join)(defaultThemeDirPath, "base", "account"),
598
+ destDirPath: accountV1DirPath
599
+ });
600
+ (0,transformCodebase/* transformCodebase */.N)({
601
+ srcDirPath: (0,external_path_.join)(defaultThemeDirPath, "keycloak", "account", "resources"),
602
+ destDirPath: (0,external_path_.join)(accountV1DirPath, "resources")
603
+ });
604
+ (0,transformCodebase/* transformCodebase */.N)({
605
+ srcDirPath: (0,external_path_.join)(defaultThemeDirPath, "keycloak", "common", "resources"),
606
+ destDirPath: (0,external_path_.join)(accountV1DirPath, "resources", constants/* resources_common */.z0)
607
+ });
608
+ external_fs_.writeFileSync((0,external_path_.join)(accountV1DirPath, "theme.properties"), Buffer.from([
609
+ "accountResourceProvider=account-v1",
610
+ "",
611
+ "locales=ar,ca,cs,da,de,en,es,fr,fi,hu,it,ja,lt,nl,no,pl,pt-BR,ru,sk,sv,tr,zh-CN",
612
+ "",
613
+ "styles=" +
614
+ [
615
+ "css/account.css",
616
+ "img/icon-sidebar-active.png",
617
+ "img/logo.png",
618
+ ...[
619
+ "patternfly.min.css",
620
+ "patternfly-additions.min.css",
621
+ "patternfly-additions.min.css"
622
+ ].map(fileBasename => `${constants/* resources_common */.z0}/node_modules/patternfly/dist/css/${fileBasename}`)
623
+ ].join(" "),
624
+ "",
625
+ "##### css classes for form buttons",
626
+ "# main class used for all buttons",
627
+ "kcButtonClass=btn",
628
+ "# classes defining priority of the button - primary or default (there is typically only one priority button for the form)",
629
+ "kcButtonPrimaryClass=btn-primary",
630
+ "kcButtonDefaultClass=btn-default",
631
+ "# classes defining size of the button",
632
+ "kcButtonLargeClass=btn-lg",
633
+ ""
634
+ ].join("\n"), "utf8"));
635
+ }
636
+ //# sourceMappingURL=bringInAccountV1.js.map
637
+ // EXTERNAL MODULE: ./dist/bin/tools/fs.rmSync.js
638
+ var fs_rmSync = __webpack_require__(89693);
639
+ // EXTERNAL MODULE: ./dist/bin/tools/readThisNpmPackageVersion.js
640
+ var readThisNpmPackageVersion = __webpack_require__(64795);
641
+ ;// CONCATENATED MODULE: ./dist/bin/shared/metaInfKeycloakThemes.js
642
+
643
+
644
+ function writeMetaInfKeycloakThemes(params) {
645
+ const { resourcesDirPath, getNewMetaInfKeycloakTheme } = params;
646
+ const filePath = (0,external_path_.join)(resourcesDirPath, "META-INF", "keycloak-themes.json");
647
+ const currentMetaInfKeycloakTheme = !external_fs_.existsSync(filePath)
648
+ ? undefined
649
+ : JSON.parse(external_fs_.readFileSync(filePath).toString("utf8"));
650
+ const newMetaInfKeycloakThemes = getNewMetaInfKeycloakTheme({
651
+ metaInfKeycloakTheme: currentMetaInfKeycloakTheme
652
+ });
653
+ {
654
+ const dirPath = (0,external_path_.dirname)(filePath);
655
+ if (!external_fs_.existsSync(dirPath)) {
656
+ external_fs_.mkdirSync(dirPath, { recursive: true });
657
+ }
658
+ }
659
+ external_fs_.writeFileSync(filePath, Buffer.from(JSON.stringify(newMetaInfKeycloakThemes, null, 2), "utf8"));
660
+ }
661
+ //# sourceMappingURL=metaInfKeycloakThemes.js.map
662
+ // EXTERNAL MODULE: ./node_modules/tsafe/objectEntries.js
663
+ var objectEntries = __webpack_require__(39612);
664
+ // EXTERNAL MODULE: ./dist/bin/tools/escapeStringForPropertiesFile.js
665
+ var escapeStringForPropertiesFile = __webpack_require__(27190);
666
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/generateResourcesForMainTheme.js
667
+
668
+
669
+
670
+
671
+
672
+
673
+
674
+
675
+
676
+
677
+
678
+
679
+
680
+
681
+
682
+
683
+
684
+
685
+ (0,assert.assert)();
686
+ async function generateResourcesForMainTheme(params) {
687
+ var _a;
688
+ const { themeName, resourcesDirPath, buildContext } = params;
689
+ const getThemeTypeDirPath = (params) => {
690
+ const { themeType } = params;
691
+ return (0,external_path_.join)(resourcesDirPath, "theme", themeName, themeType);
692
+ };
693
+ for (const themeType of ["login", "account"]) {
694
+ if (!buildContext.recordIsImplementedByThemeType[themeType]) {
695
+ continue;
696
+ }
697
+ const themeTypeDirPath = getThemeTypeDirPath({ themeType });
698
+ apply_replacers_and_move_to_theme_resources: {
699
+ const destDirPath = (0,external_path_.join)(themeTypeDirPath, "resources", constants/* basenameOfTheKeycloakifyResourcesDir */.M);
700
+ // NOTE: Prevent accumulation of files in the assets dir, as names are hashed they pile up.
701
+ (0,fs_rmSync/* rmSync */.a)(destDirPath, { recursive: true, force: true });
702
+ if (themeType === "account" &&
703
+ buildContext.recordIsImplementedByThemeType.login) {
704
+ // NOTE: We prevent doing it twice, it has been done for the login theme.
705
+ (0,transformCodebase/* transformCodebase */.N)({
706
+ srcDirPath: (0,external_path_.join)(getThemeTypeDirPath({
707
+ themeType: "login"
708
+ }), "resources", constants/* basenameOfTheKeycloakifyResourcesDir */.M),
709
+ destDirPath
710
+ });
711
+ break apply_replacers_and_move_to_theme_resources;
712
+ }
713
+ {
714
+ const dirPath = (0,external_path_.join)(buildContext.projectBuildDirPath, constants/* keycloak_resources */.N$);
715
+ if (external_fs_.existsSync(dirPath)) {
716
+ (0,assert.assert)(buildContext.bundler === "webpack");
717
+ throw new Error([
718
+ `Keycloakify build error: The ${constants/* keycloak_resources */.N$} directory shouldn't exist in your build directory.`,
719
+ `(${(0,external_path_.relative)(process.cwd(), dirPath)}).\n`,
720
+ `Theses assets are only required for local development with Storybook.",
721
+ "Please remove this directory as an additional step of your command.\n`,
722
+ `For example: \`"build": "... && rimraf ${(0,external_path_.relative)(buildContext.projectDirPath, dirPath)}"\``
723
+ ].join(" "));
724
+ }
725
+ }
726
+ (0,transformCodebase/* transformCodebase */.N)({
727
+ srcDirPath: buildContext.projectBuildDirPath,
728
+ destDirPath,
729
+ transformSourceCode: ({ filePath, fileRelativePath, sourceCode }) => {
730
+ if (filePath.endsWith(".css")) {
731
+ const { fixedCssCode } = replaceImportsInCssCode({
732
+ cssCode: sourceCode.toString("utf8"),
733
+ cssFileRelativeDirPath: (0,external_path_.dirname)(fileRelativePath),
734
+ buildContext
735
+ });
736
+ return {
737
+ modifiedSourceCode: Buffer.from(fixedCssCode, "utf8")
738
+ };
739
+ }
740
+ if (filePath.endsWith(".js")) {
741
+ const { fixedJsCode } = replaceImportsInJsCode({
742
+ jsCode: sourceCode.toString("utf8"),
743
+ buildContext
744
+ });
745
+ return {
746
+ modifiedSourceCode: Buffer.from(fixedJsCode, "utf8")
747
+ };
748
+ }
749
+ return { modifiedSourceCode: sourceCode };
750
+ }
751
+ });
752
+ }
753
+ const { generateFtlFilesCode } = generateFtlFilesCodeFactory({
754
+ themeName,
755
+ indexHtmlCode: external_fs_.readFileSync((0,external_path_.join)(buildContext.projectBuildDirPath, "index.html"))
756
+ .toString("utf8"),
757
+ buildContext,
758
+ keycloakifyVersion: (0,readThisNpmPackageVersion/* readThisNpmPackageVersion */.K)(),
759
+ themeType,
760
+ fieldNames: readFieldNameUsage({
761
+ themeSrcDirPath: buildContext.themeSrcDirPath,
762
+ themeType
763
+ })
764
+ });
765
+ [
766
+ ...(() => {
767
+ switch (themeType) {
768
+ case "login":
769
+ return constants/* loginThemePageIds */.sj;
770
+ case "account":
771
+ return constants/* accountThemePageIds */.UX;
772
+ }
773
+ })(),
774
+ ...readExtraPagesNames({
775
+ themeType,
776
+ themeSrcDirPath: buildContext.themeSrcDirPath
777
+ })
778
+ ].forEach(pageId => {
779
+ const { ftlCode } = generateFtlFilesCode({ pageId });
780
+ external_fs_.writeFileSync((0,external_path_.join)(themeTypeDirPath, pageId), Buffer.from(ftlCode, "utf8"));
781
+ });
782
+ (0,generateMessageProperties/* generateMessageProperties */.k)({
783
+ themeSrcDirPath: buildContext.themeSrcDirPath,
784
+ themeType
785
+ }).forEach(({ languageTag, propertiesFileSource }) => {
786
+ const messagesDirPath = (0,external_path_.join)(themeTypeDirPath, "messages");
787
+ external_fs_.mkdirSync((0,external_path_.join)(themeTypeDirPath, "messages"), {
788
+ recursive: true
789
+ });
790
+ const propertiesFilePath = (0,external_path_.join)(messagesDirPath, `messages_${languageTag}.properties`);
791
+ external_fs_.writeFileSync(propertiesFilePath, Buffer.from(propertiesFileSource, "utf8"));
792
+ });
793
+ await (0,downloadKeycloakStaticResources/* downloadKeycloakStaticResources */.p)({
794
+ keycloakVersion: (() => {
795
+ switch (themeType) {
796
+ case "account":
797
+ return constants/* lastKeycloakVersionWithAccountV1 */.v$;
798
+ case "login":
799
+ return buildContext.loginThemeResourcesFromKeycloakVersion;
800
+ }
801
+ })(),
802
+ themeDirPath: (0,external_path_.resolve)((0,external_path_.join)(themeTypeDirPath, "..")),
803
+ themeType,
804
+ buildContext
805
+ });
806
+ external_fs_.writeFileSync((0,external_path_.join)(themeTypeDirPath, "theme.properties"), Buffer.from([
807
+ `parent=${(() => {
808
+ switch (themeType) {
809
+ case "account":
810
+ return constants/* accountV1ThemeName */.y_;
811
+ case "login":
812
+ return "keycloak";
813
+ }
814
+ (0,assert.assert)(false);
815
+ })()}`,
816
+ ...((_a = buildContext.extraThemeProperties) !== null && _a !== void 0 ? _a : []),
817
+ ...buildContext.environmentVariables.map(({ name, default: defaultValue }) => `${name}=\${env.${name}:${(0,escapeStringForPropertiesFile/* escapeStringForPropertiesFile */.y)(defaultValue)}}`)
818
+ ].join("\n\n"), "utf8"));
819
+ }
820
+ email: {
821
+ if (!buildContext.recordIsImplementedByThemeType.email) {
822
+ break email;
823
+ }
824
+ const emailThemeSrcDirPath = (0,external_path_.join)(buildContext.themeSrcDirPath, "email");
825
+ (0,transformCodebase/* transformCodebase */.N)({
826
+ srcDirPath: emailThemeSrcDirPath,
827
+ destDirPath: getThemeTypeDirPath({ themeType: "email" })
828
+ });
829
+ }
830
+ if (buildContext.recordIsImplementedByThemeType.account) {
831
+ await bringInAccountV1({
832
+ resourcesDirPath,
833
+ buildContext
834
+ });
835
+ }
836
+ {
837
+ const metaInfKeycloakThemes = { themes: [] };
838
+ metaInfKeycloakThemes.themes.push({
839
+ name: themeName,
840
+ types: (0,objectEntries.objectEntries)(buildContext.recordIsImplementedByThemeType)
841
+ .filter(([, isImplemented]) => isImplemented)
842
+ .map(([themeType]) => themeType)
843
+ });
844
+ if (buildContext.recordIsImplementedByThemeType.account) {
845
+ metaInfKeycloakThemes.themes.push({
846
+ name: constants/* accountV1ThemeName */.y_,
847
+ types: ["account"]
848
+ });
849
+ }
850
+ writeMetaInfKeycloakThemes({
851
+ resourcesDirPath,
852
+ getNewMetaInfKeycloakTheme: () => metaInfKeycloakThemes
853
+ });
854
+ }
855
+ }
856
+ //# sourceMappingURL=generateResourcesForMainTheme.js.map
857
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/generateResourcesForThemeVariant.js
858
+
859
+
860
+
861
+
862
+ (0,assert.assert)();
863
+ function generateResourcesForThemeVariant(params) {
864
+ const { resourcesDirPath, themeName, themeVariantName } = params;
865
+ const mainThemeDirPath = (0,external_path_.join)(resourcesDirPath, "theme", themeName);
866
+ (0,transformCodebase/* transformCodebase */.N)({
867
+ srcDirPath: mainThemeDirPath,
868
+ destDirPath: (0,external_path_.join)(mainThemeDirPath, "..", themeVariantName),
869
+ transformSourceCode: ({ fileRelativePath, sourceCode }) => {
870
+ if ((0,external_path_.extname)(fileRelativePath) === ".ftl" &&
871
+ fileRelativePath.split(external_path_.sep).length === 2) {
872
+ const modifiedSourceCode = Buffer.from(Buffer.from(sourceCode)
873
+ .toString("utf-8")
874
+ .replace(`kcContext.themeName = "${themeName}";`, `kcContext.themeName = "${themeVariantName}";`), "utf8");
875
+ (0,assert.assert)(Buffer.compare(modifiedSourceCode, sourceCode) !== 0);
876
+ return { modifiedSourceCode };
877
+ }
878
+ return { modifiedSourceCode: sourceCode };
879
+ }
880
+ });
881
+ writeMetaInfKeycloakThemes({
882
+ resourcesDirPath,
883
+ getNewMetaInfKeycloakTheme: ({ metaInfKeycloakTheme }) => {
884
+ (0,assert.assert)(metaInfKeycloakTheme !== undefined);
885
+ const newMetaInfKeycloakTheme = metaInfKeycloakTheme;
886
+ newMetaInfKeycloakTheme.themes.push({
887
+ name: themeVariantName,
888
+ types: (() => {
889
+ const theme = newMetaInfKeycloakTheme.themes.find(({ name }) => name === themeName);
890
+ (0,assert.assert)(theme !== undefined);
891
+ return theme.types;
892
+ })()
893
+ });
894
+ return newMetaInfKeycloakTheme;
895
+ }
896
+ });
897
+ }
898
+ //# sourceMappingURL=generateResourcesForThemeVariant.js.map
899
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/generateResources.js
900
+
901
+
902
+
903
+
904
+
905
+ (0,assert.assert)();
906
+ async function generateResources(params) {
907
+ const { resourcesDirPath, buildContext } = params;
908
+ const [themeName, ...themeVariantNames] = buildContext.themeNames;
909
+ if (external_fs_default().existsSync(resourcesDirPath)) {
910
+ (0,fs_rmSync/* rmSync */.a)(resourcesDirPath, { recursive: true });
911
+ }
912
+ await generateResourcesForMainTheme({
913
+ resourcesDirPath,
914
+ themeName,
915
+ buildContext
916
+ });
917
+ for (const themeVariantName of themeVariantNames) {
918
+ generateResourcesForThemeVariant({
919
+ resourcesDirPath,
920
+ themeName,
921
+ themeVariantName
922
+ });
923
+ }
924
+ }
925
+ //# sourceMappingURL=generateResources.js.map
926
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/generateResources/index.js
927
+
928
+ //# sourceMappingURL=index.js.map
929
+ // EXTERNAL MODULE: external "child_process"
930
+ var external_child_process_ = __webpack_require__(32081);
931
+ var external_child_process_default = /*#__PURE__*/__webpack_require__.n(external_child_process_);
932
+ // EXTERNAL MODULE: ./dist/bin/shared/buildContext.js + 1 modules
933
+ var shared_buildContext = __webpack_require__(87751);
934
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/buildJars/extensionVersions.js
935
+ // NOTE: v0.5 is a dummy version.
936
+ const keycloakAccountV1Versions = [null, "0.3", "0.4", "0.6"];
937
+ const keycloakThemeAdditionalInfoExtensionVersions = [null, "1.1.5"];
938
+ //# sourceMappingURL=extensionVersions.js.map
939
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/buildJars/getKeycloakVersionRangeForJar.js
940
+
941
+ function getKeycloakVersionRangeForJar(params) {
942
+ const { keycloakAccountV1Version, keycloakThemeAdditionalInfoExtensionVersion, doesImplementAccountTheme } = params;
943
+ if (doesImplementAccountTheme) {
944
+ const keycloakVersionRange = (() => {
945
+ switch (keycloakAccountV1Version) {
946
+ case null:
947
+ switch (keycloakThemeAdditionalInfoExtensionVersion) {
948
+ case null:
949
+ return "21-and-below";
950
+ case "1.1.5":
951
+ return undefined;
952
+ }
953
+ (0,assert.assert)(false);
954
+ case "0.3":
955
+ switch (keycloakThemeAdditionalInfoExtensionVersion) {
956
+ case null:
957
+ return undefined;
958
+ case "1.1.5":
959
+ return "23";
960
+ }
961
+ (0,assert.assert)(false);
962
+ case "0.4":
963
+ switch (keycloakThemeAdditionalInfoExtensionVersion) {
964
+ case null:
965
+ return undefined;
966
+ case "1.1.5":
967
+ return "24";
968
+ }
969
+ (0,assert.assert)(false);
970
+ case "0.6":
971
+ switch (keycloakThemeAdditionalInfoExtensionVersion) {
972
+ case null:
973
+ return undefined;
974
+ case "1.1.5":
975
+ return "25-and-above";
976
+ }
977
+ }
978
+ (0,assert.assert)(false);
979
+ })();
980
+ (0,assert.assert)();
981
+ return keycloakVersionRange;
982
+ }
983
+ else {
984
+ const keycloakVersionRange = (() => {
985
+ if (keycloakAccountV1Version !== null) {
986
+ return undefined;
987
+ }
988
+ switch (keycloakThemeAdditionalInfoExtensionVersion) {
989
+ case null:
990
+ return "21-and-below";
991
+ case "1.1.5":
992
+ return "22-and-above";
993
+ }
994
+ (0,assert.assert)(false);
995
+ })();
996
+ (0,assert.assert)();
997
+ return keycloakVersionRange;
998
+ }
999
+ }
1000
+ //# sourceMappingURL=getKeycloakVersionRangeForJar.js.map
1001
+ // EXTERNAL MODULE: external "fs/promises"
1002
+ var promises_ = __webpack_require__(73292);
1003
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/buildJars/generatePom.js
1004
+
1005
+ (0,assert.assert)();
1006
+ function generatePom(params) {
1007
+ const { keycloakAccountV1Version, keycloakThemeAdditionalInfoExtensionVersion, buildContext } = params;
1008
+ const { pomFileCode } = (function generatePomFileCode() {
1009
+ const pomFileCode = [
1010
+ `<?xml version="1.0"?>`,
1011
+ `<project xmlns="http://maven.apache.org/POM/4.0.0"`,
1012
+ ` xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"`,
1013
+ ` xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">`,
1014
+ ` <modelVersion>4.0.0</modelVersion>`,
1015
+ ` <groupId>${buildContext.groupId}</groupId>`,
1016
+ ` <artifactId>${buildContext.artifactId}</artifactId>`,
1017
+ ` <version>${buildContext.themeVersion}</version>`,
1018
+ ` <name>${buildContext.artifactId}</name>`,
1019
+ ` <description />`,
1020
+ ` <packaging>jar</packaging>`,
1021
+ ` <properties>`,
1022
+ ` <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>`,
1023
+ ` </properties>`,
1024
+ ...(keycloakAccountV1Version !== null ||
1025
+ keycloakThemeAdditionalInfoExtensionVersion !== null
1026
+ ? [
1027
+ ` <build>`,
1028
+ ` <plugins>`,
1029
+ ` <plugin>`,
1030
+ ` <groupId>org.apache.maven.plugins</groupId>`,
1031
+ ` <artifactId>maven-shade-plugin</artifactId>`,
1032
+ ` <version>3.5.1</version>`,
1033
+ ` <executions>`,
1034
+ ` <execution>`,
1035
+ ` <phase>package</phase>`,
1036
+ ` <goals>`,
1037
+ ` <goal>shade</goal>`,
1038
+ ` </goals>`,
1039
+ ` </execution>`,
1040
+ ` </executions>`,
1041
+ ` </plugin>`,
1042
+ ` </plugins>`,
1043
+ ` </build>`,
1044
+ ` <dependencies>`,
1045
+ ...(keycloakAccountV1Version !== null
1046
+ ? [
1047
+ ` <dependency>`,
1048
+ ` <groupId>io.phasetwo.keycloak</groupId>`,
1049
+ ` <artifactId>keycloak-account-v1</artifactId>`,
1050
+ ` <version>${keycloakAccountV1Version}</version>`,
1051
+ ` </dependency>`
1052
+ ]
1053
+ : []),
1054
+ ...(keycloakThemeAdditionalInfoExtensionVersion !== null
1055
+ ? [
1056
+ ` <dependency>`,
1057
+ ` <groupId>dev.jcputney</groupId>`,
1058
+ ` <artifactId>keycloak-theme-additional-info-extension</artifactId>`,
1059
+ ` <version>${keycloakThemeAdditionalInfoExtensionVersion}</version>`,
1060
+ ` </dependency>`
1061
+ ]
1062
+ : []),
1063
+ ` </dependencies>`
1064
+ ]
1065
+ : []),
1066
+ `</project>`
1067
+ ].join("\n");
1068
+ return { pomFileCode };
1069
+ })();
1070
+ return { pomFileCode };
1071
+ }
1072
+ //# sourceMappingURL=generatePom.js.map
1073
+ // EXTERNAL MODULE: ./dist/bin/tools/isInside.js
1074
+ var isInside = __webpack_require__(90665);
1075
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/buildJars/buildJar.js
1076
+
1077
+
1078
+
1079
+
1080
+
1081
+
1082
+
1083
+
1084
+
1085
+
1086
+
1087
+ (0,assert.assert)();
1088
+ async function buildJar(params) {
1089
+ const { jarFileBasename, keycloakAccountV1Version, keycloakThemeAdditionalInfoExtensionVersion, resourcesDirPath, buildContext } = params;
1090
+ const keycloakifyBuildTmpDirPath = (0,external_path_.join)(buildContext.cacheDirPath, jarFileBasename.replace(".jar", ""));
1091
+ (0,fs_rmSync/* rmSync */.a)(keycloakifyBuildTmpDirPath, { recursive: true, force: true });
1092
+ const tmpResourcesDirPath = (0,external_path_.join)(keycloakifyBuildTmpDirPath, "src", "main", "resources");
1093
+ (0,transformCodebase/* transformCodebase */.N)({
1094
+ srcDirPath: resourcesDirPath,
1095
+ destDirPath: tmpResourcesDirPath,
1096
+ transformSourceCode: keycloakAccountV1Version !== null
1097
+ ? undefined
1098
+ : (params) => {
1099
+ const { fileRelativePath, sourceCode } = params;
1100
+ if ((0,isInside/* isInside */.V)({
1101
+ dirPath: (0,external_path_.join)("theme", constants/* accountV1ThemeName */.y_),
1102
+ filePath: fileRelativePath
1103
+ })) {
1104
+ return undefined;
1105
+ }
1106
+ for (const themeName of buildContext.themeNames) {
1107
+ if (fileRelativePath ===
1108
+ (0,external_path_.join)("theme", themeName, "account", "theme.properties")) {
1109
+ const modifiedSourceCode = Buffer.from(sourceCode
1110
+ .toString("utf8")
1111
+ .replace(`parent=${constants/* accountV1ThemeName */.y_}`, "parent=keycloak"), "utf8");
1112
+ (0,assert.assert)(Buffer.compare(modifiedSourceCode, sourceCode) !== 0);
1113
+ return { modifiedSourceCode };
1114
+ }
1115
+ }
1116
+ return { modifiedSourceCode: sourceCode };
1117
+ }
1118
+ });
1119
+ if (keycloakAccountV1Version === null) {
1120
+ writeMetaInfKeycloakThemes({
1121
+ resourcesDirPath: tmpResourcesDirPath,
1122
+ getNewMetaInfKeycloakTheme: ({ metaInfKeycloakTheme }) => {
1123
+ (0,assert.assert)(metaInfKeycloakTheme !== undefined);
1124
+ metaInfKeycloakTheme.themes = metaInfKeycloakTheme.themes.filter(({ name }) => name !== constants/* accountV1ThemeName */.y_);
1125
+ return metaInfKeycloakTheme;
1126
+ }
1127
+ });
1128
+ }
1129
+ route_legacy_pages: {
1130
+ // NOTE: If there's no account theme there is no special target for keycloak 24 and up so we create
1131
+ // the pages anyway. If there is an account pages, since we know that account-v1 is only support keycloak
1132
+ // 24 in version 0.4 and up, we can safely break the route for legacy pages.
1133
+ const doBreak = (() => {
1134
+ switch (keycloakAccountV1Version) {
1135
+ case null:
1136
+ return false;
1137
+ case "0.3":
1138
+ return false;
1139
+ default:
1140
+ return true;
1141
+ }
1142
+ })();
1143
+ if (doBreak) {
1144
+ break route_legacy_pages;
1145
+ }
1146
+ ["register.ftl", "login-update-profile.ftl"].forEach(pageId => buildContext.themeNames.map(themeName => {
1147
+ const ftlFilePath = (0,external_path_.join)(keycloakifyBuildTmpDirPath, "src", "main", "resources", "theme", themeName, "login", pageId);
1148
+ const ftlFileContent = (0,external_fs_.readFileSync)(ftlFilePath).toString("utf8");
1149
+ const realPageId = (() => {
1150
+ switch (pageId) {
1151
+ case "register.ftl":
1152
+ return "register-user-profile.ftl";
1153
+ case "login-update-profile.ftl":
1154
+ return "update-user-profile.ftl";
1155
+ }
1156
+ (0,assert.assert)(false);
1157
+ })();
1158
+ const modifiedFtlFileContent = ftlFileContent.replace(`kcContext.pageId = "\${pageId}";`, `kcContext.pageId = "${pageId}"; kcContext.realPageId = "${realPageId}";`);
1159
+ (0,assert.assert)(modifiedFtlFileContent !== ftlFileContent);
1160
+ promises_.writeFile((0,external_path_.join)((0,external_path_.dirname)(ftlFilePath), realPageId), Buffer.from(modifiedFtlFileContent, "utf8"));
1161
+ }));
1162
+ }
1163
+ {
1164
+ const { pomFileCode } = generatePom({
1165
+ buildContext,
1166
+ keycloakAccountV1Version,
1167
+ keycloakThemeAdditionalInfoExtensionVersion
1168
+ });
1169
+ await promises_.writeFile((0,external_path_.join)(keycloakifyBuildTmpDirPath, "pom.xml"), Buffer.from(pomFileCode, "utf8"));
1170
+ }
1171
+ await new Promise((resolve, reject) => external_child_process_default().exec(`mvn clean install -Dmaven.repo.local=${(0,external_path_.join)(keycloakifyBuildTmpDirPath, ".m2")}`, { cwd: keycloakifyBuildTmpDirPath }, error => {
1172
+ if (error !== null) {
1173
+ console.error(`Build jar failed: ${JSON.stringify({
1174
+ jarFileBasename,
1175
+ keycloakAccountV1Version,
1176
+ keycloakThemeAdditionalInfoExtensionVersion
1177
+ }, null, 2)}`);
1178
+ reject(error);
1179
+ return;
1180
+ }
1181
+ resolve();
1182
+ }));
1183
+ await promises_.rename((0,external_path_.join)(keycloakifyBuildTmpDirPath, "target", `${buildContext.artifactId}-${buildContext.themeVersion}.jar`), (0,external_path_.join)(buildContext.keycloakifyBuildDirPath, jarFileBasename));
1184
+ (0,fs_rmSync/* rmSync */.a)(keycloakifyBuildTmpDirPath, { recursive: true });
1185
+ }
1186
+ //# sourceMappingURL=buildJar.js.map
1187
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/buildJars/buildJars.js
1188
+
1189
+
1190
+
1191
+
1192
+ (0,assert.assert)();
1193
+ async function buildJars(params) {
1194
+ const { resourcesDirPath, buildContext } = params;
1195
+ const doesImplementAccountTheme = buildContext.recordIsImplementedByThemeType.account;
1196
+ await Promise.all(keycloakAccountV1Versions.map(keycloakAccountV1Version => keycloakThemeAdditionalInfoExtensionVersions.map(keycloakThemeAdditionalInfoExtensionVersion => {
1197
+ const keycloakVersionRange = getKeycloakVersionRangeForJar({
1198
+ doesImplementAccountTheme,
1199
+ keycloakAccountV1Version,
1200
+ keycloakThemeAdditionalInfoExtensionVersion
1201
+ });
1202
+ if (keycloakVersionRange === undefined) {
1203
+ return undefined;
1204
+ }
1205
+ const jarTarget = buildContext.jarTargets.find(jarTarget => jarTarget.keycloakVersionRange === keycloakVersionRange);
1206
+ if (jarTarget === undefined) {
1207
+ return undefined;
1208
+ }
1209
+ const { jarFileBasename } = jarTarget;
1210
+ return buildJar({
1211
+ jarFileBasename,
1212
+ keycloakAccountV1Version,
1213
+ keycloakThemeAdditionalInfoExtensionVersion,
1214
+ resourcesDirPath,
1215
+ buildContext
1216
+ });
1217
+ }))
1218
+ .flat());
1219
+ }
1220
+ //# sourceMappingURL=buildJars.js.map
1221
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/buildJars/index.js
1222
+
1223
+ //# sourceMappingURL=index.js.map
1224
+ // EXTERNAL MODULE: ./node_modules/chalk/source/index.js
1225
+ var source = __webpack_require__(78818);
1226
+ var source_default = /*#__PURE__*/__webpack_require__.n(source);
1227
+ // EXTERNAL MODULE: external "os"
1228
+ var external_os_ = __webpack_require__(22037);
1229
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/keycloakify.js
1230
+
1231
+
1232
+
1233
+
1234
+
1235
+
1236
+
1237
+
1238
+
1239
+
1240
+
1241
+ async function command(params) {
1242
+ exit_if_maven_not_installed: {
1243
+ let commandOutput = undefined;
1244
+ try {
1245
+ commandOutput = external_child_process_.execSync("mvn --version", {
1246
+ stdio: ["ignore", "pipe", "ignore"]
1247
+ });
1248
+ }
1249
+ catch (_a) { }
1250
+ if (commandOutput === null || commandOutput === void 0 ? void 0 : commandOutput.toString("utf8").includes("Apache Maven")) {
1251
+ break exit_if_maven_not_installed;
1252
+ }
1253
+ const installationCommand = (() => {
1254
+ switch (external_os_.platform()) {
1255
+ case "darwin":
1256
+ return "brew install mvn";
1257
+ case "win32":
1258
+ return "choco install mvn";
1259
+ case "linux":
1260
+ default:
1261
+ return "sudo apt-get install mvn";
1262
+ }
1263
+ })();
1264
+ console.log(`${source_default().red("Apache Maven required.")} Install it with \`${source_default().bold(installationCommand)}\` (for example)`);
1265
+ process.exit(1);
1266
+ }
1267
+ const { cliCommandOptions } = params;
1268
+ const buildContext = (0,shared_buildContext/* getBuildContext */.s)({ cliCommandOptions });
1269
+ console.log([
1270
+ source_default().cyan(`keycloakify v${(0,readThisNpmPackageVersion/* readThisNpmPackageVersion */.K)()}`),
1271
+ source_default().green(`Building the keycloak theme in .${external_path_.sep}${(0,external_path_.relative)(process.cwd(), buildContext.keycloakifyBuildDirPath)} ...`)
1272
+ ].join(" "));
1273
+ const startTime = Date.now();
1274
+ {
1275
+ if (!external_fs_.existsSync(buildContext.keycloakifyBuildDirPath)) {
1276
+ external_fs_.mkdirSync(buildContext.keycloakifyBuildDirPath, {
1277
+ recursive: true
1278
+ });
1279
+ }
1280
+ external_fs_.writeFileSync((0,external_path_.join)(buildContext.keycloakifyBuildDirPath, ".gitignore"), Buffer.from("*", "utf8"));
1281
+ }
1282
+ const resourcesDirPath = (0,external_path_.join)(buildContext.keycloakifyBuildDirPath, "resources");
1283
+ await generateResources({
1284
+ resourcesDirPath,
1285
+ buildContext
1286
+ });
1287
+ run_post_build_script: {
1288
+ if (buildContext.bundler !== "vite") {
1289
+ break run_post_build_script;
1290
+ }
1291
+ external_child_process_.execSync("npx vite", {
1292
+ cwd: buildContext.projectDirPath,
1293
+ env: Object.assign(Object.assign({}, process.env), { [constants/* vitePluginSubScriptEnvNames.runPostBuildScript */.fe.runPostBuildScript]: JSON.stringify({
1294
+ resourcesDirPath,
1295
+ buildContext
1296
+ }) })
1297
+ });
1298
+ }
1299
+ await buildJars({
1300
+ resourcesDirPath,
1301
+ buildContext
1302
+ });
1303
+ (0,fs_rmSync/* rmSync */.a)(resourcesDirPath, { recursive: true });
1304
+ console.log(source_default().green(`✓ keycloak theme built in ${((Date.now() - startTime) / 1000).toFixed(2)}s`));
1305
+ }
1306
+ //# sourceMappingURL=keycloakify.js.map
1307
+ ;// CONCATENATED MODULE: ./dist/bin/keycloakify/index.js
1308
+
1309
+ //# sourceMappingURL=index.js.map
1310
+
1311
+ /***/ }),
1312
+
1313
+ /***/ 62190:
1314
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1315
+
1316
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1317
+ /* harmony export */ "p": () => (/* binding */ downloadKeycloakStaticResources)
1318
+ /* harmony export */ });
1319
+ /* harmony import */ var _tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60332);
1320
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71017);
1321
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_1__);
1322
+ /* harmony import */ var _downloadKeycloakDefaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47802);
1323
+ /* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(173);
1324
+ /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(88078);
1325
+ /* harmony import */ var tsafe_assert__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(tsafe_assert__WEBPACK_IMPORTED_MODULE_4__);
1326
+ /* harmony import */ var _tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(43765);
1327
+
1328
+
1329
+
1330
+
1331
+
1332
+
1333
+ (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_4__.assert)();
1334
+ async function downloadKeycloakStaticResources(params) {
1335
+ const { themeType, themeDirPath, keycloakVersion, buildContext } = params;
1336
+ const { defaultThemeDirPath } = await (0,_downloadKeycloakDefaultTheme__WEBPACK_IMPORTED_MODULE_2__/* .downloadKeycloakDefaultTheme */ .x)({
1337
+ keycloakVersion,
1338
+ buildContext
1339
+ });
1340
+ const resourcesDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(themeDirPath, themeType, "resources");
1341
+ repatriate_base_resources: {
1342
+ const srcDirPath = (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "base", themeType, "resources");
1343
+ if (!(await (0,_tools_fs_existsAsync__WEBPACK_IMPORTED_MODULE_5__/* .existsAsync */ .o)(srcDirPath))) {
1344
+ break repatriate_base_resources;
1345
+ }
1346
+ (0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
1347
+ srcDirPath,
1348
+ destDirPath: resourcesDirPath
1349
+ });
1350
+ }
1351
+ (0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
1352
+ srcDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "keycloak", themeType, "resources"),
1353
+ destDirPath: resourcesDirPath
1354
+ });
1355
+ (0,_tools_transformCodebase__WEBPACK_IMPORTED_MODULE_0__/* .transformCodebase */ .N)({
1356
+ srcDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(defaultThemeDirPath, "keycloak", "common", "resources"),
1357
+ destDirPath: (0,path__WEBPACK_IMPORTED_MODULE_1__.join)(resourcesDirPath, _constants__WEBPACK_IMPORTED_MODULE_3__/* .resources_common */ .z0)
1358
+ });
1359
+ }
1360
+ //# sourceMappingURL=downloadKeycloakStaticResources.js.map
1361
+
1362
+ /***/ }),
1363
+
1364
+ /***/ 27190:
1365
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1366
+
1367
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1368
+ /* harmony export */ "y": () => (/* binding */ escapeStringForPropertiesFile)
1369
+ /* harmony export */ });
1370
+ // Convert a JavaScript string to UTF-16 encoding
1371
+ function toUTF16(codePoint) {
1372
+ if (codePoint <= 0xffff) {
1373
+ // BMP character
1374
+ return "\\u" + codePoint.toString(16).padStart(4, "0");
1375
+ }
1376
+ else {
1377
+ // Non-BMP character
1378
+ codePoint -= 0x10000;
1379
+ let highSurrogate = (codePoint >> 10) + 0xd800;
1380
+ let lowSurrogate = (codePoint % 0x400) + 0xdc00;
1381
+ return ("\\u" +
1382
+ highSurrogate.toString(16).padStart(4, "0") +
1383
+ "\\u" +
1384
+ lowSurrogate.toString(16).padStart(4, "0"));
1385
+ }
1386
+ }
1387
+ // Escapes special characters for use in a .properties file
1388
+ function escapeStringForPropertiesFile(str) {
1389
+ let escapedStr = "";
1390
+ for (const char of [...str]) {
1391
+ const codePoint = char.codePointAt(0);
1392
+ if (!codePoint)
1393
+ continue;
1394
+ switch (char) {
1395
+ case "\n":
1396
+ escapedStr += "\\n";
1397
+ break;
1398
+ case "\r":
1399
+ escapedStr += "\\r";
1400
+ break;
1401
+ case "\t":
1402
+ escapedStr += "\\t";
1403
+ break;
1404
+ case "\\":
1405
+ escapedStr += "\\\\";
1406
+ break;
1407
+ case ":":
1408
+ escapedStr += "\\:";
1409
+ break;
1410
+ case "=":
1411
+ escapedStr += "\\=";
1412
+ break;
1413
+ case "#":
1414
+ escapedStr += "\\#";
1415
+ break;
1416
+ case "!":
1417
+ escapedStr += "\\!";
1418
+ break;
1419
+ case "'":
1420
+ escapedStr += "''";
1421
+ break;
1422
+ default:
1423
+ if (codePoint > 0x7f) {
1424
+ escapedStr += toUTF16(codePoint); // Non-ASCII characters
1425
+ }
1426
+ else {
1427
+ escapedStr += char; // ASCII character needs no escape
1428
+ }
1429
+ }
1430
+ }
1431
+ return escapedStr;
1432
+ }
1433
+ //# sourceMappingURL=escapeStringForPropertiesFile.js.map
1434
+
1435
+ /***/ }),
1436
+
1437
+ /***/ 90665:
1438
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1439
+
1440
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1441
+ /* harmony export */ "V": () => (/* binding */ isInside)
1442
+ /* harmony export */ });
1443
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71017);
1444
+ /* harmony import */ var path__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(path__WEBPACK_IMPORTED_MODULE_0__);
1445
+
1446
+ function isInside(params) {
1447
+ const { dirPath, filePath } = params;
1448
+ return !(0,path__WEBPACK_IMPORTED_MODULE_0__.relative)(dirPath, filePath).startsWith("..");
1449
+ }
1450
+ //# sourceMappingURL=isInside.js.map
1451
+
1452
+ /***/ })
1453
+
1454
+ };
1455
+ ;