@clickview/library-editor 1.1.23-rc.3 → 1.1.23

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 (392) hide show
  1. package/dist/css/1.chunk.css.map +1 -1
  2. package/dist/css/10.chunk.css.map +1 -1
  3. package/dist/css/11.chunk.css.map +1 -1
  4. package/dist/css/12.chunk.css.map +1 -1
  5. package/dist/css/13.chunk.css.map +1 -1
  6. package/dist/css/14.chunk.css.map +1 -1
  7. package/dist/css/16.chunk.css.map +1 -1
  8. package/dist/css/17.chunk.css.map +1 -1
  9. package/dist/css/18.chunk.css.map +1 -1
  10. package/dist/css/2.chunk.css.map +1 -1
  11. package/dist/css/21.chunk.css.map +1 -1
  12. package/dist/css/22.chunk.css.map +1 -1
  13. package/dist/css/23.chunk.css.map +1 -1
  14. package/dist/css/25.chunk.css.map +1 -1
  15. package/dist/css/26.chunk.css.map +1 -1
  16. package/dist/css/28.chunk.css.map +1 -1
  17. package/dist/css/29.chunk.css.map +1 -1
  18. package/dist/css/3.chunk.css.map +1 -1
  19. package/dist/css/30.chunk.css.map +1 -1
  20. package/dist/css/31.chunk.css.map +1 -1
  21. package/dist/css/32.chunk.css.map +1 -1
  22. package/dist/css/33.chunk.css.map +1 -1
  23. package/dist/css/34.chunk.css.map +1 -1
  24. package/dist/css/35.chunk.css.map +1 -1
  25. package/dist/css/36.chunk.css.map +1 -1
  26. package/dist/css/37.chunk.css.map +1 -1
  27. package/dist/css/38.chunk.css.map +1 -1
  28. package/dist/css/40.chunk.css.map +1 -1
  29. package/dist/css/41.chunk.css.map +1 -1
  30. package/dist/css/42.chunk.css.map +1 -1
  31. package/dist/css/43.chunk.css.map +1 -1
  32. package/dist/css/44.chunk.css.map +1 -1
  33. package/dist/css/45.chunk.css.map +1 -1
  34. package/dist/css/46.chunk.css.map +1 -1
  35. package/dist/css/47.chunk.css.map +1 -1
  36. package/dist/css/48.chunk.css.map +1 -1
  37. package/dist/css/49.chunk.css.map +1 -1
  38. package/dist/css/50.chunk.css.map +1 -1
  39. package/dist/css/51.chunk.css.map +1 -1
  40. package/dist/css/52.chunk.css.map +1 -1
  41. package/dist/css/55.chunk.css.map +1 -1
  42. package/dist/css/56.chunk.css.map +1 -1
  43. package/dist/css/58.chunk.css.map +1 -1
  44. package/dist/css/59.chunk.css.map +1 -1
  45. package/dist/css/6.chunk.css.map +1 -1
  46. package/dist/css/60.chunk.css.map +1 -1
  47. package/dist/css/62.chunk.css.map +1 -1
  48. package/dist/css/63.chunk.css.map +1 -1
  49. package/dist/css/67.chunk.css.map +1 -1
  50. package/dist/css/68.chunk.css.map +1 -1
  51. package/dist/css/69.chunk.css.map +1 -1
  52. package/dist/css/7.chunk.css.map +1 -1
  53. package/dist/css/70.chunk.css.map +1 -1
  54. package/dist/css/71.chunk.css.map +1 -1
  55. package/dist/css/72.chunk.css.map +1 -1
  56. package/dist/css/73.chunk.css.map +1 -1
  57. package/dist/css/74.chunk.css.map +1 -1
  58. package/dist/css/75.chunk.css.map +1 -1
  59. package/dist/css/76.chunk.css.map +1 -1
  60. package/dist/css/8.chunk.css.map +1 -1
  61. package/dist/css/library-editor-app.css.map +1 -1
  62. package/dist/scripts/{0-2765595d0a.chunk.js → 0-09e1e33a5c.chunk.js} +1 -1
  63. package/dist/scripts/0.chunk.js +1 -1
  64. package/dist/scripts/0.chunk.js.map +1 -1
  65. package/dist/scripts/{1-b6dedae131.chunk.js → 1-a66bb44471.chunk.js} +1 -1
  66. package/dist/scripts/1.chunk.js.map +1 -1
  67. package/dist/scripts/{10-8307f8e248.chunk.js → 10-6c79d8c6f9.chunk.js} +1 -1
  68. package/dist/scripts/10.chunk.js.map +1 -1
  69. package/dist/scripts/{11-9dbae07504.chunk.js → 11-6eef9e160e.chunk.js} +1 -1
  70. package/dist/scripts/11.chunk.js.map +1 -1
  71. package/dist/scripts/{12-06cf65b136.chunk.js → 12-dbffa50a92.chunk.js} +1 -1
  72. package/dist/scripts/12.chunk.js.map +1 -1
  73. package/dist/scripts/{13-3d84e237b9.chunk.js → 13-37e5cfab3e.chunk.js} +1 -1
  74. package/dist/scripts/13.chunk.js.map +1 -1
  75. package/dist/scripts/{14-988bab314d.chunk.js → 14-b524fbd295.chunk.js} +1 -1
  76. package/dist/scripts/14.chunk.js.map +1 -1
  77. package/dist/scripts/{15-eed00bc875.chunk.js → 15-1ff1252d1a.chunk.js} +1 -1
  78. package/dist/scripts/15.chunk.js.map +1 -1
  79. package/dist/scripts/{16-3a99050a93.chunk.js → 16-b27142fe98.chunk.js} +1 -1
  80. package/dist/scripts/16.chunk.js.map +1 -1
  81. package/dist/scripts/{17-bff211f26a.chunk.js → 17-c3bbe50816.chunk.js} +1 -1
  82. package/dist/scripts/17.chunk.js +1 -1
  83. package/dist/scripts/17.chunk.js.map +1 -1
  84. package/dist/scripts/18.chunk.js.map +1 -1
  85. package/dist/scripts/19.chunk.js +1 -1
  86. package/dist/scripts/19.chunk.js.map +1 -1
  87. package/dist/scripts/{2-5079f4b088.chunk.js → 2-2cc3988222.chunk.js} +1 -1
  88. package/dist/scripts/2.chunk.js.map +1 -1
  89. package/dist/scripts/{20-d4470b4a53.chunk.js → 20-6d9086f5db.chunk.js} +1 -1
  90. package/dist/scripts/20.chunk.js.map +1 -1
  91. package/dist/scripts/{21-77f6ddec3d.chunk.js → 21-2f10553302.chunk.js} +1 -1
  92. package/dist/scripts/21.chunk.js.map +1 -1
  93. package/dist/scripts/{22-9ef39722d1.chunk.js → 22-59ae44b448.chunk.js} +1 -1
  94. package/dist/scripts/22.chunk.js.map +1 -1
  95. package/dist/scripts/{23-c8071cb869.chunk.js → 23-11e008ee63.chunk.js} +1 -1
  96. package/dist/scripts/23.chunk.js +3 -3
  97. package/dist/scripts/23.chunk.js.map +1 -1
  98. package/dist/scripts/{24-b655377e1f.chunk.js → 24-7f21e384d2.chunk.js} +1 -1
  99. package/dist/scripts/24.chunk.js.map +1 -1
  100. package/dist/scripts/{25-f814e3921c.chunk.js → 25-f0f7fa16a4.chunk.js} +1 -1
  101. package/dist/scripts/25.chunk.js.map +1 -1
  102. package/dist/scripts/{26-9dd482e1e6.chunk.js → 26-e65533bd94.chunk.js} +1 -1
  103. package/dist/scripts/26.chunk.js.map +1 -1
  104. package/dist/scripts/{27-5ecd204dab.chunk.js → 27-9dc0f5a4df.chunk.js} +1 -1
  105. package/dist/scripts/27.chunk.js +3 -3
  106. package/dist/scripts/27.chunk.js.map +1 -1
  107. package/dist/scripts/{28-e9b8962af8.chunk.js → 28-26e5c371c7.chunk.js} +1 -1
  108. package/dist/scripts/28.chunk.js +6 -6
  109. package/dist/scripts/28.chunk.js.map +1 -1
  110. package/dist/scripts/{29-e3391b4e4b.chunk.js → 29-61415c2af0.chunk.js} +1 -1
  111. package/dist/scripts/29.chunk.js.map +1 -1
  112. package/dist/scripts/{3-079c0b4d3b.chunk.js → 3-5eff8c9df5.chunk.js} +1 -1
  113. package/dist/scripts/3.chunk.js +13 -25
  114. package/dist/scripts/3.chunk.js.map +1 -1
  115. package/dist/scripts/{30-a6a7291b5e.chunk.js → 30-6075c28972.chunk.js} +1 -1
  116. package/dist/scripts/30.chunk.js +6 -6
  117. package/dist/scripts/30.chunk.js.map +1 -1
  118. package/dist/scripts/31-e35ae4e153.chunk.js +1 -0
  119. package/dist/scripts/31.chunk.js.map +1 -1
  120. package/dist/scripts/{32-96ac2f9c32.chunk.js → 32-d5a50a7592.chunk.js} +1 -1
  121. package/dist/scripts/32.chunk.js.map +1 -1
  122. package/dist/scripts/{33-061a87935f.chunk.js → 33-5ae90ed7d7.chunk.js} +1 -1
  123. package/dist/scripts/33.chunk.js.map +1 -1
  124. package/dist/scripts/{34-56f92b9a87.chunk.js → 34-50402c1835.chunk.js} +1 -1
  125. package/dist/scripts/34.chunk.js.map +1 -1
  126. package/dist/scripts/{35-cdd788a4b5.chunk.js → 35-ec8c190357.chunk.js} +1 -1
  127. package/dist/scripts/35.chunk.js.map +1 -1
  128. package/dist/scripts/{36-7d33d11b58.chunk.js → 36-4d467bc42e.chunk.js} +1 -1
  129. package/dist/scripts/36.chunk.js.map +1 -1
  130. package/dist/scripts/{37-fbd149e569.chunk.js → 37-37e8965783.chunk.js} +1 -1
  131. package/dist/scripts/37.chunk.js.map +1 -1
  132. package/dist/scripts/{38-57af633fa1.chunk.js → 38-3dc24b8867.chunk.js} +1 -1
  133. package/dist/scripts/38.chunk.js.map +1 -1
  134. package/dist/scripts/{39-cc627dfe2b.chunk.js → 39-350ff66a2b.chunk.js} +1 -1
  135. package/dist/scripts/39.chunk.js.map +1 -1
  136. package/dist/scripts/{4-0a8a5ac2f0.chunk.js → 4-b3f3c7c71c.chunk.js} +1 -1
  137. package/dist/scripts/4.chunk.js.map +1 -1
  138. package/dist/scripts/{40-78639874b5.chunk.js → 40-3443f99cb2.chunk.js} +1 -1
  139. package/dist/scripts/40.chunk.js.map +1 -1
  140. package/dist/scripts/{41-2c6722e410.chunk.js → 41-b5dfd35e9e.chunk.js} +1 -1
  141. package/dist/scripts/41.chunk.js.map +1 -1
  142. package/dist/scripts/{42-9b7795d20a.chunk.js → 42-103fecb7b6.chunk.js} +1 -1
  143. package/dist/scripts/42.chunk.js.map +1 -1
  144. package/dist/scripts/{43-006ce08a8f.chunk.js → 43-57b07579f7.chunk.js} +1 -1
  145. package/dist/scripts/43.chunk.js.map +1 -1
  146. package/dist/scripts/{44-b4c134efe8.chunk.js → 44-210d64dffe.chunk.js} +1 -1
  147. package/dist/scripts/44.chunk.js.map +1 -1
  148. package/dist/scripts/{45-3e85e78a77.chunk.js → 45-632b07e926.chunk.js} +1 -1
  149. package/dist/scripts/45.chunk.js.map +1 -1
  150. package/dist/scripts/{46-1256828b60.chunk.js → 46-82cce63cbf.chunk.js} +1 -1
  151. package/dist/scripts/46.chunk.js +6 -6
  152. package/dist/scripts/46.chunk.js.map +1 -1
  153. package/dist/scripts/{47-9e514e7536.chunk.js → 47-595b4aae87.chunk.js} +1 -1
  154. package/dist/scripts/47.chunk.js +1 -2
  155. package/dist/scripts/47.chunk.js.map +1 -1
  156. package/dist/scripts/{48-9af8b50e4f.chunk.js → 48-fcf6378889.chunk.js} +1 -1
  157. package/dist/scripts/48.chunk.js.map +1 -1
  158. package/dist/scripts/{49-883d9131af.chunk.js → 49-d8a4899eb1.chunk.js} +1 -1
  159. package/dist/scripts/49.chunk.js.map +1 -1
  160. package/dist/scripts/{5-f5ad097d2b.chunk.js → 5-06bc197b1e.chunk.js} +1 -1
  161. package/dist/scripts/5.chunk.js +3 -3
  162. package/dist/scripts/5.chunk.js.map +1 -1
  163. package/dist/scripts/{50-198f89794c.chunk.js → 50-11b1a49916.chunk.js} +1 -1
  164. package/dist/scripts/50.chunk.js.map +1 -1
  165. package/dist/scripts/{51-61bb2b80fe.chunk.js → 51-72a75e0265.chunk.js} +1 -1
  166. package/dist/scripts/51.chunk.js.map +1 -1
  167. package/dist/scripts/{52-e7fd215888.chunk.js → 52-195f73bcd6.chunk.js} +1 -1
  168. package/dist/scripts/52.chunk.js.map +1 -1
  169. package/dist/scripts/{53-595b1efa1a.chunk.js → 53-bb4f37ee25.chunk.js} +1 -1
  170. package/dist/scripts/53.chunk.js.map +1 -1
  171. package/dist/scripts/{54-646c8458e0.chunk.js → 54-7a201d8285.chunk.js} +1 -1
  172. package/dist/scripts/54.chunk.js.map +1 -1
  173. package/dist/scripts/{55-dac67eae0b.chunk.js → 55-be3d7b8805.chunk.js} +1 -1
  174. package/dist/scripts/55.chunk.js.map +1 -1
  175. package/dist/scripts/{56-9a02efb9a1.chunk.js → 56-6aeece1bf1.chunk.js} +1 -1
  176. package/dist/scripts/56.chunk.js.map +1 -1
  177. package/dist/scripts/{57-bf72265d49.chunk.js → 57-59ee15161b.chunk.js} +1 -1
  178. package/dist/scripts/57.chunk.js.map +1 -1
  179. package/dist/scripts/{58-34ef45f4b6.chunk.js → 58-8ff58b194a.chunk.js} +1 -1
  180. package/dist/scripts/58.chunk.js.map +1 -1
  181. package/dist/scripts/{59-f3d473090d.chunk.js → 59-3d33954fcb.chunk.js} +1 -1
  182. package/dist/scripts/59.chunk.js.map +1 -1
  183. package/dist/scripts/{6-a5f6258253.chunk.js → 6-a469872b10.chunk.js} +1 -1
  184. package/dist/scripts/6.chunk.js.map +1 -1
  185. package/dist/scripts/{60-ac4f11764a.chunk.js → 60-f092baa91c.chunk.js} +1 -1
  186. package/dist/scripts/60.chunk.js.map +1 -1
  187. package/dist/scripts/{61-62ec9b3628.chunk.js → 61-bd9ef62ccd.chunk.js} +1 -1
  188. package/dist/scripts/61.chunk.js +12 -12
  189. package/dist/scripts/61.chunk.js.map +1 -1
  190. package/dist/scripts/{62-4d0e82f903.chunk.js → 62-f15b3bf74c.chunk.js} +1 -1
  191. package/dist/scripts/62.chunk.js.map +1 -1
  192. package/dist/scripts/{63-47af37825d.chunk.js → 63-92757f75e7.chunk.js} +1 -1
  193. package/dist/scripts/63.chunk.js.map +1 -1
  194. package/dist/scripts/{64-c42635a917.chunk.js → 64-c5a1c55521.chunk.js} +1 -1
  195. package/dist/scripts/64.chunk.js.map +1 -1
  196. package/dist/scripts/{65-7780441e5e.chunk.js → 65-6bb10ae23b.chunk.js} +1 -1
  197. package/dist/scripts/65.chunk.js.map +1 -1
  198. package/dist/scripts/{66-7f2750cd97.chunk.js → 66-f047027f7d.chunk.js} +1 -1
  199. package/dist/scripts/66.chunk.js.map +1 -1
  200. package/dist/scripts/{67-564ff2bd16.chunk.js → 67-2e1a011200.chunk.js} +1 -1
  201. package/dist/scripts/67.chunk.js.map +1 -1
  202. package/dist/scripts/{68-df9024fadc.chunk.js → 68-d5c0ab3fc1.chunk.js} +1 -1
  203. package/dist/scripts/68.chunk.js.map +1 -1
  204. package/dist/scripts/{69-4d32ddddbc.chunk.js → 69-fc8325afc9.chunk.js} +1 -1
  205. package/dist/scripts/69.chunk.js.map +1 -1
  206. package/dist/scripts/{7-2696f5afc4.chunk.js → 7-58dd909fa3.chunk.js} +1 -1
  207. package/dist/scripts/7.chunk.js.map +1 -1
  208. package/dist/scripts/{70-2a427b3dd0.chunk.js → 70-ceda95013e.chunk.js} +1 -1
  209. package/dist/scripts/70.chunk.js.map +1 -1
  210. package/dist/scripts/{71-215cac8b69.chunk.js → 71-6e8fc95beb.chunk.js} +1 -1
  211. package/dist/scripts/71.chunk.js.map +1 -1
  212. package/dist/scripts/{72-6eb3ef092e.chunk.js → 72-53fe3338bf.chunk.js} +1 -1
  213. package/dist/scripts/72.chunk.js.map +1 -1
  214. package/dist/scripts/73.chunk.js.map +1 -1
  215. package/dist/scripts/74.chunk.js.map +1 -1
  216. package/dist/scripts/75.chunk.js.map +1 -1
  217. package/dist/scripts/76.chunk.js.map +1 -1
  218. package/dist/scripts/77.chunk.js.map +1 -1
  219. package/dist/scripts/78.chunk.js.map +1 -1
  220. package/dist/scripts/79.chunk.js.map +1 -1
  221. package/dist/scripts/{8-f4f18356f7.chunk.js → 8-6974afed28.chunk.js} +1 -1
  222. package/dist/scripts/8.chunk.js.map +1 -1
  223. package/dist/scripts/80.chunk.js.map +1 -1
  224. package/dist/scripts/81.chunk.js.map +1 -1
  225. package/dist/scripts/82.chunk.js.map +1 -1
  226. package/dist/scripts/83.chunk.js.map +1 -1
  227. package/dist/scripts/84.chunk.js.map +1 -1
  228. package/dist/scripts/85.chunk.js.map +1 -1
  229. package/dist/scripts/86.chunk.js.map +1 -1
  230. package/dist/scripts/87.chunk.js.map +1 -1
  231. package/dist/scripts/88.chunk.js.map +1 -1
  232. package/dist/scripts/89.chunk.js.map +1 -1
  233. package/dist/scripts/{9-cd0bcefa7f.chunk.js → 9-9279038caa.chunk.js} +1 -1
  234. package/dist/scripts/9.chunk.js.map +1 -1
  235. package/dist/scripts/90.chunk.js.map +1 -1
  236. package/dist/scripts/91.chunk.js.map +1 -1
  237. package/dist/scripts/92.chunk.js.map +1 -1
  238. package/dist/scripts/bundle-06dc1f4908.min.js +8 -0
  239. package/dist/scripts/bundle-8498807388.min.js +1 -0
  240. package/dist/scripts/{bundle-5b64746afd.min.js → bundle-891db89400.min.js} +1 -1
  241. package/dist/scripts/bundle-f4a423ce34.min.js +1 -0
  242. package/dist/scripts/bundle.js +1364 -1492
  243. package/dist/scripts/bundle.js.map +1 -1
  244. package/dist/scripts/bundles.json +2 -2
  245. package/dist/scripts/polyfills-efb4d7caa3.min.js +1 -0
  246. package/dist/scripts/polyfills.js +1050 -1050
  247. package/dist/scripts/polyfills.js.map +1 -1
  248. package/package.json +3 -3
  249. package/dist/scripts/0-f82360fd03.chunk.js +0 -1
  250. package/dist/scripts/1-35f87e4cdc.chunk.js +0 -1
  251. package/dist/scripts/10-227e797872.chunk.js +0 -1
  252. package/dist/scripts/12-43e54b0a2d.chunk.js +0 -1
  253. package/dist/scripts/13-01ee41eb1e.chunk.js +0 -1
  254. package/dist/scripts/14-cf307e51d9.chunk.js +0 -1
  255. package/dist/scripts/15-bedb9ff6d0.chunk.js +0 -1
  256. package/dist/scripts/16-339a29fa2f.chunk.js +0 -1
  257. package/dist/scripts/17-66da06be62.chunk.js +0 -1
  258. package/dist/scripts/20-6019ccb462.chunk.js +0 -1
  259. package/dist/scripts/21-7bd1977005.chunk.js +0 -1
  260. package/dist/scripts/22-d88b8e9c20.chunk.js +0 -1
  261. package/dist/scripts/23-e8a0f60c53.chunk.js +0 -1
  262. package/dist/scripts/24-f62e7ff166.chunk.js +0 -1
  263. package/dist/scripts/25-acda0ed17e.chunk.js +0 -1
  264. package/dist/scripts/26-39f6c3ca17.chunk.js +0 -1
  265. package/dist/scripts/27-1313c7d392.chunk.js +0 -1
  266. package/dist/scripts/28-b583483a6e.chunk.js +0 -1
  267. package/dist/scripts/29-44119e600a.chunk.js +0 -1
  268. package/dist/scripts/3-bea2c1c371.chunk.js +0 -1
  269. package/dist/scripts/30-aef6a19cde.chunk.js +0 -1
  270. package/dist/scripts/31-4f1ea6d067.chunk.js +0 -1
  271. package/dist/scripts/31-70fe14b490.chunk.js +0 -1
  272. package/dist/scripts/32-0b05da2f4c.chunk.js +0 -1
  273. package/dist/scripts/33-04b1fbcdeb.chunk.js +0 -1
  274. package/dist/scripts/34-4f2c861480.chunk.js +0 -1
  275. package/dist/scripts/35-08ead0d078.chunk.js +0 -1
  276. package/dist/scripts/36-4db22bf8bb.chunk.js +0 -1
  277. package/dist/scripts/37-4de2537ff4.chunk.js +0 -1
  278. package/dist/scripts/38-7733a3d81e.chunk.js +0 -1
  279. package/dist/scripts/39-5451786b7d.chunk.js +0 -1
  280. package/dist/scripts/4-84fa8e49e2.chunk.js +0 -1
  281. package/dist/scripts/40-31940ddf04.chunk.js +0 -1
  282. package/dist/scripts/41-0366a0332e.chunk.js +0 -1
  283. package/dist/scripts/42-c87c36d7d4.chunk.js +0 -1
  284. package/dist/scripts/43-591954817b.chunk.js +0 -1
  285. package/dist/scripts/44-fc3a1d45c5.chunk.js +0 -1
  286. package/dist/scripts/45-32ce8dd910.chunk.js +0 -1
  287. package/dist/scripts/46-e096df45ef.chunk.js +0 -1
  288. package/dist/scripts/47-61b53964c2.chunk.js +0 -1
  289. package/dist/scripts/48-3f804b22a4.chunk.js +0 -1
  290. package/dist/scripts/49-79b28e90c9.chunk.js +0 -1
  291. package/dist/scripts/5-093c9ee130.chunk.js +0 -1
  292. package/dist/scripts/50-ce04770db1.chunk.js +0 -1
  293. package/dist/scripts/51-177fe97a9b.chunk.js +0 -1
  294. package/dist/scripts/52-d8cf26c75f.chunk.js +0 -1
  295. package/dist/scripts/53-e78a58c963.chunk.js +0 -1
  296. package/dist/scripts/54-7976c21511.chunk.js +0 -1
  297. package/dist/scripts/55-5e3b70736e.chunk.js +0 -1
  298. package/dist/scripts/56-3c520aec72.chunk.js +0 -1
  299. package/dist/scripts/57-6f84e1bb9d.chunk.js +0 -1
  300. package/dist/scripts/58-1c37240b43.chunk.js +0 -1
  301. package/dist/scripts/59-05cbb57b32.chunk.js +0 -1
  302. package/dist/scripts/6-e49b6b4c08.chunk.js +0 -1
  303. package/dist/scripts/60-dd50d4179f.chunk.js +0 -1
  304. package/dist/scripts/61-e759f86871.chunk.js +0 -1
  305. package/dist/scripts/62-bfd5450b13.chunk.js +0 -1
  306. package/dist/scripts/63-8521e39a2e.chunk.js +0 -1
  307. package/dist/scripts/64-12150ef48b.chunk.js +0 -1
  308. package/dist/scripts/65-a4fdf8777b.chunk.js +0 -1
  309. package/dist/scripts/66-029947cf5c.chunk.js +0 -1
  310. package/dist/scripts/67-47f208342a.chunk.js +0 -1
  311. package/dist/scripts/68-5656cc45fe.chunk.js +0 -1
  312. package/dist/scripts/69-a4b3442e68.chunk.js +0 -1
  313. package/dist/scripts/7-b39ab430b9.chunk.js +0 -1
  314. package/dist/scripts/70-0f070c1596.chunk.js +0 -1
  315. package/dist/scripts/71-c43ee23686.chunk.js +0 -1
  316. package/dist/scripts/72-f5a8cfc8b7.chunk.js +0 -1
  317. package/dist/scripts/8-1e0751e30b.chunk.js +0 -1
  318. package/dist/scripts/9-bb567e1c99.chunk.js +0 -1
  319. package/dist/scripts/bundle-e7f4d4e659.min.js +0 -8
  320. package/dist/scripts/bundle-f73bcaa857.min.js +0 -8
  321. package/dist/scripts/polyfills-9517d7e647.min.js +0 -1
  322. package/dist/scripts/polyfills-e442ebbfb0.min.js +0 -1
  323. /package/dist/scripts/{0-2d62d8ccd7.chunk.js → 0-f604eee110.chunk.js} +0 -0
  324. /package/dist/scripts/{1-cf6d342590.chunk.js → 1-056bd8c79b.chunk.js} +0 -0
  325. /package/dist/scripts/{10-7475ff8374.chunk.js → 10-028c6001e1.chunk.js} +0 -0
  326. /package/dist/scripts/{12-20b4c4cdb6.chunk.js → 12-d3f51f4e06.chunk.js} +0 -0
  327. /package/dist/scripts/{13-292e92093a.chunk.js → 13-4029d31569.chunk.js} +0 -0
  328. /package/dist/scripts/{14-66f92fd1d3.chunk.js → 14-4c94f97e4e.chunk.js} +0 -0
  329. /package/dist/scripts/{15-d580267aff.chunk.js → 15-ec9aa4878b.chunk.js} +0 -0
  330. /package/dist/scripts/{16-0aa5e3e5fe.chunk.js → 16-5bc8299e14.chunk.js} +0 -0
  331. /package/dist/scripts/{17-f44cb6ca42.chunk.js → 17-9fe035f9e2.chunk.js} +0 -0
  332. /package/dist/scripts/{20-af6230b8af.chunk.js → 20-60e4eee833.chunk.js} +0 -0
  333. /package/dist/scripts/{21-1281b41577.chunk.js → 21-a7fffe8852.chunk.js} +0 -0
  334. /package/dist/scripts/{22-878d242dfd.chunk.js → 22-f670791432.chunk.js} +0 -0
  335. /package/dist/scripts/{23-e55ad46abd.chunk.js → 23-4d26d6300a.chunk.js} +0 -0
  336. /package/dist/scripts/{24-87aea794c8.chunk.js → 24-813ef82099.chunk.js} +0 -0
  337. /package/dist/scripts/{25-b3b05ff03c.chunk.js → 25-023d08a591.chunk.js} +0 -0
  338. /package/dist/scripts/{26-5f79a251ff.chunk.js → 26-a9fcf0d596.chunk.js} +0 -0
  339. /package/dist/scripts/{27-fb5a56b6e9.chunk.js → 27-84f7bbade6.chunk.js} +0 -0
  340. /package/dist/scripts/{28-d75e03d0c0.chunk.js → 28-cdf603f4cf.chunk.js} +0 -0
  341. /package/dist/scripts/{29-2c0b30c31b.chunk.js → 29-8278d23f9b.chunk.js} +0 -0
  342. /package/dist/scripts/{3-29a29544af.chunk.js → 3-1fa81c9d9b.chunk.js} +0 -0
  343. /package/dist/scripts/{30-a373fad3e5.chunk.js → 30-7ab880728c.chunk.js} +0 -0
  344. /package/dist/scripts/{31-1bb00d89bc.chunk.js → 31-aa4cd0f45e.chunk.js} +0 -0
  345. /package/dist/scripts/{32-a5e4069473.chunk.js → 32-7717941f1d.chunk.js} +0 -0
  346. /package/dist/scripts/{33-c671ce256e.chunk.js → 33-6da33143ea.chunk.js} +0 -0
  347. /package/dist/scripts/{34-e896aea27d.chunk.js → 34-27e40f4d4b.chunk.js} +0 -0
  348. /package/dist/scripts/{35-be151f3db1.chunk.js → 35-3260300446.chunk.js} +0 -0
  349. /package/dist/scripts/{36-e1dc9478b6.chunk.js → 36-bec0c74d05.chunk.js} +0 -0
  350. /package/dist/scripts/{37-b3aa0290c0.chunk.js → 37-3916177181.chunk.js} +0 -0
  351. /package/dist/scripts/{38-c1c3eaedae.chunk.js → 38-89f7c22ea8.chunk.js} +0 -0
  352. /package/dist/scripts/{39-6969b0c7b0.chunk.js → 39-9456631219.chunk.js} +0 -0
  353. /package/dist/scripts/{4-a0d8871170.chunk.js → 4-a7f6d378e0.chunk.js} +0 -0
  354. /package/dist/scripts/{40-8f82ccc935.chunk.js → 40-f65196723f.chunk.js} +0 -0
  355. /package/dist/scripts/{41-8512aa7dc5.chunk.js → 41-70b16d99d0.chunk.js} +0 -0
  356. /package/dist/scripts/{42-e4f279e42c.chunk.js → 42-e17f214d6c.chunk.js} +0 -0
  357. /package/dist/scripts/{43-11144c5f88.chunk.js → 43-6826fbc7d4.chunk.js} +0 -0
  358. /package/dist/scripts/{44-558a97cea6.chunk.js → 44-593e820fa2.chunk.js} +0 -0
  359. /package/dist/scripts/{45-73329af938.chunk.js → 45-8231a03833.chunk.js} +0 -0
  360. /package/dist/scripts/{46-db028594cc.chunk.js → 46-682ca88fd9.chunk.js} +0 -0
  361. /package/dist/scripts/{47-8b9d860084.chunk.js → 47-aec7cf95e8.chunk.js} +0 -0
  362. /package/dist/scripts/{48-ab5af19e09.chunk.js → 48-7b09165697.chunk.js} +0 -0
  363. /package/dist/scripts/{49-df996c66c2.chunk.js → 49-0e6ceb191f.chunk.js} +0 -0
  364. /package/dist/scripts/{5-27d34603ed.chunk.js → 5-e2e64bc05f.chunk.js} +0 -0
  365. /package/dist/scripts/{50-0d6bdb887e.chunk.js → 50-fa6f6fd1dc.chunk.js} +0 -0
  366. /package/dist/scripts/{51-819b13fe95.chunk.js → 51-1c9fca4604.chunk.js} +0 -0
  367. /package/dist/scripts/{52-4977addfab.chunk.js → 52-ebce0c9f12.chunk.js} +0 -0
  368. /package/dist/scripts/{53-1ad87216cb.chunk.js → 53-c6807d4e0b.chunk.js} +0 -0
  369. /package/dist/scripts/{54-0a404f9f36.chunk.js → 54-e6195aa62a.chunk.js} +0 -0
  370. /package/dist/scripts/{55-9163aa1312.chunk.js → 55-f9f9a251af.chunk.js} +0 -0
  371. /package/dist/scripts/{56-04f189d5de.chunk.js → 56-20f27f96db.chunk.js} +0 -0
  372. /package/dist/scripts/{57-4eb1cc6019.chunk.js → 57-b25862dbf0.chunk.js} +0 -0
  373. /package/dist/scripts/{58-804f31a61a.chunk.js → 58-edf06f18f9.chunk.js} +0 -0
  374. /package/dist/scripts/{59-dcbd713f4b.chunk.js → 59-241a666e49.chunk.js} +0 -0
  375. /package/dist/scripts/{6-26cb86223d.chunk.js → 6-c631df7bda.chunk.js} +0 -0
  376. /package/dist/scripts/{60-d8853c434d.chunk.js → 60-ac631fa385.chunk.js} +0 -0
  377. /package/dist/scripts/{61-c8c69eeff5.chunk.js → 61-360e50b6cb.chunk.js} +0 -0
  378. /package/dist/scripts/{62-45c821e85d.chunk.js → 62-22ee1d2a94.chunk.js} +0 -0
  379. /package/dist/scripts/{63-c236987805.chunk.js → 63-25413d744e.chunk.js} +0 -0
  380. /package/dist/scripts/{64-fbab857648.chunk.js → 64-1b027092be.chunk.js} +0 -0
  381. /package/dist/scripts/{65-b2901f7de5.chunk.js → 65-c8a9aae545.chunk.js} +0 -0
  382. /package/dist/scripts/{66-fb79386913.chunk.js → 66-20aec598ca.chunk.js} +0 -0
  383. /package/dist/scripts/{67-048121cf49.chunk.js → 67-d8d1cb35a4.chunk.js} +0 -0
  384. /package/dist/scripts/{68-d529af6c1b.chunk.js → 68-869ea333d9.chunk.js} +0 -0
  385. /package/dist/scripts/{69-4548bb42ea.chunk.js → 69-c4ff3e5568.chunk.js} +0 -0
  386. /package/dist/scripts/{7-10b288197e.chunk.js → 7-1d94e0bb0c.chunk.js} +0 -0
  387. /package/dist/scripts/{70-e36b006dbe.chunk.js → 70-171dcf9fe1.chunk.js} +0 -0
  388. /package/dist/scripts/{71-5d5ec02d3d.chunk.js → 71-33e7082ca2.chunk.js} +0 -0
  389. /package/dist/scripts/{72-d98ffab96a.chunk.js → 72-2eef8b13b0.chunk.js} +0 -0
  390. /package/dist/scripts/{8-b0942a9479.chunk.js → 8-34ae87490f.chunk.js} +0 -0
  391. /package/dist/scripts/{9-ba4f55ce15.chunk.js → 9-0d7004dd33.chunk.js} +0 -0
  392. /package/dist/scripts/{polyfills-5c483eb7f4.min.js → polyfills-21eaf1215c.min.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["file://C:/ClickView Projects/clickview/packages/projects/library-editor/src/apps/library-editor/components/concatenate-request/ConcatenateRequest.hbs","file://C:/ClickView Projects/clickview/packages/projects/library-editor/src/apps/library-editor/components/concatenate-request/ConcatenateRequestComponent.ts","webpack://@clickview/library-editor/./src/apps/library-editor/components/concatenate-request/concatenate-request.scss?3bb8"],"names":[],"mappings":";;;;;;;;;AAAA,iBAAiB,mBAAO,CAAC,8BAAY;AACrC,iEAAiE;AACjE;;AAEA,6FAA6F,8FAA8F,qBAAqB,yEAAyE;AACzR,CAAC;AACD;;AAEA;AACA;AACA;AACA,+IAA+I,gBAAgB,uBAAuB,aAAa;AACnM;AACA,CAAC;AACD;;AAEA,6FAA6F,4FAA4F,qBAAqB,yEAAyE;AACvR,CAAC;AACD;;AAEA;AACA,mKAAmK,YAAY,uBAAuB,aAAa;AACnN;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,gGAAgG,qBAAqB,wFAAwF;AACvS,CAAC,gBAAgB,E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/BjB;AAEA;AACA;AACA;AAEA;AACA;AAGA;AACA;AAOO,IAAM,2BAAb;AAAA;;AAAA;;AAIE,uCAAY,OAAZ,EAAuD;AAAA;;AAAA,6BAC/C,OAD+C;AAEtD;;AANH;AAAA;AAAA,iCAQmB;AACf,WAAK,YAAL,GAAoB,IAAI,8DAAI,CAAC,KAAT,CAAe;AAAE,mBAAW,EAAE,KAAK,YAAL;AAAf,OAAf,CAApB;AAEA,WAAK,QAAL,CA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CADF;AAGA,aAAO;AACL,gBAAQ,EAAR,QADK;AAEL,wBAAgB,EAAE,IAAI,CAAC,KAAK,OAAL,CAAa,IAAd,CAFjB;AAGL,kBAAU,EAAE,KAAK,YAAL,CAAkB,GAAlB,CAAsB,qHAA4B,CAAC,WAAnD,CAHP;AAIL,cAAM,EAAE,KAAK,KAAL,IAAc,KAAK,KAAL,CAAW,GAAX,CAAe,QAAf,CAAd,IAA0C,KAAK,KAAL,CAAW,GAAX,CAAe,QAAf,MAA6B,6DAAsB,CAAC;AAJjG,OAAP;AAMD;AAxGH;AAAA;AAAA,+BA0GiB;AACb,WAAK,YAAL;AACD;AA5GH;AAAA;AAAA,wBAciB;AACb,aAAO,6BAAP;AACD;AAhBH;AAAA;AAAA,wBAkBqB;AACjB,aAAO,8DAAP;AACD;AApBH;AAAA;AAAA,wBAsBiB;AACb,aAAO,kCAAP;AACD;AAxBH;AAAA;AAAA,wBA0BsB;AAClB,aAAO,MAAP;AACD;AA5BH;;AAAA;AAAA,EAAiD,8DAAI,CAAC,SAAtD,E;;;;;;;;;;;ACrBA;AACA,kBAAkB,wB","file":"scripts/37.chunk.js","sourcesContent":["var Handlebars = require('handlebars');\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.progress : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"2\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.escapeExpression;\n\n return \" <span class=\\\"m-3 text-muted\\\">\"\n + alias2(container.lambda(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.progress : stack1), depth0))\n + \"</span>\\r\\n <p class=\\\"pt-2\\\">\"\n + alias2((helpers.lang||(depth0 && depth0.lang)||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),\"processing\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</p>\\r\\n\";\n},\"4\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.failed : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"5\":function(container,depth0,helpers,partials,data) {\n var alias1=container.propertyIsEnumerable;\n\n return \"<p class=\\\"pt-2 text-danger\\\">\"\n + container.escapeExpression((helpers.lang||(depth0 && depth0.lang)||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),\"failed\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</p>\\r\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression;\n\n return \"<h4>\"\n + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.componentOptions : stack1)) != null ? stack1.heading : stack1), depth0))\n + \"</h4>\\r\\n<p>\"\n + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.componentOptions : stack1)) != null ? stack1.line1 : stack1), depth0))\n + \"</p>\\r\\n<p>\"\n + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.componentOptions : stack1)) != null ? stack1.line2 : stack1), depth0))\n + \"</p>\\r\\n<div class=\\\"btn-region\\\"></div>\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.processing : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(4, data, 0),\"data\":data})) != null ? stack1 : \"\");\n},\"useData\":true});","import * as _ from 'underscore';\r\nimport { ObjectHash } from 'backbone';\r\n\r\nimport { Core } from 'libs/common/core';\r\n\r\nimport { SpinnerButtonModelAttributes, SpinnerButtonComponent } from 'shared/components/spinner-button/SpinnerButtonComponent';\r\nimport { SpinnerSize, SpinnerType } from 'shared/utils';\r\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\r\n\r\nimport { MediaConcatenateStatus } from 'apps/library-editor/enums';\r\nimport { LibraryEditorActions } from 'apps/library-editor/constants';\r\nimport { ChapterConcatenateRequest } from 'apps/library-editor/models';\r\n\r\nimport ConcatenateRequestTemplate from './ConcatenateRequest.hbs';\r\nimport styles from './concatenate-request.scss';\r\n\r\ninterface ConcatenateRequestComponentOptions extends Core.ComponentOptions<ChapterConcatenateRequest> {\r\n type: 'chapters' | 'subtitles' | 'clickViewSubtitles';\r\n model?: ChapterConcatenateRequest;\r\n}\r\n\r\nexport class ConcatenateRequestComponent extends Core.Component<ChapterConcatenateRequest> {\r\n public options: ConcatenateRequestComponentOptions;\r\n private spinnerModel: Core.Model;\r\n\r\n constructor(options: ConcatenateRequestComponentOptions) {\r\n super(options);\r\n }\r\n\r\n public initialize(): void {\r\n this.spinnerModel = new Core.Model({ showSpinner: this.isProcessing() });\r\n\r\n this.listenTo(this.options.channelName, LibraryEditorActions.MergeChapters, this.onClickMergeChapters);\r\n }\r\n\r\n public get name(): string {\r\n return 'ConcatenateRequestComponent';\r\n }\r\n\r\n public get template(): any {\r\n return ConcatenateRequestTemplate;\r\n }\r\n\r\n public get lang(): string {\r\n return 'libraryEditor.concatenateRequest';\r\n }\r\n\r\n public get className(): string {\r\n return 'mt-3';\r\n }\r\n\r\n public regions(): ObjectHash {\r\n return {\r\n button: {\r\n el: '.btn-region',\r\n replaceElement: true\r\n }\r\n };\r\n }\r\n\r\n private onClickMergeChapters(): void {\r\n this.spinnerModel.set(SpinnerButtonModelAttributes.ShowSpinner, true);\r\n\r\n this.render();\r\n }\r\n\r\n private isProcessing(): boolean {\r\n if (!this.model)\r\n return false;\r\n\r\n return !!this.model.get('status') && (this.model.get('status') === MediaConcatenateStatus.New\r\n || this.model.get('status') === MediaConcatenateStatus.Concatenating);\r\n }\r\n\r\n private renderButton(): void {\r\n const copy = {\r\n chapters: LanguageService.getPhrase(this.lang, 'mergeChapters'),\r\n subtitles: LanguageService.getPhrase(this.lang, 'mergeChapters'),\r\n clickViewSubtitles: LanguageService.getPhrase(this.lang, 'enabledCustomSubtitles')\r\n };\r\n\r\n const spinnerButtonComponent = new SpinnerButtonComponent({\r\n buttonText: copy[this.options.type],\r\n extraButtonClass: `btn-primary ${styles.btn}`,\r\n model: this.spinnerModel,\r\n spinnerOptions: {\r\n size: SpinnerSize.Small,\r\n type: SpinnerType.Light,\r\n extraClasses: 'mx-auto'\r\n },\r\n channelName: this.options.channelName,\r\n saveEvent: LibraryEditorActions.MergeChapters,\r\n });\r\n\r\n this.showChildView('button', spinnerButtonComponent);\r\n }\r\n\r\n public viewOptions(): ObjectHash {\r\n const copy = {\r\n chapters: {\r\n heading: LanguageService.getPhrase(this.lang, 'chaptersHeading'),\r\n line1: LanguageService.getPhrase(this.lang, 'chaptersInfo1'),\r\n line2: LanguageService.getPhrase(this.lang, 'chaptersInfo2')\r\n },\r\n subtitles: {\r\n heading: LanguageService.getPhrase(this.lang, 'subtitlesHeading'),\r\n line1: LanguageService.getPhrase(this.lang, 'subtitlesInfo1'),\r\n line2: LanguageService.getPhrase(this.lang, 'subtitlesInfo2')\r\n },\r\n clickViewSubtitles: {\r\n heading: LanguageService.getPhrase(this.lang, 'cvSubtitlesHeading'),\r\n line1: LanguageService.getPhrase(this.lang, 'cvSubtitlesInfo1'),\r\n line2: LanguageService.getPhrase(this.lang, 'cvSubtitlesInfo2')\r\n }\r\n };\r\n\r\n var progress = this.model && this.model.get('progress') &&\r\n LanguageService.getPhrase(this.lang, 'progress', { progress: this.model.get('progress') });\r\n\r\n return {\r\n progress,\r\n componentOptions: copy[this.options.type],\r\n processing: this.spinnerModel.get(SpinnerButtonModelAttributes.ShowSpinner),\r\n failed: this.model && this.model.get('status') && this.model.get('status') === MediaConcatenateStatus.ConcatenationFailed\r\n };\r\n }\r\n\r\n public onRender(): void {\r\n this.renderButton();\r\n }\r\n}","// extracted by mini-css-extract-plugin\nmodule.exports = {\"btn\":\"cv--btn--59zg9\"};"],"sourceRoot":""}
1
+ {"version":3,"sources":["file://C:/ClickView Projects/@clickview/packages/projects/library-editor/src/apps/library-editor/components/concatenate-request/ConcatenateRequest.hbs","file://C:/ClickView Projects/@clickview/packages/projects/library-editor/src/apps/library-editor/components/concatenate-request/ConcatenateRequestComponent.ts","webpack://@clickview/library-editor/./src/apps/library-editor/components/concatenate-request/concatenate-request.scss?0f31"],"names":[],"mappings":";;;;;;;;;AAAA,iBAAiB,mBAAO,CAAC,8BAAY;AACrC,iEAAiE;AACjE;;AAEA,6FAA6F,8FAA8F,qBAAqB,yEAAyE;AACzR,CAAC;AACD;;AAEA;AACA;AACA;AACA,+IAA+I,gBAAgB,uBAAuB,aAAa;AACnM;AACA,CAAC;AACD;;AAEA,6FAA6F,4FAA4F,qBAAqB,yEAAyE;AACvR,CAAC;AACD;;AAEA;AACA,mKAAmK,YAAY,uBAAuB,aAAa;AACnN;AACA,CAAC;AACD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0FAA0F,gGAAgG,qBAAqB,wFAAwF;AACvS,CAAC,gBAAgB,E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC/BjB;AAEA;AACA;AACA;AAEA;AACA;AAGA;AACA;AAOO,IAAM,2BAAb;AAAA;;AAAA;;AAIE,uCAAY,OAAZ,EAAuD;AAAA;;AAAA,6BAC/C,OAD+C;AAEtD;;AANH;AAAA;AAAA,iCAQmB;AAC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AC,SAAhB,CAA0B,KAAK,IAA/B,EAAqC,UAArC,EAAiD;AAAE,gBAAQ,EAAE,KAAK,KAAL,CAAW,GAAX,CAAe,UAAf;AAAZ,OAAjD,CADF;AAGA,aAAO;AACL,gBAAQ,EAAR,QADK;AAEL,wBAAgB,EAAE,IAAI,CAAC,KAAK,OAAL,CAAa,IAAd,CAFjB;AAGL,kBAAU,EAAE,KAAK,YAAL,CAAkB,GAAlB,CAAsB,qHAA4B,CAAC,WAAnD,CAHP;AAIL,cAAM,EAAE,KAAK,KAAL,IAAc,KAAK,KAAL,CAAW,GAAX,CAAe,QAAf,CAAd,IAA0C,KAAK,KAAL,CAAW,GAAX,CAAe,QAAf,MAA6B,6DAAsB,CAAC;AAJjG,OAAP;AAMD;AAxGH;AAAA;AAAA,+BA0GiB;AACb,WAAK,YAAL;AACD;AA5GH;AAAA;AAAA,wBAciB;AACb,aAAO,6BAAP;AACD;AAhBH;AAAA;AAAA,wBAkBqB;AACjB,aAAO,8DAAP;AACD;AApBH;AAAA;AAAA,wBAsBiB;AACb,aAAO,kCAAP;AACD;AAxBH;AAAA;AAAA,wBA0BsB;AAClB,aAAO,MAAP;AACD;AA5BH;;AAAA;AAAA,EAAiD,8DAAI,CAAC,SAAtD,E;;;;;;;;;;;ACrBA;AACA,kBAAkB,wB","file":"scripts/37.chunk.js","sourcesContent":["var Handlebars = require('handlebars');\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.progress : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(2, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"2\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.escapeExpression;\n\n return \" <span class=\\\"m-3 text-muted\\\">\"\n + alias2(container.lambda(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.progress : stack1), depth0))\n + \"</span>\\r\\n <p class=\\\"pt-2\\\">\"\n + alias2((helpers.lang||(depth0 && depth0.lang)||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),\"processing\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</p>\\r\\n\";\n},\"4\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.failed : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\");\n},\"5\":function(container,depth0,helpers,partials,data) {\n var alias1=container.propertyIsEnumerable;\n\n return \"<p class=\\\"pt-2 text-danger\\\">\"\n + container.escapeExpression((helpers.lang||(depth0 && depth0.lang)||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),\"failed\",{\"name\":\"lang\",\"hash\":{},\"data\":data}))\n + \"</p>\\r\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression;\n\n return \"<h4>\"\n + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.componentOptions : stack1)) != null ? stack1.heading : stack1), depth0))\n + \"</h4>\\r\\n<p>\"\n + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.componentOptions : stack1)) != null ? stack1.line1 : stack1), depth0))\n + \"</p>\\r\\n<p>\"\n + alias3(alias2(((stack1 = ((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.componentOptions : stack1)) != null ? stack1.line2 : stack1), depth0))\n + \"</p>\\r\\n<div class=\\\"btn-region\\\"></div>\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.processing : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(4, data, 0),\"data\":data})) != null ? stack1 : \"\");\n},\"useData\":true});","import * as _ from 'underscore';\r\nimport { ObjectHash } from 'backbone';\r\n\r\nimport { Core } from 'libs/common/core';\r\n\r\nimport { SpinnerButtonModelAttributes, SpinnerButtonComponent } from 'shared/components/spinner-button/SpinnerButtonComponent';\r\nimport { SpinnerSize, SpinnerType } from 'shared/utils';\r\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\r\n\r\nimport { MediaConcatenateStatus } from 'apps/library-editor/enums';\r\nimport { LibraryEditorActions } from 'apps/library-editor/constants';\r\nimport { ChapterConcatenateRequest } from 'apps/library-editor/models';\r\n\r\nimport ConcatenateRequestTemplate from './ConcatenateRequest.hbs';\r\nimport styles from './concatenate-request.scss';\r\n\r\ninterface ConcatenateRequestComponentOptions extends Core.ComponentOptions<ChapterConcatenateRequest> {\r\n type: 'chapters' | 'subtitles' | 'clickViewSubtitles';\r\n model?: ChapterConcatenateRequest;\r\n}\r\n\r\nexport class ConcatenateRequestComponent extends Core.Component<ChapterConcatenateRequest> {\r\n public options: ConcatenateRequestComponentOptions;\r\n private spinnerModel: Core.Model;\r\n\r\n constructor(options: ConcatenateRequestComponentOptions) {\r\n super(options);\r\n }\r\n\r\n public initialize(): void {\r\n this.spinnerModel = new Core.Model({ showSpinner: this.isProcessing() });\r\n\r\n this.listenTo(this.options.channelName, LibraryEditorActions.MergeChapters, this.onClickMergeChapters);\r\n }\r\n\r\n public get name(): string {\r\n return 'ConcatenateRequestComponent';\r\n }\r\n\r\n public get template(): any {\r\n return ConcatenateRequestTemplate;\r\n }\r\n\r\n public get lang(): string {\r\n return 'libraryEditor.concatenateRequest';\r\n }\r\n\r\n public get className(): string {\r\n return 'mt-3';\r\n }\r\n\r\n public regions(): ObjectHash {\r\n return {\r\n button: {\r\n el: '.btn-region',\r\n replaceElement: true\r\n }\r\n };\r\n }\r\n\r\n private onClickMergeChapters(): void {\r\n this.spinnerModel.set(SpinnerButtonModelAttributes.ShowSpinner, true);\r\n\r\n this.render();\r\n }\r\n\r\n private isProcessing(): boolean {\r\n if (!this.model)\r\n return false;\r\n\r\n return !!this.model.get('status') && (this.model.get('status') === MediaConcatenateStatus.New\r\n || this.model.get('status') === MediaConcatenateStatus.Concatenating);\r\n }\r\n\r\n private renderButton(): void {\r\n const copy = {\r\n chapters: LanguageService.getPhrase(this.lang, 'mergeChapters'),\r\n subtitles: LanguageService.getPhrase(this.lang, 'mergeChapters'),\r\n clickViewSubtitles: LanguageService.getPhrase(this.lang, 'enabledCustomSubtitles')\r\n };\r\n\r\n const spinnerButtonComponent = new SpinnerButtonComponent({\r\n buttonText: copy[this.options.type],\r\n extraButtonClass: `btn-primary ${styles.btn}`,\r\n model: this.spinnerModel,\r\n spinnerOptions: {\r\n size: SpinnerSize.Small,\r\n type: SpinnerType.Light,\r\n extraClasses: 'mx-auto'\r\n },\r\n channelName: this.options.channelName,\r\n saveEvent: LibraryEditorActions.MergeChapters,\r\n });\r\n\r\n this.showChildView('button', spinnerButtonComponent);\r\n }\r\n\r\n public viewOptions(): ObjectHash {\r\n const copy = {\r\n chapters: {\r\n heading: LanguageService.getPhrase(this.lang, 'chaptersHeading'),\r\n line1: LanguageService.getPhrase(this.lang, 'chaptersInfo1'),\r\n line2: LanguageService.getPhrase(this.lang, 'chaptersInfo2')\r\n },\r\n subtitles: {\r\n heading: LanguageService.getPhrase(this.lang, 'subtitlesHeading'),\r\n line1: LanguageService.getPhrase(this.lang, 'subtitlesInfo1'),\r\n line2: LanguageService.getPhrase(this.lang, 'subtitlesInfo2')\r\n },\r\n clickViewSubtitles: {\r\n heading: LanguageService.getPhrase(this.lang, 'cvSubtitlesHeading'),\r\n line1: LanguageService.getPhrase(this.lang, 'cvSubtitlesInfo1'),\r\n line2: LanguageService.getPhrase(this.lang, 'cvSubtitlesInfo2')\r\n }\r\n };\r\n\r\n var progress = this.model && this.model.get('progress') &&\r\n LanguageService.getPhrase(this.lang, 'progress', { progress: this.model.get('progress') });\r\n\r\n return {\r\n progress,\r\n componentOptions: copy[this.options.type],\r\n processing: this.spinnerModel.get(SpinnerButtonModelAttributes.ShowSpinner),\r\n failed: this.model && this.model.get('status') && this.model.get('status') === MediaConcatenateStatus.ConcatenationFailed\r\n };\r\n }\r\n\r\n public onRender(): void {\r\n this.renderButton();\r\n }\r\n}","// extracted by mini-css-extract-plugin\nmodule.exports = {\"btn\":\"cv--btn--59zg9\"};"],"sourceRoot":""}
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[38],{1023:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(2),i=n(244);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(u,e);var t,n,o,r=c(u);function u(){return a(this,u),r.apply(this,arguments)}return t=u,(n=[{key:"defaults",value:function(){return e={},t=i.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&s(t.prototype,n),o&&s(t,o),u}(o.a.Model)},1035:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(1),i=n(2),r=n(285);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(u,e);var t,n,i,a=c(u);function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,e)}return t=u,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,i="dropdown-menu-".concat(n);return o&&(i="".concat(i," ").concat(o)),i}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}},{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"childView",get:function(){return r.a}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}}])&&s(t.prototype,n),i&&s(t,i),u}(i.a.ComponentCollection)},1077:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(1),i=n(7),r=n(2),a=n(1035),s=n(13),l=n(1078),c=n.n(l),u=n(1079),d=n.n(u);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return y(this,n)}}function y(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(u,e);var t,n,r,l=g(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=l.call(this,e)).selectSearch="",t.sameCharIndex=1,t.optionStep=1,t}return t=u,(n=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(e){i.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),i.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){s.c.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(s.c.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(s.c.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),i.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=s.c.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=s.c.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(s.c.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=o.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=o.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var i=n[this.sameCharIndex];return i||(i=o.first(n),this.sameCharIndex=0),this.sameCharIndex++,i}return o.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){return!!e.get("divider")||!!o.isFunction(this.options.childOptions.isDisabled)&&this.options.childOptions.isDisabled.apply(this,arguments)}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=s.c.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:d.a,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.a({collection:this.collection,channelName:this.options.channelName,childOptions:o.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(d.a.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c.a}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}}])&&p(t.prototype,n),r&&p(t,r),u}(r.a.Component)},1078:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.disabled:r,t))},3:function(e,t,n,o,i){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<button \r\n class="dropdown-toggle form-control btn-block text-left position-relative '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectButton:r,t))+" "+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'" \r\n type="button" \r\n id="dropdownMenuButton" \r\n data-toggle="dropdown" \r\n aria-haspopup="true" \r\n aria-expanded="false"\r\n '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' \r\n name="'+s(a(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\r\n >\r\n '+s(a(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'\r\n</button>\r\n<div class="dropdown-region"></div>\r\n<div class="form-feedback"></div>'},useData:!0})},1079:function(e,t,n){e.exports={dropdownMenu:"_2RaQu",selectButton:"_2xGqi",disabled:"_15kWr"}},1302:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression,s=e.lambda;return'<p class="font-weight-bold mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(r=null!=t?t.options:t)?r.metadataType:r},data:i}))+'</p>\r\n<p class="mb-3 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.metadataValue:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.metadataValue:r,t))?r:"")+"</p>\r\n"},3:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return' <textarea\r\n id="suggest-edit"\r\n placeholder="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.suggestionPlaceholder:r,t))+'"\r\n class="form-control"\r\n name="suggestion"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.isOtherType:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n<div class="dropdown-divider"></div>\r\n\r\n<div class="form-group">\r\n <label for="suggest-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"suggestionSubheading",{name:"lang",hash:{},data:i}))+'</label>\r\n <div class="rating-select-region"></div>\r\n <div class="rating-form-feedback invalid-feedback"></div>\r\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.useRatingSelect:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\r\n\r\n<div class="form-group">\r\n <label for="reason-for-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"reasoningSubheading",{name:"lang",hash:{},data:i}))+'</label>\r\n <textarea\r\n id="reason-for-edit"\r\n placeholder="'+l((n.lang||t&&t.lang||s).call(a,"reasoningPlaceholder",{name:"lang",hash:{},data:i}))+'"\r\n class="form-control"\r\n name="reason"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})},1303:function(e,t,n){e.exports={metadataValue:"_3nkrW"}},1304:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||a).call(r,"guidelines",{name:"lang",hash:{},data:i}))+'</p>\r\n<p class="font-weight-bold mb-1">'+s((n.lang||t&&t.lang||a).call(r,"dropdownHeading",{name:"lang",hash:{},data:i}))+'</p>\r\n<div class="metadata-dropdown-region position-relative"></div>\r\n<div class="suggest-edit-region"></div>\r\n'},3:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.spinnerEl:r,t))?r:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.dataFetched:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:""},useData:!0})},1453:function(e,t,n){"use strict";n.r(t);var o=n(1),i=n(3),r=n(2),a=n(5),s=n(30),l=n(4),c=n(42),u=n(13);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(n,e);var t=h(n);function n(){return f(this,n),t.apply(this,arguments)}return n}(r.a.Model),v=n(304),b=n(1023),w=n(135),S=n(186),k=n(0),O=n(1044),M=n(1077),T=n(244),x=n(281),E=n(6),C=n(7),R=n(29),P=n(1188),_=n(185),V=n(1027),N=n(1302),j=n.n(N),D=n(1303),I=n.n(D);function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=H(e);if(t){var i=H(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return U(this,n)}}function U(e,t){return!t||"object"!==L(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var q,J=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&B(e,t)}(s,e);var t,n,o,a=F(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,e)}return t=s,(n=[{key:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{key:"getMetadataValue",value:function(){return this.options.metadataType===_.e.BroadcastDate?this.options.metadataValue?R(this.options.metadataValue).format(E.p.FULL_YEAR):i.a.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof r.a.Collection?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):i.a.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||i.a.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===_.e.Other?i.a.getPhrase(this.lang,"otherSuggestionPlaceholder"):i.a.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:V.i.translateMetadataName(this.options.metadataType).toLowerCase()})}},{key:"renderRatingSelect",value:function(){this.options.ratingValidationMessage?this.getUI("ratingValidation").text(this.options.ratingValidationMessage).attr("style","display: block;"):this.getUI("ratingValidation").hide(),this.options.metadataType===_.e.Rating&&this.showChildView("ratingSelect",new P.a({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:I.a,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===_.e.Rating,isOtherType:this.options.metadataType===_.e.Other,metadataType:V.i.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),C.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),C.Validation.unbind(this)}},{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return j.a}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{key:"bindings",get:function(){return{"[name=suggestion]":{observe:"suggestion",setOptions:{validate:!0}},"[name=reason]":{observe:"reason",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{ratingValidation:".rating-form-feedback"}}}])&&A(t.prototype,n),o&&A(t,o),s}(r.a.Component);!function(e){e[e.Email=0]="Email"}(q||(q={}));var z=n(154),G=n(58),K=Object.assign(Object.assign({},z.a),{createSuggestEditNotification:function(e){return{_type:G.a.SuggestEdit,groupId:e.groupId,receiverId:0,countryCode:e.countryCode,channels:[q.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),W=n(1304),$=n.n(W);function Q(e){return(Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Y(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=te(e);if(t){var i=te(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return ee(this,n)}}function ee(e,t){return!t||"object"!==Q(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function te(e){return(te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"SuggestAnEditView",(function(){return ne}));var ne=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&X(e,t)}(f,e);var t,n,r,d=Z(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),d.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=a.a.getInstance(k.g.Video,this),this.ratingsDataService=a.a.getInstance(k.g.Ratings,this),this.notificationDataService=a.a.getInstance(k.g.Notifications,this),this.selectedMetadata=new m,this.metadataCollection=this.getMetadataCollection(),this.bindListeners()}},{key:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(k.e.VIDEO,"".concat(k.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(k.e.NOTIFICATIONS,"".concat(k.f.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(e){var t=this;if(this.validateForm()){this.spinnerModel.set(T.c.ShowSpinner,!0);var n=this.selectedMetadata.get("metadataType")===_.e.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),o=this.config.get("suggestEditMetadataGroupId"),i=K.createSuggestEditNotification({groupId:o,countryCode:this.currentUser.get("countryCode"),video:this.model.toJSON(),user:this.currentUser.toJSON(),property:this.selectedMetadata.get("metadataType").toLowerCase(),suggestion:n,reason:this.viewModel.get("reason"),currentValue:this.selectedMetadata.get("metadataValue")});this.notificationDataService.suggestEdit(i,(function(){t.triggerMethod("hide"),t.spinnerModel.set(T.c.ShowSpinner,!1),t.spinnerModel.set(T.c.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(T.c.ShowSpinner,!1)}},{key:"onMetadataSelect",value:function(e){this.selectMetadata(e),this.renderSuggestEdit()}},{key:"onSelectRating",value:function(e){this.viewModel.set("ratingSuggestion",e.get("name")),this.renderSuggestEdit()}},{key:"selectMetadata",value:function(e){this.spinnerModel.set(T.c.Disabled,!1),u.c.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==_.e.Other?this.model.get(e.get("property")):null}),e.get("name")!==_.e.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){return new O.a(Object.keys(_.f).map((function(e){return _.f[e]})))}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=s.a.get(this.viewModelName),this.viewModel.addValidation(V.h)}},{key:"validateForm",value:function(){this.renderSuggestEdit(),this.viewModel.validate();var e=this.viewModel.toJSON(),t=e.reason,n=e.suggestion;return!(this.getRatingValidationMessage()||this.selectedMetadata.get("metadataType")!==_.e.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==_.e.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?V.g.original():"":V.g.empty()}},{key:"checkPreselection",value:function(){if(!this.selectedMetadata.get("metadataType")&&this.options.metadata&&this.dataFetched()){var e=this.getMetadataByType(this.options.metadata);this.selectMetadata(e)}}},{key:"logAction",value:function(){var e=u.x.getSourceTypes(this.model);e=o.filter(e,(function(e){return e!==E.h.CustomLibrary}));var t={videoSourceTypes:o.sortBy(o.unique(e),(function(e){return e})).join(","),videoId:this.model.get("id"),metadataProperty:this.selectedMetadata.get("metadataType"),metadataPropertyValue:this.selectedMetadata.get("metadataValue"),suggestion:this.viewModel.get("suggestion"),reason:this.viewModel.get("reason")};c.a.logUserAction(t,{descriptor:l.p.Edit,location:l.k.Popup,actionType:l.q.Suggest,entity:l.e.Video})}},{key:"dataFetched",value:function(){return!!this.model&&!!this.ratingCollection}},{key:"renderMetadataDropdown",value:function(){this.showChildView("dropdown",new M.a({collection:V.i.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||i.a.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:c.a}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new J({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new v.a(this.ratingCollection.findWhere({name:this.viewModel.get("ratingSuggestion")})):null,metadataType:this.selectedMetadata.get("metadataType"),metadataValue:this.selectedMetadata.get("metadataValue"),ratingValidationMessage:this.getRatingValidationMessage()}))}},{key:"onBeforeRender",value:function(){this.dataFetched()||(this.model=this.videoDataService.getVideo(this.options.videoId),this.ratingCollection=this.ratingsDataService.getAllRatings()),this.checkPreselection()}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:u.q.getSpinner({size:u.r.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return $.a}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"lang",get:function(){return"libraryEditor.suggestAnEdit"}},{key:"title",get:function(){return i.a.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return u.k.generateUniqueChannelName(this)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:x.f,title:i.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new b.a,channelName:this.channelName,buttonText:i.a.getPhrase(this.lang,"submit"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"requiredResources",get:function(){return{config:S.b.config,currentUser:w.b.currentUser}}}])&&Y(t.prototype,n),r&&Y(t,r),f}(r.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[38],{1019:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(2),i=n(244);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(u,e);var t,n,o,r=c(u);function u(){return a(this,u),r.apply(this,arguments)}return t=u,(n=[{key:"defaults",value:function(){return e={},t=i.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&s(t.prototype,n),o&&s(t,o),u}(o.a.Model)},1031:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var o=n(1),i=n(2),r=n(285);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return u(this,n)}}function u(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&l(e,t)}(u,e);var t,n,i,a=c(u);function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,e)}return t=u,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,i="dropdown-menu-".concat(n);return o&&(i="".concat(i," ").concat(o)),i}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}},{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"childView",get:function(){return r.a}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}}])&&s(t.prototype,n),i&&s(t,i),u}(i.a.ComponentCollection)},1073:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(1),i=n(7),r=n(2),a=n(1031),s=n(13),l=n(1074),c=n.n(l),u=n(1075),d=n.n(u);function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return y(this,n)}}function y(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(u,e);var t,n,r,l=g(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=l.call(this,e)).selectSearch="",t.sameCharIndex=1,t.optionStep=1,t}return t=u,(n=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(e){i.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),i.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){s.c.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(s.c.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(s.c.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),i.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=s.c.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=s.c.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(s.c.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=o.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=o.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var i=n[this.sameCharIndex];return i||(i=o.first(n),this.sameCharIndex=0),this.sameCharIndex++,i}return o.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){return!!e.get("divider")||!!o.isFunction(this.options.childOptions.isDisabled)&&this.options.childOptions.isDisabled.apply(this,arguments)}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=s.c.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:d.a,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.a({collection:this.collection,channelName:this.options.channelName,childOptions:o.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(d.a.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c.a}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}}])&&p(t.prototype,n),r&&p(t,r),u}(r.a.Component)},1074:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.disabled:r,t))},3:function(e,t,n,o,i){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<button \r\n class="dropdown-toggle form-control btn-block text-left position-relative '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.selectButton:r,t))+" "+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'" \r\n type="button" \r\n id="dropdownMenuButton" \r\n data-toggle="dropdown" \r\n aria-haspopup="true" \r\n aria-expanded="false"\r\n '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.disabled:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' \r\n name="'+s(a(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\r\n >\r\n '+s(a(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'\r\n</button>\r\n<div class="dropdown-region"></div>\r\n<div class="form-feedback"></div>'},useData:!0})},1075:function(e,t,n){e.exports={dropdownMenu:"_2RaQu",selectButton:"_2xGqi",disabled:"_15kWr"}},1298:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression,s=e.lambda;return'<p class="font-weight-bold mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(r=null!=t?t.options:t)?r.metadataType:r},data:i}))+'</p>\r\n<p class="mb-3 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.metadataValue:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.metadataValue:r,t))?r:"")+"</p>\r\n"},3:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return' <textarea\r\n id="suggest-edit"\r\n placeholder="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.suggestionPlaceholder:r,t))+'"\r\n class="form-control"\r\n name="suggestion"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.isOtherType:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\r\n<div class="dropdown-divider"></div>\r\n\r\n<div class="form-group">\r\n <label for="suggest-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"suggestionSubheading",{name:"lang",hash:{},data:i}))+'</label>\r\n <div class="rating-select-region"></div>\r\n <div class="rating-form-feedback invalid-feedback"></div>\r\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.useRatingSelect:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\r\n\r\n<div class="form-group">\r\n <label for="reason-for-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"reasoningSubheading",{name:"lang",hash:{},data:i}))+'</label>\r\n <textarea\r\n id="reason-for-edit"\r\n placeholder="'+l((n.lang||t&&t.lang||s).call(a,"reasoningPlaceholder",{name:"lang",hash:{},data:i}))+'"\r\n class="form-control"\r\n name="reason"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})},1299:function(e,t,n){e.exports={metadataValue:"_3nkrW"}},1300:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||a).call(r,"guidelines",{name:"lang",hash:{},data:i}))+'</p>\r\n<p class="font-weight-bold mb-1">'+s((n.lang||t&&t.lang||a).call(r,"dropdownHeading",{name:"lang",hash:{},data:i}))+'</p>\r\n<div class="metadata-dropdown-region position-relative"></div>\r\n<div class="suggest-edit-region"></div>\r\n'},3:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.spinnerEl:r,t))?r:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.dataFetched:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:""},useData:!0})},1449:function(e,t,n){"use strict";n.r(t);var o=n(1),i=n(3),r=n(2),a=n(5),s=n(30),l=n(4),c=n(42),u=n(13);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=y(e);if(t){var i=y(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&p(e,t)}(n,e);var t=h(n);function n(){return f(this,n),t.apply(this,arguments)}return n}(r.a.Model),v=n(304),b=n(1019),w=n(135),S=n(186),k=n(0),O=n(1040),M=n(1073),T=n(244),x=n(281),E=n(6),C=n(7),R=n(29),P=n(1184),_=n(185),V=n(1023),N=n(1298),j=n.n(N),D=n(1299),I=n.n(D);function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function A(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function B(e,t){return(B=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function F(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=H(e);if(t){var i=H(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return U(this,n)}}function U(e,t){return!t||"object"!==L(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function H(e){return(H=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var q,J=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&B(e,t)}(s,e);var t,n,o,a=F(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,e)}return t=s,(n=[{key:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{key:"getMetadataValue",value:function(){return this.options.metadataType===_.e.BroadcastDate?this.options.metadataValue?R(this.options.metadataValue).format(E.p.FULL_YEAR):i.a.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof r.a.Collection?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):i.a.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||i.a.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===_.e.Other?i.a.getPhrase(this.lang,"otherSuggestionPlaceholder"):i.a.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:V.i.translateMetadataName(this.options.metadataType).toLowerCase()})}},{key:"renderRatingSelect",value:function(){this.options.ratingValidationMessage?this.getUI("ratingValidation").text(this.options.ratingValidationMessage).attr("style","display: block;"):this.getUI("ratingValidation").hide(),this.options.metadataType===_.e.Rating&&this.showChildView("ratingSelect",new P.a({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:I.a,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===_.e.Rating,isOtherType:this.options.metadataType===_.e.Other,metadataType:V.i.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),C.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),C.Validation.unbind(this)}},{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return j.a}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{key:"bindings",get:function(){return{"[name=suggestion]":{observe:"suggestion",setOptions:{validate:!0}},"[name=reason]":{observe:"reason",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{ratingValidation:".rating-form-feedback"}}}])&&A(t.prototype,n),o&&A(t,o),s}(r.a.Component);!function(e){e[e.Email=0]="Email"}(q||(q={}));var z=n(154),G=n(58),K=Object.assign(Object.assign({},z.a),{createSuggestEditNotification:function(e){return{_type:G.a.SuggestEdit,groupId:e.groupId,receiverId:0,countryCode:e.countryCode,channels:[q.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),W=n(1300),$=n.n(W);function Q(e){return(Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Y(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function X(e,t){return(X=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Z(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=te(e);if(t){var i=te(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return ee(this,n)}}function ee(e,t){return!t||"object"!==Q(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function te(e){return(te=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"SuggestAnEditView",(function(){return ne}));var ne=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&X(e,t)}(f,e);var t,n,r,d=Z(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),d.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=a.a.getInstance(k.g.Video,this),this.ratingsDataService=a.a.getInstance(k.g.Ratings,this),this.notificationDataService=a.a.getInstance(k.g.Notifications,this),this.selectedMetadata=new m,this.metadataCollection=this.getMetadataCollection(),this.bindListeners()}},{key:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(k.e.VIDEO,"".concat(k.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(k.e.NOTIFICATIONS,"".concat(k.f.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(e){var t=this;if(this.validateForm()){this.spinnerModel.set(T.c.ShowSpinner,!0);var n=this.selectedMetadata.get("metadataType")===_.e.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),o=this.config.get("suggestEditMetadataGroupId"),i=K.createSuggestEditNotification({groupId:o,countryCode:this.currentUser.get("countryCode"),video:this.model.toJSON(),user:this.currentUser.toJSON(),property:this.selectedMetadata.get("metadataType").toLowerCase(),suggestion:n,reason:this.viewModel.get("reason"),currentValue:this.selectedMetadata.get("metadataValue")});this.notificationDataService.suggestEdit(i,(function(){t.triggerMethod("hide"),t.spinnerModel.set(T.c.ShowSpinner,!1),t.spinnerModel.set(T.c.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(T.c.ShowSpinner,!1)}},{key:"onMetadataSelect",value:function(e){this.selectMetadata(e),this.renderSuggestEdit()}},{key:"onSelectRating",value:function(e){this.viewModel.set("ratingSuggestion",e.get("name")),this.renderSuggestEdit()}},{key:"selectMetadata",value:function(e){this.spinnerModel.set(T.c.Disabled,!1),u.c.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==_.e.Other?this.model.get(e.get("property")):null}),e.get("name")!==_.e.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){return new O.a(Object.keys(_.f).map((function(e){return _.f[e]})))}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=s.a.get(this.viewModelName),this.viewModel.addValidation(V.h)}},{key:"validateForm",value:function(){this.renderSuggestEdit(),this.viewModel.validate();var e=this.viewModel.toJSON(),t=e.reason,n=e.suggestion;return!(this.getRatingValidationMessage()||this.selectedMetadata.get("metadataType")!==_.e.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==_.e.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?V.g.original():"":V.g.empty()}},{key:"checkPreselection",value:function(){if(!this.selectedMetadata.get("metadataType")&&this.options.metadata&&this.dataFetched()){var e=this.getMetadataByType(this.options.metadata);this.selectMetadata(e)}}},{key:"logAction",value:function(){var e=u.x.getSourceTypes(this.model);e=o.filter(e,(function(e){return e!==E.h.CustomLibrary}));var t={videoSourceTypes:o.sortBy(o.unique(e),(function(e){return e})).join(","),videoId:this.model.get("id"),metadataProperty:this.selectedMetadata.get("metadataType"),metadataPropertyValue:this.selectedMetadata.get("metadataValue"),suggestion:this.viewModel.get("suggestion"),reason:this.viewModel.get("reason")};c.a.logUserAction(t,{descriptor:l.p.Edit,location:l.k.Popup,actionType:l.q.Suggest,entity:l.e.Video})}},{key:"dataFetched",value:function(){return!!this.model&&!!this.ratingCollection}},{key:"renderMetadataDropdown",value:function(){this.showChildView("dropdown",new M.a({collection:V.i.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||i.a.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:c.a}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new J({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new v.a(this.ratingCollection.findWhere({name:this.viewModel.get("ratingSuggestion")})):null,metadataType:this.selectedMetadata.get("metadataType"),metadataValue:this.selectedMetadata.get("metadataValue"),ratingValidationMessage:this.getRatingValidationMessage()}))}},{key:"onBeforeRender",value:function(){this.dataFetched()||(this.model=this.videoDataService.getVideo(this.options.videoId),this.ratingCollection=this.ratingsDataService.getAllRatings()),this.checkPreselection()}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:u.q.getSpinner({size:u.r.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return $.a}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"lang",get:function(){return"libraryEditor.suggestAnEdit"}},{key:"title",get:function(){return i.a.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return u.k.generateUniqueChannelName(this)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:x.f,title:i.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new b.a,channelName:this.channelName,buttonText:i.a.getPhrase(this.lang,"submit"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"requiredResources",get:function(){return{config:S.b.config,currentUser:w.b.currentUser}}}])&&Y(t.prototype,n),r&&Y(t,r),f}(r.a.View)}}]);
@@ -1 +1 @@
1
- {"version":3,"sources":["file://C:/ClickView Projects/clickview/packages/projects/library-editor/src/apps/migration-wizard/views/show-video-popup/ShowPublisherVideoPopup.hbs","file://C:/ClickView Projects/clickview/packages/projects/library-editor/src/apps/migration-wizard/views/show-video-popup/ShowPublisherVideoPopupView.ts","webpack://@clickview/library-editor/./src/apps/migration-wizard/views/show-video-popup/show-publisher-video-popup.scss?13fb"],"names":[],"mappings":";;;;;;;;;AAAA,iBAAiB,mBAAO,CAAC,8BAAY;AACrC,iEAAiE;AACjE;;AAEA;AACA;AACA,CAAC;AACD,oHAAoH;;AAEpH;AACA,qFAAqF,qBAAqB,yEAAyE;AACnL,0FAA0F,qBAAqB,yEAAyE;AACxL,wFAAwF,qBAAqB,yEAAyE;AACtL,8FAA8F,qBAAqB,0EAA0E;AAC7L,wFAAwF,qBAAqB,0EAA0E;AACvL,0FAA0F,qBAAqB,0EAA0E;AACzL,wFAAwF,qBAAqB,0EAA0E;AACvL,wFAAwF,qBAAqB,0EAA0E;AACvL,yFAAyF,qBAAqB,0EAA0E;AACxL,4IAA4I,qBAAqB,0EAA0E;AAC3O,2FAA2F,qBAAqB,0EAA0E;AAC1L,sFAAsF,qBAAqB,0EAA0E;AACrL;AACA,2FAA2F,qBAAqB,0EAA0E;AAC1L;AACA,CAAC;AACD;;AAEA;AACA,qQAAqQ,GAAG,wBAAwB,aAAa;AAC7S;AACA,CAAC;AACD;;AAEA;AACA,+QAA+Q,GAAG,6BAA6B,aAAa;AAC5T;AACA,CAAC;AACD;;AAEA;AACA,2QAA2Q,GAAG,2BAA2B,aAAa;AACtT;AACA,CAAC;AACD;;AAEA;AACA,uRAAuR,GAAG,iCAAiC,aAAa;AACxU;AACA,CAAC;AACD;;AAEA;AACA,2QAA2Q,GAAG,2BAA2B,aAAa;AACtT;AACA,CAAC;AACD;;AAEA;AACA,+QAA+Q,GAAG,6BAA6B,aAAa;AAC5T;AACA,CAAC;AACD;;AAEA;AACA,2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AErD,wBAAgB,EAAE;AAAE,cAAI,EAAE,uEAAS,CAAC;AAAlB;AAFmC,OAAvB,CAAhC;AAID;AA9FH;AAAA;AAAA,wBAkBiB;AACb,aAAO,6BAAP;AACD;AApBH;AAAA;AAAA,wBAsBkB;AACd,aAAO,KAAP;AACD;AAxBH;AAAA;AAAA,wBA0BoB;AAChB,aAAO,GAAP;AACD;AA5BH;AAAA;AAAA,wBA8BqB;AACjB,aAAO,oEAAP;AACD;AAhCH;AAAA;AAAA,wBAwCsB;AAClB,aAAO,CAAC;AACN,qBAAa,EAAE,+DADT;AAEN,aAAK,EAAE,iCAFD;AAGN,uBAAe,EAAE,IAHX;AAIN,YAAI,EAAE;AAJA,OAAD,CAAP;AAMD;AA/CH;AAAA;AAAA,wBAyE8B;AAC1B,aAAO;AACL,cAAM,EAAE,0FAAuB,CAAC;AAD3B,OAAP;AAGD;AA7EH;;AAAA;AAAA,EAAiD,8DAAI,CAAC,IAAtD,E;;;;;;;;;;;AC1BA;AACA,kBAAkB,oC","file":"scripts/38.chunk.js","sourcesContent":["var Handlebars = require('handlebars');\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = container.lambda(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.spinnerEl : stack1), depth0)) != null ? stack1 : \"\")\n + \"\\r\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"<div class=\\\"row\\\">\\r\\n <div class=\\\"col-7\\\">\\r\\n <div class=\\\"row no-gutters\\\">\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.title : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.seriesName : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(6, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.duration : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(8, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.productionYear : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(10, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.audience : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(12, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.ratingCode : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(14, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.itemCode : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(16, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.producer : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(18, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.publisher : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(20, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.dateBroadcast : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(22, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.distributor : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(24, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.source : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(26, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" </div>\\r\\n </div>\\r\\n <div class=\\\"col-5\\\">\\r\\n <div class=\\\"thumbnail-region\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"col-12\\\">\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.description : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(28, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" </div>\\r\\n</div>\\r\\n\";\n},\"4\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Title</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"title\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"6\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Series</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.seriesName || (depth0 != null ? depth0.seriesName : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"seriesName\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"8\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Duration</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.duration || (depth0 != null ? depth0.duration : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"duration\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"10\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Year</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.productionYear || (depth0 != null ? depth0.productionYear : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"productionYear\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"12\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Audience</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.audience || (depth0 != null ? depth0.audience : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"audience\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"14\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Rating</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.ratingCode || (depth0 != null ? depth0.ratingCode : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"ratingCode\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"16\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Identifier</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.itemCode || (depth0 != null ? depth0.itemCode : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"itemCode\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"18\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Creator</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.producer || (depth0 != null ? depth0.producer : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"producer\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"20\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Publisher</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.publisher || (depth0 != null ? depth0.publisher : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"publisher\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"22\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Date Broadcast</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.dateBroadcast : stack1), depth0))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"24\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Distributor</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.distributor || (depth0 != null ? depth0.distributor : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"distributor\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"26\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Source</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.source || (depth0 != null ? depth0.source : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"source\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"28\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <label class=\\\"font-weight-bold\\\">Description</label>\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"description\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.dataFetched : stack1),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(3, data, 0),\"data\":data})) != null ? stack1 : \"\")\n + \"\\r\\n\";\n},\"useData\":true});","import { ObjectHash } from 'backbone';\r\nimport * as moment from 'moment';\r\n\r\nimport { InstanceManager } from 'libs/common/backbone/services/InstanceManager';\r\nimport { Core } from 'libs/common/core';\r\nimport { ThumbnailComponent } from 'libs/shared/legacy/components/thumbnail/ThumbnailComponent';\r\nimport { ImageSize } from 'libs/shared/enums/Images';\r\n\r\nimport { SpinnerSize, SpinnerHelper } from 'shared/utils';\r\nimport { PopupBehavior } from 'shared/behaviors';\r\nimport { Config } from 'shared/models/Config';\r\nimport { Video } from 'shared/models/Video';\r\nimport { DataServices, DataPrefixes, DataChannels } from 'shared/constants';\r\nimport { ConfigDataServiceHelper } from 'shared/services/ConfigDataService';\r\nimport { TimeType } from 'shared/enums';\r\n\r\nimport { MigrationVideoDataService } from 'apps/migration-wizard/services/MigrationVideoDataService';\r\n\r\nimport styles from './show-publisher-video-popup.scss';\r\nimport ShowVideoPopupTemplate from './ShowPublisherVideoPopup.hbs';\r\n\r\ninterface ShowPublisherVideoPopupViewOptions extends Core.ViewOptions {\r\n trackingCode?: string;\r\n masterId?: string;\r\n}\r\n\r\nexport class ShowPublisherVideoPopupView extends Core.View {\r\n private config: Config;\r\n public options: ShowPublisherVideoPopupViewOptions;\r\n private migrationVideoDataService: MigrationVideoDataService;\r\n\r\n constructor(options: ShowPublisherVideoPopupViewOptions) {\r\n super(options);\r\n }\r\n\r\n public initialize(): void {\r\n this.migrationVideoDataService = InstanceManager.getInstance(DataServices.MigrationVideo, this);\r\n\r\n this.listenTo(DataChannels.MIGRATION,\r\n `${DataPrefixes.CUSTOMER_VIDEO}:${this.options.trackingCode}:sync`, this.render);\r\n this.listenTo(DataChannels.MIGRATION,\r\n `${DataPrefixes.CUSTOMER_VIDEO}:${this.options.masterId}:sync`, this.render);\r\n }\r\n\r\n public get name(): string {\r\n return 'ShowPublisherVideoPopupView';\r\n }\r\n\r\n public get title(): boolean {\r\n return false;\r\n }\r\n\r\n public get tagName(): string {\r\n return 'p';\r\n }\r\n\r\n public get template(): any {\r\n return ShowVideoPopupTemplate;\r\n }\r\n\r\n public regions(): ObjectHash {\r\n return {\r\n thumbnail: '.thumbnail-region'\r\n };\r\n }\r\n\r\n public get behaviors(): any[] {\r\n return [{\r\n behaviorClass: PopupBehavior,\r\n title: 'Publisher Archive Video Details',\r\n hideCloseButton: true,\r\n size: 'modal-lg'\r\n }];\r\n }\r\n\r\n private getUrl(): string {\r\n if (!this.model) return;\r\n\r\n const imageCdnUrl = this.config.get('imageCdnUrl');\r\n const trackingCode = this.model.get('trackingCode');\r\n\r\n return `${imageCdnUrl}v1/thumbnails/trackingcode/${trackingCode}`;\r\n }\r\n\r\n private getBroadcastDate(): string {\r\n if (!this.model.get('dateBroadcast')) return '';\r\n\r\n return moment(this.model.get('dateBroadcast')).format(TimeType.FULL_YEAR);\r\n }\r\n\r\n public viewOptions(): ObjectHash {\r\n return {\r\n styles,\r\n dataFetched: !!this.model,\r\n spinnerEl: SpinnerHelper.getSpinner({ size: SpinnerSize.Large, extraClasses: 'mx-auto' }),\r\n dateBroadcast: this.getBroadcastDate()\r\n };\r\n }\r\n\r\n public get requiredResources(): Core.RequiredResourceHash {\r\n return {\r\n config: ConfigDataServiceHelper.config\r\n };\r\n }\r\n\r\n public onBeforeRender(): boolean {\r\n if (this.options.trackingCode)\r\n this.model = this.migrationVideoDataService.getCustomerVideoByTrackingCode(this.options.trackingCode);\r\n\r\n if (this.options.masterId)\r\n this.model = this.migrationVideoDataService.getCustomerVideoByMasterId(this.options.masterId);\r\n\r\n return !!this.model;\r\n }\r\n\r\n public onRender(): void {\r\n this.showChildView('thumbnail', new ThumbnailComponent({\r\n model: new Video({ thumbnail: { url: this.getUrl() } }, { parse: true }),\r\n thumbnailOptions: { size: ImageSize.Small }\r\n }));\r\n }\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"thumbnail\":\"cv--thumbnail--3S7KI\"};"],"sourceRoot":""}
1
+ {"version":3,"sources":["file://C:/ClickView Projects/@clickview/packages/projects/library-editor/src/apps/migration-wizard/views/show-video-popup/ShowPublisherVideoPopup.hbs","file://C:/ClickView Projects/@clickview/packages/projects/library-editor/src/apps/migration-wizard/views/show-video-popup/ShowPublisherVideoPopupView.ts","webpack://@clickview/library-editor/./src/apps/migration-wizard/views/show-video-popup/show-publisher-video-popup.scss?6ad3"],"names":[],"mappings":";;;;;;;;;AAAA,iBAAiB,mBAAO,CAAC,8BAAY;AACrC,iEAAiE;AACjE;;AAEA;AACA;AACA,CAAC;AACD,oHAAoH;;AAEpH;AACA,qFAAqF,qBAAqB,yEAAyE;AACnL,0FAA0F,qBAAqB,yEAAyE;AACxL,wFAAwF,qBAAqB,yEAAyE;AACtL,8FAA8F,qBAAqB,0EAA0E;AAC7L,wFAAwF,qBAAqB,0EAA0E;AACvL,0FAA0F,qBAAqB,0EAA0E;AACzL,wFAAwF,qBAA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;;;;AC1BA;AACA,kBAAkB,oC","file":"scripts/38.chunk.js","sourcesContent":["var Handlebars = require('handlebars');\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = container.lambda(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.spinnerEl : stack1), depth0)) != null ? stack1 : \"\")\n + \"\\r\\n\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"<div class=\\\"row\\\">\\r\\n <div class=\\\"col-7\\\">\\r\\n <div class=\\\"row no-gutters\\\">\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.title : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(4, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.seriesName : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(6, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.duration : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(8, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.productionYear : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(10, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.audience : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(12, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.ratingCode : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(14, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.itemCode : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(16, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.producer : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(18, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.publisher : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(20, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.dateBroadcast : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(22, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.distributor : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(24, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.source : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(26, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" </div>\\r\\n </div>\\r\\n <div class=\\\"col-5\\\">\\r\\n <div class=\\\"thumbnail-region\\\"></div>\\r\\n </div>\\r\\n <div class=\\\"col-12\\\">\\r\\n\"\n + ((stack1 = helpers[\"if\"].call(alias2,(depth0 != null ? depth0.description : depth0),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(28, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" </div>\\r\\n</div>\\r\\n\";\n},\"4\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Title</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.title || (depth0 != null ? depth0.title : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"title\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"6\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Series</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.seriesName || (depth0 != null ? depth0.seriesName : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"seriesName\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"8\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Duration</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.duration || (depth0 != null ? depth0.duration : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"duration\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"10\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Year</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.productionYear || (depth0 != null ? depth0.productionYear : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"productionYear\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"12\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Audience</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.audience || (depth0 != null ? depth0.audience : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"audience\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"14\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Rating</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.ratingCode || (depth0 != null ? depth0.ratingCode : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"ratingCode\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"16\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Identifier</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.itemCode || (depth0 != null ? depth0.itemCode : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"itemCode\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"18\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Creator</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.producer || (depth0 != null ? depth0.producer : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"producer\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"20\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Publisher</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.publisher || (depth0 != null ? depth0.publisher : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"publisher\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"22\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Date Broadcast</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(container.lambda(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.dateBroadcast : stack1), depth0))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"24\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Distributor</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.distributor || (depth0 != null ? depth0.distributor : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"distributor\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"26\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <div class=\\\"col-4\\\">\\r\\n <label class=\\\"font-weight-bold\\\">Source</label>\\r\\n </div>\\r\\n <div class=\\\"col-8\\\">\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.source || (depth0 != null ? depth0.source : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"source\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n </div>\\r\\n\";\n},\"28\":function(container,depth0,helpers,partials,data) {\n var helper, alias1=container.propertyIsEnumerable;\n\n return \" <label class=\\\"font-weight-bold\\\">Description</label>\\r\\n <p>\"\n + container.escapeExpression(((helper = (helper = helpers.description || (depth0 != null ? depth0.description : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === \"function\" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{\"name\":\"description\",\"hash\":{},\"data\":data}) : helper)))\n + \"</p>\\r\\n\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable;\n\n return ((stack1 = helpers.unless.call(depth0 != null ? depth0 : (container.nullContext || {}),((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.dataFetched : stack1),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.program(3, data, 0),\"data\":data})) != null ? stack1 : \"\")\n + \"\\r\\n\";\n},\"useData\":true});","import { ObjectHash } from 'backbone';\r\nimport * as moment from 'moment';\r\n\r\nimport { InstanceManager } from 'libs/common/backbone/services/InstanceManager';\r\nimport { Core } from 'libs/common/core';\r\nimport { ThumbnailComponent } from 'libs/shared/legacy/components/thumbnail/ThumbnailComponent';\r\nimport { ImageSize } from 'libs/shared/enums/Images';\r\n\r\nimport { SpinnerSize, SpinnerHelper } from 'shared/utils';\r\nimport { PopupBehavior } from 'shared/behaviors';\r\nimport { Config } from 'shared/models/Config';\r\nimport { Video } from 'shared/models/Video';\r\nimport { DataServices, DataPrefixes, DataChannels } from 'shared/constants';\r\nimport { ConfigDataServiceHelper } from 'shared/services/ConfigDataService';\r\nimport { TimeType } from 'shared/enums';\r\n\r\nimport { MigrationVideoDataService } from 'apps/migration-wizard/services/MigrationVideoDataService';\r\n\r\nimport styles from './show-publisher-video-popup.scss';\r\nimport ShowVideoPopupTemplate from './ShowPublisherVideoPopup.hbs';\r\n\r\ninterface ShowPublisherVideoPopupViewOptions extends Core.ViewOptions {\r\n trackingCode?: string;\r\n masterId?: string;\r\n}\r\n\r\nexport class ShowPublisherVideoPopupView extends Core.View {\r\n private config: Config;\r\n public options: ShowPublisherVideoPopupViewOptions;\r\n private migrationVideoDataService: MigrationVideoDataService;\r\n\r\n constructor(options: ShowPublisherVideoPopupViewOptions) {\r\n super(options);\r\n }\r\n\r\n public initialize(): void {\r\n this.migrationVideoDataService = InstanceManager.getInstance(DataServices.MigrationVideo, this);\r\n\r\n this.listenTo(DataChannels.MIGRATION,\r\n `${DataPrefixes.CUSTOMER_VIDEO}:${this.options.trackingCode}:sync`, this.render);\r\n this.listenTo(DataChannels.MIGRATION,\r\n `${DataPrefixes.CUSTOMER_VIDEO}:${this.options.masterId}:sync`, this.render);\r\n }\r\n\r\n public get name(): string {\r\n return 'ShowPublisherVideoPopupView';\r\n }\r\n\r\n public get title(): boolean {\r\n return false;\r\n }\r\n\r\n public get tagName(): string {\r\n return 'p';\r\n }\r\n\r\n public get template(): any {\r\n return ShowVideoPopupTemplate;\r\n }\r\n\r\n public regions(): ObjectHash {\r\n return {\r\n thumbnail: '.thumbnail-region'\r\n };\r\n }\r\n\r\n public get behaviors(): any[] {\r\n return [{\r\n behaviorClass: PopupBehavior,\r\n title: 'Publisher Archive Video Details',\r\n hideCloseButton: true,\r\n size: 'modal-lg'\r\n }];\r\n }\r\n\r\n private getUrl(): string {\r\n if (!this.model) return;\r\n\r\n const imageCdnUrl = this.config.get('imageCdnUrl');\r\n const trackingCode = this.model.get('trackingCode');\r\n\r\n return `${imageCdnUrl}v1/thumbnails/trackingcode/${trackingCode}`;\r\n }\r\n\r\n private getBroadcastDate(): string {\r\n if (!this.model.get('dateBroadcast')) return '';\r\n\r\n return moment(this.model.get('dateBroadcast')).format(TimeType.FULL_YEAR);\r\n }\r\n\r\n public viewOptions(): ObjectHash {\r\n return {\r\n styles,\r\n dataFetched: !!this.model,\r\n spinnerEl: SpinnerHelper.getSpinner({ size: SpinnerSize.Large, extraClasses: 'mx-auto' }),\r\n dateBroadcast: this.getBroadcastDate()\r\n };\r\n }\r\n\r\n public get requiredResources(): Core.RequiredResourceHash {\r\n return {\r\n config: ConfigDataServiceHelper.config\r\n };\r\n }\r\n\r\n public onBeforeRender(): boolean {\r\n if (this.options.trackingCode)\r\n this.model = this.migrationVideoDataService.getCustomerVideoByTrackingCode(this.options.trackingCode);\r\n\r\n if (this.options.masterId)\r\n this.model = this.migrationVideoDataService.getCustomerVideoByMasterId(this.options.masterId);\r\n\r\n return !!this.model;\r\n }\r\n\r\n public onRender(): void {\r\n this.showChildView('thumbnail', new ThumbnailComponent({\r\n model: new Video({ thumbnail: { url: this.getUrl() } }, { parse: true }),\r\n thumbnailOptions: { size: ImageSize.Small }\r\n }));\r\n }\r\n}\r\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"thumbnail\":\"cv--thumbnail--3S7KI\"};"],"sourceRoot":""}
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[39],{1023:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),o=n(244);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(c,e);var t,n,r,i=u(c);function c(){return l(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&a(t.prototype,n),r&&a(t,r),c}(r.a.Model)},1031:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(49),i=n(159),l=n(3),a="libraryEditor.utils",s={name:[{required:!0,msg:function(){return l.a.getPhrase(a,"folderNameRequired")}},{maxLength:255,msg:function(){return l.a.getPhrase(a,"folderNameExceeds")}}]},u=function(e,t){return{parentId:function(n){return n?o.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?l.a.getPhrase(a,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":l.a.getPhrase(a,"selectParentFolder")}}},c=function(e){var t=e.validateName,n=e.validateParent,o=e.folder,i=e.collection;return t&&n?r.extend({},s,u(o,i)):t?s:n?u(o,i):void 0}},1040:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(7),o=n(2),i=n(3),l=n(1054),a=n(13),s=n(1041),u=n.n(s),c=n(1042),f=n.n(c);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(c,e);var t,n,o,s=y(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,!0))}),{})}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=a.f.getSelected(this.options.folderTreeKey,this.collection),o=r?r.get("name"):i.a.getPhrase(this.lang,"button");this.getUI("button").text(o)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.a({styles:f.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:f.a.list,extraClasses:f.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:f.a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return u.a}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".custom-select"}}}])&&p(t.prototype,n),o&&p(t,o),c}(o.a.Component)},1041:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<button\r\n class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+a(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+a(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})},1042:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1098:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(2),o=n(281),i=n(13),l=n(1040),a=n(1031),s=n(1099),u=n.n(s);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(c,e);var t,n,r,s=p(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,"folder:selected",this.onFolderSelected)}},{key:"regions",value:function(){return{parentFolder:".parent-folder-region"}}},{key:"onFolderSelected",value:function(e,t){e&&(i.f.setSelected(this.folderTreeKey,e,this.collection,t),t||this.model.set("parentId",e.get("id"),{validate:!0}))}},{key:"renderSubFolders",value:function(){this.options.editParent&&this.showChildView("parentFolder",new l.a({collection:this.collection,channelName:this.options.channelName,folderTreeKey:this.folderTreeKey,disabledIds:this.options.disabledParentFolderIds}))}},{key:"viewOptions",value:function(){return{editName:this.options.editName,editParent:this.options.editParent}}},{key:"onRender",value:function(){this.renderSubFolders()}},{key:"name",get:function(){return"FolderDetailsComponent"}},{key:"template",get:function(){return u.a}},{key:"lang",get:function(){return"libraryEditor.folderDetails"}},{key:"folderTreeKey",get:function(){return this.options.folderTreeKey||"folderselect:".concat(this.cid)}},{key:"behaviors",get:function(){return[{behaviorClass:o.a,modelValidation:Object(a.a)({validateName:this.options.editName,validateParent:this.options.editParent,folder:this.options.model,collection:this.options.collection})},{behaviorClass:o.g}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}}])&&f(t.prototype,n),r&&f(t,r),c}(r.a.Component)},1099:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <div class="form-group">\r\n <label for="name" class="control-label">'+a((n.lang||t&&t.lang||l).call(i,"name",{name:"lang",hash:{},data:o}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+a((n.lang||t&&t.lang||l).call(i,"namePlaceholder",{name:"lang",hash:{},data:o}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;return' <div class="form-group pt-2">\r\n <label for="parentId" class="control-label">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"parent",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="parent-folder-region"></div>\r\n </div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return"<form>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editName:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editParent:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"</form>"},useData:!0})},1220:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){return'<div class="folder-details-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1408:function(e,t,n){"use strict";n.r(t),n.d(t,"MoveFolderView",(function(){return R}));var r=n(1),o=n(7),i=n(2),l=n(30),a=n(5),s=n(42),u=n(0),c=n(281),f=n(1023),d=n(82),p=n(13),h=n(244),y=n(3),b=n(1098),m=n(1220),v=n.n(m);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return S(this,n)}}function S(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&I(e,t)}(k,e);var t,n,m,g=O(k);function k(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),g.call(this,e)}return t=k,(n=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=a.a.getInstance(u.g.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(u.e.LIBRARY,"libraries:sync",this.render),this.listenTo(u.e.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render)}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(o.Radio.channel(this.channelName).trigger(h.b.ShowSpinner),this.saveFolder(),this.logAction())}},{key:"logAction",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId,r={id:this.options.folderId,isSubfolder:n.toString()!==this.library.get("id").toString(),oldParentId:t,newParentId:n};s.a.logUserAction(r,this.options.analyticsOptions)}},{key:"saveFolder",value:function(){var e=this,t=this.getParentIds(),n=t.oldParentId,r=t.newParentId;n!==r?this.libraryDataService.moveFolder(this.viewModel.get("id"),r,n,(function(){i.a.AppLinkHelper.trigger({application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.FOLDER,args:[e.viewModel.get("id")]}),e.triggerMethod("hide")})):i.a.AppLinkHelper.trigger({application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.FOLDER,args:[this.viewModel.get("id")]})}},{key:"getParentIds",value:function(){return{oldParentId:p.f.getParent(this.options.folderId,this.collection).get("id"),newParentId:this.viewModel.get("parentId")}}},{key:"setUpCollection",value:function(e){this.collection||(this.library=p.f.getLibrary(this.options.folderId,e),this.collection=this.library.children)}},{key:"setUpModel",value:function(e){this.model||(this.model=e,this.setUpViewModel())}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e="folder:details:".concat(this.options.folderId);this.viewModel=l.a.get(e,this.model.toJSON(),{ctor:d.a});var t=p.f.getParent(this.options.folderId,this.collection);this.viewModel.set("parentId",t?t.get("id"):null),this.listenTo(this.viewModel,"change:parentId",this.onParentChange)}}},{key:"onParentChange",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId;this.spinnerModel.set(h.c.Disabled,t===n)}},{key:"getDisabledParentFolderIds",value:function(){var e=[this.model.get("id").toString()];return this.viewModel.get("parentId")&&e.push(this.viewModel.get("parentId").toString()),this.model.children?[].concat(e,w(p.f.flatten(this.model.children).map((function(e){return e.id.toString()})))):e}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new b.a({model:this.viewModel,collection:this.collection,library:this.library,channelName:this.channelName,editName:!1,editParent:!0,disabledParentFolderIds:this.getDisabledParentFolderIds()});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){this.libraryDataService.getLibraries(r.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,r.bind(this.setUpModel,this))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:p.q.getSpinner({size:p.r.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}},{key:"name",get:function(){return"MoveFolderView"}},{key:"title",get:function(){return y.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.moveFolder"}},{key:"template",get:function(){return v.a}},{key:"channelName",get:function(){return p.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.f,title:y.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new f.a,channelName:this.channelName,buttonText:y.a.getPhrase(this.lang,"move"),onClick:function(t){return e.onSubmit(t)}}}]}}])&&P(t.prototype,n),m&&P(t,m),k}(i.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[39],{1019:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),o=n(244);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(c,e);var t,n,r,i=u(c);function c(){return l(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&a(t.prototype,n),r&&a(t,r),c}(r.a.Model)},1027:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(49),i=n(159),l=n(3),a="libraryEditor.utils",s={name:[{required:!0,msg:function(){return l.a.getPhrase(a,"folderNameRequired")}},{maxLength:255,msg:function(){return l.a.getPhrase(a,"folderNameExceeds")}}]},u=function(e,t){return{parentId:function(n){return n?o.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?l.a.getPhrase(a,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":l.a.getPhrase(a,"selectParentFolder")}}},c=function(e){var t=e.validateName,n=e.validateParent,o=e.folder,i=e.collection;return t&&n?r.extend({},s,u(o,i)):t?s:n?u(o,i):void 0}},1036:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(7),o=n(2),i=n(3),l=n(1050),a=n(13),s=n(1037),u=n.n(s),c=n(1038),f=n.n(c);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(c,e);var t,n,o,s=y(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,!0))}),{})}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=a.f.getSelected(this.options.folderTreeKey,this.collection),o=r?r.get("name"):i.a.getPhrase(this.lang,"button");this.getUI("button").text(o)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.a({styles:f.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:f.a.list,extraClasses:f.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:f.a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return u.a}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".custom-select"}}}])&&p(t.prototype,n),o&&p(t,o),c}(o.a.Component)},1037:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<button\r\n class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+a(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+a(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})},1038:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1094:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(2),o=n(281),i=n(13),l=n(1036),a=n(1027),s=n(1095),u=n.n(s);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(c,e);var t,n,r,s=p(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,"folder:selected",this.onFolderSelected)}},{key:"regions",value:function(){return{parentFolder:".parent-folder-region"}}},{key:"onFolderSelected",value:function(e,t){e&&(i.f.setSelected(this.folderTreeKey,e,this.collection,t),t||this.model.set("parentId",e.get("id"),{validate:!0}))}},{key:"renderSubFolders",value:function(){this.options.editParent&&this.showChildView("parentFolder",new l.a({collection:this.collection,channelName:this.options.channelName,folderTreeKey:this.folderTreeKey,disabledIds:this.options.disabledParentFolderIds}))}},{key:"viewOptions",value:function(){return{editName:this.options.editName,editParent:this.options.editParent}}},{key:"onRender",value:function(){this.renderSubFolders()}},{key:"name",get:function(){return"FolderDetailsComponent"}},{key:"template",get:function(){return u.a}},{key:"lang",get:function(){return"libraryEditor.folderDetails"}},{key:"folderTreeKey",get:function(){return this.options.folderTreeKey||"folderselect:".concat(this.cid)}},{key:"behaviors",get:function(){return[{behaviorClass:o.a,modelValidation:Object(a.a)({validateName:this.options.editName,validateParent:this.options.editParent,folder:this.options.model,collection:this.options.collection})},{behaviorClass:o.g}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}}])&&f(t.prototype,n),r&&f(t,r),c}(r.a.Component)},1095:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <div class="form-group">\r\n <label for="name" class="control-label">'+a((n.lang||t&&t.lang||l).call(i,"name",{name:"lang",hash:{},data:o}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+a((n.lang||t&&t.lang||l).call(i,"namePlaceholder",{name:"lang",hash:{},data:o}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;return' <div class="form-group pt-2">\r\n <label for="parentId" class="control-label">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"parent",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="parent-folder-region"></div>\r\n </div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return"<form>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editName:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editParent:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"</form>"},useData:!0})},1216:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){return'<div class="folder-details-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1404:function(e,t,n){"use strict";n.r(t),n.d(t,"MoveFolderView",(function(){return R}));var r=n(1),o=n(7),i=n(2),l=n(30),a=n(5),s=n(42),u=n(0),c=n(281),f=n(1019),d=n(82),p=n(13),h=n(244),y=n(3),b=n(1094),m=n(1216),v=n.n(m);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return S(this,n)}}function S(e,t){return!t||"object"!==g(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&I(e,t)}(k,e);var t,n,m,g=O(k);function k(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),g.call(this,e)}return t=k,(n=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=a.a.getInstance(u.g.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(u.e.LIBRARY,"libraries:sync",this.render),this.listenTo(u.e.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render)}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(o.Radio.channel(this.channelName).trigger(h.b.ShowSpinner),this.saveFolder(),this.logAction())}},{key:"logAction",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId,r={id:this.options.folderId,isSubfolder:n.toString()!==this.library.get("id").toString(),oldParentId:t,newParentId:n};s.a.logUserAction(r,this.options.analyticsOptions)}},{key:"saveFolder",value:function(){var e=this,t=this.getParentIds(),n=t.oldParentId,r=t.newParentId;n!==r?this.libraryDataService.moveFolder(this.viewModel.get("id"),r,n,(function(){i.a.AppLinkHelper.trigger({application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.FOLDER,args:[e.viewModel.get("id")]}),e.triggerMethod("hide")})):i.a.AppLinkHelper.trigger({application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.FOLDER,args:[this.viewModel.get("id")]})}},{key:"getParentIds",value:function(){return{oldParentId:p.f.getParent(this.options.folderId,this.collection).get("id"),newParentId:this.viewModel.get("parentId")}}},{key:"setUpCollection",value:function(e){this.collection||(this.library=p.f.getLibrary(this.options.folderId,e),this.collection=this.library.children)}},{key:"setUpModel",value:function(e){this.model||(this.model=e,this.setUpViewModel())}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e="folder:details:".concat(this.options.folderId);this.viewModel=l.a.get(e,this.model.toJSON(),{ctor:d.a});var t=p.f.getParent(this.options.folderId,this.collection);this.viewModel.set("parentId",t?t.get("id"):null),this.listenTo(this.viewModel,"change:parentId",this.onParentChange)}}},{key:"onParentChange",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId;this.spinnerModel.set(h.c.Disabled,t===n)}},{key:"getDisabledParentFolderIds",value:function(){var e=[this.model.get("id").toString()];return this.viewModel.get("parentId")&&e.push(this.viewModel.get("parentId").toString()),this.model.children?[].concat(e,w(p.f.flatten(this.model.children).map((function(e){return e.id.toString()})))):e}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new b.a({model:this.viewModel,collection:this.collection,library:this.library,channelName:this.channelName,editName:!1,editParent:!0,disabledParentFolderIds:this.getDisabledParentFolderIds()});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){this.libraryDataService.getLibraries(r.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,r.bind(this.setUpModel,this))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:p.q.getSpinner({size:p.r.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}},{key:"name",get:function(){return"MoveFolderView"}},{key:"title",get:function(){return y.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.moveFolder"}},{key:"template",get:function(){return v.a}},{key:"channelName",get:function(){return p.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.f,title:y.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new f.a,channelName:this.channelName,buttonText:y.a.getPhrase(this.lang,"move"),onClick:function(t){return e.onSubmit(t)}}}]}}])&&P(t.prototype,n),m&&P(t,m),k}(i.a.View)}}]);
@@ -1 +1 @@
1
- {"version":3,"sources":["file://C:/ClickView Projects/clickview/packages/projects/library-editor/src/shared/views/download-video/DownloadVideoView.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAGA;AACA;AAEA;AACA;AAOO,IAAM,iBAAb;AAAA;;AAAA;;AAKE,6BAAY,OAAZ,EAA6C;AAAA;;AAAA,6BACrC,OADqC;AAE5C;;AAPH;AAAA;AAAA,iCASmB;AACf,WAAK,wBAAL,GAAgC,kGAAe,CAAC,WAAhB,CAA4B,uDAAY,CAAC,aAAzC,EAAwD,IAAxD,CAAhC;AACD;AAXH;AAAA;AAAA,sCA6ByB;AACrB,UAAM,aAAa,GAAG,kGAAe,CAAC,WAAhB,CAA2C,iGAAc,CAAC,MAA1D,CAAtB;AAEA,mBAAa,CAAC,eAAd;AACD;AAjCH;AAAA;AAAA,qCAyCuB;AAAA;;AACnB,WAAK,eAAL;AAEA,WAAK,wBAAL,CAA8B,mBAA9B,CAAkD,KAAK,OAAL,CAAa,OAA/D,EAAwE,UAAC,IAAD,EAAqB;AAC3F,YAAM,GAAG,GAAG,yEAAc,CAAC,mBAAf,CAAmC,KAAI,CAAC,MAAL,CAAY,GAAZ,CAAgB,eAAhB,CAAnC,EAAqE,IAAI,CAAC,GAAL,CAAS,OAAT,CAArE,CAAZ;;AACA,aAAI,CAAC,GAAL,CAAS,IAAT,CAAc,KAAd,EAAqB,GAArB;AACD,OAHD;AAID;AAhDH;AAAA;AAAA,wBAaiB;AACb,aAAO,mBAAP;AACD;AAfH;AAAA;AAAA,wBAiBkB;AACd,aAAO,KAAP;AACD;AAnBH;AAAA;AAAA,wBAqBoB;AAChB,aAAO,QAAP;AACD;AAvBH;AAAA;AAAA,wBAyBqB;AACjB,aAAO,aAAP;AACD;AA3BH;AAAA;AAAA,wBAmC8B;AAC1B,aAAO;AACL,cAAM,EAAE,mFAAuB,CAAC;AAD3B,OAAP;AAGD;AAvCH;;AAAA;AAAA,EAAuC,8DAAI,CAAC,IAA5C,E","file":"scripts/39.chunk.js","sourcesContent":["import { Core } from 'libs/common/core';\r\nimport { CommonServices } from 'libs/common/backbone/constants/CommonServices';\r\nimport { ScrollService } from 'libs/common/backbone/services/ScrollService';\r\n\r\nimport { ConfigDataServiceHelper } from 'shared/services/ConfigDataService';\r\nimport { InstanceManager } from 'libs/common/backbone/services/InstanceManager';\r\nimport { Config } from 'shared/models/Config';\r\nimport { DataServices } from 'shared/constants';\r\nimport { DownloadHelper } from 'apps/library-editor/utils';\r\nimport { DownloadProxyDataService } from 'shared/services/DownloadProxyDataServices';\r\n\r\ninterface DownloadVideoViewOptions extends Core.ViewOptions {\r\n videoId: string;\r\n}\r\n\r\nexport class DownloadVideoView extends Core.View {\r\n public options: DownloadVideoViewOptions;\r\n private downloadProxyDataService: DownloadProxyDataService;\r\n private config: Config;\r\n\r\n constructor(options: DownloadVideoViewOptions) {\r\n super(options);\r\n }\r\n\r\n public initialize(): void {\r\n this.downloadProxyDataService = InstanceManager.getInstance(DataServices.DownloadProxy, this);\r\n }\r\n\r\n public get name(): string {\r\n return 'DownloadVideoView';\r\n }\r\n\r\n public get title(): boolean {\r\n return false;\r\n }\r\n\r\n public get tagName(): string {\r\n return 'iframe';\r\n }\r\n\r\n public get template(): string {\r\n return '<div></div>';\r\n }\r\n\r\n private cancelScrollTop(): void {\r\n const scrollService = InstanceManager.getInstance<ScrollService>(CommonServices.SCROLL);\r\n\r\n scrollService.cancelScrollTop();\r\n }\r\n\r\n public get requiredResources(): Core.RequiredResourceHash {\r\n return {\r\n config: ConfigDataServiceHelper.config\r\n };\r\n }\r\n\r\n public onBeforeRender(): void {\r\n this.cancelScrollTop();\r\n\r\n this.downloadProxyDataService.createDownloadToken(this.options.videoId, (data: Core.Model) => {\r\n const url = DownloadHelper.getVideoDownloadUrl(this.config.get('downloadProxy'), data.get('token'));\r\n this.$el.attr('src', url);\r\n });\r\n }\r\n}"],"sourceRoot":""}
1
+ {"version":3,"sources":["file://C:/ClickView Projects/@clickview/packages/projects/library-editor/src/shared/views/download-video/DownloadVideoView.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAGA;AACA;AAEA;AACA;AAOO,IAAM,iBAAb;AAAA;;AAAA;;AAKE,6BAAY,OAAZ,EAA6C;AAAA;;AAAA,6BACrC,OADqC;AAE5C;;AAPH;AAAA;AAAA,iCASmB;AACf,WAAK,wBAAL,GAAgC,kGAAe,CAAC,WAAhB,CAA4B,uDAAY,CAAC,aAAzC,EAAwD,IAAxD,CAAhC;AACD;AAXH;AAAA;AAAA,sCA6ByB;AACrB,UAAM,aAAa,GAAG,kGAAe,CAAC,WAAhB,CAA2C,iGAAc,CAAC,MAA1D,CAAtB;AAEA,mBAAa,CAAC,eAAd;AACD;AAjCH;AAAA;AAAA,qCAyCuB;AAAA;;AACnB,WAAK,eAAL;AAEA,WAAK,wBAAL,CAA8B,mBAA9B,CAAkD,KAAK,OAAL,CAAa,OAA/D,EAAwE,UAAC,IAAD,EAAqB;AAC3F,YAAM,GAAG,GAAG,yEAAc,CAAC,mBAAf,CAAmC,KAAI,CAAC,MAAL,CAAY,GAAZ,CAAgB,eAAhB,CAAnC,EAAqE,IAAI,CAAC,GAAL,CAAS,OAAT,CAArE,CAAZ;;AACA,aAAI,CAAC,GAAL,CAAS,IAAT,CAAc,KAAd,EAAqB,GAArB;AACD,OAHD;AAID;AAhDH;AAAA;AAAA,wBAaiB;AACb,aAAO,mBAAP;AACD;AAfH;AAAA;AAAA,wBAiBkB;AACd,aAAO,KAAP;AACD;AAnBH;AAAA;AAAA,wBAqBoB;AAChB,aAAO,QAAP;AACD;AAvBH;AAAA;AAAA,wBAyBqB;AACjB,aAAO,aAAP;AACD;AA3BH;AAAA;AAAA,wBAmC8B;AAC1B,aAAO;AACL,cAAM,EAAE,mFAAuB,CAAC;AAD3B,OAAP;AAGD;AAvCH;;AAAA;AAAA,EAAuC,8DAAI,CAAC,IAA5C,E","file":"scripts/39.chunk.js","sourcesContent":["import { Core } from 'libs/common/core';\r\nimport { CommonServices } from 'libs/common/backbone/constants/CommonServices';\r\nimport { ScrollService } from 'libs/common/backbone/services/ScrollService';\r\n\r\nimport { ConfigDataServiceHelper } from 'shared/services/ConfigDataService';\r\nimport { InstanceManager } from 'libs/common/backbone/services/InstanceManager';\r\nimport { Config } from 'shared/models/Config';\r\nimport { DataServices } from 'shared/constants';\r\nimport { DownloadHelper } from 'apps/library-editor/utils';\r\nimport { DownloadProxyDataService } from 'shared/services/DownloadProxyDataServices';\r\n\r\ninterface DownloadVideoViewOptions extends Core.ViewOptions {\r\n videoId: string;\r\n}\r\n\r\nexport class DownloadVideoView extends Core.View {\r\n public options: DownloadVideoViewOptions;\r\n private downloadProxyDataService: DownloadProxyDataService;\r\n private config: Config;\r\n\r\n constructor(options: DownloadVideoViewOptions) {\r\n super(options);\r\n }\r\n\r\n public initialize(): void {\r\n this.downloadProxyDataService = InstanceManager.getInstance(DataServices.DownloadProxy, this);\r\n }\r\n\r\n public get name(): string {\r\n return 'DownloadVideoView';\r\n }\r\n\r\n public get title(): boolean {\r\n return false;\r\n }\r\n\r\n public get tagName(): string {\r\n return 'iframe';\r\n }\r\n\r\n public get template(): string {\r\n return '<div></div>';\r\n }\r\n\r\n private cancelScrollTop(): void {\r\n const scrollService = InstanceManager.getInstance<ScrollService>(CommonServices.SCROLL);\r\n\r\n scrollService.cancelScrollTop();\r\n }\r\n\r\n public get requiredResources(): Core.RequiredResourceHash {\r\n return {\r\n config: ConfigDataServiceHelper.config\r\n };\r\n }\r\n\r\n public onBeforeRender(): void {\r\n this.cancelScrollTop();\r\n\r\n this.downloadProxyDataService.createDownloadToken(this.options.videoId, (data: Core.Model) => {\r\n const url = DownloadHelper.getVideoDownloadUrl(this.config.get('downloadProxy'), data.get('token'));\r\n this.$el.attr('src', url);\r\n });\r\n }\r\n}"],"sourceRoot":""}
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[4],{1288:function(n,e,t){var a=t(10);n.exports=(a.default||a).template({1:function(n,e,t,a,r){n.propertyIsEnumerable;var i=null!=e?e:n.nullContext||{},o=n.hooks.helperMissing,l=n.escapeExpression;return"<p>"+l((t.lang||e&&e.lang||o).call(i,"infoHeading",{name:"lang",hash:{},data:r}))+"</p>\r\n<p>"+l((t.lang||e&&e.lang||o).call(i,"meaningSubheading",{name:"lang",hash:{},data:r}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||e&&e.lang||o).call(i,"meaning1",{name:"lang",hash:{},data:r}))+"</li>\r\n <li>"+l((t.lang||e&&e.lang||o).call(i,"meaning2",{name:"lang",hash:{},data:r}))+"</li>\r\n <li>"+l((t.lang||e&&e.lang||o).call(i,"meaning3",{name:"lang",hash:{},data:r}))+"</li>\r\n</ul>\r\n"},3:function(n,e,t,a,r){n.propertyIsEnumerable;var i=null!=e?e:n.nullContext||{},o=n.hooks.helperMissing,l=n.escapeExpression;return"<p>"+l((t.lang||e&&e.lang||o).call(i,"disclaimer",{name:"lang",hash:{},data:r}))+"</p>\r\n<p>"+l((t.lang||e&&e.lang||o).call(i,"featureSubheading",{name:"lang",hash:{},data:r}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||e&&e.lang||o).call(i,"feature1",{name:"lang",hash:{},data:r}))+"</li> \r\n <li>"+l((t.lang||e&&e.lang||o).call(i,"feature2",{name:"lang",hash:{},data:r}))+"</li>\r\n</ul>\r\n"},compiler:[8,">= 4.3.0"],main:function(n,e,t,a,r){var i;n.propertyIsEnumerable;return null!=(i=t.if.call(null!=e?e:n.nullContext||{},null!=(i=null!=e?e.options:e)?i.noPublisher:i,{name:"if",hash:{},fn:n.program(1,r,0),inverse:n.program(3,r,0),data:r}))?i:""},useData:!0})},1422:function(n,e,t){"use strict";t.r(e),t.d(e,"PublishLibraryView",(function(){return P}));var a=t(7),r=t(5),i=t(2),o=t(281),l=t(0),u=t(244),c=t(13),s=t(3),h=t(137),f=t(295),g=t(297),p=t(57),b=t(1288),y=t.n(b);function m(n){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function d(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function v(n,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}function k(n,e){return(k=Object.setPrototypeOf||function(n,e){return n.__proto__=e,n})(n,e)}function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,a=_(n);if(e){var r=_(this).constructor;t=Reflect.construct(a,arguments,r)}else t=a.apply(this,arguments);return w(this,t)}}function w(n,e){return!e||"object"!==m(e)&&"function"!=typeof e?function(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(n):e}function _(n){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}var P=function(n){!function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&k(n,e)}(w,n);var e,t,b,m=S(w);function w(){return d(this,w),m.apply(this,arguments)}return e=w,(t=[{key:"initialize",value:function(){this.libraryDataService=r.a.getInstance(l.g.Library,this),this.migrationVideoDataService=r.a.getInstance(l.g.MigrationVideo,this),this.videoDataService=r.a.getInstance(l.g.Video,this)}},{key:"onClickContinue",value:function(){var n=this;a.Radio.channel(this.channelName).trigger(u.b.ShowSpinner);var e=0,t=function(){++e===n.libraries.length&&(n.triggerMethod("hide"),n.videoDataService.clearVideoCache(),a.Radio.channel(f.a.LIBRARY_STATUS).trigger("status:changed"))};p.a.noPublisher(this.customerMetadata)?this.libraries.each((function(e){n.libraryDataService.publishLibrary(e.get("id"),t)})):this.migrationVideoDataService.publishLibraries((function(){i.a.AppLinkHelper.trigger({application:l.b.MIGRATION_WIZARD,action:l.a.MigrationWizard.PUBLISH_LIBRARY_PROGRESS})}))}},{key:"viewOptions",value:function(){return{noPublisher:p.a.noPublisher(this.customerMetadata)}}},{key:"name",get:function(){return"PublishLibraryView"}},{key:"title",get:function(){return s.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.publishLibrary"}},{key:"template",get:function(){return y.a}},{key:"channelName",get:function(){return c.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var n=this;return[{title:s.a.getPhrase(this.lang,"heading"),behaviorClass:o.f,spinnerButtonOptions:{channelName:this.channelName,buttonText:s.a.getPhrase(this.lang,"continue"),onClick:function(){return n.onClickContinue()}}}]}},{key:"requiredResources",get:function(){return{libraries:h.b.libraries,customerMetadata:g.b.customerMetaData}}}])&&v(e.prototype,t),b&&v(e,b),w}(i.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[4],{1284:function(n,e,t){var a=t(10);n.exports=(a.default||a).template({1:function(n,e,t,a,r){n.propertyIsEnumerable;var i=null!=e?e:n.nullContext||{},o=n.hooks.helperMissing,l=n.escapeExpression;return"<p>"+l((t.lang||e&&e.lang||o).call(i,"infoHeading",{name:"lang",hash:{},data:r}))+"</p>\r\n<p>"+l((t.lang||e&&e.lang||o).call(i,"meaningSubheading",{name:"lang",hash:{},data:r}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||e&&e.lang||o).call(i,"meaning1",{name:"lang",hash:{},data:r}))+"</li>\r\n <li>"+l((t.lang||e&&e.lang||o).call(i,"meaning2",{name:"lang",hash:{},data:r}))+"</li>\r\n <li>"+l((t.lang||e&&e.lang||o).call(i,"meaning3",{name:"lang",hash:{},data:r}))+"</li>\r\n</ul>\r\n"},3:function(n,e,t,a,r){n.propertyIsEnumerable;var i=null!=e?e:n.nullContext||{},o=n.hooks.helperMissing,l=n.escapeExpression;return"<p>"+l((t.lang||e&&e.lang||o).call(i,"disclaimer",{name:"lang",hash:{},data:r}))+"</p>\r\n<p>"+l((t.lang||e&&e.lang||o).call(i,"featureSubheading",{name:"lang",hash:{},data:r}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||e&&e.lang||o).call(i,"feature1",{name:"lang",hash:{},data:r}))+"</li> \r\n <li>"+l((t.lang||e&&e.lang||o).call(i,"feature2",{name:"lang",hash:{},data:r}))+"</li>\r\n</ul>\r\n"},compiler:[8,">= 4.3.0"],main:function(n,e,t,a,r){var i;n.propertyIsEnumerable;return null!=(i=t.if.call(null!=e?e:n.nullContext||{},null!=(i=null!=e?e.options:e)?i.noPublisher:i,{name:"if",hash:{},fn:n.program(1,r,0),inverse:n.program(3,r,0),data:r}))?i:""},useData:!0})},1418:function(n,e,t){"use strict";t.r(e),t.d(e,"PublishLibraryView",(function(){return P}));var a=t(7),r=t(5),i=t(2),o=t(281),l=t(0),u=t(244),c=t(13),s=t(3),h=t(137),f=t(295),g=t(297),p=t(57),b=t(1284),y=t.n(b);function m(n){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function d(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function v(n,e){for(var t=0;t<e.length;t++){var a=e[t];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(n,a.key,a)}}function k(n,e){return(k=Object.setPrototypeOf||function(n,e){return n.__proto__=e,n})(n,e)}function S(n){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(n){return!1}}();return function(){var t,a=_(n);if(e){var r=_(this).constructor;t=Reflect.construct(a,arguments,r)}else t=a.apply(this,arguments);return w(this,t)}}function w(n,e){return!e||"object"!==m(e)&&"function"!=typeof e?function(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(n):e}function _(n){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}var P=function(n){!function(n,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&k(n,e)}(w,n);var e,t,b,m=S(w);function w(){return d(this,w),m.apply(this,arguments)}return e=w,(t=[{key:"initialize",value:function(){this.libraryDataService=r.a.getInstance(l.g.Library,this),this.migrationVideoDataService=r.a.getInstance(l.g.MigrationVideo,this),this.videoDataService=r.a.getInstance(l.g.Video,this)}},{key:"onClickContinue",value:function(){var n=this;a.Radio.channel(this.channelName).trigger(u.b.ShowSpinner);var e=0,t=function(){++e===n.libraries.length&&(n.triggerMethod("hide"),n.videoDataService.clearVideoCache(),a.Radio.channel(f.a.LIBRARY_STATUS).trigger("status:changed"))};p.a.noPublisher(this.customerMetadata)?this.libraries.each((function(e){n.libraryDataService.publishLibrary(e.get("id"),t)})):this.migrationVideoDataService.publishLibraries((function(){i.a.AppLinkHelper.trigger({application:l.b.MIGRATION_WIZARD,action:l.a.MigrationWizard.PUBLISH_LIBRARY_PROGRESS})}))}},{key:"viewOptions",value:function(){return{noPublisher:p.a.noPublisher(this.customerMetadata)}}},{key:"name",get:function(){return"PublishLibraryView"}},{key:"title",get:function(){return s.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.publishLibrary"}},{key:"template",get:function(){return y.a}},{key:"channelName",get:function(){return c.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var n=this;return[{title:s.a.getPhrase(this.lang,"heading"),behaviorClass:o.f,spinnerButtonOptions:{channelName:this.channelName,buttonText:s.a.getPhrase(this.lang,"continue"),onClick:function(){return n.onClickContinue()}}}]}},{key:"requiredResources",get:function(){return{libraries:h.b.libraries,customerMetadata:g.b.customerMetaData}}}])&&v(e.prototype,t),b&&v(e,b),w}(i.a.View)}}]);
@@ -1 +1 @@
1
- {"version":3,"sources":["file://C:/ClickView Projects/clickview/packages/projects/library-editor/src/shared/components/checkbox/BulkCheckboxComponent.ts","file://C:/ClickView Projects/clickview/packages/projects/library-editor/src/shared/components/checkbox/Checkbox.hbs","file://C:/ClickView Projects/clickview/packages/projects/library-editor/src/shared/components/checkbox/CheckboxComponent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA;AAEA;AACA;AAEO,IAAM,oBAAoB,GAAW,cAArC;AAUA,IAAM,qBAAb;AAAA;;AAAA;;AAGE,iCAAY,OAAZ,EAAiD;AAAA;;AAAA,6BACzC,OADyC;AAEhD;;AALH;AAAA;AAAA,iCAOmB;AACf,WAAK,YAAL;AACA,WAAK,aAAL;AACD;AAVH;AAAA;AAAA,mCAwBsB;AAClB,WAAK,KAAL,GAAa,yDAAkB,CAAC,YAAnB,CAAgC,KAAK,OAAL,CAAa,GAA7C,EAAkD,KAAK,OAAL,CAAa,IAA/D,CAAb;AACD;AA1BH;AAAA;AAAA,oCA4BuB;AACnB,UAAI,KAAK,OAAL,CAAa,QAAjB,EAA2B;AAC3B,WAAK,QAAL,CAAc,KAAK,KAAnB,EAA0B,QAA1B,EAAoC,KAAK,QAAzC;AACD;AA/BH;AAAA;AAAA,6BAiCe;AACX,aAAO;AACL,wCAAgC;AAD3B,OAAP;AAGD;AArCH;AAAA;AAAA,+BAuCkB;AACd,WAAK,eAAL;AAEA,WAAK,MAAL;AACD;AA3CH;AAAA;AAAA,sCA6CyB;AACrB,UAAM,MAAM,GAAG,kDAAS,KAAK,KAAL,CAAW,IAAX,CAAgB,KAAhB,EAAuB,oBAAvB,CAAT,CAAf;;AAEA,UAAI,CAAC,iDAAQ,MAAR,EAAgB,WAAC;AAAA,eAAI,CAAC,CAAC,CAAN;AAAA,OAAjB,CAAD,IACC,EAAE,KAAK,KAAL,CAAW,GAAX,CAAe,KAAf,KAAyB,MAAM,CAAC,MAAP,KAAkB,KAAK,OAAL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AuB,CAAC,KAAK,KAAL,CAAW,GAAX,CAAe,KAAf,CAA5B,EAAmD;AACjD,aAAK,KAAL,CAAW,GAAX,CAAe,EAAf,EAAmB,IAAnB;AACD,OAFD,MAEO,IAAI,KAAK,KAAL,CAAW,GAAX,CAAe,EAAf,MAAuB,KAA3B,EAAkC;AACvC,aAAK,KAAL,CAAW,GAAX,CAAe,EAAf,EAAmB,IAAnB;AACD,OAFM,MAEA;AACL,aAAK,KAAL,CAAW,GAAX,CAAe,EAAf,EAAmB,KAAnB;AACA,aAAK,KAAL,CAAW,GAAX,CAAe,2EAAf,EAAqC,KAArC;AACD;;AACD;AACD;AArEH;AAAA;AAAA,kCAuEoB;AAChB,UAAM,EAAE,GAAG,KAAK,SAAL,EAAX;AACA,UAAM,OAAO,GAAG,KAAK,KAAL,CAAW,GAAX,CAAe,EAAf,IAAqB,KAAK,KAAL,CAAW,GAAX,CAAe,EAAf,CAArB,GAA0C,KAAK,KAAL,CAAW,GAAX,CAAe,KAAf,CAA1D;AAEA,aAAO;AACL,UAAE,EAAF,EADK;AAEL,eAAO,EAAP,OAFK;AAGL,gBAAQ,EAAE,KAAK,OAAL,CAAa,QAHlB;AAIL,yBAAiB,EAAE,KAAK,OAAL,CAAa;AAJ3B,OAAP;AAMD;AAjFH;AAAA;AAAA,wBAkBiB;AACb,aAAO,mBAAP;AACD;AApBH;AAAA;AAAA,wBAsBsB;AAClB,aAAO,KAAK,OAAL,CAAa,SAApB;AACD;AAxBH;AAAA;AAAA,wBA0BqB;AACjB,aAAO,oDAAP;AACD;AA5BH;;AAAA;AAAA,EAAuC,8DAAI,CAAC,SAA5C,E","file":"scripts/4.chunk.js","sourcesContent":["import * as _ from 'underscore';\r\nimport { ObjectHash } from 'backbone';\r\n\r\nimport { Core } from 'libs/common/core';\r\n\r\nimport BulkCheckboxTemplate from './Checkbox.hbs';\r\nimport { BulkCheckboxHelper } from 'shared/utils';\r\n\r\nexport const ALL_CHECKBOX_ITEM_ID: string = 'checkbox-all';\r\n\r\ninterface BulkCheckboxComponentOptions extends Core.ComponentOptions {\r\n checkboxClassName?: string;\r\n key: string;\r\n type: string;\r\n disabled?: boolean;\r\n numberOfItems: number;\r\n}\r\n\r\nexport class BulkCheckboxComponent extends Core.Component {\r\n public options: BulkCheckboxComponentOptions;\r\n\r\n constructor(options: BulkCheckboxComponentOptions) {\r\n super(options);\r\n }\r\n\r\n public initialize(): void {\r\n this.getViewModel();\r\n this.bindListeners();\r\n }\r\n\r\n public get name(): string {\r\n return 'BulkCheckboxComponent';\r\n }\r\n\r\n public get className(): string {\r\n return this.options.className;\r\n }\r\n\r\n public get template(): any {\r\n return BulkCheckboxTemplate;\r\n }\r\n\r\n private getViewModel(): void {\r\n this.model = BulkCheckboxHelper.GetViewModel(this.options.key, this.options.type);\r\n }\r\n\r\n private bindListeners(): void {\r\n if (this.options.disabled) return;\r\n this.listenTo(this.model, 'change', this.onChange);\r\n }\r\n\r\n public events(): ObjectHash {\r\n return {\r\n 'change .custom-control-input': 'onClick'\r\n };\r\n }\r\n\r\n private onChange(): void {\r\n this.checkAllChecked();\r\n\r\n this.render();\r\n }\r\n\r\n private checkAllChecked(): void {\r\n const values = _.values(this.model.omit('all', ALL_CHECKBOX_ITEM_ID));\r\n\r\n if (!_.every(values, v => !!v)\r\n || !(this.model.get('all') || values.length === this.options.numberOfItems)) return;\r\n\r\n this.model.set({\r\n all: true,\r\n [this.getItemId()]: true\r\n });\r\n }\r\n\r\n private getItemId(): string {\r\n return ALL_CHECKBOX_ITEM_ID;\r\n }\r\n\r\n private onClick(): void {\r\n if (this.model.get(this.getItemId())) {\r\n this.model.clear();\r\n } else {\r\n this.model.clear();\r\n this.model.set({\r\n all: true,\r\n [this.getItemId()]: true\r\n });\r\n }\r\n }\r\n\r\n public viewOptions(): ObjectHash {\r\n const id = this.getItemId();\r\n\r\n return {\r\n id,\r\n checked: this.model.get(ALL_CHECKBOX_ITEM_ID),\r\n disabled: this.options.disabled,\r\n checkboxClassName: this.options.checkboxClassName\r\n };\r\n }\r\n}","var Handlebars = require('handlebars');\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" cursor-pointer\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n return \"checked\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n return \"disabled\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression, alias4=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"<div class=\\\"custom-control custom-checkbox \"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.checkboxClassName : stack1), depth0))\n + \"\\\">\\r\\n <input name=\\\"checkbox-\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.id : stack1), depth0))\n + \"\\\" id=\\\"checkbox-\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.id : stack1), depth0))\n + \"\\\" type=\\\"checkbox\\\" class=\\\"custom-control-input\"\n + ((stack1 = helpers.unless.call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.disabled : stack1),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.checked : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" \"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.disabled : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" />\\r\\n <label class=\\\"custom-control-label\"\n + ((stack1 = helpers.unless.call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.disabled : stack1),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" for=\\\"checkbox-\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.id : stack1), depth0))\n + \"\\\">&nbsp;</label>\\r\\n</div>\";\n},\"useData\":true});","import { ObjectHash } from 'backbone';\r\nimport { Core } from 'libs/common/core';\r\n\r\nimport CheckboxTemplate from './Checkbox.hbs';\r\nimport { BulkCheckboxHelper } from 'shared/utils';\r\nimport { ALL_CHECKBOX_ITEM_ID } from './BulkCheckboxComponent';\r\n\r\nexport interface CheckboxComponentOptions extends Core.ComponentOptions {\r\n checkboxClassName?: string;\r\n itemId: number;\r\n key: string;\r\n type: string;\r\n checked?: boolean;\r\n disabled?: boolean;\r\n}\r\n\r\nexport class CheckboxComponent extends Core.Component {\r\n public options: CheckboxComponentOptions;\r\n\r\n constructor(options: CheckboxComponentOptions) {\r\n super(options);\r\n }\r\n\r\n public initialize(): void {\r\n this.getViewModel();\r\n this.bindListeners();\r\n\r\n // If checked is passed as true, set the checkbox as checked initially\r\n if (this.options.checked) {\r\n const id = this.getItemId();\r\n this.model.set(id, true, { silent: true });\r\n }\r\n }\r\n\r\n public get name(): string {\r\n return 'CheckboxComponent';\r\n }\r\n\r\n public get className(): string {\r\n return this.options.className;\r\n }\r\n\r\n public get template(): any {\r\n return CheckboxTemplate;\r\n }\r\n\r\n private getViewModel(): void {\r\n this.model = BulkCheckboxHelper.GetViewModel(this.options.key, this.options.type);\r\n }\r\n\r\n private bindListeners(): void {\r\n if (!this.options.disabled)\r\n this.listenTo(this.model, `change:all change:${this.getItemId()}`, this.render);\r\n }\r\n\r\n public events(): ObjectHash {\r\n return {\r\n 'click .custom-checkbox': 'onClickCheckbox',\r\n 'change .custom-control-input': 'onChangeCheckbox'\r\n };\r\n }\r\n\r\n private getItemId(): string {\r\n return this.options.itemId.toString();\r\n }\r\n\r\n private onClickCheckbox(e: JQuery.Event): void {\r\n e.stopPropagation();\r\n }\r\n\r\n private onChangeCheckbox(): void {\r\n if (this.options.disabled)\r\n return;\r\n\r\n const id = this.getItemId();\r\n\r\n if (!this.model.has(id) && !this.model.get('all')) {\r\n this.model.set(id, true);\r\n } else if (this.model.get(id) === false) {\r\n this.model.set(id, true);\r\n } else {\r\n this.model.set(id, false);\r\n this.model.set(ALL_CHECKBOX_ITEM_ID, false);\r\n }\r\n return;\r\n }\r\n\r\n public viewOptions(): ObjectHash {\r\n const id = this.getItemId();\r\n const checked = this.model.has(id) ? this.model.get(id) : this.model.get('all');\r\n\r\n return {\r\n id,\r\n checked,\r\n disabled: this.options.disabled,\r\n checkboxClassName: this.options.checkboxClassName\r\n };\r\n }\r\n}"],"sourceRoot":""}
1
+ {"version":3,"sources":["file://C:/ClickView Projects/@clickview/packages/projects/library-editor/src/shared/components/checkbox/BulkCheckboxComponent.ts","file://C:/ClickView Projects/@clickview/packages/projects/library-editor/src/shared/components/checkbox/Checkbox.hbs","file://C:/ClickView Projects/@clickview/packages/projects/library-editor/src/shared/components/checkbox/CheckboxComponent.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAGA;AAEA;AACA;AAEO,IAAM,oBAAoB,GAAW,cAArC;AAUA,IAAM,qBAAb;AAAA;;AAAA;;AAGE,iCAAY,OAAZ,EAAiD;AAAA;;AAAA,6BACzC,OADyC;AAEhD;;AALH;AAAA;AAAA,iCAOmB;AACf,WAAK,YAAL;AACA,WAAK,aAAL;AACD;AAVH;AAAA;AAAA,mCAwBsB;AAClB,WAAK,KAAL,GAAa,yDAAkB,CAAC,YAAnB,CAAgC,KAAK,OAAL,CAAa,GAA7C,EAAkD,KAAK,OAAL,CAAa,IAA/D,CAAb;AACD;AA1BH;AAAA;AA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AAE,EAAF,EADK;AAEL,eAAO,EAAP,OAFK;AAGL,gBAAQ,EAAE,KAAK,OAAL,CAAa,QAHlB;AAIL,yBAAiB,EAAE,KAAK,OAAL,CAAa;AAJ3B,OAAP;AAMD;AAjFH;AAAA;AAAA,wBAkBiB;AACb,aAAO,mBAAP;AACD;AApBH;AAAA;AAAA,wBAsBsB;AAClB,aAAO,KAAK,OAAL,CAAa,SAApB;AACD;AAxBH;AAAA;AAAA,wBA0BqB;AACjB,aAAO,oDAAP;AACD;AA5BH;;AAAA;AAAA,EAAuC,8DAAI,CAAC,SAA5C,E","file":"scripts/4.chunk.js","sourcesContent":["import * as _ from 'underscore';\r\nimport { ObjectHash } from 'backbone';\r\n\r\nimport { Core } from 'libs/common/core';\r\n\r\nimport BulkCheckboxTemplate from './Checkbox.hbs';\r\nimport { BulkCheckboxHelper } from 'shared/utils';\r\n\r\nexport const ALL_CHECKBOX_ITEM_ID: string = 'checkbox-all';\r\n\r\ninterface BulkCheckboxComponentOptions extends Core.ComponentOptions {\r\n checkboxClassName?: string;\r\n key: string;\r\n type: string;\r\n disabled?: boolean;\r\n numberOfItems: number;\r\n}\r\n\r\nexport class BulkCheckboxComponent extends Core.Component {\r\n public options: BulkCheckboxComponentOptions;\r\n\r\n constructor(options: BulkCheckboxComponentOptions) {\r\n super(options);\r\n }\r\n\r\n public initialize(): void {\r\n this.getViewModel();\r\n this.bindListeners();\r\n }\r\n\r\n public get name(): string {\r\n return 'BulkCheckboxComponent';\r\n }\r\n\r\n public get className(): string {\r\n return this.options.className;\r\n }\r\n\r\n public get template(): any {\r\n return BulkCheckboxTemplate;\r\n }\r\n\r\n private getViewModel(): void {\r\n this.model = BulkCheckboxHelper.GetViewModel(this.options.key, this.options.type);\r\n }\r\n\r\n private bindListeners(): void {\r\n if (this.options.disabled) return;\r\n this.listenTo(this.model, 'change', this.onChange);\r\n }\r\n\r\n public events(): ObjectHash {\r\n return {\r\n 'change .custom-control-input': 'onClick'\r\n };\r\n }\r\n\r\n private onChange(): void {\r\n this.checkAllChecked();\r\n\r\n this.render();\r\n }\r\n\r\n private checkAllChecked(): void {\r\n const values = _.values(this.model.omit('all', ALL_CHECKBOX_ITEM_ID));\r\n\r\n if (!_.every(values, v => !!v)\r\n || !(this.model.get('all') || values.length === this.options.numberOfItems)) return;\r\n\r\n this.model.set({\r\n all: true,\r\n [this.getItemId()]: true\r\n });\r\n }\r\n\r\n private getItemId(): string {\r\n return ALL_CHECKBOX_ITEM_ID;\r\n }\r\n\r\n private onClick(): void {\r\n if (this.model.get(this.getItemId())) {\r\n this.model.clear();\r\n } else {\r\n this.model.clear();\r\n this.model.set({\r\n all: true,\r\n [this.getItemId()]: true\r\n });\r\n }\r\n }\r\n\r\n public viewOptions(): ObjectHash {\r\n const id = this.getItemId();\r\n\r\n return {\r\n id,\r\n checked: this.model.get(ALL_CHECKBOX_ITEM_ID),\r\n disabled: this.options.disabled,\r\n checkboxClassName: this.options.checkboxClassName\r\n };\r\n }\r\n}","var Handlebars = require('handlebars');\nmodule.exports = (Handlebars['default'] || Handlebars).template({\"1\":function(container,depth0,helpers,partials,data) {\n return \" cursor-pointer\";\n},\"3\":function(container,depth0,helpers,partials,data) {\n return \"checked\";\n},\"5\":function(container,depth0,helpers,partials,data) {\n return \"disabled\";\n},\"compiler\":[8,\">= 4.3.0\"],\"main\":function(container,depth0,helpers,partials,data) {\n var stack1, alias1=container.propertyIsEnumerable, alias2=container.lambda, alias3=container.escapeExpression, alias4=depth0 != null ? depth0 : (container.nullContext || {});\n\n return \"<div class=\\\"custom-control custom-checkbox \"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.checkboxClassName : stack1), depth0))\n + \"\\\">\\r\\n <input name=\\\"checkbox-\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.id : stack1), depth0))\n + \"\\\" id=\\\"checkbox-\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.id : stack1), depth0))\n + \"\\\" type=\\\"checkbox\\\" class=\\\"custom-control-input\"\n + ((stack1 = helpers.unless.call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.disabled : stack1),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" \"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.checked : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(3, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" \"\n + ((stack1 = helpers[\"if\"].call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.disabled : stack1),{\"name\":\"if\",\"hash\":{},\"fn\":container.program(5, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \" />\\r\\n <label class=\\\"custom-control-label\"\n + ((stack1 = helpers.unless.call(alias4,((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.disabled : stack1),{\"name\":\"unless\",\"hash\":{},\"fn\":container.program(1, data, 0),\"inverse\":container.noop,\"data\":data})) != null ? stack1 : \"\")\n + \"\\\" for=\\\"checkbox-\"\n + alias3(alias2(((stack1 = (depth0 != null ? depth0.options : depth0)) != null ? stack1.id : stack1), depth0))\n + \"\\\">&nbsp;</label>\\r\\n</div>\";\n},\"useData\":true});","import { ObjectHash } from 'backbone';\r\nimport { Core } from 'libs/common/core';\r\n\r\nimport CheckboxTemplate from './Checkbox.hbs';\r\nimport { BulkCheckboxHelper } from 'shared/utils';\r\nimport { ALL_CHECKBOX_ITEM_ID } from './BulkCheckboxComponent';\r\n\r\nexport interface CheckboxComponentOptions extends Core.ComponentOptions {\r\n checkboxClassName?: string;\r\n itemId: number;\r\n key: string;\r\n type: string;\r\n checked?: boolean;\r\n disabled?: boolean;\r\n}\r\n\r\nexport class CheckboxComponent extends Core.Component {\r\n public options: CheckboxComponentOptions;\r\n\r\n constructor(options: CheckboxComponentOptions) {\r\n super(options);\r\n }\r\n\r\n public initialize(): void {\r\n this.getViewModel();\r\n this.bindListeners();\r\n\r\n // If checked is passed as true, set the checkbox as checked initially\r\n if (this.options.checked) {\r\n const id = this.getItemId();\r\n this.model.set(id, true, { silent: true });\r\n }\r\n }\r\n\r\n public get name(): string {\r\n return 'CheckboxComponent';\r\n }\r\n\r\n public get className(): string {\r\n return this.options.className;\r\n }\r\n\r\n public get template(): any {\r\n return CheckboxTemplate;\r\n }\r\n\r\n private getViewModel(): void {\r\n this.model = BulkCheckboxHelper.GetViewModel(this.options.key, this.options.type);\r\n }\r\n\r\n private bindListeners(): void {\r\n if (!this.options.disabled)\r\n this.listenTo(this.model, `change:all change:${this.getItemId()}`, this.render);\r\n }\r\n\r\n public events(): ObjectHash {\r\n return {\r\n 'click .custom-checkbox': 'onClickCheckbox',\r\n 'change .custom-control-input': 'onChangeCheckbox'\r\n };\r\n }\r\n\r\n private getItemId(): string {\r\n return this.options.itemId.toString();\r\n }\r\n\r\n private onClickCheckbox(e: JQuery.Event): void {\r\n e.stopPropagation();\r\n }\r\n\r\n private onChangeCheckbox(): void {\r\n if (this.options.disabled)\r\n return;\r\n\r\n const id = this.getItemId();\r\n\r\n if (!this.model.has(id) && !this.model.get('all')) {\r\n this.model.set(id, true);\r\n } else if (this.model.get(id) === false) {\r\n this.model.set(id, true);\r\n } else {\r\n this.model.set(id, false);\r\n this.model.set(ALL_CHECKBOX_ITEM_ID, false);\r\n }\r\n return;\r\n }\r\n\r\n public viewOptions(): ObjectHash {\r\n const id = this.getItemId();\r\n const checked = this.model.has(id) ? this.model.get(id) : this.model.get('all');\r\n\r\n return {\r\n id,\r\n checked,\r\n disabled: this.options.disabled,\r\n checkboxClassName: this.options.checkboxClassName\r\n };\r\n }\r\n}"],"sourceRoot":""}