@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,107 @@
1
+ {{#> layout}}
2
+ {{setVar "angles" (array -146.3 146.3 -33.7 33.7)}}
3
+ <defs>
4
+ {{#each angles as | angle index |}}
5
+ <marker id="pointer{{math index '+' 1}}" markerWidth="6" markerHeight="10" refX="4.5" refY="5" orient="{{angle}}" markerUnits="userSpaceOnUse">
6
+ <polyline points="1 1, 5 5, 1 9" fill="none" stroke="#000000" stroke-opacity="0.15" stroke-width="1" stroke-linecap="round" />
7
+ </marker>
8
+ {{/each}}
9
+ <marker id="marker1" markerWidth="8" markerHeight="12" refX="7.5" refY="6" orient="-90" markerUnits="userSpaceOnUse">
10
+ <polyline points="1 1, 7 6, 1 11" fill="none" stroke="#3F3F46" stroke-width="2" stroke-linecap="round" />
11
+ </marker>
12
+ <marker id="marker2" markerWidth="8" markerHeight="12" refX="7.5" refY="6" orient="0" markerUnits="userSpaceOnUse">
13
+ <polyline points="1 1, 7 6, 1 11" fill="none" stroke="#3F3F46" stroke-width="2" stroke-linecap="round" />
14
+ </marker>
15
+ </defs>
16
+
17
+ <g transform="translate({{spec.profile.padding.[0].x}}, {{spec.profile.padding.[0].y}})">
18
+ <g transform="translate(0, 320)">
19
+ <text x="0" y="12.5" font-size="16" font-weight="600" fill="#3F3F46" text-anchor="middle" transform="rotate(-90)" xml:space="preserve">انعطاف‌پذیری: {{item.marks.flexibility}}</text>
20
+ <g transform="translate(0, -170)">
21
+ <text x="0" y="35" font-size="14" font-weight="400" fill="#71717A" text-anchor="start" transform="rotate(-90)">آشفته</text>
22
+ </g>
23
+ <g transform="translate(0, 160)">
24
+ <text x="0" y="35" font-size="14" font-weight="400" fill="#71717A" text-anchor="start" transform="rotate(-90)">خشک</text>
25
+ </g>
26
+ <line x1="50" y1="206" x2="50" y2="-192" stroke="#3F3F46" stroke-width="2" marker-end="url(#marker1)" />
27
+ </g>
28
+ <g transform="translate(427.5, 0)">
29
+ <text x="0" y="12.5" font-size="16" font-weight="600" fill="#3F3F46" text-anchor="middle" xml:space="preserve">انسجام: {{item.marks.cohesion}}</text>
30
+ <text x="-215" y="35" font-size="14" font-weight="400" fill="#71717A" text-anchor="start">از هم گسسته</text>
31
+ <text x="285" y="35" font-size="14" font-weight="400" fill="#71717A" text-anchor="start">در هم تنیده</text>
32
+ <line x1="-295" y1="50" x2="305" y2="50" stroke="#3F3F46" stroke-width="2" marker-end="url(#marker2)" />
33
+ </g>
34
+ <g transform="translate(132, 126)">
35
+ {{setVar "row1" (array "#FECACA" "#FEF9C3" "#FEF9C3" "#FEF9C3" "#FECACA")}}
36
+ {{setVar "row2" (array "#FEF9C3" "#D1FAE5" "#D1FAE5" "#D1FAE5" "#FEF9C3")}}
37
+ {{setVar "stops" (array 0 15 35 65 85 100)}}
38
+ {{setVar "fills" (array row1 row2 row2 row2 row1)}}
39
+ {{#forLoop 0 5 1}}
40
+ {{#with i as | j |}}
41
+ {{#forLoop 0 5 1}}
42
+ <rect x="{{math j '*' 120}}" y="{{math i '*' 80}}" width="120" height="80" fill="{{lookup (lookup @root.fills j) i}}" />
43
+ {{#if (boolean j '===' 4)}}
44
+ <text x="-20" y="{{math (math i '*' 80) '+' 10}}" font-size="12" font-weight="400" text-anchor="start" fill="#71717A">{{lookup (reverse @root.stops) i}}</text>
45
+ {{#if (boolean i '===' 4)}}
46
+ <text x="-20" y="{{math (math i '+' 1) '*' 80}}" font-size="12" font-weight="400" text-anchor="start" fill="#71717A">{{lookup (reverse @root.stops) (math i '+' 1)}}</text>
47
+ {{/if}}
48
+ {{#unless @first}}
49
+ <line x1="0" y1="{{math i '*' 80}}" x2="600" y2="{{math i '*' 80}}" stroke="#FFFFFF" />
50
+ {{/unless}}
51
+ {{/if}}
52
+ {{#if (boolean (boolean i '===' 2) '&&' (boolean j '===' 2))}}
53
+ <text x="{{math (math j '*' 120) '+' 60}}" y="{{math (math i '*' 80) '+' 40}}" font-size="14" font-weight="400" text-anchor="middle" fill="#A1A1AA" fill-opacity="0.6" dy="5">دمکراتیک</text>
54
+ {{/if}}
55
+ {{/forLoop}}
56
+ {{#if (boolean j '!==' 0)}}
57
+ <line x1="{{math j '*' 120}}" y1="0" x2="{{math j '*' 120}}" y2="400" stroke="#FFFFFF" />
58
+ {{/if}}
59
+ <text x="{{math j '*' 120}}" y="-20" font-size="12" font-weight="400" text-anchor="start" fill="#71717A">{{lookup @root.stops j}}</text>
60
+ {{#if (boolean j '===' 4)}}
61
+ <text x="{{math (math j '+' 1) '*' 120}}" y="-20" font-size="12" font-weight="400" text-anchor="start" fill="#71717A">{{lookup @root.stops (math j '+' 1)}}</text>
62
+ {{/if}}
63
+ {{/with}}
64
+ {{/forLoop}}
65
+ <rect x="240" y="160" width="120" height="80" fill="none" stroke="#000000" stroke-opacity="0.15" stroke-dasharray="4" />
66
+
67
+ <line x1="240" y1="160" x2="-30" y2="-20" stroke="#000000" stroke-opacity="0.15" stroke-dasharray="5" marker-end="url(#pointer1)" />
68
+ <line x1="240" y1="240" x2="-30" y2="420" stroke="#000000" stroke-opacity="0.15" stroke-dasharray="4" marker-end="url(#pointer2)" />
69
+ <line x1="360" y1="160" x2="630" y2="-20" stroke="#000000" stroke-opacity="0.15" stroke-dasharray="4" marker-end="url(#pointer3)" />
70
+ <line x1="360" y1="240" x2="630" y2="420" stroke="#000000" stroke-opacity="0.15" stroke-dasharray="4" marker-end="url(#pointer4)"/>
71
+
72
+ <g transform="translate(-50, -33.35)">
73
+ <text x="0" y="0" font-size="14" font-weight="400" text-anchor="start" fill="#A1A1AA" transform="rotate({{math (lookup angles 0) '+' 180}})" dy="3.5">بی‌خیال</text>
74
+ </g>
75
+ <g transform="translate(-50, 433.35)">
76
+ <text x="0" y="0" font-size="14" font-weight="400" text-anchor="start" fill="#A1A1AA" transform="rotate({{math (lookup angles 1) '+' 180}})" dy="3.5">طردکننده</text>
77
+ </g>
78
+ <g transform="translate(650, -33.35)">
79
+ <text x="0" y="0" font-size="14" font-weight="400" text-anchor="end" fill="#A1A1AA" transform="rotate({{lookup angles 2}})" dy="3.5">سهل‌گیر</text>
80
+ </g>
81
+ <g transform="translate(650, 433.35)">
82
+ <text x="0" y="0" font-size="14" font-weight="400" text-anchor="end" fill="#A1A1AA" transform="rotate({{lookup angles 3}})" dy="3.5">مستبد</text>
83
+ </g>
84
+
85
+ <g transform="translate(0, 400)">
86
+ <g transform="translate({{item.coords.x}}, -{{item.coords.y}})">
87
+ <circle cx="0" cy="0" r="2.5" fill="black" />
88
+ <circle cx="0" cy="0" r="7.5" fill="black" fill-opacity="0.3" />
89
+ </g>
90
+ </g>
91
+ </g>
92
+ <g transform="translate(578.5, 586)">
93
+ <g transform="translate(0, 0)">
94
+ <rect x="0" y="0" width="24" height="16" fill="#FECACA" />
95
+ <text x="-10" y="8" font-size="14" font-weight="400" fill="#71717A" text-anchor="start" dy="3">نامتعادل</text>
96
+ </g>
97
+ <g transform="translate(-124, 0)">
98
+ <rect x="0" y="0" width="24" height="16" fill="#FEF9C3" />
99
+ <text x="-10" y="8" font-size="14" font-weight="400" fill="#71717A" text-anchor="start" dy="3">نیمه متعادل</text>
100
+ </g>
101
+ <g transform="translate(-268, 0)">
102
+ <rect x="0" y="0" width="24" height="16" fill="#D1FAE5" />
103
+ <text x="-10" y="8" font-size="14" font-weight="400" fill="#71717A" text-anchor="start" dy="3">متعادل</text>
104
+ </g>
105
+ </g>
106
+ </g>
107
+ {{/layout}}
@@ -0,0 +1,51 @@
1
+ {{#> layout}}
2
+
3
+ <defs>
4
+ <linearGradient id="bg">
5
+ <stop offset="0%" stop-color="#22C55E"/>
6
+ <stop offset="100%" stop-color="#15803D"/>
7
+ </linearGradient>
8
+ </defs>
9
+
10
+ <g transform="translate({{spec.profile.padding.[1].x}}, {{spec.profile.padding.[1].y}})">
11
+ <g transform="translate({{math spec.page2.items.top.baseline.width '/' 2}}, {{spec.page2.items.top.topPos}})">
12
+ {{#each items.top as | item index |}}
13
+ {{#with @root.spec.page2.items.top as | itemsSpec |}}
14
+ <g transform="translate({{lookup (array -320 -210 -100 100 210 320) index}}, 0)">
15
+ <g transform="translate(-{{math itemsSpec.rect.base.width '/' 2}}, 0)">
16
+ {{bar item.height.base itemsSpec.rect.base.width (object tl=0 tr=itemsSpec.rect.base.br br=itemsSpec.rect.base.br bl=0) (toRad -90) fill=itemsSpec.rect.base.color}}
17
+ </g>
18
+ <text x="0" y="-{{math item.height.base '+' 12}}" font-size="12" font-weight="400" text-anchor="middle" fill="#D4D4D8" dy="3">{{item.maxValue}}</text>
19
+ <g fill="{{item.fill}}">
20
+ <g transform="translate(-{{math itemsSpec.rect.body.width '/' 2}}, 0)">
21
+ {{#forLoop 0 item.mark 1}}
22
+ <rect x="0" y="-{{math (math i '+' 1) '*' itemsSpec.rect.body.distanceY}}" width="{{itemsSpec.rect.body.width}}" height="{{itemsSpec.rect.body.height}}" rx="{{itemsSpec.rect.body.br}}"/>
23
+ {{/forLoop}}
24
+ </g>
25
+ <text x="{{math (math itemsSpec.rect.body.width '/' 2) '+' 16}}" y="-{{math item.mark '*' itemsSpec.rect.body.distanceY}}" font-size="16" font-weight="500" text-anchor="middle" dy="4">{{item.mark}}</text>
26
+ <text x="0" y="20" font-size="14" font-weight="400" text-anchor="middle" dy="5">{{item.label.fr}}</text>
27
+ </g>
28
+ </g>
29
+ {{/with}}
30
+ {{/each}}
31
+ <line x1="-{{math spec.page2.items.top.baseline.width '/' 2}}" y1="0" x2="{{math spec.page2.items.top.baseline.width '/' 2}}" y2="0" stroke="#A1A1AA" stroke-width="2"/>
32
+ </g>
33
+
34
+ <g transform="translate(0, {{math spec.page2.items.top.topPos '+' spec.page2.items.bottom.offsetY}})">
35
+ {{#each items.bottom as | item index |}}
36
+ {{#with @root.spec.page2.items.bottom as | itemsSpec |}}
37
+ <g transform="translate(0, {{math index '*' (math itemsSpec.rect.body.height '+' 20)}})">
38
+ <text x="150" y="{{math itemsSpec.rect.body.height '/' 2}}" font-size="16" font-weight="400" text-anchor="start" fill="#52525B" dy="4">{{item.label.fr}}</text>
39
+ <g transform="translate(168, 0)">
40
+ <rect x="0" y="{{math (math itemsSpec.rect.body.height '-' itemsSpec.rect.base.height) '/' 2}}" width="{{itemsSpec.rect.base.width}}" height="{{itemsSpec.rect.base.height}}" rx="{{itemsSpec.rect.base.br}}" fill="#F4F4F5"/>
41
+ <text x="{{math itemsSpec.rect.base.width '+' 27}}" y="{{math itemsSpec.rect.body.height '/' 2}}" font-size="12" font-weight="400" text-anchor="middle" fill="#A1A1AA" dy="3">{{itemsSpec.maxValue}}</text>
42
+ <rect x="0" y="0" width="{{item.width}}" height="{{itemsSpec.rect.body.height}}" rx="{{itemsSpec.rect.body.br}}" fill="url(#bg)"/>
43
+ <text x="{{math item.width '-' 18}}" y="{{math itemsSpec.rect.body.height '/' 2}}" font-size="16" font-weight="600" text-anchor="middle" fill="white" dy="4">{{item.mark}}</text>
44
+ </g>
45
+ </g>
46
+ {{/with}}
47
+ {{/each}}
48
+ </g>
49
+ </g>
50
+
51
+ {{/layout}}
@@ -0,0 +1,67 @@
1
+ {{#> layout}}
2
+
3
+ <defs>
4
+ <clipPath id="raw-rect">
5
+ <rect x="0" y="0" width="{{spec.raw.rect.width}}" height="{{spec.raw.rect.height}}" rx="{{spec.raw.rect.br}}"/>
6
+ </clipPath>
7
+ <path id="badge" d="M 0 147 C 3.55 146.98, 6.64 145.25, 9 141.5 L 34 102 L 115.5 102 C 137 102, 150 83, 150 68 L 150 -68 C 150 -82, 137 -102, 115.5 -102 L -115.5 -102 C -137 -102, -150 -82, -150 -68 L -150 68 C -150 83, -137 102, -115.5 102 L -34 102 L -9 141.5 C -6.64 145.25, -3.55 146.98, 0 147"/>
8
+ </defs>
9
+
10
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
11
+ <g transform="translate({{math spec.items.baseline.width '/' 2}}, {{spec.items.topPos}})">
12
+ <g transform="translate(-{{math spec.items.rect.body.width '/' 2}}, 0)">
13
+ {{#each items as | item index |}}
14
+ {{#with @root.spec.items as | itemsSpec |}}
15
+ <g transform="translate({{math (math index '-' 2) '*' itemsSpec.distanceX}}, 0)">
16
+ <g transform="translate(-5, 0)">
17
+ {{bar item.height.base itemsSpec.rect.base.width (object tl=0 tr=itemsSpec.rect.base.br br=itemsSpec.rect.base.br bl=0) (toRad -90) fill=itemsSpec.rect.base.color}}
18
+ <text x="-5" y="-{{math item.height.base '-' 4}}" font-size="12" font-weight="400" text-anchor="start" fill="#D4D4D8" dy="3">{{item.maxValue}}</text>
19
+ </g>
20
+ {{bar item.height.body itemsSpec.rect.body.width (object tl=0 tr=itemsSpec.rect.body.br br=itemsSpec.rect.body.br bl=0) (toRad -90) fill=item.fill}}
21
+ <g transform="translate({{math itemsSpec.rect.body.width '/' 2}}, 0)" fill="{{item.fill}}">
22
+ <text x="0" y="-{{math item.height.body '+' 13}}" font-size="16" font-weight="500" text-anchor="middle" dy="4">{{item.mark}}</text>
23
+ <g transform="translate(0, 20)">
24
+ {{#each (wrapOnNewline item.label.fr) as | line index |}}
25
+ <text x="0" y="{{math index '*' 18}}" font-size="14" font-weight="400" text-anchor="middle" dy="5">{{line}}</text>
26
+ {{/each}}
27
+ </g>
28
+ </g>
29
+ </g>
30
+ {{/with}}
31
+ {{/each}}
32
+ </g>
33
+ <line x1="-{{math spec.items.baseline.width '/' 2}}" y1="0" x2="{{math spec.items.baseline.width '/' 2}}" y2="0" stroke="#A1A1AA" stroke-width="2"/>
34
+ </g>
35
+
36
+ <g transform="translate({{spec.raw.leftPos}}, {{math spec.items.topPos '+' spec.raw.offsetY}})">
37
+ <text x="0" y="-20" font-size="14" font-weight="400" text-anchor="end" fill="#52525B" dy="4">{{raw.label.fr}}</text>
38
+ <rect x="0" y="0" width="{{spec.raw.rect.width}}" height="{{spec.raw.rect.height}}" fill="#F4F4F5" clip-path="url(#raw-rect)"/>
39
+ <rect x="0" y="0" width="{{raw.width}}" height="{{spec.raw.rect.height}}" fill="{{raw.interpret.fill}}" clip-path="url(#raw-rect)"/>
40
+ <g transform="translate({{raw.width}}, -{{spec.raw.label.shape.offsetY}})">
41
+ <svg width="{{spec.raw.label.shape.width}}" height="{{spec.raw.label.shape.height}}" x="0" y="0" viewBox="0 0 300 249" overflow="visible">
42
+ <use href="#badge" fill="{{raw.interpret.fill}}"/>
43
+ </svg>
44
+ <text x="0" y="0" font-size="18" font-weight="600" text-anchor="middle" fill="white" dy="5">{{raw.mark}}</text>
45
+ </g>
46
+
47
+ <g>
48
+ {{#each raw.stops as | stop index |}}
49
+ {{#with @root.spec.raw as | rawSpec |}}
50
+ <g transform="translate({{stop.width}}, 0)">
51
+ <line x1="0" y1="0" x2="0" y2="{{rawSpec.label.stops.line.length}}" stroke="#A1A1AA" stroke-dasharray="3" stroke-linecap="round" stroke-width="1"/>
52
+ <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>
53
+ </g>
54
+ {{#unless @first}}
55
+ {{setVar "prevStopWidth" (lookup (lookup @root.raw.stops (math index '-' 1)) 'width')}}
56
+ {{setVar "Wm" (math (math prevStopWidth '+' stop.width) '/' 2)}}
57
+ {{setVar "interpret" (lookup (lookup @root.spec.raw.interprets (math index '-' 1)) 'fr')}}
58
+ {{setVar "isChosen" (boolean interpret '===' @root.raw.interpret.fr)}}
59
+ <text x="{{Wm}}" y="{{math rawSpec.label.stops.line.length '+' rawSpec.label.stops.number.offsetY}}" font-size="{{ternary isChosen 16 14}}" font-weight="{{ternary isChosen 600 400}}" text-anchor="middle" fill="{{ternary isChosen @root.raw.interpret.fill '#A1A1AA'}}" dy="3">{{interpret}}</text>
60
+ {{/unless}}
61
+ {{/with}}
62
+ {{/each}}
63
+ </g>
64
+ </g>
65
+ </g>
66
+
67
+ {{/layout}}
@@ -0,0 +1,45 @@
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
+ </defs>
13
+
14
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
15
+ <g transform="translate({{spec.items.offsetX}}, 0)">
16
+ {{setVar "tickTotalHeight" (math (math 2 '*' spec.items.ticks.heightOffset) '+' spec.items.totalHeight)}}
17
+ {{#each itemsTicks as | tick index |}}
18
+ <g transform="translate({{tick.leftPos}}, 0)">
19
+ <line x1="0" y1="0" x2="0" y2="{{../tickTotalHeight}}" stroke="#E4E4E7" stroke-dasharray="3.5" stroke-linecap="round" stroke-width="2"/>
20
+ <text x="-{{@root.spec.items.ticks.numberOffset.x}}" y="{{@root.spec.items.ticks.numberOffset.y}}" fill="#A1A1AA" text-anchor="start" font-size="16" font-weight="500" dy="5">{{tick.number}}</text>
21
+ </g>
22
+ {{/each}}
23
+
24
+ <g transform="translate(0, {{spec.items.ticks.heightOffset}})">
25
+ {{#each items as | item index |}}
26
+ {{#with @root.spec.items as | itemsSpec |}}
27
+ <g transform="translate(0, {{math index '*' itemsSpec.distanceY}})">
28
+ <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}}"/>
29
+ <g transform="translate(0, {{math itemsSpec.rect.height '/' 2}})">
30
+ <text x="-{{itemsSpec.label.offsetX}}" y="0" fill="#52525B" text-anchor="start" font-size="18" font-weight="500" dy="3">{{item.label.fr}}</text>
31
+ <text x="{{math (math item.width '-' itemsSpec.rect.borderRadius) '-' 8}}" y="0" fill="white" text-anchor="middle" font-size="20" font-weight="600" dy="6">{{item.mark}}</text>
32
+ </g>
33
+ </g>
34
+ {{/with}}
35
+ {{/each}}
36
+
37
+ <g transform="translate(-1, -1)">
38
+ <rect x="0" y="0" width="1" height="{{math spec.items.totalHeight '+' 2}}" fill="#FFFFFF" rx="1"/>
39
+ <rect x="1" y="0" width="5" height="{{math spec.items.totalHeight '+' 2}}" fill="url('#horizontal-shadow')" fill-opacity="0.2"/>
40
+ </g>
41
+ </g>
42
+ </g>
43
+ </g>
44
+
45
+ {{/layout}}
@@ -0,0 +1,36 @@
1
+ {{#> layout}}
2
+
3
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
4
+ <g transform="translate(385, 299)">
5
+ <g fill="none" stroke="#D4D4D8">
6
+ {{polygon spec.polygons.n spec.polygons.radius spec.polygons.startAngle}}
7
+ {{polygon spec.polygons.n spec.polygons.centerOffset spec.polygons.startAngle}}
8
+ </g>
9
+ <g fill="#007BA4" fill-opacity="0.1" stroke="#007BA4" stroke-width="2">
10
+ {{polygon spec.polygons.n (getArrOfProp items 'radius') spec.polygons.startAngle}}
11
+ </g>
12
+ <text x="0" y="-{{spec.raw.mark.paddingY}}" font-size="12" font-weight="400" fill="#71717A" text-anchor="middle" dy="3">{{raw.label.fr}} از {{spec.raw.maxValue}}</text>
13
+ <text x="0" y="+{{spec.raw.mark.paddingY}}" font-size="30" font-weight="600" fill="#27272A" text-anchor="middle" dy="8">{{raw.mark}}</text>
14
+ <g>
15
+ {{assignGlobal "labelOffset" (array 0 0 25 0 0 25)}}
16
+ {{#each items as |item index|}}
17
+ {{setVar "p1" (polarToCartesian @root.spec.polygons.radius item.angle)}}
18
+ {{setVar "p2" (polarToCartesian @root.spec.polygons.centerOffset item.angle)}}
19
+ <line x1="{{p1.x}}" y1="{{p1.y}}" x2="{{p2.x}}" y2="{{p2.y}}" stroke="{{item.fill}}" stroke-dasharray="5"/>
20
+ {{setVar "point" (polarToCartesian item.radius item.angle)}}
21
+ <g transform="translate({{point.x}}, {{point.y}})" fill="white">
22
+ <circle cx="0" cy="0" r="{{@root.spec.items.dataPoints.radius}}" stroke="{{item.fill}}" stroke-width="1"/>
23
+ <text x="0" y="0" font-size="12" font-weight="500" fill="{{item.fill}}" text-anchor="middle" dy="3">{{item.mark}}</text>
24
+ </g>
25
+ {{setVar "point" (polarToCartesian (math (math @root.spec.polygons.radius '+' @root.spec.items.labels.offset) '+' (lookup @root.labelOffset index)) item.angle)}}
26
+ {{!-- {{setVar "point" (polarToCartesian (math @root.spec.polygons.radius '+' @root.spec.items.labels.offset) item.angle)}} --}}
27
+ <g transform="translate({{point.x}}, {{point.y}})">
28
+ <text x="0" y="0" transform="translate(0, -{{@root.spec.items.labels.paddingY}})" font-size="16" font-weight="400" fill="{{item.fill}}" text-anchor="middle" dy="5">{{item.label.fr}}</text>
29
+ <text x="0" y="0" transform="translate(0, +{{@root.spec.items.labels.paddingY}})" font-size="12" font-weight="400" fill="#A1A1AA" text-anchor="middle" dy="5">از {{item.maxValue}}</text>
30
+ </g>
31
+ {{/each}}
32
+ </g>
33
+ </g>
34
+ </g>
35
+
36
+ {{/layout}}
@@ -0,0 +1,67 @@
1
+ {{#> layout}}
2
+
3
+ <defs>
4
+ <linearGradient id="shadow">
5
+ <stop offset="0%" stop-color="black" />
6
+ <stop offset="100%" stop-color="transparent" />
7
+ </linearGradient>
8
+ </defs>
9
+
10
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
11
+ <g font-size="20">
12
+ <g transform="translate({{spec.items.base.rect.width}}, 0)">
13
+ {{#each itemsTicks as |tick index|}}
14
+ <line x1="{{tick.leftPos}}" y1="0" x2="{{tick.leftPos}}" y2="{{math ../spec.items.totalHeight '+' (math 2 '*' ../spec.items.ticks.heightOffset)}}" stroke="#E5E7EB" stroke-dasharray="3.5" stroke-linecap="round" stroke-width="2"/>
15
+ <text x="{{math tick.leftPos '-' ../spec.items.ticks.numberOffset.x}}" y="{{../spec.items.ticks.numberOffset.y}}" fill="#9CA3AF" text-anchor="middle" font-size="16" font-weight="500" dy="5">{{tick.number}}</text>
16
+ {{/each}}
17
+ </g>
18
+ <g transform="translate({{spec.items.base.rect.width}}, {{spec.items.ticks.heightOffset}})">
19
+ {{#each items as |item index|}}
20
+ <g transform="translate(0, {{math (math index '*' ../spec.items.distanceY) '+' 1}})">
21
+ {{bar item.width ../spec.items.base.rect.height ../spec.items.body.rect.brs 0 fill=item.body.color fill-opacity=item.body.opacity}}
22
+ <g transform="translate(-{{math (math ../spec.items.base.rect.height '/' 2) '+' 6}}, {{math ../spec.items.base.rect.height '/' 2}})">
23
+ <text x="{{item.width}}" y="0" fill="white" text-anchor="middle" font-size="20" font-weight="600" dy="6">{{item.mark}}</text>
24
+ </g>
25
+ </g>
26
+ {{/each}}
27
+ </g>
28
+ <g transform="translate(0, {{spec.items.ticks.heightOffset}})">
29
+ <rect x="0" y="0" width="{{math spec.items.base.rect.width '+' 1}}" height="{{spec.items.totalHeight}}" fill="#FFFFFF" rx="1"/>
30
+ <rect x="{{math spec.items.base.rect.width '+' 1}}" y="0" width="5" height="{{spec.items.totalHeight}}" fill="url('#shadow')" fill-opacity="0.2"/>
31
+ </g>
32
+ <g transform="translate(0, {{spec.items.ticks.heightOffset}})">
33
+ {{#each items as |item index|}}
34
+ <g transform="translate(0, {{math index '*' ../spec.items.distanceY}})">
35
+ {{bar ../spec.items.base.rect.width ../spec.items.base.rect.height ../spec.items.base.rect.brs 0 fill=item.baseColor}}
36
+ <g transform="translate({{math ../spec.items.base.rect.height '/' 2}}, {{math ../spec.items.base.rect.height '/' 2}})">
37
+ <circle cx="0" cy="0" r="{{../spec.items.base.label.circle.radius}}" fill="white"/>
38
+ <text x="0" y="0" fill="{{item.baseColor}}" text-anchor="middle" font-size="16" font-weight="400" dy="5.5">{{item.label.abbr}}</text>
39
+ <text x="{{../spec.items.base.label.offsetX}}" y="0" fill="white" font-size="18" font-weight="500" text-anchor="end" dy="4.5">{{item.label.fr}}</text>
40
+ </g>
41
+ </g>
42
+ {{/each}}
43
+ </g>
44
+ </g>
45
+ <g transform="translate({{math (math spec.items.base.rect.width '+' spec.items.body.rect.maxWidth) '+' spec.raw.offsetX}}, {{math spec.items.totalHeight '+' (math 2 '*' spec.items.ticks.heightOffset)}}) scale(1, -1)">
46
+ <g transform="translate({{math spec.raw.rect.width '+' spec.raw.ticks.line.offsetX}}, 0)">
47
+ {{#each rawTicks as |tick index|}}
48
+ <line x1="0" y1="{{tick.bottomPos}}" x2="{{../spec.raw.ticks.line.width}}" y2="{{tick.bottomPos}}" stroke="#E5E7EB" stroke-dasharray="3" stroke-linecap="round" stroke-width="2"/>
49
+ <g transform="translate({{math ../spec.raw.ticks.line.width '+' ../spec.raw.ticks.number.offsetX}}, {{tick.bottomPos}})">
50
+ <text x="0" y="0" fill="#9CA3AF" text-anchor="middle" font-size="14" font-weight="500" dy="4" transform="scale(1, -1)">{{tick.number}}</text>
51
+ </g>
52
+ {{/each}}
53
+ </g>
54
+ <rect x="0" y="0" width="{{spec.raw.rect.width}}" height="{{spec.raw.rect.height}}" rx="{{spec.raw.rect.borderRadius}}" fill="#E5E7EB"/>
55
+ <rect x="0" y="0" width="{{spec.raw.rect.width}}" height="{{raw.height}}" rx="{{spec.raw.rect.borderRadius}}" fill="#374151"/>
56
+ <g transform="translate({{spec.raw.rect.borderRadius}}, {{spec.raw.rect.borderRadius}})">
57
+ <g transform="translate(0, {{math raw.height '-' (math 2 '*' spec.raw.rect.borderRadius)}})">
58
+ <text x="0" y="0" fill="white" text-anchor="middle" font-size="20" font-weight="600" dy="6.5" transform="scale(1, -1) translate(0, 12)">{{raw.mark}}</text>
59
+ </g>
60
+ <g>
61
+ <text x="0" y="0" fill="white" text-anchor="end" font-size="18" font-weight="500" dy="4" transform="scale(1, -1) rotate(-90)">{{raw.label.fr}}</text>
62
+ </g>
63
+ </g>
64
+ </g>
65
+ </g>
66
+
67
+ {{/layout}}
@@ -0,0 +1,123 @@
1
+ {{#> layout}}
2
+
3
+ <defs>
4
+ {{#with spec.raw.circle}}
5
+ <clipPath id="raw-circle-roll">
6
+ {{gauge R r brs (object start=angles.start end=angles.end) false}}
7
+ </clipPath>
8
+ {{/with}}
9
+ {{#with spec.items.circle}}
10
+ <clipPath id="items-circle-roll">
11
+ {{gauge R r brs (object start=angles.start end=angles.end) false}}
12
+ </clipPath>
13
+ {{/with}}
14
+ </defs>
15
+
16
+ <g transform="translate(0, {{spec.profile.padding.y}})">
17
+ <g transform="translate({{math spec.profile.dimensions.width '/' 2}}, {{math (math (math (math spec.raw.circle.R '+' spec.raw.ticks.line.width) '+' spec.raw.ticks.line.offset) '+' spec.raw.ticks.number.offset) '+' 10}})">
18
+ <g transform="translate(-{{spec.raw.rect.offsetX}}, -{{spec.raw.circle.R}})">
19
+ {{#with spec.raw.rect}}
20
+ <path
21
+ d="M 0 0 h -{{math width '-' rb}} a {{rb}} {{rb}} 90 0 0 -{{rb}} {{rb}} v {{math
22
+ height
23
+ '-'
24
+ (math 2 '*' rb)
25
+ }} a {{rb}} {{rb}} 90 0 0 {{rb}} {{rb}} h {{math width '-' rb}} Z"
26
+ fill="{{@root.spec.raw.fill}}"
27
+ ></path>
28
+ <g transform="translate(-{{math width '/' 2}}, {{math height '/' 2}})">
29
+ <text x="0" y="0" text-anchor="middle" font-size="22" font-weight="600" fill="white" dy="6.5">{{@root.raw.label.title}}</text>
30
+ </g>
31
+ {{/with}}
32
+ </g>
33
+ {{#with spec.raw.circle}}
34
+ {{gauge R r (object tl=0 tr=0 bl=0 br=0) (object start=angles.start end=angles.end) direction clip-path="url(#raw-circle-roll)" fill="#F3F4F6"}}
35
+ {{gauge R r (object tl=0 tr=0 bl=0 br=0) (object start=angles.start end=@root.raw.zeta) direction clip-path="url(#raw-circle-roll)" fill=@root.spec.raw.fill fill-opacity=@root.raw.opacity}}
36
+ {{/with}}
37
+ <text x="0" y="0" text-anchor="middle" font-size="32" font-weight="700" fill="{{spec.raw.fill}}" dy="10">{{raw.mark}}</text>
38
+ {{#each raw.ticks as |tick|}}
39
+ {{setVar "r2" (math (math @root.spec.raw.circle.R "+" @root.spec.raw.ticks.line.offset) "+" @root.spec.raw.ticks.line.width)}}
40
+ {{setVar "r1" (math @root.spec.raw.circle.R "+" @root.spec.raw.ticks.line.offset)}}
41
+ {{setVar "p1" (polarToCartesian r1 tick.angle)}}
42
+ {{setVar "p2" (polarToCartesian r2 tick.angle)}}
43
+ <line
44
+ x1="{{p1.x}}"
45
+ y1="{{p1.y}}"
46
+ x2="{{p2.x}}"
47
+ y2="{{p2.y}}"
48
+ stroke="#F4F4F5"
49
+ stroke-dasharray="2.5 4.5"
50
+ stroke-linecap="round"
51
+ stroke-width="2"
52
+ ></line>
53
+ {{setVar "p" (polarToCartesian (math r2 '+' @root.spec.raw.ticks.number.offset) tick.angle)}}
54
+ <text
55
+ x="{{p.x}}"
56
+ y="{{p.y}}"
57
+ text-anchor="{{ternary (boolean (boolean tick.angle '===' (toRad -90)) '||' (boolean tick.angle '===' (toRad 90))) 'middle' (ternary (boolean tick.angle '>' (toRad 90)) 'start' 'end')}}"
58
+ font-size="16"
59
+ fill="#D4D4D8"
60
+ dy="5"
61
+ >{{tick.number}}</text>
62
+ {{/each}}
63
+
64
+ <g transform="translate(0, {{math (math spec.raw.circle.R '+' spec.items.offsetY) '+' spec.items.circle.R}})">
65
+ {{#each items as |item index|}}
66
+ <g transform="translate({{math (math (math -2 '*' index) '+' 1) '*' (math @root.spec.items.distanceX '/' 2)}}, 0)">
67
+ <g transform="translate(-{{@root.spec.items.rect.offsetX}}, -{{@root.spec.items.circle.R}})">
68
+ {{#with @root.spec.items.rect}}
69
+ <path
70
+ d="M 0 0 h -{{math width '-' rb}} a {{rb}} {{rb}} 90 0 0 -{{rb}} {{rb}} v {{math
71
+ height
72
+ '-'
73
+ (math 2 '*' rb)
74
+ }} a {{rb}} {{rb}} 90 0 0 {{rb}} {{rb}} h {{math width '-' rb}} Z"
75
+ fill="{{item.fill}}"
76
+ ></path>
77
+ <g transform="translate(-{{math width '/' 2}}, {{math height '/' 2}})">
78
+ <text x="0" y="0" text-anchor="middle" font-size="18" font-weight="500" fill="white" dy="5">{{item.label.title}}</text>
79
+ </g>
80
+ {{/with}}
81
+ </g>
82
+ {{#with @root.spec.items.circle}}
83
+ {{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="#F3F4F6"}}
84
+ {{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}}
85
+ {{/with}}
86
+ <text x="0" y="0" text-anchor="middle" font-size="24" font-weight="500" fill="{{item.fill}}" dy="8">{{item.mark}}</text>
87
+ {{#each item.ticks as |tick|}}
88
+ {{setVar "r2" (math (math @root.spec.items.circle.R "+" @root.spec.items.ticks.line.offset) "+" @root.spec.items.ticks.line.width)}}
89
+ {{setVar "r1" (math @root.spec.items.circle.R "+" @root.spec.items.ticks.line.offset)}}
90
+ {{setVar "p1" (polarToCartesian r1 tick.angle)}}
91
+ {{setVar "p2" (polarToCartesian r2 tick.angle)}}
92
+ <line
93
+ x1="{{p1.x}}"
94
+ y1="{{p1.y}}"
95
+ x2="{{p2.x}}"
96
+ y2="{{p2.y}}"
97
+ stroke="#F4F4F5"
98
+ stroke-dasharray="2.5 4.5"
99
+ stroke-linecap="round"
100
+ stroke-width="2"
101
+ ></line>
102
+ {{setVar "p" (polarToCartesian (math r2 '+' @root.spec.items.ticks.number.offset) tick.angle)}}
103
+ <text
104
+ x="{{p.x}}"
105
+ y="{{p.y}}"
106
+ text-anchor="{{ternary (boolean (boolean tick.angle '===' (toRad -90)) '||' (boolean tick.angle '===' (toRad 90))) 'middle' (ternary (boolean tick.angle '>' (toRad 90)) 'start' 'end')}}"
107
+ font-size="16"
108
+ fill="#D4D4D8"
109
+ dy="5"
110
+ >{{tick.number}}</text>
111
+ {{/each}}
112
+ <g transform="translate(0, {{math @root.spec.items.circle.R '+' @root.spec.items.label.offsetY}})">
113
+ {{#each (lineWrap item.label.desc 28) as | line index |}}
114
+ <text x="0" y="{{math index '*' @root.spec.items.label.lineHeight}}" text-anchor="middle" font-size="16" dy="5" fill="#71717A">{{line}}</text>
115
+ {{/each}}
116
+ </g>
117
+ </g>
118
+ {{/each}}
119
+ </g>
120
+ </g>
121
+ </g>
122
+
123
+ {{/layout}}
@@ -0,0 +1,65 @@
1
+ {{#> layout}}
2
+
3
+ <defs>
4
+ <path id="badge" d="M 0 153.25 C 3 153.25, 7.5 150.25, 9 148.25 L 38 101.75 L 67 101.75 C 110 101.75, 149.5 62.25, 149.5 22.25 L 149.5 -22.75 C 149.5 -63.75, 110 -101.75, 70 -101.75 L -70 -101.75 C -110 -101.75, -149.5 -63.75, -149.5 -22.75 L -149.5 22.25 C -149.5 62.25, -110 101.75, -67 101.75 L -38 101.75 L -9 148.25 C -7.5 150.25, -3 153.25, 0 153.25"/>
5
+ </defs>
6
+
7
+ <g transform="translate({{spec.profile.padding.x}}, {{spec.profile.padding.y}})">
8
+ <g transform="translate({{math spec.items.baseline.width '/' 2}}, {{spec.items.topPos}})">
9
+ {{#each items as | item index |}}
10
+ {{#with @root.spec.items as | itemsSpec |}}
11
+ <g transform="translate({{math (math index '-' 2) '*' itemsSpec.distanceX}}, 0)">
12
+ <g transform="translate(-{{math itemsSpec.rect.base.width '/' 2}}, 0)">
13
+ {{bar item.height.base itemsSpec.rect.base.width (object tl=0 tr=itemsSpec.rect.base.br br=itemsSpec.rect.base.br bl=0) (toRad -90) fill=itemsSpec.rect.base.color}}
14
+ </g>
15
+ <text x="0" y="-{{math item.height.base '+' 12}}" font-size="12" font-weight="400" text-anchor="middle" fill="#D4D4D8" dy="3">{{item.maxValue}}</text>
16
+ <g fill="{{item.fill}}">
17
+ <g transform="translate(-{{math itemsSpec.rect.body.width '/' 2}}, 0)">
18
+ {{#forLoop 0 item.mark 1}}
19
+ <rect x="0" y="-{{math (math i '+' 1) '*' itemsSpec.rect.body.distanceY}}" width="{{itemsSpec.rect.body.width}}" height="{{itemsSpec.rect.body.height}}" rx="{{itemsSpec.rect.body.br}}"/>
20
+ {{/forLoop}}
21
+ </g>
22
+ <text x="{{math (math itemsSpec.rect.body.width '/' 2) '+' 16}}" y="-{{math item.mark '*' itemsSpec.rect.body.distanceY}}" font-size="16" font-weight="500" text-anchor="middle" dy="4">{{item.mark}}</text>
23
+ <text x="0" y="20" font-size="14" font-weight="400" text-anchor="middle" dy="5">{{item.label.fr}}</text>
24
+ </g>
25
+ </g>
26
+ {{/with}}
27
+ {{/each}}
28
+ <line x1="-{{math spec.items.baseline.width '/' 2}}" y1="0" x2="{{math spec.items.baseline.width '/' 2}}" y2="0" stroke="#A1A1AA" stroke-width="2"/>
29
+ </g>
30
+
31
+ <g transform="translate(0, {{math spec.items.topPos '+' spec.raw.offsetY}})">
32
+ <text x="0" y="-20" font-size="14" font-weight="400" text-anchor="end" fill="#52525B" dy="4">{{raw.label.fr}}</text>
33
+ <rect x="0" y="{{math (math spec.raw.rect.body.height '-' spec.raw.rect.base.height) '/' 2}}" width="{{spec.raw.rect.base.width}}" height="{{spec.raw.rect.base.height}}" rx="{{spec.raw.rect.base.br}}" fill="#F4F4F5"/>
34
+ <rect x="0" y="0" width="{{raw.width}}" height="{{spec.raw.rect.body.height}}" rx="{{spec.raw.rect.body.br}}" fill="{{raw.interpret.fill}}"/>
35
+ <g transform="translate({{raw.width}}, -{{spec.raw.label.shape.offsetY}})">
36
+ <svg width="{{spec.raw.label.shape.width}}" height="{{spec.raw.label.shape.height}}" x="0" y="0" viewBox="0 0 299 255" overflow="visible">
37
+ <use href="#badge" fill="{{raw.interpret.fill}}"/>
38
+ </svg>
39
+ <text x="0" y="0" font-size="18" font-weight="600" text-anchor="middle" fill="white" dy="5">{{raw.mark}}</text>
40
+ </g>
41
+
42
+ <g transform="translate(0, {{math spec.raw.rect.body.height '+' 6}})">
43
+ {{#each raw.stops as | stop index |}}
44
+ {{#with @root.spec.raw as | rawSpec |}}
45
+ <g transform="translate({{stop.width}}, 0)">
46
+ <line x1="0" y1="0" x2="0" y2="{{rawSpec.label.stops.line.length}}" stroke="#A1A1AA" stroke-dasharray="2" stroke-linecap="round" stroke-width="1"/>
47
+ <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>
48
+ </g>
49
+ {{#unless @first}}
50
+ {{setVar "prevStopWidth" (lookup (lookup @root.raw.stops (math index '-' 1)) 'width')}}
51
+ {{setVar "Wm" (math (math prevStopWidth '+' stop.width) '/' 2)}}
52
+ {{setVar "interpret" (lookup (lookup @root.spec.raw.interprets (math index '-' 1)) 'fr')}}
53
+ {{setVar "isChosen" (boolean interpret '===' @root.raw.interpret.fr)}}
54
+ <g transform="translate({{Wm}}, {{math rawSpec.label.stops.line.length '+' rawSpec.label.stops.number.offsetY}})" fill="{{ternary isChosen @root.raw.interpret.fill '#A1A1AA'}}">
55
+ <text x="0" y="-8" font-size="10" font-weight="400" text-anchor="middle">مهارت‌های ارتباطی</text>
56
+ <text x="0" y="8" font-size="{{ternary isChosen 16 14}}" font-weight="{{ternary isChosen 600 400}}" text-anchor="middle" dy="3">{{interpret}}</text>
57
+ </g>
58
+ {{/unless}}
59
+ {{/with}}
60
+ {{/each}}
61
+ </g>
62
+ </g>
63
+ </g>
64
+
65
+ {{/layout}}