@clickview/streamable-learning 0.34.1-dev.1 → 0.35.0-rc.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 (437) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/103-streamable-learning-5060b6cda5.chunk.css +7 -0
  3. package/dist/css/1269-streamable-learning-a12c4ebc99.chunk.css +2 -0
  4. package/dist/css/1457-streamable-learning-c8c8b3b9b1.chunk.css +50 -0
  5. package/dist/css/2334-streamable-learning-de03ae073a.chunk.css +2 -0
  6. package/dist/css/3322-streamable-learning-510e1aa3f3.chunk.css +34 -0
  7. package/dist/css/3838-streamable-learning-da10685fe8.chunk.css +22 -0
  8. package/dist/css/4254-streamable-learning-e493f4a027.chunk.css +2 -0
  9. package/dist/css/4607-streamable-learning-2605302fc2.chunk.css +90 -0
  10. package/dist/css/4772-streamable-learning-f83b838d71.chunk.css +9 -0
  11. package/dist/css/5003-streamable-learning-b38d2ddbbe.chunk.css +98 -0
  12. package/dist/css/5565-streamable-learning-0caae3809b.chunk.css +13 -0
  13. package/dist/css/6017-streamable-learning-098a205d01.chunk.css +6 -0
  14. package/dist/css/6356-streamable-learning-8c5b220bf6.chunk.css +1 -0
  15. package/dist/css/6987-streamable-learning-8f682301c6.chunk.css +1 -0
  16. package/dist/css/7317-streamable-learning-b5d226bbb6.chunk.css +5 -0
  17. package/dist/css/8058-streamable-learning-539cf7be18.chunk.css +12 -0
  18. package/dist/css/8294-streamable-learning-c797263ac2.chunk.css +1 -0
  19. package/dist/css/8496-streamable-learning-ce19f6ca52.chunk.css +13 -0
  20. package/dist/css/8601-streamable-learning-f525210660.chunk.css +6 -0
  21. package/dist/css/9514-streamable-learning-251703c6d1.chunk.css +2 -0
  22. package/dist/css/9766-streamable-learning-31650ffe5d.chunk.css +8 -0
  23. package/dist/css/9842-streamable-learning-24729103f7.chunk.css +4 -0
  24. package/dist/css/9899-streamable-learning-0338f8d2dc.chunk.css +4 -0
  25. package/dist/css/streamable-learning-dd0c1095d5.css +23 -0
  26. package/dist/languages/en.json +1 -0
  27. package/dist/scripts/103-aceced8961-streamable-learning.chunk.js +1 -0
  28. package/dist/scripts/1097-680a971192-streamable-learning.chunk.js +2 -0
  29. package/dist/scripts/1097-680a971192-streamable-learning.chunk.js.LICENSE.txt +105 -0
  30. package/dist/scripts/1269-2d0b903343-streamable-learning.chunk.js +2 -0
  31. package/dist/scripts/1269-2d0b903343-streamable-learning.chunk.js.LICENSE.txt +1 -0
  32. package/dist/scripts/1457-899f40d09a-streamable-learning.chunk.js +1 -0
  33. package/dist/scripts/1482-b1dd75897c-streamable-learning.chunk.js +1 -0
  34. package/dist/scripts/1934-fc017df0da-streamable-learning.chunk.js +2 -0
  35. package/dist/scripts/1934-fc017df0da-streamable-learning.chunk.js.LICENSE.txt +9 -0
  36. package/dist/scripts/2042-d51622d63e-streamable-learning.chunk.js +1 -0
  37. package/dist/scripts/2087-eba9033b1c-streamable-learning.chunk.js +1 -0
  38. package/dist/scripts/2245-8cd3224e1b-streamable-learning.chunk.js +1 -0
  39. package/dist/scripts/2334-00b028191d-streamable-learning.chunk.js +1 -0
  40. package/dist/scripts/2676-c842ec7e8d-streamable-learning.chunk.js +2 -0
  41. package/dist/scripts/2676-c842ec7e8d-streamable-learning.chunk.js.LICENSE.txt +1 -0
  42. package/dist/scripts/2877-5ffc9711f6-streamable-learning.chunk.js +1 -0
  43. package/dist/scripts/2911-2ec3a6600a-streamable-learning.chunk.js +1 -0
  44. package/dist/scripts/3057-731a8ca978-streamable-learning.chunk.js +1 -0
  45. package/dist/scripts/3093-efbcc927ea-streamable-learning.chunk.js +1 -0
  46. package/dist/scripts/3186-d1a6ccffde-streamable-learning.chunk.js +1 -0
  47. package/dist/scripts/3322-33c015dec9-streamable-learning.chunk.js +1 -0
  48. package/dist/scripts/3472-50ca92bde3-streamable-learning.chunk.js +1 -0
  49. package/dist/scripts/3838-4a38f33dc2-streamable-learning.chunk.js +1 -0
  50. package/dist/scripts/3941-2ef15ca9ac-streamable-learning.chunk.js +1 -0
  51. package/dist/scripts/4254-ef581b8105-streamable-learning.chunk.js +1 -0
  52. package/dist/scripts/4607-a4edb06dba-streamable-learning.chunk.js +2 -0
  53. package/dist/scripts/4607-a4edb06dba-streamable-learning.chunk.js.LICENSE.txt +1 -0
  54. package/dist/scripts/4772-3cb280f959-streamable-learning.chunk.js +2 -0
  55. package/dist/scripts/4772-3cb280f959-streamable-learning.chunk.js.LICENSE.txt +1 -0
  56. package/dist/scripts/4951-df701c6a8d-streamable-learning.chunk.js +1 -0
  57. package/dist/scripts/5003-7468a75d64-streamable-learning.chunk.js +2 -0
  58. package/dist/scripts/5003-7468a75d64-streamable-learning.chunk.js.LICENSE.txt +1 -0
  59. package/dist/scripts/5088-2e09e1ba6e-streamable-learning.chunk.js +1 -0
  60. package/dist/scripts/5173-a800a17d0d-streamable-learning.chunk.js +1 -0
  61. package/dist/scripts/5446-2cbe9f9d1b-streamable-learning.chunk.js +1 -0
  62. package/dist/scripts/5543-205aaa36a6-streamable-learning.chunk.js +1 -0
  63. package/dist/scripts/5565-224d86dc1b-streamable-learning.chunk.js +1 -0
  64. package/dist/scripts/578-2cc99f46f7-streamable-learning.chunk.js +1 -0
  65. package/dist/scripts/6017-5bd6f9bf7a-streamable-learning.chunk.js +2 -0
  66. package/dist/scripts/6017-5bd6f9bf7a-streamable-learning.chunk.js.LICENSE.txt +1 -0
  67. package/dist/scripts/6356-eefa3ff22e-streamable-learning.chunk.js +1 -0
  68. package/dist/scripts/6979-ef9a3931a2-streamable-learning.chunk.js +2 -0
  69. package/dist/scripts/6979-ef9a3931a2-streamable-learning.chunk.js.LICENSE.txt +1 -0
  70. package/dist/scripts/6987-e58de31cfe-streamable-learning.chunk.js +1 -0
  71. package/dist/scripts/7317-6b7186c85d-streamable-learning.chunk.js +1 -0
  72. package/dist/scripts/7347-772848ba8a-streamable-learning.chunk.js +1 -0
  73. package/dist/scripts/7570-cd4f70ff52-streamable-learning.chunk.js +2 -0
  74. package/dist/scripts/7570-cd4f70ff52-streamable-learning.chunk.js.LICENSE.txt +1 -0
  75. package/dist/scripts/7904-96574373ca-streamable-learning.chunk.js +1 -0
  76. package/dist/scripts/7925-1e1cfa2a04-streamable-learning.chunk.js +1 -0
  77. package/dist/scripts/8058-51c4b442d6-streamable-learning.chunk.js +1 -0
  78. package/dist/scripts/8126-9d09959b28-streamable-learning.chunk.js +2 -0
  79. package/dist/scripts/8126-9d09959b28-streamable-learning.chunk.js.LICENSE.txt +60 -0
  80. package/dist/scripts/8397-39ce77876d-streamable-learning.chunk.js +1 -0
  81. package/dist/scripts/8496-1b2519f9fd-streamable-learning.chunk.js +2 -0
  82. package/dist/scripts/8496-1b2519f9fd-streamable-learning.chunk.js.LICENSE.txt +1 -0
  83. package/dist/scripts/8599-b74e1ab6e3-streamable-learning.chunk.js +1 -0
  84. package/dist/scripts/8601-37783cf18b-streamable-learning.chunk.js +1 -0
  85. package/dist/scripts/8819-2a50dd6a9b-streamable-learning.chunk.js +1 -0
  86. package/dist/scripts/8937-5103db88d8-streamable-learning.chunk.js +1 -0
  87. package/dist/scripts/9390-bbaf07ad0f-streamable-learning.chunk.js +1 -0
  88. package/dist/scripts/9514-a31ca9af06-streamable-learning.chunk.js +1 -0
  89. package/dist/scripts/9766-48d72d9285-streamable-learning.chunk.js +2 -0
  90. package/dist/scripts/9766-48d72d9285-streamable-learning.chunk.js.LICENSE.txt +1 -0
  91. package/dist/scripts/9842-36d830ee87-streamable-learning.chunk.js +1 -0
  92. package/dist/scripts/9899-f33e8f1d43-streamable-learning.chunk.js +2 -0
  93. package/dist/scripts/9899-f33e8f1d43-streamable-learning.chunk.js.LICENSE.txt +1 -0
  94. package/dist/scripts/bundle-7ea4deeaa8.min.js +2 -0
  95. package/dist/scripts/bundle-7ea4deeaa8.min.js.LICENSE.txt +108 -0
  96. package/dist/scripts/pdf.worker.entry-a2092a6670.min.worker.js +2 -0
  97. package/dist/scripts/pdf.worker.entry-a2092a6670.min.worker.js.LICENSE.txt +21 -0
  98. package/package.json +3 -5
  99. package/typings/utils/imports.d.ts +1 -2
  100. package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  101. package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  102. package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  103. package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  104. package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  105. package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  106. package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  107. package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  108. package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  109. package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  110. package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  111. package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  112. package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  113. package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  114. package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  115. package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  116. package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  117. package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  118. package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  119. package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  120. package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  121. package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  122. package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  123. package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  124. package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  125. package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  126. package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  127. package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  128. package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  129. package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  130. package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  131. package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  132. package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  133. package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  134. package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  135. package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  136. package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  137. package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  138. package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  139. package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  140. package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  141. package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  142. package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  143. package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  144. package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  145. package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  146. package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  147. package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  148. package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  149. package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  150. package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  151. package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  152. package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  153. package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  154. package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  155. package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  156. package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  157. package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  158. package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  159. package/dist/css/B-attovs.chunk.css +0 -9
  160. package/dist/css/B1NucFMn.chunk.css +0 -1
  161. package/dist/css/BPdg7JW4.chunk.css +0 -1
  162. package/dist/css/BPrUSCaY.chunk.css +0 -1
  163. package/dist/css/BR0fUt9D.chunk.css +0 -1
  164. package/dist/css/BhYm6SRm.chunk.css +0 -1
  165. package/dist/css/BiRz4h1c.chunk.css +0 -1
  166. package/dist/css/Bq1ChJn4.chunk.css +0 -1
  167. package/dist/css/Bt85j9js.chunk.css +0 -1
  168. package/dist/css/BuYrqi9E.chunk.css +0 -1
  169. package/dist/css/BugV1Bpa.chunk.css +0 -1
  170. package/dist/css/BuuVPl7n.chunk.css +0 -1
  171. package/dist/css/C1NkrNqQ.chunk.css +0 -1
  172. package/dist/css/C1qv5jz5.chunk.css +0 -1
  173. package/dist/css/C7XoyEPr.chunk.css +0 -1
  174. package/dist/css/C7_MDu56.chunk.css +0 -1
  175. package/dist/css/CC5F5C8O.chunk.css +0 -1
  176. package/dist/css/CChSC6Ta.chunk.css +0 -1
  177. package/dist/css/CCsCPLDG.chunk.css +0 -1
  178. package/dist/css/CD1qrI1T.chunk.css +0 -1
  179. package/dist/css/CKqvCBj4.chunk.css +0 -1
  180. package/dist/css/CLZ0Ycds.chunk.css +0 -1
  181. package/dist/css/CO7M4rZW.chunk.css +0 -1
  182. package/dist/css/CY0yvCW4.chunk.css +0 -1
  183. package/dist/css/CYGsw8FT.chunk.css +0 -1
  184. package/dist/css/Cbi3KYBa.chunk.css +0 -1
  185. package/dist/css/CliS8Q8r.chunk.css +0 -1
  186. package/dist/css/D-kQKsZN.chunk.css +0 -1
  187. package/dist/css/D2NwUVrK.chunk.css +0 -1
  188. package/dist/css/D4g1IoUU.chunk.css +0 -1
  189. package/dist/css/DBgpcO3T.chunk.css +0 -1
  190. package/dist/css/DDnpOnVB.chunk.css +0 -1
  191. package/dist/css/DZJSONGP.chunk.css +0 -1
  192. package/dist/css/Dc0zNt2E.chunk.css +0 -1
  193. package/dist/css/DeAfaPiD.chunk.css +0 -1
  194. package/dist/css/Dj731zLm.chunk.css +0 -1
  195. package/dist/css/DjPPxa0A.chunk.css +0 -1
  196. package/dist/css/DlOtoSz0.chunk.css +0 -1
  197. package/dist/css/DwduQat7.chunk.css +0 -1
  198. package/dist/css/Dzuu2GTx.chunk.css +0 -1
  199. package/dist/css/JAvsJreH.chunk.css +0 -1
  200. package/dist/css/NKlFYVOc.chunk.css +0 -1
  201. package/dist/css/VZd8qGtK.chunk.css +0 -1
  202. package/dist/css/Y7U--2na.chunk.css +0 -1
  203. package/dist/css/ir3IcK_l.chunk.css +0 -1
  204. package/dist/css/jbMisi9r.chunk.css +0 -1
  205. package/dist/css/kS5aDtIJ.chunk.css +0 -1
  206. package/dist/css/mqCL1o7m.chunk.css +0 -1
  207. package/dist/css/qZzkUeZk.chunk.css +0 -1
  208. package/dist/css/sC_H3yXE.chunk.css +0 -1
  209. package/dist/css/wR_6C_NV.chunk.css +0 -1
  210. package/dist/en.json +0 -1
  211. package/dist/scripts/-Oi3rE3V.chunk.js +0 -5
  212. package/dist/scripts/-Oi3rE3V.chunk.js.map +0 -1
  213. package/dist/scripts/-cwk-1Iv.chunk.js +0 -2
  214. package/dist/scripts/-cwk-1Iv.chunk.js.map +0 -1
  215. package/dist/scripts/4oi1ldJ4.chunk.js +0 -3
  216. package/dist/scripts/4oi1ldJ4.chunk.js.map +0 -1
  217. package/dist/scripts/6UeJLeAd.chunk.js +0 -2
  218. package/dist/scripts/6UeJLeAd.chunk.js.map +0 -1
  219. package/dist/scripts/8zar0u1i.chunk.js +0 -2
  220. package/dist/scripts/8zar0u1i.chunk.js.map +0 -1
  221. package/dist/scripts/9NIa7Pi_.chunk.js +0 -2
  222. package/dist/scripts/9NIa7Pi_.chunk.js.map +0 -1
  223. package/dist/scripts/B5OOLcT3.chunk.js +0 -2
  224. package/dist/scripts/B5OOLcT3.chunk.js.map +0 -1
  225. package/dist/scripts/B8XJmK96.chunk.js +0 -8
  226. package/dist/scripts/B8XJmK96.chunk.js.map +0 -1
  227. package/dist/scripts/BA6k9XoA.chunk.js +0 -2
  228. package/dist/scripts/BA6k9XoA.chunk.js.map +0 -1
  229. package/dist/scripts/BBnDr_iy.chunk.js +0 -2
  230. package/dist/scripts/BBnDr_iy.chunk.js.map +0 -1
  231. package/dist/scripts/BEL0opwe.chunk.js +0 -2
  232. package/dist/scripts/BEL0opwe.chunk.js.map +0 -1
  233. package/dist/scripts/BHmtLW9C.chunk.js +0 -2
  234. package/dist/scripts/BHmtLW9C.chunk.js.map +0 -1
  235. package/dist/scripts/BJ0C6oH6.chunk.js +0 -2
  236. package/dist/scripts/BJ0C6oH6.chunk.js.map +0 -1
  237. package/dist/scripts/BPcJv8Nj.chunk.js +0 -2
  238. package/dist/scripts/BPcJv8Nj.chunk.js.map +0 -1
  239. package/dist/scripts/BQQ9SPei.chunk.js +0 -10
  240. package/dist/scripts/BQQ9SPei.chunk.js.map +0 -1
  241. package/dist/scripts/BQQZ0Zva.chunk.js +0 -2
  242. package/dist/scripts/BQQZ0Zva.chunk.js.map +0 -1
  243. package/dist/scripts/BRKKXF-k.chunk.js +0 -2
  244. package/dist/scripts/BRKKXF-k.chunk.js.map +0 -1
  245. package/dist/scripts/BUhbk0mt.chunk.js +0 -2
  246. package/dist/scripts/BUhbk0mt.chunk.js.map +0 -1
  247. package/dist/scripts/BXKrMYdw.chunk.js +0 -2
  248. package/dist/scripts/BXKrMYdw.chunk.js.map +0 -1
  249. package/dist/scripts/B_eK8A25.chunk.js +0 -2
  250. package/dist/scripts/B_eK8A25.chunk.js.map +0 -1
  251. package/dist/scripts/BbjveACT.chunk.js +0 -2
  252. package/dist/scripts/BbjveACT.chunk.js.map +0 -1
  253. package/dist/scripts/BdHxGaRy.chunk.js +0 -2
  254. package/dist/scripts/BdHxGaRy.chunk.js.map +0 -1
  255. package/dist/scripts/BeHz9c4V.chunk.js +0 -2
  256. package/dist/scripts/BeHz9c4V.chunk.js.map +0 -1
  257. package/dist/scripts/BexFb8rj.chunk.js +0 -2
  258. package/dist/scripts/BexFb8rj.chunk.js.map +0 -1
  259. package/dist/scripts/Bi8YRFeY.chunk.js +0 -2
  260. package/dist/scripts/Bi8YRFeY.chunk.js.map +0 -1
  261. package/dist/scripts/Bj3i6I7i.chunk.js +0 -2
  262. package/dist/scripts/Bj3i6I7i.chunk.js.map +0 -1
  263. package/dist/scripts/BktU87GA.chunk.js +0 -2
  264. package/dist/scripts/BktU87GA.chunk.js.map +0 -1
  265. package/dist/scripts/Bl1HvG0b.chunk.js +0 -2
  266. package/dist/scripts/Bl1HvG0b.chunk.js.map +0 -1
  267. package/dist/scripts/BnWlQ7-4.chunk.js +0 -2
  268. package/dist/scripts/BnWlQ7-4.chunk.js.map +0 -1
  269. package/dist/scripts/BoqzK1u7.chunk.js +0 -2
  270. package/dist/scripts/BoqzK1u7.chunk.js.map +0 -1
  271. package/dist/scripts/Bsa3zcW0.chunk.js +0 -2
  272. package/dist/scripts/Bsa3zcW0.chunk.js.map +0 -1
  273. package/dist/scripts/Bt3kaRtU.chunk.js +0 -6
  274. package/dist/scripts/Bt3kaRtU.chunk.js.map +0 -1
  275. package/dist/scripts/BtiKTu8r.chunk.js +0 -2
  276. package/dist/scripts/BtiKTu8r.chunk.js.map +0 -1
  277. package/dist/scripts/BwOoIPmc.chunk.js +0 -2
  278. package/dist/scripts/BwOoIPmc.chunk.js.map +0 -1
  279. package/dist/scripts/BwuSNwcs.chunk.js +0 -2
  280. package/dist/scripts/BwuSNwcs.chunk.js.map +0 -1
  281. package/dist/scripts/Byn8R7bs.chunk.js +0 -2
  282. package/dist/scripts/Byn8R7bs.chunk.js.map +0 -1
  283. package/dist/scripts/C2Zu5vKc.chunk.js +0 -2
  284. package/dist/scripts/C2Zu5vKc.chunk.js.map +0 -1
  285. package/dist/scripts/C2uxO8e2.chunk.js +0 -2
  286. package/dist/scripts/C2uxO8e2.chunk.js.map +0 -1
  287. package/dist/scripts/C35NlkUr.chunk.js +0 -2
  288. package/dist/scripts/C35NlkUr.chunk.js.map +0 -1
  289. package/dist/scripts/C5QPXJGU.chunk.js +0 -15
  290. package/dist/scripts/C5QPXJGU.chunk.js.map +0 -1
  291. package/dist/scripts/C6mGMCz4.chunk.js +0 -2
  292. package/dist/scripts/C6mGMCz4.chunk.js.map +0 -1
  293. package/dist/scripts/C8ZuWYfb.chunk.js +0 -2
  294. package/dist/scripts/C8ZuWYfb.chunk.js.map +0 -1
  295. package/dist/scripts/CEmtkty-.chunk.js +0 -2
  296. package/dist/scripts/CEmtkty-.chunk.js.map +0 -1
  297. package/dist/scripts/CICkmQW6.chunk.js +0 -2
  298. package/dist/scripts/CICkmQW6.chunk.js.map +0 -1
  299. package/dist/scripts/CLumRL-T.chunk.js +0 -2
  300. package/dist/scripts/CLumRL-T.chunk.js.map +0 -1
  301. package/dist/scripts/CO_D2O4I.chunk.js +0 -2
  302. package/dist/scripts/CO_D2O4I.chunk.js.map +0 -1
  303. package/dist/scripts/CPXlV0fg.chunk.js +0 -2
  304. package/dist/scripts/CPXlV0fg.chunk.js.map +0 -1
  305. package/dist/scripts/CQZOieOF.chunk.js +0 -2
  306. package/dist/scripts/CQZOieOF.chunk.js.map +0 -1
  307. package/dist/scripts/CQoWqq54.chunk.js +0 -2
  308. package/dist/scripts/CQoWqq54.chunk.js.map +0 -1
  309. package/dist/scripts/CRT9qru0.chunk.js +0 -2
  310. package/dist/scripts/CRT9qru0.chunk.js.map +0 -1
  311. package/dist/scripts/CU6iZ8MR.chunk.js +0 -2
  312. package/dist/scripts/CU6iZ8MR.chunk.js.map +0 -1
  313. package/dist/scripts/CUltMbyK.chunk.js +0 -2
  314. package/dist/scripts/CUltMbyK.chunk.js.map +0 -1
  315. package/dist/scripts/CW7x8M-z.chunk.js +0 -2
  316. package/dist/scripts/CW7x8M-z.chunk.js.map +0 -1
  317. package/dist/scripts/CYlwi5iC.chunk.js +0 -7
  318. package/dist/scripts/CYlwi5iC.chunk.js.map +0 -1
  319. package/dist/scripts/CgJckl-g.chunk.js +0 -2
  320. package/dist/scripts/CgJckl-g.chunk.js.map +0 -1
  321. package/dist/scripts/Cj5ETNHP.chunk.js +0 -2
  322. package/dist/scripts/Cj5ETNHP.chunk.js.map +0 -1
  323. package/dist/scripts/Cmu1J2M7.chunk.js +0 -262
  324. package/dist/scripts/Cmu1J2M7.chunk.js.map +0 -1
  325. package/dist/scripts/Cr8fUgj9.chunk.js +0 -2
  326. package/dist/scripts/Cr8fUgj9.chunk.js.map +0 -1
  327. package/dist/scripts/CtM_cXum.chunk.js +0 -2
  328. package/dist/scripts/CtM_cXum.chunk.js.map +0 -1
  329. package/dist/scripts/Cv1FGdNu.chunk.js +0 -2
  330. package/dist/scripts/Cv1FGdNu.chunk.js.map +0 -1
  331. package/dist/scripts/CvPDjx7y.chunk.js +0 -2
  332. package/dist/scripts/CvPDjx7y.chunk.js.map +0 -1
  333. package/dist/scripts/D0bydDVL.chunk.js +0 -2
  334. package/dist/scripts/D0bydDVL.chunk.js.map +0 -1
  335. package/dist/scripts/D1EE4AEz.chunk.js +0 -356
  336. package/dist/scripts/D1EE4AEz.chunk.js.map +0 -1
  337. package/dist/scripts/D84-WY3k.chunk.js +0 -2
  338. package/dist/scripts/D84-WY3k.chunk.js.map +0 -1
  339. package/dist/scripts/DAh7Ea13.chunk.js +0 -2
  340. package/dist/scripts/DAh7Ea13.chunk.js.map +0 -1
  341. package/dist/scripts/DBIkG3Bu.chunk.js +0 -2
  342. package/dist/scripts/DBIkG3Bu.chunk.js.map +0 -1
  343. package/dist/scripts/DCcI7sWt.chunk.js +0 -2
  344. package/dist/scripts/DCcI7sWt.chunk.js.map +0 -1
  345. package/dist/scripts/DEP24A-f.chunk.js +0 -2
  346. package/dist/scripts/DEP24A-f.chunk.js.map +0 -1
  347. package/dist/scripts/DGFORsAE.chunk.js +0 -2
  348. package/dist/scripts/DGFORsAE.chunk.js.map +0 -1
  349. package/dist/scripts/DGaf-Jy9.chunk.js +0 -2
  350. package/dist/scripts/DGaf-Jy9.chunk.js.map +0 -1
  351. package/dist/scripts/DJyZ6Hx7.chunk.js +0 -2
  352. package/dist/scripts/DJyZ6Hx7.chunk.js.map +0 -1
  353. package/dist/scripts/DOCam-GK.chunk.js +0 -2
  354. package/dist/scripts/DOCam-GK.chunk.js.map +0 -1
  355. package/dist/scripts/DSLX3H2r.chunk.js +0 -2
  356. package/dist/scripts/DSLX3H2r.chunk.js.map +0 -1
  357. package/dist/scripts/DSq4f4jm.chunk.js +0 -2
  358. package/dist/scripts/DSq4f4jm.chunk.js.map +0 -1
  359. package/dist/scripts/DXxBqeLg.chunk.js +0 -2
  360. package/dist/scripts/DXxBqeLg.chunk.js.map +0 -1
  361. package/dist/scripts/DZ6Jrm23.chunk.js +0 -2
  362. package/dist/scripts/DZ6Jrm23.chunk.js.map +0 -1
  363. package/dist/scripts/Daes5Wgy.chunk.js +0 -2
  364. package/dist/scripts/Daes5Wgy.chunk.js.map +0 -1
  365. package/dist/scripts/DeUbJqVo.chunk.js +0 -2
  366. package/dist/scripts/DeUbJqVo.chunk.js.map +0 -1
  367. package/dist/scripts/DgEqkZy0.chunk.js +0 -8
  368. package/dist/scripts/DgEqkZy0.chunk.js.map +0 -1
  369. package/dist/scripts/DhB-Uugx.chunk.js +0 -2
  370. package/dist/scripts/DhB-Uugx.chunk.js.map +0 -1
  371. package/dist/scripts/DhqAA1wT.chunk.js +0 -2
  372. package/dist/scripts/DhqAA1wT.chunk.js.map +0 -1
  373. package/dist/scripts/Di5-l4QJ.chunk.js +0 -2
  374. package/dist/scripts/Di5-l4QJ.chunk.js.map +0 -1
  375. package/dist/scripts/DiQkAtUx.chunk.js +0 -53
  376. package/dist/scripts/DiQkAtUx.chunk.js.map +0 -1
  377. package/dist/scripts/DireiQEp.chunk.js +0 -2
  378. package/dist/scripts/DireiQEp.chunk.js.map +0 -1
  379. package/dist/scripts/Dj66TI5y.chunk.js +0 -2
  380. package/dist/scripts/Dj66TI5y.chunk.js.map +0 -1
  381. package/dist/scripts/DkFkYS-j.chunk.js +0 -2
  382. package/dist/scripts/DkFkYS-j.chunk.js.map +0 -1
  383. package/dist/scripts/Dkq5GtOV.chunk.js +0 -2
  384. package/dist/scripts/Dkq5GtOV.chunk.js.map +0 -1
  385. package/dist/scripts/DmSSmUHZ.chunk.js +0 -2
  386. package/dist/scripts/DmSSmUHZ.chunk.js.map +0 -1
  387. package/dist/scripts/DoQU9vjn.chunk.js +0 -2
  388. package/dist/scripts/DoQU9vjn.chunk.js.map +0 -1
  389. package/dist/scripts/DtHh_hpg.chunk.js +0 -2
  390. package/dist/scripts/DtHh_hpg.chunk.js.map +0 -1
  391. package/dist/scripts/DvDdiDQN.chunk.js +0 -7
  392. package/dist/scripts/DvDdiDQN.chunk.js.map +0 -1
  393. package/dist/scripts/DwhG2uva.chunk.js +0 -2
  394. package/dist/scripts/DwhG2uva.chunk.js.map +0 -1
  395. package/dist/scripts/DxJlWHZr.chunk.js +0 -2
  396. package/dist/scripts/DxJlWHZr.chunk.js.map +0 -1
  397. package/dist/scripts/DxmeZ4C9.chunk.js +0 -2
  398. package/dist/scripts/DxmeZ4C9.chunk.js.map +0 -1
  399. package/dist/scripts/KuveJuNy.chunk.js +0 -2
  400. package/dist/scripts/KuveJuNy.chunk.js.map +0 -1
  401. package/dist/scripts/LKCLmV2A.chunk.js +0 -2
  402. package/dist/scripts/LKCLmV2A.chunk.js.map +0 -1
  403. package/dist/scripts/RnuR8yr3.chunk.js +0 -2
  404. package/dist/scripts/RnuR8yr3.chunk.js.map +0 -1
  405. package/dist/scripts/XxrnElSv.chunk.js +0 -2
  406. package/dist/scripts/XxrnElSv.chunk.js.map +0 -1
  407. package/dist/scripts/YF_QoXEj.chunk.js +0 -3
  408. package/dist/scripts/YF_QoXEj.chunk.js.map +0 -1
  409. package/dist/scripts/Z2sDSVPb.chunk.js +0 -2
  410. package/dist/scripts/Z2sDSVPb.chunk.js.map +0 -1
  411. package/dist/scripts/Zbze2j9b.chunk.js +0 -2
  412. package/dist/scripts/Zbze2j9b.chunk.js.map +0 -1
  413. package/dist/scripts/app-C56EnOMP.js +0 -216
  414. package/dist/scripts/app-C56EnOMP.js.map +0 -1
  415. package/dist/scripts/cvX-F_mx.chunk.js +0 -2
  416. package/dist/scripts/cvX-F_mx.chunk.js.map +0 -1
  417. package/dist/scripts/h34ZSRKe.chunk.js +0 -2
  418. package/dist/scripts/h34ZSRKe.chunk.js.map +0 -1
  419. package/dist/scripts/leubTuJo.chunk.js +0 -2
  420. package/dist/scripts/leubTuJo.chunk.js.map +0 -1
  421. package/dist/scripts/m5XtnRaH.chunk.js +0 -2
  422. package/dist/scripts/m5XtnRaH.chunk.js.map +0 -1
  423. package/dist/scripts/nay4aGaa.chunk.js +0 -2
  424. package/dist/scripts/nay4aGaa.chunk.js.map +0 -1
  425. package/dist/scripts/p61U8kXz.chunk.js +0 -2
  426. package/dist/scripts/p61U8kXz.chunk.js.map +0 -1
  427. package/dist/scripts/pkzD5BEm.chunk.js +0 -2
  428. package/dist/scripts/pkzD5BEm.chunk.js.map +0 -1
  429. package/dist/scripts/sc9-PV9Y.chunk.js +0 -2
  430. package/dist/scripts/sc9-PV9Y.chunk.js.map +0 -1
  431. package/dist/scripts/tAsRziXo.chunk.js +0 -8
  432. package/dist/scripts/tAsRziXo.chunk.js.map +0 -1
  433. package/dist/scripts/xrHhD6CF.chunk.js +0 -8
  434. package/dist/scripts/xrHhD6CF.chunk.js.map +0 -1
  435. package/dist/scripts/xxo027lm.chunk.js +0 -2
  436. package/dist/scripts/xxo027lm.chunk.js.map +0 -1
  437. package/vite.config.ts +0 -6
@@ -1,2 +0,0 @@
1
- import{j as a,b7 as b,T as $,at as L,ao as V,z as U,bx as O,F as j,i as T,d as R,c as G,D as M,b6 as z,h as A,k as F,bN as B,ba as E,M as q,R as Y}from"./app-C56EnOMP.js";import{R as P}from"./BoqzK1u7.chunk.js";import{k as Z,e as J,T as K,f as Q,l as W,g as X}from"./DiQkAtUx.chunk.js";import{b as C,A as x,a as I,V as p,B as ee}from"./4oi1ldJ4.chunk.js";import{B as D}from"./DkFkYS-j.chunk.js";import{I as H,a as k}from"./DJyZ6Hx7.chunk.js";import{g as ae}from"./BBnDr_iy.chunk.js";import{B as u,a as v}from"./B_eK8A25.chunk.js";import{V as w}from"./DxJlWHZr.chunk.js";const te="_playlistItem_euqll_1",ie="_playlistItemGradient_euqll_4",ne="_playlistMetadata_euqll_13",se="_partialHeading_euqll_20",le="_ownerAvatarContainer_euqll_24",c={playlistItem:te,playlistItemGradient:ie,playlistMetadata:ne,partialHeading:se,ownerAvatarContainer:le};re.defaultProps={numItems:8};function re(e){const t=[...Array(e.numItems)],n=e.itemClassName||"";return a.jsxs(a.Fragment,{children:[e.showHeading&&a.jsx("div",{className:`${c.partialHeading} mb-1 partial-loading-background`}),a.jsx(P,{className:"mx-n1 mb-n2",children:t.map((s,i)=>a.jsx(b,{xs:6,sm:4,lg:3,className:`${n} px-1 pb-2`,children:a.jsx("div",{className:`${c.playlistItem} partial-loading-background rounded-3`})},i))})]})}var oe=["second","minute","hour","day","week","month","year"];function ce(e,t){if(t===0)return["just now","right now"];var n=oe[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]}var de=["秒","分钟","小时","天","周","个月","年"];function me(e,t){if(t===0)return["刚刚","片刻后"];var n=de[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}var _={},S=function(e,t){_[e]=t},ue=function(e){return _[e]||_.en_US},f=[60,60,24,7,365/7/12,12];function ve(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function ge(e,t){var n=e<0?1:0;e=Math.abs(e);for(var s=e,i=0;e>=f[i]&&i<f.length;i++)e/=f[i];return e=Math.floor(e),i*=2,e>(i===0?9:1)&&(i+=1),t(e,i,s)[n].replace("%s",e.toString())}function ye(e,t){var n=new Date;return(+n-+ve(e))/1e3}var he=function(e,t,n){var s=ye(e);return ge(s,ue(t))};S("en_US",ce);S("zh_CN",me);const xe="playlists.playlistCount";function fe(e){var i,l,o;if(!e)return!1;const t=((i=e.videos)==null?void 0:i.count)??0,n=((l=e.interactives)==null?void 0:l.count)??0,s=((o=e.clips)==null?void 0:o.count)??0;return t+n+s}function be(e){const t=fe(e.playlist);return t===!1||Number.isNaN(t)?a.jsx(a.Fragment,{}):a.jsx("span",{className:"text-shadow font-size-sm",children:a.jsx($,{namespace:xe,phrase:"count",options:{smartCount:t}})})}const _e="_avatar_obb0e_1",je={avatar:_e};function Ce(){return a.jsx("div",{className:je.avatar,children:a.jsx(Z,{})})}function Ne(e){var i,l,o;const{_liteOwner:t}=e.playlist;if((i=e.playlist._isClickViewCurated)!=null&&i.value)return a.jsx(Ce,{});if(!(t!=null&&t.id)||!((l=e.currentUser)!=null&&l.id))return a.jsx(a.Fragment,{});if(t.id.toString()===e.currentUser.id.toString())return a.jsx(a.Fragment,{});const s=typeof t.avatar=="string"?t.avatar:(o=t.avatar)==null?void 0:o.url;return a.jsx(L,{imageUrl:s,imageCdnUrl:e.imageCdnUrl,initials:V.getInitials(t.name,t.surname)})}const we="playlists.playlistList";Te.defaultProps={itemStyle:"square"};function Te(e){var d,m;const t=U.createUrl(e.data.cover&&e.data.cover.url,{size:j.Medium,resizeType:O.Cover}),n=e.data.subjectPresentationAudiences&&e.data.subjectPresentationAudiences.data,s=C(n,e.presentationAudiences);let i=c.playlistItem;const l=!!t||!!e.showFallbackImage;l&&(i+=` ${c.playlistItemGradient}`),!l&&e.bgColourClassNames&&(i+=` ${c.playlistItem} ${ae(e.data.name,e.bgColourClassNames)}`),e.itemStyle==="round"&&(i+=" rounded-3 overflow-hidden"),e.itemStyle==="round-left"&&(i+=" rounded-start-lg overflow-hidden");const o={...e.analyticsData,id:(d=e.data)==null?void 0:d.id,name:(m=e.data)==null?void 0:m.name},g={...e.analyticsOptions,entity:T.Playlist},y=()=>{var N;return!e.data.contentModifiedDate||(N=e.data._isClickViewCurated)!=null&&N.value?"":G.getPhrase(we,"lastUpdated",{timeago:he(M.convertUTCToLocal(e.data.contentModifiedDate))})};return a.jsx(R,{appLink:e.appLink,analyticsData:o,analyticsOptions:g,title:y(),children:a.jsxs(D,{data:t,alt:e.data.name,className:i,children:[!!e.showFallbackImage&&a.jsx(H,{type:k.Playlist}),a.jsxs("div",{className:`text-white ${c.playlistMetadata}`,children:[!!e.showCount&&a.jsx(be,{playlist:e.data}),a.jsx("h5",{className:`mb-0 ${e.titleClassName||""}`,children:a.jsx("span",{className:"text-shadow clamp-2",children:e.data.name})}),!!n&&!!n.length&&!!s&&a.jsx(x,{className:`${e.audienceLabelClass?e.audienceLabelClass:""} mt-1`,audience:s,border:"white"})]}),!!e.showOwner&&!!e.imageCdnUrl&&a.jsx("div",{className:c.ownerAvatarContainer,children:a.jsx(Ne,{playlist:e.data,currentUser:e.currentUser,imageCdnUrl:e.imageCdnUrl})})]})})}F.Click,T.Playlist,A.PlaylistListItem,z.Cover;const Ae="_labelContainer_1rf8p_1",Pe="_labelContainerOverlay_1rf8p_15",Ie="_hoverActive_1rf8p_23",De="_mask_1rf8p_37",He="_largeHoverTitle_1rf8p_50",ke="_smallHoverTitle_1rf8p_69",Se="_largeHoverDescription_1rf8p_99",$e="_hasTableOfContents_1rf8p_141",Le="_smallHoverDescription_1rf8p_194",r={labelContainer:Ae,labelContainerOverlay:Pe,hoverActive:Ie,mask:De,largeHoverTitle:He,smallHoverTitle:ke,largeHoverDescription:Se,hasTableOfContents:$e,smallHoverDescription:Le};function Ve(e){return a.jsxs("div",{className:`py-3 mx-2 px-2 rounded bg-white text-center ${r.mask} d-flex flex-column align-items-center`,children:[a.jsx("h3",{className:`fw-semibold mb-0 ${r.hoverTitle} ${e.isSmall?r.smallHoverTitle:r.largeHoverTitle}`,children:a.jsx("span",{className:"clamp-3",children:e.series.name})}),!!e.series.description&&a.jsx("p",{className:`${e.hasTableOfContents?r.hasTableOfContents:""} ${r.hoverDescription} ${e.isSmall?r.smallHoverDescription:r.largeHoverDescription} mb-0`,children:e.series.description}),a.jsx("div",{className:`${r.labelContainerOverlay}`,children:e.mergedAudience?a.jsx(x,{audience:e.mergedAudience,border:"dark",className:"mt-2 w-fit"}):a.jsx(u,{type:v.Rating,data:I.getRating(e.series),className:"mt-2"})})]})}function Qe(e){const[t,n]=B({className:r.hoverActive}),s=e.series&&e.series.subjectPresentationAudiences&&e.series.subjectPresentationAudiences.data||[],i=C(s,e.presentationAudiences),l=!!(s&&s.length&&i);return a.jsx("div",{ref:t,children:a.jsxs(D,{data:e.series.tallPoster,alt:e.series.name,imageType:E.TallPosters,preload:e.preloadImage,imageOptions:{size:j.Large},imageClassName:e.imageClass?e.imageClass:"rounded-3",children:[n&&a.jsx(Ve,{isSmall:e.isSmall,series:e.series,mergedAudience:s&&s.length?i:null,hasTableOfContents:e.hasTableOfContents}),a.jsx(H,{type:k.Series}),a.jsx("div",{className:`position-absolute text-white text-shadow ${r.labelContainer}`,children:l?a.jsx(x,{audience:i,border:"white"}):a.jsx(u,{type:v.Rating,data:I.getRating(e.series)})})]})})}const Ue="_guidance_pydn0_30",Oe="_responsiveGuidance_pydn0_41",Re="_description_pydn0_56",Ge="_details_pydn0_82",h={guidance:Ue,responsiveGuidance:Oe,description:Re,details:Ge};Me.defaultProps={newDurationStyle:!0,badgePosition:"thumbnail"};function Me(e){var l,o,g,y,d,m;const t=(o=(l=e.video)==null?void 0:l.subjectPresentationAudiences)==null?void 0:o.data,n=C(t,e.presentationAudiences),s=q.mergeOptions(e.analyticsOptions,{location:A.ClassificationHero,entity:w.getAnalyticsEntity(e.video)}),i=Y.useRef(null);return e.video?a.jsxs(P,{children:[a.jsx(b,{xs:12,md:6,children:a.jsx("div",{ref:i,children:a.jsx(J,{analyticsOptions:s,video:e.video,appLink:(g=e.getVideoAppLink)==null?void 0:g.call(e,e.video,{}),imageOptions:{size:j.Medium},textPosition:K.Independent,type:"static",audience:e.badgePosition==="thumbnail"?n:null,hideRating:e.badgePosition==="thumbnail"?!!n:!0,commonVideoProps:e.commonVideoProps})})}),a.jsxs(b,{xs:12,md:6,className:`${h.details} position-relative`,children:[a.jsxs("div",{className:"d-flex justify-content-between",children:[a.jsxs("div",{className:"overflow-hidden",children:[a.jsx(p,{type:e.commonVideoProps.subTextType,appLink:(d=(y=e.commonVideoProps).getSubTextAppLink)==null?void 0:d.call(y,e.video),analyticsData:e.analyticsData,analyticsOptions:s,video:e.video,className:"text-reset clamp-1"}),a.jsx(Q,{yearGroups:e.commonVideoProps.yearGroups,video:e.video,analyticsData:e.analyticsData,analyticsOptions:s,appLink:(m=e.getVideoAppLink)==null?void 0:m.call(e,e.video,{}),titleSize:"h4",showNewVideoIndicator:e.showNewVideoIndicator,showPadlock:!e.commonVideoProps.hasStudentExperience&&!e.commonVideoProps.hasGuestExperience,titleClassName:e.titleClassName,clampLevel:2})]}),a.jsx(W,{analyticsData:e.analyticsData,analyticsOptions:s,video:e.video})]}),e.badgePosition==="info-panel"&&a.jsxs(ee,{className:"pb-1",children:[!e.hideInteractiveBadge&&a.jsx(u,{type:v.Interactive,data:e.video.interactives}),a.jsx(u,{type:v.Rating,data:w.getRating(e.video)}),a.jsx(u,{type:v.ProductionYear,data:e.video.productionYear})]}),a.jsx("p",{className:"mb-1",children:a.jsx("span",{className:h.description,children:e.video.description})}),e.badgePosition==="info-panel"&&a.jsx(x,{audience:n,className:"mt-1",border:"dark"}),e.showVideoGuidance&&a.jsx(X,{video:e.video,analyticsData:e.analyticsData,analyticsOptions:s,containerClassName:`d-flex ${h.guidance}`,responsiveClassName:h.responsiveGuidance,commonVideoProps:e.commonVideoProps})]})]}):a.jsx(a.Fragment,{})}export{Me as H,Te as P,Qe as S,re as a};
2
- //# sourceMappingURL=BA6k9XoA.chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BA6k9XoA.chunk.js","sources":["../../../../libs/shared/src/apps/playlists/components/playlist-list/PartialPlaylistList.tsx","../../../../../node_modules/timeago.js/esm/lang/en_US.js","../../../../../node_modules/timeago.js/esm/lang/zh_CN.js","../../../../../node_modules/timeago.js/esm/register.js","../../../../../node_modules/timeago.js/esm/utils/date.js","../../../../../node_modules/timeago.js/esm/format.js","../../../../../node_modules/timeago.js/esm/index.js","../../../../libs/shared/src/apps/playlists/components/playlist-count/PlaylistCount.tsx","../../../../libs/shared/src/components/clickview-avatar/ClickViewAvatar.tsx","../../../../libs/shared/src/apps/playlists/components/playlist-list/PlaylistOwnerAvatar.tsx","../../../../libs/shared/src/apps/playlists/components/playlist-list/PlaylistItem.tsx","../../../../libs/shared/src/apps/playlists/components/playlist-list/PlaylistList.tsx","../../../../libs/shared/src/components/series-tall-poster/SeriesTallPoster.tsx","../../../../libs/shared/src/apps/subjects/components/hero-video/HeroVideo.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport styles from './playlist.module.scss';\n\ninterface PartialPlaylistListProps {\n numItems?: number;\n itemClassName?: string;\n showHeading?: boolean;\n}\n\nPartialPlaylistList.defaultProps = {\n numItems: 8\n};\n\nexport function PartialPlaylistList(props: PartialPlaylistListProps): JSX.Element {\n const PARTIAL_PLAYLISTS = [...Array(props.numItems)];\n\n const className = props.itemClassName || '';\n\n return (\n <>\n {props.showHeading && <div className={`${styles.partialHeading} mb-1 partial-loading-background`} />}\n <Row className='mx-n1 mb-n2'>\n {PARTIAL_PLAYLISTS.map((p, idx) => (\n <Col key={idx} xs={6} sm={4} lg={3} className={`${className} px-1 pb-2`}>\n <div className={`${styles.playlistItem} partial-loading-background rounded-3`} />\n </Col>\n ))}\n </Row>\n </>\n );\n}","var EN_US = ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'];\nexport default function (diff, idx) {\n if (idx === 0)\n return ['just now', 'right now'];\n var unit = EN_US[Math.floor(idx / 2)];\n if (diff > 1)\n unit += 's';\n return [diff + \" \" + unit + \" ago\", \"in \" + diff + \" \" + unit];\n}\n//# sourceMappingURL=en_US.js.map","var ZH_CN = ['秒', '分钟', '小时', '天', '周', '个月', '年'];\nexport default function (diff, idx) {\n if (idx === 0)\n return ['刚刚', '片刻后'];\n var unit = ZH_CN[~~(idx / 2)];\n return [diff + \" \" + unit + \"\\u524D\", diff + \" \" + unit + \"\\u540E\"];\n}\n//# sourceMappingURL=zh_CN.js.map","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\n/**\n * All supported locales\n */\nvar Locales = {};\n/**\n * register a locale\n * @param locale\n * @param func\n */\nexport var register = function (locale, func) {\n Locales[locale] = func;\n};\n/**\n * get a locale, default is en_US\n * @param locale\n * @returns {*}\n */\nexport var getLocale = function (locale) {\n return Locales[locale] || Locales['en_US'];\n};\n//# sourceMappingURL=register.js.map","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\nvar SEC_ARRAY = [\n 60,\n 60,\n 24,\n 7,\n 365 / 7 / 12,\n 12,\n];\n/**\n * format Date / string / timestamp to timestamp\n * @param input\n * @returns {*}\n */\nexport function toDate(input) {\n if (input instanceof Date)\n return input;\n // @ts-ignore\n if (!isNaN(input) || /^\\d+$/.test(input))\n return new Date(parseInt(input));\n input = (input || '')\n // @ts-ignore\n .trim()\n .replace(/\\.\\d+/, '') // remove milliseconds\n .replace(/-/, '/')\n .replace(/-/, '/')\n .replace(/(\\d)T(\\d)/, '$1 $2')\n .replace(/Z/, ' UTC') // 2017-2-5T3:57:52Z -> 2017-2-5 3:57:52UTC\n .replace(/([+-]\\d\\d):?(\\d\\d)/, ' $1$2'); // -04:00 -> -0400\n return new Date(input);\n}\n/**\n * format the diff second to *** time ago, with setting locale\n * @param diff\n * @param localeFunc\n * @returns\n */\nexport function formatDiff(diff, localeFunc) {\n /**\n * if locale is not exist, use defaultLocale.\n * if defaultLocale is not exist, use build-in `en`.\n * be sure of no error when locale is not exist.\n *\n * If `time in`, then 1\n * If `time ago`, then 0\n */\n var agoIn = diff < 0 ? 1 : 0;\n /**\n * Get absolute value of number (|diff| is non-negative) value of x\n * |diff| = diff if diff is positive\n * |diff| = -diff if diff is negative\n * |0| = 0\n */\n diff = Math.abs(diff);\n /**\n * Time in seconds\n */\n var totalSec = diff;\n /**\n * Unit of time\n */\n var idx = 0;\n for (; diff >= SEC_ARRAY[idx] && idx < SEC_ARRAY.length; idx++) {\n diff /= SEC_ARRAY[idx];\n }\n /**\n * Math.floor() is alternative of ~~\n *\n * The differences and bugs:\n * Math.floor(3.7) -> 4 but ~~3.7 -> 3\n * Math.floor(1559125440000.6) -> 1559125440000 but ~~1559125440000.6 -> 52311552\n *\n * More information about the performance of algebraic:\n * https://www.youtube.com/watch?v=65-RbBwZQdU\n */\n diff = Math.floor(diff);\n idx *= 2;\n if (diff > (idx === 0 ? 9 : 1))\n idx += 1;\n return localeFunc(diff, idx, totalSec)[agoIn].replace('%s', diff.toString());\n}\n/**\n * calculate the diff second between date to be formatted an now date.\n * @param date\n * @param relativeDate\n * @returns {number}\n */\nexport function diffSec(date, relativeDate) {\n var relDate = relativeDate ? toDate(relativeDate) : new Date();\n return (+relDate - +toDate(date)) / 1000;\n}\n/**\n * nextInterval: calculate the next interval time.\n * - diff: the diff sec between now and date to be formatted.\n *\n * What's the meaning?\n * diff = 61 then return 59\n * diff = 3601 (an hour + 1 second), then return 3599\n * make the interval with high performance.\n **/\nexport function nextInterval(diff) {\n var rst = 1, i = 0, d = Math.abs(diff);\n for (; diff >= SEC_ARRAY[i] && i < SEC_ARRAY.length; i++) {\n diff /= SEC_ARRAY[i];\n rst *= SEC_ARRAY[i];\n }\n d = d % rst;\n d = d ? rst - d : rst;\n return Math.ceil(d);\n}\n//# sourceMappingURL=date.js.map","import { formatDiff, diffSec } from './utils/date';\nimport { getLocale } from './register';\n/**\n * format a TDate into string\n * @param date\n * @param locale\n * @param opts\n */\nexport var format = function (date, locale, opts) {\n // diff seconds\n var sec = diffSec(date, opts && opts.relativeDate);\n // format it with locale\n return formatDiff(sec, getLocale(locale));\n};\n//# sourceMappingURL=format.js.map","/**\n * Created by hustcc on 18/5/20.\n * Contract: i@hust.cc\n */\nimport en_US from './lang/en_US';\nimport zh_CN from './lang/zh_CN';\nimport { register } from './register';\nregister('en_US', en_US);\nregister('zh_CN', zh_CN);\nexport { format } from './format';\nexport { render, cancel } from './realtime';\nexport { register };\n//# sourceMappingURL=index.js.map","import React from 'react';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { Playlist } from 'libs/shared/interfaces';\n\nconst namespace = 'playlists.playlistCount';\n\nfunction getCount(playlist: Playlist): number | false {\n if (!playlist)\n return false;\n\n const videos = playlist.videos?.count ?? 0;\n const interactives = playlist.interactives?.count ?? 0;\n const clips = playlist.clips?.count ?? 0;\n\n return videos + interactives + clips;\n}\n\ninterface PlaylistCountProps {\n playlist: Playlist;\n}\n\nexport function PlaylistCount(props: PlaylistCountProps): JSX.Element {\n const count = getCount(props.playlist);\n\n if (count === false || Number.isNaN(count))\n return <></>;\n\n return (\n <span className='text-shadow font-size-sm'>\n <Text namespace={namespace} phrase='count' options={{ smartCount: count }} />\n </span>\n );\n}","import * as React from 'react';\n\nimport { ClickViewPlayLogo } from 'libs/shared/components/svgs/clickview-logo/ClickViewLogo';\n\nimport styles from './clickview-avatar.module.scss';\n\nexport function ClickViewAvatar(): JSX.Element {\n return (\n <div className={styles.avatar}>\n <ClickViewPlayLogo />\n </div>\n );\n}\n","import * as React from 'react';\n\nimport { Avatar } from 'libs/shared/components/avatar/Avatar';\nimport { ClickViewAvatar } from 'libs/shared/components/clickview-avatar/ClickViewAvatar';\nimport { CurrentUser, Playlist } from 'libs/shared/interfaces';\nimport { UserHelper } from 'libs/shared/utils/UserHelper';\n\ninterface PlaylistOwnerAvatarProps {\n playlist: Playlist;\n imageCdnUrl: string;\n currentUser?: CurrentUser;\n}\n\nexport function PlaylistOwnerAvatar(props: PlaylistOwnerAvatarProps): JSX.Element {\n const { _liteOwner } = props.playlist;\n\n if (props.playlist._isClickViewCurated?.value)\n return (\n <ClickViewAvatar />\n );\n\n if (!_liteOwner?.id || !props.currentUser?.id)\n return <></>;\n\n const currentUserIsOwner = _liteOwner.id.toString() === props.currentUser.id.toString();\n\n if (currentUserIsOwner)\n return <></>;\n\n const url = typeof _liteOwner.avatar === 'string' ? _liteOwner.avatar : _liteOwner.avatar?.url;\n\n return (\n <Avatar\n imageUrl={url}\n imageCdnUrl={props.imageCdnUrl}\n initials={UserHelper.getInitials(_liteOwner.name, _liteOwner.surname)}\n />\n );\n}","import * as React from 'react';\nimport { format } from 'timeago.js';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { AnalyticsOptions, EntityType, HashObject } from 'libs/analytics/interfaces';\n\nimport { PlaylistCount } from 'libs/shared/apps/playlists/components/playlist-count/PlaylistCount';\nimport { PlaylistOwnerAvatar } from 'libs/shared/apps/playlists/components/playlist-list/PlaylistOwnerAvatar';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { AudienceLabel } from 'libs/shared/components/audience-label/AudienceLabel';\nimport { BaseImage } from 'libs/shared/components/image/BaseImage';\nimport { ImageFallback, ImageFallbackType } from 'libs/shared/components/image/ImageFallback';\nimport { ImageSize, ResizeType } from 'libs/shared/enums/Images';\nimport { useMergeAudiences } from 'libs/shared/hooks/UseMergeAudiences';\nimport { CurrentUser, Playlist, PresentationAudience } from 'libs/shared/interfaces';\nimport { getBgColorClass } from 'libs/shared/utils/getBgColorClass';\nimport { ImageHelper } from 'libs/shared/utils/ImageHelper';\n\nimport styles from './playlist.module.scss';\n\nconst namespace = 'playlists.playlistList';\n\nexport type PlaylistItemStyle = 'square' | 'round' | 'round-left';\n\nexport interface PlaylistItemProps {\n data: Playlist;\n appLink: Core.AppLink;\n currentUser?: CurrentUser;\n presentationAudiences?: PresentationAudience[];\n bgColourClassNames?: string[];\n titleClassName?: string;\n imageCdnUrl?: string;\n itemStyle?: PlaylistItemStyle;\n showCount?: boolean;\n showOwner?: boolean;\n showFallbackImage?: boolean;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n audienceLabelClass?: string;\n}\n\nPlaylistItem.defaultProps = {\n itemStyle: 'square'\n};\n\nexport function PlaylistItem(props: PlaylistItemProps): JSX.Element {\n const imageUrl = ImageHelper.createUrl(props.data.cover && props.data.cover.url, {\n size: ImageSize.Medium,\n resizeType: ResizeType.Cover\n });\n\n const audiences = props.data.subjectPresentationAudiences &&\n props.data.subjectPresentationAudiences.data;\n\n const mergedAudience = useMergeAudiences(audiences, props.presentationAudiences);\n\n let className = styles.playlistItem;\n\n const showImage = !!imageUrl || !!props.showFallbackImage;\n\n if (showImage)\n className += ` ${styles.playlistItemGradient}`;\n\n if (!showImage && props.bgColourClassNames)\n className += ` ${styles.playlistItem} ${getBgColorClass(props.data.name, props.bgColourClassNames)}`;\n\n if (props.itemStyle === 'round')\n className += ` rounded-3 overflow-hidden`;\n\n if (props.itemStyle === 'round-left')\n className += ` rounded-start-lg overflow-hidden`;\n\n const analyticsData = { ...props.analyticsData,\n id: props.data?.id,\n name: props.data?.name\n };\n\n const analyticsOptions = {\n ...props.analyticsOptions,\n entity: EntityType.Playlist\n };\n\n const getTitle = () => {\n if (!props.data.contentModifiedDate || props.data._isClickViewCurated?.value)\n return '';\n\n return LanguageService.getPhrase(namespace, 'lastUpdated', {\n timeago: format(DateHelper.convertUTCToLocal(props.data.contentModifiedDate))\n });\n };\n\n return (\n <AppLink\n appLink={props.appLink}\n analyticsData={analyticsData}\n analyticsOptions={analyticsOptions}\n title={getTitle()}\n >\n <BaseImage data={imageUrl} alt={props.data.name} className={className}>\n {!!props.showFallbackImage && <ImageFallback type={ImageFallbackType.Playlist} />}\n <div className={`text-white ${styles.playlistMetadata}`}>\n {!!props.showCount && (\n <PlaylistCount playlist={props.data} />\n )}\n <h5 className={`mb-0 ${props.titleClassName || ''}`}><span className='text-shadow clamp-2'>{props.data.name}</span></h5>\n {!!audiences && !!audiences.length && !!mergedAudience &&\n <AudienceLabel\n className={`${props.audienceLabelClass ? props.audienceLabelClass : ''} mt-1`}\n audience={mergedAudience}\n border='white'\n />\n }\n </div>\n {!!props.showOwner && !!props.imageCdnUrl &&\n <div className={styles.ownerAvatarContainer}>\n <PlaylistOwnerAvatar\n playlist={props.data}\n currentUser={props.currentUser}\n imageCdnUrl={props.imageCdnUrl}\n />\n </div>\n }\n </BaseImage>\n </AppLink>\n );\n}","import * as React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/core';\n\nimport { AnalyticsOptions, ClickDescriptor, EntityType, HashObject, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { CurrentUser, Playlist, PresentationAudience } from 'libs/shared/interfaces';\n\nimport { PlaylistItem, PlaylistItemStyle } from './PlaylistItem';\n\ninterface PlaylistListProps {\n playlists: Playlist[];\n getPlaylistAppLink: (playlist: Playlist) => Core.AppLink;\n currentUser?: CurrentUser;\n presentationAudiences?: PresentationAudience[];\n itemContainerClassName?: string;\n itemTitleClassName?: string;\n bgColourClassNames?: string[];\n itemStyle?: PlaylistItemStyle;\n imageCdnUrl?: string;\n showCount?: boolean;\n showOwner?: boolean;\n showFallbackImage?: boolean;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n extraPlaylistItem?: JSX.Element;\n}\n\nconst analyticsOptions: AnalyticsOptions = {\n actionType: UserAction.Click,\n entity: EntityType.Playlist,\n location: LocationContext.PlaylistListItem,\n descriptor: ClickDescriptor.Cover\n};\n\nexport function PlaylistList(props: PlaylistListProps): JSX.Element {\n return (\n <Row as='ul' className='list-unstyled mx-n1'>\n {props.extraPlaylistItem && (\n <Col as='li' key='extra-playlist-item' xs={6} sm={4} lg={3} className={`mb-2 px-1 ${props.itemContainerClassName ? props.itemContainerClassName : ''}`}>\n {props.extraPlaylistItem}\n </Col>\n )}\n\n {props.playlists.map(p => (\n <Col as='li' key={p.id} xs={6} sm={4} lg={3} className={`mb-2 px-1 ${props.itemContainerClassName ? props.itemContainerClassName : ''}`}>\n <PlaylistItem\n data={p}\n appLink={props.getPlaylistAppLink(p)}\n imageCdnUrl={props.imageCdnUrl}\n currentUser={props.currentUser}\n presentationAudiences={props.presentationAudiences}\n bgColourClassNames={props.bgColourClassNames}\n showCount={props.showCount}\n showOwner={props.showOwner}\n showFallbackImage={props.showFallbackImage}\n titleClassName={props.itemTitleClassName}\n itemStyle={props.itemStyle}\n analyticsData={props.analyticsData}\n analyticsOptions={{ ...props.analyticsOptions, ...analyticsOptions }}\n />\n </Col>\n ))}\n </Row>\n );\n}","import React from 'react';\n\nimport { AudienceLabel } from 'libs/shared/components/audience-label/AudienceLabel';\nimport { Badge, BadgeType } from 'libs/shared/components/badges/Badge';\nimport { BaseImage } from 'libs/shared/components/image/BaseImage';\nimport { ImageFallback, ImageFallbackType } from 'libs/shared/components/image/ImageFallback';\nimport { ImageSize, ImageType } from 'libs/shared/enums/Images';\nimport { useHoverIntent } from 'libs/shared/hooks/UseHover';\nimport { useMergeAudiences } from 'libs/shared/hooks/UseMergeAudiences';\nimport { PresentationAudience, Series } from 'libs/shared/interfaces';\nimport { SeriesHelper } from 'libs/shared/utils/SeriesHelper';\n\nimport styles from './series-tall-poster.module.scss';\n\ninterface SeriesTallPosterHoverOverlay {\n series: Series;\n mergedAudience: PresentationAudience;\n isSmall?: boolean;\n hasTableOfContents?: boolean;\n}\n\nfunction SeriesTallPosterHoverOverlay(props: SeriesTallPosterHoverOverlay): JSX.Element {\n return (\n <div className={`py-3 mx-2 px-2 rounded bg-white text-center ${styles.mask} d-flex flex-column align-items-center`}>\n <h3 className={`fw-semibold mb-0 ${styles.hoverTitle} ${props.isSmall ? styles.smallHoverTitle : styles.largeHoverTitle}`}>\n <span className='clamp-3'>\n {props.series.name}\n </span>\n </h3>\n\n {!!props.series.description && (\n <p className={`${props.hasTableOfContents ? styles.hasTableOfContents : ''} ${styles.hoverDescription} ${props.isSmall ? styles.smallHoverDescription : styles.largeHoverDescription} mb-0`}>{props.series.description}</p>\n )}\n <div className={`${styles.labelContainerOverlay}`}>\n {props.mergedAudience\n ? <AudienceLabel audience={props.mergedAudience} border='dark' className='mt-2 w-fit'/>\n : <Badge type={BadgeType.Rating} data={SeriesHelper.getRating(props.series)} className='mt-2' />\n }\n </div>\n </div>\n );\n}\n\ninterface SeriesTallPosterMaskProps {\n series: Series;\n presentationAudiences: PresentationAudience[];\n preloadImage: boolean;\n imageClass?: string;\n isSmall?: boolean;\n hasTableOfContents?: boolean;\n}\n\nexport function SeriesTallPoster(props: SeriesTallPosterMaskProps): JSX.Element {\n const [ hoverRef, isHovering ] = useHoverIntent<HTMLDivElement>({ className: styles.hoverActive });\n \n const audiences = props.series && props.series.subjectPresentationAudiences &&\n props.series.subjectPresentationAudiences.data || [];\n\n const mergedAudience = useMergeAudiences(audiences, props.presentationAudiences);\n const displayAudience = !!(audiences && audiences.length && mergedAudience);\n\n return (\n <div ref={hoverRef}>\n <BaseImage\n data={props.series.tallPoster}\n alt={props.series.name}\n imageType={ImageType.TallPosters}\n preload={props.preloadImage}\n imageOptions={{ size: ImageSize.Large }}\n imageClassName={props.imageClass ? props.imageClass : 'rounded-3'}\n >\n {isHovering && (\n <SeriesTallPosterHoverOverlay\n isSmall={props.isSmall}\n series={props.series}\n mergedAudience={audiences && audiences.length ? mergedAudience : null}\n hasTableOfContents={props.hasTableOfContents}\n />\n )}\n \n <ImageFallback type={ImageFallbackType.Series} />\n <div className={`position-absolute text-white text-shadow ${styles.labelContainer}`}>\n {displayAudience\n ? <AudienceLabel audience={mergedAudience} border='white' />\n : <Badge type={BadgeType.Rating} data={SeriesHelper.getRating(props.series)} />\n }\n </div>\n </BaseImage>\n </div>\n );\n}\n","import React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { AnalyticsOptions, LocationContext } from 'libs/analytics/interfaces';\n\nimport { AudienceLabel } from 'libs/shared/components/audience-label/AudienceLabel';\nimport { Badge, BadgeType } from 'libs/shared/components/badges/Badge';\nimport { BadgeListContainer } from 'libs/shared/components/badges/BadgeListContainer';\nimport { VideoThumbnail } from 'libs/shared/components/thumbnails/video/VideoThumbnail';\nimport { VideoItemGuidance } from 'libs/shared/components/video-list/components/video-guidance/VideoItemGuidance';\nimport { VideoItemActions } from 'libs/shared/components/video-list/components/video-item-actions/VideoItemActions';\nimport { VideoItemTitle } from 'libs/shared/components/video-list/components/video-item-title/VideoItemTitle';\nimport { VideoSubText } from 'libs/shared/components/video-sub-text/VideoSubText';\nimport { ImageSize } from 'libs/shared/enums/Images';\nimport { ThumbnailTextPosition } from 'libs/shared/enums/ThumbnailTextPosition';\nimport { useMergeAudiences } from 'libs/shared/hooks/UseMergeAudiences';\nimport { PresentationAudience, Video } from 'libs/shared/interfaces';\nimport { CommonVideoProps } from 'libs/shared/interfaces/CommonVideoProps';\nimport { GetVideoAppLinkOptions } from 'libs/shared/interfaces/VideoAppLinkOptions';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport styles from './hero-video.module.scss';\n\ninterface HeroVideoProps {\n video: Video;\n presentationAudiences: PresentationAudience[];\n showVideoGuidance: boolean;\n getVideoAppLink: (video: Video, opts: GetVideoAppLinkOptions) => Core.AppLink;\n hideInteractiveBadge?: boolean;\n badgePosition?: 'thumbnail' | 'info-panel';\n titleClassName?: string;\n analyticsData?: HashObject;\n analyticsOptions?: AnalyticsOptions;\n commonVideoProps: CommonVideoProps;\n showNewVideoIndicator?: boolean;\n}\n\nHeroVideo.defaultProps = {\n newDurationStyle: true,\n badgePosition: 'thumbnail'\n};\n\nexport function HeroVideo(props: HeroVideoProps): JSX.Element {\n const videoAudiences = props.video?.subjectPresentationAudiences?.data;\n const mergedAudience = useMergeAudiences(videoAudiences, props.presentationAudiences);\n\n const analyticsOptions = AnalyticsHelper.mergeOptions(props.analyticsOptions, {\n location: LocationContext.ClassificationHero,\n entity: VideoHelper.getAnalyticsEntity(props.video)\n });\n\n const containerRef = React.useRef(null);\n \n if (!props.video)\n return <></>;\n\n return (\n <Row>\n <Col xs={12} md={6}>\n <div ref={containerRef} >\n <VideoThumbnail\n analyticsOptions={analyticsOptions}\n video={props.video}\n appLink={props.getVideoAppLink?.(props.video, {})}\n imageOptions={{ size: ImageSize.Medium }}\n textPosition={ThumbnailTextPosition.Independent}\n type='static'\n audience={props.badgePosition === 'thumbnail' ? mergedAudience : null}\n hideRating={props.badgePosition === 'thumbnail' ? !!mergedAudience : true}\n commonVideoProps={props.commonVideoProps}\n />\n </div>\n </Col>\n <Col xs={12} md={6} className={`${styles.details} position-relative`}>\n <div className='d-flex justify-content-between'>\n <div className='overflow-hidden'>\n <VideoSubText\n type={props.commonVideoProps.subTextType}\n appLink={props.commonVideoProps.getSubTextAppLink?.(props.video)}\n analyticsData={props.analyticsData}\n analyticsOptions={analyticsOptions}\n video={props.video}\n className='text-reset clamp-1'\n />\n <VideoItemTitle\n yearGroups={props.commonVideoProps.yearGroups}\n video={props.video}\n analyticsData={props.analyticsData}\n analyticsOptions={analyticsOptions}\n appLink={props.getVideoAppLink?.(props.video, {})}\n titleSize='h4'\n showNewVideoIndicator={props.showNewVideoIndicator}\n showPadlock={!props.commonVideoProps.hasStudentExperience && !props.commonVideoProps.hasGuestExperience}\n titleClassName={props.titleClassName}\n clampLevel={2}\n />\n </div>\n <VideoItemActions\n analyticsData={props.analyticsData}\n analyticsOptions={analyticsOptions}\n video={props.video}\n />\n </div>\n\n {props.badgePosition === 'info-panel' && (\n <BadgeListContainer className='pb-1'>\n {!props.hideInteractiveBadge && <Badge type={ BadgeType.Interactive } data={props.video.interactives} />}\n <Badge type={ BadgeType.Rating } data={VideoHelper.getRating(props.video)} />\n <Badge type={ BadgeType.ProductionYear } data={props.video.productionYear} />\n </BadgeListContainer>\n )}\n\n <p className='mb-1'><span className={styles.description}>{props.video.description}</span></p>\n \n {props.badgePosition === 'info-panel' && (\n <AudienceLabel\n audience={mergedAudience}\n className='mt-1'\n border='dark'\n />\n )}\n\n {props.showVideoGuidance && (\n <VideoItemGuidance\n video={props.video}\n analyticsData={props.analyticsData}\n analyticsOptions={analyticsOptions}\n containerClassName={`d-flex ${styles.guidance}`}\n responsiveClassName={styles.responsiveGuidance}\n commonVideoProps={props.commonVideoProps}\n />\n )}\n </Col>\n </Row>\n );\n}\n\nexport function PartialHeroVideo(): JSX.Element {\n return (\n <>\n <div className={`partial-loading-background mb-2 ${styles.partialHeading}`} />\n <div className='row pb-3'>\n <div className='col-6 p1'>\n <div className={`${styles.partialHeroThumbnail} partial-loading-background rounded-3`}></div>\n </div>\n <div className='col-6 p1'>\n <div className={`partial-loading-background mb-1 ${styles.partialSeriesText}`}></div>\n <div className={`partial-loading-background my-1 ${styles.partialVideoTitleText}`}></div>\n <div className='d-flex'>\n <div className={`partial-loading-background my-1 me-1 ${styles.partialBadge}`}></div>\n <div className={`partial-loading-background my-1 ms-1 ${styles.partialBadge}`}></div>\n </div>\n <div className={`partial-loading-background my-1 ${styles.partialDescription}`}></div>\n <div className={`partial-loading-background mt-2 ${styles.partialSubject}`}></div>\n </div>\n </div>\n </>\n );\n}\n"],"names":["PartialPlaylistList","props","PARTIAL_PLAYLISTS","className","jsxs","Fragment","jsx","styles","Row","p","idx","Col","EN_US","en_US","diff","unit","ZH_CN","zh_CN","Locales","register","locale","func","getLocale","SEC_ARRAY","toDate","input","formatDiff","localeFunc","agoIn","totalSec","diffSec","date","relativeDate","relDate","format","opts","sec","namespace","getCount","playlist","videos","_a","interactives","_b","clips","_c","PlaylistCount","count","Text","ClickViewAvatar","ClickViewPlayLogo","PlaylistOwnerAvatar","_liteOwner","url","Avatar","UserHelper","PlaylistItem","imageUrl","ImageHelper","ImageSize","ResizeType","audiences","mergedAudience","useMergeAudiences","showImage","getBgColorClass","analyticsData","analyticsOptions","EntityType","getTitle","LanguageService","DateHelper","AppLink","BaseImage","ImageFallback","ImageFallbackType","AudienceLabel","UserAction","LocationContext","ClickDescriptor","SeriesTallPosterHoverOverlay","Badge","BadgeType","SeriesHelper","SeriesTallPoster","hoverRef","isHovering","useHoverIntent","displayAudience","ImageType","HeroVideo","videoAudiences","AnalyticsHelper","VideoHelper","containerRef","React","VideoThumbnail","ThumbnailTextPosition","VideoSubText","_e","_d","VideoItemTitle","_f","VideoItemActions","BadgeListContainer","VideoItemGuidance"],"mappings":"00BAWAA,GAAoB,aAAe,CACjC,SAAU,CACZ,EAEO,SAASA,GAAoBC,EAA8C,CAChF,MAAMC,EAAoB,CAAC,GAAG,MAAMD,EAAM,QAAQ,CAAC,EAE7CE,EAAYF,EAAM,eAAiB,GAEzC,OACEG,EAAAA,KAAAC,WAAA,CACG,SAAA,CAAAJ,EAAM,aA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SAAUd,EACV,UAAU,OACV,OAAO,MAAA,CAAA,EAIV7D,EAAM,mBACLK,EAAAA,IAACmG,EAAA,CACC,MAAOxG,EAAM,MACb,cAAeA,EAAM,cACrB,iBAAAkE,EACA,mBAAoB,UAAU5D,EAAO,QAAQ,GAC7C,oBAAqBA,EAAO,mBAC5B,iBAAkBN,EAAM,gBAAA,CAAA,CAC1B,CAAA,CAEJ,CAAA,EACF,EA/EOK,EAAAA,IAAAD,EAAAA,SAAA,EAAE,CAiFb","x_google_ignoreList":[1,2,3,4,5,6]}
@@ -1,2 +0,0 @@
1
- const e=["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"],b=["bg-pink","bg-orange",...e];function o(n,g){return g[n.charCodeAt(0)%g.length]}export{b as B,o as g};
2
- //# sourceMappingURL=BBnDr_iy.chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BBnDr_iy.chunk.js","sources":["../../../../libs/shared/src/constants/ColourClassNames.ts","../../../../libs/shared/src/utils/getBgColorClass.ts"],"sourcesContent":["/**\n * Use this instead of the list below if you need to render the clickview logo\n * on the background you're rendering.\n */\nexport const LOGO_SAFE_BG_CLASS_NAMES = [\n 'bg-green',\n 'bg-cyan',\n 'bg-teal',\n 'bg-blue',\n 'bg-indigo',\n 'bg-purple'\n];\n\nexport const BG_COLOUR_CLASS_NAMES = [\n 'bg-pink',\n 'bg-orange',\n ...LOGO_SAFE_BG_CLASS_NAMES\n];","export function getBgColorClass(name: string, classNames: string[]): string {\n return classNames[name.charCodeAt(0) % classNames.length];\n}\n\nexport function getDeterministicBgColorClass(name: string, classNames: string[]): string {\n const sum = name\n .split('')\n .reduce(\n (acc, char) => acc + char.charCodeAt(0),\n 0\n );\n \n return classNames[sum % classNames.length];\n}"],"names":["LOGO_SAFE_BG_CLASS_NAMES","BG_COLOUR_CLASS_NAMES","getBgColorClass","name","classNames"],"mappings":"AAIO,MAAMA,EAA2B,CACtC,WACA,UACA,UACA,UACA,YACA,WACF,EAEaC,EAAwB,CACnC,UACA,YACA,GAAGD,CACL,ECjBO,SAASE,EAAgBC,EAAcC,EAA8B,CAC1E,OAAOA,EAAWD,EAAK,WAAW,CAAC,EAAIC,EAAW,MAAM,CAC1D"}
@@ -1,2 +0,0 @@
1
- import{j as r}from"./app-C56EnOMP.js";function a(s){return r.jsx("svg",{...s,children:r.jsx("path",{d:"M11 11V7.002a.999.999 0 1 1 2 0V11h3.998a.999.999 0 1 1 0 2H13v3.998a.999.999 0 1 1-2 0V13H7.002a.999.999 0 1 1 0-2z",fill:"currentColor"})})}export{a as P};
2
- //# sourceMappingURL=BEL0opwe.chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BEL0opwe.chunk.js","sources":["../../../../libs/shared/src/images/svg/actions/PlusSvg.tsx"],"sourcesContent":["import React from 'react';\n\nexport function PlusSvg(props: React.SVGProps<SVGSVGElement>) {\n return (\n <svg {...props}>\n <path\n d='M11 11V7.002a.999.999 0 1 1 2 0V11h3.998a.999.999 0 1 1 0 2H13v3.998a.999.999 0 1 1-2 0V13H7.002a.999.999 0 1 1 0-2z'\n fill='currentColor'\n />\n </svg>\n );\n}\n"],"names":["PlusSvg","props","jsx"],"mappings":"sCAEO,SAASA,EAAQC,EAAsC,CAC5D,OACEC,EAAAA,IAAC,MAAA,CAAK,GAAGD,EACP,SAAAC,EAAAA,IAAC,OAAA,CACC,EAAE,uHACF,KAAK,cAAA,CAAA,EAET,CAEJ"}
@@ -1,2 +0,0 @@
1
- import{o as r,s as I,v,c as B,p as E,q as H,_ as N,j as t,bx as y,aD as R,$ as D,W as l,X as u,e as U}from"./app-C56EnOMP.js";import{B as _,P as w}from"./BnWlQ7-4.chunk.js";import{P as F,B as O}from"./DAh7Ea13.chunk.js";import{C as W,P as q}from"./BwOoIPmc.chunk.js";import{P as k}from"./DxmeZ4C9.chunk.js";import"./YF_QoXEj.chunk.js";import{H as M,A as V}from"./8zar0u1i.chunk.js";import{W as z,b as G}from"./Z2sDSVPb.chunk.js";import{C as p}from"./9NIa7Pi_.chunk.js";import"./Bj3i6I7i.chunk.js";import"./m5XtnRaH.chunk.js";import"./Bl1HvG0b.chunk.js";import"./-cwk-1Iv.chunk.js";import"./B5OOLcT3.chunk.js";import"./CU6iZ8MR.chunk.js";import"./BBnDr_iy.chunk.js";import"./CgJckl-g.chunk.js";import"./CPXlV0fg.chunk.js";import"./BUhbk0mt.chunk.js";import"./BoqzK1u7.chunk.js";import"./DJyZ6Hx7.chunk.js";import"./Daes5Wgy.chunk.js";import"./DSq4f4jm.chunk.js";import"./DEP24A-f.chunk.js";import"./C2Zu5vKc.chunk.js";import"./sc9-PV9Y.chunk.js";import"./nay4aGaa.chunk.js";import"./BdHxGaRy.chunk.js";import"./pkzD5BEm.chunk.js";const J="_classificationPane_sns98_1",K={classificationPane:J},X="subjects.classificationsView",o=B.encloseNamespace(X);function $(e,s){const n=r(e&&p.classification(e,s));return e?n==null?void 0:n.data:{name:o("exploreAllTopicsHeading"),banner:{url:M.Images.STREAMABLE_TOPIC_BANNER}}}function Q(e){const s=r(e&&p.path(e));return e?s==null?void 0:s.data:[]}function ve(e){var C,A,P,x;const s=r(R.currentUser()),n=r(D.config()),c=r(I.streamablePresentation()),a=$(e.id,(C=s.data)==null?void 0:C.id),g=Q(e.id);v({title:o("exploreAllTopicsHeading")});const L=e.id?p.children(e.id):c.data&&p.topLevelTopics((A=c.data)==null?void 0:A.id),m=r(L),[S]=E(N.AUDIENCE_FILTER,void 0,{storage:H.SessionStorage}),f=i=>{const d=V.getAudienceParams(S);return{application:u.SUBJECTS,action:l.Subjects.CLASSIFICATION,args:i?[i.id,U.slugify(i.name)]:[],params:d||{}}};function T(){const i=[{name:o("discover"),appLink:{application:u.DASHBOARD,action:l.Dashboard.HOME}},{name:o("exploreAllTopicsHeading"),appLink:{application:u.SUBJECTS,action:l.Subjects.CLASSIFICATION_ALL},active:!e.id}];return g.forEach(d=>{i.push({name:d.name,appLink:f(d)})}),e.id&&i.push({name:o("subview"),active:!0}),i}const b=(e.id?!!a:!0)&&!!n.data&&m.data,h=!!g,j={presentationId:(P=c.data)==null?void 0:P.id,presentationName:(x=c.data)==null?void 0:x.name,currentClassificationName:a==null?void 0:a.name,widgetId:G.Classifications,templateId:z.CoverFixedPillListLarge};return t.jsxs("main",{className:"bg-white px-4",children:[b?t.jsx(_,{heading:a==null?void 0:a.name,banner:a==null?void 0:a.banner,imageCdnUrl:n.data.imageCdnUrl,actions:[],imageOptions:!e.id&&{resizeType:y.Cover}}):t.jsx(w,{}),t.jsx("div",{className:"py-3 mb-3 border-bottom",children:h?t.jsx(O,{breadcrumbs:T()}):t.jsx(F,{})}),t.jsx("div",{className:K.classificationPane,children:b?t.jsx(W,{name:"",description:"",analyticsData:j,content:m==null?void 0:m.data,appLinks:{classification:f},hasTableOfContents:!1,settings:{hasTopicDirectories:!1}}):t.jsx(k,{partialLoadingComponent:q})})]})}export{ve as StreamableClassificationsView};
2
- //# sourceMappingURL=BHmtLW9C.chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BHmtLW9C.chunk.js","sources":["../../src/apps/subjects/views/classifications/StreamableClassificationsView.tsx"],"sourcesContent":["import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { StorageType } from 'libs/common/backbone/utils/LocalStorageHelper';\nimport { Flight } from 'libs/common/flight';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { BannerHeader, PartialBannerHeader } from 'libs/shared/components/banner-header/BannerHeader';\nimport { Breadcrumb, Breadcrumbs, PartialBreadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { CoverFixedPillListLargeWidgetTemplate } from 'libs/shared/components/widgets/curated-widgets/templates/cover-fixed-pill-list-large/CoverFixedPillListLargeWidgetTemplate';\nimport { PartialDynamicWidget } from 'libs/shared/components/widgets/dynamic-widget';\nimport { PartialSubjectWidgetItem } from 'libs/shared/components/widgets/items/subject-widget-item';\nimport { HardCoded } from 'libs/shared/constants/HardCoded';\nimport { SharedViewModelKeys } from 'libs/shared/constants/SharedViewModelKeys';\nimport { ResizeType } from 'libs/shared/enums/Images';\nimport { WidgetTemplate } from 'libs/shared/enums/WidgetTemplate';\nimport { WidgetTypeId } from 'libs/shared/enums/WidgetTypeId';\nimport { ClassificationRequests } from 'libs/shared/flight-requests/ClassificationRequests';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { Classification, Config, CurrentUser, Presentation, PresentationAudience } from 'libs/shared/interfaces';\nimport { AudienceHelper } from 'libs/shared/utils/audience-helper/AudienceHelper';\n\nimport { Actions } from 'shared/constants/StreamableActions';\nimport { AppChannels } from 'shared/constants/StreamableRadioChannels';\nimport { PresentationRequests } from 'shared/flight-requests/PresentationRequests';\n\nimport styles from './classifications.module.scss';\n\nconst namespace = 'subjects.classificationsView';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nfunction useGetClassification(\n id?: string,\n userId?: string\n): Classification {\n /**\n * With an id, we're fetching the classification to show the child topics in the\n * classification list.\n */\n const classification = Flight.useBasicFetch<Classification>(\n id &&\n ClassificationRequests.classification(id, userId)\n );\n\n /**\n * Without an id, we should be displaying the All Subjects page. So we'll construct\n * a synthetic classification.\n */\n if (!id)\n return {\n name: getPhrase('exploreAllTopicsHeading'),\n banner: {\n url: HardCoded.Images.STREAMABLE_TOPIC_BANNER\n }\n } as Classification;\n\n return classification?.data;\n}\n\nfunction useGetPaths(id?: string): Classification[] {\n const path = Flight.useBasicFetch<Classification[]>(id && ClassificationRequests.path(id));\n\n if (!id)\n return [];\n\n return path?.data;\n}\n\n\ninterface StreamableClassificationsViewProps {\n id?: string;\n}\n\nexport function StreamableClassificationsView(props: StreamableClassificationsViewProps): JSX.Element {\n /**\n * Data fetching\n */\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n\n const presentation = Flight.useBasicFetch<Presentation>(\n PresentationRequests.streamablePresentation()\n );\n\n const classification = useGetClassification(\n props.id,\n currentUser.data?.id\n );\n\n const paths = useGetPaths(props.id);\n\n useSetPageMetadata({ title: getPhrase('exploreAllTopicsHeading') });\n\n /**\n * With an id, we'll fetch the classification's children.\n * With a presentationId, we'll fetch the presentation's top level topics.\n * For public access, we will always have a presentationId available.\n */\n const request = props.id\n ? ClassificationRequests.children(props.id)\n : presentation.data && ClassificationRequests.topLevelTopics(presentation.data?.id);\n\n const children = Flight.useBasicFetch<Classification[]>(request);\n\n const [activeAudiences] = useViewModel<PresentationAudience[]>(\n SharedViewModelKeys.AUDIENCE_FILTER,\n undefined,\n { storage: StorageType.SessionStorage }\n );\n\n const classificationAppLinkFn = (classification?: Classification) => {\n const params = AudienceHelper.getAudienceParams(activeAudiences);\n return {\n application: AppChannels.SUBJECTS,\n action: Actions.Subjects.CLASSIFICATION,\n args: classification ? [ classification.id, TextHelper.slugify(classification.name) ] : [],\n params: params || {}\n };\n };\n\n function getBreadcrumbs(): Breadcrumb[] {\n const breadcrumbs: Breadcrumb[] = [{\n name: getPhrase('discover'),\n appLink: {\n application: AppChannels.DASHBOARD,\n action: Actions.Dashboard.HOME\n }\n }, {\n name: getPhrase('exploreAllTopicsHeading'),\n appLink: { application: AppChannels.SUBJECTS, action: Actions.Subjects.CLASSIFICATION_ALL },\n active: !props.id\n }];\n\n paths.forEach(item => {\n breadcrumbs.push({\n name: item.name,\n appLink: classificationAppLinkFn(item)\n });\n });\n\n if (props.id)\n breadcrumbs.push({\n name: getPhrase('subview'),\n active: true\n });\n\n return breadcrumbs;\n }\n\n /**\n * Render Variable\n */\n const dataLoaded = (props.id ? !!classification : true) && !!config.data && children.data;\n const breadcrumbsDataLoaded = !!paths;\n\n /**\n * Additional subjects data to be mixed in with lower-level component analytics collection\n */\n const analyticsData = {\n presentationId: presentation.data?.id,\n presentationName: presentation.data?.name,\n currentClassificationName: classification?.name,\n widgetId: WidgetTypeId.Classifications,\n templateId: WidgetTemplate.CoverFixedPillListLarge\n };\n\n return (\n <main className='bg-white px-4'>\n {dataLoaded\n ? (\n <BannerHeader\n heading={classification?.name}\n banner={classification?.banner}\n imageCdnUrl={config.data.imageCdnUrl}\n actions={[]}\n imageOptions={!props.id && { resizeType: ResizeType.Cover }}\n />\n ) : <PartialBannerHeader />\n }\n <div className={`py-3 mb-3 border-bottom`}>\n {(() => {\n if (!breadcrumbsDataLoaded)\n return <PartialBreadcrumbs />;\n\n return <Breadcrumbs breadcrumbs={getBreadcrumbs()} />;\n })()}\n </div>\n <div className={styles.classificationPane}>\n {dataLoaded\n ? (\n <CoverFixedPillListLargeWidgetTemplate\n name=''\n description=''\n analyticsData={analyticsData}\n content={children?.data}\n appLinks={{ classification: classificationAppLinkFn }}\n hasTableOfContents={false}\n settings={{\n hasTopicDirectories: false\n }}\n />\n ) : <PartialDynamicWidget partialLoadingComponent={PartialSubjectWidgetItem} />}\n </div>\n </main>\n );\n}"],"names":["namespace","getPhrase","LanguageService","useGetClassification","id","userId","classification","Flight.useBasicFetch","ClassificationRequests","HardCoded","useGetPaths","path","StreamableClassificationsView","props","currentUser","UserRequests","config","ConfigRequests","presentation","PresentationRequests","_a","paths","useSetPageMetadata","request","_b","children","activeAudiences","useViewModel","SharedViewModelKeys","StorageType","classificationAppLinkFn","params","AudienceHelper","AppChannels","Actions","TextHelper","getBreadcrumbs","breadcrumbs","item","dataLoaded","breadcrumbsDataLoaded","analyticsData","_c","_d","WidgetTypeId","WidgetTemplate","jsxs","jsx","BannerHeader","ResizeType","PartialBannerHeader","Breadcrumbs","PartialBreadcrumbs","styles","CoverFixedPillListLargeWidgetTemplate","PartialDynamicWidget","PartialSubjectWidgetItem"],"mappings":"okCA+BMA,EAAY,+BACZC,EAAYC,EAAgB,iBAAiBF,CAAS,EAE5D,SAASG,EACPC,EACAC,E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AI,UAAWM,EAAO,mBACpB,SAAAd,EAEGQ,EAAAA,IAACO,EAAA,CACC,KAAK,GACL,YAAY,GACZ,cAAAb,EACA,QAAShB,GAAA,YAAAA,EAAU,KACnB,SAAU,CAAE,eAAgBK,CAAA,EAC5B,mBAAoB,GACpB,SAAU,CACR,oBAAqB,EAAA,CACvB,CAAA,EAEAiB,EAAAA,IAACQ,EAAA,CAAqB,wBAAyBC,EAA0B,CAAA,CACjF,CAAA,EACF,CAEJ"}
@@ -1,2 +0,0 @@
1
- import{D as r,bV as t,bW as f,af as a}from"./app-C56EnOMP.js";const n={getDisplayDate(M,e){return e?M.slice(5,7)!==e.slice(5,7)?`${r.format(M,"D MMM")} - ${r.format(e,"D MMM")}`:t.getCurrentRegion()===f[a.US]?`${r.format(M,"MMM")} ${r.format(M,"D")} - ${r.format(e,"D")}`:`${r.format(M,"D")} - ${r.format(e,"D")} ${r.format(M,"MMM")}`:r.format(M,"D MMM")},getEventsInMonth(M,e){return M.filter(o=>r.format(o.startDate,"YYYY-MM")===r.format(e,"YYYY-MM"))},getOrdinalDate(M){return`${r.getLocalDateOrdinal(r.get(M,"date"))} ${r.format(M,"MMMM")}`}};export{n as S};
2
- //# sourceMappingURL=BJ0C6oH6.chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BJ0C6oH6.chunk.js","sources":["../../../../libs/shared/src/apps/calendar/utils/SpecialEventHelper.ts"],"sourcesContent":["import { DateHelper } from 'libs/common/react/utils/DateHelper';\nimport { RegionDateFormatHelper } from 'libs/common/react/utils/RegionDateFormatHelper';\n\nimport { COMMON_REGION_MAP } from 'libs/shared/constants/CommonRegionMap';\nimport { InstanceRegion } from 'libs/shared/enums/InstanceRegion';\nimport { CalendarEvent } from 'libs/shared/interfaces';\n\nexport const SpecialEventHelper = {\n getDisplayDate(startDate: string, endDate: string): string {\n if (!endDate)\n // one day event\n return DateHelper.format(startDate, 'D MMM');\n\n if (startDate.slice(5, 7) !== endDate.slice(5, 7))\n // span across months\n return `${DateHelper.format(startDate, 'D MMM')} - ${DateHelper.format(endDate, 'D MMM')}`;\n \n // same month event\n\n if (RegionDateFormatHelper.getCurrentRegion() === COMMON_REGION_MAP[InstanceRegion.US])\n return `${DateHelper.format(startDate, 'MMM')} ${DateHelper.format(startDate, 'D')} - ${DateHelper.format(endDate, 'D')}`;\n\n return `${DateHelper.format(startDate, 'D')} - ${DateHelper.format(endDate, 'D')} ${DateHelper.format(startDate, 'MMM')}`;\n },\n\n getEventsInMonth(calendarEvents: CalendarEvent[], month: Date) {\n return calendarEvents.filter(e => DateHelper.format(e.startDate, 'YYYY-MM') === DateHelper.format(month, 'YYYY-MM'));\n },\n\n getOrdinalDate(date: string): string {\n return `${DateHelper.getLocalDateOrdinal(DateHelper.get(date, 'date'))} ${DateHelper.format(date, 'MMMM')}`;\n }\n};"],"names":["SpecialEventHelper","startDate","endDate","DateHelper","RegionDateFormatHelper","COMMON_REGION_MAP","InstanceRegion","calendarEvents","month","e","date"],"mappings":"8DAOO,MAAMA,EAAqB,CAChC,eAAeC,EAAmBC,EAAyB,CACzD,OAAKA,EAIDD,EAAU,MAAM,EAAG,CAAC,IAAMC,EAAQ,MAAM,EAAG,CAAC,EAEvC,GAAGC,EAAW,OAAOF,EAAW,OAAO,CAAC,MAAME,EAAW,OAAOD,EAAS,OAAO,CAAC,GAItFE,EAAuB,iBAAA,IAAuBC,EAAkBC,EAAe,EAAE,EAC5E,GAAGH,EAAW,OAAOF,EAAW,KAAK,CAAC,IAAIE,EAAW,OAAOF,EAAW,GAAG,CAAC,MAAME,EAAW,OAAOD,EAAS,GAAG,CAAC,GAElH,GAAGC,EAAW,OAAOF,EAAW,GAAG,CAAC,MAAME,EAAW,OAAOD,EAAS,GAAG,CAAC,IAAIC,EAAW,OAAOF,EAAW,KAAK,CAAC,GAX9GE,EAAW,OAAOF,EAAW,OAAO,CAY/C,EAEA,iBAAiBM,EAAiCC,EAAa,CAC7D,OAAOD,EAAe,OAAOE,GAAKN,EAAW,OAAOM,EAAE,UAAW,SAAS,IAAMN,EAAW,OAAOK,EAAO,SAAS,CAAC,CACrH,EAEA,eAAeE,EAAsB,CACnC,MAAO,GAAGP,EAAW,oBAAoBA,EAAW,IAAIO,EAAM,MAAM,CAAC,CAAC,IAAIP,EAAW,OAAOO,EAAM,MAAM,CAAC,EAC3G,CACF"}
@@ -1,2 +0,0 @@
1
- import{p as V,q as B,t as l,R as d,o as f,aD as x,aB as H,a3 as K,r as _,by as $,_ as G,c as j,g as z,M as J,dr as Q,k as W,i as X}from"./app-C56EnOMP.js";import{C as s}from"./9NIa7Pi_.chunk.js";import{P as Y}from"./BwuSNwcs.chunk.js";const Z="videos.hooks",m=new Map,te=a=>{var b,A;function k(e){return`${e.toLowerCase()}:${G.PRESENTATION_ID}`}const[h,v]=V(k(l.Curriculum),void 0,{storage:B.LocalStorage}),[i,g]=d.useState(null),[p,u]=d.useState(null),[w,S]=d.useState(!1),M=f(x.currentUser()),o=f(s.availablePresentations(l.Curriculum)),C=H(),R=K(),{hasLocalPermissions:E}=_(),y=E($.ManagePublicPresentation);function N(){var t;return isNaN(+h)?(t=z.first(o.data))==null?void 0:t.id:h}function T(){var t;if((t=M.data)!=null&&t.isAuthenticated)return s.presentation(l.Curriculum);const e=N();return e?s.presentationById(e):null}const n=f(T());d.useEffect(()=>{var e;n.data&&(g(n.data),a&&!p&&C(s.curriculumLinks(a,(e=n.data)==null?void 0:e.id)).then(t=>{var r,c;u(t),m.set((c=(r=n.data)==null?void 0:r.id)==null?void 0:c.toString(),t)}))},[(b=n.data)==null?void 0:b.id]);const L=((A=o.data)==null?void 0:A.map(e=>e.id))??[],P=f(a&&L.length&&s.getMappedCurriculums(a,L));async function U(e,t){if(i.id.toString()===e.toString())return;const r=o.data.find(c=>c.id.toString()===e.toString());g(r),y&&v(e);try{if(a&&await q(e),y)return;await C(Y.setPresentation(r,l.Curriculum)),D(r,t)}catch{R.error(j.getPhrase(Z,"curriculumUpdateError")),g(i)}}async function q(e){if(!a)return;if(m.has(e.toString())){u(m.get(e.toString()));return}if(!P.data.find(r=>r.id.toString()===e.toString())){u([]);return}S(!0);const t=await C(s.curriculumLinks(a,e));u(t),m.set(e.toString(),t),S(!1)}function D(e,t){if(!t.shouldLog)return;const r={id:e.id,name:e.id,description:e.description};t.video&&(r.videoId=t.video.id,r.videoName=t.video.name),J.logUserAction(r,{entity:X.Presentation,actionType:W.Select,descriptor:Q.Curriculum,location:t.locationContext})}function F(){return i?a?!!p&&P.hasCompleted:!0:!1}return{preferredCurriculum:i||n.data,curriculumLinks:p||[],availableCurriculums:o.data||[],mappedCurriculums:P.data||[],updateCurriculum:U,hasCompleted:F(),isFetching:w}};export{te as u};
2
- //# sourceMappingURL=BPcJv8Nj.chunk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"BPcJv8Nj.chunk.js","sources":["../../src/apps/videos/hooks/useCurriculums.ts"],"sourcesContent":["import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { StorageType } from 'libs/common/backbone/utils/LocalStorageHelper';\nimport { Flight } from 'libs/common/flight';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\nimport { ArrayHelper } from 'libs/common/react/utils/ArrayHelper';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, HashObject, PresentationDescriptor, UserAction } from 'libs/analytics/interfaces';\n\nimport { SharedViewModelKeys } from 'libs/shared/constants/SharedViewModelKeys';\nimport { LocalPermissionName } from 'libs/shared/enums/PermissionName';\nimport { PresentationType } from 'libs/shared/enums/PresentationType';\nimport { ClassificationRequests } from 'libs/shared/flight-requests/ClassificationRequests';\nimport { PreferenceRequests } from 'libs/shared/flight-requests/PreferenceRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CurrentUser, Curriculum, CurriculumAnalyticsOptions, CurriculumData, Presentation } from 'libs/shared/interfaces';\n\nconst namespace = 'videos.hooks';\n\nconst curriculumLinksCache = new Map<string, Curriculum[][]>();\n\nexport const useCurriculums = (videoId?: string): CurriculumData => {\n function getPublicPresentationLocalStorageKey(type: PresentationType): string {\n return `${type.toLowerCase()}:${SharedViewModelKeys.PRESENTATION_ID}`;\n }\n\n const [ publicPresentationId, setPublicPresentationId ] = useViewModel<string>(\n getPublicPresentationLocalStorageKey(PresentationType.Curriculum),\n undefined,\n { storage: StorageType.LocalStorage }\n );\n\n const [ activeCurriculum, setActiveCurriculum ] = React.useState<Presentation>(null);\n const [ curriculumLinks, setCurriculumLinks ] = React.useState<Curriculum[][]>(null);\n const [ isFetching, setIsFetching ] = React.useState<boolean>(false);\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const availableCurriculums = Flight.useBasicFetch<Presentation[]>(\n ClassificationRequests.availablePresentations(PresentationType.Curriculum)\n );\n\n const fetchAsync = Flight.useGetFetchAsync();\n const alerts = useAlerts();\n const { hasLocalPermissions } = usePermissions();\n const canManagePublicPresentation = hasLocalPermissions(LocalPermissionName.ManagePublicPresentation);\n \n function getAnonPresentationId(): string {\n /**\n * Where a public user has already nominated a presentation and \n * it's persisted in LocalStorage retrieve that.\n */\n const hasValidPublicPresentationId = !isNaN(+publicPresentationId);\n if (hasValidPublicPresentationId)\n return publicPresentationId;\n\n /**\n * Where the public user has yet to nominate a presentation, we'll preload with a Level 1 presentation\n * They'll be prompted to select a presentation\n */\n return ArrayHelper.first(availableCurriculums.data)?.id;\n }\n\n function getPreferredCurriculumRequest() {\n if (currentUser.data?.isAuthenticated)\n return ClassificationRequests.presentation(PresentationType.Curriculum);\n\n const anonPresentationId = getAnonPresentationId();\n\n if (!anonPresentationId)\n return null;\n\n return ClassificationRequests.presentationById(anonPresentationId);\n }\n\n const preferredCurriculum = Flight.useBasicFetch<Presentation>(getPreferredCurriculumRequest());\n\n React.useEffect(() => {\n if (!preferredCurriculum.data)\n return;\n\n setActiveCurriculum(preferredCurriculum.data);\n\n if (videoId && !curriculumLinks) {\n fetchAsync<Curriculum[][]>(ClassificationRequests.curriculumLinks(videoId, preferredCurriculum.data?.id))\n .then(links => {\n setCurriculumLinks(links);\n curriculumLinksCache.set(preferredCurriculum.data?.id?.toString(), links);\n });\n }\n }, [preferredCurriculum.data?.id]);\n \n const availableCurriculumIds = availableCurriculums.data?.map(c => c.id) ?? [];\n\n const mappedCurriculums = Flight.useBasicFetch<Presentation[]>(\n videoId &&\n availableCurriculumIds.length &&\n ClassificationRequests.getMappedCurriculums(\n videoId,\n availableCurriculumIds\n )\n );\n\n async function updateCurriculum(\n curriculumId: string,\n analyticsOptions: CurriculumAnalyticsOptions\n ): Promise<void> {\n if (activeCurriculum.id.toString() === curriculumId.toString())\n return;\n\n const curriculum = availableCurriculums.data.find(c => c.id.toString() === curriculumId.toString());\n\n setActiveCurriculum(curriculum);\n\n /**\n * In a public context, we'll persist the selected presentation's id to Local Storage\n */\n if (canManagePublicPresentation)\n setPublicPresentationId(curriculumId);\n\n try {\n if (videoId)\n await updateCurriculumLinks(curriculumId);\n\n if (canManagePublicPresentation)\n return;\n\n await fetchAsync(\n PreferenceRequests.setPresentation(curriculum, PresentationType.Curriculum)\n );\n\n logCurriculumChangeEvent(curriculum, analyticsOptions);\n } catch {\n alerts.error(LanguageService.getPhrase(namespace, 'curriculumUpdateError'));\n\n // If we fail to update, rollback to the previous curriculum\n setActiveCurriculum(activeCurriculum);\n }\n }\n\n async function updateCurriculumLinks(curriculumId: string) {\n if (!videoId)\n return;\n\n // If we've already fetched the links for this curriculum, use the cached data\n if (curriculumLinksCache.has(curriculumId.toString())) {\n setCurriculumLinks(curriculumLinksCache.get(curriculumId.toString()));\n return;\n }\n \n // If we don't have any curriculums mapped to our video, set the links to an empty array\n if (!mappedCurriculums.data.find(c => c.id.toString() === curriculumId.toString())) {\n setCurriculumLinks([]);\n return;\n }\n\n // Fetch the curriculum links for our video\n setIsFetching(true);\n\n const links = await fetchAsync<Curriculum[][]>(\n ClassificationRequests.curriculumLinks(videoId, curriculumId)\n );\n\n setCurriculumLinks(links);\n curriculumLinksCache.set(curriculumId.toString(), links);\n\n setIsFetching(false);\n }\n\n function logCurriculumChangeEvent(curriculum: Presentation, analyticsOptions: CurriculumAnalyticsOptions): void {\n if (!analyticsOptions.shouldLog)\n return;\n\n const analyticsData: HashObject = {\n id: curriculum.id,\n name: curriculum.id,\n description: curriculum.description\n };\n\n if (analyticsOptions.video) {\n analyticsData.videoId = analyticsOptions.video.id;\n analyticsData.videoName = analyticsOptions.video.name;\n }\n\n AnalyticsHelper.logUserAction(analyticsData, {\n entity: EntityType.Presentation,\n actionType: UserAction.Select,\n descriptor: PresentationDescriptor.Curriculum,\n location: analyticsOptions.locationContext\n });\n }\n\n function hasCompleted(): boolean {\n if (!activeCurriculum)\n return false;\n\n if (!videoId)\n return true;\n\n return !!curriculumLinks && mappedCurriculums.hasCompleted;\n }\n\n return {\n preferredCurriculum: activeCurriculum || preferredCurriculum.data,\n curriculumLinks: curriculumLinks || [],\n availableCurriculums: availableCurriculums.data || [],\n mappedCurriculums: mappedCurriculums.data || [],\n updateCurriculum,\n hasCompleted: hasCompleted(),\n isFetching\n };\n};"],"names":["namespace","curriculumLinksCache","useCurriculums","videoId","getPublicPresentationLocalStorageKey","type","SharedViewModelKeys","publicPresentationId","setPublicPresentationId","useViewModel","PresentationType","StorageType","activeCurriculum","setActiveCurriculum","React","curriculumLinks","setCurriculumLinks","isFetching","setIsFetching","currentUser","Flight.useBasicFetch","UserRequests","availableCurriculums","ClassificationRequests","fetchAsync","Flight.useGetFetchAsync","alerts","useAlerts","hasLocalPermissions","usePermissions","canManagePublicPresentation","LocalPermissionName","getAnonPresentationId","_a","ArrayHelper","getPreferredCurriculumRequest","anonPresentationId","preferredCurriculum","links","_b","availableCurriculumIds","c","mappedCurriculums","updateCurriculum","curriculumId","analyticsOptions","curriculum","updateCurriculumLinks","PreferenceRequests","logCurriculumChangeEvent","Langu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AAE,EACrB,MACF,CAGAE,EAAc,EAAI,EAElB,MAAMoB,EAAQ,MAAMd,EAClBD,EAAuB,gBAAgBpB,EAASyC,CAAY,CAAA,EAG9D5B,EAAmBsB,CAAK,EACxBrC,EAAqB,IAAI2C,EAAa,SAAA,EAAYN,CAAK,EAEvDpB,EAAc,EAAK,CACrB,CAEA,SAAS+B,EAAyBH,EAA0BD,EAAoD,CAC9G,GAAI,CAACA,EAAiB,UACpB,OAEF,MAAMM,EAA4B,CAChC,GAAIL,EAAW,GACf,KAAMA,EAAW,GACjB,YAAaA,EAAW,WAAA,EAGtBD,EAAiB,QACnBM,EAAc,QAAUN,EAAiB,MAAM,GAC/CM,EAAc,UAAYN,EAAiB,MAAM,MAGnDO,EAAgB,cAAcD,EAAe,CAC3C,OAAQE,EAAW,aACnB,WAAYC,EAAW,OACvB,WAAYC,EAAuB,WACnC,SAAUV,EAAiB,eAAA,CAC5B,CACH,CAEA,SAASW,GAAwB,CAC/B,OAAK5C,EAGAT,EAGE,CAAC,CAACY,GAAmB2B,EAAkB,aAFrC,GAHA,EAMX,CAEA,MAAO,CACL,oBAAqB9B,GAAoByB,EAAoB,KAC7D,gBAAiBtB,GAAmB,CAAA,EACpC,qBAAsBO,EAAqB,MAAQ,CAAA,EACnD,kBAAmBoB,EAAkB,MAAQ,CAAA,EAC7C,iBAAAC,EACA,aAAca,EAAA,EACd,WAAAvC,CAAA,CAEJ"}
@@ -1,10 +0,0 @@
1
- import{a5 as Be,R as it,j as f,G as je,c as Nt,ae as At,bn as Ue,ba as B,ar as He,ao as ze,L as Xe,T as It,z as Ye,a6 as We,F as $e,aA as Ve,bo as qe,a3 as Fe,o as Ot,v as Ge,aD as Ze,$ as Qe,bp as wt,M as Rt,i as kt,aJ as Pt,k as Lt,h as _t,bq as ie}from"./app-C56EnOMP.js";import{I as pt}from"./CgJckl-g.chunk.js";import{F as Ke}from"./DtHh_hpg.chunk.js";import{l as ht,a as Je,F as bt}from"./Bt3kaRtU.chunk.js";import{U as xt,S as ta}from"./CO_D2O4I.chunk.js";import"./CW7x8M-z.chunk.js";import"./C35NlkUr.chunk.js";import"./DAh7Ea13.chunk.js";import"./-cwk-1Iv.chunk.js";import"./CPXlV0fg.chunk.js";import"./Byn8R7bs.chunk.js";const ea={uploadBase64Image(i,t,a,e){return{url:`/api/image/upload?type=${i}`,key:"upload:image",data:t,type:Be.POST,success:a,always:e}}};/*!
2
- * Cropper.js v1.5.6
3
- * https://fengyuanchen.github.io/cropperjs
4
- *
5
- * Copyright 2015-present Chen Fengyuan
6
- * Released under the MIT license
7
- *
8
- * Date: 2019-10-04T04:33:48.372Z
9
- */function Et(i){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Et=function(t){return typeof t}:Et=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Et(i)}function aa(i,t){if(!(i instanceof t))throw new TypeError("Cannot call a class as a function")}function re(i,t){for(var a=0;a<t.length;a++){var e=t[a];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(i,e.key,e)}}function ia(i,t,a){return t&&re(i.prototype,t),a&&re(i,a),i}function ra(i,t,a){return t in i?Object.defineProperty(i,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):i[t]=a,i}function se(i,t){var a=Object.keys(i);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(i);t&&(e=e.filter(function(s){return Object.getOwnPropertyDescriptor(i,s).enumerable})),a.push.apply(a,e)}return a}function ye(i){for(var t=1;t<arguments.length;t++){var a=arguments[t]!=null?arguments[t]:{};t%2?se(a,!0).forEach(function(e){ra(i,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):se(a).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(a,e))})}return i}function De(i){return sa(i)||na(i)||oa()}function sa(i){if(Array.isArray(i)){for(var t=0,a=new Array(i.length);t<i.length;t++)a[t]=i[t];return a}}function na(i){if(Symbol.iterator in Object(i)||Object.prototype.toString.call(i)==="[object Arguments]")return Array.from(i)}function oa(){throw new TypeError("Invalid attempt to spread non-iterable instance")}var Mt=typeof window<"u"&&typeof window.document<"u",W=Mt?window:{},Ft=Mt?"ontouchstart"in W.document.documentElement:!1,Gt=Mt?"PointerEvent"in W:!1,y="cropper",Zt="all",Ee="crop",Ce="move",Ne="zoom",K="e",J="w",et="s",V="n",ct="ne",lt="nw",dt="se",ut="sw",Ut="".concat(y,"-crop"),ne="".concat(y,"-disabled"),O="".concat(y,"-hidden"),oe="".concat(y,"-hide"),ha="".concat(y,"-invisible"),Ct="".concat(y,"-modal"),Ht="".concat(y,"-move"),mt="".concat(y,"Action"),yt="".concat(y,"Preview"),Qt="crop",Me="move",Te="none",zt="crop",Xt="cropend",Yt="cropmove",Wt="cropstart",he="dblclick",ca=Ft?"touchstart":"mousedown",la=Ft?"touchmove":"mousemove",da=Ft?"touchend touchcancel":"mouseup",ce=Gt?"pointerdown":ca,le=Gt?"pointermove":la,de=Gt?"pointerup pointercancel":da,ue="ready",pe="resize",fe="wheel",$t="zoom",me="image/jpeg",ua=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,pa=/^data:/,fa=/^data:image\/jpeg;base64,/,ma=/^img|canvas$/i,ga=200,va=100,ge={viewMode:0,dragMode:Qt,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},wa='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',ba=Number.isNaN||W.isNaN;function g(i){return typeof i=="number"&&!ba(i)}var ve=function(t){return t>0&&t<1/0};function Bt(i){return typeof i>"u"}function tt(i){return Et(i)==="object"&&i!==null}var xa=Object.prototype.hasOwnProperty;function rt(i){if(!tt(i))return!1;try{var t=i.constructor,a=t.prototype;return t&&a&&xa.call(a,"isPrototypeOf")}catch{return!1}}function I(i){return typeof i=="function"}var ya=Array.prototype.slice;function Se(i){return Array.from?Array.from(i):ya.call(i)}function C(i,t){return i&&I(t)&&(Array.isArray(i)||g(i.length)?Se(i).forEach(function(a,e){t.call(i,a,e,i)}):tt(i)&&Object.keys(i).forEach(function(a){t.call(i,i[a],a,i)})),i}var D=Object.assign||function(t){for(var a=arguments.length,e=new Array(a>1?a-1:0),s=1;s<a;s++)e[s-1]=arguments[s];return tt(t)&&e.length>0&&e.forEach(function(r){tt(r)&&Object.keys(r).forEach(function(n){t[n]=r[n]})}),t},Da=/\.\d*(?:0|9){12}\d*$/;function nt(i){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return Da.test(i)?Math.round(i*t)/t:i}var Ea=/^width|height|left|top|marginLeft|marginTop$/;function q(i,t){var a=i.style;C(t,function(e,s){Ea.test(s)&&g(e)&&(e="".concat(e,"px")),a[s]=e})}function Ca(i,t){return i.classList?i.classList.contains(t):i.className.indexOf(t)>-1}function S(i,t){if(t){if(g(i.length)){C(i,function(e){S(e,t)});return}if(i.classList){i.classList.add(t);return}var a=i.className.trim();a?a.indexOf(t)<0&&(i.className="".concat(a," ").concat(t)):i.className=t}}function z(i,t){if(t){if(g(i.length)){C(i,function(a){z(a,t)});return}if(i.classList){i.classList.remove(t);return}i.className.indexOf(t)>=0&&(i.className=i.className.replace(t,""))}}function st(i,t,a){if(t){if(g(i.length)){C(i,function(e){st(e,t,a)});return}a?S(i,t):z(i,t)}}var Na=/([a-z\d])([A-Z])/g;function Kt(i){return i.replace(Na,"$1-$2").toLowerCase()}function Vt(i,t){return tt(i[t])?i[t]:i.dataset?i.dataset[t]:i.getAttribute("data-".concat(Kt(t)))}function gt(i,t,a){tt(a)?i[t]=a:i.dataset?i.dataset[t]=a:i.setAttribute("data-".concat(Kt(t)),a)}function Ma(i,t){if(tt(i[t]))try{delete i[t]}catch{i[t]=void 0}else if(i.dataset)try{delete i.dataset[t]}catch{i.dataset[t]=void 0}else i.removeAttribute("data-".concat(Kt(t)))}var Ae=/\s\s*/,Ie=(function(){var i=!1;if(Mt){var t=!1,a=function(){},e=Object.defineProperty({},"once",{get:function(){return i=!0,t},set:function(r){t=r}});W.addEventListener("test",a,e),W.removeEventListener("test",a,e)}return i})();function L(i,t,a){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=a;t.trim().split(Ae).forEach(function(r){if(!Ie){var n=i.listeners;n&&n[r]&&n[r][a]&&(s=n[r][a],delete n[r][a],Object.keys(n[r]).length===0&&delete n[r],Object.keys(n).length===0&&delete i.listeners)}i.removeEventListener(r,s,e)})}function P(i,t,a){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=a;t.trim().split(Ae).forEach(function(r){if(e.once&&!Ie){var n=i.listeners,o=n===void 0?{}:n;s=function(){delete o[r][a],i.removeEventListener(r,s,e);for(var l=arguments.length,c=new Array(l),h=0;h<l;h++)c[h]=arguments[h];a.apply(i,c)},o[r]||(o[r]={}),o[r][a]&&i.removeEventListener(r,o[r][a],e),o[r][a]=s,i.listeners=o}i.addEventListener(r,s,e)})}function ot(i,t,a){var e;return I(Event)&&I(CustomEvent)?e=new CustomEvent(t,{detail:a,bubbles:!0,cancelable:!0}):(e=document.createEvent("CustomEvent"),e.initCustomEvent(t,!0,!0,a)),i.dispatchEvent(e)}function Oe(i){var t=i.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var jt=W.location,Ta=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function we(i){var t=i.match(Ta);return t!==null&&(t[1]!==jt.protocol||t[2]!==jt.hostname||t[3]!==jt.port)}function be(i){var t="timestamp=".concat(new Date().getTime());return i+(i.indexOf("?")===-1?"?":"&")+t}function ft(i){var t=i.rotate,a=i.scaleX,e=i.scaleY,s=i.translateX,r=i.translateY,n=[];g(s)&&s!==0&&n.push("translateX(".concat(s,"px)")),g(r)&&r!==0&&n.push("translateY(".concat(r,"px)")),g(t)&&t!==0&&n.push("rotate(".concat(t,"deg)")),g(a)&&a!==1&&n.push("scaleX(".concat(a,")")),g(e)&&e!==1&&n.push("scaleY(".concat(e,")"));var o=n.length?n.join(" "):"none";return{WebkitTransform:o,msTransform:o,transform:o}}function Sa(i){var t=ye({},i),a=[];return C(i,function(e,s){delete t[s],C(t,function(r){var n=Math.abs(e.startX-r.startX),o=Math.abs(e.startY-r.startY),d=Math.abs(e.endX-r.endX),l=Math.abs(e.endY-r.endY),c=Math.sqrt(n*n+o*o),h=Math.sqrt(d*d+l*l),u=(h-c)/c;a.push(u)})}),a.sort(function(e,s){return Math.abs(e)<Math.abs(s)}),a[0]}function Dt(i,t){var a=i.pageX,e=i.pageY,s={endX:a,endY:e};return t?s:ye({startX:a,startY:e},s)}function Aa(i){var t=0,a=0,e=0;return C(i,function(s){var r=s.startX,n=s.startY;t+=r,a+=n,e+=1}),t/=e,a/=e,{pageX:t,pageY:a}}function F(i){var t=i.aspectRatio,a=i.height,e=i.width,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",r=ve(e),n=ve(a);if(r&&n){var o=a*t;s==="contain"&&o>e||s==="cover"&&o<e?a=e/t:e=a*t}else r?a=e/t:n&&(e=a*t);return{width:e,height:a}}function Ia(i){var t=i.width,a=i.height,e=i.degree;if(e=Math.abs(e)%180,e===90)return{width:a,height:t};var s=e%90*Math.PI/180,r=Math.sin(s),n=Math.cos(s),o=t*n+a*r,d=t*r+a*n;return e>90?{width:d,height:o}:{width:o,height:d}}function Oa(i,t,a,e){var s=t.aspectRatio,r=t.naturalWidth,n=t.naturalHeight,o=t.rotate,d=o===void 0?0:o,l=t.scaleX,c=l===void 0?1:l,h=t.scaleY,u=h===void 0?1:h,m=a.aspectRatio,v=a.naturalWidth,x=a.naturalHeight,w=e.fillColor,N=w===void 0?"transparent":w,T=e.imageSmoothingEnabled,E=T===void 0?!0:T,X=e.imageSmoothingQuality,R=X===void 0?"low":X,p=e.maxWidth,b=p===void 0?1/0:p,M=e.maxHeight,k=M===void 0?1/0:M,Y=e.minWidth,G=Y===void 0?0:Y,Z=e.minHeight,$=Z===void 0?0:Z,j=document.createElement("canvas"),A=j.getContext("2d"),Q=F({aspectRatio:m,width:b,height:k}),vt=F({aspectRatio:m,width:G,height:$},"cover"),Tt=Math.min(Q.width,Math.max(vt.width,v)),St=Math.min(Q.height,Math.max(vt.height,x)),Jt=F({aspectRatio:s,width:b,height:k}),te=F({aspectRatio:s,width:G,height:$},"cover"),ee=Math.min(Jt.width,Math.max(te.width,r)),ae=Math.min(Jt.height,Math.max(te.height,n)),Le=[-ee/2,-ae/2,ee,ae];return j.width=nt(Tt),j.height=nt(St),A.fillStyle=N,A.fillRect(0,0,Tt,St),A.save(),A.translate(Tt/2,St/2),A.rotate(d*Math.PI/180),A.scale(c,u),A.imageSmoothingEnabled=E,A.imageSmoothingQuality=R,A.drawImage.apply(A,[i].concat(De(Le.map(function(_e){return Math.floor(nt(_e))})))),A.restore(),j}var Re=String.fromCharCode;function Ra(i,t,a){var e="";a+=t;for(var s=t;s<a;s+=1)e+=Re(i.getUint8(s));return e}var ka=/^data:.*,/;function Pa(i){var t=i.replace(ka,""),a=atob(t),e=new ArrayBuffer(a.length),s=new Uint8Array(e);return C(s,function(r,n){s[n]=a.charCodeAt(n)}),e}function La(i,t){for(var a=[],e=8192,s=new Uint8Array(i);s.length>0;)a.push(Re.apply(null,Se(s.subarray(0,e)))),s=s.subarray(e);return"data:".concat(t,";base64,").concat(btoa(a.join("")))}function _a(i){var t=new DataView(i),a;try{var e,s,r;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var n=t.byteLength,o=2;o+1<n;){if(t.getUint8(o)===255&&t.getUint8(o+1)===225){s=o;break}o+=1}if(s){var d=s+4,l=s+10;if(Ra(t,d,4)==="Exif"){var c=t.getUint16(l);if(e=c===18761,(e||c===19789)&&t.getUint16(l+2,e)===42){var h=t.getUint32(l+4,e);h>=8&&(r=l+h)}}}if(r){var u=t.getUint16(r,e),m,v;for(v=0;v<u;v+=1)if(m=r+v*12+2,t.getUint16(m,e)===274){m+=8,a=t.getUint16(m,e),t.setUint16(m,1,e);break}}}catch{a=1}return a}function Ba(i){var t=0,a=1,e=1;switch(i){case 2:a=-1;break;case 3:t=-180;break;case 4:e=-1;break;case 5:t=90,e=-1;break;case 6:t=90;break;case 7:t=90,a=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:a,scaleY:e}}var ja={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,a=this.options,e=this.container,s=this.cropper;S(s,O),z(t,O);var r={width:Math.max(e.offsetWidth,Number(a.minContainerWidth)||200),height:Math.max(e.offsetHeight,Number(a.minContainerHeight)||100)};this.containerData=r,q(s,{width:r.width,height:r.height}),S(t,O),z(s,O)},initCanvas:function(){var t=this.containerData,a=this.imageData,e=this.options.viewMode,s=Math.abs(a.rotate)%180===90,r=s?a.naturalHeight:a.naturalWidth,n=s?a.naturalWidth:a.naturalHeight,o=r/n,d=t.width,l=t.height;t.height*o>t.width?e===3?d=t.height*o:l=t.width/o:e===3?l=t.width/o:d=t.height*o;var c={aspectRatio:o,naturalWidth:r,naturalHeight:n,width:d,height:l};c.left=(t.width-d)/2,c.top=(t.height-l)/2,c.oldLeft=c.left,c.oldTop=c.top,this.canvasData=c,this.limited=e===1||e===2,this.limitCanvas(!0,!0),this.initialImageData=D({},a),this.initialCanvasData=D({},c)},limitCanvas:function(t,a){var e=this.options,s=this.containerData,r=this.canvasData,n=this.cropBoxData,o=e.viewMode,d=r.aspectRatio,l=this.cropped&&n;if(t){var c=Number(e.minCanvasWidth)||0,h=Number(e.minCanvasHeight)||0;o>1?(c=Math.max(c,s.width),h=Math.max(h,s.height),o===3&&(h*d>c?c=h*d:h=c/d)):o>0&&(c?c=Math.max(c,l?n.width:0):h?h=Math.max(h,l?n.height:0):l&&(c=n.width,h=n.height,h*d>c?c=h*d:h=c/d));var u=F({aspectRatio:d,width:c,height:h});c=u.width,h=u.height,r.minWidth=c,r.minHeight=h,r.maxWidth=1/0,r.maxHeight=1/0}if(a)if(o>(l?0:1)){var m=s.width-r.width,v=s.height-r.height;r.minLeft=Math.min(0,m),r.minTop=Math.min(0,v),r.maxLeft=Math.max(0,m),r.maxTop=Math.max(0,v),l&&this.limited&&(r.minLeft=Math.min(n.left,n.left+(n.width-r.width)),r.minTop=Math.min(n.top,n.top+(n.height-r.height)),r.maxLeft=n.left,r.maxTop=n.top,o===2&&(r.width>=s.width&&(r.minLeft=Math.min(0,m),r.maxLeft=Math.max(0,m)),r.height>=s.height&&(r.minTop=Math.min(0,v),r.maxTop=Math.max(0,v))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=s.width,r.maxTop=s.height},renderCanvas:function(t,a){var e=this.canvasData,s=this.imageData;if(a){var r=Ia({width:s.naturalWidth*Math.abs(s.scaleX||1),height:s.naturalHeight*Math.abs(s.scaleY||1),degree:s.rotate||0}),n=r.width,o=r.height,d=e.width*(n/e.naturalWidth),l=e.height*(o/e.naturalHeight);e.left-=(d-e.width)/2,e.top-=(l-e.height)/2,e.width=d,e.height=l,e.aspectRatio=n/o,e.naturalWidth=n,e.naturalHeight=o,this.limitCanvas(!0,!1)}(e.width>e.maxWidth||e.width<e.minWidth)&&(e.left=e.oldLeft),(e.height>e.maxHeight||e.height<e.minHeight)&&(e.top=e.oldTop),e.width=Math.min(Math.max(e.width,e.minWidth),e.maxWidth),e.height=Math.min(Math.max(e.height,e.minHeight),e.maxHeight),this.limitCanvas(!1,!0),e.left=Math.min(Math.max(e.left,e.minLeft),e.maxLeft),e.top=Math.min(Math.max(e.top,e.minTop),e.maxTop),e.oldLeft=e.left,e.oldTop=e.top,q(this.canvas,D({width:e.width,height:e.height},ft({translateX:e.left,translateY:e.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var a=this.canvasData,e=this.imageData,s=e.naturalWidth*(a.width/a.naturalWidth),r=e.naturalHeight*(a.height/a.naturalHeight);D(e,{width:s,height:r,left:(a.width-s)/2,top:(a.height-r)/2}),q(this.image,D({width:e.width,height:e.height},ft(D({translateX:e.left,translateY:e.top},e)))),t&&this.output()},initCropBox:function(){var t=this.options,a=this.canvasData,e=t.aspectRatio||t.initialAspectRatio,s=Number(t.autoCropArea)||.8,r={width:a.width,height:a.height};e&&(a.height*e>a.width?r.height=r.width/e:r.width=r.height*e),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*s),r.height=Math.max(r.minHeight,r.height*s),r.left=a.left+(a.width-r.width)/2,r.top=a.top+(a.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=D({},r)},limitCropBox:function(t,a){var e=this.options,s=this.containerData,r=this.canvasData,n=this.cropBoxData,o=this.limited,d=e.aspectRatio;if(t){var l=Number(e.minCropBoxWidth)||0,c=Number(e.minCropBoxHeight)||0,h=o?Math.min(s.width,r.width,r.width+r.left,s.width-r.left):s.width,u=o?Math.min(s.height,r.height,r.height+r.top,s.height-r.top):s.height;l=Math.min(l,s.width),c=Math.min(c,s.height),d&&(l&&c?c*d>l?c=l/d:l=c*d:l?c=l/d:c&&(l=c*d),u*d>h?u=h/d:h=u*d),n.minWidth=Math.min(l,h),n.minHeight=Math.min(c,u),n.maxWidth=h,n.maxHeight=u}a&&(o?(n.minLeft=Math.max(0,r.left),n.minTop=Math.max(0,r.top),n.maxLeft=Math.min(s.width,r.left+r.width)-n.width,n.maxTop=Math.min(s.height,r.top+r.height)-n.height):(n.minLeft=0,n.minTop=0,n.maxLeft=s.width-n.width,n.maxTop=s.height-n.height))},renderCropBox:function(){var t=this.options,a=this.containerData,e=this.cropBoxData;(e.width>e.maxWidth||e.width<e.minWidth)&&(e.left=e.oldLeft),(e.height>e.maxHeight||e.height<e.minHeight)&&(e.top=e.oldTop),e.width=Math.min(Math.max(e.width,e.minWidth),e.maxWidth),e.height=Math.min(Math.max(e.height,e.minHeight),e.maxHeight),this.limitCropBox(!1,!0),e.left=Math.min(Math.max(e.left,e.minLeft),e.maxLeft),e.top=Math.min(Math.max(e.top,e.minTop),e.maxTop),e.oldLeft=e.left,e.oldTop=e.top,t.movable&&t.cropBoxMovable&&gt(this.face,mt,e.width>=a.width&&e.height>=a.height?Ce:Zt),q(this.cropBox,D({width:e.width,height:e.height},ft({translateX:e.left,translateY:e.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),ot(this.element,zt,this.getData())}},Ua={initPreview:function(){var t=this.element,a=this.crossOrigin,e=this.options.preview,s=a?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",n=document.createElement("img");if(a&&(n.crossOrigin=a),n.src=s,n.alt=r,this.viewBox.appendChild(n),this.viewBoxImage=n,!!e){var o=e;typeof e=="string"?o=t.ownerDocument.querySelectorAll(e):e.querySelector&&(o=[e]),this.previews=o,C(o,function(d){var l=document.createElement("img");gt(d,yt,{width:d.offsetWidth,height:d.offsetHeight,html:d.innerHTML}),a&&(l.crossOrigin=a),l.src=s,l.alt=r,l.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',d.innerHTML="",d.appendChild(l)})}},resetPreview:function(){C(this.previews,function(t){var a=Vt(t,yt);q(t,{width:a.width,height:a.height}),t.innerHTML=a.html,Ma(t,yt)})},preview:function(){var t=this.imageData,a=this.canvasData,e=this.cropBoxData,s=e.width,r=e.height,n=t.width,o=t.height,d=e.left-a.left-t.left,l=e.top-a.top-t.top;!this.cropped||this.disabled||(q(this.viewBoxImage,D({width:n,height:o},ft(D({translateX:-d,translateY:-l},t)))),C(this.previews,function(c){var h=Vt(c,yt),u=h.width,m=h.height,v=u,x=m,w=1;s&&(w=u/s,x=r*w),r&&x>m&&(w=m/r,v=s*w,x=m),q(c,{width:v,height:x}),q(c.getElementsByTagName("img")[0],D({width:n*w,height:o*w},ft(D({translateX:-d*w,translateY:-l*w},t))))}))}},Ha={bind:function(){var t=this.element,a=this.options,e=this.cropper;I(a.cropstart)&&P(t,Wt,a.cropstart),I(a.cropmove)&&P(t,Yt,a.cropmove),I(a.cropend)&&P(t,Xt,a.cropend),I(a.crop)&&P(t,zt,a.crop),I(a.zoom)&&P(t,$t,a.zoom),P(e,ce,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&P(e,fe,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&P(e,he,this.onDblclick=this.dblclick.bind(this)),P(t.ownerDocument,le,this.onCropMove=this.cropMove.bind(this)),P(t.ownerDocument,de,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&P(window,pe,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,a=this.options,e=this.cropper;I(a.cropstart)&&L(t,Wt,a.cropstart),I(a.cropmove)&&L(t,Yt,a.cropmove),I(a.cropend)&&L(t,Xt,a.cropend),I(a.crop)&&L(t,zt,a.crop),I(a.zoom)&&L(t,$t,a.zoom),L(e,ce,this.onCropStart),a.zoomable&&a.zoomOnWheel&&L(e,fe,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&L(e,he,this.onDblclick),L(t.ownerDocument,le,this.onCropMove),L(t.ownerDocument,de,this.onCropEnd),a.responsive&&L(window,pe,this.onResize)}},za={resize:function(){var t=this.options,a=this.container,e=this.containerData,s=Number(t.minContainerWidth)||ga,r=Number(t.minContainerHeight)||va;if(!(this.disabled||e.width<=s||e.height<=r)){var n=a.offsetWidth/e.width;if(n!==1||a.offsetHeight!==e.height){var o,d;t.restore&&(o=this.getCanvasData(),d=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(C(o,function(l,c){o[c]=l*n})),this.setCropBoxData(C(d,function(l,c){d[c]=l*n})))}}},dblclick:function(){this.disabled||this.options.dragMode===Te||this.setDragMode(Ca(this.dragBox,Ut)?Me:Qt)},wheel:function(t){var a=this,e=Number(this.options.wheelZoomRatio)||.1,s=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){a.wheeling=!1},50),t.deltaY?s=t.deltaY>0?1:-1:t.wheelDelta?s=-t.wheelDelta/120:t.detail&&(s=t.detail>0?1:-1),this.zoom(-s*e,t)))},cropStart:function(t){var a=t.buttons,e=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(g(a)&&a!==1||g(e)&&e!==0||t.ctrlKey))){var s=this.options,r=this.pointers,n;t.changedTouches?C(t.changedTouches,function(o){r[o.identifier]=Dt(o)}):r[t.pointerId||0]=Dt(t),Object.keys(r).length>1&&s.zoomable&&s.zoomOnTouch?n=Ne:n=Vt(t.target,mt),ua.test(n)&&ot(this.element,Wt,{originalEvent:t,action:n})!==!1&&(t.preventDefault(),this.action=n,this.cropping=!1,n===Ee&&(this.cropping=!0,S(this.dragBox,Ct)))}},cropMove:function(t){var a=this.action;if(!(this.disabled||!a)){var e=this.pointers;t.preventDefault(),ot(this.element,Yt,{originalEvent:t,action:a})!==!1&&(t.changedTouches?C(t.changedTouches,function(s){D(e[s.identifier]||{},Dt(s,!0))}):D(e[t.pointerId||0]||{},Dt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var a=this.action,e=this.pointers;t.changedTouches?C(t.changedTouches,function(s){delete e[s.identifier]}):delete e[t.pointerId||0],a&&(t.preventDefault(),Object.keys(e).length||(this.action=""),this.cropping&&(this.cropping=!1,st(this.dragBox,Ct,this.cropped&&this.options.modal)),ot(this.element,Xt,{originalEvent:t,action:a}))}}},Xa={change:function(t){var a=this.options,e=this.canvasData,s=this.containerData,r=this.cropBoxData,n=this.pointers,o=this.action,d=a.aspectRatio,l=r.left,c=r.top,h=r.width,u=r.height,m=l+h,v=c+u,x=0,w=0,N=s.width,T=s.height,E=!0,X;!d&&t.shiftKey&&(d=h&&u?h/u:1),this.limited&&(x=r.minLeft,w=r.minTop,N=x+Math.min(s.width,e.width,e.left+e.width),T=w+Math.min(s.height,e.height,e.top+e.height));var R=n[Object.keys(n)[0]],p={x:R.endX-R.startX,y:R.endY-R.startY},b=function(k){switch(k){case K:m+p.x>N&&(p.x=N-m);break;case J:l+p.x<x&&(p.x=x-l);break;case V:c+p.y<w&&(p.y=w-c);break;case et:v+p.y>T&&(p.y=T-v);break}};switch(o){case Zt:l+=p.x,c+=p.y;break;case K:if(p.x>=0&&(m>=N||d&&(c<=w||v>=T))){E=!1;break}b(K),h+=p.x,h<0&&(o=J,h=-h,l-=h),d&&(u=h/d,c+=(r.height-u)/2);break;case V:if(p.y<=0&&(c<=w||d&&(l<=x||m>=N))){E=!1;break}b(V),u-=p.y,c+=p.y,u<0&&(o=et,u=-u,c-=u),d&&(h=u*d,l+=(r.width-h)/2);break;case J:if(p.x<=0&&(l<=x||d&&(c<=w||v>=T))){E=!1;break}b(J),h-=p.x,l+=p.x,h<0&&(o=K,h=-h,l-=h),d&&(u=h/d,c+=(r.height-u)/2);break;case et:if(p.y>=0&&(v>=T||d&&(l<=x||m>=N))){E=!1;break}b(et),u+=p.y,u<0&&(o=V,u=-u,c-=u),d&&(h=u*d,l+=(r.width-h)/2);break;case ct:if(d){if(p.y<=0&&(c<=w||m>=N)){E=!1;break}b(V),u-=p.y,c+=p.y,h=u*d}else b(V),b(K),p.x>=0?m<N?h+=p.x:p.y<=0&&c<=w&&(E=!1):h+=p.x,p.y<=0?c>w&&(u-=p.y,c+=p.y):(u-=p.y,c+=p.y);h<0&&u<0?(o=ut,u=-u,h=-h,c-=u,l-=h):h<0?(o=lt,h=-h,l-=h):u<0&&(o=dt,u=-u,c-=u);break;case lt:if(d){if(p.y<=0&&(c<=w||l<=x)){E=!1;break}b(V),u-=p.y,c+=p.y,h=u*d,l+=r.width-h}else b(V),b(J),p.x<=0?l>x?(h-=p.x,l+=p.x):p.y<=0&&c<=w&&(E=!1):(h-=p.x,l+=p.x),p.y<=0?c>w&&(u-=p.y,c+=p.y):(u-=p.y,c+=p.y);h<0&&u<0?(o=dt,u=-u,h=-h,c-=u,l-=h):h<0?(o=ct,h=-h,l-=h):u<0&&(o=ut,u=-u,c-=u);break;case ut:if(d){if(p.x<=0&&(l<=x||v>=T)){E=!1;break}b(J),h-=p.x,l+=p.x,u=h/d}else b(et),b(J),p.x<=0?l>x?(h-=p.x,l+=p.x):p.y>=0&&v>=T&&(E=!1):(h-=p.x,l+=p.x),p.y>=0?v<T&&(u+=p.y):u+=p.y;h<0&&u<0?(o=ct,u=-u,h=-h,c-=u,l-=h):h<0?(o=dt,h=-h,l-=h):u<0&&(o=lt,u=-u,c-=u);break;case dt:if(d){if(p.x>=0&&(m>=N||v>=T)){E=!1;break}b(K),h+=p.x,u=h/d}else b(et),b(K),p.x>=0?m<N?h+=p.x:p.y>=0&&v>=T&&(E=!1):h+=p.x,p.y>=0?v<T&&(u+=p.y):u+=p.y;h<0&&u<0?(o=lt,u=-u,h=-h,c-=u,l-=h):h<0?(o=ut,h=-h,l-=h):u<0&&(o=ct,u=-u,c-=u);break;case Ce:this.move(p.x,p.y),E=!1;break;case Ne:this.zoom(Sa(n),t),E=!1;break;case Ee:if(!p.x||!p.y){E=!1;break}X=Oe(this.cropper),l=R.startX-X.left,c=R.startY-X.top,h=r.minWidth,u=r.minHeight,p.x>0?o=p.y>0?dt:ct:p.x<0&&(l-=h,o=p.y>0?ut:lt),p.y<0&&(c-=u),this.cropped||(z(this.cropBox,O),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}E&&(r.width=h,r.height=u,r.left=l,r.top=c,this.action=o,this.renderCropBox()),C(n,function(M){M.startX=M.endX,M.startY=M.endY})}},Ya={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&S(this.dragBox,Ct),z(this.cropBox,O),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=D({},this.initialImageData),this.canvasData=D({},this.initialCanvasData),this.cropBoxData=D({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(D(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),z(this.dragBox,Ct),S(this.cropBox,O)),this},replace:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),a?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,C(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,z(this.cropper,ne)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,S(this.cropper,ne)),this},destroy:function(){var t=this.element;return t[y]?(t[y]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,e=this.canvasData,s=e.left,r=e.top;return this.moveTo(Bt(t)?t:s+Number(t),Bt(a)?a:r+Number(a))},moveTo:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,e=this.canvasData,s=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.movable&&(g(t)&&(e.left=t,s=!0),g(a)&&(e.top=a,s=!0),s&&this.renderCanvas(!0)),this},zoom:function(t,a){var e=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(e.width*t/e.naturalWidth,null,a)},zoomTo:function(t,a,e){var s=this.options,r=this.canvasData,n=r.width,o=r.height,d=r.naturalWidth,l=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&s.zoomable){var c=d*t,h=l*t;if(ot(this.element,$t,{ratio:t,oldRatio:n/d,originalEvent:e})===!1)return this;if(e){var u=this.pointers,m=Oe(this.cropper),v=u&&Object.keys(u).length?Aa(u):{pageX:e.pageX,pageY:e.pageY};r.left-=(c-n)*((v.pageX-m.left-r.left)/n),r.top-=(h-o)*((v.pageY-m.top-r.top)/o)}else rt(a)&&g(a.x)&&g(a.y)?(r.left-=(c-n)*((a.x-r.left)/n),r.top-=(h-o)*((a.y-r.top)/o)):(r.left-=(c-n)/2,r.top-=(h-o)/2);r.width=c,r.height=h,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),g(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var a=this.imageData.scaleY;return this.scale(t,g(a)?a:1)},scaleY:function(t){var a=this.imageData.scaleX;return this.scale(g(a)?a:1,t)},scale:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,e=this.imageData,s=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.scalable&&(g(t)&&(e.scaleX=t,s=!0),g(a)&&(e.scaleY=a,s=!0),s&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=this.options,e=this.imageData,s=this.canvasData,r=this.cropBoxData,n;if(this.ready&&this.cropped){n={x:r.left-s.left,y:r.top-s.top,width:r.width,height:r.height};var o=e.width/e.naturalWidth;if(C(n,function(c,h){n[h]=c/o}),t){var d=Math.round(n.y+n.height),l=Math.round(n.x+n.width);n.x=Math.round(n.x),n.y=Math.round(n.y),n.width=l-n.x,n.height=d-n.y}}else n={x:0,y:0,width:0,height:0};return a.rotatable&&(n.rotate=e.rotate||0),a.scalable&&(n.scaleX=e.scaleX||1,n.scaleY=e.scaleY||1),n},setData:function(t){var a=this.options,e=this.imageData,s=this.canvasData,r={};if(this.ready&&!this.disabled&&rt(t)){var n=!1;a.rotatable&&g(t.rotate)&&t.rotate!==e.rotate&&(e.rotate=t.rotate,n=!0),a.scalable&&(g(t.scaleX)&&t.scaleX!==e.scaleX&&(e.scaleX=t.scaleX,n=!0),g(t.scaleY)&&t.scaleY!==e.scaleY&&(e.scaleY=t.scaleY,n=!0)),n&&this.renderCanvas(!0,!0);var o=e.width/e.naturalWidth;g(t.x)&&(r.left=t.x*o+s.left),g(t.y)&&(r.top=t.y*o+s.top),g(t.width)&&(r.width=t.width*o),g(t.height)&&(r.height=t.height*o),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?D({},this.containerData):{}},getImageData:function(){return this.sized?D({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,a={};return this.ready&&C(["left","top","width","height","naturalWidth","naturalHeight"],function(e){a[e]=t[e]}),a},setCanvasData:function(t){var a=this.canvasData,e=a.aspectRatio;return this.ready&&!this.disabled&&rt(t)&&(g(t.left)&&(a.left=t.left),g(t.top)&&(a.top=t.top),g(t.width)?(a.width=t.width,a.height=t.width/e):g(t.height)&&(a.height=t.height,a.width=t.height*e),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,a;return this.ready&&this.cropped&&(a={left:t.left,top:t.top,width:t.width,height:t.height}),a||{}},setCropBoxData:function(t){var a=this.cropBoxData,e=this.options.aspectRatio,s,r;return this.ready&&this.cropped&&!this.disabled&&rt(t)&&(g(t.left)&&(a.left=t.left),g(t.top)&&(a.top=t.top),g(t.width)&&t.width!==a.width&&(s=!0,a.width=t.width),g(t.height)&&t.height!==a.height&&(r=!0,a.height=t.height),e&&(s?a.height=a.width/e:r&&(a.width=a.height*e)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var a=this.canvasData,e=Oa(this.image,this.imageData,a,t);if(!this.cropped)return e;var s=this.getData(),r=s.x,n=s.y,o=s.width,d=s.height,l=e.width/Math.floor(a.naturalWidth);l!==1&&(r*=l,n*=l,o*=l,d*=l);var c=o/d,h=F({aspectRatio:c,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),u=F({aspectRatio:c,width:t.minWidth||0,height:t.minHeight||0},"cover"),m=F({aspectRatio:c,width:t.width||(l!==1?e.width:o),height:t.height||(l!==1?e.height:d)}),v=m.width,x=m.height;v=Math.min(h.width,Math.max(u.width,v)),x=Math.min(h.height,Math.max(u.height,x));var w=document.createElement("canvas"),N=w.getContext("2d");w.width=nt(v),w.height=nt(x),N.fillStyle=t.fillColor||"transparent",N.fillRect(0,0,v,x);var T=t.imageSmoothingEnabled,E=T===void 0?!0:T,X=t.imageSmoothingQuality;N.imageSmoothingEnabled=E,X&&(N.imageSmoothingQuality=X);var R=e.width,p=e.height,b=r,M=n,k,Y,G,Z,$,j;b<=-o||b>R?(b=0,k=0,G=0,$=0):b<=0?(G=-b,b=0,k=Math.min(R,o+b),$=k):b<=R&&(G=0,k=Math.min(o,R-b),$=k),k<=0||M<=-d||M>p?(M=0,Y=0,Z=0,j=0):M<=0?(Z=-M,M=0,Y=Math.min(p,d+M),j=Y):M<=p&&(Z=0,Y=Math.min(d,p-M),j=Y);var A=[b,M,k,Y];if($>0&&j>0){var Q=v/o;A.push(G*Q,Z*Q,$*Q,j*Q)}return N.drawImage.apply(N,[e].concat(De(A.map(function(vt){return Math.floor(nt(vt))})))),w},setAspectRatio:function(t){var a=this.options;return!this.disabled&&!Bt(t)&&(a.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var a=this.options,e=this.dragBox,s=this.face;if(this.ready&&!this.disabled){var r=t===Qt,n=a.movable&&t===Me;t=r||n?t:Te,a.dragMode=t,gt(e,mt,t),st(e,Ut,r),st(e,Ht,n),a.cropBoxMovable||(gt(s,mt,t),st(s,Ut,r),st(s,Ht,n))}return this}},Wa=W.Cropper,ke=(function(){function i(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(aa(this,i),!t||!ma.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=D({},ge,rt(a)&&a),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return ia(i,[{key:"init",value:function(){var a=this.element,e=a.tagName.toLowerCase(),s;if(!a[y]){if(a[y]=this,e==="img"){if(this.isImg=!0,s=a.getAttribute("src")||"",this.originalUrl=s,!s)return;s=a.src}else e==="canvas"&&window.HTMLCanvasElement&&(s=a.toDataURL());this.load(s)}}},{key:"load",value:function(a){var e=this;if(a){this.url=a,this.imageData={};var s=this.element,r=this.options;if(!r.rotatable&&!r.scalable&&(r.checkOrientation=!1),!r.checkOrientation||!window.ArrayBuffer){this.clone();return}if(pa.test(a)){fa.test(a)?this.read(Pa(a)):this.clone();return}var n=new XMLHttpRequest,o=this.clone.bind(this);this.reloading=!0,this.xhr=n,n.onabort=o,n.onerror=o,n.ontimeout=o,n.onprogress=function(){n.getResponseHeader("content-type")!==me&&n.abort()},n.onload=function(){e.read(n.response)},n.onloadend=function(){e.reloading=!1,e.xhr=null},r.checkCrossOrigin&&we(a)&&s.crossOrigin&&(a=be(a)),n.open("GET",a),n.responseType="arraybuffer",n.withCredentials=s.crossOrigin==="use-credentials",n.send()}}},{key:"read",value:function(a){var e=this.options,s=this.imageData,r=_a(a),n=0,o=1,d=1;if(r>1){this.url=La(a,me);var l=Ba(r);n=l.rotate,o=l.scaleX,d=l.scaleY}e.rotatable&&(s.rotate=n),e.scalable&&(s.scaleX=o,s.scaleY=d),this.clone()}},{key:"clone",value:function(){var a=this.element,e=this.url,s=a.crossOrigin,r=e;this.options.checkCrossOrigin&&we(e)&&(s||(s="anonymous"),r=be(e)),this.crossOrigin=s,this.crossOriginUrl=r;var n=document.createElement("img");s&&(n.crossOrigin=s),n.src=r||e,n.alt=a.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),S(n,oe),a.parentNode.insertBefore(n,a.nextSibling)}},{key:"start",value:function(){var a=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var s=W.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(W.navigator.userAgent),r=function(l,c){D(a.imageData,{naturalWidth:l,naturalHeight:c,aspectRatio:l/c}),a.sizing=!1,a.sized=!0,a.build()};if(e.naturalWidth&&!s){r(e.naturalWidth,e.naturalHeight);return}var n=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){r(n.width,n.height),s||o.removeChild(n)},n.src=e.src,s||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(n))}},{key:"stop",value:function(){var a=this.image;a.onload=null,a.onerror=null,a.parentNode.removeChild(a),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var a=this.element,e=this.options,s=this.image,r=a.parentNode,n=document.createElement("div");n.innerHTML=wa;var o=n.querySelector(".".concat(y,"-container")),d=o.querySelector(".".concat(y,"-canvas")),l=o.querySelector(".".concat(y,"-drag-box")),c=o.querySelector(".".concat(y,"-crop-box")),h=c.querySelector(".".concat(y,"-face"));this.container=r,this.cropper=o,this.canvas=d,this.dragBox=l,this.cropBox=c,this.viewBox=o.querySelector(".".concat(y,"-view-box")),this.face=h,d.appendChild(s),S(a,O),r.insertBefore(o,a.nextSibling),this.isImg||z(s,oe),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,S(c,O),e.guides||S(c.getElementsByClassName("".concat(y,"-dashed")),O),e.center||S(c.getElementsByClassName("".concat(y,"-center")),O),e.background&&S(o,"".concat(y,"-bg")),e.highlight||S(h,ha),e.cropBoxMovable&&(S(h,Ht),gt(h,mt,Zt)),e.cropBoxResizable||(S(c.getElementsByClassName("".concat(y,"-line")),O),S(c.getElementsByClassName("".concat(y,"-point")),O)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),I(e.ready)&&P(a,ue,e.ready,{once:!0}),ot(a,ue)}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),z(this.element,O))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=Wa,i}},{key:"setDefaults",value:function(a){D(ge,rt(a)&&a)}}]),i})();D(ke.prototype,ja,Ua,Ha,za,Xa,Ya);const $a="shared.imageCropper",xe=Nt.encloseNamespace($a),Va=/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/,qa=i=>{const t=i.match(Va);if(t)return t[1]};Pe.defaultProps={popupSize:"lg"};function Pe(i){const[t,a]=it.useState(!1),[e,s]=it.useState(!1),r=it.useRef(null),n=it.useRef(null),o=()=>{if(!t)return;const d=n.current.getCroppedCanvas().toDataURL(qa(i.src));s(!0),i.onClickCrop(d,i.closePopup)};return it.useEffect(()=>{const d=new Image;d.src=i.src;const l=r.current.offsetWidth/d.width,c=pt[i.imageType],h={viewMode:2,autoCropArea:1,ready:()=>a(!0)};return c&&(h.minCropBoxWidth=c.width*l,h.minCropBoxHeight=c.height*l,h.aspectRatio=c.width/c.height),n.current=new ke(r.current,h),()=>{n.current.destroy()}},[]),f.jsxs(je,{title:xe("title"),closePopup:i.closePopup,size:i.popupSize,children:[f.jsx("div",{children:f.jsx("img",{src:i.src,alt:i.alt,ref:r,className:"img img-fluid"})}),f.jsxs(At,{children:[f.jsx(At.Cancel,{onClick:i.closePopup}),f.jsx(At.Submit,{onClick:o,text:xe("crop"),variant:"dark",showSpinner:e})]})]})}const Fa={renderCropper(i){const t=Ue.createRoot(document.getElementById("dialog-region"));t.render(f.jsx(Pe,{...i,closePopup:()=>t.unmount()}))}},qt={onFileSelect(i,t,a,e){if(!t||!t.length)return;if(t.length>1){alert("Please only select one file");return}const s=t[0];if(!s.type.startsWith("image/")){alert("Please select an image file");return}const r=new FileReader;r.addEventListener("load",()=>qt.onReaderLoad(r,i,a,e)),r.readAsDataURL(s)},onReaderLoad(i,t,a,e){const s=new Image;s.src=i.result;const r=(e==null?void 0:e.width)??pt[t].width,n=(e==null?void 0:e.height)??pt[t].height;s.addEventListener("load",()=>{qt.isImageValid(t,s,e)&&He.isFunction(a)?a(s):alert(`Image too small: minimum dimensions are ${r} x ${n}`)})},isImageValid(i,t,a){const e=(a==null?void 0:a.width)??pt[i].width,s=(a==null?void 0:a.height)??pt[i].height;return!(e&&t.width<e||s&&t.height<s)},mapImageTypeToString(i){switch(i){case B.Avatars:return"avatars";case B.Thumbnails:return"thumbnails";case B.Logos:return"logos";case B.Covers:return"covers";case B.Posters:return"posters";case B.TallPosters:return"tallposters";case B.HeroBanners:return"herobanners";case B.None:default:return""}}},Ga="_profileImage_24nro_1",Za={profileImage:Ga},Qa="settings.editAvatar";function Ka(i,t){return Ye.createUrl(We.safeUrlConcat(i,`/v1/profile-images?initials=${t}`),{size:$e.Medium})}function Ja(i){return i.split(",")[1]}function ti(i){var r,n;const t=it.useRef(null),a=(r=i.user.avatar)!=null&&r.url?i.user.avatar.url:Ka(i.imageCdnUrl,ze.getInitials(i.user.name,i.user.surname));function e(){t.current.value=null,t.current.click(null)}function s(o){!o||!o[0]||qt.onFileSelect(B.Avatars,o,d=>{Fa.renderCropper({src:d.src,alt:"",onClickCrop:(l,c)=>i.onSelectImage(Ja(l),c),imageType:B.Avatars})})}return f.jsx(Xe.Provider,{value:Qa,children:f.jsxs("div",{className:"col-auto form-group d-flex flex-column align-items-center ps-4",children:[f.jsx("label",{className:"align-self-start",children:f.jsx(It,{phrase:"profileImage"})}),f.jsx("img",{className:`img img-fluid rounded ${Za.profileImage} mb-2`,alt:"User avatar",src:a}),f.jsx("button",{className:"btn btn-outline-dark px-3 text-center",onClick:e,children:f.jsx(It,{phrase:"uploadImage"})}),f.jsx("input",{type:"file",className:"file-select d-none",multiple:!1,accept:"image/jpg,image/jpeg,image/png",ref:t,onChange:o=>s(o.target.files)}),!!((n=i.user.avatar)!=null&&n.url)&&f.jsx("button",{className:"btn btn-link text-center",onClick:i.onClickRemoveImage,children:f.jsx(It,{phrase:"removeImage"})})]})})}const ei="settings.editProfileDetailsForm",at=Nt.encloseNamespace(ei),ai=ht.object().shape({firstName:ht.string().max(255,()=>at("nameExceeds")).required(()=>at("nameRequired")).default("").trim(),surname:ht.string().max(255,()=>at("surnameExceeds")).required(()=>at("surnameRequired")).default("").trim(),username:ht.string().max(255,()=>at("usernameExceeds")).default("").trim(),displayName:ht.string().max(255,()=>at("displayNameExceeds")).default("").trim()}),ii="settings.editProfileDetailsForm",_=Nt.encloseNamespace(ii);function ri(i){var t;return f.jsx(Je,{initialValues:{firstName:i.user.name,surname:i.user.surname,username:i.user.username,displayName:((t=i.user.metadata)==null?void 0:t.displayName)??""},validationSchema:ai,onSubmit:i.onClickSave,children:f.jsxs(Ve,{children:[f.jsx(bt,{label:_("firstName"),type:"text",name:"firstName",id:"firstName",placeholder:_("firstNamePlaceholder"),autoFocus:!0,showRequiredStar:!0}),f.jsx(bt,{label:_("lastName"),type:"text",name:"surname",id:"surname",placeholder:_("lastNamePlaceholder"),showRequiredStar:!0}),f.jsx(bt,{label:_("displayName"),type:"text",name:"displayName",id:"displayName",placeholder:_("displayNamePlaceholder"),infoTooltip:_("displayNameTooltip")}),f.jsx(bt,{label:_("username"),type:"text",name:"username",id:"username",placeholder:_("usernamePlaceholder"),showRequiredStar:!0,disabled:!0,infoTooltip:_("usernameTooltip")}),f.jsx(Ke,{variant:"dark",submitText:_("saveChanges"),isNew:!1})]})})}const si="_partialLabel_1r06u_1",ni="_partialInput_1r06u_6",oi="_partialSubmit_1r06u_10",hi="_partialAvatar_1r06u_14",ci="_partialUploadImage_1r06u_18",U={partialLabel:si,partialInput:ni,partialSubmit:oi,partialAvatar:hi,partialUploadImage:ci};function li(){return f.jsxs("div",{className:"row g-0",children:[f.jsxs("div",{className:"col-4",children:[f.jsxs("div",{className:"form-group",children:[f.jsx("div",{className:`partial-loading-background ${U.partialLabel}`}),f.jsx("div",{className:`partial-loading-background ${U.partialInput}`})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("div",{className:`partial-loading-background ${U.partialLabel}`}),f.jsx("div",{className:`partial-loading-background ${U.partialInput}`})]}),f.jsxs("div",{className:"form-group",children:[f.jsx("div",{className:`partial-loading-background ${U.partialLabel}`}),f.jsx("div",{className:`partial-loading-background ${U.partialInput}`})]}),f.jsx("div",{className:`partial-loading-background ${U.partialSubmit}`})]}),f.jsxs("div",{className:"form-group d-flex flex-column align-items-center ps-4",children:[f.jsx("div",{className:`partial-loading-background align-self-start ${U.partialLabel}`}),f.jsx("div",{className:`partial-loading-background mb-2 ${U.partialAvatar}`}),f.jsx("div",{className:`partial-loading-background mx-3 ${U.partialUploadImage}`})]})]})}const di="settings.profileDetails",H=Nt.encloseNamespace(di);function Ei(){const i=qe(),t=Fe(),a=Ot(Ze.currentUser()),e=Ot(a.data&&xt.getUser(a.data.id)),s=Ot(Qe.config());Ge({title:H("heading")});function r(l,c){var u,m;const h={firstName:l.firstName,lastName:l.surname,displayName:l.displayName||null,jobTitle:((m=(u=e.data.userProfile)==null?void 0:u.metadata)==null?void 0:m.jobTitle)||""};wt(i,xt.updateUser(h,()=>{Rt.logUserAction(l,{location:_t.Settings,actionType:Lt.Edit,workflowPhase:Pt.Complete,entity:kt.User}),t.success(H("success"))},()=>{t.error(H("error"))},c))}function n(l,c){wt(i,ea.uploadBase64Image(B.Avatars,l,h=>{o(h,c)},()=>{t.error(H("avatarUploadError"))}))}function o(l,c){wt(i,xt.updateAvatar(l.id,a.data.id,()=>{Rt.logUserAction({id:a.data.id,avatarId:l.id,avatarUrl:l.location},{actionType:Lt.Associate,workflowPhase:Pt.Complete,location:_t.Settings,entity:kt.User,descriptor:ie.Avatar}),c(),t.success(H("avatarUploadSuccess"))},()=>{t.error(H("avatarUploadError"))}))}function d(){wt(i,xt.deleteAvatar(e.data.avatar.id,a.data.id,()=>{Rt.logUserAction({id:a.data.id,avatarId:e.data.avatar.id},{actionType:Lt.Dissociate,workflowPhase:Pt.Complete,location:_t.Settings,entity:kt.User,descriptor:ie.Avatar}),t.success(H("avatarDeleteSuccess"))},()=>{t.error(H("avatarDeleteError"))}))}return f.jsx(ta,{heading:H("heading"),breadcrumbs:[H("breadcrumb")],children:a.data&&e.data&&s.data?f.jsxs("div",{className:"row g-0",children:[f.jsx("div",{className:"col-4",children:f.jsx(ri,{user:e.data,onClickSave:r})}),f.jsx(ti,{user:e.data,onSelectImage:n,onClickRemoveImage:d,imageCdnUrl:s.data.imageCdnUrl})]}):f.jsx(li,{})})}export{Ei as ProfileDetailsView};
10
- //# sourceMappingURL=BQQ9SPei.chunk.js.map