@baravak/risloo-profile-cli 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/.github/workflows/push.yml +14 -0
  2. package/.prettierrc +16 -0
  3. package/.yarn/releases/yarn-1.22.19.cjs +147529 -0
  4. package/.yarnrc.yml +1 -0
  5. package/README.md +98 -0
  6. package/bin/risloo.js +9 -0
  7. package/package.json +44 -0
  8. package/src/Gift.js +29 -0
  9. package/src/Profile.js +405 -0
  10. package/src/cli-commands/Executor.js +118 -0
  11. package/src/cli-commands/ExtractExecutor.js +194 -0
  12. package/src/cli-commands/GiftExecutor.js +56 -0
  13. package/src/cli-commands/utilities/BaseOps.js +71 -0
  14. package/src/cli-commands/utilities/Benchmarker.js +88 -0
  15. package/src/cli-commands/utilities/CustomErrors.js +14 -0
  16. package/src/cli-commands/utilities/Response.js +59 -0
  17. package/src/cli-commands/utilities/STATUSES.js +16 -0
  18. package/src/cli-commands/utilities/Status.js +9 -0
  19. package/src/cli.js +125 -0
  20. package/src/handlebars/helpers/abs.js +8 -0
  21. package/src/handlebars/helpers/addCommas.js +8 -0
  22. package/src/handlebars/helpers/array.js +8 -0
  23. package/src/handlebars/helpers/assignGlobal.js +9 -0
  24. package/src/handlebars/helpers/boolean.js +19 -0
  25. package/src/handlebars/helpers/ceil.js +8 -0
  26. package/src/handlebars/helpers/concat.js +8 -0
  27. package/src/handlebars/helpers/cos.js +8 -0
  28. package/src/handlebars/helpers/displacePoint.js +11 -0
  29. package/src/handlebars/helpers/ellipsisChars.js +10 -0
  30. package/src/handlebars/helpers/ellipsisLines.js +11 -0
  31. package/src/handlebars/helpers/first.js +11 -0
  32. package/src/handlebars/helpers/floor.js +8 -0
  33. package/src/handlebars/helpers/forLoop.js +15 -0
  34. package/src/handlebars/helpers/getArrOfProp.js +8 -0
  35. package/src/handlebars/helpers/isArray.js +8 -0
  36. package/src/handlebars/helpers/join.js +10 -0
  37. package/src/handlebars/helpers/last.js +11 -0
  38. package/src/handlebars/helpers/lineWrap.js +28 -0
  39. package/src/handlebars/helpers/math.js +24 -0
  40. package/src/handlebars/helpers/modulo.js +8 -0
  41. package/src/handlebars/helpers/normalizeAngle.js +7 -0
  42. package/src/handlebars/helpers/object.js +8 -0
  43. package/src/handlebars/helpers/objectEntries.js +8 -0
  44. package/src/handlebars/helpers/polarToCartesian.js +14 -0
  45. package/src/handlebars/helpers/prepend.js +10 -0
  46. package/src/handlebars/helpers/profiles/bar.js +45 -0
  47. package/src/handlebars/helpers/profiles/calcGaugeSidePoints.js +34 -0
  48. package/src/handlebars/helpers/profiles/gauge.js +61 -0
  49. package/src/handlebars/helpers/profiles/polygon.js +40 -0
  50. package/src/handlebars/helpers/reverse.js +9 -0
  51. package/src/handlebars/helpers/roundToTwo.js +8 -0
  52. package/src/handlebars/helpers/setVar.js +8 -0
  53. package/src/handlebars/helpers/sin.js +8 -0
  54. package/src/handlebars/helpers/split.js +8 -0
  55. package/src/handlebars/helpers/tan.js +8 -0
  56. package/src/handlebars/helpers/ternary.js +9 -0
  57. package/src/handlebars/helpers/toDeg.js +8 -0
  58. package/src/handlebars/helpers/toRad.js +8 -0
  59. package/src/handlebars/helpers/withGroup.js +20 -0
  60. package/src/handlebars/helpers/wrapOnNewline.js +11 -0
  61. package/src/handlebars/helpers.js +86 -0
  62. package/src/handlebars/importPartials.js +40 -0
  63. package/src/handlebars/init.js +15 -0
  64. package/src/publish/bot.js +91 -0
  65. package/src/publish/json/gift/gift.json +16 -0
  66. package/src/publish/json/profiles/16PF93.json +201 -0
  67. package/src/publish/json/profiles/AEQ93.json +96 -0
  68. package/src/publish/json/profiles/AMS93.json +102 -0
  69. package/src/publish/json/profiles/AMS9A.json +102 -0
  70. package/src/publish/json/profiles/BAOMEIS93.json +99 -0
  71. package/src/publish/json/profiles/BEQI93.json +1589 -0
  72. package/src/publish/json/profiles/CAATS93.json +11355 -0
  73. package/src/publish/json/profiles/CADS93.json +351 -0
  74. package/src/publish/json/profiles/CARSP93.json +96 -0
  75. package/src/publish/json/profiles/CERQ93.json +106 -0
  76. package/src/publish/json/profiles/CRAAS93.json +98 -0
  77. package/src/publish/json/profiles/CSI93.json +143 -0
  78. package/src/publish/json/profiles/DSWLS93.json +93 -0
  79. package/src/publish/json/profiles/EMSS93.json +116 -0
  80. package/src/publish/json/profiles/FACES93.json +106 -0
  81. package/src/publish/json/profiles/FTEPT93.json +102 -0
  82. package/src/publish/json/profiles/GMIT93.json +98 -0
  83. package/src/publish/json/profiles/HPL93.json +102 -0
  84. package/src/publish/json/profiles/IBT93.json +106 -0
  85. package/src/publish/json/profiles/IUS93.json +93 -0
  86. package/src/publish/json/profiles/JCSI93.json +102 -0
  87. package/src/publish/json/profiles/JPFQ93.json +1 -0
  88. package/src/publish/json/profiles/KJGI93.json +100 -0
  89. package/src/publish/json/profiles/LMIQ93.json +109 -0
  90. package/src/publish/json/profiles/MMFAD93.json +103 -0
  91. package/src/publish/json/profiles/MMFAD9A.json +103 -0
  92. package/src/publish/json/profiles/MOCI93.json +100 -0
  93. package/src/publish/json/profiles/OBQ4493.json +96 -0
  94. package/src/publish/json/profiles/PIES93.json +104 -0
  95. package/src/publish/json/profiles/PIES9A.json +104 -0
  96. package/src/publish/json/profiles/PMCIEF93.json +1 -0
  97. package/src/publish/json/profiles/PSWQ93.json +97 -0
  98. package/src/publish/json/profiles/RIASEC93.json +2511 -0
  99. package/src/publish/json/profiles/SAFE93.json +110 -0
  100. package/src/publish/json/profiles/SASQ93.json +92 -0
  101. package/src/publish/json/profiles/SCASP93.json +611 -0
  102. package/src/publish/json/profiles/SDCAQ93.json +96 -0
  103. package/src/publish/json/profiles/STAIY93.json +98 -0
  104. package/src/publish/json/profiles/WAQ93.json +100 -0
  105. package/src/publish/json/profiles/YBOCS93.json +1322 -0
  106. package/src/publish/json/profiles/empty.json +139 -0
  107. package/src/publish/new-version.hbs +11 -0
  108. package/src/publish/test.js +109 -0
  109. package/src/qrcode/qrCodeGenerator.js +14 -0
  110. package/src/qrcode/qrRender.js +229 -0
  111. package/src/samples/16PF93.js +158 -0
  112. package/src/samples/AEQ93.js +121 -0
  113. package/src/samples/AMS93.js +139 -0
  114. package/src/samples/AMS9A.js +9 -0
  115. package/src/samples/BAOMEIS93.js +146 -0
  116. package/src/samples/BEQI93.js +255 -0
  117. package/src/samples/CAATS93.js +218 -0
  118. package/src/samples/CADS93.js +161 -0
  119. package/src/samples/CARSP93.js +134 -0
  120. package/src/samples/CERQ93.js +195 -0
  121. package/src/samples/CRAAS93.js +141 -0
  122. package/src/samples/CSI93.js +315 -0
  123. package/src/samples/DSWLS93.js +112 -0
  124. package/src/samples/EMSS93.js +178 -0
  125. package/src/samples/FACES93.js +225 -0
  126. package/src/samples/FTEPT93.js +167 -0
  127. package/src/samples/GMIT93.js +142 -0
  128. package/src/samples/HPL93.js +132 -0
  129. package/src/samples/IBT93.js +99 -0
  130. package/src/samples/IUS93.js +204 -0
  131. package/src/samples/JCSI93.js +174 -0
  132. package/src/samples/JPFQ93.js +74 -0
  133. package/src/samples/KJGI93.js +136 -0
  134. package/src/samples/LMIQ93.js +188 -0
  135. package/src/samples/MMFAD93.js +135 -0
  136. package/src/samples/MMFAD9A.js +31 -0
  137. package/src/samples/MOCI93.js +128 -0
  138. package/src/samples/OBQ4493.js +132 -0
  139. package/src/samples/PIES93.js +228 -0
  140. package/src/samples/PIES9A.js +32 -0
  141. package/src/samples/PMCIEF93.js +64 -0
  142. package/src/samples/PSWQ93.js +126 -0
  143. package/src/samples/RIASEC93.js +144 -0
  144. package/src/samples/SAFE93.js +64 -0
  145. package/src/samples/SASQ93.js +130 -0
  146. package/src/samples/SCASP93.js +207 -0
  147. package/src/samples/SDCAQ93.js +174 -0
  148. package/src/samples/STAIY93.js +159 -0
  149. package/src/samples/WAQ93.js +208 -0
  150. package/src/samples/YBOCS93.js +583 -0
  151. package/src/samples/empty.js +53 -0
  152. package/views/gift.hbs +160 -0
  153. package/views/profiles/fonts.css +18 -0
  154. package/views/profiles/layout.hbs +27 -0
  155. package/views/profiles/samples/16PF93.hbs +54 -0
  156. package/views/profiles/samples/AEQ93.hbs +31 -0
  157. package/views/profiles/samples/AMS93.hbs +97 -0
  158. package/views/profiles/samples/AMS9A.hbs +1 -0
  159. package/views/profiles/samples/BAOMEIS93.hbs +48 -0
  160. package/views/profiles/samples/BEQI93.hbs +118 -0
  161. package/views/profiles/samples/CAATS93.hbs +251 -0
  162. package/views/profiles/samples/CADS93.hbs +104 -0
  163. package/views/profiles/samples/CARSP93.hbs +26 -0
  164. package/views/profiles/samples/CERQ93.hbs +115 -0
  165. package/views/profiles/samples/CRAAS93.hbs +88 -0
  166. package/views/profiles/samples/CSI93_1.hbs +110 -0
  167. package/views/profiles/samples/CSI93_2.hbs +76 -0
  168. package/views/profiles/samples/DSWLS93.hbs +26 -0
  169. package/views/profiles/samples/EMSS93.hbs +101 -0
  170. package/views/profiles/samples/FACES93_1.hbs +107 -0
  171. package/views/profiles/samples/FACES93_2.hbs +51 -0
  172. package/views/profiles/samples/FTEPT93.hbs +67 -0
  173. package/views/profiles/samples/GMIT93.hbs +45 -0
  174. package/views/profiles/samples/HPL93.hbs +36 -0
  175. package/views/profiles/samples/IBT93.hbs +67 -0
  176. package/views/profiles/samples/IUS93.hbs +123 -0
  177. package/views/profiles/samples/JCSI93.hbs +65 -0
  178. package/views/profiles/samples/JPFQ93.hbs +44 -0
  179. package/views/profiles/samples/KJGI93.hbs +57 -0
  180. package/views/profiles/samples/LMIQ93.hbs +82 -0
  181. package/views/profiles/samples/MMFAD93.hbs +35 -0
  182. package/views/profiles/samples/MMFAD9A.hbs +1 -0
  183. package/views/profiles/samples/MOCI93.hbs +60 -0
  184. package/views/profiles/samples/OBQ4493.hbs +61 -0
  185. package/views/profiles/samples/PIES93.hbs +67 -0
  186. package/views/profiles/samples/PIES9A.hbs +1 -0
  187. package/views/profiles/samples/PMCIEF93.hbs +8 -0
  188. package/views/profiles/samples/PSWQ93.hbs +32 -0
  189. package/views/profiles/samples/RIASEC93.hbs +38 -0
  190. package/views/profiles/samples/SAFE93.hbs +118 -0
  191. package/views/profiles/samples/SASQ93.hbs +45 -0
  192. package/views/profiles/samples/SCASP93.hbs +94 -0
  193. package/views/profiles/samples/SDCAQ93.hbs +68 -0
  194. package/views/profiles/samples/STAIY93.hbs +67 -0
  195. package/views/profiles/samples/WAQ93.hbs +74 -0
  196. package/views/profiles/samples/YBOCS93_1.hbs +96 -0
  197. package/views/profiles/samples/YBOCS93_2.hbs +115 -0
  198. package/views/profiles/samples/YBOCS93_3.hbs +93 -0
  199. package/views/profiles/samples/empty.hbs +10 -0
  200. package/views/profiles/sidebar.hbs +193 -0
@@ -0,0 +1,118 @@
1
+ {{#> layout}}
2
+
3
+ <defs>
4
+ <linearGradient id="horizontal-shadow">
5
+ <stop offset="0%" stop-color="black" />
6
+ <stop offset="100%" stop-color="transparent" />
7
+ </linearGradient>
8
+ {{#with spec.gaugeItems.circle}}
9
+ <clipPath id="items-circle-roll">
10
+ {{gauge R r brs (object start=angles.start end=angles.end) false}}
11
+ </clipPath>
12
+ {{/with}}
13
+ </defs>
14
+
15
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
16
+ <g transform="translate(95, 0)">
17
+ {{#each itemsTicks as | tick index |}}
18
+ <g transform="translate({{tick.leftPos}}, 0)">
19
+ <line x1="0" y1="0" x2="0" y2="450" stroke="#F4F4F5" stroke-dasharray="3.5" stroke-linecap="round" stroke-width="1"/>
20
+ <text x="-{{@root.spec.items.ticks.numberOffset.x}}" y="{{@root.spec.items.ticks.numberOffset.y}}" fill="#A1A1AA" text-anchor="start" font-size="8" font-weight="500" dy="3">{{tick.number}}</text>
21
+ </g>
22
+ {{/each}}
23
+ <g transform="translate(0, {{spec.items.ticks.heightOffset}})">
24
+ {{#each items as | item index |}}
25
+ {{#with @root.spec.items as | itemsSpec |}}
26
+ <g transform="translate(0, {{math index '*' itemsSpec.distanceY}})">
27
+ {{bar item.width itemsSpec.rect.height (object tl=0 bl=0 tr=itemsSpec.rect.borderRadius br=itemsSpec.rect.borderRadius) (toRad 0) fill=item.fill fill-opacity=item.opacity}}
28
+ <g transform="translate(0, {{math itemsSpec.rect.height '/' 2}})">
29
+ <text x="-{{itemsSpec.label.offsetX}}" y="0" fill="#52525B" text-anchor="start" font-size="10" font-weight="400" dy="1.5">{{item.label.fr}}</text>
30
+ <text x="{{math (math item.width '-' itemsSpec.rect.borderRadius) '-' 4}}" y="0" fill="white" text-anchor="middle" font-size="10" font-weight="600" dy="2.5">{{item.mark}}</text>
31
+ </g>
32
+ </g>
33
+ {{/with}}
34
+ {{/each}}
35
+ <g transform="translate(-1, -15)">
36
+ <rect x="0" y="0" width="1" height="440" fill="#FFFFFF" rx="1"/>
37
+ <rect x="1" y="0" width="5" height="440" fill="url('#horizontal-shadow')" fill-opacity="0.2"/>
38
+ </g>
39
+ </g>
40
+
41
+ <g transform="translate(382, 450)">
42
+ {{bar spec.raw.rect.height spec.raw.rect.width (object tl=0 bl=0 tr=spec.raw.rect.borderRadius br=spec.raw.rect.borderRadius) (toRad -90) fill="#F4F4F5"}}
43
+ {{bar raw.height spec.raw.rect.width (object tl=0 bl=0 tr=spec.raw.rect.borderRadius br=spec.raw.rect.borderRadius) (toRad -90) fill="#52525B"}}
44
+ <text x="{{spec.raw.rect.borderRadius}}" y="-{{math raw.height '-' spec.raw.rect.borderRadius}}" text-anchor="middle" font-size="12" font-weight="600" fill="white" transform="translate(0, 6)">{{raw.mark}}</text>
45
+ <text x="0" y="-18" text-anchor="end" font-size="12" font-weight="500" fill="#71717A" dy="5" transform="rotate(-90)">نمره کل</text>
46
+ <g transform="scale(1, -1)">
47
+ <rect x="-1" y="0" width="{{math spec.raw.rect.width '+' 2}}" height="1" fill="#FFFFFF" rx="1"/>
48
+ <rect x="-1" y="0" width="{{math spec.raw.rect.width '+' 2}}" height="5" fill="url('#vertical-shadow')" fill-opacity="0.2"/>
49
+ </g>
50
+
51
+ <g transform="translate({{math spec.raw.rect.width '+' spec.raw.ticks.line.offsetX}}, 0)">
52
+ {{#each rawTicks as | tick index |}}
53
+ <line x1="0" y1="-{{tick.bottomPos}}" x2="{{@root.spec.raw.ticks.line.width}}" y2="-{{tick.bottomPos}}" stroke="#E4E4E7" stroke-dasharray="3" stroke-linecap="round" stroke-width="2"/>
54
+ <g transform="translate({{math @root.spec.raw.ticks.line.width '+' @root.spec.raw.ticks.number.offsetX}}, -{{tick.bottomPos}})">
55
+ <text x="0" y="0" fill="#A1A1AA" text-anchor="end" font-size="10" font-weight="500" dy="2">{{tick.number}}</text>
56
+ </g>
57
+ {{/each}}
58
+ </g>
59
+ </g>
60
+ </g>
61
+
62
+ <g transform="translate(703.6, 571.5)">
63
+ {{#each gaugeItems as |item index|}}
64
+ <g transform="translate(-{{math index '*' @root.spec.gaugeItems.distanceX}}, 0)">
65
+ {{#with @root.spec.gaugeItems.circle}}
66
+ {{gauge R r (object tl=0 tr=0 bl=0 br=0) (object start=angles.start end=angles.end) direction clip-path="url(#items-circle-roll)" fill="#F4F4F5"}}
67
+ {{gauge R r (object tl=0 tr=0 bl=0 br=0) (object start=angles.start end=item.zeta) direction clip-path="url(#items-circle-roll)" fill=item.fill fill-opacity=item.opacity}}
68
+ {{/with}}
69
+ <text x="0" y="0" text-anchor="middle" font-size="16" font-weight="600" fill="{{item.fill}}" dy="5">{{item.mark}}</text>
70
+ <text x="-8" y="-40" font-size="10" font-weight="500" fill="#D4D4D8">0</text>
71
+ <text x="-42" y="-8" font-size="10" font-weight="500" fill="#D4D4D8" text-anchor="middle">{{lookup @root.spec.gaugeItems.maxValues item.label.eng}}</text>
72
+ <g transform="translate(0, 70)">
73
+ <text x="0" y="0" font-size="12" font-weight="500" fill="{{item.fill}}" text-anchor="middle">{{item.label.fr}}</text>
74
+ {{#each (wrapOnNewline item.label.desc) as | line index |}}
75
+ <text x="0" y="{{math 15 '+' (math index '*' 15)}}" font-size="10" font-weight="400" fill="#A1A1AA" text-anchor="middle" dy="5">{{line}}</text>
76
+ {{/each}}
77
+ </g>
78
+ </g>
79
+ {{/each}}
80
+ </g>
81
+
82
+ <g transform="translate(729, 0)">
83
+ <rect x="0" y="0" width="114" height="28" fill="#F4F4F5" />
84
+ <text x="57" y="14" font-size="10" font-weight="600" fill="#52525B" text-anchor="middle" dy="1">خرده مقیاس‌ها</text>
85
+
86
+ <g transform="translate(-50, 0)">
87
+ <rect x="0" y="0" width="48" height="28" fill="#F4F4F5" />
88
+ <text x="24" y="14" font-size="10" font-weight="600" fill="#52525B" text-anchor="middle" dy="1">میانگین</text>
89
+ </g>
90
+
91
+ <g transform="translate(-119, 0)">
92
+ <rect x="0" y="0" width="67" height="28" fill="#F4F4F5" />
93
+ <text x="33.5" y="14" font-size="10" font-weight="600" fill="#52525B" text-anchor="middle" dy="1">انحراف معیار</text>
94
+ </g>
95
+
96
+ <g transform="translate(0, 32)">
97
+ {{#each spec.tableItems as | item index |}}
98
+ <g transform="translate(0, {{math index '*' 27}})">
99
+ <rect x="0" y="0" width="114" height="28" fill="#F8FAFC" />
100
+ <text x="57" y="14" font-size="10" font-weight="400" fill="#71717A" text-anchor="middle" dy="1">{{item.label}}</text>
101
+
102
+ <g transform="translate(-50, 0)">
103
+ <rect x="0" y="0" width="48" height="28" fill="#F8FAFC" />
104
+ <text x="24" y="14" font-size="10" font-weight="400" fill="#71717A" text-anchor="middle" dy="1">{{item.avg}}</text>
105
+ </g>
106
+
107
+ <g transform="translate(-119, 0)">
108
+ <rect x="0" y="0" width="67" height="28" fill="#F8FAFC" />
109
+ <text x="33.5" y="14" font-size="10" font-weight="400" fill="#71717A" text-anchor="middle" dy="1">{{item.dev}}</text>
110
+ </g>
111
+ </g>
112
+ {{/each}}
113
+ </g>
114
+ </g>
115
+
116
+ </g>
117
+
118
+ {{/layout}}
@@ -0,0 +1,251 @@
1
+ {{#> layout}}
2
+
3
+ <defs>
4
+ <linearGradient id="horizontal-shadow">
5
+ <stop offset="0%" stop-color="black" />
6
+ <stop offset="100%" stop-color="transparent" />
7
+ </linearGradient>
8
+ <linearGradient id="vertical-shadow" gradientTransform="rotate(90)">
9
+ <stop offset="0%" stop-color="black" />
10
+ <stop offset="100%" stop-color="transparent" />
11
+ </linearGradient>
12
+ <clipPath id="raw-rect">
13
+ <rect x="0" y="0" width="300" height="16" ry="8"/>
14
+ </clipPath>
15
+ </defs>
16
+
17
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
18
+ <line x1="385" y1="0" x2="385" y2="714" stroke="#E4E4E7" stroke-width="2" stroke-dasharray="8 5" stroke-linecap="round" />
19
+ <line x1="400" y1="177.5" x2="902" y2="177.5" stroke="#E4E4E7" stroke-width="2" stroke-dasharray="8 5" stroke-linecap="round" />
20
+ <line x1="400" y1="400" x2="902" y2="400" stroke="#E4E4E7" stroke-width="2" stroke-dasharray="8 5" stroke-linecap="round" />
21
+ <line x1="0" y1="400" x2="373" y2="400" stroke="#E4E4E7" stroke-width="2" stroke-dasharray="8 5" stroke-linecap="round" />
22
+ <line x1="0" y1="632" x2="373" y2="632" stroke="#E4E4E7" stroke-width="2" stroke-dasharray="8 5" stroke-linecap="round" />
23
+ <text x="-140" y="10" font-size="10" font-weight="400" fill="#A1A1AA" transform="rotate(-90)">شخصیت کتل (16pf)</text>
24
+ <g transform="translate(36, 0)">
25
+ {{#with _16PF_Context}}
26
+ <text x="170" y="10" font-size="7" font-weight="400" fill="#1E40AF" text-anchor="middle">1</text>
27
+ <text x="88" y="10" font-size="7" font-weight="400" fill="#155E75" text-anchor="middle">10</text>
28
+ <g transform="translate(117, 0)">
29
+ {{#if (boolean status '===' "invalid")}}
30
+ <rect x="0" y="0" width="26" height="9" rx="2" fill="#FEE2E2" />
31
+ <text x="13" y="4.5" fill="#B91C1C" font-size="7" font-weight="400" text-anchor="middle" dy="1.5">نامعتبر</text>
32
+ {{/if}}
33
+ </g>
34
+ <g transform="translate(165, 15)">
35
+ <rect x="0" y="0" width="9" height="294" fill="#1D4ED8" fill-opacity="0.1" rx="3.6" />
36
+ <rect x="-9" y="0" width="9" height="294" fill="#1D4ED8" fill-opacity="0.07" rx="3.6" />
37
+ <rect x="-18" y="0" width="9" height="294" fill="#1D4ED8" fill-opacity="0.05" rx="3.6" />
38
+ <rect x="-27" y="0" width="9" height="294" fill="#E4E4E7" fill-opacity="0.15" rx="3.6" />
39
+ <rect x="-54" y="0" width="9" height="294" fill="#E4E4E7" fill-opacity="0.15" rx="3.6" />
40
+ <rect x="-63" y="0" width="9" height="294" fill="#0E7490" fill-opacity="0.05" rx="3.6" />
41
+ <rect x="-72" y="0" width="9" height="294" fill="#0E7490" fill-opacity="0.07" rx="3.6" />
42
+ <rect x="-81" y="0" width="9" height="294" fill="#0E7490" fill-opacity="0.1" rx="3.6" />
43
+ {{#each items as | item index |}}
44
+ {{#with @root._16PF_Context.spec.items as | itemsSpec |}}
45
+ <g transform="translate(0, {{math index '*' itemsSpec.offsetY}})">
46
+ <g transform="translate(0, 4)">
47
+ <line x1="10" y1="0" x2="-82" y2="0" stroke="#E4E4E7" />
48
+ <g font-size="8" font-weight="400">
49
+ <text x="124" y="0" fill="#71717A" font-weight="500" text-anchor="middle" dy="2">{{item.label.fr}}</text>
50
+ <text x="18" y="0" fill="#1E40AF" text-anchor="end" dy="2">{{item.label.right}}</text>
51
+ <text x="-90" y="0" fill="#155E75" text-anchor="start" dy="2">{{item.label.left}}</text>
52
+ </g>
53
+ </g>
54
+ <g transform="translate(-{{item.offset}}, 0)">
55
+ <rect x="0" y="0" width="9" height="9" fill="{{item.fill}}" fill-opacity="{{item.opacity}}" rx="2" />
56
+ <text x="4.5" y="4.5" fill="#FFFFFF" font-size="7" font-weight="400" text-anchor="middle" dy="2">{{item.mark}}</text>
57
+ </g>
58
+ </g>
59
+ {{/with}}
60
+ {{/each}}
61
+ </g>
62
+ <g transform="translate(0, 345)">
63
+ {{#each (reverse gaugeItems) as | item index |}}
64
+ {{#with @root._16PF_Context.spec.gaugeItems}}
65
+ <g transform="translate({{math index '*' offsetX}}, 0)">
66
+ {{gauge circle.R circle.r circle.brs circle.angles direction fill="#F4F4F5"}}
67
+ {{gauge circle.R circle.r circle.brs (object start=circle.angles.start end=item.zeta) direction fill="#65A30D"}}
68
+ <text x="0" y="0" font-size="8" font-weight="600" fill="#65A30D" text-anchor="middle" dy="3">{{item.mark}}</text>
69
+ <text x="0" y="23" font-size="8" font-weight="400" fill="#52525B" text-anchor="middle" dy="5">{{item.label.fr}}</text>
70
+ </g>
71
+ {{/with}}
72
+ {{/each}}
73
+ </g>
74
+ {{/with }}
75
+ </g>
76
+ <g transform="translate(400, 5)">
77
+ <g transform="translate(496, 9)">
78
+ <text x="0" y="0" font-size="10" font-weight="400" fill="#A1A1AA" transform="rotate(-90)">هوش‌های چندگانه گاردنر (GMI)</text>
79
+ </g>
80
+ {{#with GMIT_Context}}
81
+ <g transform="translate({{spec.items.offsetX}}, 0)">
82
+ {{setVar "tickTotalHeight" (math (math 2 '*' spec.items.ticks.heightOffset) '+' spec.items.totalHeight)}}
83
+ {{#each itemsTicks as | tick index |}}
84
+ <g transform="translate({{tick.leftPos}}, 0)">
85
+ <line x1="0" y1="0" x2="0" y2="{{../tickTotalHeight}}" stroke="#F4F4F5" stroke-dasharray="3.5" stroke-linecap="round" stroke-width="1"/>
86
+ <text x="-{{@root.GMIT_Context.spec.items.ticks.numberOffset.x}}" y="{{@root.GMIT_Context.spec.items.ticks.numberOffset.y}}" fill="#A1A1AA" text-anchor="start" font-size="8" font-weight="500" dy="3">{{tick.number}}</text>
87
+ </g>
88
+ {{/each}}
89
+
90
+ <g transform="translate(0, {{spec.items.ticks.heightOffset}})">
91
+ {{#each items as | item index |}}
92
+ {{#with @root.GMIT_Context.spec.items as | itemsSpec |}}
93
+ <g transform="translate(0, {{math index '*' itemsSpec.distanceY}})">
94
+ <path d="M 0 0 h {{math item.width '-' itemsSpec.rect.borderRadius}} a {{itemsSpec.rect.borderRadius}} {{itemsSpec.rect.borderRadius}} 180 0 1 0 {{itemsSpec.rect.height}} h -{{math item.width '-' itemsSpec.rect.borderRadius}} z" fill="{{item.fill}}" fill-opacity="{{item.opacity}}"/>
95
+ <g transform="translate(0, {{math itemsSpec.rect.height '/' 2}})">
96
+ <text x="-{{itemsSpec.label.offsetX}}" y="0" fill="#52525B" text-anchor="start" font-size="8" font-weight="400" dy="1.5">{{item.label.fr}}</text>
97
+ <text x="{{math (math item.width '-' itemsSpec.rect.borderRadius) '-' 4}}" y="0" fill="white" text-anchor="middle" font-size="8" font-weight="600" dy="2.5">{{item.mark}}</text>
98
+ </g>
99
+ </g>
100
+ {{/with}}
101
+ {{/each}}
102
+
103
+ <g transform="translate(-1, -1)">
104
+ <rect x="0" y="0" width="1" height="{{math spec.items.totalHeight '+' 2}}" fill="#FFFFFF" rx="1"/>
105
+ <rect x="1" y="0" width="5" height="{{math spec.items.totalHeight '+' 2}}" fill="url('#horizontal-shadow')" fill-opacity="0.2"/>
106
+ </g>
107
+ </g>
108
+ </g>
109
+ {{/with}}
110
+ </g>
111
+ </g>
112
+
113
+ <g transform="translate(356, 205)">
114
+ <g transform="translate(540, 9)">
115
+ <text x="0" y="0" font-size="10" font-weight="400" fill="#A1A1AA" transform="rotate(-90)">رغبت‌سنجی تحصیلی - شغلی (هالند)</text>
116
+ </g>
117
+ {{#with RIASEC_Context}}
118
+ <g transform="translate(100, 20)">
119
+ <line x1="0" y1="-10" x2="0" y2="125" stroke="#D4D4D8" stroke-width="1" stroke-linecap="round" />
120
+ {{#each items as | item index |}}
121
+ {{#with @root.RIASEC_Context.spec.items as | itemsSpec |}}
122
+ <g transform="translate(0, {{math index '*' itemsSpec.distanceY}})">
123
+ <text x="-12" y="4" font-size="8" font-weight="400" fill="#7E22CE" text-anchor="start">{{item.label.fr}}</text>
124
+ <rect x="0" y="{{math itemsSpec.rect.body.height '-' itemsSpec.rect.base.height}}" width="175" height="{{itemsSpec.rect.base.height}}" fill="#F4F4F5" />
125
+ {{#if (boolean item.mark '!==' 0)}}
126
+ {{bar item.width itemsSpec.rect.body.height itemsSpec.rect.body.brs 0 fill="#7E22CE" fill-opacity=item.opacity}}
127
+ {{/if}}
128
+ <text x="{{math item.width '+' (ternary (boolean item.mark '!==' 0) 0 7)}}" y="-6" font-size="8" font-weight="500" fill="#7E22CE" text-anchor="middle">{{item.mark}}</text>
129
+ </g>
130
+ {{/with}}
131
+ {{/each}}
132
+ <text x="175" y="135" font-size="8" font-weight="400" fill="#D4D4D8" text-anchor="middle">50</text>
133
+ </g>
134
+ <g transform="translate(433, 28)">
135
+ {{#each questionItems as | item index |}}
136
+ <g transform="translate(0, {{ math index '*' 26 }})">
137
+ <text x="35" y="12.5" font-size="8" font-weight="400" fill="#3F3F46" text-anchor="end">{{ item.label }}</text>
138
+ {{#each item.marks as | mark markIndex |}}
139
+ <g transform="translate({{math -1 '*' (math markIndex '*' 26)}}, 0)">
140
+ {{#if (boolean index '===' 0)}}
141
+ <text x="10" y="-15" font-size="8" font-weight="400" fill="#3F3F46" text-anchor="middle">{{lookup (array 'و' 'ج' 'ه' 'الف' 'م' 'ق') markIndex}}</text>
142
+ {{/if}}
143
+ <rect x="0" y="0" width="20" height="20" fill="#F4F4F5" rx="4" />
144
+ <text x="10" y="12.5" font-size="10" font-weight="500" fill="#312E81" text-anchor="middle">{{ mark }}</text>
145
+ </g>
146
+ {{/each}}
147
+ </g>
148
+ {{/each}}
149
+ </g>
150
+ {{/with}}
151
+ </g>
152
+
153
+ <g transform="translate(903, 430)">
154
+ <text x="0" y="0" font-size="10" font-weight="500" fill="#3F3F46">کارگاه‌های مورد نیاز:</text>
155
+ <g transform="translate(-8, 13.5)">
156
+ {{setVar "labels1" (array "مدیریت زمان" "مدیریت عواطف" "مهارت‌های ارتباطی" "خلاقیت" "قاطعیت")}}
157
+ {{setVar "offsets" (array 0 -108 -216 -324 -432)}}
158
+ {{#each labels1 as | label index |}}
159
+ <g transform="translate({{lookup @root.offsets index}}, 0)">
160
+ <rect x="0" y="0" width="8" height="8" fill="none" stroke="#A1A1AA" rx="1" />
161
+ <text x="-4" y="6" font-size="8" font-weight="400" fill="#52525B">{{label}}</text>
162
+ </g>
163
+ {{/each}}
164
+ {{setVar "labels2" (array "کمال‌گرایی افراطی" "فن بیان" "خودآگاهی" "مهارت‌های مدیریتی" "فرزندپروری")}}
165
+ {{setVar "offsets" (array 0 -108 -216 -324 -432)}}
166
+ {{#each labels2 as | label index |}}
167
+ <g transform="translate({{lookup @root.offsets index}}, 19)">
168
+ <rect x="0" y="0" width="8" height="8" fill="none" stroke="#A1A1AA" rx="1" />
169
+ <text x="-4" y="6" font-size="8" font-weight="400" fill="#52525B">{{label}}</text>
170
+ </g>
171
+ {{/each}}
172
+ {{setVar "labels3" (array "ارتباط مؤثر همسران" "تندخوانی" "حافظه" "تمرکز" "کنترل خشم")}}
173
+ {{setVar "offsets" (array 0 -108 -216 -324 -432)}}
174
+ {{#each labels3 as | label index |}}
175
+ <g transform="translate({{lookup @root.offsets index}}, 38)">
176
+ <rect x="0" y="0" width="8" height="8" fill="none" stroke="#A1A1AA" rx="1" />
177
+ <text x="-4" y="6" font-size="8" font-weight="400" fill="#52525B">{{label}}</text>
178
+ </g>
179
+ {{/each}}
180
+ </g>
181
+ <g transform="translate(0, 86)">
182
+ <text x="0" y="0" font-size="10" font-weight="500" fill="#3F3F46">تعیین اولویت‌های شغلی و درسی:</text>
183
+ <text x="0" y="54" font-size="10" font-weight="500" fill="#3F3F46">توصیه‌ها:</text>
184
+ <text x="0" y="108" font-size="10" font-weight="500" fill="#3F3F46">نکات:</text>
185
+ <text x="0" y="162" font-size="10" font-weight="500" fill="#3F3F46">ارجاعات:</text>
186
+ </g>
187
+ </g>
188
+
189
+ <g transform="translate(0, 443)">
190
+ <g transform="translate(10, 9)">
191
+ <text x="0" y="0" font-size="10" font-weight="400" fill="#A1A1AA" transform="rotate(-90)">شخصیت تیپ‌نمای مایرز-بریگز (MBTI)</text>
192
+ </g>
193
+ {{#with MBTI_Context}}
194
+ <g transform="translate(84, 0)">
195
+ <g transform="translate(0, 0)">
196
+ <line x1="0" y1="75" x2="180" y2="75" stroke="#F4F4F5" />
197
+ <text x="188" y="80" font-size="14" font-weight="600" fill="#BE185D" text-anchor="end" letter-spacing="3">{{report}}</text>
198
+ {{#each (first items 4) as | item index |}}
199
+ <g transform="translate({{math index '*' 40}}, 0)">
200
+ <text x="12" y="-8" font-size="10" font-weight="{{ternary item.active 600 400}}" fill="{{ternary item.active "#BE185D" "#A1A1AA"}}" text-anchor="middle">{{item.label.fr}}</text>
201
+ {{bar 24 item.height (object tl=2 bl=0 tr=2 br=0) (toRad 0) fill=(ternary item.active "#DB2777" "#F4F4F5")}}
202
+ {{#if (boolean item.mark '!==' 0)}}<text x="12" y="{{ternary item.active 11 8}}" font-size="6" font-weight="400" fill="{{ternary item.active "#FFFFFF" "#A1A1AA"}}" text-anchor="middle">{{item.mark}}</text>{{/if}}
203
+ </g>
204
+ {{/each}}
205
+ </g>
206
+ <g transform="translate(24, 150)">
207
+ {{#each (last items 4) as | item index |}}
208
+ <g transform="translate({{math index '*' 40}}, 0)">
209
+ <text x="-12" y="14" font-size="10" font-weight="{{ternary item.active 600 400}}" fill="{{ternary item.active "#BE185D" "#A1A1AA"}}" text-anchor="middle">{{item.label.fr}}</text>
210
+ {{bar 24 item.height (object tl=2 bl=0 tr=2 br=0) (toRad 180) fill=(ternary item.active "#DB2777" "#F4F4F5")}}
211
+ {{#if (boolean item.mark '!==' 0)}}<text x="-12" y="-{{ternary item.active 8 5}}" font-size="6" font-weight="400" fill="{{ternary item.active "#FFFFFF" "#A1A1AA"}}" text-anchor="middle">{{item.mark}}</text>{{/if}}
212
+ </g>
213
+ {{/each}}
214
+ </g>
215
+ </g>
216
+ {{/with}}
217
+ </g>
218
+
219
+ <g transform="translate(0, 650)">
220
+ <g transform="translate(10, 18)">
221
+ <text x="0" y="0" font-size="10" font-weight="400" fill="#A1A1AA" transform="rotate(-90)">ریون</text>
222
+ </g>
223
+ {{#with RAVEN_Context}}
224
+ <g transform="translate(40, 30)">
225
+ {{#each item.stops as | stop index |}}
226
+ {{#unless @first}}
227
+ <g transform="translate({{stop.width}}, 16)">
228
+ <line x1="0" y1="0" x2="0" y2="8" stroke="#F4F4F5" stroke-dasharray="2" stroke-linecap="round" stroke-width="1"/>
229
+ <text x="0" y="12" font-size="6" font-weight="400" text-anchor="middle" fill="#D4D4D8" dy="3">{{stop.mark}}</text>
230
+ </g>
231
+ {{setVar "prevStopWidth" (lookup (lookup @root.RAVEN_Context.item.stops (math index '-' 1)) 'width')}}
232
+ {{setVar "Wm" (math (math prevStopWidth '+' stop.width) '/' 2)}}
233
+ {{setVar "interpret" (lookup @root.spec.ravenItem.interprets (math index '-' 1))}}
234
+ {{setVar "isChosen" (boolean @root.RAVEN_Context.item.level '===' interpret.level)}}
235
+ <g transform="translate({{Wm}}, -17)" fill="{{ternary isChosen '#14B8A6' '#D4D4D8'}}">
236
+ {{setVar "titleLines" (wrapOnNewline interpret.title)}}
237
+ {{#each titleLines as | line index |}}
238
+ <text x="0" y="{{ternary (boolean ../titleLines.length '!==' 1) (math (math (lookup (array -1 1) index) '*' 4) '-' 4) 0}}" font-size="7" font-weight="{{ternary isChosen 500 400}}" text-anchor="middle" dy="3">{{line}}</text>
239
+ {{/each}}
240
+ <circle cx="0" cy="12" r="{{ternary isChosen 1.5 1}}" />
241
+ </g>
242
+ {{/unless}}
243
+ {{/each}}
244
+ <rect x="0" y="0" width="300" height="16" fill="#F4F4F5" clip-path="url(#raw-rect)"/>
245
+ <rect x="0" y="0" width="{{item.width}}" height="16" fill="#14B8A6" clip-path="url(#raw-rect)"/>
246
+ <text x="{{math item.width '-' 10}}" y="8" font-size="10" font-weight="500" text-anchor="middle" fill="white" dy="3">{{item.mark}}</text>
247
+ </g>
248
+ {{/with}}
249
+ </g>
250
+
251
+ {{/layout}}
@@ -0,0 +1,104 @@
1
+ {{#> layout}}
2
+
3
+ <defs>
4
+ <clipPath id="raw-rect">
5
+ <rect x="0" y="0" width="815" height="20" rx="5"/>
6
+ </clipPath>
7
+ <path id="ok" d="M5.11339 -4.90545L-2.36541 2.57335L-5.1134 -0.174636C-5.24663 -0.307865 -5.46266 -0.307865 -5.59592 -0.174636L-6.40008 0.629527C-6.53331 0.762766 -6.53331 0.978793 -6.40008 1.11205L-2.60669 4.90543C-2.47345 5.03867 -2.25742 5.03867 -2.12416 4.90543L6.40002 -3.61877C6.53333 -3.752 6.53333 -3.96803 6.40002 -4.10129L5.59585 -4.90545C5.46265 -5.03868 5.24659 -5.03868 5.11339 -4.90545Z" fill="#DC2626"/>
8
+ <path id="no" d="M1.37904 -0.000910358L5.54564 -4.09311L6.40494 -4.93702C6.53169 -5.06151 6.53169 -5.2638 6.40494 -5.38829L5.48551 -6.29124C5.35876 -6.41573 5.15279 -6.41573 5.02604 -6.29124L0.000178576 -1.35513L-5.02568 -6.29164C-5.15243 -6.41613 -5.35841 -6.41613 -5.48517 -6.29164L-6.40493 -5.38869C-6.53169 -5.2642 -6.53169 -5.0619 -6.40493 -4.93742L-1.37868 -0.000910358L-6.40493 4.93521C-6.53169 5.0597 -6.53169 5.26199 -6.40493 5.38648L-5.48557 6.28943C-5.35882 6.41392 -5.15284 6.41392 -5.02608 6.28943L0.000178576 1.35332L4.16679 5.44554L5.02604 6.28943C5.15279 6.41392 5.35876 6.41392 5.48551 6.28943L6.40494 5.38648C6.53169 5.26199 6.53169 5.0597 6.40494 4.93521L1.37904 -0.000910358Z" fill="#52525B"/>
9
+ <path id="badge" d="M 0 177 C 3 177, 9.31 174.88, 10.5 172.5 L 39 121 L 109 121 C 126 121, 150 104, 150 81 L 150 -80 C 150 -103, 128 -121, 110 -121 L -110 -121 C -128 -121, -150 -103, -150 -80 L -150 81 C -150 104, -126 121, -109 121 L -39 121 L -10.5 172.5 C -9.31 174.88, -3 177, 0 177"/>
10
+ </defs>
11
+
12
+ <g transform="translate(0, {{spec.profile.padding.y}})">
13
+ <g transform="translate({{math spec.profile.dimensions.width '-' spec.profile.padding.x}}, 0)">
14
+
15
+ {{#each questions.[0] as | question questionIndex |}}
16
+ {{#with @root.spec.questions as | questionsSpec |}}
17
+ <g transform="translate(0, {{math questionIndex '*' questionsSpec.distanceY}})" fill="{{lookup questionsSpec.colors (modulo questionIndex 2)}}" font-size="14" font-weight="400">
18
+ <g transform="translate(0, 0)">
19
+ <rect x="0" y="0" width="{{questionsSpec.rect1.width}}" height="{{questionsSpec.rect1.height}}" rx="{{questionsSpec.rect1.br}}" transform="scale(-1, 1)"/>
20
+ <text x="-{{math questionsSpec.rect1.width '/' 2}}" y="{{math questionsSpec.rect1.height '/' 2}}" fill="#52525B" text-anchor="middle" dy="4">{{question.number}}</text>
21
+ </g>
22
+ <g transform="translate(-{{math questionsSpec.rect1.width '+' questionsSpec.offsetX}}, 0)">
23
+ <rect x="0" y="0" width="{{questionsSpec.rect1.width}}" height="{{questionsSpec.rect1.height}}" rx="{{questionsSpec.rect1.br}}" transform="scale(-1, 1)"/>
24
+ <text x="-{{math questionsSpec.rect1.width '/' 2}}" y="{{math questionsSpec.rect1.height '/' 2}}" fill="{{question.answer.choice.fill}}" text-anchor="middle" dy="4">{{question.answer.choice.text}}</text>
25
+ </g>
26
+ <g transform="translate(-{{math 2 '*' (math questionsSpec.rect1.width '+' questionsSpec.offsetX)}}, 0)">
27
+ <rect x="0" y="0" width="{{questionsSpec.rect2.width}}" height="{{questionsSpec.rect2.height}}" rx="{{questionsSpec.rect2.br}}" transform="scale(-1, 1)"/>
28
+ <text x="-10" y="{{math questionsSpec.rect1.height '/' 2}}" fill="#52525B" text-anchor="start" dy="4">{{question.answer.text}}</text>
29
+ </g>
30
+ </g>
31
+ {{/with}}
32
+ {{/each}}
33
+
34
+ <g transform="translate(0, {{math (math questions.[0].length '*' spec.questions.distanceY) '+' 4}})" fill="{{lookup spec.questions.colors 0}}" font-size="14" font-weight="400">
35
+ <rect x="0" y="0" width="{{spec.questions.rect3.width}}" height="{{spec.questions.rect3.height}}" rx="{{spec.questions.rect3.br}}" transform="scale(-1, 1)"/>
36
+ <text x="-{{math spec.questions.rect3.width '/' 2}}" y="{{math spec.questions.rect3.height '/' 2}}" fill="#52525B" text-anchor="middle" dy="4">{{math questions.[0].length '+' 1}}</text>
37
+ <g transform="translate(-{{math spec.questions.rect3.width '+' spec.questions.offsetX}}, 0)">
38
+ {{assignGlobal "index" 0}}
39
+ {{#withGroup questions.[1] 4}}
40
+ <g transform="translate(-{{math @root.index '*' (math (math (math @root.spec.questions.rect4.width '+' @root.spec.questions.offsetX) '+' @root.spec.questions.rect1.width) '+' 10)}} ,0)">
41
+ {{#each this as | question questionIndex |}}
42
+ {{#with @root.spec.questions as | questionsSpec |}}
43
+ <g transform="translate(0, {{math questionIndex '*' questionsSpec.distanceY}})">
44
+ <rect x="0" y="0" width="{{questionsSpec.rect4.width}}" height="{{questionsSpec.rect4.height}}" rx="{{questionsSpec.rect4.br}}" transform="scale(-1, 1)"/>
45
+ <text x="-10" y="{{math questionsSpec.rect4.height '/' 2}}" fill="#52525B" text-anchor="start" dy="4">{{question.text}}</text>
46
+ <g transform="translate(-{{math questionsSpec.rect4.width '+' questionsSpec.offsetX}}, 0)">
47
+ <rect x="0" y="0" width="{{questionsSpec.rect1.width}}" height="{{questionsSpec.rect1.height}}" rx="{{questionsSpec.rect1.br}}" transform="scale(-1, 1)"/>
48
+ <g transform="translate(-{{math questionsSpec.rect1.width '/' 2}}, {{math questionsSpec.rect1.height '/' 2}})">
49
+ <svg width="13" height="12.77" viewBox="0 0 13 12.77" overflow="visible">
50
+ <use href="#{{lookup (object 0='ok' 1='no') question.answer}}"/>
51
+ </svg>
52
+ </g>
53
+ </g>
54
+ </g>
55
+ {{/with}}
56
+ {{/each}}
57
+ </g>
58
+ {{assignGlobal "index" 1}}
59
+ {{/withGroup}}
60
+ </g>
61
+
62
+ <g transform="translate(-{{math spec.raw.rect.width '+' 5}}, {{math spec.questions.rect3.height '+' 83}})">
63
+ <text x="-15" y="{{math spec.raw.rect.height '/' 2}}" font-size="12" font-weight="400" fill="#52525B" text-anchor="start" dy="3">{{raw.label.fr}}</text>
64
+ <rect x="0" y="0" width="{{spec.raw.rect.width}}" height="{{spec.raw.rect.height}}" fill="#F4F4F5" clip-path="url(#raw-rect)"/>
65
+ <rect x="0" y="0" width="{{raw.width}}" height="{{spec.raw.rect.height}}" fill="{{raw.interpret.fill}}" clip-path="url(#raw-rect)"/>
66
+ <g transform="translate({{raw.width}}, -{{spec.raw.label.shape.offsetY}})">
67
+ <svg width="{{spec.raw.label.shape.width}}" height="{{spec.raw.label.shape.height}}" x="0" y="0" viewBox="0 0 300 298" overflow="visible">
68
+ <use href="#badge" fill="{{raw.interpret.fill}}"/>
69
+ </svg>
70
+ <text x="0" y="0" font-size="18" font-weight="600" text-anchor="middle" fill="white" dy="5">{{raw.mark}}</text>
71
+ </g>
72
+
73
+ <g>
74
+ {{#each raw.stops as | stop index |}}
75
+ {{#with @root.spec.raw as | rawSpec |}}
76
+ <g transform="translate({{stop.width}}, 0)">
77
+ <line x1="0" y1="0" x2="0" y2="{{rawSpec.label.stops.line.length}}" stroke="#A1A1AA" stroke-dasharray="3" stroke-linecap="round" stroke-width="1"/>
78
+ <text x="0" y="{{math rawSpec.label.stops.line.length '+' rawSpec.label.stops.number.offsetY}}" font-size="12" font-weight="400" text-anchor="middle" fill="#A1A1AA" dy="3">{{stop.mark}}</text>
79
+ </g>
80
+ {{#unless @last}}
81
+ {{setVar "afterStopWidth" (lookup (lookup @root.raw.stops (math index '+' 1)) 'width')}}
82
+ {{setVar "Wm" (math (math afterStopWidth '+' stop.width) '/' 2)}}
83
+ {{setVar "interpret" (lookup (lookup rawSpec.interprets (math index '+' 1)) 'fr')}}
84
+ {{setVar "isChosen" (boolean interpret '===' @root.raw.interpret.fr)}}
85
+ <g transform="translate({{Wm}}, {{math rawSpec.label.stops.line.length '+' rawSpec.label.stops.number.offsetY}})">
86
+ <text x="0" y="0" font-size="12" font-weight="400" text-anchor="middle" fill="{{ternary isChosen @root.raw.interpret.fill '#A1A1AA'}}" dy="3">افسردگی</text>
87
+ <text x="0" y="18" font-size="14" font-weight="{{ternary isChosen 700 400}}" text-anchor="middle" fill="{{ternary isChosen @root.raw.interpret.fill '#A1A1AA'}}" dy="3">{{interpret}}</text>
88
+ </g>
89
+ {{/unless}}
90
+ {{/with}}
91
+ {{/each}}
92
+ {{setVar "isChosen" (boolean spec.raw.interprets.[0].eng '===' @root.raw.interpret.eng)}}
93
+ <g transform="translate(20, {{math spec.raw.label.stops.line.length '+' spec.raw.label.stops.number.offsetY}})" font-size="12" font-weight="400" text-anchor="middle">
94
+ <text x="0" y="0" fill="{{ternary isChosen raw.interpret.fill '#A1A1AA'}}" dy="3">فقدان</text>
95
+ <text x="0" y="18" fill="{{ternary isChosen raw.interpret.fill '#A1A1AA'}}" dy="3">افسردگی</text>
96
+ </g>
97
+ </g>
98
+ </g>
99
+ </g>
100
+
101
+ </g>
102
+ </g>
103
+
104
+ {{/layout}}
@@ -0,0 +1,26 @@
1
+ {{#> layout}}
2
+
3
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
4
+ <g transform="translate({{math (math spec.item.circle.main.R '+' 10) '+' 8}}, {{math (math spec.item.circle.main.R '+' 10) '+' 12}})">
5
+ <text x="0" y="0" font-size="26" font-weight="500" fill="#DB2777" text-anchor="middle" dy="8">{{item.mark}}</text>
6
+ {{#with spec.item.circle as | circleSpec |}}
7
+ <circle cx="0" cy="0" r="{{circleSpec.center.radius}}" stroke="#A1A1AA" fill="none" stroke-dasharray="3"/>
8
+ {{gauge circleSpec.main.R circleSpec.main.r circleSpec.main.brs circleSpec.main.angles circleSpec.main.direction fill=circleSpec.main.base.fill stroke=circleSpec.main.base.stroke}}
9
+ {{gauge circleSpec.main.R circleSpec.main.r circleSpec.main.brs (object start=circleSpec.main.angles.start end=../item.angle) circleSpec.main.direction fill=circleSpec.main.body.fill stroke=circleSpec.main.body.stroke}}
10
+ {{setVar "p1" (polarToCartesian circleSpec.center.radius ../item.angle)}}
11
+ {{setVar "p2" (polarToCartesian circleSpec.main.R ../item.angle)}}
12
+ <line x1="{{p1.x}}" y1="{{p1.y}}" x2="{{p2.x}}" y2="{{p2.y}}" stroke="#71717A"/>
13
+ {{/with}}
14
+ <g font-size="14" font-weight="400" fill="#A1A1AA">
15
+ {{#each item.stops as | stop index |}}
16
+ {{#with @root.spec.item as | itemSpec |}}
17
+ {{setVar "p" (polarToCartesian (math itemSpec.circle.main.R '+' 10) stop.angle)}}
18
+ {{setVar "betMinus90And90" (boolean (boolean stop.angle '>' (toRad -90)) '&&' (boolean stop.angle '<' (toRad 90)))}}
19
+ <text x="{{p.x}}" y="{{p.y}}" text-anchor="{{ternary betMinus90And90 'end' 'start'}}" dy="0">{{stop.mark}}</text>
20
+ {{/with}}
21
+ {{/each}}
22
+ </g>
23
+ </g>
24
+ </g>
25
+
26
+ {{/layout}}