@intlayer/core 6.1.6-canary.0 → 7.0.0-canary.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 (600) hide show
  1. package/dist/cjs/_virtual/rolldown_runtime.cjs +25 -0
  2. package/dist/cjs/deepTransformPlugins/getFilterMissingTranslationsContent.cjs +213 -0
  3. package/dist/cjs/deepTransformPlugins/getFilterMissingTranslationsContent.cjs.map +1 -0
  4. package/dist/cjs/deepTransformPlugins/getFilterTranslationsOnlyContent.cjs +95 -0
  5. package/dist/cjs/deepTransformPlugins/getFilterTranslationsOnlyContent.cjs.map +1 -0
  6. package/dist/cjs/deepTransformPlugins/getFilteredLocalesContent.cjs +46 -0
  7. package/dist/cjs/deepTransformPlugins/getFilteredLocalesContent.cjs.map +1 -0
  8. package/dist/cjs/deepTransformPlugins/getLocalizedContent.cjs +33 -0
  9. package/dist/cjs/deepTransformPlugins/getLocalizedContent.cjs.map +1 -0
  10. package/dist/cjs/deepTransformPlugins/getMaskContent.cjs +27 -0
  11. package/dist/cjs/deepTransformPlugins/getMaskContent.cjs.map +1 -0
  12. package/dist/cjs/deepTransformPlugins/getMissingLocalesContent.cjs +45 -0
  13. package/dist/cjs/deepTransformPlugins/getMissingLocalesContent.cjs.map +1 -0
  14. package/dist/cjs/deepTransformPlugins/getReplacedValuesContent.cjs +60 -0
  15. package/dist/cjs/deepTransformPlugins/getReplacedValuesContent.cjs.map +1 -0
  16. package/dist/cjs/deepTransformPlugins/index.cjs +25 -0
  17. package/dist/cjs/deepTransformPlugins/insertContentInDictionary.cjs +107 -0
  18. package/dist/cjs/deepTransformPlugins/insertContentInDictionary.cjs.map +1 -0
  19. package/dist/cjs/dictionaryManipulator/editDictionaryByKeyPath.cjs +59 -91
  20. package/dist/cjs/dictionaryManipulator/editDictionaryByKeyPath.cjs.map +1 -1
  21. package/dist/cjs/dictionaryManipulator/getContentNodeByKeyPath.cjs +13 -39
  22. package/dist/cjs/dictionaryManipulator/getContentNodeByKeyPath.cjs.map +1 -1
  23. package/dist/cjs/dictionaryManipulator/getDefaultNode.cjs +48 -94
  24. package/dist/cjs/dictionaryManipulator/getDefaultNode.cjs.map +1 -1
  25. package/dist/cjs/dictionaryManipulator/getEmptyNode.cjs +24 -68
  26. package/dist/cjs/dictionaryManipulator/getEmptyNode.cjs.map +1 -1
  27. package/dist/cjs/dictionaryManipulator/getNodeChildren.cjs +21 -56
  28. package/dist/cjs/dictionaryManipulator/getNodeChildren.cjs.map +1 -1
  29. package/dist/cjs/dictionaryManipulator/getNodeType.cjs +32 -49
  30. package/dist/cjs/dictionaryManipulator/getNodeType.cjs.map +1 -1
  31. package/dist/cjs/dictionaryManipulator/getUnmergedDictionaryByKeyPath.cjs +18 -50
  32. package/dist/cjs/dictionaryManipulator/getUnmergedDictionaryByKeyPath.cjs.map +1 -1
  33. package/dist/cjs/dictionaryManipulator/index.cjs +28 -41
  34. package/dist/cjs/dictionaryManipulator/mergeDictionaries.cjs +69 -0
  35. package/dist/cjs/dictionaryManipulator/mergeDictionaries.cjs.map +1 -0
  36. package/dist/cjs/dictionaryManipulator/normalizeDictionary.cjs +30 -0
  37. package/dist/cjs/dictionaryManipulator/normalizeDictionary.cjs.map +1 -0
  38. package/dist/cjs/dictionaryManipulator/orderDictionaries.cjs +48 -0
  39. package/dist/cjs/dictionaryManipulator/orderDictionaries.cjs.map +1 -0
  40. package/dist/cjs/dictionaryManipulator/removeContentNodeByKeyPath.cjs +29 -54
  41. package/dist/cjs/dictionaryManipulator/removeContentNodeByKeyPath.cjs.map +1 -1
  42. package/dist/cjs/dictionaryManipulator/renameContentNodeByKeyPath.cjs +37 -63
  43. package/dist/cjs/dictionaryManipulator/renameContentNodeByKeyPath.cjs.map +1 -1
  44. package/dist/cjs/dictionaryManipulator/updateNodeChildren.cjs +36 -76
  45. package/dist/cjs/dictionaryManipulator/updateNodeChildren.cjs.map +1 -1
  46. package/dist/cjs/formatters/compact.cjs +24 -46
  47. package/dist/cjs/formatters/compact.cjs.map +1 -1
  48. package/dist/cjs/formatters/currency.cjs +28 -50
  49. package/dist/cjs/formatters/currency.cjs.map +1 -1
  50. package/dist/cjs/formatters/date.cjs +56 -79
  51. package/dist/cjs/formatters/date.cjs.map +1 -1
  52. package/dist/cjs/formatters/index.cjs +17 -37
  53. package/dist/cjs/formatters/list.cjs +29 -47
  54. package/dist/cjs/formatters/list.cjs.map +1 -1
  55. package/dist/cjs/formatters/number.cjs +17 -43
  56. package/dist/cjs/formatters/number.cjs.map +1 -1
  57. package/dist/cjs/formatters/percentage.cjs +22 -51
  58. package/dist/cjs/formatters/percentage.cjs.map +1 -1
  59. package/dist/cjs/formatters/relativeTime.cjs +28 -70
  60. package/dist/cjs/formatters/relativeTime.cjs.map +1 -1
  61. package/dist/cjs/formatters/units.cjs +22 -48
  62. package/dist/cjs/formatters/units.cjs.map +1 -1
  63. package/dist/cjs/getStorageAttributes.cjs +116 -0
  64. package/dist/cjs/getStorageAttributes.cjs.map +1 -0
  65. package/dist/cjs/index.cjs +154 -45
  66. package/dist/cjs/interpreter/getCondition.cjs +30 -30
  67. package/dist/cjs/interpreter/getCondition.cjs.map +1 -1
  68. package/dist/cjs/interpreter/getContent/deepTransform.cjs +38 -63
  69. package/dist/cjs/interpreter/getContent/deepTransform.cjs.map +1 -1
  70. package/dist/cjs/interpreter/getContent/getContent.cjs +31 -54
  71. package/dist/cjs/interpreter/getContent/getContent.cjs.map +1 -1
  72. package/dist/cjs/interpreter/getContent/index.cjs +13 -27
  73. package/dist/cjs/interpreter/getContent/plugins.cjs +135 -175
  74. package/dist/cjs/interpreter/getContent/plugins.cjs.map +1 -1
  75. package/dist/cjs/interpreter/getDictionary.cjs +21 -39
  76. package/dist/cjs/interpreter/getDictionary.cjs.map +1 -1
  77. package/dist/cjs/interpreter/getEnumeration.cjs +69 -42
  78. package/dist/cjs/interpreter/getEnumeration.cjs.map +1 -1
  79. package/dist/cjs/interpreter/getGender.cjs +33 -34
  80. package/dist/cjs/interpreter/getGender.cjs.map +1 -1
  81. package/dist/cjs/interpreter/getInsertion.cjs +18 -27
  82. package/dist/cjs/interpreter/getInsertion.cjs.map +1 -1
  83. package/dist/cjs/interpreter/getIntlayer.cjs +13 -48
  84. package/dist/cjs/interpreter/getIntlayer.cjs.map +1 -1
  85. package/dist/cjs/interpreter/getNesting.cjs +26 -41
  86. package/dist/cjs/interpreter/getNesting.cjs.map +1 -1
  87. package/dist/cjs/interpreter/getTranslation.cjs +29 -32
  88. package/dist/cjs/interpreter/getTranslation.cjs.map +1 -1
  89. package/dist/cjs/interpreter/index.cjs +26 -39
  90. package/dist/cjs/localization/getBrowserLocale.cjs +144 -0
  91. package/dist/cjs/localization/getBrowserLocale.cjs.map +1 -0
  92. package/dist/cjs/localization/getHTMLTextDir.cjs +49 -255
  93. package/dist/cjs/localization/getHTMLTextDir.cjs.map +1 -1
  94. package/dist/cjs/localization/getLocaleFromPath.cjs +40 -56
  95. package/dist/cjs/localization/getLocaleFromPath.cjs.map +1 -1
  96. package/dist/cjs/localization/getLocaleLang.cjs +18 -27
  97. package/dist/cjs/localization/getLocaleLang.cjs.map +1 -1
  98. package/dist/cjs/localization/getLocaleName.cjs +7 -32
  99. package/dist/cjs/localization/getLocaleName.cjs.map +1 -1
  100. package/dist/cjs/localization/getLocalizedUrl.cjs +46 -47
  101. package/dist/cjs/localization/getLocalizedUrl.cjs.map +1 -1
  102. package/dist/cjs/localization/getMultilingualUrls.cjs +69 -65
  103. package/dist/cjs/localization/getMultilingualUrls.cjs.map +1 -1
  104. package/dist/cjs/localization/getPathWithoutLocale.cjs +53 -61
  105. package/dist/cjs/localization/getPathWithoutLocale.cjs.map +1 -1
  106. package/dist/cjs/localization/index.cjs +26 -63
  107. package/dist/cjs/localization/localeDetector.cjs +108 -39
  108. package/dist/cjs/localization/localeDetector.cjs.map +1 -1
  109. package/dist/cjs/localization/localeMapper.cjs +118 -72
  110. package/dist/cjs/localization/localeMapper.cjs.map +1 -1
  111. package/dist/cjs/localization/localeResolver.cjs +26 -61
  112. package/dist/cjs/localization/localeResolver.cjs.map +1 -1
  113. package/dist/cjs/transpiler/condition/condition.cjs +26 -29
  114. package/dist/cjs/transpiler/condition/condition.cjs.map +1 -1
  115. package/dist/cjs/transpiler/condition/index.cjs +3 -23
  116. package/dist/cjs/transpiler/enumeration/enumeration.cjs +28 -29
  117. package/dist/cjs/transpiler/enumeration/enumeration.cjs.map +1 -1
  118. package/dist/cjs/transpiler/enumeration/index.cjs +3 -23
  119. package/dist/cjs/transpiler/file/file.cjs +52 -71
  120. package/dist/cjs/transpiler/file/file.cjs.map +1 -1
  121. package/dist/cjs/transpiler/file/fileBrowser.cjs +24 -33
  122. package/dist/cjs/transpiler/file/fileBrowser.cjs.map +1 -1
  123. package/dist/cjs/transpiler/file/index.cjs +4 -23
  124. package/dist/cjs/transpiler/gender/gender.cjs +26 -29
  125. package/dist/cjs/transpiler/gender/gender.cjs.map +1 -1
  126. package/dist/cjs/transpiler/gender/index.cjs +3 -23
  127. package/dist/cjs/transpiler/index.cjs +19 -35
  128. package/dist/cjs/transpiler/insertion/getInsertionValues.cjs +8 -31
  129. package/dist/cjs/transpiler/insertion/getInsertionValues.cjs.map +1 -1
  130. package/dist/cjs/transpiler/insertion/index.cjs +5 -25
  131. package/dist/cjs/transpiler/insertion/insertion.cjs +34 -51
  132. package/dist/cjs/transpiler/insertion/insertion.cjs.map +1 -1
  133. package/dist/cjs/transpiler/markdown/getMarkdownMetadata.cjs +53 -86
  134. package/dist/cjs/transpiler/markdown/getMarkdownMetadata.cjs.map +1 -1
  135. package/dist/cjs/transpiler/markdown/index.cjs +5 -25
  136. package/dist/cjs/transpiler/markdown/markdown.cjs +33 -52
  137. package/dist/cjs/transpiler/markdown/markdown.cjs.map +1 -1
  138. package/dist/cjs/transpiler/nesting/index.cjs +3 -23
  139. package/dist/cjs/transpiler/nesting/nesting.cjs +26 -31
  140. package/dist/cjs/transpiler/nesting/nesting.cjs.map +1 -1
  141. package/dist/cjs/transpiler/translation/index.cjs +3 -23
  142. package/dist/cjs/transpiler/translation/translation.cjs +29 -29
  143. package/dist/cjs/transpiler/translation/translation.cjs.map +1 -1
  144. package/dist/cjs/utils/checkIsURLAbsolute.cjs +5 -27
  145. package/dist/cjs/utils/checkIsURLAbsolute.cjs.map +1 -1
  146. package/dist/cjs/utils/intl.cjs +48 -74
  147. package/dist/cjs/utils/intl.cjs.map +1 -1
  148. package/dist/cjs/utils/isSameKeyPath.cjs +6 -30
  149. package/dist/cjs/utils/isSameKeyPath.cjs.map +1 -1
  150. package/dist/cjs/utils/isValidReactElement.cjs +12 -27
  151. package/dist/cjs/utils/isValidReactElement.cjs.map +1 -1
  152. package/dist/cjs/utils/localeStorage.cjs +143 -0
  153. package/dist/cjs/utils/localeStorage.cjs.map +1 -0
  154. package/dist/cjs/utils/parseYaml.cjs +185 -55
  155. package/dist/cjs/utils/parseYaml.cjs.map +1 -1
  156. package/dist/esm/deepTransformPlugins/getFilterMissingTranslationsContent.mjs +208 -0
  157. package/dist/esm/deepTransformPlugins/getFilterMissingTranslationsContent.mjs.map +1 -0
  158. package/dist/esm/deepTransformPlugins/getFilterTranslationsOnlyContent.mjs +90 -0
  159. package/dist/esm/deepTransformPlugins/getFilterTranslationsOnlyContent.mjs.map +1 -0
  160. package/dist/esm/deepTransformPlugins/getFilteredLocalesContent.mjs +43 -0
  161. package/dist/esm/deepTransformPlugins/getFilteredLocalesContent.mjs.map +1 -0
  162. package/dist/esm/deepTransformPlugins/getLocalizedContent.mjs +32 -0
  163. package/dist/esm/deepTransformPlugins/getLocalizedContent.mjs.map +1 -0
  164. package/dist/esm/deepTransformPlugins/getMaskContent.mjs +26 -0
  165. package/dist/esm/deepTransformPlugins/getMaskContent.mjs.map +1 -0
  166. package/dist/esm/deepTransformPlugins/getMissingLocalesContent.mjs +41 -0
  167. package/dist/esm/deepTransformPlugins/getMissingLocalesContent.mjs.map +1 -0
  168. package/dist/esm/deepTransformPlugins/getReplacedValuesContent.mjs +60 -0
  169. package/dist/esm/deepTransformPlugins/getReplacedValuesContent.mjs.map +1 -0
  170. package/dist/esm/deepTransformPlugins/index.mjs +10 -0
  171. package/dist/esm/deepTransformPlugins/insertContentInDictionary.mjs +105 -0
  172. package/dist/esm/deepTransformPlugins/insertContentInDictionary.mjs.map +1 -0
  173. package/dist/esm/dictionaryManipulator/editDictionaryByKeyPath.mjs +57 -67
  174. package/dist/esm/dictionaryManipulator/editDictionaryByKeyPath.mjs.map +1 -1
  175. package/dist/esm/dictionaryManipulator/getContentNodeByKeyPath.mjs +11 -15
  176. package/dist/esm/dictionaryManipulator/getContentNodeByKeyPath.mjs.map +1 -1
  177. package/dist/esm/dictionaryManipulator/getDefaultNode.mjs +46 -70
  178. package/dist/esm/dictionaryManipulator/getDefaultNode.mjs.map +1 -1
  179. package/dist/esm/dictionaryManipulator/getEmptyNode.mjs +22 -44
  180. package/dist/esm/dictionaryManipulator/getEmptyNode.mjs.map +1 -1
  181. package/dist/esm/dictionaryManipulator/getNodeChildren.mjs +19 -32
  182. package/dist/esm/dictionaryManipulator/getNodeChildren.mjs.map +1 -1
  183. package/dist/esm/dictionaryManipulator/getNodeType.mjs +31 -26
  184. package/dist/esm/dictionaryManipulator/getNodeType.mjs.map +1 -1
  185. package/dist/esm/dictionaryManipulator/getUnmergedDictionaryByKeyPath.mjs +14 -15
  186. package/dist/esm/dictionaryManipulator/getUnmergedDictionaryByKeyPath.mjs.map +1 -1
  187. package/dist/esm/dictionaryManipulator/index.mjs +15 -11
  188. package/dist/esm/dictionaryManipulator/mergeDictionaries.mjs +66 -0
  189. package/dist/esm/dictionaryManipulator/mergeDictionaries.mjs.map +1 -0
  190. package/dist/esm/dictionaryManipulator/normalizeDictionary.mjs +29 -0
  191. package/dist/esm/dictionaryManipulator/normalizeDictionary.mjs.map +1 -0
  192. package/dist/esm/dictionaryManipulator/orderDictionaries.mjs +46 -0
  193. package/dist/esm/dictionaryManipulator/orderDictionaries.mjs.map +1 -0
  194. package/dist/esm/dictionaryManipulator/removeContentNodeByKeyPath.mjs +27 -30
  195. package/dist/esm/dictionaryManipulator/removeContentNodeByKeyPath.mjs.map +1 -1
  196. package/dist/esm/dictionaryManipulator/renameContentNodeByKeyPath.mjs +35 -39
  197. package/dist/esm/dictionaryManipulator/renameContentNodeByKeyPath.mjs.map +1 -1
  198. package/dist/esm/dictionaryManipulator/updateNodeChildren.mjs +34 -52
  199. package/dist/esm/dictionaryManipulator/updateNodeChildren.mjs.map +1 -1
  200. package/dist/esm/formatters/compact.mjs +21 -11
  201. package/dist/esm/formatters/compact.mjs.map +1 -1
  202. package/dist/esm/formatters/currency.mjs +25 -15
  203. package/dist/esm/formatters/currency.mjs.map +1 -1
  204. package/dist/esm/formatters/date.mjs +53 -44
  205. package/dist/esm/formatters/date.mjs.map +1 -1
  206. package/dist/esm/formatters/index.mjs +10 -9
  207. package/dist/esm/formatters/list.mjs +26 -12
  208. package/dist/esm/formatters/list.mjs.map +1 -1
  209. package/dist/esm/formatters/number.mjs +14 -8
  210. package/dist/esm/formatters/number.mjs.map +1 -1
  211. package/dist/esm/formatters/percentage.mjs +19 -16
  212. package/dist/esm/formatters/percentage.mjs.map +1 -1
  213. package/dist/esm/formatters/relativeTime.mjs +25 -35
  214. package/dist/esm/formatters/relativeTime.mjs.map +1 -1
  215. package/dist/esm/formatters/units.mjs +19 -13
  216. package/dist/esm/formatters/units.mjs.map +1 -1
  217. package/dist/esm/getStorageAttributes.mjs +114 -0
  218. package/dist/esm/getStorageAttributes.mjs.map +1 -0
  219. package/dist/esm/index.mjs +67 -13
  220. package/dist/esm/interpreter/getCondition.mjs +29 -6
  221. package/dist/esm/interpreter/getCondition.mjs.map +1 -1
  222. package/dist/esm/interpreter/getContent/deepTransform.mjs +36 -39
  223. package/dist/esm/interpreter/getContent/deepTransform.mjs.map +1 -1
  224. package/dist/esm/interpreter/getContent/getContent.mjs +28 -26
  225. package/dist/esm/interpreter/getContent/getContent.mjs.map +1 -1
  226. package/dist/esm/interpreter/getContent/index.mjs +5 -4
  227. package/dist/esm/interpreter/getContent/plugins.mjs +121 -139
  228. package/dist/esm/interpreter/getContent/plugins.mjs.map +1 -1
  229. package/dist/esm/interpreter/getDictionary.mjs +20 -14
  230. package/dist/esm/interpreter/getDictionary.mjs.map +1 -1
  231. package/dist/esm/interpreter/getEnumeration.mjs +67 -17
  232. package/dist/esm/interpreter/getEnumeration.mjs.map +1 -1
  233. package/dist/esm/interpreter/getGender.mjs +32 -10
  234. package/dist/esm/interpreter/getGender.mjs.map +1 -1
  235. package/dist/esm/interpreter/getInsertion.mjs +17 -3
  236. package/dist/esm/interpreter/getInsertion.mjs.map +1 -1
  237. package/dist/esm/interpreter/getIntlayer.mjs +10 -13
  238. package/dist/esm/interpreter/getIntlayer.mjs.map +1 -1
  239. package/dist/esm/interpreter/getNesting.mjs +25 -16
  240. package/dist/esm/interpreter/getNesting.mjs.map +1 -1
  241. package/dist/esm/interpreter/getTranslation.mjs +28 -8
  242. package/dist/esm/interpreter/getTranslation.mjs.map +1 -1
  243. package/dist/esm/interpreter/index.mjs +11 -10
  244. package/dist/esm/localization/getBrowserLocale.mjs +139 -0
  245. package/dist/esm/localization/getBrowserLocale.mjs.map +1 -0
  246. package/dist/esm/localization/getHTMLTextDir.mjs +47 -231
  247. package/dist/esm/localization/getHTMLTextDir.mjs.map +1 -1
  248. package/dist/esm/localization/getLocaleFromPath.mjs +36 -21
  249. package/dist/esm/localization/getLocaleFromPath.mjs.map +1 -1
  250. package/dist/esm/localization/getLocaleLang.mjs +17 -3
  251. package/dist/esm/localization/getLocaleLang.mjs.map +1 -1
  252. package/dist/esm/localization/getLocaleName.mjs +7 -8
  253. package/dist/esm/localization/getLocaleName.mjs.map +1 -1
  254. package/dist/esm/localization/getLocalizedUrl.mjs +43 -12
  255. package/dist/esm/localization/getLocalizedUrl.mjs.map +1 -1
  256. package/dist/esm/localization/getMultilingualUrls.mjs +65 -29
  257. package/dist/esm/localization/getMultilingualUrls.mjs.map +1 -1
  258. package/dist/esm/localization/getPathWithoutLocale.mjs +50 -26
  259. package/dist/esm/localization/getPathWithoutLocale.mjs.map +1 -1
  260. package/dist/esm/localization/index.mjs +7 -21
  261. package/dist/esm/localization/localeDetector.mjs +109 -6
  262. package/dist/esm/localization/localeDetector.mjs.map +1 -1
  263. package/dist/esm/localization/localeMapper.mjs +112 -35
  264. package/dist/esm/localization/localeMapper.mjs.map +1 -1
  265. package/dist/esm/localization/localeResolver.mjs +23 -26
  266. package/dist/esm/localization/localeResolver.mjs.map +1 -1
  267. package/dist/esm/transpiler/condition/condition.mjs +23 -7
  268. package/dist/esm/transpiler/condition/condition.mjs.map +1 -1
  269. package/dist/esm/transpiler/condition/index.mjs +3 -2
  270. package/dist/esm/transpiler/enumeration/enumeration.mjs +25 -7
  271. package/dist/esm/transpiler/enumeration/enumeration.mjs.map +1 -1
  272. package/dist/esm/transpiler/enumeration/index.mjs +3 -2
  273. package/dist/esm/transpiler/file/file.mjs +46 -40
  274. package/dist/esm/transpiler/file/file.mjs.map +1 -1
  275. package/dist/esm/transpiler/file/fileBrowser.mjs +22 -9
  276. package/dist/esm/transpiler/file/fileBrowser.mjs.map +1 -1
  277. package/dist/esm/transpiler/file/index.mjs +3 -2
  278. package/dist/esm/transpiler/gender/gender.mjs +23 -7
  279. package/dist/esm/transpiler/gender/gender.mjs.map +1 -1
  280. package/dist/esm/transpiler/gender/index.mjs +3 -2
  281. package/dist/esm/transpiler/index.mjs +11 -8
  282. package/dist/esm/transpiler/insertion/getInsertionValues.mjs +7 -7
  283. package/dist/esm/transpiler/insertion/getInsertionValues.mjs.map +1 -1
  284. package/dist/esm/transpiler/insertion/index.mjs +4 -3
  285. package/dist/esm/transpiler/insertion/insertion.mjs +31 -29
  286. package/dist/esm/transpiler/insertion/insertion.mjs.map +1 -1
  287. package/dist/esm/transpiler/markdown/getMarkdownMetadata.mjs +52 -61
  288. package/dist/esm/transpiler/markdown/getMarkdownMetadata.mjs.map +1 -1
  289. package/dist/esm/transpiler/markdown/index.mjs +4 -3
  290. package/dist/esm/transpiler/markdown/markdown.mjs +29 -29
  291. package/dist/esm/transpiler/markdown/markdown.mjs.map +1 -1
  292. package/dist/esm/transpiler/nesting/index.mjs +3 -2
  293. package/dist/esm/transpiler/nesting/nesting.mjs +23 -9
  294. package/dist/esm/transpiler/nesting/nesting.mjs.map +1 -1
  295. package/dist/esm/transpiler/translation/index.mjs +3 -2
  296. package/dist/esm/transpiler/translation/translation.mjs +26 -7
  297. package/dist/esm/transpiler/translation/translation.mjs.map +1 -1
  298. package/dist/esm/utils/checkIsURLAbsolute.mjs +4 -3
  299. package/dist/esm/utils/checkIsURLAbsolute.mjs.map +1 -1
  300. package/dist/esm/utils/intl.mjs +44 -49
  301. package/dist/esm/utils/intl.mjs.map +1 -1
  302. package/dist/esm/utils/isSameKeyPath.mjs +5 -6
  303. package/dist/esm/utils/isSameKeyPath.mjs.map +1 -1
  304. package/dist/esm/utils/isValidReactElement.mjs +11 -3
  305. package/dist/esm/utils/isValidReactElement.mjs.map +1 -1
  306. package/dist/esm/utils/localeStorage.mjs +139 -0
  307. package/dist/esm/utils/localeStorage.mjs.map +1 -0
  308. package/dist/esm/utils/parseYaml.mjs +184 -31
  309. package/dist/esm/utils/parseYaml.mjs.map +1 -1
  310. package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts +46 -0
  311. package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts.map +1 -0
  312. package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts +38 -0
  313. package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts.map +1 -0
  314. package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts +30 -0
  315. package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts.map +1 -0
  316. package/dist/types/deepTransformPlugins/getLocalizedContent.d.ts +18 -0
  317. package/dist/types/deepTransformPlugins/getLocalizedContent.d.ts.map +1 -0
  318. package/dist/types/deepTransformPlugins/getMaskContent.d.ts +10 -0
  319. package/dist/types/deepTransformPlugins/getMaskContent.d.ts.map +1 -0
  320. package/dist/types/deepTransformPlugins/getMissingLocalesContent.d.ts +16 -0
  321. package/dist/types/deepTransformPlugins/getMissingLocalesContent.d.ts.map +1 -0
  322. package/dist/types/deepTransformPlugins/getReplacedValuesContent.d.ts +8 -0
  323. package/dist/types/deepTransformPlugins/getReplacedValuesContent.d.ts.map +1 -0
  324. package/dist/types/deepTransformPlugins/index.d.ts +9 -0
  325. package/dist/types/deepTransformPlugins/insertContentInDictionary.d.ts +25 -0
  326. package/dist/types/deepTransformPlugins/insertContentInDictionary.d.ts.map +1 -0
  327. package/dist/types/dictionaryManipulator/editDictionaryByKeyPath.d.ts +6 -3
  328. package/dist/types/dictionaryManipulator/editDictionaryByKeyPath.d.ts.map +1 -1
  329. package/dist/types/dictionaryManipulator/getContentNodeByKeyPath.d.ts +6 -3
  330. package/dist/types/dictionaryManipulator/getContentNodeByKeyPath.d.ts.map +1 -1
  331. package/dist/types/dictionaryManipulator/getDefaultNode.d.ts +6 -3
  332. package/dist/types/dictionaryManipulator/getDefaultNode.d.ts.map +1 -1
  333. package/dist/types/dictionaryManipulator/getEmptyNode.d.ts +6 -2
  334. package/dist/types/dictionaryManipulator/getEmptyNode.d.ts.map +1 -1
  335. package/dist/types/dictionaryManipulator/getNodeChildren.d.ts +6 -2
  336. package/dist/types/dictionaryManipulator/getNodeChildren.d.ts.map +1 -1
  337. package/dist/types/dictionaryManipulator/getNodeType.d.ts +6 -3
  338. package/dist/types/dictionaryManipulator/getNodeType.d.ts.map +1 -1
  339. package/dist/types/dictionaryManipulator/getUnmergedDictionaryByKeyPath.d.ts +8 -3
  340. package/dist/types/dictionaryManipulator/getUnmergedDictionaryByKeyPath.d.ts.map +1 -1
  341. package/dist/types/dictionaryManipulator/index.d.ts +14 -11
  342. package/dist/types/dictionaryManipulator/mergeDictionaries.d.ts +7 -0
  343. package/dist/types/dictionaryManipulator/mergeDictionaries.d.ts.map +1 -0
  344. package/dist/types/dictionaryManipulator/normalizeDictionary.d.ts +8 -0
  345. package/dist/types/dictionaryManipulator/normalizeDictionary.d.ts.map +1 -0
  346. package/dist/types/dictionaryManipulator/orderDictionaries.d.ts +16 -0
  347. package/dist/types/dictionaryManipulator/orderDictionaries.d.ts.map +1 -0
  348. package/dist/types/dictionaryManipulator/removeContentNodeByKeyPath.d.ts +6 -3
  349. package/dist/types/dictionaryManipulator/removeContentNodeByKeyPath.d.ts.map +1 -1
  350. package/dist/types/dictionaryManipulator/renameContentNodeByKeyPath.d.ts +6 -3
  351. package/dist/types/dictionaryManipulator/renameContentNodeByKeyPath.d.ts.map +1 -1
  352. package/dist/types/dictionaryManipulator/updateNodeChildren.d.ts +6 -2
  353. package/dist/types/dictionaryManipulator/updateNodeChildren.d.ts.map +1 -1
  354. package/dist/types/formatters/compact.d.ts +8 -3
  355. package/dist/types/formatters/compact.d.ts.map +1 -1
  356. package/dist/types/formatters/currency.d.ts +8 -3
  357. package/dist/types/formatters/currency.d.ts.map +1 -1
  358. package/dist/types/formatters/date.d.ts +8 -3
  359. package/dist/types/formatters/date.d.ts.map +1 -1
  360. package/dist/types/formatters/index.d.ts +9 -9
  361. package/dist/types/formatters/list.d.ts +8 -3
  362. package/dist/types/formatters/list.d.ts.map +1 -1
  363. package/dist/types/formatters/number.d.ts +8 -3
  364. package/dist/types/formatters/number.d.ts.map +1 -1
  365. package/dist/types/formatters/percentage.d.ts +8 -3
  366. package/dist/types/formatters/percentage.d.ts.map +1 -1
  367. package/dist/types/formatters/relativeTime.d.ts +8 -5
  368. package/dist/types/formatters/relativeTime.d.ts.map +1 -1
  369. package/dist/types/formatters/units.d.ts +8 -3
  370. package/dist/types/formatters/units.d.ts.map +1 -1
  371. package/dist/types/getStorageAttributes.d.ts +25 -0
  372. package/dist/types/getStorageAttributes.d.ts.map +1 -0
  373. package/dist/types/index.d.ts +67 -13
  374. package/dist/types/interpreter/getCondition.d.ts +7 -2
  375. package/dist/types/interpreter/getCondition.d.ts.map +1 -1
  376. package/dist/types/interpreter/getContent/deepTransform.d.ts +7 -2
  377. package/dist/types/interpreter/getContent/deepTransform.d.ts.map +1 -1
  378. package/dist/types/interpreter/getContent/getContent.d.ts +8 -4
  379. package/dist/types/interpreter/getContent/getContent.d.ts.map +1 -1
  380. package/dist/types/interpreter/getContent/index.d.ts +4 -4
  381. package/dist/types/interpreter/getContent/plugins.d.ts +68 -66
  382. package/dist/types/interpreter/getContent/plugins.d.ts.map +1 -1
  383. package/dist/types/interpreter/getDictionary.d.ts +8 -4
  384. package/dist/types/interpreter/getDictionary.d.ts.map +1 -1
  385. package/dist/types/interpreter/getEnumeration.d.ts +8 -3
  386. package/dist/types/interpreter/getEnumeration.d.ts.map +1 -1
  387. package/dist/types/interpreter/getGender.d.ts +7 -4
  388. package/dist/types/interpreter/getGender.d.ts.map +1 -1
  389. package/dist/types/interpreter/getInsertion.d.ts +7 -2
  390. package/dist/types/interpreter/getInsertion.d.ts.map +1 -1
  391. package/dist/types/interpreter/getIntlayer.d.ts +7 -5
  392. package/dist/types/interpreter/getIntlayer.d.ts.map +1 -1
  393. package/dist/types/interpreter/getNesting.d.ts +9 -6
  394. package/dist/types/interpreter/getNesting.d.ts.map +1 -1
  395. package/dist/types/interpreter/getTranslation.d.ts +7 -3
  396. package/dist/types/interpreter/getTranslation.d.ts.map +1 -1
  397. package/dist/types/interpreter/index.d.ts +10 -10
  398. package/dist/types/localization/getBrowserLocale.d.ts +35 -0
  399. package/dist/types/localization/getBrowserLocale.d.ts.map +1 -0
  400. package/dist/types/localization/getHTMLTextDir.d.ts +6 -3
  401. package/dist/types/localization/getHTMLTextDir.d.ts.map +1 -1
  402. package/dist/types/localization/getLocaleFromPath.d.ts +7 -2
  403. package/dist/types/localization/getLocaleFromPath.d.ts.map +1 -1
  404. package/dist/types/localization/getLocaleLang.d.ts +7 -2
  405. package/dist/types/localization/getLocaleLang.d.ts.map +1 -1
  406. package/dist/types/localization/getLocaleName.d.ts +6 -2
  407. package/dist/types/localization/getLocaleName.d.ts.map +1 -1
  408. package/dist/types/localization/getLocalizedUrl.d.ts +30 -17
  409. package/dist/types/localization/getLocalizedUrl.d.ts.map +1 -1
  410. package/dist/types/localization/getMultilingualUrls.d.ts +28 -12
  411. package/dist/types/localization/getMultilingualUrls.d.ts.map +1 -1
  412. package/dist/types/localization/getPathWithoutLocale.d.ts +11 -3
  413. package/dist/types/localization/getPathWithoutLocale.d.ts.map +1 -1
  414. package/dist/types/localization/index.d.ts +12 -12
  415. package/dist/types/localization/localeDetector.d.ts +7 -2
  416. package/dist/types/localization/localeDetector.d.ts.map +1 -1
  417. package/dist/types/localization/localeMapper.d.ts +23 -19
  418. package/dist/types/localization/localeMapper.d.ts.map +1 -1
  419. package/dist/types/localization/localeResolver.d.ts +7 -2
  420. package/dist/types/localization/localeResolver.d.ts.map +1 -1
  421. package/dist/types/transpiler/condition/condition.d.ts +8 -5
  422. package/dist/types/transpiler/condition/condition.d.ts.map +1 -1
  423. package/dist/types/transpiler/condition/index.d.ts +2 -2
  424. package/dist/types/transpiler/enumeration/enumeration.d.ts +9 -6
  425. package/dist/types/transpiler/enumeration/enumeration.d.ts.map +1 -1
  426. package/dist/types/transpiler/enumeration/index.d.ts +2 -2
  427. package/dist/types/transpiler/file/file.d.ts +11 -6
  428. package/dist/types/transpiler/file/file.d.ts.map +1 -1
  429. package/dist/types/transpiler/file/fileBrowser.d.ts +7 -2
  430. package/dist/types/transpiler/file/fileBrowser.d.ts.map +1 -1
  431. package/dist/types/transpiler/file/index.d.ts +2 -2
  432. package/dist/types/transpiler/gender/gender.d.ts +9 -6
  433. package/dist/types/transpiler/gender/gender.d.ts.map +1 -1
  434. package/dist/types/transpiler/gender/index.d.ts +2 -2
  435. package/dist/types/transpiler/index.d.ts +11 -9
  436. package/dist/types/transpiler/insertion/getInsertionValues.d.ts +4 -1
  437. package/dist/types/transpiler/insertion/getInsertionValues.d.ts.map +1 -1
  438. package/dist/types/transpiler/insertion/index.d.ts +3 -3
  439. package/dist/types/transpiler/insertion/insertion.d.ts +8 -5
  440. package/dist/types/transpiler/insertion/insertion.d.ts.map +1 -1
  441. package/dist/types/transpiler/markdown/getMarkdownMetadata.d.ts +4 -1
  442. package/dist/types/transpiler/markdown/getMarkdownMetadata.d.ts.map +1 -1
  443. package/dist/types/transpiler/markdown/index.d.ts +3 -3
  444. package/dist/types/transpiler/markdown/markdown.d.ts +8 -5
  445. package/dist/types/transpiler/markdown/markdown.d.ts.map +1 -1
  446. package/dist/types/transpiler/nesting/index.d.ts +2 -2
  447. package/dist/types/transpiler/nesting/nesting.d.ts +24 -25
  448. package/dist/types/transpiler/nesting/nesting.d.ts.map +1 -1
  449. package/dist/types/transpiler/translation/index.d.ts +2 -2
  450. package/dist/types/transpiler/translation/translation.d.ts +9 -6
  451. package/dist/types/transpiler/translation/translation.d.ts.map +1 -1
  452. package/dist/types/utils/checkIsURLAbsolute.d.ts +4 -1
  453. package/dist/types/utils/checkIsURLAbsolute.d.ts.map +1 -1
  454. package/dist/types/utils/intl.d.ts +9 -10
  455. package/dist/types/utils/intl.d.ts.map +1 -1
  456. package/dist/types/utils/isSameKeyPath.d.ts +6 -2
  457. package/dist/types/utils/isSameKeyPath.d.ts.map +1 -1
  458. package/dist/types/utils/isValidReactElement.d.ts +4 -1
  459. package/dist/types/utils/isValidReactElement.d.ts.map +1 -1
  460. package/dist/types/utils/localeStorage.d.ts +105 -0
  461. package/dist/types/utils/localeStorage.d.ts.map +1 -0
  462. package/dist/types/utils/parseYaml.d.ts +4 -1
  463. package/dist/types/utils/parseYaml.d.ts.map +1 -1
  464. package/package.json +36 -121
  465. package/LICENSE +0 -202
  466. package/dist/cjs/deepTranformPlugins/getFilterTranslationsOnlyContent.cjs +0 -130
  467. package/dist/cjs/deepTranformPlugins/getFilterTranslationsOnlyContent.cjs.map +0 -1
  468. package/dist/cjs/deepTranformPlugins/getFilteredLocalesContent.cjs +0 -62
  469. package/dist/cjs/deepTranformPlugins/getFilteredLocalesContent.cjs.map +0 -1
  470. package/dist/cjs/deepTranformPlugins/getLocalisedContent.cjs +0 -51
  471. package/dist/cjs/deepTranformPlugins/getLocalisedContent.cjs.map +0 -1
  472. package/dist/cjs/deepTranformPlugins/getMaskContent.cjs +0 -49
  473. package/dist/cjs/deepTranformPlugins/getMaskContent.cjs.map +0 -1
  474. package/dist/cjs/deepTranformPlugins/getMissingLocalesContent.cjs +0 -78
  475. package/dist/cjs/deepTranformPlugins/getMissingLocalesContent.cjs.map +0 -1
  476. package/dist/cjs/deepTranformPlugins/getReplacedValuesContent.cjs +0 -82
  477. package/dist/cjs/deepTranformPlugins/getReplacedValuesContent.cjs.map +0 -1
  478. package/dist/cjs/deepTranformPlugins/index.cjs +0 -33
  479. package/dist/cjs/deepTranformPlugins/index.cjs.map +0 -1
  480. package/dist/cjs/dictionaryManipulator/index.cjs.map +0 -1
  481. package/dist/cjs/formatters/index.cjs.map +0 -1
  482. package/dist/cjs/index.cjs.map +0 -1
  483. package/dist/cjs/interpreter/getContent/index.cjs.map +0 -1
  484. package/dist/cjs/interpreter/getIntlayerAsync.cjs +0 -37
  485. package/dist/cjs/interpreter/getIntlayerAsync.cjs.map +0 -1
  486. package/dist/cjs/interpreter/index.cjs.map +0 -1
  487. package/dist/cjs/localization/index.cjs.map +0 -1
  488. package/dist/cjs/localization/localeList.cjs +0 -256
  489. package/dist/cjs/localization/localeList.cjs.map +0 -1
  490. package/dist/cjs/transpiler/condition/index.cjs.map +0 -1
  491. package/dist/cjs/transpiler/enumeration/index.cjs.map +0 -1
  492. package/dist/cjs/transpiler/file/index.cjs.map +0 -1
  493. package/dist/cjs/transpiler/gender/index.cjs.map +0 -1
  494. package/dist/cjs/transpiler/index.cjs.map +0 -1
  495. package/dist/cjs/transpiler/insertion/index.cjs.map +0 -1
  496. package/dist/cjs/transpiler/markdown/index.cjs.map +0 -1
  497. package/dist/cjs/transpiler/nesting/index.cjs.map +0 -1
  498. package/dist/cjs/transpiler/translation/index.cjs.map +0 -1
  499. package/dist/cjs/types/dictionary.cjs +0 -17
  500. package/dist/cjs/types/dictionary.cjs.map +0 -1
  501. package/dist/cjs/types/index.cjs +0 -29
  502. package/dist/cjs/types/index.cjs.map +0 -1
  503. package/dist/cjs/types/intlayer.cjs +0 -35
  504. package/dist/cjs/types/intlayer.cjs.map +0 -1
  505. package/dist/cjs/types/keyPath.cjs +0 -17
  506. package/dist/cjs/types/keyPath.cjs.map +0 -1
  507. package/dist/cjs/types/nodeType.cjs +0 -53
  508. package/dist/cjs/types/nodeType.cjs.map +0 -1
  509. package/dist/cjs/types/translation.cjs +0 -17
  510. package/dist/cjs/types/translation.cjs.map +0 -1
  511. package/dist/esm/deepTranformPlugins/getFilterTranslationsOnlyContent.mjs +0 -95
  512. package/dist/esm/deepTranformPlugins/getFilterTranslationsOnlyContent.mjs.map +0 -1
  513. package/dist/esm/deepTranformPlugins/getFilteredLocalesContent.mjs +0 -40
  514. package/dist/esm/deepTranformPlugins/getFilteredLocalesContent.mjs.map +0 -1
  515. package/dist/esm/deepTranformPlugins/getLocalisedContent.mjs +0 -19
  516. package/dist/esm/deepTranformPlugins/getLocalisedContent.mjs.map +0 -1
  517. package/dist/esm/deepTranformPlugins/getMaskContent.mjs +0 -24
  518. package/dist/esm/deepTranformPlugins/getMaskContent.mjs.map +0 -1
  519. package/dist/esm/deepTranformPlugins/getMissingLocalesContent.mjs +0 -43
  520. package/dist/esm/deepTranformPlugins/getMissingLocalesContent.mjs.map +0 -1
  521. package/dist/esm/deepTranformPlugins/getReplacedValuesContent.mjs +0 -60
  522. package/dist/esm/deepTranformPlugins/getReplacedValuesContent.mjs.map +0 -1
  523. package/dist/esm/deepTranformPlugins/index.mjs +0 -7
  524. package/dist/esm/deepTranformPlugins/index.mjs.map +0 -1
  525. package/dist/esm/dictionaryManipulator/index.mjs.map +0 -1
  526. package/dist/esm/formatters/index.mjs.map +0 -1
  527. package/dist/esm/index.mjs.map +0 -1
  528. package/dist/esm/interpreter/getContent/index.mjs.map +0 -1
  529. package/dist/esm/interpreter/getIntlayerAsync.mjs +0 -13
  530. package/dist/esm/interpreter/getIntlayerAsync.mjs.map +0 -1
  531. package/dist/esm/interpreter/index.mjs.map +0 -1
  532. package/dist/esm/localization/index.mjs.map +0 -1
  533. package/dist/esm/localization/localeList.mjs +0 -232
  534. package/dist/esm/localization/localeList.mjs.map +0 -1
  535. package/dist/esm/transpiler/condition/index.mjs.map +0 -1
  536. package/dist/esm/transpiler/enumeration/index.mjs.map +0 -1
  537. package/dist/esm/transpiler/file/index.mjs.map +0 -1
  538. package/dist/esm/transpiler/gender/index.mjs.map +0 -1
  539. package/dist/esm/transpiler/index.mjs.map +0 -1
  540. package/dist/esm/transpiler/insertion/index.mjs.map +0 -1
  541. package/dist/esm/transpiler/markdown/index.mjs.map +0 -1
  542. package/dist/esm/transpiler/nesting/index.mjs.map +0 -1
  543. package/dist/esm/transpiler/translation/index.mjs.map +0 -1
  544. package/dist/esm/types/dictionary.mjs +0 -1
  545. package/dist/esm/types/dictionary.mjs.map +0 -1
  546. package/dist/esm/types/index.mjs +0 -5
  547. package/dist/esm/types/index.mjs.map +0 -1
  548. package/dist/esm/types/intlayer.mjs +0 -13
  549. package/dist/esm/types/intlayer.mjs.map +0 -1
  550. package/dist/esm/types/keyPath.mjs +0 -1
  551. package/dist/esm/types/keyPath.mjs.map +0 -1
  552. package/dist/esm/types/nodeType.mjs +0 -28
  553. package/dist/esm/types/nodeType.mjs.map +0 -1
  554. package/dist/esm/types/translation.mjs +0 -1
  555. package/dist/esm/types/translation.mjs.map +0 -1
  556. package/dist/types/deepTranformPlugins/getFilterTranslationsOnlyContent.d.ts +0 -13
  557. package/dist/types/deepTranformPlugins/getFilterTranslationsOnlyContent.d.ts.map +0 -1
  558. package/dist/types/deepTranformPlugins/getFilteredLocalesContent.d.ts +0 -5
  559. package/dist/types/deepTranformPlugins/getFilteredLocalesContent.d.ts.map +0 -1
  560. package/dist/types/deepTranformPlugins/getLocalisedContent.d.ts +0 -13
  561. package/dist/types/deepTranformPlugins/getLocalisedContent.d.ts.map +0 -1
  562. package/dist/types/deepTranformPlugins/getMaskContent.d.ts +0 -6
  563. package/dist/types/deepTranformPlugins/getMaskContent.d.ts.map +0 -1
  564. package/dist/types/deepTranformPlugins/getMissingLocalesContent.d.ts +0 -13
  565. package/dist/types/deepTranformPlugins/getMissingLocalesContent.d.ts.map +0 -1
  566. package/dist/types/deepTranformPlugins/getReplacedValuesContent.d.ts +0 -4
  567. package/dist/types/deepTranformPlugins/getReplacedValuesContent.d.ts.map +0 -1
  568. package/dist/types/deepTranformPlugins/index.d.ts +0 -7
  569. package/dist/types/deepTranformPlugins/index.d.ts.map +0 -1
  570. package/dist/types/dictionaryManipulator/index.d.ts.map +0 -1
  571. package/dist/types/formatters/index.d.ts.map +0 -1
  572. package/dist/types/index.d.ts.map +0 -1
  573. package/dist/types/interpreter/getContent/index.d.ts.map +0 -1
  574. package/dist/types/interpreter/getIntlayerAsync.d.ts +0 -13
  575. package/dist/types/interpreter/getIntlayerAsync.d.ts.map +0 -1
  576. package/dist/types/interpreter/index.d.ts.map +0 -1
  577. package/dist/types/localization/index.d.ts.map +0 -1
  578. package/dist/types/localization/localeList.d.ts +0 -3
  579. package/dist/types/localization/localeList.d.ts.map +0 -1
  580. package/dist/types/transpiler/condition/index.d.ts.map +0 -1
  581. package/dist/types/transpiler/enumeration/index.d.ts.map +0 -1
  582. package/dist/types/transpiler/file/index.d.ts.map +0 -1
  583. package/dist/types/transpiler/gender/index.d.ts.map +0 -1
  584. package/dist/types/transpiler/index.d.ts.map +0 -1
  585. package/dist/types/transpiler/insertion/index.d.ts.map +0 -1
  586. package/dist/types/transpiler/markdown/index.d.ts.map +0 -1
  587. package/dist/types/transpiler/nesting/index.d.ts.map +0 -1
  588. package/dist/types/transpiler/translation/index.d.ts.map +0 -1
  589. package/dist/types/types/dictionary.d.ts +0 -307
  590. package/dist/types/types/dictionary.d.ts.map +0 -1
  591. package/dist/types/types/index.d.ts +0 -5
  592. package/dist/types/types/index.d.ts.map +0 -1
  593. package/dist/types/types/intlayer.d.ts +0 -5
  594. package/dist/types/types/intlayer.d.ts.map +0 -1
  595. package/dist/types/types/keyPath.d.ts +0 -47
  596. package/dist/types/types/keyPath.d.ts.map +0 -1
  597. package/dist/types/types/nodeType.d.ts +0 -30
  598. package/dist/types/types/nodeType.d.ts.map +0 -1
  599. package/dist/types/types/translation.d.ts +0 -25
  600. package/dist/types/types/translation.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getReplacedValuesContent.cjs","names":["skipTypedNodePlugin: Plugins","deepTransformNode","plugins: Plugins[]"],"sources":["../../../src/deepTransformPlugins/getReplacedValuesContent.ts"],"sourcesContent":["import type {\n ContentNode,\n KeyPath,\n NodeType,\n TypedNode,\n} from '@intlayer/types';\nimport {\n deepTransformNode,\n type NodeProps,\n type Plugins,\n} from '../interpreter';\n\nconst replaceValuesPlugin = (value: string | number | boolean): Plugins => ({\n id: 'replace-values-plugin',\n canHandle: (node) =>\n typeof node === 'string' ||\n typeof node === 'number' ||\n typeof node === 'boolean',\n transform: () => value,\n});\n\nconst skipTypedNodePlugin: Plugins = {\n id: 'skip-typed-node-plugin',\n canHandle: (node) =>\n typeof node === 'object' && typeof node?.nodeType === 'string',\n transform: (node: TypedNode, props, deepTransformNode) => {\n const nodeType = node.nodeType as NodeType;\n const result = structuredClone(\n node[nodeType as unknown as keyof TypedNode] as any\n );\n\n // If the result is a primitive value (string, number, boolean),\n // we need to transform it directly instead of iterating over its properties\n if (typeof result !== 'object' || result === null) {\n const transformedResult = deepTransformNode(result, {\n ...props,\n children: result,\n keyPath: [\n ...props.keyPath,\n { type: nodeType, key: nodeType } as KeyPath,\n ],\n });\n return {\n ...node,\n [nodeType as unknown as keyof TypedNode]: transformedResult,\n };\n }\n\n // For objects and arrays, iterate over their properties\n for (const key in result) {\n const childProps = {\n ...props,\n children: result[key as unknown as keyof typeof result],\n keyPath: [...props.keyPath, { type: nodeType, key } as KeyPath],\n };\n result[key as unknown as keyof typeof result] = deepTransformNode(\n result[key as unknown as keyof typeof result],\n childProps\n );\n }\n\n return { ...node, [nodeType as unknown as keyof TypedNode]: result };\n },\n};\n\nexport const getReplacedValuesContent = (\n node: ContentNode,\n value: string | number | boolean,\n nodeProps: NodeProps\n) => {\n const plugins: Plugins[] = [\n skipTypedNodePlugin,\n replaceValuesPlugin(value),\n ...(nodeProps.plugins ?? []),\n ];\n\n const JSONNode = JSON.parse(JSON.stringify(node));\n\n return deepTransformNode(JSONNode, {\n ...nodeProps,\n plugins,\n });\n};\n"],"mappings":";;;AAYA,MAAM,uBAAuB,WAA+C;CAC1E,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAChB,OAAO,SAAS,YAChB,OAAO,SAAS;CAClB,iBAAiB;CAClB;AAED,MAAMA,sBAA+B;CACnC,IAAI;CACJ,YAAY,SACV,OAAO,SAAS,YAAY,OAAO,MAAM,aAAa;CACxD,YAAY,MAAiB,OAAO,wBAAsB;EACxD,MAAM,WAAW,KAAK;EACtB,MAAM,SAAS,gBACb,KAAK,UACN;AAID,MAAI,OAAO,WAAW,YAAY,WAAW,MAAM;GACjD,MAAM,oBAAoBC,oBAAkB,QAAQ;IAClD,GAAG;IACH,UAAU;IACV,SAAS,CACP,GAAG,MAAM,SACT;KAAE,MAAM;KAAU,KAAK;KAAU,CAClC;IACF,CAAC;AACF,UAAO;IACL,GAAG;KACF,WAAyC;IAC3C;;AAIH,OAAK,MAAM,OAAO,QAAQ;GACxB,MAAM,aAAa;IACjB,GAAG;IACH,UAAU,OAAO;IACjB,SAAS,CAAC,GAAG,MAAM,SAAS;KAAE,MAAM;KAAU;KAAK,CAAY;IAChE;AACD,UAAO,OAAyCA,oBAC9C,OAAO,MACP,WACD;;AAGH,SAAO;GAAE,GAAG;IAAO,WAAyC;GAAQ;;CAEvE;AAED,MAAa,4BACX,MACA,OACA,cACG;CACH,MAAMC,UAAqB;EACzB;EACA,oBAAoB,MAAM;EAC1B,GAAI,UAAU,WAAW,EAAE;EAC5B;AAID,QAAOD,+DAFU,KAAK,MAAM,KAAK,UAAU,KAAK,CAAC,EAEd;EACjC,GAAG;EACH;EACD,CAAC"}
@@ -0,0 +1,25 @@
1
+ const require_deepTransformPlugins_getFilteredLocalesContent = require('./getFilteredLocalesContent.cjs');
2
+ const require_deepTransformPlugins_getFilterMissingTranslationsContent = require('./getFilterMissingTranslationsContent.cjs');
3
+ const require_deepTransformPlugins_getFilterTranslationsOnlyContent = require('./getFilterTranslationsOnlyContent.cjs');
4
+ const require_deepTransformPlugins_getLocalizedContent = require('./getLocalizedContent.cjs');
5
+ const require_deepTransformPlugins_getMaskContent = require('./getMaskContent.cjs');
6
+ const require_deepTransformPlugins_getMissingLocalesContent = require('./getMissingLocalesContent.cjs');
7
+ const require_deepTransformPlugins_getReplacedValuesContent = require('./getReplacedValuesContent.cjs');
8
+ const require_deepTransformPlugins_insertContentInDictionary = require('./insertContentInDictionary.cjs');
9
+
10
+ exports.buildMaskPlugin = require_deepTransformPlugins_getMaskContent.buildMaskPlugin;
11
+ exports.checkMissingLocalesPlugin = require_deepTransformPlugins_getMissingLocalesContent.checkMissingLocalesPlugin;
12
+ exports.filterMissingTranslationsOnlyPlugin = require_deepTransformPlugins_getFilterMissingTranslationsContent.filterMissingTranslationsOnlyPlugin;
13
+ exports.filterTranslationsOnlyPlugin = require_deepTransformPlugins_getFilterTranslationsOnlyContent.filterTranslationsOnlyPlugin;
14
+ exports.getFilterMissingTranslationsContent = require_deepTransformPlugins_getFilterMissingTranslationsContent.getFilterMissingTranslationsContent;
15
+ exports.getFilterMissingTranslationsDictionary = require_deepTransformPlugins_getFilterMissingTranslationsContent.getFilterMissingTranslationsDictionary;
16
+ exports.getFilterTranslationsOnlyContent = require_deepTransformPlugins_getFilterTranslationsOnlyContent.getFilterTranslationsOnlyContent;
17
+ exports.getFilterTranslationsOnlyDictionary = require_deepTransformPlugins_getFilterTranslationsOnlyContent.getFilterTranslationsOnlyDictionary;
18
+ exports.getFilteredLocalesContent = require_deepTransformPlugins_getFilteredLocalesContent.getFilteredLocalesContent;
19
+ exports.getFilteredLocalesDictionary = require_deepTransformPlugins_getFilteredLocalesContent.getFilteredLocalesDictionary;
20
+ exports.getLocalizedContent = require_deepTransformPlugins_getLocalizedContent.getLocalizedContent;
21
+ exports.getMaskContent = require_deepTransformPlugins_getMaskContent.getMaskContent;
22
+ exports.getMissingLocalesContent = require_deepTransformPlugins_getMissingLocalesContent.getMissingLocalesContent;
23
+ exports.getPerLocaleDictionary = require_deepTransformPlugins_getLocalizedContent.getPerLocaleDictionary;
24
+ exports.getReplacedValuesContent = require_deepTransformPlugins_getReplacedValuesContent.getReplacedValuesContent;
25
+ exports.insertContentInDictionary = require_deepTransformPlugins_insertContentInDictionary.insertContentInDictionary;
@@ -0,0 +1,107 @@
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ let __intlayer_types = require("@intlayer/types");
3
+ __intlayer_types = require_rolldown_runtime.__toESM(__intlayer_types);
4
+
5
+ //#region src/deepTransformPlugins/insertContentInDictionary.ts
6
+ /**
7
+ * Deep merge helper that handles translation blocks
8
+ * @param target - The target object (dictionary content)
9
+ * @param source - The source object (new content to merge)
10
+ * @param locale - Optional locale to target specific translation
11
+ * @returns Merged content
12
+ */
13
+ const deepMergeContent = (target, source, locale) => {
14
+ if (source === null || source === void 0) return target;
15
+ if (target === null || target === void 0) if (Array.isArray(source)) target = [];
16
+ else if (typeof source === "object") target = {};
17
+ else return source;
18
+ if (target && typeof target === "object" && target.nodeType === __intlayer_types.NodeType.Translation) if (locale) {
19
+ const existingLocaleContent = target.translation[locale];
20
+ let newLocaleContent;
21
+ if (typeof source === "object" && !Array.isArray(source)) newLocaleContent = deepMergeContent(existingLocaleContent, source, void 0);
22
+ else if (Array.isArray(source)) newLocaleContent = source;
23
+ else newLocaleContent = source;
24
+ return {
25
+ ...target,
26
+ translation: {
27
+ ...target.translation,
28
+ [locale]: newLocaleContent
29
+ }
30
+ };
31
+ } else if (typeof source === "object" && !Array.isArray(source) && source.nodeType === __intlayer_types.NodeType.Translation) return {
32
+ ...target,
33
+ translation: {
34
+ ...target.translation,
35
+ ...source.translation
36
+ }
37
+ };
38
+ else return processNewContent(source, locale);
39
+ if (Array.isArray(source)) if (locale && Array.isArray(target)) {
40
+ const result = [];
41
+ const maxLength = Math.max(source.length, target.length);
42
+ for (let i = 0; i < maxLength; i++) if (i < source.length) if (i < target.length && target[i] !== void 0) result[i] = deepMergeContent(target[i], source[i], locale);
43
+ else result[i] = processNewContent(source[i], locale);
44
+ else result[i] = target[i];
45
+ return result;
46
+ } else return source.map((item) => {
47
+ if (item && typeof item === "object" && item.nodeType === __intlayer_types.NodeType.Translation) return item;
48
+ return processNewContent(item, locale);
49
+ });
50
+ if (typeof source === "object" && !Array.isArray(source)) {
51
+ if (typeof target !== "object" || Array.isArray(target)) target = {};
52
+ const result = { ...target };
53
+ for (const key in source) if (Object.hasOwn(source, key)) if (target[key] !== void 0) result[key] = deepMergeContent(target[key], source[key], locale);
54
+ else result[key] = processNewContent(source[key], locale);
55
+ return result;
56
+ }
57
+ return source;
58
+ };
59
+ /**
60
+ * Process new content that doesn't exist in target
61
+ * @param content - New content to process
62
+ * @param locale - Optional locale
63
+ * @returns Processed content
64
+ */
65
+ const processNewContent = (content, locale) => {
66
+ if (content === null || content === void 0) return content;
67
+ if (content && typeof content === "object" && content.nodeType === __intlayer_types.NodeType.Translation) return content;
68
+ if (Array.isArray(content)) return content.map((item) => processNewContent(item, locale));
69
+ if (content && typeof content === "object") {
70
+ const result = {};
71
+ for (const key in content) if (Object.hasOwn(content, key)) result[key] = processNewContent(content[key], locale);
72
+ return result;
73
+ }
74
+ if (locale) return {
75
+ nodeType: __intlayer_types.NodeType.Translation,
76
+ translation: { [locale]: content }
77
+ };
78
+ else return content;
79
+ };
80
+ /**
81
+ * Insert content into a dictionary with deep merge support
82
+ * Handles translation blocks and nested structures
83
+ *
84
+ * @param dictionary - The dictionary to insert content into
85
+ * @param content - The content to insert
86
+ * @param locale - Optional locale to target specific translation
87
+ * @returns Updated dictionary
88
+ *
89
+ * @example
90
+ * // Without locale - deep merge all content
91
+ * insertContentInDictionary(dictionary, { title: 'New Title' })
92
+ *
93
+ * @example
94
+ * // With locale - insert content for specific locale
95
+ * insertContentInDictionary(dictionary, { title: 'このページ' }, 'ja')
96
+ */
97
+ const insertContentInDictionary = (dictionary, content, locale) => {
98
+ const mergedContent = deepMergeContent(Array.isArray(dictionary.content) ? [...dictionary.content] : { ...dictionary.content }, content, locale);
99
+ return {
100
+ ...dictionary,
101
+ content: mergedContent
102
+ };
103
+ };
104
+
105
+ //#endregion
106
+ exports.insertContentInDictionary = insertContentInDictionary;
107
+ //# sourceMappingURL=insertContentInDictionary.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insertContentInDictionary.cjs","names":["NodeType","newLocaleContent: any","result: any"],"sources":["../../../src/deepTransformPlugins/insertContentInDictionary.ts"],"sourcesContent":["import { type Dictionary, type LocalesValues, NodeType } from '@intlayer/types';\n\n// {\n// {\n// title: 'このページ',\n// linkLabel: 'セクションへ移動',\n// collapseButton: { label: '折りたたむ' }\n// },\n// }\n// {\n// dictionary: {\n// key: 'aside-navigation',\n// content: {\n// title: {\n// nodeType: 'translation',\n// translation: {\n// ar: 'في هذه الصفحة',\n// de: 'Auf dieser Seite',\n// en: 'In this page',\n// 'en-GB': 'On this page',\n// es: 'En esta página',\n// fr: 'Dans cette page',\n// hi: 'इस पृष्ठ में',\n// it: 'In questa pagina',\n// ko: '이 페이지에서',\n// pt: 'Nesta página',\n// ru: 'На этой странице',\n// tr: 'Bu sayfada',\n// zh: '在此页面'\n// }\n// },\n// linkLabel: {\n// nodeType: 'translation',\n// translation: {\n// ar: 'اذهب إلى القسم',\n// de: 'Gehe zur Sektion',\n// en: 'Go to section',\n// 'en-GB': 'Go to section',\n// es: 'Ir a la sección',\n// fr: 'Aller à la section',\n// hi: 'सेक्शन पर जाएं',\n// it: 'Vai alla sezione',\n// ja: 'セクションへ行く',\n// ko: '섹션으로 이동',\n// pt: 'Ir para a seção',\n// ru: 'Перейти к разделу',\n// tr: 'Bölüme git',\n// zh: '转到节'\n// }\n// },\n// collapseButton: {\n// label: {\n// nodeType: 'translation',\n// translation: {\n// en: 'Collapse',\n// fr: 'Réduire',\n// es: 'Colapsar',\n// 'en-GB': 'Collapse',\n// de: 'Zuklappen',\n// ja: '折りたたむ',\n// ko: '접기',\n// zh: '折叠',\n// it: 'Comprimi',\n// pt: 'Recolher',\n// hi: 'संकुचित करें',\n// ar: 'اطوي التوسيع',\n// ru: 'Свернуть',\n// tr: 'Daralt'\n// }\n// }\n// }\n// },\n// localId: 'aside-navigation::local::src/components/AsideNavigation/asideNavigation.content.ts',\n// location: 'local',\n// filePath: 'src/components/AsideNavigation/asideNavigation.content.ts'\n// }\n// }\n\n/**\n * Deep merge helper that handles translation blocks\n * @param target - The target object (dictionary content)\n * @param source - The source object (new content to merge)\n * @param locale - Optional locale to target specific translation\n * @returns Merged content\n */\nconst deepMergeContent = (\n target: any,\n source: any,\n locale?: LocalesValues\n): any => {\n // If source is null or undefined, return target\n if (source === null || source === undefined) return target;\n\n // If target is null or undefined, initialize based on source type\n if (target === null || target === undefined) {\n if (Array.isArray(source)) {\n target = [];\n } else if (typeof source === 'object') {\n target = {};\n } else {\n return source;\n }\n }\n\n // Handle translation nodes FIRST (before arrays) to support arrays within translations\n if (\n target &&\n typeof target === 'object' &&\n target.nodeType === NodeType.Translation\n ) {\n // Target is a translation block\n if (locale) {\n // Update only the specific locale - create new object to preserve order\n const existingLocaleContent = target.translation[locale];\n let newLocaleContent: any;\n\n if (typeof source === 'object' && !Array.isArray(source)) {\n // Source is an object, need to deep merge for this locale\n newLocaleContent = deepMergeContent(\n existingLocaleContent,\n source,\n undefined // Don't pass locale down for nested content\n );\n } else if (Array.isArray(source)) {\n // Source is an array, set it directly for this locale\n newLocaleContent = source;\n } else {\n // Source is a primitive, directly set it\n newLocaleContent = source;\n }\n\n // Return new object with locale appended at the end (preserve insertion order)\n return {\n ...target,\n translation: {\n ...target.translation,\n [locale]: newLocaleContent,\n },\n };\n } else {\n // No locale specified, replace/merge the entire translation\n if (\n typeof source === 'object' &&\n !Array.isArray(source) &&\n source.nodeType === NodeType.Translation\n ) {\n // Source is also a translation node, merge translations\n return {\n ...target,\n translation: {\n ...target.translation,\n ...source.translation,\n },\n };\n } else {\n // Source is not a translation node, wrap it\n return processNewContent(source, locale);\n }\n }\n }\n\n // Handle arrays\n if (Array.isArray(source)) {\n if (locale && Array.isArray(target)) {\n // When locale is specified and target is also an array, merge element by element\n const result = [];\n const maxLength = Math.max(source.length, target.length);\n\n for (let i = 0; i < maxLength; i++) {\n if (i < source.length) {\n if (i < target.length && target[i] !== undefined) {\n // Both source and target have element at this index - merge them\n result[i] = deepMergeContent(target[i], source[i], locale);\n } else {\n // Only source has element at this index - process new content\n result[i] = processNewContent(source[i], locale);\n }\n } else {\n // Only target has element at this index - keep it\n result[i] = target[i];\n }\n }\n\n return result;\n } else {\n // No locale or target is not an array - replace entirely\n return source.map((item) => {\n // Process each item in case it needs locale wrapping\n if (\n item &&\n typeof item === 'object' &&\n item.nodeType === NodeType.Translation\n ) {\n return item;\n }\n return processNewContent(item, locale);\n });\n }\n }\n\n // Handle objects\n if (typeof source === 'object' && !Array.isArray(source)) {\n if (typeof target !== 'object' || Array.isArray(target)) {\n target = {};\n }\n\n // Create new object to preserve key order and avoid mutation\n const result: any = { ...target };\n\n for (const key in source) {\n if (Object.hasOwn(source, key)) {\n if (target[key] !== undefined) {\n result[key] = deepMergeContent(target[key], source[key], locale);\n } else {\n result[key] = processNewContent(source[key], locale);\n }\n }\n }\n\n return result;\n }\n\n // For primitives, just return the source\n return source;\n};\n\n/**\n * Process new content that doesn't exist in target\n * @param content - New content to process\n * @param locale - Optional locale\n * @returns Processed content\n */\nconst processNewContent = (content: any, locale?: LocalesValues): any => {\n // Handle null and undefined\n if (content === null || content === undefined) {\n return content;\n }\n\n // If content is already a translation node, return as-is\n if (\n content &&\n typeof content === 'object' &&\n content.nodeType === NodeType.Translation\n ) {\n return content;\n }\n\n // Handle arrays\n if (Array.isArray(content)) {\n return content.map((item) => processNewContent(item, locale));\n }\n\n // Handle objects\n if (content && typeof content === 'object') {\n const result: any = {};\n\n for (const key in content) {\n if (Object.hasOwn(content, key)) {\n result[key] = processNewContent(content[key], locale);\n }\n }\n return result;\n }\n\n // Handle primitives\n if (locale) {\n // Wrap in translation node with the specific locale\n return {\n nodeType: NodeType.Translation,\n translation: {\n [locale]: content,\n },\n };\n } else {\n // If no locale, just return the content as-is (don't wrap)\n return content;\n }\n};\n\n/**\n * Insert content into a dictionary with deep merge support\n * Handles translation blocks and nested structures\n *\n * @param dictionary - The dictionary to insert content into\n * @param content - The content to insert\n * @param locale - Optional locale to target specific translation\n * @returns Updated dictionary\n *\n * @example\n * // Without locale - deep merge all content\n * insertContentInDictionary(dictionary, { title: 'New Title' })\n *\n * @example\n * // With locale - insert content for specific locale\n * insertContentInDictionary(dictionary, { title: 'このページ' }, 'ja')\n */\nexport const insertContentInDictionary = (\n dictionary: Dictionary,\n content: Dictionary['content'],\n locale?: LocalesValues\n): Dictionary => {\n const mergedContent = deepMergeContent(\n Array.isArray(dictionary.content)\n ? [...dictionary.content]\n : { ...dictionary.content },\n content,\n locale\n );\n\n return {\n ...dictionary,\n content: mergedContent,\n };\n};\n"],"mappings":";;;;;;;;;;;;AAqFA,MAAM,oBACJ,QACA,QACA,WACQ;AAER,KAAI,WAAW,QAAQ,WAAW,OAAW,QAAO;AAGpD,KAAI,WAAW,QAAQ,WAAW,OAChC,KAAI,MAAM,QAAQ,OAAO,CACvB,UAAS,EAAE;UACF,OAAO,WAAW,SAC3B,UAAS,EAAE;KAEX,QAAO;AAKX,KACE,UACA,OAAO,WAAW,YAClB,OAAO,aAAaA,0BAAS,YAG7B,KAAI,QAAQ;EAEV,MAAM,wBAAwB,OAAO,YAAY;EACjD,IAAIC;AAEJ,MAAI,OAAO,WAAW,YAAY,CAAC,MAAM,QAAQ,OAAO,CAEtD,oBAAmB,iBACjB,uBACA,QACA,OACD;WACQ,MAAM,QAAQ,OAAO,CAE9B,oBAAmB;MAGnB,oBAAmB;AAIrB,SAAO;GACL,GAAG;GACH,aAAa;IACX,GAAG,OAAO;KACT,SAAS;IACX;GACF;YAIC,OAAO,WAAW,YAClB,CAAC,MAAM,QAAQ,OAAO,IACtB,OAAO,aAAaD,0BAAS,YAG7B,QAAO;EACL,GAAG;EACH,aAAa;GACX,GAAG,OAAO;GACV,GAAG,OAAO;GACX;EACF;KAGD,QAAO,kBAAkB,QAAQ,OAAO;AAM9C,KAAI,MAAM,QAAQ,OAAO,CACvB,KAAI,UAAU,MAAM,QAAQ,OAAO,EAAE;EAEnC,MAAM,SAAS,EAAE;EACjB,MAAM,YAAY,KAAK,IAAI,OAAO,QAAQ,OAAO,OAAO;AAExD,OAAK,IAAI,IAAI,GAAG,IAAI,WAAW,IAC7B,KAAI,IAAI,OAAO,OACb,KAAI,IAAI,OAAO,UAAU,OAAO,OAAO,OAErC,QAAO,KAAK,iBAAiB,OAAO,IAAI,OAAO,IAAI,OAAO;MAG1D,QAAO,KAAK,kBAAkB,OAAO,IAAI,OAAO;MAIlD,QAAO,KAAK,OAAO;AAIvB,SAAO;OAGP,QAAO,OAAO,KAAK,SAAS;AAE1B,MACE,QACA,OAAO,SAAS,YAChB,KAAK,aAAaA,0BAAS,YAE3B,QAAO;AAET,SAAO,kBAAkB,MAAM,OAAO;GACtC;AAKN,KAAI,OAAO,WAAW,YAAY,CAAC,MAAM,QAAQ,OAAO,EAAE;AACxD,MAAI,OAAO,WAAW,YAAY,MAAM,QAAQ,OAAO,CACrD,UAAS,EAAE;EAIb,MAAME,SAAc,EAAE,GAAG,QAAQ;AAEjC,OAAK,MAAM,OAAO,OAChB,KAAI,OAAO,OAAO,QAAQ,IAAI,CAC5B,KAAI,OAAO,SAAS,OAClB,QAAO,OAAO,iBAAiB,OAAO,MAAM,OAAO,MAAM,OAAO;MAEhE,QAAO,OAAO,kBAAkB,OAAO,MAAM,OAAO;AAK1D,SAAO;;AAIT,QAAO;;;;;;;;AAST,MAAM,qBAAqB,SAAc,WAAgC;AAEvE,KAAI,YAAY,QAAQ,YAAY,OAClC,QAAO;AAIT,KACE,WACA,OAAO,YAAY,YACnB,QAAQ,aAAaF,0BAAS,YAE9B,QAAO;AAIT,KAAI,MAAM,QAAQ,QAAQ,CACxB,QAAO,QAAQ,KAAK,SAAS,kBAAkB,MAAM,OAAO,CAAC;AAI/D,KAAI,WAAW,OAAO,YAAY,UAAU;EAC1C,MAAME,SAAc,EAAE;AAEtB,OAAK,MAAM,OAAO,QAChB,KAAI,OAAO,OAAO,SAAS,IAAI,CAC7B,QAAO,OAAO,kBAAkB,QAAQ,MAAM,OAAO;AAGzD,SAAO;;AAIT,KAAI,OAEF,QAAO;EACL,UAAUF,0BAAS;EACnB,aAAa,GACV,SAAS,SACX;EACF;KAGD,QAAO;;;;;;;;;;;;;;;;;;;AAqBX,MAAa,6BACX,YACA,SACA,WACe;CACf,MAAM,gBAAgB,iBACpB,MAAM,QAAQ,WAAW,QAAQ,GAC7B,CAAC,GAAG,WAAW,QAAQ,GACvB,EAAE,GAAG,WAAW,SAAS,EAC7B,SACA,OACD;AAED,QAAO;EACL,GAAG;EACH,SAAS;EACV"}
@@ -1,94 +1,62 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var editDictionaryByKeyPath_exports = {};
20
- __export(editDictionaryByKeyPath_exports, {
21
- editDictionaryByKeyPath: () => editDictionaryByKeyPath
22
- });
23
- module.exports = __toCommonJS(editDictionaryByKeyPath_exports);
24
- var import_types = require('../types/index.cjs');
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ let __intlayer_types = require("@intlayer/types");
3
+ __intlayer_types = require_rolldown_runtime.__toESM(__intlayer_types);
4
+
5
+ //#region src/dictionaryManipulator/editDictionaryByKeyPath.ts
25
6
  const editDictionaryByKeyPath = (dictionaryContent, keyPath, newValue) => {
26
- let currentValue = dictionaryContent;
27
- let parentValue = null;
28
- let lastKeys = [];
29
- if (keyPath.length === 0) {
30
- return newValue;
31
- }
32
- for (let i = 0; i < keyPath.length; i++) {
33
- const keyObj = keyPath[i];
34
- parentValue = currentValue;
35
- if (keyObj.type === import_types.NodeType.Object || keyObj.type === import_types.NodeType.Array) {
36
- lastKeys = [keyObj.key];
37
- if (!currentValue[keyObj.key] || typeof currentValue[keyObj.key] !== "object") {
38
- currentValue[keyObj.key] = {};
39
- }
40
- currentValue = currentValue[keyObj.key];
41
- }
42
- if (keyObj.type === import_types.NodeType.Translation || keyObj.type === import_types.NodeType.Enumeration) {
43
- lastKeys = [keyObj.type, keyObj.key];
44
- if (!currentValue[keyObj.type] || typeof currentValue[keyObj.type] !== "object") {
45
- currentValue[keyObj.type] = {};
46
- }
47
- if (!currentValue[keyObj.type][keyObj.key] || typeof currentValue[keyObj.type][keyObj.key] !== "object") {
48
- currentValue[keyObj.type][keyObj.key] = {};
49
- }
50
- currentValue = currentValue[keyObj.type][keyObj.key];
51
- }
52
- if (keyObj.type === import_types.NodeType.Enumeration || keyObj.type === import_types.NodeType.Condition) {
53
- lastKeys = [keyObj.type, keyObj.key];
54
- if (!currentValue[keyObj.type] || typeof currentValue[keyObj.type] !== "object") {
55
- currentValue[keyObj.type] = {};
56
- }
57
- if (!currentValue[keyObj.type][keyObj.key] || typeof currentValue[keyObj.type][keyObj.key] !== "object") {
58
- currentValue[keyObj.type][keyObj.key] = {};
59
- }
60
- currentValue = currentValue[keyObj.type][keyObj.key];
61
- }
62
- if (keyObj.type === import_types.NodeType.Markdown || keyObj.type === import_types.NodeType.Insertion) {
63
- lastKeys = [keyObj.type];
64
- if (!currentValue[keyObj.type] || typeof currentValue[keyObj.type] !== "object") {
65
- currentValue[keyObj.type] = "";
66
- }
67
- currentValue = currentValue[keyObj.type];
68
- }
69
- if (keyObj.type === import_types.NodeType.File) {
70
- lastKeys = ["content"];
71
- currentValue = currentValue["content"];
72
- }
73
- if (keyObj.type) {
74
- currentValue = currentValue;
75
- }
76
- if (i === keyPath.length - 1 && parentValue && lastKeys.length > 0) {
77
- let target = parentValue;
78
- for (const key of lastKeys.slice(0, -1)) {
79
- target = target[key];
80
- }
81
- if (typeof newValue === "undefined") {
82
- delete target[lastKeys[lastKeys.length - 1]];
83
- } else {
84
- target[lastKeys[lastKeys.length - 1]] = newValue;
85
- }
86
- }
87
- }
88
- return dictionaryContent;
7
+ let currentValue = dictionaryContent;
8
+ let parentValue = null;
9
+ let lastKeys = [];
10
+ if (keyPath.length === 0) return newValue;
11
+ try {
12
+ for (let i = 0; i < keyPath.length; i++) {
13
+ const keyObj = keyPath[i];
14
+ parentValue = currentValue;
15
+ if (keyObj.type === __intlayer_types.NodeType.Object || keyObj.type === __intlayer_types.NodeType.Array) {
16
+ lastKeys = [keyObj.key];
17
+ if (!currentValue[keyObj.key] || typeof currentValue[keyObj.key] !== "object") currentValue[keyObj.key] = {};
18
+ currentValue = currentValue[keyObj.key];
19
+ }
20
+ if (keyObj.type === __intlayer_types.NodeType.Translation || keyObj.type === __intlayer_types.NodeType.Enumeration) {
21
+ lastKeys = [keyObj.type, keyObj.key];
22
+ if (!currentValue[keyObj.type] || typeof currentValue[keyObj.type] !== "object") currentValue[keyObj.type] = {};
23
+ if (!currentValue[keyObj.type][keyObj.key] || typeof currentValue[keyObj.type][keyObj.key] !== "object") currentValue[keyObj.type][keyObj.key] = {};
24
+ currentValue = currentValue[keyObj.type][keyObj.key];
25
+ }
26
+ if (keyObj.type === __intlayer_types.NodeType.Enumeration || keyObj.type === __intlayer_types.NodeType.Condition) {
27
+ lastKeys = [keyObj.type, keyObj.key];
28
+ if (!currentValue[keyObj.type] || typeof currentValue[keyObj.type] !== "object") currentValue[keyObj.type] = {};
29
+ if (!currentValue[keyObj.type][keyObj.key] || typeof currentValue[keyObj.type][keyObj.key] !== "object") currentValue[keyObj.type][keyObj.key] = {};
30
+ currentValue = currentValue[keyObj.type][keyObj.key];
31
+ }
32
+ if (keyObj.type === __intlayer_types.NodeType.Markdown || keyObj.type === __intlayer_types.NodeType.Insertion) {
33
+ lastKeys = [keyObj.type];
34
+ if (!currentValue[keyObj.type] || typeof currentValue[keyObj.type] !== "object") currentValue[keyObj.type] = "";
35
+ currentValue = currentValue[keyObj.type];
36
+ }
37
+ if (keyObj.type === __intlayer_types.NodeType.File) {
38
+ lastKeys = ["content"];
39
+ currentValue = currentValue.content;
40
+ }
41
+ if (keyObj.type) {}
42
+ if (i === keyPath.length - 1 && parentValue && lastKeys.length > 0) {
43
+ let target = parentValue;
44
+ for (const key of lastKeys.slice(0, -1)) target = target[key];
45
+ if (typeof newValue === "undefined") delete target[lastKeys[lastKeys.length - 1]];
46
+ else target[lastKeys[lastKeys.length - 1]] = newValue;
47
+ }
48
+ }
49
+ return dictionaryContent;
50
+ } catch (error) {
51
+ console.error("Cannot edit dictionary by key path", {
52
+ dictionaryContent,
53
+ keyPath,
54
+ newValue
55
+ }, error);
56
+ return dictionaryContent;
57
+ }
89
58
  };
90
- // Annotate the CommonJS export names for ESM import in node:
91
- 0 && (module.exports = {
92
- editDictionaryByKeyPath
93
- });
59
+
60
+ //#endregion
61
+ exports.editDictionaryByKeyPath = editDictionaryByKeyPath;
94
62
  //# sourceMappingURL=editDictionaryByKeyPath.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/dictionaryManipulator/editDictionaryByKeyPath.ts"],"sourcesContent":["import { type KeyPath, NodeType } from '../types';\nimport type { ContentNode } from '../types/dictionary';\n\ntype LastKeyType = string | number;\n\nexport const editDictionaryByKeyPath = (\n dictionaryContent: ContentNode,\n keyPath: KeyPath[],\n newValue: ContentNode\n): ContentNode => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKeys: LastKeyType[] = [];\n\n if (keyPath.length === 0) {\n return newValue;\n }\n\n for (let i = 0; i < keyPath.length; i++) {\n const keyObj = keyPath[i];\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n lastKeys = [keyObj.key];\n if (\n !currentValue[keyObj.key] ||\n typeof currentValue[keyObj.key] !== 'object'\n ) {\n currentValue[keyObj.key] = {};\n }\n currentValue = currentValue[keyObj.key];\n }\n\n if (\n keyObj.type === NodeType.Translation ||\n keyObj.type === NodeType.Enumeration\n ) {\n lastKeys = [keyObj.type, keyObj.key];\n if (\n !currentValue[keyObj.type] ||\n typeof currentValue[keyObj.type] !== 'object'\n ) {\n currentValue[keyObj.type] = {};\n }\n if (\n !currentValue[keyObj.type][keyObj.key] ||\n typeof currentValue[keyObj.type][keyObj.key] !== 'object'\n ) {\n currentValue[keyObj.type][keyObj.key] = {};\n }\n currentValue = currentValue[keyObj.type][keyObj.key];\n }\n\n if (\n keyObj.type === NodeType.Enumeration ||\n keyObj.type === NodeType.Condition\n ) {\n lastKeys = [keyObj.type, keyObj.key];\n if (\n !currentValue[keyObj.type] ||\n typeof currentValue[keyObj.type] !== 'object'\n ) {\n currentValue[keyObj.type] = {};\n }\n if (\n !currentValue[keyObj.type][keyObj.key] ||\n typeof currentValue[keyObj.type][keyObj.key] !== 'object'\n ) {\n currentValue[keyObj.type][keyObj.key] = {};\n }\n currentValue = currentValue[keyObj.type][keyObj.key];\n }\n\n if (\n keyObj.type === NodeType.Markdown ||\n keyObj.type === NodeType.Insertion\n ) {\n lastKeys = [keyObj.type];\n if (\n !currentValue[keyObj.type] ||\n typeof currentValue[keyObj.type] !== 'object'\n ) {\n currentValue[keyObj.type] = '';\n }\n currentValue = currentValue[keyObj.type];\n }\n\n if (keyObj.type === NodeType.File) {\n lastKeys = ['content'];\n\n currentValue = currentValue['content'];\n }\n\n if (keyObj.type) {\n // No treated TypedNode\n\n currentValue = currentValue;\n }\n\n // Only update the value when processing the last key in the keyPath.\n if (i === keyPath.length - 1 && parentValue && lastKeys.length > 0) {\n let target = parentValue;\n // Drill down if lastKeys contains more than one key.\n for (const key of lastKeys.slice(0, -1)) {\n target = target[key];\n }\n if (typeof newValue === 'undefined') {\n delete target[lastKeys[lastKeys.length - 1]];\n } else {\n target[lastKeys[lastKeys.length - 1]] = newValue;\n }\n }\n }\n\n return dictionaryContent;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAuC;AAKhC,MAAM,0BAA0B,CACrC,mBACA,SACA,aACgB;AAChB,MAAI,eAAoB;AACxB,MAAI,cAAmB;AACvB,MAAI,WAA0B,CAAC;AAE/B,MAAI,QAAQ,WAAW,GAAG;AACxB,WAAO;AAAA,EACT;AAEA,WAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACvC,UAAM,SAAS,QAAQ,CAAC;AACxB,kBAAc;AAEd,QAAI,OAAO,SAAS,sBAAS,UAAU,OAAO,SAAS,sBAAS,OAAO;AACrE,iBAAW,CAAC,OAAO,GAAG;AACtB,UACE,CAAC,aAAa,OAAO,GAAG,KACxB,OAAO,aAAa,OAAO,GAAG,MAAM,UACpC;AACA,qBAAa,OAAO,GAAG,IAAI,CAAC;AAAA,MAC9B;AACA,qBAAe,aAAa,OAAO,GAAG;AAAA,IACxC;AAEA,QACE,OAAO,SAAS,sBAAS,eACzB,OAAO,SAAS,sBAAS,aACzB;AACA,iBAAW,CAAC,OAAO,MAAM,OAAO,GAAG;AACnC,UACE,CAAC,aAAa,OAAO,IAAI,KACzB,OAAO,aAAa,OAAO,IAAI,MAAM,UACrC;AACA,qBAAa,OAAO,IAAI,IAAI,CAAC;AAAA,MAC/B;AACA,UACE,CAAC,aAAa,OAAO,IAAI,EAAE,OAAO,GAAG,KACrC,OAAO,aAAa,OAAO,IAAI,EAAE,OAAO,GAAG,MAAM,UACjD;AACA,qBAAa,OAAO,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;AAAA,MAC3C;AACA,qBAAe,aAAa,OAAO,IAAI,EAAE,OAAO,GAAG;AAAA,IACrD;AAEA,QACE,OAAO,SAAS,sBAAS,eACzB,OAAO,SAAS,sBAAS,WACzB;AACA,iBAAW,CAAC,OAAO,MAAM,OAAO,GAAG;AACnC,UACE,CAAC,aAAa,OAAO,IAAI,KACzB,OAAO,aAAa,OAAO,IAAI,MAAM,UACrC;AACA,qBAAa,OAAO,IAAI,IAAI,CAAC;AAAA,MAC/B;AACA,UACE,CAAC,aAAa,OAAO,IAAI,EAAE,OAAO,GAAG,KACrC,OAAO,aAAa,OAAO,IAAI,EAAE,OAAO,GAAG,MAAM,UACjD;AACA,qBAAa,OAAO,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;AAAA,MAC3C;AACA,qBAAe,aAAa,OAAO,IAAI,EAAE,OAAO,GAAG;AAAA,IACrD;AAEA,QACE,OAAO,SAAS,sBAAS,YACzB,OAAO,SAAS,sBAAS,WACzB;AACA,iBAAW,CAAC,OAAO,IAAI;AACvB,UACE,CAAC,aAAa,OAAO,IAAI,KACzB,OAAO,aAAa,OAAO,IAAI,MAAM,UACrC;AACA,qBAAa,OAAO,IAAI,IAAI;AAAA,MAC9B;AACA,qBAAe,aAAa,OAAO,IAAI;AAAA,IACzC;AAEA,QAAI,OAAO,SAAS,sBAAS,MAAM;AACjC,iBAAW,CAAC,SAAS;AAErB,qBAAe,aAAa,SAAS;AAAA,IACvC;AAEA,QAAI,OAAO,MAAM;AAGf,qBAAe;AAAA,IACjB;AAGA,QAAI,MAAM,QAAQ,SAAS,KAAK,eAAe,SAAS,SAAS,GAAG;AAClE,UAAI,SAAS;AAEb,iBAAW,OAAO,SAAS,MAAM,GAAG,EAAE,GAAG;AACvC,iBAAS,OAAO,GAAG;AAAA,MACrB;AACA,UAAI,OAAO,aAAa,aAAa;AACnC,eAAO,OAAO,SAAS,SAAS,SAAS,CAAC,CAAC;AAAA,MAC7C,OAAO;AACL,eAAO,SAAS,SAAS,SAAS,CAAC,CAAC,IAAI;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
1
+ {"version":3,"file":"editDictionaryByKeyPath.cjs","names":["currentValue: any","parentValue: any","lastKeys: LastKeyType[]","NodeType"],"sources":["../../../src/dictionaryManipulator/editDictionaryByKeyPath.ts"],"sourcesContent":["import { type ContentNode, type KeyPath, NodeType } from '@intlayer/types';\n\ntype LastKeyType = string | number;\n\nexport const editDictionaryByKeyPath = (\n dictionaryContent: ContentNode,\n keyPath: KeyPath[],\n newValue: ContentNode\n): ContentNode => {\n let currentValue: any = dictionaryContent;\n let parentValue: any = null;\n let lastKeys: LastKeyType[] = [];\n\n if (keyPath.length === 0) {\n return newValue;\n }\n\n try {\n for (let i = 0; i < keyPath.length; i++) {\n const keyObj = keyPath[i];\n parentValue = currentValue;\n\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n lastKeys = [keyObj.key];\n if (\n !currentValue[keyObj.key] ||\n typeof currentValue[keyObj.key] !== 'object'\n ) {\n currentValue[keyObj.key] = {};\n }\n currentValue = currentValue[keyObj.key];\n }\n\n if (\n keyObj.type === NodeType.Translation ||\n keyObj.type === NodeType.Enumeration\n ) {\n lastKeys = [keyObj.type, keyObj.key];\n if (\n !currentValue[keyObj.type] ||\n typeof currentValue[keyObj.type] !== 'object'\n ) {\n currentValue[keyObj.type] = {};\n }\n if (\n !currentValue[keyObj.type][keyObj.key] ||\n typeof currentValue[keyObj.type][keyObj.key] !== 'object'\n ) {\n currentValue[keyObj.type][keyObj.key] = {};\n }\n currentValue = currentValue[keyObj.type][keyObj.key];\n }\n\n if (\n keyObj.type === NodeType.Enumeration ||\n keyObj.type === NodeType.Condition\n ) {\n lastKeys = [keyObj.type, keyObj.key];\n if (\n !currentValue[keyObj.type] ||\n typeof currentValue[keyObj.type] !== 'object'\n ) {\n currentValue[keyObj.type] = {};\n }\n if (\n !currentValue[keyObj.type][keyObj.key] ||\n typeof currentValue[keyObj.type][keyObj.key] !== 'object'\n ) {\n currentValue[keyObj.type][keyObj.key] = {};\n }\n currentValue = currentValue[keyObj.type][keyObj.key];\n }\n\n if (\n keyObj.type === NodeType.Markdown ||\n keyObj.type === NodeType.Insertion\n ) {\n lastKeys = [keyObj.type];\n if (\n !currentValue[keyObj.type] ||\n typeof currentValue[keyObj.type] !== 'object'\n ) {\n currentValue[keyObj.type] = '';\n }\n currentValue = currentValue[keyObj.type];\n }\n\n if (keyObj.type === NodeType.File) {\n lastKeys = ['content'];\n\n currentValue = currentValue.content;\n }\n\n if (keyObj.type) {\n // No treated TypedNode\n }\n\n // Only update the value when processing the last key in the keyPath.\n if (i === keyPath.length - 1 && parentValue && lastKeys.length > 0) {\n let target = parentValue;\n // Drill down if lastKeys contains more than one key.\n for (const key of lastKeys.slice(0, -1)) {\n target = target[key];\n }\n if (typeof newValue === 'undefined') {\n delete target[lastKeys[lastKeys.length - 1]];\n } else {\n target[lastKeys[lastKeys.length - 1]] = newValue;\n }\n }\n }\n\n return dictionaryContent;\n } catch (error) {\n console.error(\n 'Cannot edit dictionary by key path',\n { dictionaryContent, keyPath, newValue },\n error\n );\n return dictionaryContent;\n }\n};\n"],"mappings":";;;;;AAIA,MAAa,2BACX,mBACA,SACA,aACgB;CAChB,IAAIA,eAAoB;CACxB,IAAIC,cAAmB;CACvB,IAAIC,WAA0B,EAAE;AAEhC,KAAI,QAAQ,WAAW,EACrB,QAAO;AAGT,KAAI;AACF,OAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;GACvC,MAAM,SAAS,QAAQ;AACvB,iBAAc;AAEd,OAAI,OAAO,SAASC,0BAAS,UAAU,OAAO,SAASA,0BAAS,OAAO;AACrE,eAAW,CAAC,OAAO,IAAI;AACvB,QACE,CAAC,aAAa,OAAO,QACrB,OAAO,aAAa,OAAO,SAAS,SAEpC,cAAa,OAAO,OAAO,EAAE;AAE/B,mBAAe,aAAa,OAAO;;AAGrC,OACE,OAAO,SAASA,0BAAS,eACzB,OAAO,SAASA,0BAAS,aACzB;AACA,eAAW,CAAC,OAAO,MAAM,OAAO,IAAI;AACpC,QACE,CAAC,aAAa,OAAO,SACrB,OAAO,aAAa,OAAO,UAAU,SAErC,cAAa,OAAO,QAAQ,EAAE;AAEhC,QACE,CAAC,aAAa,OAAO,MAAM,OAAO,QAClC,OAAO,aAAa,OAAO,MAAM,OAAO,SAAS,SAEjD,cAAa,OAAO,MAAM,OAAO,OAAO,EAAE;AAE5C,mBAAe,aAAa,OAAO,MAAM,OAAO;;AAGlD,OACE,OAAO,SAASA,0BAAS,eACzB,OAAO,SAASA,0BAAS,WACzB;AACA,eAAW,CAAC,OAAO,MAAM,OAAO,IAAI;AACpC,QACE,CAAC,aAAa,OAAO,SACrB,OAAO,aAAa,OAAO,UAAU,SAErC,cAAa,OAAO,QAAQ,EAAE;AAEhC,QACE,CAAC,aAAa,OAAO,MAAM,OAAO,QAClC,OAAO,aAAa,OAAO,MAAM,OAAO,SAAS,SAEjD,cAAa,OAAO,MAAM,OAAO,OAAO,EAAE;AAE5C,mBAAe,aAAa,OAAO,MAAM,OAAO;;AAGlD,OACE,OAAO,SAASA,0BAAS,YACzB,OAAO,SAASA,0BAAS,WACzB;AACA,eAAW,CAAC,OAAO,KAAK;AACxB,QACE,CAAC,aAAa,OAAO,SACrB,OAAO,aAAa,OAAO,UAAU,SAErC,cAAa,OAAO,QAAQ;AAE9B,mBAAe,aAAa,OAAO;;AAGrC,OAAI,OAAO,SAASA,0BAAS,MAAM;AACjC,eAAW,CAAC,UAAU;AAEtB,mBAAe,aAAa;;AAG9B,OAAI,OAAO,MAAM;AAKjB,OAAI,MAAM,QAAQ,SAAS,KAAK,eAAe,SAAS,SAAS,GAAG;IAClE,IAAI,SAAS;AAEb,SAAK,MAAM,OAAO,SAAS,MAAM,GAAG,GAAG,CACrC,UAAS,OAAO;AAElB,QAAI,OAAO,aAAa,YACtB,QAAO,OAAO,SAAS,SAAS,SAAS;QAEzC,QAAO,SAAS,SAAS,SAAS,MAAM;;;AAK9C,SAAO;UACA,OAAO;AACd,UAAQ,MACN,sCACA;GAAE;GAAmB;GAAS;GAAU,EACxC,MACD;AACD,SAAO"}
@@ -1,42 +1,16 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var getContentNodeByKeyPath_exports = {};
20
- __export(getContentNodeByKeyPath_exports, {
21
- getContentNodeByKeyPath: () => getContentNodeByKeyPath
22
- });
23
- module.exports = __toCommonJS(getContentNodeByKeyPath_exports);
24
- var import_types = require('../types/index.cjs');
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ let __intlayer_types = require("@intlayer/types");
3
+ __intlayer_types = require_rolldown_runtime.__toESM(__intlayer_types);
4
+
5
+ //#region src/dictionaryManipulator/getContentNodeByKeyPath.ts
25
6
  const getContentNodeByKeyPath = (dictionaryContent, keyPath) => {
26
- let currentValue = structuredClone(dictionaryContent);
27
- for (const keyObj of keyPath) {
28
- if (keyObj.type === import_types.NodeType.Object || keyObj.type === import_types.NodeType.Array) {
29
- currentValue = currentValue?.[keyObj.key];
30
- } else if (keyObj.type === import_types.NodeType.Translation || keyObj.type === import_types.NodeType.Condition || keyObj.type === import_types.NodeType.Enumeration) {
31
- currentValue = currentValue?.[keyObj.type][keyObj.key];
32
- } else if (keyObj.type === import_types.NodeType.Markdown || keyObj.type === import_types.NodeType.Insertion || keyObj.type === import_types.NodeType.File) {
33
- currentValue = currentValue?.[keyObj.type];
34
- }
35
- }
36
- return currentValue;
7
+ let currentValue = structuredClone(dictionaryContent);
8
+ for (const keyObj of keyPath) if (keyObj.type === __intlayer_types.NodeType.Object || keyObj.type === __intlayer_types.NodeType.Array) currentValue = currentValue?.[keyObj.key];
9
+ else if (keyObj.type === __intlayer_types.NodeType.Translation || keyObj.type === __intlayer_types.NodeType.Condition || keyObj.type === __intlayer_types.NodeType.Enumeration) currentValue = currentValue?.[keyObj.type]?.[keyObj.key];
10
+ else if (keyObj.type === __intlayer_types.NodeType.Markdown || keyObj.type === __intlayer_types.NodeType.Insertion || keyObj.type === __intlayer_types.NodeType.File) currentValue = currentValue?.[keyObj.type];
11
+ return currentValue;
37
12
  };
38
- // Annotate the CommonJS export names for ESM import in node:
39
- 0 && (module.exports = {
40
- getContentNodeByKeyPath
41
- });
13
+
14
+ //#endregion
15
+ exports.getContentNodeByKeyPath = getContentNodeByKeyPath;
42
16
  //# sourceMappingURL=getContentNodeByKeyPath.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/dictionaryManipulator/getContentNodeByKeyPath.ts"],"sourcesContent":["import { type KeyPath, NodeType } from '../types';\nimport type { ContentNode } from '../types/dictionary';\n\nexport const getContentNodeByKeyPath = (\n dictionaryContent: ContentNode,\n keyPath: KeyPath[]\n): ContentNode => {\n let currentValue: any = structuredClone(dictionaryContent);\n\n for (const keyObj of keyPath) {\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n currentValue = currentValue?.[keyObj.key];\n } else if (\n keyObj.type === NodeType.Translation ||\n keyObj.type === NodeType.Condition ||\n keyObj.type === NodeType.Enumeration\n ) {\n currentValue = currentValue?.[keyObj.type][keyObj.key];\n } else if (\n keyObj.type === NodeType.Markdown ||\n keyObj.type === NodeType.Insertion ||\n keyObj.type === NodeType.File\n ) {\n currentValue = currentValue?.[keyObj.type];\n }\n }\n\n return currentValue as ContentNode;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAuC;AAGhC,MAAM,0BAA0B,CACrC,mBACA,YACgB;AAChB,MAAI,eAAoB,gBAAgB,iBAAiB;AAEzD,aAAW,UAAU,SAAS;AAC5B,QAAI,OAAO,SAAS,sBAAS,UAAU,OAAO,SAAS,sBAAS,OAAO;AACrE,qBAAe,eAAe,OAAO,GAAG;AAAA,IAC1C,WACE,OAAO,SAAS,sBAAS,eACzB,OAAO,SAAS,sBAAS,aACzB,OAAO,SAAS,sBAAS,aACzB;AACA,qBAAe,eAAe,OAAO,IAAI,EAAE,OAAO,GAAG;AAAA,IACvD,WACE,OAAO,SAAS,sBAAS,YACzB,OAAO,SAAS,sBAAS,aACzB,OAAO,SAAS,sBAAS,MACzB;AACA,qBAAe,eAAe,OAAO,IAAI;AAAA,IAC3C;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
1
+ {"version":3,"file":"getContentNodeByKeyPath.cjs","names":["currentValue: any","NodeType"],"sources":["../../../src/dictionaryManipulator/getContentNodeByKeyPath.ts"],"sourcesContent":["import { type ContentNode, type KeyPath, NodeType } from '@intlayer/types';\n\nexport const getContentNodeByKeyPath = (\n dictionaryContent: ContentNode,\n keyPath: KeyPath[]\n): ContentNode => {\n let currentValue: any = structuredClone(dictionaryContent);\n\n for (const keyObj of keyPath) {\n if (keyObj.type === NodeType.Object || keyObj.type === NodeType.Array) {\n currentValue = currentValue?.[keyObj.key];\n } else if (\n keyObj.type === NodeType.Translation ||\n keyObj.type === NodeType.Condition ||\n keyObj.type === NodeType.Enumeration\n ) {\n currentValue = currentValue?.[keyObj.type]?.[keyObj.key];\n } else if (\n keyObj.type === NodeType.Markdown ||\n keyObj.type === NodeType.Insertion ||\n keyObj.type === NodeType.File\n ) {\n currentValue = currentValue?.[keyObj.type];\n }\n }\n\n return currentValue as ContentNode;\n};\n"],"mappings":";;;;;AAEA,MAAa,2BACX,mBACA,YACgB;CAChB,IAAIA,eAAoB,gBAAgB,kBAAkB;AAE1D,MAAK,MAAM,UAAU,QACnB,KAAI,OAAO,SAASC,0BAAS,UAAU,OAAO,SAASA,0BAAS,MAC9D,gBAAe,eAAe,OAAO;UAErC,OAAO,SAASA,0BAAS,eACzB,OAAO,SAASA,0BAAS,aACzB,OAAO,SAASA,0BAAS,YAEzB,gBAAe,eAAe,OAAO,QAAQ,OAAO;UAEpD,OAAO,SAASA,0BAAS,YACzB,OAAO,SAASA,0BAAS,aACzB,OAAO,SAASA,0BAAS,KAEzB,gBAAe,eAAe,OAAO;AAIzC,QAAO"}
@@ -1,97 +1,51 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var getDefaultNode_exports = {};
20
- __export(getDefaultNode_exports, {
21
- getDefaultNode: () => getDefaultNode
22
- });
23
- module.exports = __toCommonJS(getDefaultNode_exports);
24
- var import_types = require('../types/index.cjs');
1
+ const require_rolldown_runtime = require('../_virtual/rolldown_runtime.cjs');
2
+ let __intlayer_types = require("@intlayer/types");
3
+ __intlayer_types = require_rolldown_runtime.__toESM(__intlayer_types);
4
+
5
+ //#region src/dictionaryManipulator/getDefaultNode.ts
25
6
  const getDefaultNode = (nodeType, locales, content) => {
26
- const clonedContent = structuredClone(content);
27
- switch (nodeType) {
28
- case import_types.NodeType.Translation:
29
- return {
30
- nodeType: import_types.NodeType.Translation,
31
- [import_types.NodeType.Translation]: Object.assign(
32
- {},
33
- ...locales.map((locale) => ({
34
- [locale]: structuredClone(clonedContent) ?? ""
35
- }))
36
- )
37
- };
38
- case import_types.NodeType.Enumeration:
39
- return {
40
- nodeType: import_types.NodeType.Enumeration,
41
- [import_types.NodeType.Enumeration]: {
42
- "1": clonedContent ?? ""
43
- }
44
- };
45
- case import_types.NodeType.Condition:
46
- return {
47
- nodeType: import_types.NodeType.Condition,
48
- [import_types.NodeType.Condition]: {
49
- true: clonedContent ?? "",
50
- false: clonedContent ?? ""
51
- }
52
- };
53
- case import_types.NodeType.Insertion:
54
- return {
55
- nodeType: import_types.NodeType.Insertion,
56
- [import_types.NodeType.Insertion]: {
57
- insertion: clonedContent ?? ""
58
- }
59
- };
60
- case import_types.NodeType.Nested:
61
- return {
62
- nodeType: import_types.NodeType.Nested,
63
- [import_types.NodeType.Nested]: {
64
- dictionaryKey: ""
65
- }
66
- };
67
- case import_types.NodeType.Markdown:
68
- return {
69
- nodeType: import_types.NodeType.Markdown,
70
- [import_types.NodeType.Markdown]: clonedContent ?? ""
71
- };
72
- case import_types.NodeType.File:
73
- return {
74
- nodeType: import_types.NodeType.File,
75
- [import_types.NodeType.File]: clonedContent ?? ""
76
- };
77
- case import_types.NodeType.Object:
78
- return {
79
- newKey: clonedContent ?? ""
80
- };
81
- case import_types.NodeType.Array:
82
- return [clonedContent ?? ""];
83
- case import_types.NodeType.Text:
84
- return clonedContent ?? "";
85
- case import_types.NodeType.Number:
86
- return clonedContent ?? 0;
87
- case import_types.NodeType.Boolean:
88
- return clonedContent ?? true;
89
- default:
90
- return clonedContent ?? "";
91
- }
7
+ const clonedContent = structuredClone(content);
8
+ switch (nodeType) {
9
+ case __intlayer_types.NodeType.Translation: return {
10
+ nodeType: __intlayer_types.NodeType.Translation,
11
+ [__intlayer_types.NodeType.Translation]: Object.assign({}, ...locales.map((locale) => ({ [locale]: structuredClone(clonedContent) ?? "" })))
12
+ };
13
+ case __intlayer_types.NodeType.Enumeration: return {
14
+ nodeType: __intlayer_types.NodeType.Enumeration,
15
+ [__intlayer_types.NodeType.Enumeration]: { "1": clonedContent ?? "" }
16
+ };
17
+ case __intlayer_types.NodeType.Condition: return {
18
+ nodeType: __intlayer_types.NodeType.Condition,
19
+ [__intlayer_types.NodeType.Condition]: {
20
+ true: clonedContent ?? "",
21
+ false: clonedContent ?? ""
22
+ }
23
+ };
24
+ case __intlayer_types.NodeType.Insertion: return {
25
+ nodeType: __intlayer_types.NodeType.Insertion,
26
+ [__intlayer_types.NodeType.Insertion]: { insertion: clonedContent ?? "" }
27
+ };
28
+ case __intlayer_types.NodeType.Nested: return {
29
+ nodeType: __intlayer_types.NodeType.Nested,
30
+ [__intlayer_types.NodeType.Nested]: { dictionaryKey: "" }
31
+ };
32
+ case __intlayer_types.NodeType.Markdown: return {
33
+ nodeType: __intlayer_types.NodeType.Markdown,
34
+ [__intlayer_types.NodeType.Markdown]: clonedContent ?? ""
35
+ };
36
+ case __intlayer_types.NodeType.File: return {
37
+ nodeType: __intlayer_types.NodeType.File,
38
+ [__intlayer_types.NodeType.File]: clonedContent ?? ""
39
+ };
40
+ case __intlayer_types.NodeType.Object: return { newKey: clonedContent ?? "" };
41
+ case __intlayer_types.NodeType.Array: return [clonedContent ?? ""];
42
+ case __intlayer_types.NodeType.Text: return clonedContent ?? "";
43
+ case __intlayer_types.NodeType.Number: return clonedContent ?? 0;
44
+ case __intlayer_types.NodeType.Boolean: return clonedContent ?? true;
45
+ default: return clonedContent ?? "";
46
+ }
92
47
  };
93
- // Annotate the CommonJS export names for ESM import in node:
94
- 0 && (module.exports = {
95
- getDefaultNode
96
- });
48
+
49
+ //#endregion
50
+ exports.getDefaultNode = getDefaultNode;
97
51
  //# sourceMappingURL=getDefaultNode.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/dictionaryManipulator/getDefaultNode.ts"],"sourcesContent":["import type { LocalesValues } from '@intlayer/config/client';\nimport { type ContentNode, NodeType } from '../types';\n\nexport const getDefaultNode = (\n nodeType: NodeType,\n locales: LocalesValues[],\n content?: ContentNode\n): ContentNode => {\n const clonedContent = structuredClone(content);\n switch (nodeType) {\n case NodeType.Translation:\n return {\n nodeType: NodeType.Translation,\n [NodeType.Translation]: Object.assign(\n {},\n ...locales.map((locale) => ({\n [locale]: structuredClone(clonedContent) ?? '',\n }))\n ),\n } as ContentNode;\n\n case NodeType.Enumeration:\n return {\n nodeType: NodeType.Enumeration,\n [NodeType.Enumeration]: {\n '1': clonedContent ?? '',\n },\n } as ContentNode;\n\n case NodeType.Condition:\n return {\n nodeType: NodeType.Condition,\n [NodeType.Condition]: {\n true: clonedContent ?? '',\n false: clonedContent ?? '',\n },\n } as ContentNode;\n\n case NodeType.Insertion:\n return {\n nodeType: NodeType.Insertion,\n [NodeType.Insertion]: {\n insertion: clonedContent ?? '',\n },\n } as unknown as ContentNode;\n\n case NodeType.Nested:\n return {\n nodeType: NodeType.Nested,\n [NodeType.Nested]: {\n dictionaryKey: '',\n },\n } as ContentNode;\n\n case NodeType.Markdown:\n return {\n nodeType: NodeType.Markdown,\n [NodeType.Markdown]: clonedContent ?? '',\n } as ContentNode;\n\n case NodeType.File:\n return {\n nodeType: NodeType.File,\n [NodeType.File]: clonedContent ?? '',\n } as ContentNode;\n\n case NodeType.Object:\n return {\n newKey: clonedContent ?? '',\n } as unknown as ContentNode;\n\n case NodeType.Array:\n return [clonedContent ?? ''] as unknown as ContentNode;\n\n case NodeType.Text:\n return clonedContent ?? '';\n\n case NodeType.Number:\n return clonedContent ?? 0;\n\n case NodeType.Boolean:\n return clonedContent ?? true;\n\n default:\n return clonedContent ?? '';\n }\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAA2C;AAEpC,MAAM,iBAAiB,CAC5B,UACA,SACA,YACgB;AAChB,QAAM,gBAAgB,gBAAgB,OAAO;AAC7C,UAAQ,UAAU;AAAA,IAChB,KAAK,sBAAS;AACZ,aAAO;AAAA,QACL,UAAU,sBAAS;AAAA,QACnB,CAAC,sBAAS,WAAW,GAAG,OAAO;AAAA,UAC7B,CAAC;AAAA,UACD,GAAG,QAAQ,IAAI,CAAC,YAAY;AAAA,YAC1B,CAAC,MAAM,GAAG,gBAAgB,aAAa,KAAK;AAAA,UAC9C,EAAE;AAAA,QACJ;AAAA,MACF;AAAA,IAEF,KAAK,sBAAS;AACZ,aAAO;AAAA,QACL,UAAU,sBAAS;AAAA,QACnB,CAAC,sBAAS,WAAW,GAAG;AAAA,UACtB,KAAK,iBAAiB;AAAA,QACxB;AAAA,MACF;AAAA,IAEF,KAAK,sBAAS;AACZ,aAAO;AAAA,QACL,UAAU,sBAAS;AAAA,QACnB,CAAC,sBAAS,SAAS,GAAG;AAAA,UACpB,MAAM,iBAAiB;AAAA,UACvB,OAAO,iBAAiB;AAAA,QAC1B;AAAA,MACF;AAAA,IAEF,KAAK,sBAAS;AACZ,aAAO;AAAA,QACL,UAAU,sBAAS;AAAA,QACnB,CAAC,sBAAS,SAAS,GAAG;AAAA,UACpB,WAAW,iBAAiB;AAAA,QAC9B;AAAA,MACF;AAAA,IAEF,KAAK,sBAAS;AACZ,aAAO;AAAA,QACL,UAAU,sBAAS;AAAA,QACnB,CAAC,sBAAS,MAAM,GAAG;AAAA,UACjB,eAAe;AAAA,QACjB;AAAA,MACF;AAAA,IAEF,KAAK,sBAAS;AACZ,aAAO;AAAA,QACL,UAAU,sBAAS;AAAA,QACnB,CAAC,sBAAS,QAAQ,GAAG,iBAAiB;AAAA,MACxC;AAAA,IAEF,KAAK,sBAAS;AACZ,aAAO;AAAA,QACL,UAAU,sBAAS;AAAA,QACnB,CAAC,sBAAS,IAAI,GAAG,iBAAiB;AAAA,MACpC;AAAA,IAEF,KAAK,sBAAS;AACZ,aAAO;AAAA,QACL,QAAQ,iBAAiB;AAAA,MAC3B;AAAA,IAEF,KAAK,sBAAS;AACZ,aAAO,CAAC,iBAAiB,EAAE;AAAA,IAE7B,KAAK,sBAAS;AACZ,aAAO,iBAAiB;AAAA,IAE1B,KAAK,sBAAS;AACZ,aAAO,iBAAiB;AAAA,IAE1B,KAAK,sBAAS;AACZ,aAAO,iBAAiB;AAAA,IAE1B;AACE,aAAO,iBAAiB;AAAA,EAC5B;AACF;","names":[]}
1
+ {"version":3,"file":"getDefaultNode.cjs","names":["NodeType"],"sources":["../../../src/dictionaryManipulator/getDefaultNode.ts"],"sourcesContent":["import {\n type ContentNode,\n type LocalesValues,\n NodeType,\n} from '@intlayer/types';\n\nexport const getDefaultNode = (\n nodeType: NodeType,\n locales: LocalesValues[],\n content?: ContentNode\n): ContentNode => {\n const clonedContent = structuredClone(content);\n switch (nodeType) {\n case NodeType.Translation:\n return {\n nodeType: NodeType.Translation,\n [NodeType.Translation]: Object.assign(\n {},\n ...locales.map((locale) => ({\n [locale]: structuredClone(clonedContent) ?? '',\n }))\n ),\n } as ContentNode;\n\n case NodeType.Enumeration:\n return {\n nodeType: NodeType.Enumeration,\n [NodeType.Enumeration]: {\n '1': clonedContent ?? '',\n },\n } as ContentNode;\n\n case NodeType.Condition:\n return {\n nodeType: NodeType.Condition,\n [NodeType.Condition]: {\n true: clonedContent ?? '',\n false: clonedContent ?? '',\n },\n } as ContentNode;\n\n case NodeType.Insertion:\n return {\n nodeType: NodeType.Insertion,\n [NodeType.Insertion]: {\n insertion: clonedContent ?? '',\n },\n } as unknown as ContentNode;\n\n case NodeType.Nested:\n return {\n nodeType: NodeType.Nested,\n [NodeType.Nested]: {\n dictionaryKey: '',\n },\n } as ContentNode;\n\n case NodeType.Markdown:\n return {\n nodeType: NodeType.Markdown,\n [NodeType.Markdown]: clonedContent ?? '',\n } as ContentNode;\n\n case NodeType.File:\n return {\n nodeType: NodeType.File,\n [NodeType.File]: clonedContent ?? '',\n } as ContentNode;\n\n case NodeType.Object:\n return {\n newKey: clonedContent ?? '',\n } as unknown as ContentNode;\n\n case NodeType.Array:\n return [clonedContent ?? ''] as unknown as ContentNode;\n\n case NodeType.Text:\n return clonedContent ?? '';\n\n case NodeType.Number:\n return clonedContent ?? 0;\n\n case NodeType.Boolean:\n return clonedContent ?? true;\n\n default:\n return clonedContent ?? '';\n }\n};\n"],"mappings":";;;;;AAMA,MAAa,kBACX,UACA,SACA,YACgB;CAChB,MAAM,gBAAgB,gBAAgB,QAAQ;AAC9C,SAAQ,UAAR;EACE,KAAKA,0BAAS,YACZ,QAAO;GACL,UAAUA,0BAAS;IAClBA,0BAAS,cAAc,OAAO,OAC7B,EAAE,EACF,GAAG,QAAQ,KAAK,YAAY,GACzB,SAAS,gBAAgB,cAAc,IAAI,IAC7C,EAAE,CACJ;GACF;EAEH,KAAKA,0BAAS,YACZ,QAAO;GACL,UAAUA,0BAAS;IAClBA,0BAAS,cAAc,EACtB,KAAK,iBAAiB,IACvB;GACF;EAEH,KAAKA,0BAAS,UACZ,QAAO;GACL,UAAUA,0BAAS;IAClBA,0BAAS,YAAY;IACpB,MAAM,iBAAiB;IACvB,OAAO,iBAAiB;IACzB;GACF;EAEH,KAAKA,0BAAS,UACZ,QAAO;GACL,UAAUA,0BAAS;IAClBA,0BAAS,YAAY,EACpB,WAAW,iBAAiB,IAC7B;GACF;EAEH,KAAKA,0BAAS,OACZ,QAAO;GACL,UAAUA,0BAAS;IAClBA,0BAAS,SAAS,EACjB,eAAe,IAChB;GACF;EAEH,KAAKA,0BAAS,SACZ,QAAO;GACL,UAAUA,0BAAS;IAClBA,0BAAS,WAAW,iBAAiB;GACvC;EAEH,KAAKA,0BAAS,KACZ,QAAO;GACL,UAAUA,0BAAS;IAClBA,0BAAS,OAAO,iBAAiB;GACnC;EAEH,KAAKA,0BAAS,OACZ,QAAO,EACL,QAAQ,iBAAiB,IAC1B;EAEH,KAAKA,0BAAS,MACZ,QAAO,CAAC,iBAAiB,GAAG;EAE9B,KAAKA,0BAAS,KACZ,QAAO,iBAAiB;EAE1B,KAAKA,0BAAS,OACZ,QAAO,iBAAiB;EAE1B,KAAKA,0BAAS,QACZ,QAAO,iBAAiB;EAE1B,QACE,QAAO,iBAAiB"}