@treeviz/gedcom-parser 1.0.1

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 (321) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +954 -0
  3. package/dist/classes/common.d.ts +87 -0
  4. package/dist/classes/common.d.ts.map +1 -0
  5. package/dist/classes/common.js +481 -0
  6. package/dist/classes/date.d.ts +26 -0
  7. package/dist/classes/date.d.ts.map +1 -0
  8. package/dist/classes/date.js +176 -0
  9. package/dist/classes/fam.d.ts +19 -0
  10. package/dist/classes/fam.d.ts.map +1 -0
  11. package/dist/classes/fam.js +38 -0
  12. package/dist/classes/fams.d.ts +16 -0
  13. package/dist/classes/fams.d.ts.map +1 -0
  14. package/dist/classes/fams.js +41 -0
  15. package/dist/classes/gedcom.d.ts +89 -0
  16. package/dist/classes/gedcom.d.ts.map +1 -0
  17. package/dist/classes/gedcom.js +421 -0
  18. package/dist/classes/index.d.ts +19 -0
  19. package/dist/classes/index.d.ts.map +1 -0
  20. package/dist/classes/index.js +19 -0
  21. package/dist/classes/indi.d.ts +298 -0
  22. package/dist/classes/indi.d.ts.map +1 -0
  23. package/dist/classes/indi.js +2049 -0
  24. package/dist/classes/indis.d.ts +54 -0
  25. package/dist/classes/indis.d.ts.map +1 -0
  26. package/dist/classes/indis.js +439 -0
  27. package/dist/classes/list.d.ts +55 -0
  28. package/dist/classes/list.d.ts.map +1 -0
  29. package/dist/classes/list.js +440 -0
  30. package/dist/classes/name.d.ts +20 -0
  31. package/dist/classes/name.d.ts.map +1 -0
  32. package/dist/classes/name.js +48 -0
  33. package/dist/classes/note.d.ts +12 -0
  34. package/dist/classes/note.d.ts.map +1 -0
  35. package/dist/classes/note.js +46 -0
  36. package/dist/classes/obje.d.ts +12 -0
  37. package/dist/classes/obje.d.ts.map +1 -0
  38. package/dist/classes/obje.js +81 -0
  39. package/dist/classes/objes.d.ts +8 -0
  40. package/dist/classes/objes.d.ts.map +1 -0
  41. package/dist/classes/objes.js +13 -0
  42. package/dist/classes/repo.d.ts +11 -0
  43. package/dist/classes/repo.d.ts.map +1 -0
  44. package/dist/classes/repo.js +6 -0
  45. package/dist/classes/repos.d.ts +8 -0
  46. package/dist/classes/repos.d.ts.map +1 -0
  47. package/dist/classes/repos.js +13 -0
  48. package/dist/classes/sour.d.ts +11 -0
  49. package/dist/classes/sour.d.ts.map +1 -0
  50. package/dist/classes/sour.js +6 -0
  51. package/dist/classes/sours.d.ts +8 -0
  52. package/dist/classes/sours.d.ts.map +1 -0
  53. package/dist/classes/sours.js +13 -0
  54. package/dist/classes/subm.d.ts +10 -0
  55. package/dist/classes/subm.d.ts.map +1 -0
  56. package/dist/classes/subm.js +6 -0
  57. package/dist/classes/subms.d.ts +8 -0
  58. package/dist/classes/subms.d.ts.map +1 -0
  59. package/dist/classes/subms.js +13 -0
  60. package/dist/constants/constants.d.ts +14 -0
  61. package/dist/constants/constants.d.ts.map +1 -0
  62. package/dist/constants/constants.js +13 -0
  63. package/dist/constants/filters.d.ts +17 -0
  64. package/dist/constants/filters.d.ts.map +1 -0
  65. package/dist/constants/filters.js +44 -0
  66. package/dist/constants/index.d.ts +4 -0
  67. package/dist/constants/index.d.ts.map +1 -0
  68. package/dist/constants/index.js +4 -0
  69. package/dist/constants/orders.d.ts +17 -0
  70. package/dist/constants/orders.d.ts.map +1 -0
  71. package/dist/constants/orders.js +240 -0
  72. package/dist/factories/cache-factory.d.ts +30 -0
  73. package/dist/factories/cache-factory.d.ts.map +1 -0
  74. package/dist/factories/cache-factory.js +43 -0
  75. package/dist/factories/date-locale-factory.d.ts +30 -0
  76. package/dist/factories/date-locale-factory.d.ts.map +1 -0
  77. package/dist/factories/date-locale-factory.js +34 -0
  78. package/dist/factories/i18n-factory.d.ts +40 -0
  79. package/dist/factories/i18n-factory.d.ts.map +1 -0
  80. package/dist/factories/i18n-factory.js +44 -0
  81. package/dist/factories/index.d.ts +5 -0
  82. package/dist/factories/index.d.ts.map +1 -0
  83. package/dist/factories/index.js +5 -0
  84. package/dist/factories/kinship-factory.d.ts +38 -0
  85. package/dist/factories/kinship-factory.d.ts.map +1 -0
  86. package/dist/factories/kinship-factory.js +35 -0
  87. package/dist/factories/place-parser-provider.d.ts +32 -0
  88. package/dist/factories/place-parser-provider.d.ts.map +1 -0
  89. package/dist/factories/place-parser-provider.js +35 -0
  90. package/dist/factories/place-translator-provider.d.ts +32 -0
  91. package/dist/factories/place-translator-provider.d.ts.map +1 -0
  92. package/dist/factories/place-translator-provider.js +35 -0
  93. package/dist/index.d.ts +78 -0
  94. package/dist/index.d.ts.map +1 -0
  95. package/dist/index.js +44 -0
  96. package/dist/interfaces/common.d.ts +43 -0
  97. package/dist/interfaces/common.d.ts.map +1 -0
  98. package/dist/interfaces/common.js +1 -0
  99. package/dist/interfaces/fam.d.ts +11 -0
  100. package/dist/interfaces/fam.d.ts.map +1 -0
  101. package/dist/interfaces/fam.js +1 -0
  102. package/dist/interfaces/fams.d.ts +9 -0
  103. package/dist/interfaces/fams.d.ts.map +1 -0
  104. package/dist/interfaces/fams.js +1 -0
  105. package/dist/interfaces/gedcom.d.ts +30 -0
  106. package/dist/interfaces/gedcom.d.ts.map +1 -0
  107. package/dist/interfaces/gedcom.js +1 -0
  108. package/dist/interfaces/index.d.ts +12 -0
  109. package/dist/interfaces/index.d.ts.map +1 -0
  110. package/dist/interfaces/index.js +1 -0
  111. package/dist/interfaces/indi.d.ts +109 -0
  112. package/dist/interfaces/indi.d.ts.map +1 -0
  113. package/dist/interfaces/indi.js +1 -0
  114. package/dist/interfaces/indis.d.ts +31 -0
  115. package/dist/interfaces/indis.d.ts.map +1 -0
  116. package/dist/interfaces/indis.js +1 -0
  117. package/dist/interfaces/list.d.ts +52 -0
  118. package/dist/interfaces/list.d.ts.map +1 -0
  119. package/dist/interfaces/list.js +1 -0
  120. package/dist/interfaces/obje.d.ts +7 -0
  121. package/dist/interfaces/obje.d.ts.map +1 -0
  122. package/dist/interfaces/obje.js +1 -0
  123. package/dist/interfaces/repo.d.ts +7 -0
  124. package/dist/interfaces/repo.d.ts.map +1 -0
  125. package/dist/interfaces/repo.js +1 -0
  126. package/dist/interfaces/sour.d.ts +7 -0
  127. package/dist/interfaces/sour.d.ts.map +1 -0
  128. package/dist/interfaces/sour.js +1 -0
  129. package/dist/interfaces/subm.d.ts +6 -0
  130. package/dist/interfaces/subm.d.ts.map +1 -0
  131. package/dist/interfaces/subm.js +1 -0
  132. package/dist/kinship-translator/index.d.ts +11 -0
  133. package/dist/kinship-translator/index.d.ts.map +1 -0
  134. package/dist/kinship-translator/index.js +10 -0
  135. package/dist/kinship-translator/kinship-translator.basic.d.ts +30 -0
  136. package/dist/kinship-translator/kinship-translator.basic.d.ts.map +1 -0
  137. package/dist/kinship-translator/kinship-translator.basic.js +74 -0
  138. package/dist/kinship-translator/kinship-translator.d.ts +26 -0
  139. package/dist/kinship-translator/kinship-translator.d.ts.map +1 -0
  140. package/dist/kinship-translator/kinship-translator.de.d.ts +18 -0
  141. package/dist/kinship-translator/kinship-translator.de.d.ts.map +1 -0
  142. package/dist/kinship-translator/kinship-translator.de.js +180 -0
  143. package/dist/kinship-translator/kinship-translator.en.d.ts +18 -0
  144. package/dist/kinship-translator/kinship-translator.en.d.ts.map +1 -0
  145. package/dist/kinship-translator/kinship-translator.en.js +182 -0
  146. package/dist/kinship-translator/kinship-translator.es.d.ts +18 -0
  147. package/dist/kinship-translator/kinship-translator.es.d.ts.map +1 -0
  148. package/dist/kinship-translator/kinship-translator.es.js +181 -0
  149. package/dist/kinship-translator/kinship-translator.fr.d.ts +18 -0
  150. package/dist/kinship-translator/kinship-translator.fr.d.ts.map +1 -0
  151. package/dist/kinship-translator/kinship-translator.fr.js +181 -0
  152. package/dist/kinship-translator/kinship-translator.hu.d.ts +19 -0
  153. package/dist/kinship-translator/kinship-translator.hu.d.ts.map +1 -0
  154. package/dist/kinship-translator/kinship-translator.hu.js +226 -0
  155. package/dist/kinship-translator/kinship-translator.interface.d.ts +19 -0
  156. package/dist/kinship-translator/kinship-translator.interface.d.ts.map +1 -0
  157. package/dist/kinship-translator/kinship-translator.interface.js +1 -0
  158. package/dist/kinship-translator/kinship-translator.js +103 -0
  159. package/dist/kinship-translator/patterns.de.d.ts +2 -0
  160. package/dist/kinship-translator/patterns.de.d.ts.map +1 -0
  161. package/dist/kinship-translator/patterns.de.js +14 -0
  162. package/dist/kinship-translator/patterns.en.d.ts +2 -0
  163. package/dist/kinship-translator/patterns.en.d.ts.map +1 -0
  164. package/dist/kinship-translator/patterns.en.js +14 -0
  165. package/dist/kinship-translator/patterns.es.d.ts +2 -0
  166. package/dist/kinship-translator/patterns.es.d.ts.map +1 -0
  167. package/dist/kinship-translator/patterns.es.js +14 -0
  168. package/dist/kinship-translator/patterns.fr.d.ts +2 -0
  169. package/dist/kinship-translator/patterns.fr.d.ts.map +1 -0
  170. package/dist/kinship-translator/patterns.fr.js +14 -0
  171. package/dist/kinship-translator/patterns.hu.d.ts +6 -0
  172. package/dist/kinship-translator/patterns.hu.d.ts.map +1 -0
  173. package/dist/kinship-translator/patterns.hu.js +97 -0
  174. package/dist/kinship-translator/translators.d.ts +6 -0
  175. package/dist/kinship-translator/translators.d.ts.map +1 -0
  176. package/dist/kinship-translator/translators.js +5 -0
  177. package/dist/kinship-translator/types.d.ts +9 -0
  178. package/dist/kinship-translator/types.d.ts.map +1 -0
  179. package/dist/kinship-translator/types.js +1 -0
  180. package/dist/structures/address.d.ts +14 -0
  181. package/dist/structures/address.d.ts.map +1 -0
  182. package/dist/structures/address.js +1 -0
  183. package/dist/structures/association.d.ts +13 -0
  184. package/dist/structures/association.d.ts.map +1 -0
  185. package/dist/structures/association.js +1 -0
  186. package/dist/structures/change-date.d.ts +8 -0
  187. package/dist/structures/change-date.d.ts.map +1 -0
  188. package/dist/structures/change-date.js +1 -0
  189. package/dist/structures/creation-date.d.ts +7 -0
  190. package/dist/structures/creation-date.d.ts.map +1 -0
  191. package/dist/structures/creation-date.js +1 -0
  192. package/dist/structures/date.d.ts +9 -0
  193. package/dist/structures/date.d.ts.map +1 -0
  194. package/dist/structures/date.js +1 -0
  195. package/dist/structures/event-detail-structure.d.ts +25 -0
  196. package/dist/structures/event-detail-structure.d.ts.map +1 -0
  197. package/dist/structures/event-detail-structure.js +1 -0
  198. package/dist/structures/family.d.ts +34 -0
  199. package/dist/structures/family.d.ts.map +1 -0
  200. package/dist/structures/family.js +1 -0
  201. package/dist/structures/gedcom.d.ts +60 -0
  202. package/dist/structures/gedcom.d.ts.map +1 -0
  203. package/dist/structures/gedcom.js +1 -0
  204. package/dist/structures/index.d.ts +25 -0
  205. package/dist/structures/index.d.ts.map +1 -0
  206. package/dist/structures/index.js +1 -0
  207. package/dist/structures/individual-event-detail-structure.d.ts +9 -0
  208. package/dist/structures/individual-event-detail-structure.d.ts.map +1 -0
  209. package/dist/structures/individual-event-detail-structure.js +1 -0
  210. package/dist/structures/individual-event-structure.d.ts +83 -0
  211. package/dist/structures/individual-event-structure.d.ts.map +1 -0
  212. package/dist/structures/individual-event-structure.js +1 -0
  213. package/dist/structures/individual.d.ts +40 -0
  214. package/dist/structures/individual.d.ts.map +1 -0
  215. package/dist/structures/individual.js +1 -0
  216. package/dist/structures/lds-ordinance-detail.d.ts +17 -0
  217. package/dist/structures/lds-ordinance-detail.d.ts.map +1 -0
  218. package/dist/structures/lds-ordinance-detail.js +1 -0
  219. package/dist/structures/lds-spouse-sealing.d.ts +7 -0
  220. package/dist/structures/lds-spouse-sealing.d.ts.map +1 -0
  221. package/dist/structures/lds-spouse-sealing.js +1 -0
  222. package/dist/structures/marriage-date.d.ts +11 -0
  223. package/dist/structures/marriage-date.d.ts.map +1 -0
  224. package/dist/structures/marriage-date.js +1 -0
  225. package/dist/structures/multimedia-link.d.ts +16 -0
  226. package/dist/structures/multimedia-link.d.ts.map +1 -0
  227. package/dist/structures/multimedia-link.js +1 -0
  228. package/dist/structures/non-event.d.ts +12 -0
  229. package/dist/structures/non-event.d.ts.map +1 -0
  230. package/dist/structures/non-event.js +1 -0
  231. package/dist/structures/note.d.ts +16 -0
  232. package/dist/structures/note.d.ts.map +1 -0
  233. package/dist/structures/note.js +1 -0
  234. package/dist/structures/personal-name-pieces.d.ts +11 -0
  235. package/dist/structures/personal-name-pieces.d.ts.map +1 -0
  236. package/dist/structures/personal-name-pieces.js +1 -0
  237. package/dist/structures/personal-name.d.ts +16 -0
  238. package/dist/structures/personal-name.d.ts.map +1 -0
  239. package/dist/structures/personal-name.js +1 -0
  240. package/dist/structures/place.d.ts +20 -0
  241. package/dist/structures/place.d.ts.map +1 -0
  242. package/dist/structures/place.js +1 -0
  243. package/dist/structures/repository.d.ts +6 -0
  244. package/dist/structures/repository.d.ts.map +1 -0
  245. package/dist/structures/repository.js +1 -0
  246. package/dist/structures/source-citation.d.ts +27 -0
  247. package/dist/structures/source-citation.d.ts.map +1 -0
  248. package/dist/structures/source-citation.js +1 -0
  249. package/dist/structures/source-repository-citation.d.ts +13 -0
  250. package/dist/structures/source-repository-citation.d.ts.map +1 -0
  251. package/dist/structures/source-repository-citation.js +1 -0
  252. package/dist/structures/source.d.ts +28 -0
  253. package/dist/structures/source.d.ts.map +1 -0
  254. package/dist/structures/source.js +1 -0
  255. package/dist/types/ancestry-media.d.ts +65 -0
  256. package/dist/types/ancestry-media.d.ts.map +1 -0
  257. package/dist/types/ancestry-media.js +1 -0
  258. package/dist/types/index.d.ts +4 -0
  259. package/dist/types/index.d.ts.map +1 -0
  260. package/dist/types/index.js +4 -0
  261. package/dist/types/settings.d.ts +12 -0
  262. package/dist/types/settings.d.ts.map +1 -0
  263. package/dist/types/settings.js +1 -0
  264. package/dist/types/types.d.ts +220 -0
  265. package/dist/types/types.d.ts.map +1 -0
  266. package/dist/types/types.js +26 -0
  267. package/dist/utils/cache.d.ts +22 -0
  268. package/dist/utils/cache.d.ts.map +1 -0
  269. package/dist/utils/cache.js +57 -0
  270. package/dist/utils/common-creator.d.ts +13 -0
  271. package/dist/utils/common-creator.d.ts.map +1 -0
  272. package/dist/utils/common-creator.js +72 -0
  273. package/dist/utils/date-formatter.d.ts +35 -0
  274. package/dist/utils/date-formatter.d.ts.map +1 -0
  275. package/dist/utils/date-formatter.js +207 -0
  276. package/dist/utils/get-all-prop.d.ts +4 -0
  277. package/dist/utils/get-all-prop.d.ts.map +1 -0
  278. package/dist/utils/get-all-prop.js +5 -0
  279. package/dist/utils/get-family-with.d.ts +5 -0
  280. package/dist/utils/get-family-with.d.ts.map +1 -0
  281. package/dist/utils/get-family-with.js +11 -0
  282. package/dist/utils/get-places.d.ts +21 -0
  283. package/dist/utils/get-places.d.ts.map +1 -0
  284. package/dist/utils/get-places.js +77 -0
  285. package/dist/utils/get-product-details.d.ts +4 -0
  286. package/dist/utils/get-product-details.d.ts.map +1 -0
  287. package/dist/utils/get-product-details.js +6 -0
  288. package/dist/utils/get-raw-size.d.ts +2 -0
  289. package/dist/utils/get-raw-size.d.ts.map +1 -0
  290. package/dist/utils/get-raw-size.js +3 -0
  291. package/dist/utils/index.d.ts +17 -0
  292. package/dist/utils/index.d.ts.map +1 -0
  293. package/dist/utils/index.js +18 -0
  294. package/dist/utils/logger.d.ts +3 -0
  295. package/dist/utils/logger.d.ts.map +1 -0
  296. package/dist/utils/logger.js +11 -0
  297. package/dist/utils/name-formatter.d.ts +10 -0
  298. package/dist/utils/name-formatter.d.ts.map +1 -0
  299. package/dist/utils/name-formatter.js +45 -0
  300. package/dist/utils/nested-group.d.ts +4 -0
  301. package/dist/utils/nested-group.d.ts.map +1 -0
  302. package/dist/utils/nested-group.js +34 -0
  303. package/dist/utils/ordinalize.d.ts +3 -0
  304. package/dist/utils/ordinalize.d.ts.map +1 -0
  305. package/dist/utils/ordinalize.js +104 -0
  306. package/dist/utils/parser.d.ts +17 -0
  307. package/dist/utils/parser.d.ts.map +1 -0
  308. package/dist/utils/parser.js +322 -0
  309. package/dist/utils/place-parser.d.ts +16 -0
  310. package/dist/utils/place-parser.d.ts.map +1 -0
  311. package/dist/utils/place-parser.js +46 -0
  312. package/dist/utils/place-translator.d.ts +6 -0
  313. package/dist/utils/place-translator.d.ts.map +1 -0
  314. package/dist/utils/place-translator.js +8 -0
  315. package/dist/utils/place-types.d.ts +27 -0
  316. package/dist/utils/place-types.d.ts.map +1 -0
  317. package/dist/utils/place-types.js +14 -0
  318. package/dist/utils/range.d.ts +19 -0
  319. package/dist/utils/range.d.ts.map +1 -0
  320. package/dist/utils/range.js +265 -0
  321. package/package.json +153 -0
@@ -0,0 +1,181 @@
1
+ import { nameFormatter } from "../utils/name-formatter";
2
+ import { ordinalize } from "../utils/ordinalize";
3
+ import KinshipTranslatorBasic from "./kinship-translator.basic";
4
+ import { InLawsFr } from "./patterns.fr";
5
+ export default class KinshipTranslatorFr extends KinshipTranslatorBasic {
6
+ directPrefix() {
7
+ const level = Math.abs(this.pathN?.level ?? 0);
8
+ if (level <= 1) {
9
+ return "";
10
+ }
11
+ if (level === 2) {
12
+ return "grand-";
13
+ }
14
+ if (level === 3) {
15
+ return "arrière-grand-";
16
+ }
17
+ return `arrière${level - 2}-grand-`;
18
+ }
19
+ indirect() {
20
+ let degree = Math.abs(this.pathN?.degree ?? 0);
21
+ if (degree > 0) {
22
+ degree = degree - 1;
23
+ }
24
+ if (degree === 1) {
25
+ return `cousin`;
26
+ }
27
+ return `cousin au ${ordinalize(degree)} degré`;
28
+ }
29
+ removal() {
30
+ const level = this.pathN?.level ?? 0;
31
+ let degree = Math.abs(this.pathN?.degree ?? 0);
32
+ if (degree > 0) {
33
+ degree = degree - 1;
34
+ }
35
+ if (!degree) {
36
+ return level < 0 ? this.nibling() : this.auncle();
37
+ }
38
+ return `cousin au ${ordinalize(degree)} degré ${Math.abs(level)}× éloigné`;
39
+ }
40
+ auncle() {
41
+ const prefix = this.directPrefix();
42
+ if (this.personN?.isMale()) {
43
+ return `${prefix}oncle`;
44
+ }
45
+ if (this.personN?.isFemale()) {
46
+ return `${prefix}tante`;
47
+ }
48
+ return `${prefix}oncle/tante`;
49
+ }
50
+ nibling() {
51
+ const prefix = this.directPrefix();
52
+ if (this.personN?.isMale()) {
53
+ return `${prefix}neveu`;
54
+ }
55
+ if (this.personN?.isFemale()) {
56
+ return `${prefix}nièce`;
57
+ }
58
+ return `${prefix}neveu/nièce`;
59
+ }
60
+ parent() {
61
+ const prefix = this.directPrefix();
62
+ if (this.personN?.isMale()) {
63
+ return `${prefix}père`;
64
+ }
65
+ if (this.personN?.isFemale()) {
66
+ return `${prefix}mère`;
67
+ }
68
+ return `${prefix}parent`;
69
+ }
70
+ child() {
71
+ const prefix = this.directPrefix();
72
+ if (this.personN?.isMale()) {
73
+ return `${prefix}fils`;
74
+ }
75
+ if (this.personN?.isFemale()) {
76
+ return `${prefix}fille`;
77
+ }
78
+ return `${prefix}enfant`;
79
+ }
80
+ sibling() {
81
+ const parents1 = this.person1?.getBiologicalParents();
82
+ const parentsN = this.personN?.getBiologicalParents();
83
+ const inter = parents1?.intersection(parentsN);
84
+ let prefix = "";
85
+ if (!inter || inter.length < 2) {
86
+ prefix = "demi-";
87
+ }
88
+ if (this.personN?.isMale()) {
89
+ return `${prefix}frère`;
90
+ }
91
+ if (this.personN?.isFemale()) {
92
+ return `${prefix}sœur`;
93
+ }
94
+ return `${prefix}frère/sœur`;
95
+ }
96
+ spouse() {
97
+ if (this.personN?.isMale()) {
98
+ return "mari";
99
+ }
100
+ if (this.personN?.isFemale()) {
101
+ return "épouse";
102
+ }
103
+ return "conjoint";
104
+ }
105
+ ofSpouse(relation) {
106
+ if (!relation) {
107
+ return "";
108
+ }
109
+ const spouse = this.path?.[1].indi;
110
+ let spouseType = "conjoint";
111
+ if (spouse?.isMale()) {
112
+ spouseType = "mari";
113
+ }
114
+ if (spouse?.isFemale()) {
115
+ spouseType = "épouse";
116
+ }
117
+ return `${relation} du ${spouseType}`;
118
+ }
119
+ spouseOf(relation) {
120
+ if (!relation) {
121
+ return "";
122
+ }
123
+ const spouse = this.path?.[this.path.length - 1].indi;
124
+ let spouseType = "conjoint";
125
+ if (spouse?.isMale()) {
126
+ spouseType = "mari";
127
+ }
128
+ if (spouse?.isFemale()) {
129
+ spouseType = "épouse";
130
+ }
131
+ return `${spouseType} de ${relation}`;
132
+ }
133
+ of(relation) {
134
+ const formattedName = nameFormatter(this.path?.[0]?.indi, {
135
+ nameOrder: "first-last",
136
+ });
137
+ let name = formattedName.inOrder.filter(Boolean).join(" ");
138
+ if (this.displayName === "none") {
139
+ name = "";
140
+ }
141
+ else if (this.displayName === "givenname") {
142
+ name = formattedName.givenname;
143
+ }
144
+ else if (this.displayName === "surname") {
145
+ name = `${formattedName.surname}`;
146
+ }
147
+ if (!name || !relation) {
148
+ return relation ?? "";
149
+ }
150
+ if (relation.includes(" du ") || relation.includes(" de ")) {
151
+ return relation.replace(/ (du|de) /, ` $1 ${name} `);
152
+ }
153
+ return `${relation} de ${name}`;
154
+ }
155
+ inLaw(relation) {
156
+ let inLawRelation = relation;
157
+ Object.keys(InLawsFr).find((pattern) => {
158
+ const regex = new RegExp(`(?<space> )(?<word1>${pattern})$|^(?<word2>${pattern})$`);
159
+ if (relation?.match(regex)) {
160
+ inLawRelation = relation?.replace(regex, (m, ...rest) => {
161
+ const groups = rest[rest.length - 1];
162
+ const word = groups?.word1 || groups?.word2;
163
+ if (!word) {
164
+ return m;
165
+ }
166
+ const toReplace = InLawsFr[word.trim()] || InLawsFr[pattern];
167
+ return toReplace ? `${groups.space || ""}${toReplace}` : m;
168
+ });
169
+ return true;
170
+ }
171
+ return false;
172
+ });
173
+ return inLawRelation ?? "";
174
+ }
175
+ relationType(relation) {
176
+ if (!relation || !this.pathN?.relation) {
177
+ return relation ?? "";
178
+ }
179
+ return `${this.pathN.relation} ${relation}`;
180
+ }
181
+ }
@@ -0,0 +1,19 @@
1
+ import KinshipTranslatorBasic from "./kinship-translator.basic";
2
+ export default class KinshipTranslatorHU extends KinshipTranslatorBasic {
3
+ private directPrefix;
4
+ private caseReplacer;
5
+ indirect(): string;
6
+ removal(): string;
7
+ auncle(): string;
8
+ nibling(): string;
9
+ parent(): string;
10
+ child(): string;
11
+ sibling(): "testvér" | "féltestvér";
12
+ spouse(): "férj" | "feleség" | "házastárs";
13
+ ofSpouse(relation?: string | undefined): string;
14
+ spouseOf(relation?: string | undefined): string;
15
+ of(relation?: string | undefined): string;
16
+ inLaw(relation?: string | undefined): string;
17
+ relationType(relation?: string | undefined): string;
18
+ }
19
+ //# sourceMappingURL=kinship-translator.hu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kinship-translator.hu.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/kinship-translator.hu.ts"],"names":[],"mappings":"AAGA,OAAO,sBAAsB,MAAM,4BAA4B,CAAC;AAIhE,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,sBAAsB;IACtE,OAAO,CAAC,YAAY;IA6BpB,OAAO,CAAC,YAAY;IA+BpB,QAAQ;IAaR,OAAO;IAgBP,MAAM;IA6BN,OAAO;IAmCP,MAAM;IAcN,KAAK;IAYL,OAAO;IAcP,MAAM;IAYN,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS;IAmBtC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS;IAuBtC,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS;IAoChC,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS;IA6CnC,YAAY,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS;CAO1C"}
@@ -0,0 +1,226 @@
1
+ import { nameFormatter } from "../utils/name-formatter";
2
+ import { hungarianOrdinalize } from "../utils/ordinalize";
3
+ import KinshipTranslatorBasic from "./kinship-translator.basic";
4
+ import { InLawsHu, casesHu, parentRelationsHu } from "./patterns.hu";
5
+ export default class KinshipTranslatorHU extends KinshipTranslatorBasic {
6
+ directPrefix(l) {
7
+ const level = l === undefined ? Math.abs(this.pathN?.level ?? 0) : l;
8
+ if (level <= 1) {
9
+ return "";
10
+ }
11
+ if (level === 2) {
12
+ return "nagy";
13
+ }
14
+ if (level === 3) {
15
+ return "déd";
16
+ }
17
+ if (level === 4) {
18
+ return "ük";
19
+ }
20
+ if (level === 5) {
21
+ return "szép";
22
+ }
23
+ if (level === 6) {
24
+ return "ős";
25
+ }
26
+ return `${level - 5}. ős`;
27
+ }
28
+ caseReplacer(relation, to, from = "nominativus", mod = "$") {
29
+ let newRelation = relation;
30
+ Object.keys(casesHu[from]).forEach((c) => {
31
+ newRelation = newRelation.replace(new RegExp(`(?<word1>${c}(?<mod>${mod}))`), (m, ...rest) => {
32
+ const groups = rest[rest.length - 1];
33
+ const word = groups?.word1 || groups?.word2;
34
+ if (!word) {
35
+ return m;
36
+ }
37
+ const toReplace = casesHu[from][word.trim()][to];
38
+ return toReplace ? `${toReplace}${groups.mod || ""}` : m;
39
+ });
40
+ });
41
+ return newRelation;
42
+ }
43
+ indirect() {
44
+ let degree = Math.abs(this.pathN?.degree ?? 0);
45
+ if (degree > 0) {
46
+ degree = degree - 1;
47
+ }
48
+ if (degree === 1) {
49
+ return `unokatestvér`;
50
+ }
51
+ return `${hungarianOrdinalize(degree)}unokatestvér`;
52
+ }
53
+ removal() {
54
+ const level = this.pathN?.level ?? 0;
55
+ let degree = Math.abs(this.pathN?.degree ?? 0);
56
+ if (degree > 0) {
57
+ degree = degree - 1;
58
+ }
59
+ if (!degree || (Math.abs(level) >= 1 && Math.abs(level) <= 6)) {
60
+ return level < 0 ? this.nibling() : this.auncle();
61
+ }
62
+ return `${hungarianOrdinalize(degree)}unokatestvér ${level}x eltávolítva`;
63
+ }
64
+ auncle() {
65
+ const level = this.pathN?.level ?? 0;
66
+ const degree = Math.abs(this.pathN?.degree ?? 0);
67
+ let degreeString = degree > 1 ? hungarianOrdinalize(degree) : "";
68
+ if (degreeString) {
69
+ degreeString = `${degreeString}-`;
70
+ }
71
+ let prefix = this.directPrefix();
72
+ const origPrefix = prefix;
73
+ if (level === 2) {
74
+ prefix = "nagy-";
75
+ }
76
+ if (this.personN?.isMale()) {
77
+ return `${degreeString}${prefix}nagybácsi`;
78
+ }
79
+ if (this.personN?.isFemale()) {
80
+ return `${degreeString}${prefix}nagynéni`;
81
+ }
82
+ return `${origPrefix}szülő ${degreeString ? `${degreeString}unoka` : ""}testvére`;
83
+ }
84
+ nibling() {
85
+ const level = Math.abs(this.pathN?.level ?? 0);
86
+ const degree = Math.abs(this.pathN?.degree ?? 0);
87
+ const ordinalized = degree > 1 ? hungarianOrdinalize(degree) : "";
88
+ let degreeString = ordinalized;
89
+ if (degreeString) {
90
+ degreeString = `${degreeString}-`;
91
+ }
92
+ const prefix = this.directPrefix(level + 1);
93
+ const origPrefix = this.directPrefix();
94
+ if (this.personN?.isMale()) {
95
+ return `${degreeString}${level === 1 ? origPrefix : prefix}unokaöcs`;
96
+ }
97
+ if (this.personN?.isFemale()) {
98
+ return `${degreeString}${level === 1 ? origPrefix : prefix}unokahúg`;
99
+ }
100
+ if (level <= 1) {
101
+ return `${ordinalized ? `${ordinalized}unoka` : ""}testvér gyermeke`;
102
+ }
103
+ return `${ordinalized ? `${ordinalized}unoka` : ""}testvér ${origPrefix.replace(/nagy$/, "")}unokája`;
104
+ }
105
+ parent() {
106
+ const prefix = this.directPrefix();
107
+ if (this.personN?.isMale()) {
108
+ return `${prefix}apa`;
109
+ }
110
+ if (this.personN?.isFemale()) {
111
+ return `${prefix}anya`;
112
+ }
113
+ return `${prefix}szülő`;
114
+ }
115
+ child() {
116
+ const level = Math.abs(this.pathN?.level ?? 0);
117
+ if (level <= 1) {
118
+ return "gyermek";
119
+ }
120
+ const prefix = this.directPrefix();
121
+ return `${prefix.replace(/nagy$/, "")}unoka`;
122
+ }
123
+ sibling() {
124
+ const parents1 = this.person1?.getBiologicalParents();
125
+ const parentsN = this.personN?.getBiologicalParents();
126
+ const inter = parents1?.intersection(parentsN);
127
+ // TODO if both has one parent in tree, this returns with an invalid/unsure half-blood state
128
+ if (!inter || inter.length < 2) {
129
+ return "féltestvér";
130
+ }
131
+ return "testvér";
132
+ }
133
+ spouse() {
134
+ if (this.personN?.isMale()) {
135
+ return "férj";
136
+ }
137
+ if (this.personN?.isFemale()) {
138
+ return "feleség";
139
+ }
140
+ return "házastárs";
141
+ }
142
+ ofSpouse(relation) {
143
+ if (!relation) {
144
+ return "";
145
+ }
146
+ const spouse = this.path?.[1].indi;
147
+ let spouseType = "házastárs";
148
+ if (spouse?.isMale()) {
149
+ spouseType = "férj";
150
+ }
151
+ if (spouse?.isFemale()) {
152
+ spouseType = "feleség";
153
+ }
154
+ return `${spouseType} ${this.caseReplacer(relation, "possessivus")}`;
155
+ }
156
+ spouseOf(relation) {
157
+ if (!relation) {
158
+ return "";
159
+ }
160
+ const spouse = this.path?.[this.path.length - 1].indi;
161
+ let spouseType = "házastársa";
162
+ if (spouse?.isMale()) {
163
+ spouseType = "férje";
164
+ }
165
+ if (spouse?.isFemale()) {
166
+ spouseType = "felesége";
167
+ }
168
+ return `${this.caseReplacer(relation, "nominativus", "possessivus")} ${spouseType}`;
169
+ }
170
+ of(relation) {
171
+ const formattedName = nameFormatter(this.path?.[0]?.indi, {
172
+ nameOrder: "last-first",
173
+ });
174
+ let name = formattedName.inOrder.filter(Boolean).join(" ");
175
+ if (this.displayName === "none") {
176
+ name = "";
177
+ }
178
+ else if (this.displayName === "givenname") {
179
+ name = formattedName.givenname;
180
+ }
181
+ else if (this.displayName === "surname") {
182
+ name = `${formattedName.surname}`;
183
+ }
184
+ const isSpouse = this.path?.[1].kinship === "spouse" ||
185
+ this.path?.[this.path.length - 1].kinship === "spouse";
186
+ if (!name || !relation) {
187
+ return relation ?? "";
188
+ }
189
+ if (isSpouse) {
190
+ return `${name} ${this.caseReplacer(this.caseReplacer(relation, "dativus", "nominativus", " "), "possessivus")}`;
191
+ }
192
+ return `${name} ${this.caseReplacer(this.caseReplacer(relation, "possessivus", "nominativus", " "), "possessivus")}`;
193
+ }
194
+ inLaw(relation) {
195
+ let inLawRelation = relation;
196
+ Object.keys(InLawsHu).find((pattern) => {
197
+ const regex = new RegExp(`(?<space> )(?<word1>${pattern})$|^(?<word2>${pattern.replace("?<mod1>", "?<mod2>")})$`);
198
+ if (relation?.match(regex)) {
199
+ inLawRelation = relation?.replace(regex, (m, ...rest) => {
200
+ const groups = rest[rest.length - 1];
201
+ const word = groups?.word1 || groups?.word2;
202
+ const mod = groups?.mod1 || groups?.mod2;
203
+ if (!word) {
204
+ return m;
205
+ }
206
+ let toReplace = InLawsHu[word.trim()] || InLawsHu[pattern];
207
+ if (typeof toReplace === "function") {
208
+ toReplace = toReplace(this.personN) ?? "";
209
+ }
210
+ return toReplace
211
+ ? `${groups.space || ""}${mod || ""}${toReplace}`
212
+ : m;
213
+ });
214
+ return true;
215
+ }
216
+ return false;
217
+ });
218
+ return inLawRelation ?? "";
219
+ }
220
+ relationType(relation) {
221
+ if (!relation || !this.pathN?.relation) {
222
+ return relation ?? "";
223
+ }
224
+ return `${parentRelationsHu[this.pathN.relation]} ${relation}`;
225
+ }
226
+ }
@@ -0,0 +1,19 @@
1
+ export type Kinship = "self" | "spouse" | "child" | "parent";
2
+ interface IKinshipTranslator {
3
+ isOfSpouse: boolean;
4
+ isSpouseOf: boolean;
5
+ displayName: "none" | "givenname" | "surname" | "all";
6
+ parent: () => string | undefined;
7
+ child: () => string | undefined;
8
+ sibling: () => string | undefined;
9
+ spouse: () => string | undefined;
10
+ indirect: () => string | undefined;
11
+ removal: () => string | undefined;
12
+ inLaw: (relation?: string) => string | undefined;
13
+ ofSpouse: (relation?: string) => string | undefined;
14
+ spouseOf: (relation?: string) => string | undefined;
15
+ relationType: (relation?: string) => string | undefined;
16
+ of: (relation?: string) => string | undefined;
17
+ }
18
+ export default IKinshipTranslator;
19
+ //# sourceMappingURL=kinship-translator.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kinship-translator.interface.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/kinship-translator.interface.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAC7D,UAAU,kBAAkB;IAC3B,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,KAAK,CAAC;IAEtD,MAAM,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAEjC,KAAK,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAEhC,OAAO,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAElC,MAAM,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAEjC,QAAQ,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAEnC,OAAO,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IAElC,KAAK,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAEjD,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAEpD,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAEpD,YAAY,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAExD,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAC9C;AAED,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,103 @@
1
+ import * as translators from "./translators";
2
+ export default class KinshipTranslator {
3
+ constructor(person1, person2, lang = "en", entirePath, displayName = "givenname") {
4
+ this.displayName = displayName;
5
+ this.lang = lang;
6
+ this.entirePath = entirePath;
7
+ this.person1 = person1;
8
+ this.person2 =
9
+ typeof person2 === "string"
10
+ ? this.person1.getGedcom()?.indi(person2)
11
+ : person2;
12
+ this.path = this.person1.path(this.person2);
13
+ if (translators[lang]) {
14
+ this.translator = new translators[lang](this.path ?? [], displayName);
15
+ }
16
+ // Fallback
17
+ if (!this.translator) {
18
+ // eslint-disable-next-line new-cap
19
+ this.translator = new translators.en(this.path ?? [], displayName);
20
+ }
21
+ }
22
+ get path0() {
23
+ return this.path?.[0];
24
+ }
25
+ get path1() {
26
+ return this.path?.[1];
27
+ }
28
+ get pathM() {
29
+ return this.path?.[this.path.length - 2];
30
+ }
31
+ get pathN() {
32
+ return this.path?.[this.path.length - 1];
33
+ }
34
+ direct() {
35
+ if (this.pathN?.level === 0 && this.pathN.degree === 0) {
36
+ return this.translator?.spouse();
37
+ }
38
+ if (this.pathN?.level === 0 && this.pathN.degree === 1) {
39
+ return this.translator?.sibling();
40
+ }
41
+ if ((this.pathN?.level ?? 0) > 0 && this.pathN?.degree === 0) {
42
+ return this.translator?.parent();
43
+ }
44
+ if ((this.pathN?.level ?? 0) < 0 && this.pathN?.degree === 0) {
45
+ return this.translator?.child();
46
+ }
47
+ }
48
+ indirect() {
49
+ return this.translator?.indirect();
50
+ }
51
+ removal() {
52
+ return this.translator?.removal();
53
+ }
54
+ translate(showMainPerson) {
55
+ if (this.entirePath) {
56
+ const path = this.path?.map((path, index) => ({
57
+ id: path.indi.id,
58
+ gen: path.level,
59
+ absolute: this.person1.kinship(path.indi.id, showMainPerson, this.lang, false, this.displayName),
60
+ relative: this.path?.[index - 1]?.indi.kinship(path.indi.id, showMainPerson, this.lang, false, this.displayName),
61
+ }));
62
+ return path;
63
+ }
64
+ const person1 = this.path0;
65
+ const person2 = this.path1;
66
+ const personM = this.pathM;
67
+ const personN = this.pathN;
68
+ if (!person1 || !person2 || !personM || !personN) {
69
+ return "";
70
+ }
71
+ if (person2.kinship === "spouse" &&
72
+ person2.indi.id !== personN.indi.id) {
73
+ this.translator && (this.translator.isOfSpouse = true);
74
+ }
75
+ else if (personN.kinship === "spouse" &&
76
+ person2.indi.id !== personN.indi.id) {
77
+ this.translator && (this.translator.isSpouseOf = true);
78
+ }
79
+ let relation;
80
+ if (personN.degree === 0 ||
81
+ (personN.degree === 1 && personN.level === 0)) {
82
+ relation = this.direct();
83
+ }
84
+ else if (personN.level === 0) {
85
+ relation = this.indirect();
86
+ }
87
+ else if (personN.level !== 0) {
88
+ relation = this.removal();
89
+ }
90
+ relation = this.translator?.relationType(relation);
91
+ if (this.translator?.isOfSpouse) {
92
+ relation = this.translator?.ofSpouse(relation);
93
+ }
94
+ else if (this.translator?.isSpouseOf) {
95
+ relation = this.translator?.spouseOf(relation);
96
+ }
97
+ relation = this.translator?.inLaw(relation);
98
+ if (showMainPerson && relation) {
99
+ relation = this.translator?.of(relation);
100
+ }
101
+ return relation ?? "";
102
+ }
103
+ }
@@ -0,0 +1,2 @@
1
+ export declare const InLawsDe: Record<string, string>;
2
+ //# sourceMappingURL=patterns.de.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patterns.de.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/patterns.de.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAe3C,CAAC"}
@@ -0,0 +1,14 @@
1
+ export const InLawsDe = {
2
+ "Ehepartner von (kind|tochter|sohn)": "Schwiegerkind",
3
+ "Ehefrau von (kind|tochter|sohn)": "Schwiegertochter",
4
+ "Ehemann von (kind|tochter|sohn)": "Schwiegersohn",
5
+ "mutter des (Ehepartner|Ehefrau|Ehemann)s": "Schwiegermutter",
6
+ "vater des (Ehepartner|Ehefrau|Ehemann)s": "Schwiegervater",
7
+ "elternteil des (Ehepartner|Ehefrau|Ehemann)s": "Schwiegerelternteil",
8
+ "Ehefrau von (Halb)?(geschwister|schwester|bruder)": "Schwägerin",
9
+ "Ehemann von (Halb)?(geschwister|schwester|bruder)": "Schwager",
10
+ "Ehepartner von (Halb)?(geschwister|schwester|bruder)": "Schwager/Schwägerin",
11
+ "(Halb)?schwester des (Ehepartner|Ehefrau|Ehemann)s": "Schwägerin",
12
+ "(Halb)?bruder des (Ehepartner|Ehefrau|Ehemann)s": "Schwager",
13
+ "(Halb)?geschwister des (Ehepartner|Ehefrau|Ehemann)s": "Schwager/Schwägerin",
14
+ };
@@ -0,0 +1,2 @@
1
+ export declare const InLawsEn: Record<string, string>;
2
+ //# sourceMappingURL=patterns.en.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patterns.en.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/patterns.en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAa3C,CAAC"}
@@ -0,0 +1,14 @@
1
+ export const InLawsEn = {
2
+ "spouse of (child|daughter|son)": "child-in-law",
3
+ "wife of (child|daughter|son)": "daughter-in-law",
4
+ "husband of (child|daughter|son)": "son-in-law",
5
+ "mother of (spouse|wife|husband)": "mother-in-law",
6
+ "father of (spouse|wife|husband)": "father-in-law",
7
+ "parent of (spouse|wife|husband)": "parent-in-law",
8
+ "wife of (half-)?(sibling|sister|brother)": "sister-in-law",
9
+ "husband of (half-)?(sibling|sister|brother)": "brother-in-law",
10
+ "spouse of (half-)?(sibling|sister|brother)": "sibling-in-law",
11
+ "(half-)?sister of (spouse|wife|husband)": "sister-in-law",
12
+ "(half-)?brother of (spouse|wife|husband)": "brother-in-law",
13
+ "(half-)?sibling of (spouse|wife|husband)": "sibling-in-law",
14
+ };
@@ -0,0 +1,2 @@
1
+ export declare const InLawsEs: Record<string, string>;
2
+ //# sourceMappingURL=patterns.es.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patterns.es.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/patterns.es.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAa3C,CAAC"}
@@ -0,0 +1,14 @@
1
+ export const InLawsEs = {
2
+ "cónyuge de (hijo/hija|hija|hijo)": "yerno/nuera",
3
+ "esposa de (hijo/hija|hija|hijo)": "nuera",
4
+ "esposo de (hijo/hija|hija|hijo)": "yerno",
5
+ "madre del (cónyuge|esposa|esposo)": "suegra",
6
+ "padre del (cónyuge|esposa|esposo)": "suegro",
7
+ "padre/madre del (cónyuge|esposa|esposo)": "suegro/suegra",
8
+ "esposa de (medio )?(hermano/hermana|hermana|hermano)": "cuñada",
9
+ "esposo de (medio )?(hermano/hermana|hermana|hermano)": "cuñado",
10
+ "cónyuge de (medio )?(hermano/hermana|hermana|hermano)": "cuñado/cuñada",
11
+ "(medio )?hermana del (cónyuge|esposa|esposo)": "cuñada",
12
+ "(medio )?hermano del (cónyuge|esposa|esposo)": "cuñado",
13
+ "(medio )?hermano/hermana del (cónyuge|esposa|esposo)": "cuñado/cuñada",
14
+ };
@@ -0,0 +1,2 @@
1
+ export declare const InLawsFr: Record<string, string>;
2
+ //# sourceMappingURL=patterns.fr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patterns.fr.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/patterns.fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAa3C,CAAC"}
@@ -0,0 +1,14 @@
1
+ export const InLawsFr = {
2
+ "conjoint de (enfant|fille|fils)": "beau-fils/belle-fille",
3
+ "épouse de (enfant|fille|fils)": "belle-fille",
4
+ "mari de (enfant|fille|fils)": "gendre",
5
+ "mère du (conjoint|épouse|mari)": "belle-mère",
6
+ "père du (conjoint|épouse|mari)": "beau-père",
7
+ "parent du (conjoint|épouse|mari)": "beau-parent",
8
+ "épouse de (demi-)?(frère/sœur|sœur|frère)": "belle-sœur",
9
+ "mari de (demi-)?(frère/sœur|sœur|frère)": "beau-frère",
10
+ "conjoint de (demi-)?(frère/sœur|sœur|frère)": "beau-frère/belle-sœur",
11
+ "(demi-)?sœur du (conjoint|épouse|mari)": "belle-sœur",
12
+ "(demi-)?frère du (conjoint|épouse|mari)": "beau-frère",
13
+ "(demi-)?frère/sœur du (conjoint|épouse|mari)": "beau-frère/belle-sœur",
14
+ };
@@ -0,0 +1,6 @@
1
+ import { type IndiType } from "../classes/indi";
2
+ import { type CrossCases } from "./types";
3
+ export declare const parentRelationsHu: Record<string, string>;
4
+ export declare const casesHu: CrossCases;
5
+ export declare const InLawsHu: Record<string, string | ((indi?: IndiType) => string | undefined)>;
6
+ //# sourceMappingURL=patterns.hu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patterns.hu.d.ts","sourceRoot":"","sources":["../../src/kinship-translator/patterns.hu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAEhD,OAAO,EAAE,KAAK,UAAU,EAAkB,MAAM,SAAS,CAAC;AAE1D,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAMpD,CAAC;AA4EF,eAAO,MAAM,OAAO,EAAE,UAIrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAC5B,MAAM,EACN,MAAM,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,KAAK,MAAM,GAAG,SAAS,CAAC,CAsBlD,CAAC"}