psytools 0.4.0 → 0.5.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 (216) hide show
  1. package/README.md +29 -4
  2. package/SOURCES.md +16 -1
  3. package/dist/cjs/errors.d.ts +1 -1
  4. package/dist/cjs/i18n.d.ts +21 -1
  5. package/dist/cjs/i18n.js +136 -0
  6. package/dist/cjs/index.d.ts +4 -2
  7. package/dist/cjs/index.js +19 -14
  8. package/dist/cjs/inventories/aq10.js +5 -64
  9. package/dist/cjs/inventories/asrs6.js +6 -49
  10. package/dist/cjs/inventories/audit.js +9 -116
  11. package/dist/cjs/inventories/common.js +0 -20
  12. package/dist/cjs/inventories/dass21.js +19 -130
  13. package/dist/cjs/inventories/gad7.js +5 -40
  14. package/dist/cjs/inventories/index.d.ts +11 -2
  15. package/dist/cjs/inventories/index.js +22 -3
  16. package/dist/cjs/inventories/mini-ipip.js +1 -132
  17. package/dist/cjs/inventories/phq9.js +6 -53
  18. package/dist/cjs/inventories/who5.js +5 -56
  19. package/dist/cjs/locales/de/aq10.d.ts +4 -0
  20. package/dist/cjs/locales/de/aq10.js +53 -0
  21. package/dist/cjs/locales/de/asrs6.d.ts +4 -0
  22. package/dist/cjs/locales/de/asrs6.js +42 -0
  23. package/dist/cjs/locales/de/audit.d.ts +4 -0
  24. package/dist/cjs/locales/de/audit.js +80 -0
  25. package/dist/cjs/locales/de/dass21.d.ts +4 -0
  26. package/dist/cjs/locales/de/dass21.js +114 -0
  27. package/dist/cjs/locales/de/gad7.d.ts +4 -0
  28. package/dist/cjs/locales/de/gad7.js +46 -0
  29. package/dist/cjs/locales/de/mini-ipip.d.ts +4 -0
  30. package/dist/cjs/locales/de/mini-ipip.js +97 -0
  31. package/dist/cjs/locales/de/phq9.d.ts +4 -0
  32. package/dist/cjs/locales/de/phq9.js +56 -0
  33. package/dist/cjs/locales/de/who5.d.ts +4 -0
  34. package/dist/cjs/locales/de/who5.js +41 -0
  35. package/dist/cjs/locales/es/aq10.d.ts +4 -0
  36. package/dist/cjs/locales/es/aq10.js +53 -0
  37. package/dist/cjs/locales/es/asrs6.d.ts +4 -0
  38. package/dist/cjs/locales/es/asrs6.js +42 -0
  39. package/dist/cjs/locales/es/audit.d.ts +4 -0
  40. package/dist/cjs/locales/es/audit.js +80 -0
  41. package/dist/cjs/locales/es/dass21.d.ts +4 -0
  42. package/dist/cjs/locales/es/dass21.js +114 -0
  43. package/dist/cjs/locales/es/gad7.d.ts +4 -0
  44. package/dist/cjs/locales/es/gad7.js +46 -0
  45. package/dist/cjs/locales/es/mini-ipip.d.ts +4 -0
  46. package/dist/cjs/locales/es/mini-ipip.js +97 -0
  47. package/dist/cjs/locales/es/phq9.d.ts +4 -0
  48. package/dist/cjs/locales/es/phq9.js +56 -0
  49. package/dist/cjs/locales/es/who5.d.ts +4 -0
  50. package/dist/cjs/locales/es/who5.js +41 -0
  51. package/dist/cjs/locales/index.d.ts +12 -0
  52. package/dist/cjs/locales/index.js +63 -0
  53. package/dist/cjs/locales/tr/aq10.d.ts +4 -0
  54. package/dist/cjs/locales/tr/aq10.js +53 -0
  55. package/dist/cjs/locales/tr/asrs6.d.ts +4 -0
  56. package/dist/cjs/locales/tr/asrs6.js +42 -0
  57. package/dist/cjs/locales/tr/audit.d.ts +4 -0
  58. package/dist/cjs/locales/tr/audit.js +80 -0
  59. package/dist/cjs/locales/tr/dass21.d.ts +4 -0
  60. package/dist/cjs/locales/tr/dass21.js +114 -0
  61. package/dist/cjs/locales/tr/gad7.d.ts +4 -0
  62. package/dist/cjs/locales/tr/gad7.js +46 -0
  63. package/dist/cjs/locales/tr/mini-ipip.d.ts +4 -0
  64. package/dist/cjs/locales/tr/mini-ipip.js +97 -0
  65. package/dist/cjs/locales/tr/phq9.d.ts +4 -0
  66. package/dist/cjs/locales/tr/phq9.js +56 -0
  67. package/dist/cjs/locales/tr/who5.d.ts +4 -0
  68. package/dist/cjs/locales/tr/who5.js +41 -0
  69. package/dist/cjs/locales/zh/aq10.d.ts +4 -0
  70. package/dist/cjs/locales/zh/aq10.js +53 -0
  71. package/dist/cjs/locales/zh/asrs6.d.ts +4 -0
  72. package/dist/cjs/locales/zh/asrs6.js +42 -0
  73. package/dist/cjs/locales/zh/audit.d.ts +4 -0
  74. package/dist/cjs/locales/zh/audit.js +80 -0
  75. package/dist/cjs/locales/zh/dass21.d.ts +4 -0
  76. package/dist/cjs/locales/zh/dass21.js +114 -0
  77. package/dist/cjs/locales/zh/gad7.d.ts +4 -0
  78. package/dist/cjs/locales/zh/gad7.js +46 -0
  79. package/dist/cjs/locales/zh/mini-ipip.d.ts +4 -0
  80. package/dist/cjs/locales/zh/mini-ipip.js +97 -0
  81. package/dist/cjs/locales/zh/phq9.d.ts +4 -0
  82. package/dist/cjs/locales/zh/phq9.js +56 -0
  83. package/dist/cjs/locales/zh/who5.d.ts +4 -0
  84. package/dist/cjs/locales/zh/who5.js +41 -0
  85. package/dist/cjs/types.d.ts +30 -0
  86. package/dist/esm/errors.d.ts +1 -1
  87. package/dist/esm/i18n.d.ts +21 -1
  88. package/dist/esm/i18n.js +134 -0
  89. package/dist/esm/index.d.ts +4 -2
  90. package/dist/esm/index.js +2 -1
  91. package/dist/esm/inventories/aq10.js +5 -64
  92. package/dist/esm/inventories/asrs6.js +6 -49
  93. package/dist/esm/inventories/audit.js +9 -116
  94. package/dist/esm/inventories/common.js +0 -20
  95. package/dist/esm/inventories/dass21.js +19 -130
  96. package/dist/esm/inventories/gad7.js +5 -40
  97. package/dist/esm/inventories/index.d.ts +11 -2
  98. package/dist/esm/inventories/index.js +22 -3
  99. package/dist/esm/inventories/mini-ipip.js +1 -132
  100. package/dist/esm/inventories/phq9.js +6 -53
  101. package/dist/esm/inventories/who5.js +5 -56
  102. package/dist/esm/locales/de/aq10.d.ts +4 -0
  103. package/dist/esm/locales/de/aq10.js +51 -0
  104. package/dist/esm/locales/de/asrs6.d.ts +4 -0
  105. package/dist/esm/locales/de/asrs6.js +40 -0
  106. package/dist/esm/locales/de/audit.d.ts +4 -0
  107. package/dist/esm/locales/de/audit.js +78 -0
  108. package/dist/esm/locales/de/dass21.d.ts +4 -0
  109. package/dist/esm/locales/de/dass21.js +112 -0
  110. package/dist/esm/locales/de/gad7.d.ts +4 -0
  111. package/dist/esm/locales/de/gad7.js +44 -0
  112. package/dist/esm/locales/de/mini-ipip.d.ts +4 -0
  113. package/dist/esm/locales/de/mini-ipip.js +95 -0
  114. package/dist/esm/locales/de/phq9.d.ts +4 -0
  115. package/dist/esm/locales/de/phq9.js +54 -0
  116. package/dist/esm/locales/de/who5.d.ts +4 -0
  117. package/dist/esm/locales/de/who5.js +39 -0
  118. package/dist/esm/locales/es/aq10.d.ts +4 -0
  119. package/dist/esm/locales/es/aq10.js +51 -0
  120. package/dist/esm/locales/es/asrs6.d.ts +4 -0
  121. package/dist/esm/locales/es/asrs6.js +40 -0
  122. package/dist/esm/locales/es/audit.d.ts +4 -0
  123. package/dist/esm/locales/es/audit.js +78 -0
  124. package/dist/esm/locales/es/dass21.d.ts +4 -0
  125. package/dist/esm/locales/es/dass21.js +112 -0
  126. package/dist/esm/locales/es/gad7.d.ts +4 -0
  127. package/dist/esm/locales/es/gad7.js +44 -0
  128. package/dist/esm/locales/es/mini-ipip.d.ts +4 -0
  129. package/dist/esm/locales/es/mini-ipip.js +95 -0
  130. package/dist/esm/locales/es/phq9.d.ts +4 -0
  131. package/dist/esm/locales/es/phq9.js +54 -0
  132. package/dist/esm/locales/es/who5.d.ts +4 -0
  133. package/dist/esm/locales/es/who5.js +39 -0
  134. package/dist/esm/locales/index.d.ts +12 -0
  135. package/dist/esm/locales/index.js +59 -0
  136. package/dist/esm/locales/tr/aq10.d.ts +4 -0
  137. package/dist/esm/locales/tr/aq10.js +51 -0
  138. package/dist/esm/locales/tr/asrs6.d.ts +4 -0
  139. package/dist/esm/locales/tr/asrs6.js +40 -0
  140. package/dist/esm/locales/tr/audit.d.ts +4 -0
  141. package/dist/esm/locales/tr/audit.js +78 -0
  142. package/dist/esm/locales/tr/dass21.d.ts +4 -0
  143. package/dist/esm/locales/tr/dass21.js +112 -0
  144. package/dist/esm/locales/tr/gad7.d.ts +4 -0
  145. package/dist/esm/locales/tr/gad7.js +44 -0
  146. package/dist/esm/locales/tr/mini-ipip.d.ts +4 -0
  147. package/dist/esm/locales/tr/mini-ipip.js +95 -0
  148. package/dist/esm/locales/tr/phq9.d.ts +4 -0
  149. package/dist/esm/locales/tr/phq9.js +54 -0
  150. package/dist/esm/locales/tr/who5.d.ts +4 -0
  151. package/dist/esm/locales/tr/who5.js +39 -0
  152. package/dist/esm/locales/zh/aq10.d.ts +4 -0
  153. package/dist/esm/locales/zh/aq10.js +51 -0
  154. package/dist/esm/locales/zh/asrs6.d.ts +4 -0
  155. package/dist/esm/locales/zh/asrs6.js +40 -0
  156. package/dist/esm/locales/zh/audit.d.ts +4 -0
  157. package/dist/esm/locales/zh/audit.js +78 -0
  158. package/dist/esm/locales/zh/dass21.d.ts +4 -0
  159. package/dist/esm/locales/zh/dass21.js +112 -0
  160. package/dist/esm/locales/zh/gad7.d.ts +4 -0
  161. package/dist/esm/locales/zh/gad7.js +44 -0
  162. package/dist/esm/locales/zh/mini-ipip.d.ts +4 -0
  163. package/dist/esm/locales/zh/mini-ipip.js +95 -0
  164. package/dist/esm/locales/zh/phq9.d.ts +4 -0
  165. package/dist/esm/locales/zh/phq9.js +54 -0
  166. package/dist/esm/locales/zh/who5.d.ts +4 -0
  167. package/dist/esm/locales/zh/who5.js +39 -0
  168. package/dist/esm/types.d.ts +30 -0
  169. package/package.json +21 -1
  170. package/src/errors.ts +1 -0
  171. package/src/i18n.ts +176 -1
  172. package/src/index.ts +4 -1
  173. package/src/inventories/aq10.ts +5 -64
  174. package/src/inventories/asrs6.ts +6 -49
  175. package/src/inventories/audit.ts +9 -116
  176. package/src/inventories/common.ts +0 -20
  177. package/src/inventories/dass21.ts +19 -130
  178. package/src/inventories/gad7.ts +5 -40
  179. package/src/inventories/index.ts +27 -3
  180. package/src/inventories/mini-ipip.ts +1 -132
  181. package/src/inventories/phq9.ts +6 -53
  182. package/src/inventories/who5.ts +5 -56
  183. package/src/locales/de/aq10.ts +54 -0
  184. package/src/locales/de/asrs6.ts +43 -0
  185. package/src/locales/de/audit.ts +81 -0
  186. package/src/locales/de/dass21.ts +115 -0
  187. package/src/locales/de/gad7.ts +47 -0
  188. package/src/locales/de/mini-ipip.ts +98 -0
  189. package/src/locales/de/phq9.ts +57 -0
  190. package/src/locales/de/who5.ts +42 -0
  191. package/src/locales/es/aq10.ts +54 -0
  192. package/src/locales/es/asrs6.ts +43 -0
  193. package/src/locales/es/audit.ts +81 -0
  194. package/src/locales/es/dass21.ts +115 -0
  195. package/src/locales/es/gad7.ts +47 -0
  196. package/src/locales/es/mini-ipip.ts +98 -0
  197. package/src/locales/es/phq9.ts +57 -0
  198. package/src/locales/es/who5.ts +42 -0
  199. package/src/locales/index.ts +64 -0
  200. package/src/locales/tr/aq10.ts +54 -0
  201. package/src/locales/tr/asrs6.ts +43 -0
  202. package/src/locales/tr/audit.ts +81 -0
  203. package/src/locales/tr/dass21.ts +115 -0
  204. package/src/locales/tr/gad7.ts +47 -0
  205. package/src/locales/tr/mini-ipip.ts +98 -0
  206. package/src/locales/tr/phq9.ts +57 -0
  207. package/src/locales/tr/who5.ts +42 -0
  208. package/src/locales/zh/aq10.ts +54 -0
  209. package/src/locales/zh/asrs6.ts +43 -0
  210. package/src/locales/zh/audit.ts +81 -0
  211. package/src/locales/zh/dass21.ts +115 -0
  212. package/src/locales/zh/gad7.ts +47 -0
  213. package/src/locales/zh/mini-ipip.ts +98 -0
  214. package/src/locales/zh/phq9.ts +57 -0
  215. package/src/locales/zh/who5.ts +42 -0
  216. package/src/types.ts +25 -0
@@ -2,25 +2,25 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.dass21 = void 0;
4
4
  const depressionBands = [
5
- { id: "normal", min: 0, max: 9, label: { en: "Normal", tr: "Normal", de: "Normal", zh: "正常", es: "Normal" } },
6
- { id: "mild", min: 10, max: 13, label: { en: "Mild", tr: "Hafif", de: "Leicht", zh: "轻度", es: "Leve" } },
7
- { id: "moderate", min: 14, max: 20, label: { en: "Moderate", tr: "Orta", de: "Moderat", zh: "中度", es: "Moderado" } },
8
- { id: "severe", min: 21, max: 27, label: { en: "Severe", tr: "Şiddetli", de: "Schwer", zh: "重度", es: "Grave" } },
9
- { id: "extremely-severe", min: 28, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer", zh: "极重度", es: "Extremadamente grave" } },
5
+ { id: "normal", min: 0, max: 9, label: { en: "Normal" } },
6
+ { id: "mild", min: 10, max: 13, label: { en: "Mild" } },
7
+ { id: "moderate", min: 14, max: 20, label: { en: "Moderate" } },
8
+ { id: "severe", min: 21, max: 27, label: { en: "Severe" } },
9
+ { id: "extremely-severe", min: 28, max: 42, label: { en: "Extremely severe" } },
10
10
  ];
11
11
  const anxietyBands = [
12
- { id: "normal", min: 0, max: 7, label: { en: "Normal", tr: "Normal", de: "Normal", zh: "正常", es: "Normal" } },
13
- { id: "mild", min: 8, max: 9, label: { en: "Mild", tr: "Hafif", de: "Leicht", zh: "轻度", es: "Leve" } },
14
- { id: "moderate", min: 10, max: 14, label: { en: "Moderate", tr: "Orta", de: "Moderat", zh: "中度", es: "Moderado" } },
15
- { id: "severe", min: 15, max: 19, label: { en: "Severe", tr: "Şiddetli", de: "Schwer", zh: "重度", es: "Grave" } },
16
- { id: "extremely-severe", min: 20, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer", zh: "极重度", es: "Extremadamente grave" } },
12
+ { id: "normal", min: 0, max: 7, label: { en: "Normal" } },
13
+ { id: "mild", min: 8, max: 9, label: { en: "Mild" } },
14
+ { id: "moderate", min: 10, max: 14, label: { en: "Moderate" } },
15
+ { id: "severe", min: 15, max: 19, label: { en: "Severe" } },
16
+ { id: "extremely-severe", min: 20, max: 42, label: { en: "Extremely severe" } },
17
17
  ];
18
18
  const stressBands = [
19
- { id: "normal", min: 0, max: 14, label: { en: "Normal", tr: "Normal", de: "Normal", zh: "正常", es: "Normal" } },
20
- { id: "mild", min: 15, max: 18, label: { en: "Mild", tr: "Hafif", de: "Leicht", zh: "轻度", es: "Leve" } },
21
- { id: "moderate", min: 19, max: 25, label: { en: "Moderate", tr: "Orta", de: "Moderat", zh: "中度", es: "Moderado" } },
22
- { id: "severe", min: 26, max: 33, label: { en: "Severe", tr: "Şiddetli", de: "Schwer", zh: "重度", es: "Grave" } },
23
- { id: "extremely-severe", min: 34, max: 42, label: { en: "Extremely severe", tr: "Çok şiddetli", de: "Sehr schwer", zh: "极重度", es: "Extremadamente grave" } },
19
+ { id: "normal", min: 0, max: 14, label: { en: "Normal" } },
20
+ { id: "mild", min: 15, max: 18, label: { en: "Mild" } },
21
+ { id: "moderate", min: 19, max: 25, label: { en: "Moderate" } },
22
+ { id: "severe", min: 26, max: 33, label: { en: "Severe" } },
23
+ { id: "extremely-severe", min: 34, max: 42, label: { en: "Extremely severe" } },
24
24
  ];
25
25
  /**
26
26
  * DASS-21 — Depression Anxiety Stress Scales, short form.
@@ -36,24 +36,12 @@ exports.dass21 = {
36
36
  version: "1.0.0",
37
37
  title: {
38
38
  en: "Depression Anxiety Stress Scales (DASS-21)",
39
- tr: "Depresyon Anksiyete Stres Ölçeği (DASS-21)",
40
- de: "Depressions-Angst-Stress-Skalen (DASS-21)",
41
- zh: "抑郁-焦虑-压力量表(DASS-21)",
42
- es: "Escalas de Depresión, Ansiedad y Estrés (DASS-21)",
43
39
  },
44
40
  description: {
45
41
  en: "A 21-item self-report questionnaire measuring depression, anxiety, and stress over the past week.",
46
- tr: "Geçtiğimiz hafta boyunca depresyon, anksiyete ve stresi ölçen 21 maddelik bir öz bildirim ölçeği.",
47
- de: "Ein Selbstbeurteilungsfragebogen mit 21 Items zur Messung von Depression, Angst und Stress in der vergangenen Woche.",
48
- zh: "一份包含21个条目的自评问卷,用于测量过去一周的抑郁、焦虑和压力水平。",
49
- es: "Un cuestionario de autoinforme de 21 ítems que mide la depresión, la ansiedad y el estrés durante la última semana.",
50
42
  },
51
43
  instructions: {
52
44
  en: "Please read each statement and select the option which indicates how much the statement applied to you over the past week. There are no right or wrong answers. Do not spend too much time on any statement.",
53
- tr: "Lütfen her ifadeyi okuyun ve geçtiğimiz hafta boyunca ifadenin size ne kadar uyduğunu gösteren seçeneği işaretleyin. Doğru ya da yanlış cevap yoktur. Herhangi bir ifade üzerinde çok fazla zaman harcamayın.",
54
- de: "Bitte lesen Sie jede Aussage und wählen Sie die Option, die angibt, wie sehr die Aussage in der vergangenen Woche auf Sie zutraf. Es gibt keine richtigen oder falschen Antworten. Verbringen Sie nicht zu viel Zeit mit einer Aussage.",
55
- zh: "请阅读每一条陈述,并选择最能表明过去一周该陈述在多大程度上适用于您的选项。答案没有对错之分。请不要在任何一条陈述上花费太多时间。",
56
- es: "Por favor, lea cada frase y seleccione la opción que indique en qué medida la frase se aplicó a usted durante la última semana. No hay respuestas correctas ni incorrectas. No dedique demasiado tiempo a ninguna frase.",
57
45
  },
58
46
  defaultLocale: "en",
59
47
  options: [
@@ -61,40 +49,24 @@ exports.dass21 = {
61
49
  value: 0,
62
50
  label: {
63
51
  en: "Did not apply to me at all",
64
- tr: "Bana hiç uymadı",
65
- de: "Traf gar nicht auf mich zu",
66
- zh: "完全不适用于我",
67
- es: "No se aplicó a mí en absoluto",
68
52
  },
69
53
  },
70
54
  {
71
55
  value: 1,
72
56
  label: {
73
57
  en: "Applied to me to some degree, or some of the time",
74
- tr: "Bana biraz uydu ya da zaman zaman uydu",
75
- de: "Traf bis zu einem gewissen Grad oder manchmal auf mich zu",
76
- zh: "在某种程度上适用于我,或有时适用",
77
- es: "Se aplicó a mí en cierta medida, o parte del tiempo",
78
58
  },
79
59
  },
80
60
  {
81
61
  value: 2,
82
62
  label: {
83
63
  en: "Applied to me to a considerable degree, or a good part of the time",
84
- tr: "Bana oldukça uydu ya da zamanın büyük bölümünde uydu",
85
- de: "Traf in beträchtlichem Maße oder einen guten Teil der Zeit auf mich zu",
86
- zh: "在相当程度上适用于我,或大部分时间适用",
87
- es: "Se aplicó a mí en un grado considerable, o una buena parte del tiempo",
88
64
  },
89
65
  },
90
66
  {
91
67
  value: 3,
92
68
  label: {
93
69
  en: "Applied to me very much, or most of the time",
94
- tr: "Bana çok uydu ya da hemen hemen her zaman uydu",
95
- de: "Traf sehr stark oder die meiste Zeit auf mich zu",
96
- zh: "非常适用于我,或绝大部分时间适用",
97
- es: "Se aplicó a mí mucho, o la mayor parte del tiempo",
98
70
  },
99
71
  },
100
72
  ],
@@ -103,233 +75,150 @@ exports.dass21 = {
103
75
  id: "dass21-1",
104
76
  text: {
105
77
  en: "I found it hard to wind down",
106
- tr: "Sakinleşip yatışmakta zorlandım",
107
- de: "Ich fand es schwer, mich zu beruhigen",
108
- zh: "我发现自己很难平静下来",
109
- es: "Me costó calmarme",
110
78
  },
111
79
  },
112
80
  {
113
81
  id: "dass21-2",
114
82
  text: {
115
83
  en: "I was aware of dryness of my mouth",
116
- tr: "Ağzımın kuruduğunu fark ettim",
117
- de: "Ich bemerkte, dass mein Mund trocken war",
118
- zh: "我注意到自己口干",
119
- es: "Noté que tenía la boca seca",
120
84
  },
121
85
  },
122
86
  {
123
87
  id: "dass21-3",
124
88
  text: {
125
89
  en: "I couldn't seem to experience any positive feeling at all",
126
- tr: "Hiç olumlu duygu yaşayamadığımı fark ettim",
127
- de: "Ich konnte überhaupt keine positiven Gefühle mehr erleben",
128
- zh: "我似乎完全无法体验到任何积极的感受",
129
- es: "No parecía poder experimentar ningún sentimiento positivo en absoluto",
130
90
  },
131
91
  },
132
92
  {
133
93
  id: "dass21-4",
134
94
  text: {
135
95
  en: "I experienced breathing difficulty (e.g. excessively rapid breathing, breathlessness in the absence of physical exertion)",
136
- tr: "Nefes almada zorluk yaşadım (örneğin, fiziksel çaba göstermediğim hâlde aşırı hızlı nefes alma, nefessiz kalma)",
137
- de: "Ich hatte Atemprobleme (z. B. übermäßig schnelle Atmung, Atemlosigkeit ohne körperliche Anstrengung)",
138
- zh: "我感到呼吸困难(例如呼吸过快,或没有体力活动时也感到喘不过气)",
139
- es: "Experimenté dificultad para respirar (p. ej., respiración excesivamente rápida, falta de aire sin haber hecho esfuerzo físico)",
140
96
  },
141
97
  },
142
98
  {
143
99
  id: "dass21-5",
144
100
  text: {
145
101
  en: "I found it difficult to work up the initiative to do things",
146
- tr: "Bir işe başlamak için gereken isteği kendimde bulmakta zorlandım",
147
- de: "Es fiel mir schwer, die Initiative zu ergreifen, um Dinge zu erledigen",
148
- zh: "我发现自己很难主动去做事情",
149
- es: "Me resultó difícil tomar la iniciativa para hacer cosas",
150
102
  },
151
103
  },
152
104
  {
153
105
  id: "dass21-6",
154
106
  text: {
155
107
  en: "I tended to over-react to situations",
156
- tr: "Olaylara aşırı tepki verme eğiliminde oldum",
157
- de: "Ich neigte dazu, auf Situationen überzureagieren",
158
- zh: "我容易对事情反应过度",
159
- es: "Tendí a reaccionar de forma exagerada ante las situaciones",
160
108
  },
161
109
  },
162
110
  {
163
111
  id: "dass21-7",
164
112
  text: {
165
113
  en: "I experienced trembling (e.g. in the hands)",
166
- tr: "Titreme yaşadım (örneğin ellerde)",
167
- de: "Ich hatte Zittern (z. B. in den Händen)",
168
- zh: "我出现过颤抖(例如手抖)",
169
- es: "Experimenté temblores (p. ej., en las manos)",
170
114
  },
171
115
  },
172
116
  {
173
117
  id: "dass21-8",
174
118
  text: {
175
119
  en: "I felt that I was using a lot of nervous energy",
176
- tr: "Sinirsel enerjimin çok fazla olduğunu hissettim",
177
- de: "Ich fühlte, dass ich viel nervöse Energie verbrauchte",
178
- zh: "我觉得自己消耗了很多精神能量",
179
- es: "Sentí que estaba gastando mucha energía nerviosa",
180
120
  },
181
121
  },
182
122
  {
183
123
  id: "dass21-9",
184
124
  text: {
185
125
  en: "I was worried about situations in which I might panic and make a fool of myself",
186
- tr: "Panikleyip kendimi gülünç duruma düşürebileceğim durumlar nedeniyle endişelendim",
187
- de: "Ich machte mir Sorgen über Situationen, in denen ich in Panik geraten und mich blamieren könnte",
188
- zh: "我担心自己会在某些场合惊慌失措、出丑",
189
- es: "Me preocupaban las situaciones en las que podría entrar en pánico y hacer el ridículo",
190
126
  },
191
127
  },
192
128
  {
193
129
  id: "dass21-10",
194
130
  text: {
195
131
  en: "I felt that I had nothing to look forward to",
196
- tr: "Dört gözle beklediğim hiçbir şey olmadığını hissettim",
197
- de: "Ich hatte das Gefühl, mich auf nichts mehr freuen zu können",
198
- zh: "我觉得自己没有什么可期待的",
199
- es: "Sentí que no tenía nada que esperar con ilusión",
200
132
  },
201
133
  },
202
134
  {
203
135
  id: "dass21-11",
204
136
  text: {
205
137
  en: "I found myself getting agitated",
206
- tr: "Giderek huzursuzlandığımı fark ettim",
207
- de: "Ich merkte, dass ich unruhig wurde",
208
- zh: "我发现自己变得焦躁不安",
209
- es: "Me di cuenta de que me estaba agitando",
210
138
  },
211
139
  },
212
140
  {
213
141
  id: "dass21-12",
214
142
  text: {
215
143
  en: "I found it difficult to relax",
216
- tr: "Gevşeyip rahatlamakta zorlandım",
217
- de: "Es fiel mir schwer, mich zu entspannen",
218
- zh: "我发现自己很难放松",
219
- es: "Me resultó difícil relajarme",
220
144
  },
221
145
  },
222
146
  {
223
147
  id: "dass21-13",
224
148
  text: {
225
149
  en: "I felt down-hearted and blue",
226
- tr: "Kendimi üzgün ve karamsar hissettim",
227
- de: "Ich fühlte mich niedergeschlagen und traurig",
228
- zh: "我感到情绪低落、忧郁",
229
- es: "Me sentí desanimado y triste",
230
150
  },
231
151
  },
232
152
  {
233
153
  id: "dass21-14",
234
154
  text: {
235
155
  en: "I was intolerant of anything that kept me from getting on with what I was doing",
236
- tr: "Yaptığım işi sürdürmeme engel olan şeylere tahammül edemedim",
237
- de: "Ich konnte es nicht ertragen, von dem, was ich gerade tat, abgehalten zu werden",
238
- zh: "我无法容忍任何妨碍我继续做事的事情",
239
- es: "No toleraba nada que me impidiera seguir con lo que estaba haciendo",
240
156
  },
241
157
  },
242
158
  {
243
159
  id: "dass21-15",
244
160
  text: {
245
161
  en: "I felt I was close to panic",
246
- tr: "Panik olmaya yakın olduğumu hissettim",
247
- de: "Ich fühlte mich einer Panik nahe",
248
- zh: "我感到自己快要惊慌失措了",
249
- es: "Sentí que estaba a punto de entrar en pánico",
250
162
  },
251
163
  },
252
164
  {
253
165
  id: "dass21-16",
254
166
  text: {
255
167
  en: "I was unable to become enthusiastic about anything",
256
- tr: "Hiçbir şeye karşı heves duyamadım",
257
- de: "Ich konnte mich für nichts mehr begeistern",
258
- zh: "我对任何事情都提不起热情",
259
- es: "No fui capaz de entusiasmarme con nada",
260
168
  },
261
169
  },
262
170
  {
263
171
  id: "dass21-17",
264
172
  text: {
265
173
  en: "I felt I wasn't worth much as a person",
266
- tr: "Kişi olarak fazla bir değerimin olmadığını hissettim",
267
- de: "Ich hatte das Gefühl, als Person nicht viel wert zu sein",
268
- zh: "我觉得自己作为一个人没有多大价值",
269
- es: "Sentí que como persona no valía mucho",
270
174
  },
271
175
  },
272
176
  {
273
177
  id: "dass21-18",
274
178
  text: {
275
179
  en: "I felt that I was rather touchy",
276
- tr: "Oldukça alıngan olduğumu hissettim",
277
- de: "Ich fühlte, dass ich ziemlich empfindlich war",
278
- zh: "我觉得自己相当敏感、易被触怒",
279
- es: "Sentí que estaba bastante susceptible",
280
180
  },
281
181
  },
282
182
  {
283
183
  id: "dass21-19",
284
184
  text: {
285
185
  en: "I was aware of the action of my heart in the absence of physical exertion (e.g. sense of heart rate increase, heart missing a beat)",
286
- tr: "Fiziksel çaba göstermediğim hâlde kalbimin hareketlerini fark ettim (örneğin, kalp atışının hızlanması, kalbin bir atışı atlaması)",
287
- de: "Ich nahm meinen Herzschlag wahr, ohne mich körperlich angestrengt zu haben (z. B. Gefühl von Herzrasen oder Herzstolpern)",
288
- zh: "在没有体力活动的情况下,我能察觉到自己的心跳(例如感到心率加快或心跳漏跳)",
289
- es: "Fui consciente de los latidos de mi corazón sin haber hecho esfuerzo físico (p. ej., sensación de aumento del ritmo cardíaco, o de que el corazón se saltaba un latido)",
290
186
  },
291
187
  },
292
188
  {
293
189
  id: "dass21-20",
294
190
  text: {
295
191
  en: "I felt scared without any good reason",
296
- tr: "Geçerli bir neden olmadığı hâlde korktuğumu hissettim",
297
- de: "Ich fühlte mich ohne triftigen Grund ängstlich",
298
- zh: "我无缘无故地感到害怕",
299
- es: "Me sentí asustado sin ninguna razón justificada",
300
192
  },
301
193
  },
302
194
  {
303
195
  id: "dass21-21",
304
196
  text: {
305
197
  en: "I felt that life was meaningless",
306
- tr: "Yaşamın anlamsız olduğunu hissettim",
307
- de: "Ich hatte das Gefühl, dass das Leben sinnlos ist",
308
- zh: "我觉得生活毫无意义",
309
- es: "Sentí que la vida no tenía sentido",
310
198
  },
311
199
  },
312
200
  ],
313
201
  scoring: {
314
202
  kind: "subscales",
203
+ missing: { strategy: "prorate", minAnswered: 6 },
315
204
  subscales: [
316
205
  {
317
206
  id: "depression",
318
- label: { en: "Depression", tr: "Depresyon", de: "Depression", zh: "抑郁", es: "Depresión" },
207
+ label: { en: "Depression" },
319
208
  questionIds: ["dass21-3", "dass21-5", "dass21-10", "dass21-13", "dass21-16", "dass21-17", "dass21-21"],
320
209
  multiplier: 2,
321
210
  bands: depressionBands,
322
211
  },
323
212
  {
324
213
  id: "anxiety",
325
- label: { en: "Anxiety", tr: "Anksiyete", de: "Angst", zh: "焦虑", es: "Ansiedad" },
214
+ label: { en: "Anxiety" },
326
215
  questionIds: ["dass21-2", "dass21-4", "dass21-7", "dass21-9", "dass21-15", "dass21-19", "dass21-20"],
327
216
  multiplier: 2,
328
217
  bands: anxietyBands,
329
218
  },
330
219
  {
331
220
  id: "stress",
332
- label: { en: "Stress", tr: "Stres", de: "Stress", zh: "压力", es: "Estrés" },
221
+ label: { en: "Stress" },
333
222
  questionIds: ["dass21-1", "dass21-6", "dass21-8", "dass21-11", "dass21-12", "dass21-14", "dass21-18"],
334
223
  multiplier: 2,
335
224
  bands: stressBands,
@@ -15,17 +15,9 @@ exports.gad7 = {
15
15
  version: "1.0.0",
16
16
  title: {
17
17
  en: "Generalized Anxiety Disorder Scale (GAD-7)",
18
- tr: "Yaygın Anksiyete Bozukluğu Ölçeği (GAD-7)",
19
- de: "Generalisierte Angststörung Skala (GAD-7)",
20
- zh: "广泛性焦虑障碍量表(GAD-7)",
21
- es: "Escala del Trastorno de Ansiedad Generalizada (GAD-7)",
22
18
  },
23
19
  description: {
24
20
  en: "A 7-item self-report questionnaire for screening and measuring the severity of generalized anxiety.",
25
- tr: "Yaygın anksiyeteyi taramak ve şiddetini ölçmek için kullanılan 7 maddelik bir öz bildirim ölçeği.",
26
- de: "Ein Selbstbeurteilungsfragebogen mit 7 Items zum Screening und zur Schweregradmessung generalisierter Angst.",
27
- zh: "一份包含7个条目的自评问卷,用于筛查广泛性焦虑并测量其严重程度。",
28
- es: "Un cuestionario de autoinforme de 7 ítems para la detección y la medición de la gravedad de la ansiedad generalizada.",
29
21
  },
30
22
  instructions: common_ts_1.twoWeekInstructions,
31
23
  defaultLocale: "en",
@@ -35,99 +27,72 @@ exports.gad7 = {
35
27
  id: "gad7-1",
36
28
  text: {
37
29
  en: "Feeling nervous, anxious, or on edge",
38
- tr: "Sinirli, kaygılı ya da çok gergin hissetme",
39
- de: "Nervosität, Ängstlichkeit oder Anspannung",
40
- zh: "感到紧张、焦虑或心情烦躁",
41
- es: "Sentirse nervioso(a), ansioso(a) o con los nervios de punta",
42
30
  },
43
31
  },
44
32
  {
45
33
  id: "gad7-2",
46
34
  text: {
47
35
  en: "Not being able to stop or control worrying",
48
- tr: "Endişelenmeyi durduramama ya da kontrol edememe",
49
- de: "Nicht in der Lage sein, Sorgen zu stoppen oder zu kontrollieren",
50
- zh: "无法停止或控制担忧",
51
- es: "No poder dejar de preocuparse o controlar la preocupación",
52
36
  },
53
37
  },
54
38
  {
55
39
  id: "gad7-3",
56
40
  text: {
57
41
  en: "Worrying too much about different things",
58
- tr: "Farklı konular hakkında çok fazla endişelenme",
59
- de: "Übermäßige Sorgen bezüglich verschiedener Angelegenheiten",
60
- zh: "对各种各样的事情担忧过多",
61
- es: "Preocuparse demasiado por diferentes cosas",
62
42
  },
63
43
  },
64
44
  {
65
45
  id: "gad7-4",
66
46
  text: {
67
47
  en: "Trouble relaxing",
68
- tr: "Gevşeyip rahatlamada güçlük",
69
- de: "Schwierigkeiten, sich zu entspannen",
70
- zh: "难以放松",
71
- es: "Dificultad para relajarse",
72
48
  },
73
49
  },
74
50
  {
75
51
  id: "gad7-5",
76
52
  text: {
77
53
  en: "Being so restless that it is hard to sit still",
78
- tr: "Yerinde duramayacak kadar huzursuz olma",
79
- de: "Rastlosigkeit, sodass das Stillsitzen schwerfällt",
80
- zh: "坐立不安,难以安静地坐着",
81
- es: "Estar tan inquieto(a) que le resulta difícil quedarse quieto(a)",
82
54
  },
83
55
  },
84
56
  {
85
57
  id: "gad7-6",
86
58
  text: {
87
59
  en: "Becoming easily annoyed or irritable",
88
- tr: "Çabuk kızma ya da kolayca sinirlenir olma",
89
- de: "Schnelle Verärgerung oder Gereiztheit",
90
- zh: "容易恼怒或易被激怒",
91
- es: "Enfadarse o irritarse con facilidad",
92
60
  },
93
61
  },
94
62
  {
95
63
  id: "gad7-7",
96
64
  text: {
97
65
  en: "Feeling afraid, as if something awful might happen",
98
- tr: "Sanki çok kötü bir şey olacakmış gibi korkuya kapılma",
99
- de: "Angstgefühl, als könnte etwas Schlimmes passieren",
100
- zh: "感到害怕,好像会有可怕的事情发生",
101
- es: "Sentir miedo, como si algo terrible pudiera pasar",
102
66
  },
103
67
  },
104
68
  ],
105
69
  scoring: {
106
70
  kind: "sum",
71
+ missing: { strategy: "prorate", minAnswered: 6 },
107
72
  bands: [
108
73
  {
109
74
  id: "minimal",
110
75
  min: 0,
111
76
  max: 4,
112
- label: { en: "Minimal anxiety", tr: "Minimal anksiyete", de: "Minimale Angst", zh: "极轻度焦虑", es: "Ansiedad mínima" },
77
+ label: { en: "Minimal anxiety" },
113
78
  },
114
79
  {
115
80
  id: "mild",
116
81
  min: 5,
117
82
  max: 9,
118
- label: { en: "Mild anxiety", tr: "Hafif anksiyete", de: "Leichte Angst", zh: "轻度焦虑", es: "Ansiedad leve" },
83
+ label: { en: "Mild anxiety" },
119
84
  },
120
85
  {
121
86
  id: "moderate",
122
87
  min: 10,
123
88
  max: 14,
124
- label: { en: "Moderate anxiety", tr: "Orta düzeyde anksiyete", de: "Mittelgradige Angst", zh: "中度焦虑", es: "Ansiedad moderada" },
89
+ label: { en: "Moderate anxiety" },
125
90
  },
126
91
  {
127
92
  id: "severe",
128
93
  min: 15,
129
94
  max: 21,
130
- label: { en: "Severe anxiety", tr: "Şiddetli anksiyete", de: "Schwere Angst", zh: "重度焦虑", es: "Ansiedad grave" },
95
+ label: { en: "Severe anxiety" },
131
96
  },
132
97
  ],
133
98
  },
@@ -15,6 +15,15 @@ export declare const inventories: Readonly<Record<string, AssessmentDefinition>>
15
15
  export type InventoryId = "phq9" | "gad7" | "dass21" | "who5" | "asrs6" | "aq10" | "audit" | "mini-ipip";
16
16
  /**
17
17
  * Instantiates a predefined inventory as an `Assessment`.
18
- * @throws PsytoolsError `unknown_inventory`
18
+ *
19
+ * Base definitions carry English only; other languages live in separate
20
+ * locale-pack modules that are dynamically imported — and only then held
21
+ * in memory — when listed in `options.locales` (data minimization by
22
+ * default). The returned assessment's definition is still one complete,
23
+ * serializable JSON object containing exactly the requested locales.
24
+ *
25
+ * @throws PsytoolsError `unknown_inventory` | `unknown_locale`
19
26
  */
20
- export declare function loadInventory(id: InventoryId | string): Assessment;
27
+ export declare function loadInventory(id: InventoryId | string, options?: {
28
+ locales?: string[];
29
+ }): Promise<Assessment>;
@@ -4,6 +4,8 @@ exports.inventories = exports.twoWeekInstructions = exports.twoWeekFrequencyOpti
4
4
  exports.loadInventory = loadInventory;
5
5
  const assessment_ts_1 = require("../assessment.js");
6
6
  const errors_ts_1 = require("../errors.js");
7
+ const i18n_ts_1 = require("../i18n.js");
8
+ const index_ts_1 = require("../locales/index.js");
7
9
  const phq9_ts_1 = require("./phq9.js");
8
10
  Object.defineProperty(exports, "phq9", { enumerable: true, get: function () { return phq9_ts_1.phq9; } });
9
11
  const gad7_ts_1 = require("./gad7.js");
@@ -36,13 +38,30 @@ exports.inventories = {
36
38
  };
37
39
  /**
38
40
  * Instantiates a predefined inventory as an `Assessment`.
39
- * @throws PsytoolsError `unknown_inventory`
41
+ *
42
+ * Base definitions carry English only; other languages live in separate
43
+ * locale-pack modules that are dynamically imported — and only then held
44
+ * in memory — when listed in `options.locales` (data minimization by
45
+ * default). The returned assessment's definition is still one complete,
46
+ * serializable JSON object containing exactly the requested locales.
47
+ *
48
+ * @throws PsytoolsError `unknown_inventory` | `unknown_locale`
40
49
  */
41
- function loadInventory(id) {
50
+ async function loadInventory(id, options) {
42
51
  const definition = exports.inventories[id];
43
52
  if (!definition) {
44
53
  const known = Object.keys(exports.inventories).join(", ");
45
54
  throw new errors_ts_1.PsytoolsError("unknown_inventory", `Unknown inventory "${id}" (available: ${known})`);
46
55
  }
47
- return new assessment_ts_1.Assessment(definition);
56
+ let merged = definition;
57
+ for (const locale of options?.locales ?? []) {
58
+ if (locale === definition.defaultLocale)
59
+ continue;
60
+ const loader = index_ts_1.localePacks[id]?.[locale];
61
+ if (!loader) {
62
+ throw new errors_ts_1.PsytoolsError("unknown_locale", `No "${locale}" locale pack for inventory "${id}" (available: ${(0, index_ts_1.availableLocales)(id).join(", ")})`);
63
+ }
64
+ merged = (0, i18n_ts_1.applyLocale)(merged, (await loader()).default);
65
+ }
66
+ return new assessment_ts_1.Assessment(merged);
48
67
  }