@fink-ui/components 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1109) hide show
  1. package/LICENSE +287 -0
  2. package/README.md +57 -2
  3. package/dist/cjs/Heading-foerLIu9-QKM3M64_.js +40 -0
  4. package/dist/cjs/access-and-short-key-BTEwnScd-CasZf-uj.js +15 -0
  5. package/dist/cjs/api-Ba9FNPRn-rTHkYZEI.js +434 -0
  6. package/dist/cjs/app-globals-BQaqIleT.js +28 -0
  7. package/dist/cjs/aria-current-service-4eUMzpeO-emhsMPL3.js +30 -0
  8. package/dist/cjs/aria-labelledby-C4wUnR-v-CxE6OTWv.js +31 -0
  9. package/dist/cjs/base-AKIr0rpk-bPbfzUAQ.js +142 -0
  10. package/dist/cjs/base-C7nTPc7u-BhwWFb1q.js +1093 -0
  11. package/dist/cjs/base-CpUNedp9-XUSugrQg.js +165 -0
  12. package/dist/cjs/base-D7qItqyf-BbbOTUbw.js +214 -0
  13. package/dist/cjs/base-web-component-B3wi5eWH-DYRp0_Cp.js +67 -0
  14. package/dist/cjs/base-web-component-BpL_hXcg-Drs4AWKT.js +197 -0
  15. package/dist/cjs/base-web-component-DorOeD_U-DGNc9bak.js +234 -0
  16. package/dist/cjs/behavior-D9BHiFnH-DQyuXsUx.js +224 -0
  17. package/dist/cjs/behavior-DDo87iUM-DfnNkRgJ.js +1909 -0
  18. package/dist/cjs/behavior-XAV9GSxI-DWZGwtl6.js +166 -0
  19. package/dist/cjs/bem-registry-CrZZQahR-Dsn0TBlY.js +619 -0
  20. package/dist/cjs/bootstrap-Cz7Iq2I2-Bcg6Ig6g.js +58 -0
  21. package/dist/cjs/color-CnVBqZd5-Bat4Qm2q.js +60 -0
  22. package/dist/cjs/component-0npqUhj2-qp7pd5wT.js +141 -0
  23. package/dist/cjs/component-BCKsZOoB-D3_uvry6.js +23 -0
  24. package/dist/cjs/component-BZjDp_Lf-85vhAON7.js +20 -0
  25. package/dist/cjs/component-CjdTbGlP-Y_6DLMyJ.js +178 -0
  26. package/dist/cjs/component-Cn693XeT-D2RHI-mG.js +53 -0
  27. package/dist/cjs/component-Cvd5HXbX-D-tGBgwx.js +66 -0
  28. package/dist/cjs/component-CvdxCpjC-A5gOfnw4.js +49 -0
  29. package/dist/cjs/component-DFhRTaqb-CKItH_ej.js +127 -0
  30. package/dist/cjs/component-DP_p5few-B5O6gbGq.js +100 -0
  31. package/dist/cjs/component-DlROeCCe-DPm6I-PP.js +92 -0
  32. package/dist/cjs/component-names-DzmdvSkQ-CGSrl0lP.js +122 -0
  33. package/dist/cjs/contrast-BHjNzQvB-bpMVkXiN.js +67 -0
  34. package/dist/cjs/controller-DYkXzFqc-DWdZzY6f.js +117 -0
  35. package/dist/cjs/dev.utils-BgFDROtc-DkabL34N.js +84 -0
  36. package/dist/cjs/devtools-B6h2bVMJ-CtxQrosK.js +100 -0
  37. package/dist/cjs/disabled-BZIZZ6wy-DIculoOg.js +12 -0
  38. package/dist/cjs/element-focus-C0L8NWU8-C65ZOrOV.js +157 -0
  39. package/dist/cjs/element-interaction-B3GEli6r-ByFTg4X5.js +101 -0
  40. package/dist/cjs/events-DdfMb1U7-CnoJDEJq.js +55 -0
  41. package/dist/cjs/field-control-QF0yTcyb-BkxThVwi.js +31 -0
  42. package/dist/cjs/fink-app-shell.cjs.entry.js +133 -0
  43. package/dist/cjs/fink-avatar-group.cjs.entry.js +62 -0
  44. package/dist/cjs/fink-back-to-top.cjs.entry.js +52 -0
  45. package/dist/cjs/fink-bar-chart.cjs.entry.js +50 -0
  46. package/dist/cjs/fink-bottom-nav.cjs.entry.js +50 -0
  47. package/dist/cjs/fink-calendar.cjs.entry.js +150 -0
  48. package/dist/cjs/fink-carousel.cjs.entry.js +103 -0
  49. package/dist/cjs/fink-chip.cjs.entry.js +76 -0
  50. package/dist/cjs/fink-code-block.cjs.entry.js +171 -0
  51. package/dist/cjs/fink-consent-banner.cjs.entry.js +88 -0
  52. package/dist/cjs/fink-divider.cjs.entry.js +33 -0
  53. package/dist/cjs/fink-empty-state.cjs.entry.js +26 -0
  54. package/dist/cjs/fink-fab.cjs.entry.js +59 -0
  55. package/dist/cjs/fink-feedback.cjs.entry.js +41 -0
  56. package/dist/cjs/fink-file-upload.cjs.entry.js +114 -0
  57. package/dist/cjs/fink-footer.cjs.entry.js +37 -0
  58. package/dist/cjs/fink-grid.cjs.entry.js +23 -0
  59. package/dist/cjs/fink-image-list.cjs.entry.js +65 -0
  60. package/dist/cjs/fink-infinite-scroll.cjs.entry.js +73 -0
  61. package/dist/cjs/fink-kbd.cjs.entry.js +27 -0
  62. package/dist/cjs/fink-list.cjs.entry.js +77 -0
  63. package/dist/cjs/fink-logo.cjs.entry.js +29 -0
  64. package/dist/cjs/fink-menu.cjs.entry.js +141 -0
  65. package/dist/cjs/fink-otp-input.cjs.entry.js +111 -0
  66. package/dist/cjs/fink-page-header_4.cjs.entry.js +176 -0
  67. package/dist/cjs/fink-panel.cjs.entry.js +26 -0
  68. package/dist/cjs/fink-popconfirm.cjs.entry.js +61 -0
  69. package/dist/cjs/fink-range-slider.cjs.entry.js +80 -0
  70. package/dist/cjs/fink-rating.cjs.entry.js +64 -0
  71. package/dist/cjs/fink-result.cjs.entry.js +49 -0
  72. package/dist/cjs/fink-segmented.cjs.entry.js +51 -0
  73. package/dist/cjs/fink-selection-bar.cjs.entry.js +36 -0
  74. package/dist/cjs/fink-skeleton.cjs.entry.js +33 -0
  75. package/dist/cjs/fink-sparkline.cjs.entry.js +77 -0
  76. package/dist/cjs/fink-splitter.cjs.entry.js +84 -0
  77. package/dist/cjs/fink-stack.cjs.entry.js +35 -0
  78. package/dist/cjs/fink-stat-card.cjs.entry.js +58 -0
  79. package/dist/cjs/fink-summary-list.cjs.entry.js +29 -0
  80. package/dist/cjs/fink-tag-input.cjs.entry.js +113 -0
  81. package/dist/cjs/fink-timeline.cjs.entry.js +35 -0
  82. package/dist/cjs/fink-toc.cjs.entry.js +83 -0
  83. package/dist/cjs/fink-tour.cjs.entry.js +126 -0
  84. package/dist/cjs/fink-transfer-list.cjs.entry.js +101 -0
  85. package/dist/cjs/fink-virtual-list.cjs.entry.js +99 -0
  86. package/dist/cjs/fink.cjs.js +25 -0
  87. package/dist/cjs/group-8Me6YSO8-KMX-J6Nw.js +161 -0
  88. package/dist/cjs/has-closer-B-uYNNCw-BMi7yDrc.js +12 -0
  89. package/dist/cjs/href-DKPJq0Rh-Br0Co0Hf.js +12 -0
  90. package/dist/cjs/i18n-TlIXBsgS-tXG7od7W.js +227 -0
  91. package/dist/cjs/i18n-Uze_l4Ts-KcllxhQ3.js +17 -0
  92. package/dist/cjs/id-CkUYl2hO-aN84VRbL.js +12 -0
  93. package/dist/cjs/index-BnPDz_vB.js +5029 -0
  94. package/dist/cjs/index-C5tkyUxS.js +45 -0
  95. package/dist/cjs/index-CNO6HyrP.js +2004 -0
  96. package/dist/cjs/index-TsgAqj51.js +254 -0
  97. package/dist/cjs/index-xQL8L4ZS.js +2544 -0
  98. package/dist/cjs/index.cjs.js +33 -0
  99. package/dist/cjs/info-tuXhkPMr-F7Nn80k7.js +5590 -0
  100. package/dist/cjs/input-DwlolkOG-ZSHXWVxw.js +19 -0
  101. package/dist/cjs/input-container-DC3x4oGg-_Z5rQyil.js +102 -0
  102. package/dist/cjs/item-DThxrTZc-CDeyfJAJ.js +527 -0
  103. package/dist/cjs/item-cArH2C6l-3XgvOwr_.js +93 -0
  104. package/dist/cjs/item-pool-D4qvvY-S-152khmPs.js +46 -0
  105. package/dist/cjs/item-uC3h4pj3-CWCiuOrw.js +178 -0
  106. package/dist/cjs/item-zPmzbSvE-Cio4UhtM.js +88 -0
  107. package/dist/cjs/keyboard-DzlBdECG-HWqF6kPw.js +46 -0
  108. package/dist/cjs/kol-abbr.entry-vXy8tkfC.js +49 -0
  109. package/dist/cjs/kol-accordion.entry-DlfL8K5B.js +130 -0
  110. package/dist/cjs/kol-alert.entry-BSoN_9JY.js +190 -0
  111. package/dist/cjs/kol-avatar.entry-BTWt7leQ.js +100 -0
  112. package/dist/cjs/kol-badge.entry-iHLDICRD.js +176 -0
  113. package/dist/cjs/kol-breadcrumb.entry-Cjli4lJk.js +220 -0
  114. package/dist/cjs/kol-button-link.entry-D0tpwXhh.js +231 -0
  115. package/dist/cjs/kol-button.entry-PJhmI8Sb.js +241 -0
  116. package/dist/cjs/kol-card.entry-DICGVwpp.js +159 -0
  117. package/dist/cjs/kol-combobox.entry-knkAeqUE.js +549 -0
  118. package/dist/cjs/kol-details.entry-D0e4DD0G.js +130 -0
  119. package/dist/cjs/kol-dialog.entry-Dl1tatrP.js +132 -0
  120. package/dist/cjs/kol-drawer.entry-B5bf_Ygn.js +276 -0
  121. package/dist/cjs/kol-form.entry-DzeQve42.js +189 -0
  122. package/dist/cjs/kol-heading.entry-CwqmgXUS.js +83 -0
  123. package/dist/cjs/kol-icon.entry-CXVnSfdK.js +61 -0
  124. package/dist/cjs/kol-image.entry-2UshvJbB.js +114 -0
  125. package/dist/cjs/kol-input-checkbox.entry-DuxJ4K37.js +413 -0
  126. package/dist/cjs/kol-input-color.entry-2P1VK_Nn.js +319 -0
  127. package/dist/cjs/kol-input-date.entry-1oMHl1vG.js +534 -0
  128. package/dist/cjs/kol-input-email.entry-CxKE1-QV.js +351 -0
  129. package/dist/cjs/kol-input-file.entry-T5K_9_NM.js +384 -0
  130. package/dist/cjs/kol-input-number.entry-DSEAmFMI.js +440 -0
  131. package/dist/cjs/kol-input-password.entry-CVy2U3X0.js +375 -0
  132. package/dist/cjs/kol-input-radio.entry-CAuQGZYt.js +396 -0
  133. package/dist/cjs/kol-input-range.entry-DWH6ku6R.js +376 -0
  134. package/dist/cjs/kol-input-text.entry-ConfFR_K.js +439 -0
  135. package/dist/cjs/kol-kolibri.entry-CZVJE2wv.js +65 -0
  136. package/dist/cjs/kol-link-button.entry-CutGwpy4.js +223 -0
  137. package/dist/cjs/kol-link.entry-BGi6OGH-.js +210 -0
  138. package/dist/cjs/kol-meter.entry-DmZr5NfI.js +209 -0
  139. package/dist/cjs/kol-modal.entry-B-uPnZY7.js +123 -0
  140. package/dist/cjs/kol-nav.entry-D_Vzzpei.js +270 -0
  141. package/dist/cjs/kol-pagination.entry-DC6RnzZM.js +180 -0
  142. package/dist/cjs/kol-popover-button.entry-DCuMKVV1.js +251 -0
  143. package/dist/cjs/kol-progress.entry-CrVB7Lby.js +146 -0
  144. package/dist/cjs/kol-quote.entry-BoyX7ERY.js +84 -0
  145. package/dist/cjs/kol-select.entry-6Q7DoxPg.js +281 -0
  146. package/dist/cjs/kol-single-select.entry-SVOaIf8O.js +569 -0
  147. package/dist/cjs/kol-skip-nav.entry-D47uNPxq.js +198 -0
  148. package/dist/cjs/kol-spin.entry-UQi3gbnc.js +63 -0
  149. package/dist/cjs/kol-split-button.entry-iqGx05hp.js +277 -0
  150. package/dist/cjs/kol-table-stateful.entry-DqyiQJuV.js +685 -0
  151. package/dist/cjs/kol-table-stateless.entry-HO5w-yoL.js +189 -0
  152. package/dist/cjs/kol-tabs.entry-BLiZCkhW.js +466 -0
  153. package/dist/cjs/kol-textarea.entry--x3xgZUB.js +475 -0
  154. package/dist/cjs/kol-toast-container.entry-BLqOuOV3.js +117 -0
  155. package/dist/cjs/kol-toolbar.entry-DRKVAZ8i.js +299 -0
  156. package/dist/cjs/kol-tree-item.entry-By_K31wa.js +193 -0
  157. package/dist/cjs/kol-tree.entry-D8g1oLrh.js +279 -0
  158. package/dist/cjs/kol-version.entry-BPai8La9.js +66 -0
  159. package/dist/cjs/label-G82W4YoW-5k7AGiMy.js +16 -0
  160. package/dist/cjs/label-hints-DiRb_zIZ-D9E4Dp1C.js +23 -0
  161. package/dist/cjs/label-lang-segment-BSVexfSR-BtHMK8oV.js +15 -0
  162. package/dist/cjs/label-with-expert-slot-C1i0atAL-C5_JcNb3.js +16 -0
  163. package/dist/cjs/level-CWkPM-CS-CTFYyWv8.js +13 -0
  164. package/dist/cjs/link-target-B2OC2sZU-cBvae1pl.js +12 -0
  165. package/dist/cjs/links-CiNHSAYH-DQqGMQIz.js +16 -0
  166. package/dist/cjs/loader.cjs.js +13 -0
  167. package/dist/cjs/multiple-CuU2AuEM-SBTxcwlv.js +12 -0
  168. package/dist/cjs/number-value-adUq1zr1-CZd2xpDg.js +54 -0
  169. package/dist/cjs/open-DR8Z7RtS-DIQgjIv3.js +12 -0
  170. package/dist/cjs/open-items-cache-CS2mDRNB-DZu6FfYQ.js +25 -0
  171. package/dist/cjs/options-BDTJtk6H-Bb6AhJrA.js +31 -0
  172. package/dist/cjs/options-BPwcDIDO-DYAwq-lq.js +26 -0
  173. package/dist/cjs/orientation-BUPO9LJU-B7qzv8lO.js +21 -0
  174. package/dist/cjs/placeholder-BTFnryTd-BeG1x8J1.js +12 -0
  175. package/dist/cjs/props-from-config-DqFgiUwD-pOE_0hRW.js +2503 -0
  176. package/dist/cjs/read-only-DRmmHb2G-CnIJVzJD.js +12 -0
  177. package/dist/cjs/required-D4CdAA4s-3cwNsOi9.js +12 -0
  178. package/dist/cjs/resolve-color-aQz2CZ-X.js +78 -0
  179. package/dist/cjs/resolve-props-BAambGug-orZkBfeI.js +61 -0
  180. package/dist/cjs/resolve-props-Dpl38Wpe-358sX0ki.js +58 -0
  181. package/dist/cjs/rows-DRKSoawJ-ndIZla-m.js +12 -0
  182. package/dist/cjs/scroll-lock-C66lpb8L-CO9LVaJW.js +72 -0
  183. package/dist/cjs/shared-CMzQXmgd.js +26 -0
  184. package/dist/cjs/smart-button-BYEk3DzS-CEH1mbpj.js +19 -0
  185. package/dist/cjs/spell-check-DlQ_d2GL-TOFAGfnW.js +12 -0
  186. package/dist/cjs/src-Cikg9qhP-CLoB_Iqr.js +12 -0
  187. package/dist/cjs/step-C7WPZrUp-Bwzrsjv5.js +12 -0
  188. package/dist/cjs/suggestions-CotfxJG1-JyiUU_C5.js +25 -0
  189. package/dist/cjs/suggestions-qW9OdwO3-CupxEvYq.js +23 -0
  190. package/dist/cjs/test-component.entry-B_voa1f2.js +16 -0
  191. package/dist/cjs/theme-store-DroJsU6S-Cn_2BXeA.js +4476 -0
  192. package/dist/cjs/toggle-handler-BB_SIgS1-CGk_NFet.js +104 -0
  193. package/dist/cjs/tone-CbCEXb_l.js +6 -0
  194. package/dist/cjs/tooltip-open-tracking-CxHWKk8f-239HlKMW.js +26 -0
  195. package/dist/cjs/tslib.es6-QNbPBOk5-D6b02iQK.js +48 -0
  196. package/dist/cjs/unique-nav-labels-CQgKoOXd-CnxUuYe6.js +26 -0
  197. package/dist/cjs/unit-D2lG-lEM-CkwoMBFe.js +15 -0
  198. package/dist/cjs/validators-yh10eyXe-CsHQTosD.js +19 -0
  199. package/dist/cjs/value-string-DwEIOG1f-k1qSqkV7.js +12 -0
  200. package/dist/cjs/viewport-inset-Do_HqTBo.js +26 -0
  201. package/dist/cjs/width-xawzWTVW-AKH4gj28.js +32 -0
  202. package/dist/collection/assets/icon-fonts/codicons/codicon.css +805 -0
  203. package/dist/collection/assets/icon-fonts/codicons/codicon.csv +631 -0
  204. package/dist/collection/assets/icon-fonts/codicons/codicon.html +18216 -0
  205. package/dist/collection/assets/icon-fonts/codicons/codicon.svg +1 -0
  206. package/dist/collection/assets/icon-fonts/codicons/codicon.ttf +0 -0
  207. package/dist/collection/assets/icon-fonts/codicons/codiconsLibrary.ts +758 -0
  208. package/dist/collection/assets/icon-fonts/codicons/metadata.json +7235 -0
  209. package/dist/collection/assets/icon-fonts/fontawesome-free/css/all.css +7913 -0
  210. package/dist/collection/assets/icon-fonts/fontawesome-free/css/all.min.css +9 -0
  211. package/dist/collection/assets/icon-fonts/fontawesome-free/css/brands.css +1609 -0
  212. package/dist/collection/assets/icon-fonts/fontawesome-free/css/brands.min.css +6 -0
  213. package/dist/collection/assets/icon-fonts/fontawesome-free/css/fontawesome.css +6243 -0
  214. package/dist/collection/assets/icon-fonts/fontawesome-free/css/fontawesome.min.css +9 -0
  215. package/dist/collection/assets/icon-fonts/fontawesome-free/css/regular.css +19 -0
  216. package/dist/collection/assets/icon-fonts/fontawesome-free/css/regular.min.css +6 -0
  217. package/dist/collection/assets/icon-fonts/fontawesome-free/css/solid.css +19 -0
  218. package/dist/collection/assets/icon-fonts/fontawesome-free/css/solid.min.css +6 -0
  219. package/dist/collection/assets/icon-fonts/fontawesome-free/css/svg-with-js.css +461 -0
  220. package/dist/collection/assets/icon-fonts/fontawesome-free/css/svg-with-js.min.css +6 -0
  221. package/dist/collection/assets/icon-fonts/fontawesome-free/css/v4-font-face.css +26 -0
  222. package/dist/collection/assets/icon-fonts/fontawesome-free/css/v4-font-face.min.css +6 -0
  223. package/dist/collection/assets/icon-fonts/fontawesome-free/css/v4-shims.css +2194 -0
  224. package/dist/collection/assets/icon-fonts/fontawesome-free/css/v4-shims.min.css +6 -0
  225. package/dist/collection/assets/icon-fonts/fontawesome-free/css/v5-font-face.css +22 -0
  226. package/dist/collection/assets/icon-fonts/fontawesome-free/css/v5-font-face.min.css +6 -0
  227. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-brands-400.ttf +0 -0
  228. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-brands-400.woff2 +0 -0
  229. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-regular-400.ttf +0 -0
  230. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-regular-400.woff2 +0 -0
  231. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-solid-900.ttf +0 -0
  232. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-solid-900.woff2 +0 -0
  233. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-v4compatibility.ttf +0 -0
  234. package/dist/collection/assets/icon-fonts/fontawesome-free/webfonts/fa-v4compatibility.woff2 +0 -0
  235. package/dist/collection/assets/icon-fonts/icon-fonts.css +4 -0
  236. package/dist/collection/assets/icon-fonts/kolicons/kolicons.eot +0 -0
  237. package/dist/collection/assets/icon-fonts/kolicons/kolicons.json +31 -0
  238. package/dist/collection/assets/icon-fonts/kolicons/kolicons.svg +99 -0
  239. package/dist/collection/assets/icon-fonts/kolicons/kolicons.ttf +0 -0
  240. package/dist/collection/assets/icon-fonts/kolicons/kolicons.woff +0 -0
  241. package/dist/collection/assets/icon-fonts/kolicons/kolicons.woff2 +0 -0
  242. package/dist/collection/assets/icon-fonts/kolicons/style.css +51 -0
  243. package/dist/collection/assets/icon-fonts/manifest.json +14 -0
  244. package/dist/collection/collection-manifest.json +60 -0
  245. package/dist/collection/components/app-shell/app-shell.css +203 -0
  246. package/dist/collection/components/app-shell/app-shell.js +298 -0
  247. package/dist/collection/components/avatar-group/avatar-group.css +42 -0
  248. package/dist/collection/components/avatar-group/avatar-group.js +161 -0
  249. package/dist/collection/components/back-to-top/back-to-top.css +38 -0
  250. package/dist/collection/components/back-to-top/back-to-top.js +126 -0
  251. package/dist/collection/components/bar-chart/bar-chart.css +108 -0
  252. package/dist/collection/components/bar-chart/bar-chart.js +204 -0
  253. package/dist/collection/components/bottom-nav/bottom-nav.css +95 -0
  254. package/dist/collection/components/bottom-nav/bottom-nav.js +142 -0
  255. package/dist/collection/components/calendar/calendar.css +140 -0
  256. package/dist/collection/components/calendar/calendar.js +320 -0
  257. package/dist/collection/components/carousel/carousel.css +110 -0
  258. package/dist/collection/components/carousel/carousel.js +211 -0
  259. package/dist/collection/components/chip/chip.css +4 -0
  260. package/dist/collection/components/chip/chip.js +240 -0
  261. package/dist/collection/components/code-block/code-block.css +183 -0
  262. package/dist/collection/components/code-block/code-block.js +237 -0
  263. package/dist/collection/components/consent-banner/consent-banner.css +86 -0
  264. package/dist/collection/components/consent-banner/consent-banner.js +224 -0
  265. package/dist/collection/components/divider/divider.css +72 -0
  266. package/dist/collection/components/divider/divider.js +123 -0
  267. package/dist/collection/components/empty-state/empty-state.css +51 -0
  268. package/dist/collection/components/empty-state/empty-state.js +113 -0
  269. package/dist/collection/components/fab/fab.css +85 -0
  270. package/dist/collection/components/fab/fab.js +219 -0
  271. package/dist/collection/components/feedback/feedback.css +50 -0
  272. package/dist/collection/components/feedback/feedback.js +116 -0
  273. package/dist/collection/components/file-upload/file-upload.css +178 -0
  274. package/dist/collection/components/file-upload/file-upload.js +331 -0
  275. package/dist/collection/components/footer/footer.css +78 -0
  276. package/dist/collection/components/footer/footer.js +121 -0
  277. package/dist/collection/components/grid/grid.css +10 -0
  278. package/dist/collection/components/grid/grid.js +79 -0
  279. package/dist/collection/components/image-list/image-list.css +171 -0
  280. package/dist/collection/components/image-list/image-list.js +204 -0
  281. package/dist/collection/components/infinite-scroll/infinite-scroll.css +29 -0
  282. package/dist/collection/components/infinite-scroll/infinite-scroll.js +188 -0
  283. package/dist/collection/components/kbd/kbd.css +32 -0
  284. package/dist/collection/components/kbd/kbd.js +54 -0
  285. package/dist/collection/components/list/list.css +169 -0
  286. package/dist/collection/components/list/list.js +255 -0
  287. package/dist/collection/components/logo/logo.css +48 -0
  288. package/dist/collection/components/logo/logo.js +102 -0
  289. package/dist/collection/components/menu/menu.css +101 -0
  290. package/dist/collection/components/menu/menu.js +331 -0
  291. package/dist/collection/components/otp-input/otp-input.css +68 -0
  292. package/dist/collection/components/otp-input/otp-input.js +295 -0
  293. package/dist/collection/components/page-header/page-header.css +62 -0
  294. package/dist/collection/components/page-header/page-header.js +93 -0
  295. package/dist/collection/components/panel/panel.css +79 -0
  296. package/dist/collection/components/panel/panel.js +116 -0
  297. package/dist/collection/components/popconfirm/popconfirm.css +49 -0
  298. package/dist/collection/components/popconfirm/popconfirm.js +281 -0
  299. package/dist/collection/components/range-slider/range-slider.css +129 -0
  300. package/dist/collection/components/range-slider/range-slider.js +288 -0
  301. package/dist/collection/components/rating/rating.css +72 -0
  302. package/dist/collection/components/rating/rating.js +189 -0
  303. package/dist/collection/components/result/result.css +127 -0
  304. package/dist/collection/components/result/result.js +187 -0
  305. package/dist/collection/components/segmented/segmented.css +83 -0
  306. package/dist/collection/components/segmented/segmented.js +160 -0
  307. package/dist/collection/components/selection-bar/selection-bar.css +52 -0
  308. package/dist/collection/components/selection-bar/selection-bar.js +106 -0
  309. package/dist/collection/components/skeleton/skeleton.css +58 -0
  310. package/dist/collection/components/skeleton/skeleton.js +138 -0
  311. package/dist/collection/components/sparkline/sparkline.css +63 -0
  312. package/dist/collection/components/sparkline/sparkline.js +208 -0
  313. package/dist/collection/components/splitter/splitter.css +89 -0
  314. package/dist/collection/components/splitter/splitter.js +240 -0
  315. package/dist/collection/components/stack/stack.css +10 -0
  316. package/dist/collection/components/stack/stack.js +150 -0
  317. package/dist/collection/components/stat-card/stat-card.css +143 -0
  318. package/dist/collection/components/stat-card/stat-card.js +232 -0
  319. package/dist/collection/components/status/status.css +5 -0
  320. package/dist/collection/components/status/status.js +116 -0
  321. package/dist/collection/components/stepper/stepper.css +137 -0
  322. package/dist/collection/components/stepper/stepper.js +170 -0
  323. package/dist/collection/components/summary-list/summary-list.css +88 -0
  324. package/dist/collection/components/summary-list/summary-list.js +119 -0
  325. package/dist/collection/components/tag-input/tag-input.css +34 -0
  326. package/dist/collection/components/tag-input/tag-input.js +304 -0
  327. package/dist/collection/components/task-list/task-list.css +86 -0
  328. package/dist/collection/components/task-list/task-list.js +125 -0
  329. package/dist/collection/components/timeline/timeline.css +95 -0
  330. package/dist/collection/components/timeline/timeline.js +91 -0
  331. package/dist/collection/components/toc/toc.css +66 -0
  332. package/dist/collection/components/toc/toc.js +183 -0
  333. package/dist/collection/components/tour/tour.css +119 -0
  334. package/dist/collection/components/tour/tour.js +249 -0
  335. package/dist/collection/components/transfer-list/transfer-list.css +150 -0
  336. package/dist/collection/components/transfer-list/transfer-list.js +259 -0
  337. package/dist/collection/components/virtual-list/virtual-list.css +99 -0
  338. package/dist/collection/components/virtual-list/virtual-list.js +239 -0
  339. package/dist/collection/fink.css +13 -0
  340. package/dist/collection/fonts.css +6 -0
  341. package/dist/collection/global/script.js +21 -0
  342. package/dist/collection/i18n/index.js +53 -0
  343. package/dist/collection/i18n/locales.js +245 -0
  344. package/dist/collection/index.js +3 -0
  345. package/dist/collection/tokens.css +1307 -0
  346. package/dist/collection/utils/highlight.js +80 -0
  347. package/dist/collection/utils/resolve-color.js +72 -0
  348. package/dist/collection/utils/shared.js +21 -0
  349. package/dist/collection/utils/tone.js +2 -0
  350. package/dist/collection/utils/viewport-inset.js +22 -0
  351. package/dist/components/fink-app-shell.d.ts +11 -0
  352. package/dist/components/fink-app-shell.js +1 -0
  353. package/dist/components/fink-avatar-group.d.ts +11 -0
  354. package/dist/components/fink-avatar-group.js +1 -0
  355. package/dist/components/fink-back-to-top.d.ts +11 -0
  356. package/dist/components/fink-back-to-top.js +1 -0
  357. package/dist/components/fink-bar-chart.d.ts +11 -0
  358. package/dist/components/fink-bar-chart.js +1 -0
  359. package/dist/components/fink-bottom-nav.d.ts +11 -0
  360. package/dist/components/fink-bottom-nav.js +1 -0
  361. package/dist/components/fink-calendar.d.ts +11 -0
  362. package/dist/components/fink-calendar.js +1 -0
  363. package/dist/components/fink-carousel.d.ts +11 -0
  364. package/dist/components/fink-carousel.js +1 -0
  365. package/dist/components/fink-chip.d.ts +11 -0
  366. package/dist/components/fink-chip.js +1 -0
  367. package/dist/components/fink-code-block.d.ts +11 -0
  368. package/dist/components/fink-code-block.js +1 -0
  369. package/dist/components/fink-consent-banner.d.ts +11 -0
  370. package/dist/components/fink-consent-banner.js +1 -0
  371. package/dist/components/fink-divider.d.ts +11 -0
  372. package/dist/components/fink-divider.js +1 -0
  373. package/dist/components/fink-empty-state.d.ts +11 -0
  374. package/dist/components/fink-empty-state.js +1 -0
  375. package/dist/components/fink-fab.d.ts +11 -0
  376. package/dist/components/fink-fab.js +1 -0
  377. package/dist/components/fink-feedback.d.ts +11 -0
  378. package/dist/components/fink-feedback.js +1 -0
  379. package/dist/components/fink-file-upload.d.ts +11 -0
  380. package/dist/components/fink-file-upload.js +1 -0
  381. package/dist/components/fink-footer.d.ts +11 -0
  382. package/dist/components/fink-footer.js +1 -0
  383. package/dist/components/fink-grid.d.ts +11 -0
  384. package/dist/components/fink-grid.js +1 -0
  385. package/dist/components/fink-image-list.d.ts +11 -0
  386. package/dist/components/fink-image-list.js +1 -0
  387. package/dist/components/fink-infinite-scroll.d.ts +11 -0
  388. package/dist/components/fink-infinite-scroll.js +1 -0
  389. package/dist/components/fink-kbd.d.ts +11 -0
  390. package/dist/components/fink-kbd.js +1 -0
  391. package/dist/components/fink-list.d.ts +11 -0
  392. package/dist/components/fink-list.js +1 -0
  393. package/dist/components/fink-logo.d.ts +11 -0
  394. package/dist/components/fink-logo.js +1 -0
  395. package/dist/components/fink-menu.d.ts +11 -0
  396. package/dist/components/fink-menu.js +1 -0
  397. package/dist/components/fink-otp-input.d.ts +11 -0
  398. package/dist/components/fink-otp-input.js +1 -0
  399. package/dist/components/fink-page-header.d.ts +11 -0
  400. package/dist/components/fink-page-header.js +1 -0
  401. package/dist/components/fink-panel.d.ts +11 -0
  402. package/dist/components/fink-panel.js +1 -0
  403. package/dist/components/fink-popconfirm.d.ts +11 -0
  404. package/dist/components/fink-popconfirm.js +1 -0
  405. package/dist/components/fink-range-slider.d.ts +11 -0
  406. package/dist/components/fink-range-slider.js +1 -0
  407. package/dist/components/fink-rating.d.ts +11 -0
  408. package/dist/components/fink-rating.js +1 -0
  409. package/dist/components/fink-result.d.ts +11 -0
  410. package/dist/components/fink-result.js +1 -0
  411. package/dist/components/fink-segmented.d.ts +11 -0
  412. package/dist/components/fink-segmented.js +1 -0
  413. package/dist/components/fink-selection-bar.d.ts +11 -0
  414. package/dist/components/fink-selection-bar.js +1 -0
  415. package/dist/components/fink-skeleton.d.ts +11 -0
  416. package/dist/components/fink-skeleton.js +1 -0
  417. package/dist/components/fink-sparkline.d.ts +11 -0
  418. package/dist/components/fink-sparkline.js +1 -0
  419. package/dist/components/fink-splitter.d.ts +11 -0
  420. package/dist/components/fink-splitter.js +1 -0
  421. package/dist/components/fink-stack.d.ts +11 -0
  422. package/dist/components/fink-stack.js +1 -0
  423. package/dist/components/fink-stat-card.d.ts +11 -0
  424. package/dist/components/fink-stat-card.js +1 -0
  425. package/dist/components/fink-status.d.ts +11 -0
  426. package/dist/components/fink-status.js +1 -0
  427. package/dist/components/fink-stepper.d.ts +11 -0
  428. package/dist/components/fink-stepper.js +1 -0
  429. package/dist/components/fink-summary-list.d.ts +11 -0
  430. package/dist/components/fink-summary-list.js +1 -0
  431. package/dist/components/fink-tag-input.d.ts +11 -0
  432. package/dist/components/fink-tag-input.js +1 -0
  433. package/dist/components/fink-task-list.d.ts +11 -0
  434. package/dist/components/fink-task-list.js +1 -0
  435. package/dist/components/fink-timeline.d.ts +11 -0
  436. package/dist/components/fink-timeline.js +1 -0
  437. package/dist/components/fink-toc.d.ts +11 -0
  438. package/dist/components/fink-toc.js +1 -0
  439. package/dist/components/fink-tour.d.ts +11 -0
  440. package/dist/components/fink-tour.js +1 -0
  441. package/dist/components/fink-transfer-list.d.ts +11 -0
  442. package/dist/components/fink-transfer-list.js +1 -0
  443. package/dist/components/fink-virtual-list.d.ts +11 -0
  444. package/dist/components/fink-virtual-list.js +1 -0
  445. package/dist/components/index.d.ts +35 -0
  446. package/dist/components/index.js +1 -0
  447. package/dist/components/p--dluw9sU.js +4 -0
  448. package/dist/components/p-0q_cDiSu.js +1 -0
  449. package/dist/components/p-2G6i00Y4.js +4 -0
  450. package/dist/components/p-4VqUGnzw.js +4 -0
  451. package/dist/components/p-7b6zbUGV.js +4 -0
  452. package/dist/components/p-7pkFNJTS.js +4 -0
  453. package/dist/components/p-80r0hOg-.js +4 -0
  454. package/dist/components/p-9Omm5njj.js +4 -0
  455. package/dist/components/p-B-BbokvN.js +1 -0
  456. package/dist/components/p-B0rajiBV.js +4 -0
  457. package/dist/components/p-B1f-WAgD.js +4 -0
  458. package/dist/components/p-B4W2Axj0.js +4 -0
  459. package/dist/components/p-B55_WIt8.js +4 -0
  460. package/dist/components/p-B9vMUbQn.js +4 -0
  461. package/dist/components/p-BA22-sOe.js +4 -0
  462. package/dist/components/p-BCaU1mmT.js +4 -0
  463. package/dist/components/p-BDLnNXyN.js +4 -0
  464. package/dist/components/p-BMbOqdum.js +4 -0
  465. package/dist/components/p-BMikH-F1.js +4 -0
  466. package/dist/components/p-BNSBWfez.js +4 -0
  467. package/dist/components/p-BNeRxcyt.js +4 -0
  468. package/dist/components/p-BNv-BhuC.js +4 -0
  469. package/dist/components/p-BNxwDdo8.js +1 -0
  470. package/dist/components/p-BQcXMEDu.js +4 -0
  471. package/dist/components/p-BRzdX6D6.js +4 -0
  472. package/dist/components/p-BTYNOWWo.js +4 -0
  473. package/dist/components/p-BUaDrw6r.js +4 -0
  474. package/dist/components/p-BVEpQXTA.js +4 -0
  475. package/dist/components/p-BVQi1Qdz.js +4 -0
  476. package/dist/components/p-BVou7RHK.js +4 -0
  477. package/dist/components/p-BW20VO0z.js +4 -0
  478. package/dist/components/p-BXdJ0qF-.js +4 -0
  479. package/dist/components/p-BYjXAF2t.js +4 -0
  480. package/dist/components/p-BZeLdsTL.js +4 -0
  481. package/dist/components/p-BZrfikC0.js +1 -0
  482. package/dist/components/p-BbBslcM3.js +4 -0
  483. package/dist/components/p-BfVBCtH5.js +4 -0
  484. package/dist/components/p-BgDm6xES.js +4 -0
  485. package/dist/components/p-BgO3h-Rh.js +4 -0
  486. package/dist/components/p-Bjvj9BNg.js +4 -0
  487. package/dist/components/p-Bl_Mk897.js +4 -0
  488. package/dist/components/p-BmO5OHQt.js +4 -0
  489. package/dist/components/p-BmwSurIJ.js +4 -0
  490. package/dist/components/p-BpB6kJJx.js +4 -0
  491. package/dist/components/p-Bs6t0b4L.js +4 -0
  492. package/dist/components/p-BuQD3Teg.js +4 -0
  493. package/dist/components/p-BxOobhWU.js +4 -0
  494. package/dist/components/p-ByC9P8Tx.js +4 -0
  495. package/dist/components/p-ByLwbmoM.js +4 -0
  496. package/dist/components/p-C0XK-kqu.js +4 -0
  497. package/dist/components/p-C1p6UJUS.js +4 -0
  498. package/dist/components/p-C2-j2F3r.js +4 -0
  499. package/dist/components/p-C7SF5fdP.js +4 -0
  500. package/dist/components/p-C9aIBH9i.js +4 -0
  501. package/dist/components/p-C9u92OPr.js +4 -0
  502. package/dist/components/p-CAQo1RSU.js +4 -0
  503. package/dist/components/p-CBNHkhtz.js +4 -0
  504. package/dist/components/p-CFHGMm_k.js +4 -0
  505. package/dist/components/p-CFmh0GHK.js +4 -0
  506. package/dist/components/p-CGHkRu3d.js +4 -0
  507. package/dist/components/p-CIot44VN.js +4 -0
  508. package/dist/components/p-CJG_oJHT.js +4 -0
  509. package/dist/components/p-CP3Gtcwe.js +4 -0
  510. package/dist/components/p-CR_zYDd_.js +4 -0
  511. package/dist/components/p-CRjJqs7K.js +4 -0
  512. package/dist/components/p-CRwANbOQ.js +4 -0
  513. package/dist/components/p-CTQTxE7y.js +4 -0
  514. package/dist/components/p-CTRwSsSD.js +1 -0
  515. package/dist/components/p-CV_AyX-M.js +4 -0
  516. package/dist/components/p-CWjvhahm.js +4 -0
  517. package/dist/components/p-CWnmBc7G.js +4 -0
  518. package/dist/components/p-CYc4TCeV.js +4 -0
  519. package/dist/components/p-C_LpiLUG.js +4 -0
  520. package/dist/components/p-CcUOxrYJ.js +4 -0
  521. package/dist/components/p-CdR8DYRy.js +4 -0
  522. package/dist/components/p-ClV22d_I.js +4 -0
  523. package/dist/components/p-CldsZVVl.js +4 -0
  524. package/dist/components/p-CmiZqDhJ.js +4 -0
  525. package/dist/components/p-CmsrPPy-.js +4 -0
  526. package/dist/components/p-CnY1T61l.js +4 -0
  527. package/dist/components/p-CnhYWngh.js +4 -0
  528. package/dist/components/p-CsTpUjWf.js +4 -0
  529. package/dist/components/p-Ctrut-7c.js +4 -0
  530. package/dist/components/p-CutoC_Ty.js +4 -0
  531. package/dist/components/p-Cwa4hoGi.js +4 -0
  532. package/dist/components/p-CxpexqrH.js +4 -0
  533. package/dist/components/p-CzGozn0r.js +4 -0
  534. package/dist/components/p-D1t7yljW.js +4 -0
  535. package/dist/components/p-D7VQEFrw.js +4 -0
  536. package/dist/components/p-D9LQt7Zv.js +4 -0
  537. package/dist/components/p-DFunHW2N.js +4 -0
  538. package/dist/components/p-DGbq7kuL.js +4 -0
  539. package/dist/components/p-DGo_U0IH.js +4 -0
  540. package/dist/components/p-DIpAfGba.js +4 -0
  541. package/dist/components/p-DIuaKJuf.js +4 -0
  542. package/dist/components/p-DRJ_rivg.js +4 -0
  543. package/dist/components/p-DRbO95Y7.js +4 -0
  544. package/dist/components/p-DScJEdfZ.js +4 -0
  545. package/dist/components/p-DTrXC4SP.js +4 -0
  546. package/dist/components/p-DUNrULO-.js +4 -0
  547. package/dist/components/p-DVLI26JR.js +4 -0
  548. package/dist/components/p-DWjjqpdX.js +4 -0
  549. package/dist/components/p-DXuKrKOd.js +4 -0
  550. package/dist/components/p-DY84WS8v.js +1 -0
  551. package/dist/components/p-DYRYJXoR.js +4 -0
  552. package/dist/components/p-DYY8PIzp.js +4 -0
  553. package/dist/components/p-DZ_j7Hga.js +4 -0
  554. package/dist/components/p-DZcGWbYP.js +4 -0
  555. package/dist/components/p-D_7rD22W.js +4 -0
  556. package/dist/components/p-Dd10uxIT.js +4 -0
  557. package/dist/components/p-DddXRNAz.js +4 -0
  558. package/dist/components/p-DfxozzaL.js +4 -0
  559. package/dist/components/p-DgX1yjbX.js +4 -0
  560. package/dist/components/p-DjV0X18L.js +4 -0
  561. package/dist/components/p-DkAAPqJu.js +4 -0
  562. package/dist/components/p-Dkzm8mv-.js +4 -0
  563. package/dist/components/p-Dlbq4zit.js +4 -0
  564. package/dist/components/p-DlflLXmz.js +4 -0
  565. package/dist/components/p-Dn5a17Zr.js +4 -0
  566. package/dist/components/p-DofVp12C.js +4 -0
  567. package/dist/components/p-DoibTX8S.js +4 -0
  568. package/dist/components/p-DpxcjrYR.js +4 -0
  569. package/dist/components/p-DqC368cw.js +4 -0
  570. package/dist/components/p-DrNKkmSg.js +4 -0
  571. package/dist/components/p-Ds-2xh8j.js +1 -0
  572. package/dist/components/p-DscCDdM1.js +4 -0
  573. package/dist/components/p-DuXNDKoO.js +4 -0
  574. package/dist/components/p-DuiXatu0.js +4 -0
  575. package/dist/components/p-DvgUk4DC.js +4 -0
  576. package/dist/components/p-DwG3Skun.js +4 -0
  577. package/dist/components/p-KQw2tIyE.js +1 -0
  578. package/dist/components/p-L-QhVukf.js +4 -0
  579. package/dist/components/p-LEJbw36A.js +4 -0
  580. package/dist/components/p-Mm-C_T3m.js +4 -0
  581. package/dist/components/p-MzgCLtfB.js +4 -0
  582. package/dist/components/p-QNbPBOk5.js +4 -0
  583. package/dist/components/p-UchDDu0F.js +4 -0
  584. package/dist/components/p-YtlGjZiL.js +4 -0
  585. package/dist/components/p-Znyube6h.js +4 -0
  586. package/dist/components/p-cQxl99-m.js +4 -0
  587. package/dist/components/p-dzR6JR_Y.js +4 -0
  588. package/dist/components/p-f7FdbOPh.js +4 -0
  589. package/dist/components/p-gz-7919_.js +4 -0
  590. package/dist/components/p-kMjhJdnT.js +4 -0
  591. package/dist/components/p-kW0X7mcl.js +4 -0
  592. package/dist/components/p-llaYDFkW.js +4 -0
  593. package/dist/components/p-qd8DUvyj.js +10 -0
  594. package/dist/components/p-sXf51aB5.js +4 -0
  595. package/dist/components/p-vPCar92P.js +4 -0
  596. package/dist/components/p-vwEFyiVe.js +103 -0
  597. package/dist/components/p-xxBwAPx6.js +4 -0
  598. package/dist/components/p-zZKM-qT7.js +4 -0
  599. package/dist/docs.d.ts +480 -0
  600. package/dist/docs.json +8896 -0
  601. package/dist/esm/Heading-foerLIu9-BVbFegTw.js +37 -0
  602. package/dist/esm/access-and-short-key-BTEwnScd-CfAYtZGM.js +13 -0
  603. package/dist/esm/api-Ba9FNPRn-rdj2hyjm.js +425 -0
  604. package/dist/esm/app-globals-BnjNNhX0.js +26 -0
  605. package/dist/esm/aria-current-service-4eUMzpeO-CHrorN4F.js +27 -0
  606. package/dist/esm/aria-labelledby-C4wUnR-v-BgQ7JKmg.js +29 -0
  607. package/dist/esm/base-AKIr0rpk-CIl8tLMt.js +140 -0
  608. package/dist/esm/base-C7nTPc7u-DNu3y22x.js +1088 -0
  609. package/dist/esm/base-CpUNedp9-Bbxdff8P.js +163 -0
  610. package/dist/esm/base-D7qItqyf-coE87RLS.js +212 -0
  611. package/dist/esm/base-web-component-B3wi5eWH-BZD2AOtl.js +65 -0
  612. package/dist/esm/base-web-component-BpL_hXcg-B9B0wAg_.js +194 -0
  613. package/dist/esm/base-web-component-DorOeD_U-BEnunxBi.js +231 -0
  614. package/dist/esm/behavior-D9BHiFnH-Ci8duFrL.js +222 -0
  615. package/dist/esm/behavior-DDo87iUM-BWYM0j39.js +1903 -0
  616. package/dist/esm/behavior-XAV9GSxI-BRejClDx.js +164 -0
  617. package/dist/esm/bem-registry-CrZZQahR-C4GlllGk.js +616 -0
  618. package/dist/esm/bootstrap-Cz7Iq2I2-28vHQDC1.js +51 -0
  619. package/dist/esm/color-CnVBqZd5-D3QulmT5.js +58 -0
  620. package/dist/esm/component-0npqUhj2-BlizGX2j.js +123 -0
  621. package/dist/esm/component-BCKsZOoB-Cv8r2Vr8.js +21 -0
  622. package/dist/esm/component-BZjDp_Lf-olnyMgml.js +18 -0
  623. package/dist/esm/component-CjdTbGlP-BvyA2axC.js +173 -0
  624. package/dist/esm/component-Cn693XeT-CbzDb1Ts.js +48 -0
  625. package/dist/esm/component-Cvd5HXbX-CgWiDYTV.js +64 -0
  626. package/dist/esm/component-CvdxCpjC-Cc4AQcN4.js +44 -0
  627. package/dist/esm/component-DFhRTaqb-BuoAY7Hj.js +123 -0
  628. package/dist/esm/component-DP_p5few-C6hyGiFP.js +92 -0
  629. package/dist/esm/component-DlROeCCe-BFGwDGp8.js +85 -0
  630. package/dist/esm/component-names-DzmdvSkQ-BKy7HO6i.js +116 -0
  631. package/dist/esm/contrast-BHjNzQvB-Du_hfUqT.js +65 -0
  632. package/dist/esm/controller-DYkXzFqc-CsswmJRF.js +113 -0
  633. package/dist/esm/dev.utils-BgFDROtc-DvTVGlRQ.js +79 -0
  634. package/dist/esm/devtools-B6h2bVMJ-Dxl5yOJw.js +98 -0
  635. package/dist/esm/disabled-BZIZZ6wy-DS3OHEVQ.js +10 -0
  636. package/dist/esm/element-focus-C0L8NWU8-By17plAH.js +152 -0
  637. package/dist/esm/element-interaction-B3GEli6r-CDhfO5hL.js +93 -0
  638. package/dist/esm/events-DdfMb1U7-GmWu51Sq.js +52 -0
  639. package/dist/esm/field-control-QF0yTcyb-Bl8p9nHd.js +28 -0
  640. package/dist/esm/fink-app-shell.entry.js +131 -0
  641. package/dist/esm/fink-avatar-group.entry.js +60 -0
  642. package/dist/esm/fink-back-to-top.entry.js +50 -0
  643. package/dist/esm/fink-bar-chart.entry.js +48 -0
  644. package/dist/esm/fink-bottom-nav.entry.js +48 -0
  645. package/dist/esm/fink-calendar.entry.js +148 -0
  646. package/dist/esm/fink-carousel.entry.js +101 -0
  647. package/dist/esm/fink-chip.entry.js +74 -0
  648. package/dist/esm/fink-code-block.entry.js +169 -0
  649. package/dist/esm/fink-consent-banner.entry.js +86 -0
  650. package/dist/esm/fink-divider.entry.js +31 -0
  651. package/dist/esm/fink-empty-state.entry.js +24 -0
  652. package/dist/esm/fink-fab.entry.js +57 -0
  653. package/dist/esm/fink-feedback.entry.js +39 -0
  654. package/dist/esm/fink-file-upload.entry.js +112 -0
  655. package/dist/esm/fink-footer.entry.js +35 -0
  656. package/dist/esm/fink-grid.entry.js +21 -0
  657. package/dist/esm/fink-image-list.entry.js +63 -0
  658. package/dist/esm/fink-infinite-scroll.entry.js +71 -0
  659. package/dist/esm/fink-kbd.entry.js +25 -0
  660. package/dist/esm/fink-list.entry.js +75 -0
  661. package/dist/esm/fink-logo.entry.js +27 -0
  662. package/dist/esm/fink-menu.entry.js +139 -0
  663. package/dist/esm/fink-otp-input.entry.js +109 -0
  664. package/dist/esm/fink-page-header_4.entry.js +171 -0
  665. package/dist/esm/fink-panel.entry.js +24 -0
  666. package/dist/esm/fink-popconfirm.entry.js +59 -0
  667. package/dist/esm/fink-range-slider.entry.js +78 -0
  668. package/dist/esm/fink-rating.entry.js +62 -0
  669. package/dist/esm/fink-result.entry.js +47 -0
  670. package/dist/esm/fink-segmented.entry.js +49 -0
  671. package/dist/esm/fink-selection-bar.entry.js +34 -0
  672. package/dist/esm/fink-skeleton.entry.js +31 -0
  673. package/dist/esm/fink-sparkline.entry.js +75 -0
  674. package/dist/esm/fink-splitter.entry.js +82 -0
  675. package/dist/esm/fink-stack.entry.js +33 -0
  676. package/dist/esm/fink-stat-card.entry.js +56 -0
  677. package/dist/esm/fink-summary-list.entry.js +27 -0
  678. package/dist/esm/fink-tag-input.entry.js +111 -0
  679. package/dist/esm/fink-timeline.entry.js +33 -0
  680. package/dist/esm/fink-toc.entry.js +81 -0
  681. package/dist/esm/fink-tour.entry.js +124 -0
  682. package/dist/esm/fink-transfer-list.entry.js +99 -0
  683. package/dist/esm/fink-virtual-list.entry.js +97 -0
  684. package/dist/esm/fink.js +21 -0
  685. package/dist/esm/group-8Me6YSO8-xgnqIxjp.js +155 -0
  686. package/dist/esm/has-closer-B-uYNNCw-DLeh5-ue.js +10 -0
  687. package/dist/esm/href-DKPJq0Rh-DM0Q6H5W.js +10 -0
  688. package/dist/esm/i18n-TlIXBsgS-Ckx7Yn0p.js +224 -0
  689. package/dist/esm/i18n-Uze_l4Ts--j4pwklR.js +17 -0
  690. package/dist/esm/id-CkUYl2hO-DuOZaeSd.js +10 -0
  691. package/dist/esm/index-BCmY273s.js +43 -0
  692. package/dist/esm/index-CA3z5eXZ.js +1977 -0
  693. package/dist/esm/index-CUP9kM-6.js +233 -0
  694. package/dist/esm/index-CwRQlPpM.js +4994 -0
  695. package/dist/esm/index-KQw2tIyE.js +2536 -0
  696. package/dist/esm/index.js +2 -0
  697. package/dist/esm/info-tuXhkPMr-D_FS6tGD.js +5557 -0
  698. package/dist/esm/input-DwlolkOG-B7TsHjhS.js +17 -0
  699. package/dist/esm/input-container-DC3x4oGg-CsTswiL3.js +98 -0
  700. package/dist/esm/item-DThxrTZc-C5HcXoFS.js +523 -0
  701. package/dist/esm/item-cArH2C6l-Dq9QqqKe.js +91 -0
  702. package/dist/esm/item-pool-D4qvvY-S-vyDW-Elr.js +44 -0
  703. package/dist/esm/item-uC3h4pj3-OLJaTUoW.js +176 -0
  704. package/dist/esm/item-zPmzbSvE-CI7oup4J.js +86 -0
  705. package/dist/esm/keyboard-DzlBdECG-BZsM4cfK.js +46 -0
  706. package/dist/esm/kol-abbr.entry-mVk7ZlyC.js +47 -0
  707. package/dist/esm/kol-accordion.entry-DiJRyJ35.js +128 -0
  708. package/dist/esm/kol-alert.entry-DEVR2sW5.js +188 -0
  709. package/dist/esm/kol-avatar.entry-B-KpDJxv.js +98 -0
  710. package/dist/esm/kol-badge.entry-XHoji_MM.js +174 -0
  711. package/dist/esm/kol-breadcrumb.entry-BR_dd_-G.js +218 -0
  712. package/dist/esm/kol-button-link.entry-Cf4v9Bxb.js +229 -0
  713. package/dist/esm/kol-button.entry-BtahHzTC.js +239 -0
  714. package/dist/esm/kol-card.entry-385EbCW3.js +157 -0
  715. package/dist/esm/kol-combobox.entry-BTHmL7_r.js +547 -0
  716. package/dist/esm/kol-details.entry-hL20Taht.js +128 -0
  717. package/dist/esm/kol-dialog.entry-Bxg34kkN.js +130 -0
  718. package/dist/esm/kol-drawer.entry-CxSnfPVC.js +274 -0
  719. package/dist/esm/kol-form.entry-DejrJpT0.js +187 -0
  720. package/dist/esm/kol-heading.entry-DIdqX7hP.js +81 -0
  721. package/dist/esm/kol-icon.entry-Bs6D521h.js +59 -0
  722. package/dist/esm/kol-image.entry-B7XU15PX.js +112 -0
  723. package/dist/esm/kol-input-checkbox.entry-voVh9wes.js +411 -0
  724. package/dist/esm/kol-input-color.entry-BA8yNU-5.js +317 -0
  725. package/dist/esm/kol-input-date.entry-CbBHYGfW.js +532 -0
  726. package/dist/esm/kol-input-email.entry-B3TVS_jQ.js +349 -0
  727. package/dist/esm/kol-input-file.entry-Bw50xMG6.js +382 -0
  728. package/dist/esm/kol-input-number.entry-DEnhDS8m.js +438 -0
  729. package/dist/esm/kol-input-password.entry-C8KPPLGg.js +373 -0
  730. package/dist/esm/kol-input-radio.entry-VcGn4G2d.js +394 -0
  731. package/dist/esm/kol-input-range.entry-XW11xl8_.js +374 -0
  732. package/dist/esm/kol-input-text.entry-I_XonNty.js +437 -0
  733. package/dist/esm/kol-kolibri.entry-BkRAh6MS.js +63 -0
  734. package/dist/esm/kol-link-button.entry-Bi6SP1YP.js +221 -0
  735. package/dist/esm/kol-link.entry-BZgj_5kk.js +208 -0
  736. package/dist/esm/kol-meter.entry-DFA2MeTA.js +207 -0
  737. package/dist/esm/kol-modal.entry-DzEUIfdu.js +121 -0
  738. package/dist/esm/kol-nav.entry-BNYXkxiA.js +268 -0
  739. package/dist/esm/kol-pagination.entry-D1MJ1VbC.js +178 -0
  740. package/dist/esm/kol-popover-button.entry-BNWakgAm.js +249 -0
  741. package/dist/esm/kol-progress.entry-XBmRzcu8.js +144 -0
  742. package/dist/esm/kol-quote.entry-D_9Zd9-q.js +82 -0
  743. package/dist/esm/kol-select.entry-g6Yc_R0D.js +279 -0
  744. package/dist/esm/kol-single-select.entry-CaF22dl9.js +567 -0
  745. package/dist/esm/kol-skip-nav.entry-wsk5_hGJ.js +196 -0
  746. package/dist/esm/kol-spin.entry-D6P1QxzY.js +61 -0
  747. package/dist/esm/kol-split-button.entry-CRnZLU_m.js +275 -0
  748. package/dist/esm/kol-table-stateful.entry-YM1jEIqy.js +683 -0
  749. package/dist/esm/kol-table-stateless.entry-DkBXAO9-.js +187 -0
  750. package/dist/esm/kol-tabs.entry-CzQ9mDZZ.js +464 -0
  751. package/dist/esm/kol-textarea.entry-CYYwMkYK.js +473 -0
  752. package/dist/esm/kol-toast-container.entry-DsYUE5mI.js +115 -0
  753. package/dist/esm/kol-toolbar.entry-CRFOe4dW.js +297 -0
  754. package/dist/esm/kol-tree-item.entry-DQ8DqsBe.js +191 -0
  755. package/dist/esm/kol-tree.entry-Bahtftrl.js +277 -0
  756. package/dist/esm/kol-version.entry-DeW48JZE.js +64 -0
  757. package/dist/esm/label-G82W4YoW-DEpNTzZO.js +14 -0
  758. package/dist/esm/label-hints-DiRb_zIZ-CJOam2km.js +21 -0
  759. package/dist/esm/label-lang-segment-BSVexfSR-JER-6d7V.js +13 -0
  760. package/dist/esm/label-with-expert-slot-C1i0atAL-BSAWLh3g.js +14 -0
  761. package/dist/esm/level-CWkPM-CS-BOlL7OEL.js +11 -0
  762. package/dist/esm/link-target-B2OC2sZU-BWrqXOoq.js +10 -0
  763. package/dist/esm/links-CiNHSAYH-CQXX-pAH.js +14 -0
  764. package/dist/esm/loader.js +11 -0
  765. package/dist/esm/multiple-CuU2AuEM-BqD17udD.js +10 -0
  766. package/dist/esm/number-value-adUq1zr1-oKN9eTfJ.js +46 -0
  767. package/dist/esm/open-DR8Z7RtS-C3KbEQp0.js +10 -0
  768. package/dist/esm/open-items-cache-CS2mDRNB-Xn5hW3B2.js +21 -0
  769. package/dist/esm/options-BDTJtk6H-D5ALZvIK.js +28 -0
  770. package/dist/esm/options-BPwcDIDO-m3RdW12k.js +24 -0
  771. package/dist/esm/orientation-BUPO9LJU-BiIRydWE.js +18 -0
  772. package/dist/esm/placeholder-BTFnryTd-BtHUd-ck.js +10 -0
  773. package/dist/esm/props-from-config-DqFgiUwD-BlPibITX.js +2468 -0
  774. package/dist/esm/read-only-DRmmHb2G-BTfvM1cR.js +10 -0
  775. package/dist/esm/required-D4CdAA4s-DyfM1WRr.js +10 -0
  776. package/dist/esm/resolve-color-BNxwDdo8.js +74 -0
  777. package/dist/esm/resolve-props-BAambGug-BHQnawTz.js +59 -0
  778. package/dist/esm/resolve-props-Dpl38Wpe-BuuvHExk.js +56 -0
  779. package/dist/esm/rows-DRKSoawJ-2fa63Cts.js +10 -0
  780. package/dist/esm/scroll-lock-C66lpb8L-CMx_ouSD.js +68 -0
  781. package/dist/esm/shared-0q_cDiSu.js +23 -0
  782. package/dist/esm/smart-button-BYEk3DzS-CvOWdBHD.js +17 -0
  783. package/dist/esm/spell-check-DlQ_d2GL-BAXGFxfw.js +10 -0
  784. package/dist/esm/src-Cikg9qhP-B2f1J8RL.js +10 -0
  785. package/dist/esm/step-C7WPZrUp-BalvGjbu.js +10 -0
  786. package/dist/esm/suggestions-CotfxJG1-DR28Ni66.js +23 -0
  787. package/dist/esm/suggestions-qW9OdwO3-90-3oW4g.js +20 -0
  788. package/dist/esm/test-component.entry-Cw5NrX4A.js +14 -0
  789. package/dist/esm/theme-store-DroJsU6S-CNdF9au3.js +4398 -0
  790. package/dist/esm/toggle-handler-BB_SIgS1-CRNI-BeB.js +97 -0
  791. package/dist/esm/tone-B-BbokvN.js +4 -0
  792. package/dist/esm/tooltip-open-tracking-CxHWKk8f-z31IQ8je.js +21 -0
  793. package/dist/esm/tslib.es6-QNbPBOk5-QNbPBOk5.js +45 -0
  794. package/dist/esm/unique-nav-labels-CQgKoOXd-CVFPYOx_.js +23 -0
  795. package/dist/esm/unit-D2lG-lEM-D7zYiPWU.js +12 -0
  796. package/dist/esm/validators-yh10eyXe-w-ZzOFvZ.js +14 -0
  797. package/dist/esm/value-string-DwEIOG1f-B_-iiGJO.js +10 -0
  798. package/dist/esm/viewport-inset-DY84WS8v.js +24 -0
  799. package/dist/esm/width-xawzWTVW-D6a2C3pn.js +29 -0
  800. package/dist/fink/assets/icon-fonts/codicons/codicon.css +805 -0
  801. package/dist/fink/assets/icon-fonts/codicons/codicon.csv +631 -0
  802. package/dist/fink/assets/icon-fonts/codicons/codicon.html +18216 -0
  803. package/dist/fink/assets/icon-fonts/codicons/codicon.svg +1 -0
  804. package/dist/fink/assets/icon-fonts/codicons/codicon.ttf +0 -0
  805. package/dist/fink/assets/icon-fonts/codicons/codiconsLibrary.ts +758 -0
  806. package/dist/fink/assets/icon-fonts/codicons/metadata.json +7235 -0
  807. package/dist/fink/assets/icon-fonts/fontawesome-free/css/all.css +7913 -0
  808. package/dist/fink/assets/icon-fonts/fontawesome-free/css/all.min.css +9 -0
  809. package/dist/fink/assets/icon-fonts/fontawesome-free/css/brands.css +1609 -0
  810. package/dist/fink/assets/icon-fonts/fontawesome-free/css/brands.min.css +6 -0
  811. package/dist/fink/assets/icon-fonts/fontawesome-free/css/fontawesome.css +6243 -0
  812. package/dist/fink/assets/icon-fonts/fontawesome-free/css/fontawesome.min.css +9 -0
  813. package/dist/fink/assets/icon-fonts/fontawesome-free/css/regular.css +19 -0
  814. package/dist/fink/assets/icon-fonts/fontawesome-free/css/regular.min.css +6 -0
  815. package/dist/fink/assets/icon-fonts/fontawesome-free/css/solid.css +19 -0
  816. package/dist/fink/assets/icon-fonts/fontawesome-free/css/solid.min.css +6 -0
  817. package/dist/fink/assets/icon-fonts/fontawesome-free/css/svg-with-js.css +461 -0
  818. package/dist/fink/assets/icon-fonts/fontawesome-free/css/svg-with-js.min.css +6 -0
  819. package/dist/fink/assets/icon-fonts/fontawesome-free/css/v4-font-face.css +26 -0
  820. package/dist/fink/assets/icon-fonts/fontawesome-free/css/v4-font-face.min.css +6 -0
  821. package/dist/fink/assets/icon-fonts/fontawesome-free/css/v4-shims.css +2194 -0
  822. package/dist/fink/assets/icon-fonts/fontawesome-free/css/v4-shims.min.css +6 -0
  823. package/dist/fink/assets/icon-fonts/fontawesome-free/css/v5-font-face.css +22 -0
  824. package/dist/fink/assets/icon-fonts/fontawesome-free/css/v5-font-face.min.css +6 -0
  825. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-brands-400.ttf +0 -0
  826. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-brands-400.woff2 +0 -0
  827. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-regular-400.ttf +0 -0
  828. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-regular-400.woff2 +0 -0
  829. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-solid-900.ttf +0 -0
  830. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-solid-900.woff2 +0 -0
  831. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-v4compatibility.ttf +0 -0
  832. package/dist/fink/assets/icon-fonts/fontawesome-free/webfonts/fa-v4compatibility.woff2 +0 -0
  833. package/dist/fink/assets/icon-fonts/icon-fonts.css +4 -0
  834. package/dist/fink/assets/icon-fonts/kolicons/kolicons.eot +0 -0
  835. package/dist/fink/assets/icon-fonts/kolicons/kolicons.json +31 -0
  836. package/dist/fink/assets/icon-fonts/kolicons/kolicons.svg +99 -0
  837. package/dist/fink/assets/icon-fonts/kolicons/kolicons.ttf +0 -0
  838. package/dist/fink/assets/icon-fonts/kolicons/kolicons.woff +0 -0
  839. package/dist/fink/assets/icon-fonts/kolicons/kolicons.woff2 +0 -0
  840. package/dist/fink/assets/icon-fonts/kolicons/style.css +51 -0
  841. package/dist/fink/assets/icon-fonts/manifest.json +14 -0
  842. package/dist/fink/fink.css +13 -0
  843. package/dist/fink/fink.esm.js +1 -0
  844. package/dist/fink/fonts.css +6 -0
  845. package/dist/fink/index.esm.js +1 -0
  846. package/dist/fink/p-0480e0f4.entry.js +1 -0
  847. package/dist/fink/p-090bfc39.entry.js +1 -0
  848. package/dist/fink/p-0TbN8Xcp.js +4 -0
  849. package/dist/fink/p-0q_cDiSu.js +1 -0
  850. package/dist/fink/p-112a5699.entry.js +1 -0
  851. package/dist/fink/p-1KerVamE.js +4 -0
  852. package/dist/fink/p-26a83208.entry.js +1 -0
  853. package/dist/fink/p-271b0565.entry.js +1 -0
  854. package/dist/fink/p-31f2f199.entry.js +1 -0
  855. package/dist/fink/p-3364a6ba.entry.js +1 -0
  856. package/dist/fink/p-3870cd2f.entry.js +1 -0
  857. package/dist/fink/p-3TE1oVoK.js +4 -0
  858. package/dist/fink/p-46541968.entry.js +1 -0
  859. package/dist/fink/p-4ee67455.entry.js +1 -0
  860. package/dist/fink/p-5278d1ef.entry.js +1 -0
  861. package/dist/fink/p-531aeb01.entry.js +1 -0
  862. package/dist/fink/p-5b80b2bb.entry.js +1 -0
  863. package/dist/fink/p-61642130.entry.js +1 -0
  864. package/dist/fink/p-66abd1be.entry.js +1 -0
  865. package/dist/fink/p-6af256be.entry.js +1 -0
  866. package/dist/fink/p-6bd4ada5.entry.js +1 -0
  867. package/dist/fink/p-6cc33769.entry.js +1 -0
  868. package/dist/fink/p-70dFTErH.js +4 -0
  869. package/dist/fink/p-70e656ee.entry.js +1 -0
  870. package/dist/fink/p-73077f4d.entry.js +1 -0
  871. package/dist/fink/p-7a18b0e6.entry.js +1 -0
  872. package/dist/fink/p-7fEhncCi.js +4 -0
  873. package/dist/fink/p-7fe42ecb.entry.js +1 -0
  874. package/dist/fink/p-840e3c72.entry.js +1 -0
  875. package/dist/fink/p-87eb491f.entry.js +1 -0
  876. package/dist/fink/p-89305df2.entry.js +1 -0
  877. package/dist/fink/p-8JwsEQGN.js +4 -0
  878. package/dist/fink/p-8bd53685.entry.js +1 -0
  879. package/dist/fink/p-8ca103e0.entry.js +1 -0
  880. package/dist/fink/p-8mwEeVg6.js +4 -0
  881. package/dist/fink/p-92d27ed0.entry.js +1 -0
  882. package/dist/fink/p-93317eae.entry.js +1 -0
  883. package/dist/fink/p-95680148.entry.js +1 -0
  884. package/dist/fink/p-9PdC_fU3.js +4 -0
  885. package/dist/fink/p-B-BbokvN.js +1 -0
  886. package/dist/fink/p-B1WcEq4M.js +4 -0
  887. package/dist/fink/p-B1dsErUJ.js +4 -0
  888. package/dist/fink/p-B3PXhKe7.js +4 -0
  889. package/dist/fink/p-B6BCq5L_.js +4 -0
  890. package/dist/fink/p-B8h8QAF1.js +4 -0
  891. package/dist/fink/p-B99lWqPG.js +4 -0
  892. package/dist/fink/p-BELHU4Oh.js +4 -0
  893. package/dist/fink/p-BFH2qMqH.js +4 -0
  894. package/dist/fink/p-BFfPdbpO.js +4 -0
  895. package/dist/fink/p-BH1jSxUA.js +4 -0
  896. package/dist/fink/p-BHiLglB0.js +4 -0
  897. package/dist/fink/p-BI7oMr1i.js +4 -0
  898. package/dist/fink/p-BL9X5zek.js +4 -0
  899. package/dist/fink/p-BMCfojyI.js +4 -0
  900. package/dist/fink/p-BMThm7qP.js +4 -0
  901. package/dist/fink/p-BNhE7eEv.js +4 -0
  902. package/dist/fink/p-BNxwDdo8.js +1 -0
  903. package/dist/fink/p-BOb10H2H.js +4 -0
  904. package/dist/fink/p-BStBDK4A.js +4 -0
  905. package/dist/fink/p-BTXnk9VW.js +4 -0
  906. package/dist/fink/p-BZ1KhHjM.js +4 -0
  907. package/dist/fink/p-BZZL8GzL.js +4 -0
  908. package/dist/fink/p-B_MOrp32.js +4 -0
  909. package/dist/fink/p-BcjT_Ul9.js +4 -0
  910. package/dist/fink/p-Be6hdVUe.js +4 -0
  911. package/dist/fink/p-BeLAXkQ_.js +4 -0
  912. package/dist/fink/p-BhbkDlT6.js +4 -0
  913. package/dist/fink/p-BlHQE7rX.js +4 -0
  914. package/dist/fink/p-BnmxgsW3.js +4 -0
  915. package/dist/fink/p-BoBd56YG.js +4 -0
  916. package/dist/fink/p-BoFdMsuR.js +4 -0
  917. package/dist/fink/p-Bqv88WWu.js +4 -0
  918. package/dist/fink/p-BsI1j3fz.js +4 -0
  919. package/dist/fink/p-Bsfk4YTG.js +4 -0
  920. package/dist/fink/p-BspwltC5.js +4 -0
  921. package/dist/fink/p-BttTvdEQ.js +4 -0
  922. package/dist/fink/p-Bx-xqibH.js +4 -0
  923. package/dist/fink/p-BzL1oNYN.js +4 -0
  924. package/dist/fink/p-C-DwLmsA.js +4 -0
  925. package/dist/fink/p-C-azHf2V.js +4 -0
  926. package/dist/fink/p-C1wCww7h.js +4 -0
  927. package/dist/fink/p-C5PYMWXY.js +4 -0
  928. package/dist/fink/p-C5U6Ou_m.js +4 -0
  929. package/dist/fink/p-C6fVBlc3.js +4 -0
  930. package/dist/fink/p-C7MZ5AgA.js +4 -0
  931. package/dist/fink/p-C87U2c-7.js +4 -0
  932. package/dist/fink/p-C8kDLCRm.js +4 -0
  933. package/dist/fink/p-CA3z5eXZ.js +3 -0
  934. package/dist/fink/p-CGkH1ERn.js +4 -0
  935. package/dist/fink/p-CHcHrZ7t.js +4 -0
  936. package/dist/fink/p-CHh4VeAg.js +4 -0
  937. package/dist/fink/p-CI2CZWqQ.js +1 -0
  938. package/dist/fink/p-CIs6Z2-d.js +4 -0
  939. package/dist/fink/p-CJE8uX0Q.js +4 -0
  940. package/dist/fink/p-CMSO-w9a.js +4 -0
  941. package/dist/fink/p-CNMWZCgS.js +4 -0
  942. package/dist/fink/p-CPtPzcMd.js +103 -0
  943. package/dist/fink/p-CS2xG1nM.js +4 -0
  944. package/dist/fink/p-CSBkViMy.js +4 -0
  945. package/dist/fink/p-CSF7BClw.js +4 -0
  946. package/dist/fink/p-CU-RbAYO.js +4 -0
  947. package/dist/fink/p-CUv13haf.js +4 -0
  948. package/dist/fink/p-CbAhGd5i.js +4 -0
  949. package/dist/fink/p-CdwUYA3i.js +4 -0
  950. package/dist/fink/p-Ce_W3WN1.js +4 -0
  951. package/dist/fink/p-CehyH2nT.js +4 -0
  952. package/dist/fink/p-CfJQyoH8.js +4 -0
  953. package/dist/fink/p-CgF6yh1S.js +4 -0
  954. package/dist/fink/p-CgNGhcQs.js +4 -0
  955. package/dist/fink/p-Ck0btp3V.js +4 -0
  956. package/dist/fink/p-Co0vbYlR.js +4 -0
  957. package/dist/fink/p-CpihVFNc.js +4 -0
  958. package/dist/fink/p-CpznDFHA.js +4 -0
  959. package/dist/fink/p-CvbbJk36.js +4 -0
  960. package/dist/fink/p-CvwFII-2.js +4 -0
  961. package/dist/fink/p-CxQ_SYym.js +4 -0
  962. package/dist/fink/p-CxZaPFrj.js +4 -0
  963. package/dist/fink/p-CyNGdp_T.js +4 -0
  964. package/dist/fink/p-Cz415OSO.js +4 -0
  965. package/dist/fink/p-CzkGplcI.js +4 -0
  966. package/dist/fink/p-D3mf_zo7.js +4 -0
  967. package/dist/fink/p-D59FB9e8.js +4 -0
  968. package/dist/fink/p-DAZjslwm.js +4 -0
  969. package/dist/fink/p-DDYZfpJd.js +4 -0
  970. package/dist/fink/p-DEfik0Sc.js +4 -0
  971. package/dist/fink/p-DFSgV3oS.js +4 -0
  972. package/dist/fink/p-DGF6_bBS.js +4 -0
  973. package/dist/fink/p-DHDOsEqL.js +4 -0
  974. package/dist/fink/p-DJNlv0ul.js +4 -0
  975. package/dist/fink/p-DMXYSXQf.js +4 -0
  976. package/dist/fink/p-DOMW2BrQ.js +4 -0
  977. package/dist/fink/p-DR_ckP39.js +4 -0
  978. package/dist/fink/p-DViZw2gZ.js +4 -0
  979. package/dist/fink/p-DXfM3tgR.js +4 -0
  980. package/dist/fink/p-DY84WS8v.js +1 -0
  981. package/dist/fink/p-DZyAKosi.js +4 -0
  982. package/dist/fink/p-D_FS6tGD.js +1 -0
  983. package/dist/fink/p-D_gkogCg.js +4 -0
  984. package/dist/fink/p-Dceq1fzm.js +4 -0
  985. package/dist/fink/p-DdUwZDmy.js +4 -0
  986. package/dist/fink/p-Dejnw6f4.js +4 -0
  987. package/dist/fink/p-DfDJiEXh.js +4 -0
  988. package/dist/fink/p-DhOZwwQR.js +4 -0
  989. package/dist/fink/p-DipzsIhC.js +4 -0
  990. package/dist/fink/p-Dj0TiVc5.js +4 -0
  991. package/dist/fink/p-DjPa1etv.js +4 -0
  992. package/dist/fink/p-DjkJYi9k.js +4 -0
  993. package/dist/fink/p-DoV5EBlI.js +4 -0
  994. package/dist/fink/p-DpjLDYYz.js +4 -0
  995. package/dist/fink/p-DqHxO9Ai.js +4 -0
  996. package/dist/fink/p-DtLQQ-Zy.js +4 -0
  997. package/dist/fink/p-Dv-cCVAs.js +4 -0
  998. package/dist/fink/p-DvOdBkVD.js +4 -0
  999. package/dist/fink/p-DvVgajSv.js +4 -0
  1000. package/dist/fink/p-DvwUhb7u.js +4 -0
  1001. package/dist/fink/p-HweNbAoE.js +4 -0
  1002. package/dist/fink/p-K1VBgVLf.js +4 -0
  1003. package/dist/fink/p-KQw2tIyE.js +1 -0
  1004. package/dist/fink/p-N-AMA4lJ.js +4 -0
  1005. package/dist/fink/p-Q2WAPvCN.js +4 -0
  1006. package/dist/fink/p-QIOzy6bA.js +4 -0
  1007. package/dist/fink/p-QNbPBOk5.js +4 -0
  1008. package/dist/fink/p-SKB8cyRh.js +4 -0
  1009. package/dist/fink/p-TFNqVyc8.js +4 -0
  1010. package/dist/fink/p-TOjFVPBq.js +4 -0
  1011. package/dist/fink/p-VQnHXg90.js +10 -0
  1012. package/dist/fink/p-WNhmp88g.js +4 -0
  1013. package/dist/fink/p-Z5P1Ai79.js +4 -0
  1014. package/dist/fink/p-ZQRFMWFz.js +4 -0
  1015. package/dist/fink/p-a3104de5.entry.js +1 -0
  1016. package/dist/fink/p-a97e7116.entry.js +1 -0
  1017. package/dist/fink/p-c4e678e3.entry.js +1 -0
  1018. package/dist/fink/p-c5242603.entry.js +1 -0
  1019. package/dist/fink/p-c533dfa2.entry.js +1 -0
  1020. package/dist/fink/p-d5c95ced.entry.js +1 -0
  1021. package/dist/fink/p-d762d39e.entry.js +1 -0
  1022. package/dist/fink/p-d902ca46.entry.js +1 -0
  1023. package/dist/fink/p-daf169f0.entry.js +1 -0
  1024. package/dist/fink/p-e554b7c8.entry.js +1 -0
  1025. package/dist/fink/p-ea884d3f.entry.js +1 -0
  1026. package/dist/fink/p-ed015850.entry.js +1 -0
  1027. package/dist/fink/p-f11bb9d9.entry.js +1 -0
  1028. package/dist/fink/p-f4eaa2e1.entry.js +1 -0
  1029. package/dist/fink/p-gewKj316.js +4 -0
  1030. package/dist/fink/p-h-zEpgSf.js +4 -0
  1031. package/dist/fink/p-h0MkHAI2.js +4 -0
  1032. package/dist/fink/p-iRfN55aI.js +4 -0
  1033. package/dist/fink/p-mYbM3W7m.js +4 -0
  1034. package/dist/fink/p-nQx5E18t.js +4 -0
  1035. package/dist/fink/p-odJRQxye.js +4 -0
  1036. package/dist/fink/p-rg-RqOuE.js +4 -0
  1037. package/dist/fink/p-u0y0hYdm.js +4 -0
  1038. package/dist/fink/p-v7r1B6-8.js +4 -0
  1039. package/dist/fink/p-vwzbS2N4.js +4 -0
  1040. package/dist/fink/p-xiyZ-c0B.js +4 -0
  1041. package/dist/fink/p-xnteiQZA.js +4 -0
  1042. package/dist/fink/tokens.css +1307 -0
  1043. package/dist/index.cjs.js +1 -0
  1044. package/dist/index.js +1 -0
  1045. package/dist/loader/cdn.js +1 -0
  1046. package/dist/loader/index.cjs.js +1 -0
  1047. package/dist/loader/index.d.ts +24 -0
  1048. package/dist/loader/index.es2017.js +1 -0
  1049. package/dist/loader/index.js +2 -0
  1050. package/dist/types/components/app-shell/app-shell.d.ts +63 -0
  1051. package/dist/types/components/avatar-group/avatar-group.d.ts +33 -0
  1052. package/dist/types/components/back-to-top/back-to-top.d.ts +22 -0
  1053. package/dist/types/components/bar-chart/bar-chart.d.ts +34 -0
  1054. package/dist/types/components/bottom-nav/bottom-nav.d.ts +28 -0
  1055. package/dist/types/components/calendar/calendar.d.ts +43 -0
  1056. package/dist/types/components/carousel/carousel.d.ts +39 -0
  1057. package/dist/types/components/chip/chip.d.ts +38 -0
  1058. package/dist/types/components/code-block/code-block.d.ts +41 -0
  1059. package/dist/types/components/consent-banner/consent-banner.d.ts +40 -0
  1060. package/dist/types/components/divider/divider.d.ts +18 -0
  1061. package/dist/types/components/empty-state/empty-state.d.ts +16 -0
  1062. package/dist/types/components/fab/fab.d.ts +37 -0
  1063. package/dist/types/components/feedback/feedback.d.ts +25 -0
  1064. package/dist/types/components/file-upload/file-upload.d.ts +49 -0
  1065. package/dist/types/components/footer/footer.d.ts +28 -0
  1066. package/dist/types/components/grid/grid.d.ts +13 -0
  1067. package/dist/types/components/image-list/image-list.d.ts +40 -0
  1068. package/dist/types/components/infinite-scroll/infinite-scroll.d.ts +33 -0
  1069. package/dist/types/components/kbd/kbd.d.ts +9 -0
  1070. package/dist/types/components/list/list.d.ts +57 -0
  1071. package/dist/types/components/logo/logo.d.ts +21 -0
  1072. package/dist/types/components/menu/menu.d.ts +63 -0
  1073. package/dist/types/components/otp-input/otp-input.d.ts +41 -0
  1074. package/dist/types/components/page-header/page-header.d.ts +16 -0
  1075. package/dist/types/components/panel/panel.d.ts +19 -0
  1076. package/dist/types/components/popconfirm/popconfirm.d.ts +38 -0
  1077. package/dist/types/components/range-slider/range-slider.d.ts +39 -0
  1078. package/dist/types/components/rating/rating.d.ts +28 -0
  1079. package/dist/types/components/result/result.d.ts +28 -0
  1080. package/dist/types/components/segmented/segmented.d.ts +28 -0
  1081. package/dist/types/components/selection-bar/selection-bar.d.ts +20 -0
  1082. package/dist/types/components/skeleton/skeleton.d.ts +17 -0
  1083. package/dist/types/components/sparkline/sparkline.d.ts +27 -0
  1084. package/dist/types/components/splitter/splitter.d.ts +37 -0
  1085. package/dist/types/components/stack/stack.d.ts +19 -0
  1086. package/dist/types/components/stat-card/stat-card.d.ts +29 -0
  1087. package/dist/types/components/status/status.d.ts +23 -0
  1088. package/dist/types/components/stepper/stepper.d.ts +25 -0
  1089. package/dist/types/components/summary-list/summary-list.d.ts +24 -0
  1090. package/dist/types/components/tag-input/tag-input.d.ts +43 -0
  1091. package/dist/types/components/task-list/task-list.d.ts +28 -0
  1092. package/dist/types/components/timeline/timeline.d.ts +23 -0
  1093. package/dist/types/components/toc/toc.d.ts +36 -0
  1094. package/dist/types/components/tour/tour.d.ts +49 -0
  1095. package/dist/types/components/transfer-list/transfer-list.d.ts +45 -0
  1096. package/dist/types/components/virtual-list/virtual-list.d.ts +44 -0
  1097. package/dist/types/components.d.ts +4408 -0
  1098. package/dist/types/global/script.d.ts +2 -0
  1099. package/dist/types/i18n/index.d.ts +23 -0
  1100. package/dist/types/i18n/locales.d.ts +212 -0
  1101. package/dist/types/index.d.ts +28 -0
  1102. package/dist/types/kolibri.d.ts +15 -0
  1103. package/dist/types/stencil-public-runtime.d.ts +1879 -0
  1104. package/dist/types/utils/highlight.d.ts +6 -0
  1105. package/dist/types/utils/resolve-color.d.ts +16 -0
  1106. package/dist/types/utils/shared.d.ts +3 -0
  1107. package/dist/types/utils/tone.d.ts +4 -0
  1108. package/dist/types/utils/viewport-inset.d.ts +12 -0
  1109. package/package.json +50 -3
@@ -0,0 +1,2544 @@
1
+ 'use strict';
2
+
3
+ const isString = obj => typeof obj === 'string';
4
+ const defer = () => {
5
+ let res;
6
+ let rej;
7
+ const promise = new Promise((resolve, reject) => {
8
+ res = resolve;
9
+ rej = reject;
10
+ });
11
+ promise.resolve = res;
12
+ promise.reject = rej;
13
+ return promise;
14
+ };
15
+ const makeString = object => {
16
+ if (object == null) return '';
17
+ return String(object);
18
+ };
19
+ const copy = (a, s, t) => {
20
+ a.forEach(m => {
21
+ if (s[m]) t[m] = s[m];
22
+ });
23
+ };
24
+ const lastOfPathSeparatorRegExp = /###/g;
25
+ const cleanKey = key => key && key.includes('###') ? key.replace(lastOfPathSeparatorRegExp, '.') : key;
26
+ const canNotTraverseDeeper = object => !object || isString(object);
27
+ const getLastOfPath = (object, path, Empty) => {
28
+ const stack = !isString(path) ? path : path.split('.');
29
+ let stackIndex = 0;
30
+ while (stackIndex < stack.length - 1) {
31
+ if (canNotTraverseDeeper(object)) return {};
32
+ const key = cleanKey(stack[stackIndex]);
33
+ if (!object[key] && Empty) object[key] = new Empty();
34
+ if (Object.prototype.hasOwnProperty.call(object, key)) {
35
+ object = object[key];
36
+ } else {
37
+ object = {};
38
+ }
39
+ ++stackIndex;
40
+ }
41
+ if (canNotTraverseDeeper(object)) return {};
42
+ return {
43
+ obj: object,
44
+ k: cleanKey(stack[stackIndex])
45
+ };
46
+ };
47
+ const setPath = (object, path, newValue) => {
48
+ const {
49
+ obj,
50
+ k
51
+ } = getLastOfPath(object, path, Object);
52
+ if (obj !== undefined || path.length === 1) {
53
+ obj[k] = newValue;
54
+ return;
55
+ }
56
+ let e = path[path.length - 1];
57
+ let p = path.slice(0, path.length - 1);
58
+ let last = getLastOfPath(object, p, Object);
59
+ while (last.obj === undefined && p.length) {
60
+ e = `${p[p.length - 1]}.${e}`;
61
+ p = p.slice(0, p.length - 1);
62
+ last = getLastOfPath(object, p, Object);
63
+ if (last?.obj && typeof last.obj[`${last.k}.${e}`] !== 'undefined') {
64
+ last.obj = undefined;
65
+ }
66
+ }
67
+ last.obj[`${last.k}.${e}`] = newValue;
68
+ };
69
+ const pushPath = (object, path, newValue, concat) => {
70
+ const {
71
+ obj,
72
+ k
73
+ } = getLastOfPath(object, path, Object);
74
+ obj[k] = obj[k] || [];
75
+ obj[k].push(newValue);
76
+ };
77
+ const getPath = (object, path) => {
78
+ const {
79
+ obj,
80
+ k
81
+ } = getLastOfPath(object, path);
82
+ if (!obj) return undefined;
83
+ if (!Object.prototype.hasOwnProperty.call(obj, k)) return undefined;
84
+ return obj[k];
85
+ };
86
+ const getPathWithDefaults = (data, defaultData, key) => {
87
+ const value = getPath(data, key);
88
+ if (value !== undefined) {
89
+ return value;
90
+ }
91
+ return getPath(defaultData, key);
92
+ };
93
+ const deepExtend = (target, source, overwrite) => {
94
+ for (const prop in source) {
95
+ if (prop !== '__proto__' && prop !== 'constructor') {
96
+ if (Object.prototype.hasOwnProperty.call(target, prop)) {
97
+ if (isString(target[prop]) || target[prop] instanceof String || isString(source[prop]) || source[prop] instanceof String) {
98
+ if (overwrite) target[prop] = source[prop];
99
+ } else {
100
+ deepExtend(target[prop], source[prop], overwrite);
101
+ }
102
+ } else {
103
+ target[prop] = source[prop];
104
+ }
105
+ }
106
+ }
107
+ return target;
108
+ };
109
+ const regexEscape = str => str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&');
110
+ const _entityMap = {
111
+ '&': '&amp;',
112
+ '<': '&lt;',
113
+ '>': '&gt;',
114
+ '"': '&quot;',
115
+ "'": '&#39;',
116
+ '/': '&#x2F;'
117
+ };
118
+ const escape = data => {
119
+ if (isString(data)) {
120
+ return data.replace(/[&<>"'\/]/g, s => _entityMap[s]);
121
+ }
122
+ return data;
123
+ };
124
+ class RegExpCache {
125
+ constructor(capacity) {
126
+ this.capacity = capacity;
127
+ this.regExpMap = new Map();
128
+ this.regExpQueue = [];
129
+ }
130
+ getRegExp(pattern) {
131
+ const regExpFromCache = this.regExpMap.get(pattern);
132
+ if (regExpFromCache !== undefined) {
133
+ return regExpFromCache;
134
+ }
135
+ const regExpNew = new RegExp(pattern);
136
+ if (this.regExpQueue.length === this.capacity) {
137
+ this.regExpMap.delete(this.regExpQueue.shift());
138
+ }
139
+ this.regExpMap.set(pattern, regExpNew);
140
+ this.regExpQueue.push(pattern);
141
+ return regExpNew;
142
+ }
143
+ }
144
+ const chars = [' ', ',', '?', '!', ';'];
145
+ const looksLikeObjectPathRegExpCache = new RegExpCache(20);
146
+ const looksLikeObjectPath = (key, nsSeparator, keySeparator) => {
147
+ nsSeparator = nsSeparator || '';
148
+ keySeparator = keySeparator || '';
149
+ const possibleChars = chars.filter(c => !nsSeparator.includes(c) && !keySeparator.includes(c));
150
+ if (possibleChars.length === 0) return true;
151
+ const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\?' : c).join('|')})`);
152
+ let matched = !r.test(key);
153
+ if (!matched) {
154
+ const ki = key.indexOf(keySeparator);
155
+ if (ki > 0 && !r.test(key.substring(0, ki))) {
156
+ matched = true;
157
+ }
158
+ }
159
+ return matched;
160
+ };
161
+ const deepFind = (obj, path, keySeparator = '.') => {
162
+ if (!obj) return undefined;
163
+ if (obj[path]) {
164
+ if (!Object.prototype.hasOwnProperty.call(obj, path)) return undefined;
165
+ return obj[path];
166
+ }
167
+ const tokens = path.split(keySeparator);
168
+ let current = obj;
169
+ for (let i = 0; i < tokens.length;) {
170
+ if (!current || typeof current !== 'object') {
171
+ return undefined;
172
+ }
173
+ let next;
174
+ let nextPath = '';
175
+ for (let j = i; j < tokens.length; ++j) {
176
+ if (j !== i) {
177
+ nextPath += keySeparator;
178
+ }
179
+ nextPath += tokens[j];
180
+ next = current[nextPath];
181
+ if (next !== undefined) {
182
+ if (['string', 'number', 'boolean'].includes(typeof next) && j < tokens.length - 1) {
183
+ continue;
184
+ }
185
+ i += j - i + 1;
186
+ break;
187
+ }
188
+ }
189
+ current = next;
190
+ }
191
+ return current;
192
+ };
193
+ const getCleanedCode = code => code?.replace(/_/g, '-');
194
+
195
+ const consoleLogger = {
196
+ type: 'logger',
197
+ log(args) {
198
+ this.output('log', args);
199
+ },
200
+ warn(args) {
201
+ this.output('warn', args);
202
+ },
203
+ error(args) {
204
+ this.output('error', args);
205
+ },
206
+ output(type, args) {
207
+ console?.[type]?.apply?.(console, args);
208
+ }
209
+ };
210
+ class Logger {
211
+ constructor(concreteLogger, options = {}) {
212
+ this.init(concreteLogger, options);
213
+ }
214
+ init(concreteLogger, options = {}) {
215
+ this.prefix = options.prefix || 'i18next:';
216
+ this.logger = concreteLogger || consoleLogger;
217
+ this.options = options;
218
+ this.debug = options.debug;
219
+ }
220
+ log(...args) {
221
+ return this.forward(args, 'log', '', true);
222
+ }
223
+ warn(...args) {
224
+ return this.forward(args, 'warn', '', true);
225
+ }
226
+ error(...args) {
227
+ return this.forward(args, 'error', '');
228
+ }
229
+ deprecate(...args) {
230
+ return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);
231
+ }
232
+ forward(args, lvl, prefix, debugOnly) {
233
+ if (debugOnly && !this.debug) return null;
234
+ args = args.map(a => isString(a) ? a.replace(/[\r\n\x00-\x1F\x7F]/g, ' ') : a);
235
+ if (isString(args[0])) args[0] = `${prefix}${this.prefix} ${args[0]}`;
236
+ return this.logger[lvl](args);
237
+ }
238
+ create(moduleName) {
239
+ return new Logger(this.logger, {
240
+ ...{
241
+ prefix: `${this.prefix}:${moduleName}:`
242
+ },
243
+ ...this.options
244
+ });
245
+ }
246
+ clone(options) {
247
+ options = options || this.options;
248
+ options.prefix = options.prefix || this.prefix;
249
+ return new Logger(this.logger, options);
250
+ }
251
+ }
252
+ var baseLogger = new Logger();
253
+
254
+ class EventEmitter {
255
+ constructor() {
256
+ this.observers = {};
257
+ }
258
+ on(events, listener) {
259
+ events.split(' ').forEach(event => {
260
+ if (!this.observers[event]) this.observers[event] = new Map();
261
+ const numListeners = this.observers[event].get(listener) || 0;
262
+ this.observers[event].set(listener, numListeners + 1);
263
+ });
264
+ return this;
265
+ }
266
+ off(event, listener) {
267
+ if (!this.observers[event]) return;
268
+ if (!listener) {
269
+ delete this.observers[event];
270
+ return;
271
+ }
272
+ this.observers[event].delete(listener);
273
+ }
274
+ once(event, listener) {
275
+ const wrapper = (...args) => {
276
+ listener(...args);
277
+ this.off(event, wrapper);
278
+ };
279
+ this.on(event, wrapper);
280
+ return this;
281
+ }
282
+ emit(event, ...args) {
283
+ if (this.observers[event]) {
284
+ const cloned = Array.from(this.observers[event].entries());
285
+ cloned.forEach(([observer, numTimesAdded]) => {
286
+ for (let i = 0; i < numTimesAdded; i++) {
287
+ observer(...args);
288
+ }
289
+ });
290
+ }
291
+ if (this.observers['*']) {
292
+ const cloned = Array.from(this.observers['*'].entries());
293
+ cloned.forEach(([observer, numTimesAdded]) => {
294
+ for (let i = 0; i < numTimesAdded; i++) {
295
+ observer(event, ...args);
296
+ }
297
+ });
298
+ }
299
+ }
300
+ }
301
+
302
+ class ResourceStore extends EventEmitter {
303
+ constructor(data, options = {
304
+ ns: ['translation'],
305
+ defaultNS: 'translation'
306
+ }) {
307
+ super();
308
+ this.data = data || {};
309
+ this.options = options;
310
+ if (this.options.keySeparator === undefined) {
311
+ this.options.keySeparator = '.';
312
+ }
313
+ if (this.options.ignoreJSONStructure === undefined) {
314
+ this.options.ignoreJSONStructure = true;
315
+ }
316
+ }
317
+ addNamespaces(ns) {
318
+ if (!this.options.ns.includes(ns)) {
319
+ this.options.ns.push(ns);
320
+ }
321
+ }
322
+ removeNamespaces(ns) {
323
+ const index = this.options.ns.indexOf(ns);
324
+ if (index > -1) {
325
+ this.options.ns.splice(index, 1);
326
+ }
327
+ }
328
+ getResource(lng, ns, key, options = {}) {
329
+ const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
330
+ const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;
331
+ let path;
332
+ if (lng.includes('.')) {
333
+ path = lng.split('.');
334
+ } else {
335
+ path = [lng, ns];
336
+ if (key) {
337
+ if (Array.isArray(key)) {
338
+ path.push(...key);
339
+ } else if (isString(key) && keySeparator) {
340
+ path.push(...key.split(keySeparator));
341
+ } else {
342
+ path.push(key);
343
+ }
344
+ }
345
+ }
346
+ const result = getPath(this.data, path);
347
+ if (!result && !ns && !key && lng.includes('.')) {
348
+ lng = path[0];
349
+ ns = path[1];
350
+ key = path.slice(2).join('.');
351
+ }
352
+ if (result || !ignoreJSONStructure || !isString(key)) return result;
353
+ return deepFind(this.data?.[lng]?.[ns], key, keySeparator);
354
+ }
355
+ addResource(lng, ns, key, value, options = {
356
+ silent: false
357
+ }) {
358
+ const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;
359
+ let path = [lng, ns];
360
+ if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);
361
+ if (lng.includes('.')) {
362
+ path = lng.split('.');
363
+ value = ns;
364
+ ns = path[1];
365
+ }
366
+ this.addNamespaces(ns);
367
+ setPath(this.data, path, value);
368
+ if (!options.silent) this.emit('added', lng, ns, key, value);
369
+ }
370
+ addResources(lng, ns, resources, options = {
371
+ silent: false
372
+ }) {
373
+ for (const m in resources) {
374
+ if (isString(resources[m]) || Array.isArray(resources[m])) this.addResource(lng, ns, m, resources[m], {
375
+ silent: true
376
+ });
377
+ }
378
+ if (!options.silent) this.emit('added', lng, ns, resources);
379
+ }
380
+ addResourceBundle(lng, ns, resources, deep, overwrite, options = {
381
+ silent: false,
382
+ skipCopy: false
383
+ }) {
384
+ let path = [lng, ns];
385
+ if (lng.includes('.')) {
386
+ path = lng.split('.');
387
+ deep = resources;
388
+ resources = ns;
389
+ ns = path[1];
390
+ }
391
+ this.addNamespaces(ns);
392
+ let pack = getPath(this.data, path) || {};
393
+ if (!options.skipCopy) resources = JSON.parse(JSON.stringify(resources));
394
+ if (deep) {
395
+ deepExtend(pack, resources, overwrite);
396
+ } else {
397
+ pack = {
398
+ ...pack,
399
+ ...resources
400
+ };
401
+ }
402
+ setPath(this.data, path, pack);
403
+ if (!options.silent) this.emit('added', lng, ns, resources);
404
+ }
405
+ removeResourceBundle(lng, ns) {
406
+ if (this.hasResourceBundle(lng, ns)) {
407
+ delete this.data[lng][ns];
408
+ }
409
+ this.removeNamespaces(ns);
410
+ this.emit('removed', lng, ns);
411
+ }
412
+ hasResourceBundle(lng, ns) {
413
+ return this.getResource(lng, ns) !== undefined;
414
+ }
415
+ getResourceBundle(lng, ns) {
416
+ if (!ns) ns = this.options.defaultNS;
417
+ return this.getResource(lng, ns);
418
+ }
419
+ getDataByLanguage(lng) {
420
+ return this.data[lng];
421
+ }
422
+ hasLanguageSomeTranslations(lng) {
423
+ const data = this.getDataByLanguage(lng);
424
+ const n = data && Object.keys(data) || [];
425
+ return !!n.find(v => data[v] && Object.keys(data[v]).length > 0);
426
+ }
427
+ toJSON() {
428
+ return this.data;
429
+ }
430
+ }
431
+
432
+ var postProcessor = {
433
+ processors: {},
434
+ addPostProcessor(module) {
435
+ this.processors[module.name] = module;
436
+ },
437
+ handle(processors, value, key, options, translator) {
438
+ processors.forEach(processor => {
439
+ value = this.processors[processor]?.process(value, key, options, translator) ?? value;
440
+ });
441
+ return value;
442
+ }
443
+ };
444
+
445
+ const PATH_KEY = Symbol('i18next/PATH_KEY');
446
+ function createProxy() {
447
+ const state = [];
448
+ const handler = Object.create(null);
449
+ let proxy;
450
+ handler.get = (target, key) => {
451
+ proxy?.revoke?.();
452
+ if (key === PATH_KEY) return state;
453
+ state.push(key);
454
+ proxy = Proxy.revocable(target, handler);
455
+ return proxy.proxy;
456
+ };
457
+ return Proxy.revocable(Object.create(null), handler).proxy;
458
+ }
459
+ function keysFromSelector(selector, opts) {
460
+ const {
461
+ [PATH_KEY]: path
462
+ } = selector(createProxy());
463
+ const keySeparator = opts?.keySeparator ?? '.';
464
+ const nsSeparator = opts?.nsSeparator ?? ':';
465
+ const strict = opts?.enableSelector === 'strict';
466
+ if (path.length > 1 && nsSeparator) {
467
+ const ns = opts?.ns;
468
+ const nsList = strict ? Array.isArray(ns) ? ns : ns ? [ns] : null : Array.isArray(ns) ? ns : null;
469
+ if (nsList) {
470
+ const candidates = strict ? nsList : nsList.length > 1 ? nsList.slice(1) : [];
471
+ if (candidates.includes(path[0])) {
472
+ return `${path[0]}${nsSeparator}${path.slice(1).join(keySeparator)}`;
473
+ }
474
+ }
475
+ }
476
+ return path.join(keySeparator);
477
+ }
478
+
479
+ const shouldHandleAsObject = res => !isString(res) && typeof res !== 'boolean' && typeof res !== 'number';
480
+ class Translator extends EventEmitter {
481
+ constructor(services, options = {}) {
482
+ super();
483
+ copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, this);
484
+ this.options = options;
485
+ if (this.options.keySeparator === undefined) {
486
+ this.options.keySeparator = '.';
487
+ }
488
+ this.logger = baseLogger.create('translator');
489
+ this.checkedLoadedFor = {};
490
+ }
491
+ changeLanguage(lng) {
492
+ if (lng) this.language = lng;
493
+ }
494
+ exists(key, o = {
495
+ interpolation: {}
496
+ }) {
497
+ const opt = {
498
+ ...o
499
+ };
500
+ if (key == null) return false;
501
+ const resolved = this.resolve(key, opt);
502
+ if (resolved?.res === undefined) return false;
503
+ const isObject = shouldHandleAsObject(resolved.res);
504
+ if (opt.returnObjects === false && isObject) {
505
+ return false;
506
+ }
507
+ return true;
508
+ }
509
+ extractFromKey(key, opt) {
510
+ let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;
511
+ if (nsSeparator === undefined) nsSeparator = ':';
512
+ const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;
513
+ let namespaces = opt.ns || this.options.defaultNS || [];
514
+ const wouldCheckForNsInKey = nsSeparator && key.includes(nsSeparator);
515
+ const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !opt.keySeparator && !this.options.userDefinedNsSeparator && !opt.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);
516
+ if (wouldCheckForNsInKey && !seemsNaturalLanguage) {
517
+ const m = key.match(this.interpolator.nestingRegexp);
518
+ if (m && m.length > 0) {
519
+ return {
520
+ key,
521
+ namespaces: isString(namespaces) ? [namespaces] : namespaces
522
+ };
523
+ }
524
+ const parts = key.split(nsSeparator);
525
+ if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.includes(parts[0])) namespaces = parts.shift();
526
+ key = parts.join(keySeparator);
527
+ }
528
+ return {
529
+ key,
530
+ namespaces: isString(namespaces) ? [namespaces] : namespaces
531
+ };
532
+ }
533
+ translate(keys, o, lastKey) {
534
+ let opt = typeof o === 'object' ? {
535
+ ...o
536
+ } : o;
537
+ if (typeof opt !== 'object' && this.options.overloadTranslationOptionHandler) {
538
+ opt = this.options.overloadTranslationOptionHandler(arguments);
539
+ }
540
+ if (typeof opt === 'object') opt = {
541
+ ...opt
542
+ };
543
+ if (!opt) opt = {};
544
+ if (keys == null) return '';
545
+ if (typeof keys === 'function') keys = keysFromSelector(keys, {
546
+ ...this.options,
547
+ ...opt
548
+ });
549
+ if (!Array.isArray(keys)) keys = [String(keys)];
550
+ keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {
551
+ ...this.options,
552
+ ...opt
553
+ }) : String(k));
554
+ const returnDetails = opt.returnDetails !== undefined ? opt.returnDetails : this.options.returnDetails;
555
+ const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;
556
+ const {
557
+ key,
558
+ namespaces
559
+ } = this.extractFromKey(keys[keys.length - 1], opt);
560
+ const namespace = namespaces[namespaces.length - 1];
561
+ let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;
562
+ if (nsSeparator === undefined) nsSeparator = ':';
563
+ const lng = opt.lng || this.language;
564
+ const appendNamespaceToCIMode = opt.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
565
+ if (lng?.toLowerCase() === 'cimode') {
566
+ if (appendNamespaceToCIMode) {
567
+ if (returnDetails) {
568
+ return {
569
+ res: `${namespace}${nsSeparator}${key}`,
570
+ usedKey: key,
571
+ exactUsedKey: key,
572
+ usedLng: lng,
573
+ usedNS: namespace,
574
+ usedParams: this.getUsedParamsDetails(opt)
575
+ };
576
+ }
577
+ return `${namespace}${nsSeparator}${key}`;
578
+ }
579
+ if (returnDetails) {
580
+ return {
581
+ res: key,
582
+ usedKey: key,
583
+ exactUsedKey: key,
584
+ usedLng: lng,
585
+ usedNS: namespace,
586
+ usedParams: this.getUsedParamsDetails(opt)
587
+ };
588
+ }
589
+ return key;
590
+ }
591
+ const resolved = this.resolve(keys, opt);
592
+ let res = resolved?.res;
593
+ const resUsedKey = resolved?.usedKey || key;
594
+ const resExactUsedKey = resolved?.exactUsedKey || key;
595
+ const noObject = ['[object Number]', '[object Function]', '[object RegExp]'];
596
+ const joinArrays = opt.joinArrays !== undefined ? opt.joinArrays : this.options.joinArrays;
597
+ const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;
598
+ const needsPluralHandling = opt.count !== undefined && !isString(opt.count);
599
+ const hasDefaultValue = Translator.hasDefaultValue(opt);
600
+ const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, opt) : '';
601
+ const defaultValueSuffixOrdinalFallback = opt.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, {
602
+ ordinal: false
603
+ }) : '';
604
+ const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;
605
+ const defaultValue = needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] || opt[`defaultValue${defaultValueSuffix}`] || opt[`defaultValue${defaultValueSuffixOrdinalFallback}`] || opt.defaultValue;
606
+ let resForObjHndl = res;
607
+ if (handleAsObjectInI18nFormat && !res && hasDefaultValue) {
608
+ resForObjHndl = defaultValue;
609
+ }
610
+ const handleAsObject = shouldHandleAsObject(resForObjHndl);
611
+ const resType = Object.prototype.toString.apply(resForObjHndl);
612
+ if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && !noObject.includes(resType) && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {
613
+ if (!opt.returnObjects && !this.options.returnObjects) {
614
+ if (!this.options.returnedObjectHandler) {
615
+ this.logger.warn('accessing an object - but returnObjects options is not enabled!');
616
+ }
617
+ const r = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, resForObjHndl, {
618
+ ...opt,
619
+ ns: namespaces
620
+ }) : `key '${key} (${this.language})' returned an object instead of string.`;
621
+ if (returnDetails) {
622
+ resolved.res = r;
623
+ resolved.usedParams = this.getUsedParamsDetails(opt);
624
+ return resolved;
625
+ }
626
+ return r;
627
+ }
628
+ if (keySeparator) {
629
+ const resTypeIsArray = Array.isArray(resForObjHndl);
630
+ const copy = resTypeIsArray ? [] : {};
631
+ const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;
632
+ for (const m in resForObjHndl) {
633
+ if (Object.prototype.hasOwnProperty.call(resForObjHndl, m)) {
634
+ const deepKey = `${newKeyToUse}${keySeparator}${m}`;
635
+ if (hasDefaultValue && !res) {
636
+ copy[m] = this.translate(deepKey, {
637
+ ...opt,
638
+ defaultValue: shouldHandleAsObject(defaultValue) ? defaultValue[m] : undefined,
639
+ ...{
640
+ joinArrays: false,
641
+ ns: namespaces
642
+ }
643
+ });
644
+ } else {
645
+ copy[m] = this.translate(deepKey, {
646
+ ...opt,
647
+ ...{
648
+ joinArrays: false,
649
+ ns: namespaces
650
+ }
651
+ });
652
+ }
653
+ if (copy[m] === deepKey) copy[m] = resForObjHndl[m];
654
+ }
655
+ }
656
+ res = copy;
657
+ }
658
+ } else if (handleAsObjectInI18nFormat && isString(joinArrays) && Array.isArray(res)) {
659
+ res = res.join(joinArrays);
660
+ if (res) res = this.extendTranslation(res, keys, opt, lastKey);
661
+ } else {
662
+ let usedDefault = false;
663
+ let usedKey = false;
664
+ if (!this.isValidLookup(res) && hasDefaultValue) {
665
+ usedDefault = true;
666
+ res = defaultValue;
667
+ }
668
+ if (!this.isValidLookup(res)) {
669
+ usedKey = true;
670
+ res = key;
671
+ }
672
+ const missingKeyNoValueFallbackToKey = opt.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;
673
+ const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;
674
+ const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;
675
+ if (usedKey || usedDefault || updateMissing) {
676
+ this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, needsPluralHandling && !updateMissing ? `${key}${this.pluralResolver.getSuffix(lng, opt.count, opt)}` : key, updateMissing ? defaultValue : res);
677
+ if (keySeparator) {
678
+ const fk = this.resolve(key, {
679
+ ...opt,
680
+ keySeparator: false
681
+ });
682
+ if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');
683
+ }
684
+ let lngs = [];
685
+ const fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, opt.lng || this.language);
686
+ if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {
687
+ for (let i = 0; i < fallbackLngs.length; i++) {
688
+ lngs.push(fallbackLngs[i]);
689
+ }
690
+ } else if (this.options.saveMissingTo === 'all') {
691
+ lngs = this.languageUtils.toResolveHierarchy(opt.lng || this.language);
692
+ } else {
693
+ lngs.push(opt.lng || this.language);
694
+ }
695
+ const send = (l, k, specificDefaultValue) => {
696
+ const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;
697
+ if (this.options.missingKeyHandler) {
698
+ this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, opt);
699
+ } else if (this.backendConnector?.saveMissing) {
700
+ this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, opt);
701
+ }
702
+ this.emit('missingKey', l, namespace, k, res);
703
+ };
704
+ if (this.options.saveMissing) {
705
+ if (this.options.saveMissingPlurals && needsPluralHandling) {
706
+ lngs.forEach(language => {
707
+ const suffixes = this.pluralResolver.getSuffixes(language, opt);
708
+ if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && !suffixes.includes(`${this.options.pluralSeparator}zero`)) {
709
+ suffixes.push(`${this.options.pluralSeparator}zero`);
710
+ }
711
+ suffixes.forEach(suffix => {
712
+ send([language], key + suffix, opt[`defaultValue${suffix}`] || defaultValue);
713
+ });
714
+ });
715
+ } else {
716
+ send(lngs, key, defaultValue);
717
+ }
718
+ }
719
+ }
720
+ res = this.extendTranslation(res, keys, opt, resolved, lastKey);
721
+ if (usedKey && res === key && this.options.appendNamespaceToMissingKey) {
722
+ res = `${namespace}${nsSeparator}${key}`;
723
+ }
724
+ if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {
725
+ res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}${nsSeparator}${key}` : key, usedDefault ? res : undefined, opt);
726
+ }
727
+ }
728
+ if (returnDetails) {
729
+ resolved.res = res;
730
+ resolved.usedParams = this.getUsedParamsDetails(opt);
731
+ return resolved;
732
+ }
733
+ return res;
734
+ }
735
+ extendTranslation(res, key, opt, resolved, lastKey) {
736
+ if (this.i18nFormat?.parse) {
737
+ res = this.i18nFormat.parse(res, {
738
+ ...this.options.interpolation.defaultVariables,
739
+ ...opt
740
+ }, opt.lng || this.language || resolved.usedLng, resolved.usedNS, resolved.usedKey, {
741
+ resolved
742
+ });
743
+ } else if (!opt.skipInterpolation) {
744
+ if (opt.interpolation) this.interpolator.init({
745
+ ...opt,
746
+ ...{
747
+ interpolation: {
748
+ ...this.options.interpolation,
749
+ ...opt.interpolation
750
+ }
751
+ }
752
+ });
753
+ const skipOnVariables = isString(res) && (opt?.interpolation?.skipOnVariables !== undefined ? opt.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
754
+ let nestBef;
755
+ if (skipOnVariables) {
756
+ const nb = res.match(this.interpolator.nestingRegexp);
757
+ nestBef = nb && nb.length;
758
+ }
759
+ let data = opt.replace && !isString(opt.replace) ? opt.replace : opt;
760
+ if (this.options.interpolation.defaultVariables) data = {
761
+ ...this.options.interpolation.defaultVariables,
762
+ ...data
763
+ };
764
+ res = this.interpolator.interpolate(res, data, opt.lng || this.language || resolved.usedLng, opt);
765
+ if (skipOnVariables) {
766
+ const na = res.match(this.interpolator.nestingRegexp);
767
+ const nestAft = na && na.length;
768
+ if (nestBef < nestAft) opt.nest = false;
769
+ }
770
+ if (!opt.lng && resolved && resolved.res) opt.lng = this.language || resolved.usedLng;
771
+ if (opt.nest !== false) res = this.interpolator.nest(res, (...args) => {
772
+ if (lastKey?.[0] === args[0] && !opt.context) {
773
+ this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);
774
+ return null;
775
+ }
776
+ return this.translate(...args, key);
777
+ }, opt);
778
+ if (opt.interpolation) this.interpolator.reset();
779
+ }
780
+ const postProcess = opt.postProcess || this.options.postProcess;
781
+ const postProcessorNames = isString(postProcess) ? [postProcess] : postProcess;
782
+ if (res != null && postProcessorNames?.length && opt.applyPostProcessor !== false) {
783
+ res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {
784
+ i18nResolved: {
785
+ ...resolved,
786
+ usedParams: this.getUsedParamsDetails(opt)
787
+ },
788
+ ...opt
789
+ } : opt, this);
790
+ }
791
+ return res;
792
+ }
793
+ resolve(keys, opt = {}) {
794
+ let found;
795
+ let usedKey;
796
+ let exactUsedKey;
797
+ let usedLng;
798
+ let usedNS;
799
+ if (isString(keys)) keys = [keys];
800
+ if (Array.isArray(keys)) keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {
801
+ ...this.options,
802
+ ...opt
803
+ }) : k);
804
+ keys.forEach(k => {
805
+ if (this.isValidLookup(found)) return;
806
+ const extracted = this.extractFromKey(k, opt);
807
+ const key = extracted.key;
808
+ usedKey = key;
809
+ let namespaces = extracted.namespaces;
810
+ if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);
811
+ const needsPluralHandling = opt.count !== undefined && !isString(opt.count);
812
+ const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;
813
+ const needsContextHandling = opt.context !== undefined && (isString(opt.context) || typeof opt.context === 'number') && opt.context !== '';
814
+ const codes = opt.lngs ? opt.lngs : this.languageUtils.toResolveHierarchy(opt.lng || this.language, opt.fallbackLng);
815
+ namespaces.forEach(ns => {
816
+ if (this.isValidLookup(found)) return;
817
+ usedNS = ns;
818
+ if (!this.checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {
819
+ this.checkedLoadedFor[`${codes[0]}-${ns}`] = true;
820
+ this.logger.warn(`key "${usedKey}" for languages "${codes.join(', ')}" won't get resolved as namespace "${usedNS}" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
821
+ }
822
+ codes.forEach(code => {
823
+ if (this.isValidLookup(found)) return;
824
+ usedLng = code;
825
+ const finalKeys = [key];
826
+ if (this.i18nFormat?.addLookupKeys) {
827
+ this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, opt);
828
+ } else {
829
+ let pluralSuffix;
830
+ if (needsPluralHandling) pluralSuffix = this.pluralResolver.getSuffix(code, opt.count, opt);
831
+ const zeroSuffix = `${this.options.pluralSeparator}zero`;
832
+ const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
833
+ if (needsPluralHandling) {
834
+ if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {
835
+ finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));
836
+ }
837
+ finalKeys.push(key + pluralSuffix);
838
+ if (needsZeroSuffixLookup) {
839
+ finalKeys.push(key + zeroSuffix);
840
+ }
841
+ }
842
+ if (needsContextHandling) {
843
+ const contextKey = `${key}${this.options.contextSeparator || '_'}${opt.context}`;
844
+ finalKeys.push(contextKey);
845
+ if (needsPluralHandling) {
846
+ if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {
847
+ finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));
848
+ }
849
+ finalKeys.push(contextKey + pluralSuffix);
850
+ if (needsZeroSuffixLookup) {
851
+ finalKeys.push(contextKey + zeroSuffix);
852
+ }
853
+ }
854
+ }
855
+ }
856
+ let possibleKey;
857
+ while (possibleKey = finalKeys.pop()) {
858
+ if (!this.isValidLookup(found)) {
859
+ exactUsedKey = possibleKey;
860
+ found = this.getResource(code, ns, possibleKey, opt);
861
+ }
862
+ }
863
+ });
864
+ });
865
+ });
866
+ return {
867
+ res: found,
868
+ usedKey,
869
+ exactUsedKey,
870
+ usedLng,
871
+ usedNS
872
+ };
873
+ }
874
+ isValidLookup(res) {
875
+ return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');
876
+ }
877
+ getResource(code, ns, key, options = {}) {
878
+ if (this.i18nFormat?.getResource) return this.i18nFormat.getResource(code, ns, key, options);
879
+ return this.resourceStore.getResource(code, ns, key, options);
880
+ }
881
+ getUsedParamsDetails(options = {}) {
882
+ const optionsKeys = ['defaultValue', 'ordinal', 'context', 'replace', 'lng', 'lngs', 'fallbackLng', 'ns', 'keySeparator', 'nsSeparator', 'returnObjects', 'returnDetails', 'joinArrays', 'postProcess', 'interpolation'];
883
+ const useOptionsReplaceForData = options.replace && !isString(options.replace);
884
+ let data = useOptionsReplaceForData ? options.replace : options;
885
+ if (useOptionsReplaceForData && typeof options.count !== 'undefined') {
886
+ data.count = options.count;
887
+ }
888
+ if (this.options.interpolation.defaultVariables) {
889
+ data = {
890
+ ...this.options.interpolation.defaultVariables,
891
+ ...data
892
+ };
893
+ }
894
+ if (!useOptionsReplaceForData) {
895
+ data = {
896
+ ...data
897
+ };
898
+ for (const key of optionsKeys) {
899
+ delete data[key];
900
+ }
901
+ }
902
+ return data;
903
+ }
904
+ static hasDefaultValue(options) {
905
+ const prefix = 'defaultValue';
906
+ for (const option in options) {
907
+ if (Object.prototype.hasOwnProperty.call(options, option) && option.startsWith(prefix) && undefined !== options[option]) {
908
+ return true;
909
+ }
910
+ }
911
+ return false;
912
+ }
913
+ }
914
+
915
+ class LanguageUtil {
916
+ constructor(options) {
917
+ this.options = options;
918
+ this.supportedLngs = this.options.supportedLngs || false;
919
+ this.logger = baseLogger.create('languageUtils');
920
+ }
921
+ getScriptPartFromCode(code) {
922
+ code = getCleanedCode(code);
923
+ if (!code || !code.includes('-')) return null;
924
+ const p = code.split('-');
925
+ if (p.length === 2) return null;
926
+ p.pop();
927
+ if (p[p.length - 1].toLowerCase() === 'x') return null;
928
+ return this.formatLanguageCode(p.join('-'));
929
+ }
930
+ getLanguagePartFromCode(code) {
931
+ code = getCleanedCode(code);
932
+ if (!code || !code.includes('-')) return code;
933
+ const p = code.split('-');
934
+ return this.formatLanguageCode(p[0]);
935
+ }
936
+ formatLanguageCode(code) {
937
+ if (isString(code) && code.includes('-')) {
938
+ let formattedCode;
939
+ try {
940
+ formattedCode = Intl.getCanonicalLocales(code)[0];
941
+ } catch (e) {}
942
+ if (formattedCode && this.options.lowerCaseLng) {
943
+ formattedCode = formattedCode.toLowerCase();
944
+ }
945
+ if (formattedCode) return formattedCode;
946
+ if (this.options.lowerCaseLng) {
947
+ return code.toLowerCase();
948
+ }
949
+ return code;
950
+ }
951
+ return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;
952
+ }
953
+ isSupportedCode(code) {
954
+ if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {
955
+ code = this.getLanguagePartFromCode(code);
956
+ }
957
+ return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.includes(code);
958
+ }
959
+ getBestMatchFromCodes(codes) {
960
+ if (!codes) return null;
961
+ let found;
962
+ codes.forEach(code => {
963
+ if (found) return;
964
+ const cleanedLng = this.formatLanguageCode(code);
965
+ if (!this.options.supportedLngs || this.isSupportedCode(cleanedLng)) found = cleanedLng;
966
+ });
967
+ if (!found && this.options.supportedLngs) {
968
+ codes.forEach(code => {
969
+ if (found) return;
970
+ const lngScOnly = this.getScriptPartFromCode(code);
971
+ if (this.isSupportedCode(lngScOnly)) return found = lngScOnly;
972
+ const lngOnly = this.getLanguagePartFromCode(code);
973
+ if (this.isSupportedCode(lngOnly)) return found = lngOnly;
974
+ found = this.options.supportedLngs.find(supportedLng => {
975
+ if (supportedLng === lngOnly) return true;
976
+ if (!supportedLng.includes('-') && !lngOnly.includes('-')) return false;
977
+ if (supportedLng.includes('-') && !lngOnly.includes('-') && supportedLng.slice(0, supportedLng.indexOf('-')) === lngOnly) return true;
978
+ if (supportedLng.startsWith(lngOnly) && lngOnly.length > 1) return true;
979
+ return false;
980
+ });
981
+ });
982
+ }
983
+ if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];
984
+ return found;
985
+ }
986
+ getFallbackCodes(fallbacks, code) {
987
+ if (!fallbacks) return [];
988
+ if (typeof fallbacks === 'function') fallbacks = fallbacks(code);
989
+ if (isString(fallbacks)) fallbacks = [fallbacks];
990
+ if (Array.isArray(fallbacks)) return fallbacks;
991
+ if (!code) return fallbacks.default || [];
992
+ let found = fallbacks[code];
993
+ if (!found) found = fallbacks[this.getScriptPartFromCode(code)];
994
+ if (!found) found = fallbacks[this.formatLanguageCode(code)];
995
+ if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];
996
+ if (!found) found = fallbacks.default;
997
+ return found || [];
998
+ }
999
+ toResolveHierarchy(code, fallbackCode) {
1000
+ const fallbackCodes = this.getFallbackCodes((fallbackCode === false ? [] : fallbackCode) || this.options.fallbackLng || [], code);
1001
+ const codes = [];
1002
+ const addCode = c => {
1003
+ if (!c) return;
1004
+ if (this.isSupportedCode(c)) {
1005
+ codes.push(c);
1006
+ } else {
1007
+ this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);
1008
+ }
1009
+ };
1010
+ if (isString(code) && (code.includes('-') || code.includes('_'))) {
1011
+ if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));
1012
+ if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));
1013
+ if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));
1014
+ } else if (isString(code)) {
1015
+ addCode(this.formatLanguageCode(code));
1016
+ }
1017
+ fallbackCodes.forEach(fc => {
1018
+ if (!codes.includes(fc)) addCode(this.formatLanguageCode(fc));
1019
+ });
1020
+ return codes;
1021
+ }
1022
+ }
1023
+
1024
+ const suffixesOrder = {
1025
+ zero: 0,
1026
+ one: 1,
1027
+ two: 2,
1028
+ few: 3,
1029
+ many: 4,
1030
+ other: 5
1031
+ };
1032
+ const dummyRule = {
1033
+ select: count => count === 1 ? 'one' : 'other',
1034
+ resolvedOptions: () => ({
1035
+ pluralCategories: ['one', 'other']
1036
+ })
1037
+ };
1038
+ class PluralResolver {
1039
+ constructor(languageUtils, options = {}) {
1040
+ this.languageUtils = languageUtils;
1041
+ this.options = options;
1042
+ this.logger = baseLogger.create('pluralResolver');
1043
+ this.pluralRulesCache = {};
1044
+ }
1045
+ clearCache() {
1046
+ this.pluralRulesCache = {};
1047
+ }
1048
+ getRule(code, options = {}) {
1049
+ const cleanedCode = getCleanedCode(code === 'dev' ? 'en' : code);
1050
+ const type = options.ordinal ? 'ordinal' : 'cardinal';
1051
+ const cacheKey = JSON.stringify({
1052
+ cleanedCode,
1053
+ type
1054
+ });
1055
+ if (cacheKey in this.pluralRulesCache) {
1056
+ return this.pluralRulesCache[cacheKey];
1057
+ }
1058
+ let rule;
1059
+ try {
1060
+ rule = new Intl.PluralRules(cleanedCode, {
1061
+ type
1062
+ });
1063
+ } catch (err) {
1064
+ if (typeof Intl === 'undefined') {
1065
+ this.logger.error('No Intl support, please use an Intl polyfill!');
1066
+ return dummyRule;
1067
+ }
1068
+ if (!code.match(/-|_/)) return dummyRule;
1069
+ const lngPart = this.languageUtils.getLanguagePartFromCode(code);
1070
+ rule = this.getRule(lngPart, options);
1071
+ }
1072
+ this.pluralRulesCache[cacheKey] = rule;
1073
+ return rule;
1074
+ }
1075
+ needsPlural(code, options = {}) {
1076
+ let rule = this.getRule(code, options);
1077
+ if (!rule) rule = this.getRule('dev', options);
1078
+ return rule?.resolvedOptions().pluralCategories.length > 1;
1079
+ }
1080
+ getPluralFormsOfKey(code, key, options = {}) {
1081
+ return this.getSuffixes(code, options).map(suffix => `${key}${suffix}`);
1082
+ }
1083
+ getSuffixes(code, options = {}) {
1084
+ let rule = this.getRule(code, options);
1085
+ if (!rule) rule = this.getRule('dev', options);
1086
+ if (!rule) return [];
1087
+ return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map(pluralCategory => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${pluralCategory}`);
1088
+ }
1089
+ getSuffix(code, count, options = {}) {
1090
+ const rule = this.getRule(code, options);
1091
+ if (rule) {
1092
+ return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${rule.select(count)}`;
1093
+ }
1094
+ this.logger.warn(`no plural rule found for: ${code}`);
1095
+ return this.getSuffix('dev', count, options);
1096
+ }
1097
+ }
1098
+
1099
+ const deepFindWithDefaults = (data, defaultData, key, keySeparator = '.', ignoreJSONStructure = true) => {
1100
+ let path = getPathWithDefaults(data, defaultData, key);
1101
+ if (!path && ignoreJSONStructure && isString(key)) {
1102
+ path = deepFind(data, key, keySeparator);
1103
+ if (path === undefined) path = deepFind(defaultData, key, keySeparator);
1104
+ }
1105
+ return path;
1106
+ };
1107
+ const regexSafe = val => val.replace(/\$/g, '$$$$');
1108
+ class Interpolator {
1109
+ constructor(options = {}) {
1110
+ this.logger = baseLogger.create('interpolator');
1111
+ this.options = options;
1112
+ this.format = options?.interpolation?.format || (value => value);
1113
+ this.init(options);
1114
+ }
1115
+ init(options = {}) {
1116
+ if (!options.interpolation) options.interpolation = {
1117
+ escapeValue: true
1118
+ };
1119
+ const {
1120
+ escape: escape$1,
1121
+ escapeValue,
1122
+ useRawValueToEscape,
1123
+ prefix,
1124
+ prefixEscaped,
1125
+ suffix,
1126
+ suffixEscaped,
1127
+ formatSeparator,
1128
+ unescapeSuffix,
1129
+ unescapePrefix,
1130
+ nestingPrefix,
1131
+ nestingPrefixEscaped,
1132
+ nestingSuffix,
1133
+ nestingSuffixEscaped,
1134
+ nestingOptionsSeparator,
1135
+ maxReplaces,
1136
+ alwaysFormat
1137
+ } = options.interpolation;
1138
+ this.escape = escape$1 !== undefined ? escape$1 : escape;
1139
+ this.escapeValue = escapeValue !== undefined ? escapeValue : true;
1140
+ this.useRawValueToEscape = useRawValueToEscape !== undefined ? useRawValueToEscape : false;
1141
+ this.prefix = prefix ? regexEscape(prefix) : prefixEscaped || '{{';
1142
+ this.suffix = suffix ? regexEscape(suffix) : suffixEscaped || '}}';
1143
+ this.formatSeparator = formatSeparator || ',';
1144
+ this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix ? regexEscape(unescapePrefix) : '-';
1145
+ this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix ? regexEscape(unescapeSuffix) : '';
1146
+ this.nestingPrefix = nestingPrefix ? regexEscape(nestingPrefix) : nestingPrefixEscaped || regexEscape('$t(');
1147
+ this.nestingSuffix = nestingSuffix ? regexEscape(nestingSuffix) : nestingSuffixEscaped || regexEscape(')');
1148
+ this.nestingOptionsSeparator = nestingOptionsSeparator || ',';
1149
+ this.maxReplaces = maxReplaces || 1000;
1150
+ this.alwaysFormat = alwaysFormat !== undefined ? alwaysFormat : false;
1151
+ this.resetRegExp();
1152
+ }
1153
+ reset() {
1154
+ if (this.options) this.init(this.options);
1155
+ }
1156
+ resetRegExp() {
1157
+ const getOrResetRegExp = (existingRegExp, pattern) => {
1158
+ if (existingRegExp?.source === pattern) {
1159
+ existingRegExp.lastIndex = 0;
1160
+ return existingRegExp;
1161
+ }
1162
+ return new RegExp(pattern, 'g');
1163
+ };
1164
+ this.regexp = getOrResetRegExp(this.regexp, `${this.prefix}(.+?)${this.suffix}`);
1165
+ this.regexpUnescape = getOrResetRegExp(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);
1166
+ this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
1167
+ }
1168
+ interpolate(str, data, lng, options) {
1169
+ let match;
1170
+ let value;
1171
+ let replaces;
1172
+ const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
1173
+ const handleFormat = key => {
1174
+ if (!key.includes(this.formatSeparator)) {
1175
+ const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);
1176
+ return this.alwaysFormat ? this.format(path, undefined, lng, {
1177
+ ...options,
1178
+ ...data,
1179
+ interpolationkey: key
1180
+ }) : path;
1181
+ }
1182
+ const p = key.split(this.formatSeparator);
1183
+ const k = p.shift().trim();
1184
+ const f = p.join(this.formatSeparator).trim();
1185
+ return this.format(deepFindWithDefaults(data, defaultData, k, this.options.keySeparator, this.options.ignoreJSONStructure), f, lng, {
1186
+ ...options,
1187
+ ...data,
1188
+ interpolationkey: k
1189
+ });
1190
+ };
1191
+ this.resetRegExp();
1192
+ if (!this.escapeValue && typeof str === 'string' && /\$t\([^)]*\{[^}]*\{\{/.test(str)) {
1193
+ this.logger.warn('nesting options string contains interpolated variables with escapeValue: false — ' + 'if any of those values are attacker-controlled they can inject additional ' + 'nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing ' + 'it to t(), or keep escapeValue: true.');
1194
+ }
1195
+ const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;
1196
+ const skipOnVariables = options?.interpolation?.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
1197
+ const todos = [{
1198
+ regex: this.regexpUnescape,
1199
+ safeValue: val => regexSafe(val)
1200
+ }, {
1201
+ regex: this.regexp,
1202
+ safeValue: val => this.escapeValue ? regexSafe(this.escape(val)) : regexSafe(val)
1203
+ }];
1204
+ todos.forEach(todo => {
1205
+ replaces = 0;
1206
+ while (match = todo.regex.exec(str)) {
1207
+ const matchedVar = match[1].trim();
1208
+ value = handleFormat(matchedVar);
1209
+ if (value === undefined) {
1210
+ if (typeof missingInterpolationHandler === 'function') {
1211
+ const temp = missingInterpolationHandler(str, match, options);
1212
+ value = isString(temp) ? temp : '';
1213
+ } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {
1214
+ value = '';
1215
+ } else if (skipOnVariables) {
1216
+ value = match[0];
1217
+ continue;
1218
+ } else {
1219
+ this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);
1220
+ value = '';
1221
+ }
1222
+ } else if (!isString(value) && !this.useRawValueToEscape) {
1223
+ value = makeString(value);
1224
+ }
1225
+ const safeValue = todo.safeValue(value);
1226
+ str = str.replace(match[0], safeValue);
1227
+ if (skipOnVariables) {
1228
+ todo.regex.lastIndex += value.length;
1229
+ todo.regex.lastIndex -= match[0].length;
1230
+ } else {
1231
+ todo.regex.lastIndex = 0;
1232
+ }
1233
+ replaces++;
1234
+ if (replaces >= this.maxReplaces) {
1235
+ break;
1236
+ }
1237
+ }
1238
+ });
1239
+ return str;
1240
+ }
1241
+ nest(str, fc, options = {}) {
1242
+ let match;
1243
+ let value;
1244
+ let clonedOptions;
1245
+ const handleHasOptions = (key, inheritedOptions) => {
1246
+ const sep = this.nestingOptionsSeparator;
1247
+ if (!key.includes(sep)) return key;
1248
+ const c = key.split(new RegExp(`${regexEscape(sep)}[ ]*{`));
1249
+ let optionsString = `{${c[1]}`;
1250
+ key = c[0];
1251
+ optionsString = this.interpolate(optionsString, clonedOptions);
1252
+ const matchedSingleQuotes = optionsString.match(/'/g);
1253
+ const matchedDoubleQuotes = optionsString.match(/"/g);
1254
+ if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || (matchedDoubleQuotes?.length ?? 0) % 2 !== 0) {
1255
+ optionsString = optionsString.replace(/'/g, '"');
1256
+ }
1257
+ try {
1258
+ clonedOptions = JSON.parse(optionsString);
1259
+ if (inheritedOptions) clonedOptions = {
1260
+ ...inheritedOptions,
1261
+ ...clonedOptions
1262
+ };
1263
+ } catch (e) {
1264
+ this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);
1265
+ return `${key}${sep}${optionsString}`;
1266
+ }
1267
+ if (clonedOptions.defaultValue && clonedOptions.defaultValue.includes(this.prefix)) delete clonedOptions.defaultValue;
1268
+ return key;
1269
+ };
1270
+ while (match = this.nestingRegexp.exec(str)) {
1271
+ let formatters = [];
1272
+ clonedOptions = {
1273
+ ...options
1274
+ };
1275
+ clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;
1276
+ clonedOptions.applyPostProcessor = false;
1277
+ delete clonedOptions.defaultValue;
1278
+ const keyEndIndex = /{.*}/.test(match[1]) ? match[1].lastIndexOf('}') + 1 : match[1].indexOf(this.formatSeparator);
1279
+ if (keyEndIndex !== -1) {
1280
+ formatters = match[1].slice(keyEndIndex).split(this.formatSeparator).map(elem => elem.trim()).filter(Boolean);
1281
+ match[1] = match[1].slice(0, keyEndIndex);
1282
+ }
1283
+ value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);
1284
+ if (value && match[0] === str && !isString(value)) return value;
1285
+ if (!isString(value)) value = makeString(value);
1286
+ if (!value) {
1287
+ this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);
1288
+ value = '';
1289
+ }
1290
+ if (formatters.length) {
1291
+ value = formatters.reduce((v, f) => this.format(v, f, options.lng, {
1292
+ ...options,
1293
+ interpolationkey: match[1].trim()
1294
+ }), value.trim());
1295
+ }
1296
+ str = str.replace(match[0], value);
1297
+ this.regexp.lastIndex = 0;
1298
+ }
1299
+ return str;
1300
+ }
1301
+ }
1302
+
1303
+ const parseFormatStr = formatStr => {
1304
+ let formatName = formatStr.toLowerCase().trim();
1305
+ const formatOptions = {};
1306
+ if (formatStr.includes('(')) {
1307
+ const p = formatStr.split('(');
1308
+ formatName = p[0].toLowerCase().trim();
1309
+ const optStr = p[1].slice(0, -1);
1310
+ if (formatName === 'currency' && !optStr.includes(':')) {
1311
+ if (!formatOptions.currency) formatOptions.currency = optStr.trim();
1312
+ } else if (formatName === 'relativetime' && !optStr.includes(':')) {
1313
+ if (!formatOptions.range) formatOptions.range = optStr.trim();
1314
+ } else {
1315
+ const opts = optStr.split(';');
1316
+ opts.forEach(opt => {
1317
+ if (opt) {
1318
+ const [key, ...rest] = opt.split(':');
1319
+ const val = rest.join(':').trim().replace(/^'+|'+$/g, '');
1320
+ const trimmedKey = key.trim();
1321
+ if (!formatOptions[trimmedKey]) formatOptions[trimmedKey] = val;
1322
+ if (val === 'false') formatOptions[trimmedKey] = false;
1323
+ if (val === 'true') formatOptions[trimmedKey] = true;
1324
+ if (!isNaN(val)) formatOptions[trimmedKey] = parseInt(val, 10);
1325
+ }
1326
+ });
1327
+ }
1328
+ }
1329
+ return {
1330
+ formatName,
1331
+ formatOptions
1332
+ };
1333
+ };
1334
+ const createCachedFormatter = fn => {
1335
+ const cache = {};
1336
+ return (v, l, o) => {
1337
+ let optForCache = o;
1338
+ if (o && o.interpolationkey && o.formatParams && o.formatParams[o.interpolationkey] && o[o.interpolationkey]) {
1339
+ optForCache = {
1340
+ ...optForCache,
1341
+ [o.interpolationkey]: undefined
1342
+ };
1343
+ }
1344
+ const key = l + JSON.stringify(optForCache);
1345
+ let frm = cache[key];
1346
+ if (!frm) {
1347
+ frm = fn(getCleanedCode(l), o);
1348
+ cache[key] = frm;
1349
+ }
1350
+ return frm(v);
1351
+ };
1352
+ };
1353
+ const createNonCachedFormatter = fn => (v, l, o) => fn(getCleanedCode(l), o)(v);
1354
+ class Formatter {
1355
+ constructor(options = {}) {
1356
+ this.logger = baseLogger.create('formatter');
1357
+ this.options = options;
1358
+ this.init(options);
1359
+ }
1360
+ init(services, options = {
1361
+ interpolation: {}
1362
+ }) {
1363
+ this.formatSeparator = options.interpolation.formatSeparator || ',';
1364
+ const cf = options.cacheInBuiltFormats ? createCachedFormatter : createNonCachedFormatter;
1365
+ this.formats = {
1366
+ number: cf((lng, opt) => {
1367
+ const formatter = new Intl.NumberFormat(lng, {
1368
+ ...opt
1369
+ });
1370
+ return val => formatter.format(val);
1371
+ }),
1372
+ currency: cf((lng, opt) => {
1373
+ const formatter = new Intl.NumberFormat(lng, {
1374
+ ...opt,
1375
+ style: 'currency'
1376
+ });
1377
+ return val => formatter.format(val);
1378
+ }),
1379
+ datetime: cf((lng, opt) => {
1380
+ const formatter = new Intl.DateTimeFormat(lng, {
1381
+ ...opt
1382
+ });
1383
+ return val => formatter.format(val);
1384
+ }),
1385
+ relativetime: cf((lng, opt) => {
1386
+ const formatter = new Intl.RelativeTimeFormat(lng, {
1387
+ ...opt
1388
+ });
1389
+ return val => formatter.format(val, opt.range || 'day');
1390
+ }),
1391
+ list: cf((lng, opt) => {
1392
+ const formatter = new Intl.ListFormat(lng, {
1393
+ ...opt
1394
+ });
1395
+ return val => formatter.format(val);
1396
+ })
1397
+ };
1398
+ }
1399
+ add(name, fc) {
1400
+ this.formats[name.toLowerCase().trim()] = fc;
1401
+ }
1402
+ addCached(name, fc) {
1403
+ this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);
1404
+ }
1405
+ format(value, format, lng, options = {}) {
1406
+ if (!format) return value;
1407
+ if (value == null) return value;
1408
+ const rawFormats = format.split(this.formatSeparator);
1409
+ const formats = [];
1410
+ for (let i = 0; i < rawFormats.length; i++) {
1411
+ let f = rawFormats[i];
1412
+ while (f.indexOf('(') > -1 && !f.includes(')') && i + 1 < rawFormats.length) {
1413
+ f = `${f}${this.formatSeparator}${rawFormats[++i]}`;
1414
+ }
1415
+ formats.push(f);
1416
+ }
1417
+ const result = formats.reduce((mem, f) => {
1418
+ const {
1419
+ formatName,
1420
+ formatOptions
1421
+ } = parseFormatStr(f);
1422
+ if (this.formats[formatName]) {
1423
+ let formatted = mem;
1424
+ try {
1425
+ const valOptions = options?.formatParams?.[options.interpolationkey] || {};
1426
+ const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;
1427
+ formatted = this.formats[formatName](mem, l, {
1428
+ ...formatOptions,
1429
+ ...options,
1430
+ ...valOptions
1431
+ });
1432
+ } catch (error) {
1433
+ this.logger.warn(error);
1434
+ }
1435
+ return formatted;
1436
+ } else {
1437
+ this.logger.warn(`there was no format function for ${formatName}`);
1438
+ }
1439
+ return mem;
1440
+ }, value);
1441
+ return result;
1442
+ }
1443
+ }
1444
+
1445
+ const removePending = (q, name) => {
1446
+ if (q.pending[name] !== undefined) {
1447
+ delete q.pending[name];
1448
+ q.pendingCount--;
1449
+ }
1450
+ };
1451
+ class Connector extends EventEmitter {
1452
+ constructor(backend, store, services, options = {}) {
1453
+ super();
1454
+ this.backend = backend;
1455
+ this.store = store;
1456
+ this.services = services;
1457
+ this.languageUtils = services.languageUtils;
1458
+ this.options = options;
1459
+ this.logger = baseLogger.create('backendConnector');
1460
+ this.waitingReads = [];
1461
+ this.maxParallelReads = options.maxParallelReads || 10;
1462
+ this.readingCalls = 0;
1463
+ this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;
1464
+ this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;
1465
+ this.state = {};
1466
+ this.queue = [];
1467
+ this.backend?.init?.(services, options.backend, options);
1468
+ }
1469
+ queueLoad(languages, namespaces, options, callback) {
1470
+ const toLoad = {};
1471
+ const pending = {};
1472
+ const toLoadLanguages = {};
1473
+ const toLoadNamespaces = {};
1474
+ languages.forEach(lng => {
1475
+ let hasAllNamespaces = true;
1476
+ namespaces.forEach(ns => {
1477
+ const name = `${lng}|${ns}`;
1478
+ if (!options.reload && this.store.hasResourceBundle(lng, ns)) {
1479
+ this.state[name] = 2;
1480
+ } else if (this.state[name] < 0) ; else if (this.state[name] === 1) {
1481
+ if (pending[name] === undefined) pending[name] = true;
1482
+ } else {
1483
+ this.state[name] = 1;
1484
+ hasAllNamespaces = false;
1485
+ if (pending[name] === undefined) pending[name] = true;
1486
+ if (toLoad[name] === undefined) toLoad[name] = true;
1487
+ if (toLoadNamespaces[ns] === undefined) toLoadNamespaces[ns] = true;
1488
+ }
1489
+ });
1490
+ if (!hasAllNamespaces) toLoadLanguages[lng] = true;
1491
+ });
1492
+ if (Object.keys(toLoad).length || Object.keys(pending).length) {
1493
+ this.queue.push({
1494
+ pending,
1495
+ pendingCount: Object.keys(pending).length,
1496
+ loaded: {},
1497
+ errors: [],
1498
+ callback
1499
+ });
1500
+ }
1501
+ return {
1502
+ toLoad: Object.keys(toLoad),
1503
+ pending: Object.keys(pending),
1504
+ toLoadLanguages: Object.keys(toLoadLanguages),
1505
+ toLoadNamespaces: Object.keys(toLoadNamespaces)
1506
+ };
1507
+ }
1508
+ loaded(name, err, data) {
1509
+ const s = name.split('|');
1510
+ const lng = s[0];
1511
+ const ns = s[1];
1512
+ if (err) this.emit('failedLoading', lng, ns, err);
1513
+ if (!err && data) {
1514
+ this.store.addResourceBundle(lng, ns, data, undefined, undefined, {
1515
+ skipCopy: true
1516
+ });
1517
+ }
1518
+ this.state[name] = err ? -1 : 2;
1519
+ if (err && data) this.state[name] = 0;
1520
+ const loaded = {};
1521
+ this.queue.forEach(q => {
1522
+ pushPath(q.loaded, [lng], ns);
1523
+ removePending(q, name);
1524
+ if (err) q.errors.push(err);
1525
+ if (q.pendingCount === 0 && !q.done) {
1526
+ Object.keys(q.loaded).forEach(l => {
1527
+ if (!loaded[l]) loaded[l] = {};
1528
+ const loadedKeys = q.loaded[l];
1529
+ if (loadedKeys.length) {
1530
+ loadedKeys.forEach(n => {
1531
+ if (loaded[l][n] === undefined) loaded[l][n] = true;
1532
+ });
1533
+ }
1534
+ });
1535
+ q.done = true;
1536
+ if (q.errors.length) {
1537
+ q.callback(q.errors);
1538
+ } else {
1539
+ q.callback();
1540
+ }
1541
+ }
1542
+ });
1543
+ this.emit('loaded', loaded);
1544
+ this.queue = this.queue.filter(q => !q.done);
1545
+ }
1546
+ read(lng, ns, fcName, tried = 0, wait = this.retryTimeout, callback) {
1547
+ if (!lng.length) return callback(null, {});
1548
+ if (this.readingCalls >= this.maxParallelReads) {
1549
+ this.waitingReads.push({
1550
+ lng,
1551
+ ns,
1552
+ fcName,
1553
+ tried,
1554
+ wait,
1555
+ callback
1556
+ });
1557
+ return;
1558
+ }
1559
+ this.readingCalls++;
1560
+ const resolver = (err, data) => {
1561
+ this.readingCalls--;
1562
+ if (this.waitingReads.length > 0) {
1563
+ const next = this.waitingReads.shift();
1564
+ this.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);
1565
+ }
1566
+ if (err && data && tried < this.maxRetries) {
1567
+ setTimeout(() => {
1568
+ this.read(lng, ns, fcName, tried + 1, wait * 2, callback);
1569
+ }, wait);
1570
+ return;
1571
+ }
1572
+ callback(err, data);
1573
+ };
1574
+ const fc = this.backend[fcName].bind(this.backend);
1575
+ if (fc.length === 2) {
1576
+ try {
1577
+ const r = fc(lng, ns);
1578
+ if (r && typeof r.then === 'function') {
1579
+ r.then(data => resolver(null, data)).catch(resolver);
1580
+ } else {
1581
+ resolver(null, r);
1582
+ }
1583
+ } catch (err) {
1584
+ resolver(err);
1585
+ }
1586
+ return;
1587
+ }
1588
+ return fc(lng, ns, resolver);
1589
+ }
1590
+ prepareLoading(languages, namespaces, options = {}, callback) {
1591
+ if (!this.backend) {
1592
+ this.logger.warn('No backend was added via i18next.use. Will not load resources.');
1593
+ return callback && callback();
1594
+ }
1595
+ if (isString(languages)) languages = this.languageUtils.toResolveHierarchy(languages);
1596
+ if (isString(namespaces)) namespaces = [namespaces];
1597
+ const toLoad = this.queueLoad(languages, namespaces, options, callback);
1598
+ if (!toLoad.toLoad.length) {
1599
+ if (!toLoad.pending.length) callback();
1600
+ return null;
1601
+ }
1602
+ toLoad.toLoad.forEach(name => {
1603
+ this.loadOne(name);
1604
+ });
1605
+ }
1606
+ load(languages, namespaces, callback) {
1607
+ this.prepareLoading(languages, namespaces, {}, callback);
1608
+ }
1609
+ reload(languages, namespaces, callback) {
1610
+ this.prepareLoading(languages, namespaces, {
1611
+ reload: true
1612
+ }, callback);
1613
+ }
1614
+ loadOne(name, prefix = '') {
1615
+ const s = name.split('|');
1616
+ const lng = s[0];
1617
+ const ns = s[1];
1618
+ this.read(lng, ns, 'read', undefined, undefined, (err, data) => {
1619
+ if (err) this.logger.warn(`${prefix}loading namespace ${ns} for language ${lng} failed`, err);
1620
+ if (!err && data) this.logger.log(`${prefix}loaded namespace ${ns} for language ${lng}`, data);
1621
+ this.loaded(name, err, data);
1622
+ });
1623
+ }
1624
+ saveMissing(languages, namespace, key, fallbackValue, isUpdate, options = {}, clb = () => {}) {
1625
+ if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(namespace)) {
1626
+ this.logger.warn(`did not save key "${key}" as the namespace "${namespace}" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');
1627
+ return;
1628
+ }
1629
+ if (key === undefined || key === null || key === '') return;
1630
+ if (this.backend?.create) {
1631
+ const opts = {
1632
+ ...options,
1633
+ isUpdate
1634
+ };
1635
+ const fc = this.backend.create.bind(this.backend);
1636
+ if (fc.length < 6) {
1637
+ try {
1638
+ let r;
1639
+ if (fc.length === 5) {
1640
+ r = fc(languages, namespace, key, fallbackValue, opts);
1641
+ } else {
1642
+ r = fc(languages, namespace, key, fallbackValue);
1643
+ }
1644
+ if (r && typeof r.then === 'function') {
1645
+ r.then(data => clb(null, data)).catch(clb);
1646
+ } else {
1647
+ clb(null, r);
1648
+ }
1649
+ } catch (err) {
1650
+ clb(err);
1651
+ }
1652
+ } else {
1653
+ fc(languages, namespace, key, fallbackValue, clb, opts);
1654
+ }
1655
+ }
1656
+ if (!languages || !languages[0]) return;
1657
+ this.store.addResource(languages[0], namespace, key, fallbackValue);
1658
+ }
1659
+ }
1660
+
1661
+ const get = () => ({
1662
+ debug: false,
1663
+ initAsync: true,
1664
+ ns: ['translation'],
1665
+ defaultNS: ['translation'],
1666
+ fallbackLng: ['dev'],
1667
+ fallbackNS: false,
1668
+ supportedLngs: false,
1669
+ nonExplicitSupportedLngs: false,
1670
+ load: 'all',
1671
+ preload: false,
1672
+ keySeparator: '.',
1673
+ nsSeparator: ':',
1674
+ pluralSeparator: '_',
1675
+ contextSeparator: '_',
1676
+ enableSelector: false,
1677
+ partialBundledLanguages: false,
1678
+ saveMissing: false,
1679
+ updateMissing: false,
1680
+ saveMissingTo: 'fallback',
1681
+ saveMissingPlurals: true,
1682
+ missingKeyHandler: false,
1683
+ missingInterpolationHandler: false,
1684
+ postProcess: false,
1685
+ postProcessPassResolved: false,
1686
+ returnNull: false,
1687
+ returnEmptyString: true,
1688
+ returnObjects: false,
1689
+ joinArrays: false,
1690
+ returnedObjectHandler: false,
1691
+ parseMissingKeyHandler: false,
1692
+ appendNamespaceToMissingKey: false,
1693
+ appendNamespaceToCIMode: false,
1694
+ overloadTranslationOptionHandler: args => {
1695
+ let ret = {};
1696
+ if (typeof args[1] === 'object') ret = args[1];
1697
+ if (isString(args[1])) ret.defaultValue = args[1];
1698
+ if (isString(args[2])) ret.tDescription = args[2];
1699
+ if (typeof args[2] === 'object' || typeof args[3] === 'object') {
1700
+ const options = args[3] || args[2];
1701
+ Object.keys(options).forEach(key => {
1702
+ ret[key] = options[key];
1703
+ });
1704
+ }
1705
+ return ret;
1706
+ },
1707
+ interpolation: {
1708
+ escapeValue: true,
1709
+ prefix: '{{',
1710
+ suffix: '}}',
1711
+ formatSeparator: ',',
1712
+ unescapePrefix: '-',
1713
+ nestingPrefix: '$t(',
1714
+ nestingSuffix: ')',
1715
+ nestingOptionsSeparator: ',',
1716
+ maxReplaces: 1000,
1717
+ skipOnVariables: true
1718
+ },
1719
+ cacheInBuiltFormats: true
1720
+ });
1721
+ const transformOptions = options => {
1722
+ if (isString(options.ns)) options.ns = [options.ns];
1723
+ if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];
1724
+ if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];
1725
+ if (options.supportedLngs && !options.supportedLngs.includes('cimode')) {
1726
+ options.supportedLngs = options.supportedLngs.concat(['cimode']);
1727
+ }
1728
+ return options;
1729
+ };
1730
+
1731
+ const noop = () => {};
1732
+ const bindMemberFunctions = inst => {
1733
+ const mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));
1734
+ mems.forEach(mem => {
1735
+ if (typeof inst[mem] === 'function') {
1736
+ inst[mem] = inst[mem].bind(inst);
1737
+ }
1738
+ });
1739
+ };
1740
+ class I18n extends EventEmitter {
1741
+ constructor(options = {}, callback) {
1742
+ super();
1743
+ this.options = transformOptions(options);
1744
+ this.services = {};
1745
+ this.logger = baseLogger;
1746
+ this.modules = {
1747
+ external: []
1748
+ };
1749
+ bindMemberFunctions(this);
1750
+ if (callback && !this.isInitialized && !options.isClone) {
1751
+ if (!this.options.initAsync) {
1752
+ this.init(options, callback);
1753
+ return this;
1754
+ }
1755
+ setTimeout(() => {
1756
+ this.init(options, callback);
1757
+ }, 0);
1758
+ }
1759
+ }
1760
+ init(options = {}, callback) {
1761
+ this.isInitializing = true;
1762
+ if (typeof options === 'function') {
1763
+ callback = options;
1764
+ options = {};
1765
+ }
1766
+ if (options.defaultNS == null && options.ns) {
1767
+ if (isString(options.ns)) {
1768
+ options.defaultNS = options.ns;
1769
+ } else if (!options.ns.includes('translation')) {
1770
+ options.defaultNS = options.ns[0];
1771
+ }
1772
+ }
1773
+ const defOpts = get();
1774
+ this.options = {
1775
+ ...defOpts,
1776
+ ...this.options,
1777
+ ...transformOptions(options)
1778
+ };
1779
+ this.options.interpolation = {
1780
+ ...defOpts.interpolation,
1781
+ ...this.options.interpolation
1782
+ };
1783
+ if (options.keySeparator !== undefined) {
1784
+ this.options.userDefinedKeySeparator = options.keySeparator;
1785
+ }
1786
+ if (options.nsSeparator !== undefined) {
1787
+ this.options.userDefinedNsSeparator = options.nsSeparator;
1788
+ }
1789
+ if (typeof this.options.overloadTranslationOptionHandler !== 'function') {
1790
+ this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;
1791
+ }
1792
+ const createClassOnDemand = ClassOrObject => {
1793
+ if (!ClassOrObject) return null;
1794
+ if (typeof ClassOrObject === 'function') return new ClassOrObject();
1795
+ return ClassOrObject;
1796
+ };
1797
+ if (!this.options.isClone) {
1798
+ if (this.modules.logger) {
1799
+ baseLogger.init(createClassOnDemand(this.modules.logger), this.options);
1800
+ } else {
1801
+ baseLogger.init(null, this.options);
1802
+ }
1803
+ let formatter;
1804
+ if (this.modules.formatter) {
1805
+ formatter = this.modules.formatter;
1806
+ } else {
1807
+ formatter = Formatter;
1808
+ }
1809
+ const lu = new LanguageUtil(this.options);
1810
+ this.store = new ResourceStore(this.options.resources, this.options);
1811
+ const s = this.services;
1812
+ s.logger = baseLogger;
1813
+ s.resourceStore = this.store;
1814
+ s.languageUtils = lu;
1815
+ s.pluralResolver = new PluralResolver(lu, {
1816
+ prepend: this.options.pluralSeparator
1817
+ });
1818
+ if (formatter) {
1819
+ s.formatter = createClassOnDemand(formatter);
1820
+ if (s.formatter.init) s.formatter.init(s, this.options);
1821
+ this.options.interpolation.format = s.formatter.format.bind(s.formatter);
1822
+ }
1823
+ s.interpolator = new Interpolator(this.options);
1824
+ s.utils = {
1825
+ hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
1826
+ };
1827
+ s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);
1828
+ s.backendConnector.on('*', (event, ...args) => {
1829
+ this.emit(event, ...args);
1830
+ });
1831
+ if (this.modules.languageDetector) {
1832
+ s.languageDetector = createClassOnDemand(this.modules.languageDetector);
1833
+ if (s.languageDetector.init) s.languageDetector.init(s, this.options.detection, this.options);
1834
+ }
1835
+ if (this.modules.i18nFormat) {
1836
+ s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);
1837
+ if (s.i18nFormat.init) s.i18nFormat.init(this);
1838
+ }
1839
+ this.translator = new Translator(this.services, this.options);
1840
+ this.translator.on('*', (event, ...args) => {
1841
+ this.emit(event, ...args);
1842
+ });
1843
+ this.modules.external.forEach(m => {
1844
+ if (m.init) m.init(this);
1845
+ });
1846
+ }
1847
+ this.format = this.options.interpolation.format;
1848
+ if (!callback) callback = noop;
1849
+ if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1850
+ const codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1851
+ if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];
1852
+ }
1853
+ if (!this.services.languageDetector && !this.options.lng) {
1854
+ this.logger.warn('init: no languageDetector is used and no lng is defined');
1855
+ }
1856
+ const storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];
1857
+ storeApi.forEach(fcName => {
1858
+ this[fcName] = (...args) => this.store[fcName](...args);
1859
+ });
1860
+ const storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];
1861
+ storeApiChained.forEach(fcName => {
1862
+ this[fcName] = (...args) => {
1863
+ this.store[fcName](...args);
1864
+ return this;
1865
+ };
1866
+ });
1867
+ const deferred = defer();
1868
+ const load = () => {
1869
+ const finish = (err, t) => {
1870
+ this.isInitializing = false;
1871
+ if (this.isInitialized && !this.initializedStoreOnce) this.logger.warn('init: i18next is already initialized. You should call init just once!');
1872
+ this.isInitialized = true;
1873
+ if (!this.options.isClone) this.logger.log('initialized', this.options);
1874
+ this.emit('initialized', this.options);
1875
+ deferred.resolve(t);
1876
+ callback(err, t);
1877
+ };
1878
+ if ((this.languages || this.isLanguageChangingTo) && !this.isInitialized) return finish(null, this.t.bind(this));
1879
+ this.changeLanguage(this.options.lng, finish);
1880
+ };
1881
+ if (this.options.resources || !this.options.initAsync) {
1882
+ load();
1883
+ } else {
1884
+ setTimeout(load, 0);
1885
+ }
1886
+ return deferred;
1887
+ }
1888
+ loadResources(language, callback = noop) {
1889
+ let usedCallback = callback;
1890
+ const usedLng = isString(language) ? language : this.language;
1891
+ if (typeof language === 'function') usedCallback = language;
1892
+ if (!this.options.resources || this.options.partialBundledLanguages) {
1893
+ if (usedLng?.toLowerCase() === 'cimode' && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();
1894
+ const toLoad = [];
1895
+ const append = lng => {
1896
+ if (!lng) return;
1897
+ if (lng === 'cimode') return;
1898
+ const lngs = this.services.languageUtils.toResolveHierarchy(lng);
1899
+ lngs.forEach(l => {
1900
+ if (l === 'cimode') return;
1901
+ if (!toLoad.includes(l)) toLoad.push(l);
1902
+ });
1903
+ };
1904
+ if (!usedLng) {
1905
+ const fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1906
+ fallbacks.forEach(l => append(l));
1907
+ } else {
1908
+ append(usedLng);
1909
+ }
1910
+ this.options.preload?.forEach?.(l => append(l));
1911
+ this.services.backendConnector.load(toLoad, this.options.ns, e => {
1912
+ if (!e && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);
1913
+ usedCallback(e);
1914
+ });
1915
+ } else {
1916
+ usedCallback(null);
1917
+ }
1918
+ }
1919
+ reloadResources(lngs, ns, callback) {
1920
+ const deferred = defer();
1921
+ if (typeof lngs === 'function') {
1922
+ callback = lngs;
1923
+ lngs = undefined;
1924
+ }
1925
+ if (typeof ns === 'function') {
1926
+ callback = ns;
1927
+ ns = undefined;
1928
+ }
1929
+ if (!lngs) lngs = this.languages;
1930
+ if (!ns) ns = this.options.ns;
1931
+ if (!callback) callback = noop;
1932
+ this.services.backendConnector.reload(lngs, ns, err => {
1933
+ deferred.resolve();
1934
+ callback(err);
1935
+ });
1936
+ return deferred;
1937
+ }
1938
+ use(module) {
1939
+ if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');
1940
+ if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');
1941
+ if (module.type === 'backend') {
1942
+ this.modules.backend = module;
1943
+ }
1944
+ if (module.type === 'logger' || module.log && module.warn && module.error) {
1945
+ this.modules.logger = module;
1946
+ }
1947
+ if (module.type === 'languageDetector') {
1948
+ this.modules.languageDetector = module;
1949
+ }
1950
+ if (module.type === 'i18nFormat') {
1951
+ this.modules.i18nFormat = module;
1952
+ }
1953
+ if (module.type === 'postProcessor') {
1954
+ postProcessor.addPostProcessor(module);
1955
+ }
1956
+ if (module.type === 'formatter') {
1957
+ this.modules.formatter = module;
1958
+ }
1959
+ if (module.type === '3rdParty') {
1960
+ this.modules.external.push(module);
1961
+ }
1962
+ return this;
1963
+ }
1964
+ setResolvedLanguage(l) {
1965
+ if (!l || !this.languages) return;
1966
+ if (['cimode', 'dev'].includes(l)) return;
1967
+ for (let li = 0; li < this.languages.length; li++) {
1968
+ const lngInLngs = this.languages[li];
1969
+ if (['cimode', 'dev'].includes(lngInLngs)) continue;
1970
+ if (this.store.hasLanguageSomeTranslations(lngInLngs)) {
1971
+ this.resolvedLanguage = lngInLngs;
1972
+ break;
1973
+ }
1974
+ }
1975
+ if (!this.resolvedLanguage && !this.languages.includes(l) && this.store.hasLanguageSomeTranslations(l)) {
1976
+ this.resolvedLanguage = l;
1977
+ this.languages.unshift(l);
1978
+ }
1979
+ }
1980
+ changeLanguage(lng, callback) {
1981
+ this.isLanguageChangingTo = lng;
1982
+ const deferred = defer();
1983
+ this.emit('languageChanging', lng);
1984
+ const setLngProps = l => {
1985
+ this.language = l;
1986
+ this.languages = this.services.languageUtils.toResolveHierarchy(l);
1987
+ this.resolvedLanguage = undefined;
1988
+ this.setResolvedLanguage(l);
1989
+ };
1990
+ const done = (err, l) => {
1991
+ if (l) {
1992
+ if (this.isLanguageChangingTo === lng) {
1993
+ setLngProps(l);
1994
+ this.translator.changeLanguage(l);
1995
+ this.isLanguageChangingTo = undefined;
1996
+ this.emit('languageChanged', l);
1997
+ this.logger.log('languageChanged', l);
1998
+ }
1999
+ } else {
2000
+ this.isLanguageChangingTo = undefined;
2001
+ }
2002
+ deferred.resolve((...args) => this.t(...args));
2003
+ if (callback) callback(err, (...args) => this.t(...args));
2004
+ };
2005
+ const setLng = lngs => {
2006
+ if (!lng && !lngs && this.services.languageDetector) lngs = [];
2007
+ const fl = isString(lngs) ? lngs : lngs && lngs[0];
2008
+ const l = this.store.hasLanguageSomeTranslations(fl) ? fl : this.services.languageUtils.getBestMatchFromCodes(isString(lngs) ? [lngs] : lngs);
2009
+ if (l) {
2010
+ if (!this.language) {
2011
+ setLngProps(l);
2012
+ }
2013
+ if (!this.translator.language) this.translator.changeLanguage(l);
2014
+ this.services.languageDetector?.cacheUserLanguage?.(l);
2015
+ }
2016
+ this.loadResources(l, err => {
2017
+ done(err, l);
2018
+ });
2019
+ };
2020
+ if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {
2021
+ setLng(this.services.languageDetector.detect());
2022
+ } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {
2023
+ if (this.services.languageDetector.detect.length === 0) {
2024
+ this.services.languageDetector.detect().then(setLng);
2025
+ } else {
2026
+ this.services.languageDetector.detect(setLng);
2027
+ }
2028
+ } else {
2029
+ setLng(lng);
2030
+ }
2031
+ return deferred;
2032
+ }
2033
+ getFixedT(lng, ns, keyPrefix, fixedOpts) {
2034
+ const scopeNs = fixedOpts?.scopeNs;
2035
+ const fixedT = (key, opts, ...rest) => {
2036
+ let o;
2037
+ if (typeof opts !== 'object') {
2038
+ o = this.options.overloadTranslationOptionHandler([key, opts].concat(rest));
2039
+ } else {
2040
+ o = {
2041
+ ...opts
2042
+ };
2043
+ }
2044
+ o.lng = o.lng || fixedT.lng;
2045
+ o.lngs = o.lngs || fixedT.lngs;
2046
+ const explicitCallNs = o.ns !== undefined && o.ns !== null;
2047
+ o.ns = o.ns || fixedT.ns;
2048
+ if (o.keyPrefix !== '') o.keyPrefix = o.keyPrefix || keyPrefix || fixedT.keyPrefix;
2049
+ const selectorOpts = {
2050
+ ...this.options,
2051
+ ...o
2052
+ };
2053
+ if (Array.isArray(scopeNs) && !explicitCallNs) selectorOpts.ns = scopeNs;
2054
+ if (typeof o.keyPrefix === 'function') o.keyPrefix = keysFromSelector(o.keyPrefix, selectorOpts);
2055
+ const keySeparator = this.options.keySeparator || '.';
2056
+ let resultKey;
2057
+ if (o.keyPrefix && Array.isArray(key)) {
2058
+ resultKey = key.map(k => {
2059
+ if (typeof k === 'function') k = keysFromSelector(k, selectorOpts);
2060
+ return `${o.keyPrefix}${keySeparator}${k}`;
2061
+ });
2062
+ } else {
2063
+ if (typeof key === 'function') key = keysFromSelector(key, selectorOpts);
2064
+ resultKey = o.keyPrefix ? `${o.keyPrefix}${keySeparator}${key}` : key;
2065
+ }
2066
+ return this.t(resultKey, o);
2067
+ };
2068
+ if (isString(lng)) {
2069
+ fixedT.lng = lng;
2070
+ } else {
2071
+ fixedT.lngs = lng;
2072
+ }
2073
+ fixedT.ns = ns;
2074
+ fixedT.keyPrefix = keyPrefix;
2075
+ return fixedT;
2076
+ }
2077
+ t(...args) {
2078
+ return this.translator?.translate(...args);
2079
+ }
2080
+ exists(...args) {
2081
+ return this.translator?.exists(...args);
2082
+ }
2083
+ setDefaultNamespace(ns) {
2084
+ this.options.defaultNS = ns;
2085
+ }
2086
+ hasLoadedNamespace(ns, options = {}) {
2087
+ if (!this.isInitialized) {
2088
+ this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);
2089
+ return false;
2090
+ }
2091
+ if (!this.languages || !this.languages.length) {
2092
+ this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);
2093
+ return false;
2094
+ }
2095
+ const lng = options.lng || this.resolvedLanguage || this.languages[0];
2096
+ const fallbackLng = this.options ? this.options.fallbackLng : false;
2097
+ const lastLng = this.languages[this.languages.length - 1];
2098
+ if (lng.toLowerCase() === 'cimode') return true;
2099
+ const loadNotPending = (l, n) => {
2100
+ const loadState = this.services.backendConnector.state[`${l}|${n}`];
2101
+ return loadState === -1 || loadState === 0 || loadState === 2;
2102
+ };
2103
+ if (options.precheck) {
2104
+ const preResult = options.precheck(this, loadNotPending);
2105
+ if (preResult !== undefined) return preResult;
2106
+ }
2107
+ if (this.hasResourceBundle(lng, ns)) return true;
2108
+ if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;
2109
+ if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
2110
+ return false;
2111
+ }
2112
+ loadNamespaces(ns, callback) {
2113
+ const deferred = defer();
2114
+ if (!this.options.ns) {
2115
+ if (callback) callback();
2116
+ return Promise.resolve();
2117
+ }
2118
+ if (isString(ns)) ns = [ns];
2119
+ ns.forEach(n => {
2120
+ if (!this.options.ns.includes(n)) this.options.ns.push(n);
2121
+ });
2122
+ this.loadResources(err => {
2123
+ deferred.resolve();
2124
+ if (callback) callback(err);
2125
+ });
2126
+ return deferred;
2127
+ }
2128
+ loadLanguages(lngs, callback) {
2129
+ const deferred = defer();
2130
+ if (isString(lngs)) lngs = [lngs];
2131
+ const preloaded = this.options.preload || [];
2132
+ const newLngs = lngs.filter(lng => !preloaded.includes(lng) && this.services.languageUtils.isSupportedCode(lng));
2133
+ if (!newLngs.length) {
2134
+ if (callback) callback();
2135
+ return Promise.resolve();
2136
+ }
2137
+ this.options.preload = preloaded.concat(newLngs);
2138
+ this.loadResources(err => {
2139
+ deferred.resolve();
2140
+ if (callback) callback(err);
2141
+ });
2142
+ return deferred;
2143
+ }
2144
+ dir(lng) {
2145
+ if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);
2146
+ if (!lng) return 'rtl';
2147
+ try {
2148
+ const l = new Intl.Locale(lng);
2149
+ if (l && l.getTextInfo) {
2150
+ const ti = l.getTextInfo();
2151
+ if (ti && ti.direction) return ti.direction;
2152
+ }
2153
+ } catch (e) {}
2154
+ const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];
2155
+ const languageUtils = this.services?.languageUtils || new LanguageUtil(get());
2156
+ if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';
2157
+ return rtlLngs.includes(languageUtils.getLanguagePartFromCode(lng)) || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';
2158
+ }
2159
+ static createInstance(options = {}, callback) {
2160
+ const instance = new I18n(options, callback);
2161
+ instance.createInstance = I18n.createInstance;
2162
+ return instance;
2163
+ }
2164
+ cloneInstance(options = {}, callback = noop) {
2165
+ const forkResourceStore = options.forkResourceStore;
2166
+ if (forkResourceStore) delete options.forkResourceStore;
2167
+ const mergedOptions = {
2168
+ ...this.options,
2169
+ ...options,
2170
+ ...{
2171
+ isClone: true
2172
+ }
2173
+ };
2174
+ const clone = new I18n(mergedOptions);
2175
+ if (options.debug !== undefined || options.prefix !== undefined) {
2176
+ clone.logger = clone.logger.clone(options);
2177
+ }
2178
+ const membersToCopy = ['store', 'services', 'language'];
2179
+ membersToCopy.forEach(m => {
2180
+ clone[m] = this[m];
2181
+ });
2182
+ clone.services = {
2183
+ ...this.services
2184
+ };
2185
+ clone.services.utils = {
2186
+ hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
2187
+ };
2188
+ if (forkResourceStore) {
2189
+ const clonedData = Object.keys(this.store.data).reduce((prev, l) => {
2190
+ prev[l] = {
2191
+ ...this.store.data[l]
2192
+ };
2193
+ prev[l] = Object.keys(prev[l]).reduce((acc, n) => {
2194
+ acc[n] = {
2195
+ ...prev[l][n]
2196
+ };
2197
+ return acc;
2198
+ }, prev[l]);
2199
+ return prev;
2200
+ }, {});
2201
+ clone.store = new ResourceStore(clonedData, mergedOptions);
2202
+ clone.services.resourceStore = clone.store;
2203
+ }
2204
+ if (options.interpolation) {
2205
+ const defOpts = get();
2206
+ const mergedInterpolation = {
2207
+ ...defOpts.interpolation,
2208
+ ...this.options.interpolation,
2209
+ ...options.interpolation
2210
+ };
2211
+ const mergedForInterpolator = {
2212
+ ...mergedOptions,
2213
+ interpolation: mergedInterpolation
2214
+ };
2215
+ clone.services.interpolator = new Interpolator(mergedForInterpolator);
2216
+ }
2217
+ clone.translator = new Translator(clone.services, mergedOptions);
2218
+ clone.translator.on('*', (event, ...args) => {
2219
+ clone.emit(event, ...args);
2220
+ });
2221
+ clone.init(mergedOptions, callback);
2222
+ clone.translator.options = mergedOptions;
2223
+ clone.translator.backendConnector.services.utils = {
2224
+ hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
2225
+ };
2226
+ return clone;
2227
+ }
2228
+ toJSON() {
2229
+ return {
2230
+ options: this.options,
2231
+ store: this.store,
2232
+ language: this.language,
2233
+ languages: this.languages,
2234
+ resolvedLanguage: this.resolvedLanguage
2235
+ };
2236
+ }
2237
+ }
2238
+ const instance = I18n.createInstance();
2239
+
2240
+ /** Texte der Fink-Komponenten. Deutsch ist die Ausgangssprache, Englisch die Übersetzung. */
2241
+ const de = {
2242
+ appShell: {
2243
+ skip: 'Zum Inhalt springen',
2244
+ openNav: 'Navigation öffnen',
2245
+ closeNav: 'Navigation schließen',
2246
+ nav: 'Hauptnavigation',
2247
+ compactNav: 'Navigation auf Symbole verkleinern',
2248
+ expandNav: 'Navigation mit Beschriftungen anzeigen',
2249
+ },
2250
+ statCard: { up: 'gestiegen um', down: 'gesunken um', flat: 'unverändert' },
2251
+ barChart: { labelHeader: 'Bezeichnung', valueHeader: 'Wert' },
2252
+ stepper: { label: 'Fortschritt', done: 'abgeschlossen', current: 'aktueller Schritt', todo: 'ausstehend' },
2253
+ chip: { remove: '{{label}} entfernen' },
2254
+ selectionBar: { region: 'Massenaktionen', selected: '{{count}} {{items}} ausgewählt', items: 'Einträge', clear: 'Auswahl aufheben' },
2255
+ timeline: { label: 'Verlauf' },
2256
+ result: { reference: 'Ihre Vorgangsnummer' },
2257
+ footer: { legal: 'Rechtliches' },
2258
+ fileUpload: {
2259
+ drop: 'Dateien hierher ziehen oder',
2260
+ chooseMany: 'Dateien auswählen',
2261
+ chooseOne: 'Datei auswählen',
2262
+ list: 'Ausgewählte Dateien',
2263
+ remove: '{{name}} entfernen',
2264
+ tooLarge: 'Die Datei ist größer als {{size}}.',
2265
+ wrongType: 'Dieses Dateiformat ist nicht erlaubt ({{accept}}).',
2266
+ added_one: '{{count}} Datei hinzugefügt',
2267
+ added_other: '{{count}} Dateien hinzugefügt',
2268
+ invalid: ', davon {{count}} mit Fehler',
2269
+ removed: '{{name}} entfernt.',
2270
+ },
2271
+ taskList: {
2272
+ progress: '{{done}} von {{total}} Aufgaben erledigt',
2273
+ done: 'Erledigt',
2274
+ inProgress: 'In Bearbeitung',
2275
+ todo: 'Offen',
2276
+ blocked: 'Noch nicht möglich',
2277
+ error: 'Fehler',
2278
+ },
2279
+ consent: {
2280
+ heading: 'Cookies auf dieser Website',
2281
+ description: 'Wir verwenden notwendige Cookies, damit die Website funktioniert. Mit Ihrer Zustimmung nutzen wir weitere Cookies, um das Angebot zu verbessern.',
2282
+ categories: 'Cookie-Kategorien',
2283
+ necessary: 'Notwendig',
2284
+ necessaryHint: 'Sitzung, Sicherheit und Ihre Cookie-Auswahl.',
2285
+ statistics: 'Statistik',
2286
+ statisticsHint: 'Anonyme Nutzungsstatistik zur Verbesserung des Angebots.',
2287
+ comfort: 'Komfort',
2288
+ comfortHint: 'Gespeicherte Einstellungen wie Sprache und Darstellung.',
2289
+ acceptAll: 'Alle akzeptieren',
2290
+ necessaryOnly: 'Nur notwendige',
2291
+ save: 'Auswahl speichern',
2292
+ settings: 'Einstellungen',
2293
+ },
2294
+ feedback: {
2295
+ region: 'Feedback zur Seite',
2296
+ question: 'War diese Seite hilfreich?',
2297
+ yes: 'Ja',
2298
+ no: 'Nein',
2299
+ improve: 'Was können wir verbessern?',
2300
+ hint: 'Bitte keine persönlichen Daten angeben.',
2301
+ send: 'Feedback senden',
2302
+ cancel: 'Abbrechen',
2303
+ thanks: 'Vielen Dank für Ihr Feedback!',
2304
+ },
2305
+ rating: { star_one: '{{count}} Stern', star_other: '{{count}} Sterne', summary: '{{label}}: {{value}} von {{max}} Sternen' },
2306
+ bottomNav: { label: 'Hauptbereiche', new: '{{count}} neu' },
2307
+ codeBlock: { variants: 'Code-Varianten', copy: 'Kopieren', copied: 'Kopiert', status: 'Code in die Zwischenablage kopiert', region: 'Code ({{name}})' },
2308
+ skeleton: { loading: 'Inhalte werden geladen' },
2309
+ list: { badge_one: '{{count}} neu', badge_other: '{{count}} neu' },
2310
+ avatarGroup: { summary: '{{label}}: {{count}} Personen ({{names}})' },
2311
+ tagInput: {
2312
+ hint: 'Mit Enter oder Komma übernehmen, Rücktaste entfernt den letzten Eintrag.',
2313
+ selected: 'Ausgewählt für {{label}}',
2314
+ added: '{{value}} hinzugefügt',
2315
+ removed: '{{value}} entfernt',
2316
+ duplicate: '{{value}} ist bereits ausgewählt.',
2317
+ notAllowed: '{{value}} steht nicht zur Auswahl.',
2318
+ max: 'Höchstens {{count}} Einträge möglich.',
2319
+ },
2320
+ backToTop: { label: 'Nach oben' },
2321
+ fab: { close: 'Aktionen schließen' },
2322
+ rangeSlider: { from: '{{label}}: Minimum', to: '{{label}}: Maximum', fromShort: 'Von', toShort: 'Bis' },
2323
+ calendar: { prev: 'Vorheriger Monat', next: 'Nächster Monat' },
2324
+ carousel: {
2325
+ carousel: 'Karussell',
2326
+ slide: 'Folie',
2327
+ slides: 'Folien',
2328
+ position: '{{index}} von {{count}}',
2329
+ prev: 'Vorherige Folie',
2330
+ next: 'Nächste Folie',
2331
+ play: 'Automatisches Weiterschalten starten',
2332
+ pause: 'Automatisches Weiterschalten anhalten',
2333
+ choose: 'Folie wählen',
2334
+ goTo: 'Folie {{index}}',
2335
+ },
2336
+ otp: { digit: 'Stelle {{index}} von {{count}}' },
2337
+ transfer: {
2338
+ source: 'Verfügbar',
2339
+ target: 'Ausgewählt',
2340
+ selectAll: 'Alle in {{label}} auswählen',
2341
+ count: '{{selected}}/{{total}} gewählt',
2342
+ search: '{{label}} durchsuchen',
2343
+ searchPlaceholder: 'Liste filtern',
2344
+ empty: 'Keine Einträge',
2345
+ right_one: '{{count}} Eintrag hinzufügen',
2346
+ right_other: '{{count}} Einträge hinzufügen',
2347
+ left_one: '{{count}} Eintrag entfernen',
2348
+ left_other: '{{count}} Einträge entfernen',
2349
+ movedRight_one: '{{count}} Eintrag hinzugefügt',
2350
+ movedRight_other: '{{count}} Einträge hinzugefügt',
2351
+ movedLeft_one: '{{count}} Eintrag entfernt',
2352
+ movedLeft_other: '{{count}} Einträge entfernt',
2353
+ },
2354
+ toc: { label: 'Auf dieser Seite' },
2355
+ sparkline: { summary: '{{label}}: {{count}} Werte, von {{first}} auf {{last}}, Minimum {{min}}, Maximum {{max}}' },
2356
+ imageList: { open: '{{alt}} vergrößern', prev: 'Vorheriges Bild', next: 'Nächstes Bild', position: 'Bild {{index}} von {{count}}' },
2357
+ tour: { step: 'Schritt {{index}} von {{count}}', skip: 'Tour beenden', back: 'Zurück', next: 'Weiter', finish: 'Fertig' },
2358
+ virtualList: { region: '{{label}}, {{count}} Einträge', rendered: '{{shown}} von {{count}} Zeilen gerendert' },
2359
+ popconfirm: { confirm: 'Ja', cancel: 'Abbrechen' },
2360
+ infinite: { loading: 'Weitere Einträge werden geladen', done: 'Alle Einträge geladen', count: '{{count}} Einträge geladen', more: 'Mehr laden' },
2361
+ splitter: { label: 'Größe der Bereiche' },
2362
+ };
2363
+ const en = {
2364
+ appShell: {
2365
+ skip: 'Skip to content',
2366
+ openNav: 'Open navigation',
2367
+ closeNav: 'Close navigation',
2368
+ nav: 'Main navigation',
2369
+ compactNav: 'Collapse navigation to icons',
2370
+ expandNav: 'Show navigation with labels',
2371
+ },
2372
+ statCard: { up: 'up by', down: 'down by', flat: 'unchanged' },
2373
+ barChart: { labelHeader: 'Label', valueHeader: 'Value' },
2374
+ stepper: { label: 'Progress', done: 'completed', current: 'current step', todo: 'not started' },
2375
+ chip: { remove: 'Remove {{label}}' },
2376
+ selectionBar: { region: 'Bulk actions', selected: '{{count}} {{items}} selected', items: 'items', clear: 'Clear selection' },
2377
+ timeline: { label: 'History' },
2378
+ result: { reference: 'Your reference number' },
2379
+ footer: { legal: 'Legal' },
2380
+ fileUpload: {
2381
+ drop: 'Drag files here or',
2382
+ chooseMany: 'Choose files',
2383
+ chooseOne: 'Choose file',
2384
+ list: 'Selected files',
2385
+ remove: 'Remove {{name}}',
2386
+ tooLarge: 'The file is larger than {{size}}.',
2387
+ wrongType: 'This file type is not allowed ({{accept}}).',
2388
+ added_one: '{{count}} file added',
2389
+ added_other: '{{count}} files added',
2390
+ invalid: ', {{count}} with errors',
2391
+ removed: '{{name}} removed.',
2392
+ },
2393
+ taskList: {
2394
+ progress: '{{done}} of {{total}} tasks completed',
2395
+ done: 'Completed',
2396
+ inProgress: 'In progress',
2397
+ todo: 'Not started',
2398
+ blocked: 'Cannot start yet',
2399
+ error: 'Error',
2400
+ },
2401
+ consent: {
2402
+ heading: 'Cookies on this website',
2403
+ description: 'We use essential cookies to make this website work. With your consent we use additional cookies to improve the service.',
2404
+ categories: 'Cookie categories',
2405
+ necessary: 'Essential',
2406
+ necessaryHint: 'Session, security and your cookie choice.',
2407
+ statistics: 'Analytics',
2408
+ statisticsHint: 'Anonymous usage statistics to improve the service.',
2409
+ comfort: 'Preferences',
2410
+ comfortHint: 'Saved settings such as language and appearance.',
2411
+ acceptAll: 'Accept all',
2412
+ necessaryOnly: 'Essential only',
2413
+ save: 'Save choice',
2414
+ settings: 'Settings',
2415
+ },
2416
+ feedback: {
2417
+ region: 'Page feedback',
2418
+ question: 'Was this page helpful?',
2419
+ yes: 'Yes',
2420
+ no: 'No',
2421
+ improve: 'What could we improve?',
2422
+ hint: 'Please do not enter personal data.',
2423
+ send: 'Send feedback',
2424
+ cancel: 'Cancel',
2425
+ thanks: 'Thank you for your feedback!',
2426
+ },
2427
+ rating: { star_one: '{{count}} star', star_other: '{{count}} stars', summary: '{{label}}: {{value}} out of {{max}} stars' },
2428
+ bottomNav: { label: 'Main sections', new: '{{count}} new' },
2429
+ codeBlock: { variants: 'Code variants', copy: 'Copy', copied: 'Copied', status: 'Code copied to clipboard', region: 'Code ({{name}})' },
2430
+ skeleton: { loading: 'Loading content' },
2431
+ list: { badge_one: '{{count}} new', badge_other: '{{count}} new' },
2432
+ avatarGroup: { summary: '{{label}}: {{count}} people ({{names}})' },
2433
+ tagInput: {
2434
+ hint: 'Press Enter or comma to add, Backspace removes the last entry.',
2435
+ selected: 'Selected for {{label}}',
2436
+ added: '{{value}} added',
2437
+ removed: '{{value}} removed',
2438
+ duplicate: '{{value}} is already selected.',
2439
+ notAllowed: '{{value}} is not available.',
2440
+ max: 'At most {{count}} entries allowed.',
2441
+ },
2442
+ backToTop: { label: 'Back to top' },
2443
+ fab: { close: 'Close actions' },
2444
+ rangeSlider: { from: '{{label}}: minimum', to: '{{label}}: maximum', fromShort: 'From', toShort: 'To' },
2445
+ calendar: { prev: 'Previous month', next: 'Next month' },
2446
+ carousel: {
2447
+ carousel: 'Carousel',
2448
+ slide: 'Slide',
2449
+ slides: 'Slides',
2450
+ position: '{{index}} of {{count}}',
2451
+ prev: 'Previous slide',
2452
+ next: 'Next slide',
2453
+ play: 'Start automatic rotation',
2454
+ pause: 'Pause automatic rotation',
2455
+ choose: 'Choose slide',
2456
+ goTo: 'Slide {{index}}',
2457
+ },
2458
+ otp: { digit: 'Digit {{index}} of {{count}}' },
2459
+ transfer: {
2460
+ source: 'Available',
2461
+ target: 'Selected',
2462
+ selectAll: 'Select all in {{label}}',
2463
+ count: '{{selected}}/{{total}} selected',
2464
+ search: 'Search {{label}}',
2465
+ searchPlaceholder: 'Filter list',
2466
+ empty: 'No items',
2467
+ right_one: 'Add {{count}} item',
2468
+ right_other: 'Add {{count}} items',
2469
+ left_one: 'Remove {{count}} item',
2470
+ left_other: 'Remove {{count}} items',
2471
+ movedRight_one: '{{count}} item added',
2472
+ movedRight_other: '{{count}} items added',
2473
+ movedLeft_one: '{{count}} item removed',
2474
+ movedLeft_other: '{{count}} items removed',
2475
+ },
2476
+ toc: { label: 'On this page' },
2477
+ sparkline: { summary: '{{label}}: {{count}} values, from {{first}} to {{last}}, minimum {{min}}, maximum {{max}}' },
2478
+ imageList: { open: 'Enlarge {{alt}}', prev: 'Previous image', next: 'Next image', position: 'Image {{index}} of {{count}}' },
2479
+ tour: { step: 'Step {{index}} of {{count}}', skip: 'End tour', back: 'Back', next: 'Next', finish: 'Done' },
2480
+ virtualList: { region: '{{label}}, {{count}} items', rendered: '{{shown}} of {{count}} rows rendered' },
2481
+ popconfirm: { confirm: 'Yes', cancel: 'Cancel' },
2482
+ infinite: { loading: 'Loading more items', done: 'All items loaded', count: '{{count}} items loaded', more: 'Load more' },
2483
+ splitter: { label: 'Pane size' },
2484
+ };
2485
+
2486
+ const NS = 'fink';
2487
+ const normalize = (value) => (value?.toLowerCase().startsWith('de') ? 'de' : 'en');
2488
+ const documentLanguage = () => (typeof document === 'undefined' ? 'de' : normalize(document.documentElement.lang));
2489
+ /**
2490
+ * i18next-Instanz der Fink-Komponenten (Namespace „fink“). Die Sprache folgt dem lang-Attribut
2491
+ * von <html>; Anwendungen setzen sie dort oder über setFinkLanguage().
2492
+ */
2493
+ const finkI18n = instance.createInstance();
2494
+ finkI18n.init({
2495
+ lng: documentLanguage(),
2496
+ fallbackLng: 'en',
2497
+ supportedLngs: ['de', 'en'],
2498
+ ns: [NS],
2499
+ defaultNS: NS,
2500
+ resources: { de: { [NS]: de }, en: { [NS]: en } },
2501
+ interpolation: { escapeValue: false },
2502
+ initAsync: false,
2503
+ showSupportNotice: false,
2504
+ });
2505
+ if (typeof MutationObserver !== 'undefined' && typeof document !== 'undefined') {
2506
+ new MutationObserver(() => {
2507
+ const lng = documentLanguage();
2508
+ if (lng !== finkI18n.language)
2509
+ void finkI18n.changeLanguage(lng);
2510
+ }).observe(document.documentElement, { attributes: true, attributeFilter: ['lang'] });
2511
+ }
2512
+ /** Übersetzt einen Schlüssel aus dem Namespace „fink“. */
2513
+ const t = (key, options) => finkI18n.t(key, options);
2514
+ /** Aktuelle Sprache der Fink-Komponenten. */
2515
+ const getFinkLanguage = () => normalize(finkI18n.language);
2516
+ /** Setzt die Sprache der Fink-Komponenten (und das lang-Attribut des Dokuments). */
2517
+ const setFinkLanguage = (lng) => {
2518
+ if (typeof document !== 'undefined')
2519
+ document.documentElement.lang = lng;
2520
+ return finkI18n.changeLanguage(lng);
2521
+ };
2522
+ /** Ergänzt oder überschreibt Texte der Fink-Komponenten, z. B. für weitere Sprachen. */
2523
+ const addFinkTranslations = (lng, resources) => {
2524
+ finkI18n.addResourceBundle(lng, NS, resources, true, true);
2525
+ };
2526
+ /** Formatiert Zahlen in der aktuellen Sprache. */
2527
+ const formatNumber = (value, options) => value.toLocaleString(getFinkLanguage() === 'en' ? 'en-GB' : 'de-DE', options);
2528
+ /**
2529
+ * Hilfsfunktion für Komponenten: abonniert Sprachwechsel und liefert eine Abmeldefunktion.
2530
+ * Die Komponente setzt im Callback einen @State, damit sie neu rendert.
2531
+ */
2532
+ const onFinkLanguageChange = (callback) => {
2533
+ const handler = (lng) => callback(normalize(lng));
2534
+ finkI18n.on('languageChanged', handler);
2535
+ return () => finkI18n.off('languageChanged', handler);
2536
+ };
2537
+
2538
+ exports.addFinkTranslations = addFinkTranslations;
2539
+ exports.finkI18n = finkI18n;
2540
+ exports.formatNumber = formatNumber;
2541
+ exports.getFinkLanguage = getFinkLanguage;
2542
+ exports.onFinkLanguageChange = onFinkLanguageChange;
2543
+ exports.setFinkLanguage = setFinkLanguage;
2544
+ exports.t = t;