@clickview/library-editor 1.1.27-dev.0 → 1.1.27-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/dist/css/1.chunk.css.map +1 -0
  2. package/dist/css/10.chunk.css.map +1 -0
  3. package/dist/css/11.chunk.css +137 -0
  4. package/dist/css/11.chunk.css.map +1 -0
  5. package/dist/css/12.chunk.css.map +1 -0
  6. package/dist/css/13.chunk.css.map +1 -0
  7. package/dist/css/14.chunk.css.map +1 -0
  8. package/dist/css/16.chunk.css.map +1 -0
  9. package/dist/css/17.chunk.css.map +1 -0
  10. package/dist/css/18.chunk.css +20 -0
  11. package/dist/css/18.chunk.css.map +1 -0
  12. package/dist/css/2.chunk.css +145 -0
  13. package/dist/css/2.chunk.css.map +1 -0
  14. package/dist/css/21.chunk.css.map +1 -0
  15. package/dist/css/22.chunk.css.map +1 -0
  16. package/dist/css/23.chunk.css +5 -3
  17. package/dist/css/23.chunk.css.map +1 -0
  18. package/dist/css/25.chunk.css +3 -1
  19. package/dist/css/25.chunk.css.map +1 -0
  20. package/dist/css/26.chunk.css.map +1 -0
  21. package/dist/css/28.chunk.css.map +1 -0
  22. package/dist/css/29.chunk.css.map +1 -0
  23. package/dist/css/3.chunk.css.map +1 -0
  24. package/dist/css/30.chunk.css.map +1 -0
  25. package/dist/css/31.chunk.css.map +1 -0
  26. package/dist/css/32.chunk.css.map +1 -0
  27. package/dist/css/33.chunk.css.map +1 -0
  28. package/dist/css/34.chunk.css +21 -0
  29. package/dist/css/34.chunk.css.map +1 -0
  30. package/dist/css/35.chunk.css +20 -0
  31. package/dist/css/35.chunk.css.map +1 -0
  32. package/dist/css/36.chunk.css +14 -0
  33. package/dist/css/36.chunk.css.map +1 -0
  34. package/dist/css/37.chunk.css.map +1 -0
  35. package/dist/css/38.chunk.css.map +1 -0
  36. package/dist/css/40.chunk.css.map +1 -0
  37. package/dist/css/41.chunk.css.map +1 -0
  38. package/dist/css/42.chunk.css.map +1 -0
  39. package/dist/css/43.chunk.css.map +1 -0
  40. package/dist/css/44.chunk.css.map +1 -0
  41. package/dist/css/45.chunk.css.map +1 -0
  42. package/dist/css/46.chunk.css.map +1 -0
  43. package/dist/css/47.chunk.css.map +1 -0
  44. package/dist/css/48.chunk.css.map +1 -0
  45. package/dist/css/49.chunk.css +35 -0
  46. package/dist/css/49.chunk.css.map +1 -0
  47. package/dist/css/50.chunk.css.map +1 -0
  48. package/dist/css/51.chunk.css.map +1 -0
  49. package/dist/css/52.chunk.css +66 -0
  50. package/dist/css/52.chunk.css.map +1 -0
  51. package/dist/css/55.chunk.css.map +1 -0
  52. package/dist/css/56.chunk.css.map +1 -0
  53. package/dist/css/58.chunk.css.map +1 -0
  54. package/dist/css/59.chunk.css.map +1 -0
  55. package/dist/css/6.chunk.css.map +1 -0
  56. package/dist/css/60.chunk.css +18 -0
  57. package/dist/css/60.chunk.css.map +1 -0
  58. package/dist/css/62.chunk.css.map +1 -0
  59. package/dist/css/63.chunk.css +170 -0
  60. package/dist/css/63.chunk.css.map +1 -0
  61. package/dist/css/67.chunk.css +78 -0
  62. package/dist/css/67.chunk.css.map +1 -0
  63. package/dist/css/68.chunk.css +17 -0
  64. package/dist/css/68.chunk.css.map +1 -0
  65. package/dist/css/69.chunk.css +17 -0
  66. package/dist/css/69.chunk.css.map +1 -0
  67. package/dist/css/7.chunk.css.map +1 -0
  68. package/dist/css/70.chunk.css +23 -0
  69. package/dist/css/70.chunk.css.map +1 -0
  70. package/dist/css/71.chunk.css +40 -0
  71. package/dist/css/71.chunk.css.map +1 -0
  72. package/dist/css/72.chunk.css +16 -0
  73. package/dist/css/72.chunk.css.map +1 -0
  74. package/dist/css/73.chunk.css +37 -0
  75. package/dist/css/73.chunk.css.map +1 -0
  76. package/dist/css/74.chunk.css +29 -0
  77. package/dist/css/74.chunk.css.map +1 -0
  78. package/dist/css/75.chunk.css +6 -0
  79. package/dist/css/75.chunk.css.map +1 -0
  80. package/dist/css/76.chunk.css +6 -0
  81. package/dist/css/76.chunk.css.map +1 -0
  82. package/dist/css/8.chunk.css.map +1 -0
  83. package/dist/css/library-editor-app.css +2 -2
  84. package/dist/css/library-editor-app.css.map +1 -0
  85. package/dist/en.json +1 -1
  86. package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +1 -0
  87. package/dist/libs/common/src/backbone/core/BaseAppRouter.d.ts +5 -1
  88. package/dist/libs/common/src/backbone/core/index.d.ts +1 -1
  89. package/dist/libs/shared/src/apps/search/components/instant-search/series/SeriesSearchResultComponent.d.ts +5 -0
  90. package/dist/libs/shared/src/apps/search/enums/SearchQueryType.d.ts +1 -1
  91. package/dist/libs/shared/src/apps/search/views/search-bar/SearchBarView.d.ts +3 -0
  92. package/dist/libs/shared/src/constants/BootstrapKeys.d.ts +1 -0
  93. package/dist/libs/shared/src/enums/MediaQueries.d.ts +3 -1
  94. package/dist/libs/shared/src/enums/PlayerMediaType.d.ts +1 -0
  95. package/dist/libs/shared/src/enums/ResourceFileType.d.ts +9 -0
  96. package/dist/libs/shared/src/enums/SettingName.d.ts +0 -1
  97. package/dist/libs/shared/src/interfaces/app-variables/BaseSearchAppVariables.d.ts +1 -0
  98. package/dist/libs/shared/src/interfaces/collections/ClassificationCollection.d.ts +4 -0
  99. package/dist/libs/shared/src/interfaces/collections/ClassroomCollection.d.ts +4 -0
  100. package/dist/libs/shared/src/interfaces/collections/ClassroomGroupCollection.d.ts +4 -0
  101. package/dist/libs/shared/src/interfaces/collections/InteractiveCollection.d.ts +2 -2
  102. package/dist/libs/shared/src/interfaces/collections/index.d.ts +3 -0
  103. package/dist/libs/shared/src/interfaces/models/Classroom.d.ts +4 -0
  104. package/dist/libs/shared/src/interfaces/models/ClassroomGroup.d.ts +18 -0
  105. package/dist/libs/shared/src/interfaces/models/Clip.d.ts +4 -3
  106. package/dist/libs/shared/src/interfaces/models/Curriculum.d.ts +4 -0
  107. package/dist/libs/shared/src/interfaces/models/InteractiveMetadata.d.ts +14 -0
  108. package/dist/libs/shared/src/interfaces/models/Resource.d.ts +2 -2
  109. package/dist/libs/shared/src/interfaces/models/User.d.ts +4 -2
  110. package/dist/libs/shared/src/interfaces/models/Video.d.ts +6 -2
  111. package/dist/libs/shared/src/interfaces/models/VideoHistory.d.ts +4 -1
  112. package/dist/libs/shared/src/interfaces/models/Widget.d.ts +1 -1
  113. package/dist/libs/shared/src/interfaces/models/YearGroup.d.ts +5 -0
  114. package/dist/libs/shared/src/interfaces/models/index.d.ts +5 -1
  115. package/dist/libs/shared/src/interfaces/models/interactive/ActionableItem.d.ts +6 -0
  116. package/dist/libs/shared/src/interfaces/models/interactive/Interaction.d.ts +16 -0
  117. package/dist/libs/shared/src/interfaces/models/interactive/InteractionType.d.ts +7 -0
  118. package/dist/libs/shared/src/interfaces/models/interactive/InteractionTypeId.d.ts +8 -0
  119. package/dist/libs/shared/src/interfaces/models/interactive/Interactive.d.ts +7 -0
  120. package/dist/libs/shared/src/interfaces/models/interactive/Timepoint.d.ts +9 -0
  121. package/dist/libs/shared/src/interfaces/models/interactive/index.d.ts +6 -0
  122. package/dist/libs/shared/src/interfaces/models/primitives/BaseObject.d.ts +1 -0
  123. package/dist/libs/shared/src/interfaces/models/primitives/VirtualObject.d.ts +5 -0
  124. package/dist/libs/shared/src/interfaces/models/primitives/index.d.ts +1 -0
  125. package/dist/libs/shared/src/interfaces/requests/CreateOrUpdateClipRequest.d.ts +6 -0
  126. package/dist/libs/shared/src/interfaces/requests/CreateViewKeyRequest.d.ts +0 -2
  127. package/dist/libs/shared/src/interfaces/requests/index.d.ts +1 -0
  128. package/dist/libs/shared/src/utils/VideoDetailsHelper.d.ts +0 -9
  129. package/dist/projects/library-editor/src/apps/migration-wizard/MigrationWizardApplication.d.ts +1 -1
  130. package/dist/projects/library-editor/src/apps/migration-wizard/filters/MigrationFilters.d.ts +2 -2
  131. package/dist/projects/library-editor/src/apps/search/models/SearchAppVariables.d.ts +1 -0
  132. package/dist/projects/library-editor/src/apps/upload/UploadApplication.d.ts +1 -1
  133. package/dist/projects/library-editor/src/shared/filters/BetaAccessFilter.d.ts +1 -1
  134. package/dist/projects/library-editor/src/shared/filters/CustomerSettingsFilter.d.ts +1 -1
  135. package/dist/projects/library-editor/src/shared/filters/RoleFilter.d.ts +1 -1
  136. package/dist/projects/library-editor/src/shared/filters/VerifiedEmailFilter.d.ts +1 -1
  137. package/dist/scripts/{0-7d941d48a1.chunk.js → 0-e25d47c666.chunk.js} +1 -1
  138. package/dist/scripts/0.chunk.js +1039 -0
  139. package/dist/scripts/0.chunk.js.map +1 -0
  140. package/dist/scripts/{1-d174976195.chunk.js → 1-620c685eee.chunk.js} +1 -1
  141. package/dist/scripts/1.chunk.js +442 -0
  142. package/dist/scripts/1.chunk.js.map +1 -0
  143. package/dist/scripts/{10-9389c5decb.chunk.js → 10-3baf058564.chunk.js} +1 -1
  144. package/dist/scripts/10.chunk.js +820 -0
  145. package/dist/scripts/10.chunk.js.map +1 -0
  146. package/dist/scripts/{11-85acf490ea.chunk.js → 11-9f5f0c25dc.chunk.js} +1 -1
  147. package/dist/scripts/11.chunk.js +4091 -0
  148. package/dist/scripts/11.chunk.js.map +1 -0
  149. package/dist/scripts/{12-0db13732f7.chunk.js → 12-b460ad405e.chunk.js} +1 -1
  150. package/dist/scripts/12.chunk.js +555 -0
  151. package/dist/scripts/12.chunk.js.map +1 -0
  152. package/dist/scripts/{13-994f87e579.chunk.js → 13-89b3a0aebb.chunk.js} +1 -1
  153. package/dist/scripts/13.chunk.js +380 -0
  154. package/dist/scripts/13.chunk.js.map +1 -0
  155. package/dist/scripts/{14-2902bc9522.chunk.js → 14-670309ef33.chunk.js} +1 -1
  156. package/dist/scripts/14.chunk.js +2386 -0
  157. package/dist/scripts/14.chunk.js.map +1 -0
  158. package/dist/scripts/{15-c6ed60d5c9.chunk.js → 15-39010184ed.chunk.js} +1 -1
  159. package/dist/scripts/15.chunk.js +314 -0
  160. package/dist/scripts/15.chunk.js.map +1 -0
  161. package/dist/scripts/{16-745edb531a.chunk.js → 16-0971cabfc8.chunk.js} +1 -1
  162. package/dist/scripts/16.chunk.js +1290 -0
  163. package/dist/scripts/16.chunk.js.map +1 -0
  164. package/dist/scripts/{17-84499189f1.chunk.js → 17-f364868870.chunk.js} +1 -1
  165. package/dist/scripts/17.chunk.js +381 -0
  166. package/dist/scripts/17.chunk.js.map +1 -0
  167. package/dist/scripts/18.chunk.js +393 -0
  168. package/dist/scripts/18.chunk.js.map +1 -0
  169. package/dist/scripts/19.chunk.js +364 -0
  170. package/dist/scripts/19.chunk.js.map +1 -0
  171. package/dist/scripts/{2-236aa94486.chunk.js → 2-cd7f1d10b5.chunk.js} +1 -1
  172. package/dist/scripts/2.chunk.js +523 -0
  173. package/dist/scripts/2.chunk.js.map +1 -0
  174. package/dist/scripts/{20-96717eb19f.chunk.js → 20-42dc06da39.chunk.js} +1 -1
  175. package/dist/scripts/20.chunk.js +317 -0
  176. package/dist/scripts/20.chunk.js.map +1 -0
  177. package/dist/scripts/{21-65f36b6673.chunk.js → 21-05615559be.chunk.js} +1 -1
  178. package/dist/scripts/21.chunk.js +531 -0
  179. package/dist/scripts/21.chunk.js.map +1 -0
  180. package/dist/scripts/{22-5e4db41745.chunk.js → 22-70b4c18dd2.chunk.js} +1 -1
  181. package/dist/scripts/22.chunk.js +354 -0
  182. package/dist/scripts/22.chunk.js.map +1 -0
  183. package/dist/scripts/23-3166dfeef5.chunk.js +1 -0
  184. package/dist/scripts/23.chunk.js +604 -0
  185. package/dist/scripts/23.chunk.js.map +1 -0
  186. package/dist/scripts/{24-6ac1386d9a.chunk.js → 24-6fbd14025b.chunk.js} +1 -1
  187. package/dist/scripts/24.chunk.js +318 -0
  188. package/dist/scripts/24.chunk.js.map +1 -0
  189. package/dist/scripts/25-3d067b8b9a.chunk.js +1 -0
  190. package/dist/scripts/25.chunk.js +365 -0
  191. package/dist/scripts/25.chunk.js.map +1 -0
  192. package/dist/scripts/{26-58a421e3cb.chunk.js → 26-468305820a.chunk.js} +1 -1
  193. package/dist/scripts/26.chunk.js +442 -0
  194. package/dist/scripts/26.chunk.js.map +1 -0
  195. package/dist/scripts/{27-a507f85408.chunk.js → 27-d03a99658e.chunk.js} +1 -1
  196. package/dist/scripts/27.chunk.js +3630 -0
  197. package/dist/scripts/27.chunk.js.map +1 -0
  198. package/dist/scripts/{28-add4a2a74d.chunk.js → 28-f3f43a3001.chunk.js} +1 -1
  199. package/dist/scripts/28.chunk.js +3172 -0
  200. package/dist/scripts/28.chunk.js.map +1 -0
  201. package/dist/scripts/{29-adf22ec3a1.chunk.js → 29-268278d2ac.chunk.js} +1 -1
  202. package/dist/scripts/29.chunk.js +3090 -0
  203. package/dist/scripts/29.chunk.js.map +1 -0
  204. package/dist/scripts/{3-3c39acc333.chunk.js → 3-4694b66aa5.chunk.js} +1 -1
  205. package/dist/scripts/3.chunk.js +845 -0
  206. package/dist/scripts/3.chunk.js.map +1 -0
  207. package/dist/scripts/{30-6e869b77b2.chunk.js → 30-694b0a0d4b.chunk.js} +1 -1
  208. package/dist/scripts/30.chunk.js +1851 -0
  209. package/dist/scripts/30.chunk.js.map +1 -0
  210. package/dist/scripts/{31-f3a0832478.chunk.js → 31-4c542c18dc.chunk.js} +1 -1
  211. package/dist/scripts/31.chunk.js +958 -0
  212. package/dist/scripts/31.chunk.js.map +1 -0
  213. package/dist/scripts/{32-cbcb5dba41.chunk.js → 32-a1543ffe27.chunk.js} +1 -1
  214. package/dist/scripts/32.chunk.js +1239 -0
  215. package/dist/scripts/32.chunk.js.map +1 -0
  216. package/dist/scripts/{33-c9a197cce2.chunk.js → 33-9685703df6.chunk.js} +1 -1
  217. package/dist/scripts/33.chunk.js +971 -0
  218. package/dist/scripts/33.chunk.js.map +1 -0
  219. package/dist/scripts/{34-37fc1c9761.chunk.js → 34-eb9f6709b3.chunk.js} +1 -1
  220. package/dist/scripts/34.chunk.js +990 -0
  221. package/dist/scripts/34.chunk.js.map +1 -0
  222. package/dist/scripts/{35-21329b155d.chunk.js → 35-1ff49137e7.chunk.js} +1 -1
  223. package/dist/scripts/35.chunk.js +518 -0
  224. package/dist/scripts/35.chunk.js.map +1 -0
  225. package/dist/scripts/{36-0d3fa3d249.chunk.js → 36-9e89154ca2.chunk.js} +1 -1
  226. package/dist/scripts/36.chunk.js +335 -0
  227. package/dist/scripts/36.chunk.js.map +1 -0
  228. package/dist/scripts/{37-681f25d8de.chunk.js → 37-80589d542e.chunk.js} +1 -1
  229. package/dist/scripts/37.chunk.js +236 -0
  230. package/dist/scripts/37.chunk.js.map +1 -0
  231. package/dist/scripts/{38-5364f1bd67.chunk.js → 38-7e88534f67.chunk.js} +1 -1
  232. package/dist/scripts/38.chunk.js +315 -0
  233. package/dist/scripts/38.chunk.js.map +1 -0
  234. package/dist/scripts/{39-996d4ddc74.chunk.js → 39-99824f3b64.chunk.js} +1 -1
  235. package/dist/scripts/39.chunk.js +107 -0
  236. package/dist/scripts/39.chunk.js.map +1 -0
  237. package/dist/scripts/{4-93e14cac14.chunk.js → 4-ad1e4b43da.chunk.js} +1 -1
  238. package/dist/scripts/4.chunk.js +335 -0
  239. package/dist/scripts/4.chunk.js.map +1 -0
  240. package/dist/scripts/{40-7ecb39dfb5.chunk.js → 40-dbfd665c74.chunk.js} +1 -1
  241. package/dist/scripts/40.chunk.js +2493 -0
  242. package/dist/scripts/40.chunk.js.map +1 -0
  243. package/dist/scripts/{41-8b5abd983b.chunk.js → 41-25fbac3d17.chunk.js} +1 -1
  244. package/dist/scripts/41.chunk.js +1782 -0
  245. package/dist/scripts/41.chunk.js.map +1 -0
  246. package/dist/scripts/{42-b0867d7db0.chunk.js → 42-9f757567db.chunk.js} +1 -1
  247. package/dist/scripts/42.chunk.js +2327 -0
  248. package/dist/scripts/42.chunk.js.map +1 -0
  249. package/dist/scripts/{43-32a9ad2254.chunk.js → 43-5ef29feb2c.chunk.js} +1 -1
  250. package/dist/scripts/43.chunk.js +1206 -0
  251. package/dist/scripts/43.chunk.js.map +1 -0
  252. package/dist/scripts/{44-bf0ebe3cf7.chunk.js → 44-223f602431.chunk.js} +1 -1
  253. package/dist/scripts/44.chunk.js +2245 -0
  254. package/dist/scripts/44.chunk.js.map +1 -0
  255. package/dist/scripts/{45-2ba05e3821.chunk.js → 45-344492a36f.chunk.js} +1 -1
  256. package/dist/scripts/45.chunk.js +1065 -0
  257. package/dist/scripts/45.chunk.js.map +1 -0
  258. package/dist/scripts/{46-3bdc667e2e.chunk.js → 46-9ca7afd6a4.chunk.js} +1 -1
  259. package/dist/scripts/46.chunk.js +655 -0
  260. package/dist/scripts/46.chunk.js.map +1 -0
  261. package/dist/scripts/{47-9955928b6f.chunk.js → 47-ac0c9c5ce1.chunk.js} +1 -1
  262. package/dist/scripts/47.chunk.js +736 -0
  263. package/dist/scripts/47.chunk.js.map +1 -0
  264. package/dist/scripts/{48-3922b945f4.chunk.js → 48-6bf590b9a0.chunk.js} +1 -1
  265. package/dist/scripts/48.chunk.js +994 -0
  266. package/dist/scripts/48.chunk.js.map +1 -0
  267. package/dist/scripts/{49-23a1f6f7e7.chunk.js → 49-8e3e782ffb.chunk.js} +1 -1
  268. package/dist/scripts/49.chunk.js +761 -0
  269. package/dist/scripts/49.chunk.js.map +1 -0
  270. package/dist/scripts/{5-4bea739cc3.chunk.js → 5-b236603e85.chunk.js} +1 -1
  271. package/dist/scripts/5.chunk.js +15 -0
  272. package/dist/scripts/5.chunk.js.map +1 -0
  273. package/dist/scripts/{50-5c842985ec.chunk.js → 50-30ba08212e.chunk.js} +1 -1
  274. package/dist/scripts/50.chunk.js +530 -0
  275. package/dist/scripts/50.chunk.js.map +1 -0
  276. package/dist/scripts/{51-76bb20846a.chunk.js → 51-828972defb.chunk.js} +1 -1
  277. package/dist/scripts/51.chunk.js +932 -0
  278. package/dist/scripts/51.chunk.js.map +1 -0
  279. package/dist/scripts/{52-837abee352.chunk.js → 52-b2acf3e742.chunk.js} +1 -1
  280. package/dist/scripts/52.chunk.js +408 -0
  281. package/dist/scripts/52.chunk.js.map +1 -0
  282. package/dist/scripts/{53-52c9fac5eb.chunk.js → 53-5d6ea94871.chunk.js} +1 -1
  283. package/dist/scripts/53.chunk.js +756 -0
  284. package/dist/scripts/53.chunk.js.map +1 -0
  285. package/dist/scripts/{54-557f6ffe65.chunk.js → 54-2d8bd6fde0.chunk.js} +1 -1
  286. package/dist/scripts/54.chunk.js +681 -0
  287. package/dist/scripts/54.chunk.js.map +1 -0
  288. package/dist/scripts/{55-8dea861900.chunk.js → 55-4a8d360746.chunk.js} +1 -1
  289. package/dist/scripts/55.chunk.js +645 -0
  290. package/dist/scripts/55.chunk.js.map +1 -0
  291. package/dist/scripts/{56-491db19e9d.chunk.js → 56-ad12ebab5f.chunk.js} +1 -1
  292. package/dist/scripts/56.chunk.js +346 -0
  293. package/dist/scripts/56.chunk.js.map +1 -0
  294. package/dist/scripts/{57-87323c96be.chunk.js → 57-53b89c2ef0.chunk.js} +1 -1
  295. package/dist/scripts/57.chunk.js +422 -0
  296. package/dist/scripts/57.chunk.js.map +1 -0
  297. package/dist/scripts/{58-3408474ea9.chunk.js → 58-b246abe78c.chunk.js} +1 -1
  298. package/dist/scripts/58.chunk.js +437 -0
  299. package/dist/scripts/58.chunk.js.map +1 -0
  300. package/dist/scripts/{59-ad89e8b776.chunk.js → 59-19290686e0.chunk.js} +1 -1
  301. package/dist/scripts/59.chunk.js +342 -0
  302. package/dist/scripts/59.chunk.js.map +1 -0
  303. package/dist/scripts/{6-cf6bf13de2.chunk.js → 6-6fb543aa78.chunk.js} +1 -1
  304. package/dist/scripts/6.chunk.js +484 -0
  305. package/dist/scripts/6.chunk.js.map +1 -0
  306. package/dist/scripts/{60-3324435680.chunk.js → 60-0c075e7b5c.chunk.js} +1 -1
  307. package/dist/scripts/60.chunk.js +254 -0
  308. package/dist/scripts/60.chunk.js.map +1 -0
  309. package/dist/scripts/{61-57f4830468.chunk.js → 61-2725bbfab2.chunk.js} +1 -1
  310. package/dist/scripts/61.chunk.js +408 -0
  311. package/dist/scripts/61.chunk.js.map +1 -0
  312. package/dist/scripts/{62-27f0a916e8.chunk.js → 62-472d10a18e.chunk.js} +1 -1
  313. package/dist/scripts/62.chunk.js +142 -0
  314. package/dist/scripts/62.chunk.js.map +1 -0
  315. package/dist/scripts/{63-c328125cb6.chunk.js → 63-7d00e50441.chunk.js} +1 -1
  316. package/dist/scripts/63.chunk.js +147 -0
  317. package/dist/scripts/63.chunk.js.map +1 -0
  318. package/dist/scripts/{64-32b869d473.chunk.js → 64-1b42f78644.chunk.js} +1 -1
  319. package/dist/scripts/64.chunk.js +439 -0
  320. package/dist/scripts/64.chunk.js.map +1 -0
  321. package/dist/scripts/{65-2f7971dc4f.chunk.js → 65-14af88c745.chunk.js} +1 -1
  322. package/dist/scripts/65.chunk.js +582 -0
  323. package/dist/scripts/65.chunk.js.map +1 -0
  324. package/dist/scripts/{66-34c241cba2.chunk.js → 66-bc274df13a.chunk.js} +1 -1
  325. package/dist/scripts/66.chunk.js +442 -0
  326. package/dist/scripts/66.chunk.js.map +1 -0
  327. package/dist/scripts/{67-b5429e74ed.chunk.js → 67-d1edef09d6.chunk.js} +1 -1
  328. package/dist/scripts/67.chunk.js +295 -0
  329. package/dist/scripts/67.chunk.js.map +1 -0
  330. package/dist/scripts/{68-c8848a4a9d.chunk.js → 68-52468201b9.chunk.js} +1 -1
  331. package/dist/scripts/68.chunk.js +165 -0
  332. package/dist/scripts/68.chunk.js.map +1 -0
  333. package/dist/scripts/{69-3840d20a46.chunk.js → 69-b681e9a99c.chunk.js} +1 -1
  334. package/dist/scripts/69.chunk.js +248 -0
  335. package/dist/scripts/69.chunk.js.map +1 -0
  336. package/dist/scripts/{7-d1e99b91aa.chunk.js → 7-2807a666bc.chunk.js} +1 -1
  337. package/dist/scripts/7.chunk.js +309 -0
  338. package/dist/scripts/7.chunk.js.map +1 -0
  339. package/dist/scripts/{70-812a99c9c1.chunk.js → 70-d4018838a9.chunk.js} +1 -1
  340. package/dist/scripts/70.chunk.js +207 -0
  341. package/dist/scripts/70.chunk.js.map +1 -0
  342. package/dist/scripts/{71-5523ee0121.chunk.js → 71-29cce07c7f.chunk.js} +1 -1
  343. package/dist/scripts/71.chunk.js +237 -0
  344. package/dist/scripts/71.chunk.js.map +1 -0
  345. package/dist/scripts/{72-fd2b5e6473.chunk.js → 72-6f83214b8d.chunk.js} +1 -1
  346. package/dist/scripts/72.chunk.js +331 -0
  347. package/dist/scripts/72.chunk.js.map +1 -0
  348. package/dist/scripts/73.chunk.js +404 -0
  349. package/dist/scripts/73.chunk.js.map +1 -0
  350. package/dist/scripts/74.chunk.js +301 -0
  351. package/dist/scripts/74.chunk.js.map +1 -0
  352. package/dist/scripts/75.chunk.js +231 -0
  353. package/dist/scripts/75.chunk.js.map +1 -0
  354. package/dist/scripts/76.chunk.js +157 -0
  355. package/dist/scripts/76.chunk.js.map +1 -0
  356. package/dist/scripts/77.chunk.js +307 -0
  357. package/dist/scripts/77.chunk.js.map +1 -0
  358. package/dist/scripts/78.chunk.js +249 -0
  359. package/dist/scripts/78.chunk.js.map +1 -0
  360. package/dist/scripts/79.chunk.js +282 -0
  361. package/dist/scripts/79.chunk.js.map +1 -0
  362. package/dist/scripts/{8-1c22ae2c22.chunk.js → 8-8f44e8bfc4.chunk.js} +1 -1
  363. package/dist/scripts/8.chunk.js +307 -0
  364. package/dist/scripts/8.chunk.js.map +1 -0
  365. package/dist/scripts/80.chunk.js +308 -0
  366. package/dist/scripts/80.chunk.js.map +1 -0
  367. package/dist/scripts/81.chunk.js +366 -0
  368. package/dist/scripts/81.chunk.js.map +1 -0
  369. package/dist/scripts/82.chunk.js +314 -0
  370. package/dist/scripts/82.chunk.js.map +1 -0
  371. package/dist/scripts/83.chunk.js +328 -0
  372. package/dist/scripts/83.chunk.js.map +1 -0
  373. package/dist/scripts/84.chunk.js +313 -0
  374. package/dist/scripts/84.chunk.js.map +1 -0
  375. package/dist/scripts/85.chunk.js +291 -0
  376. package/dist/scripts/85.chunk.js.map +1 -0
  377. package/dist/scripts/86.chunk.js +119 -0
  378. package/dist/scripts/86.chunk.js.map +1 -0
  379. package/dist/scripts/87.chunk.js +219 -0
  380. package/dist/scripts/87.chunk.js.map +1 -0
  381. package/dist/scripts/88.chunk.js +194 -0
  382. package/dist/scripts/88.chunk.js.map +1 -0
  383. package/dist/scripts/89.chunk.js +522 -0
  384. package/dist/scripts/89.chunk.js.map +1 -0
  385. package/dist/scripts/{9-fab9edf019.chunk.js → 9-b8f9ea66c4.chunk.js} +1 -1
  386. package/dist/scripts/9.chunk.js +222 -0
  387. package/dist/scripts/9.chunk.js.map +1 -0
  388. package/dist/scripts/90.chunk.js +337 -0
  389. package/dist/scripts/90.chunk.js.map +1 -0
  390. package/dist/scripts/91.chunk.js +131 -0
  391. package/dist/scripts/91.chunk.js.map +1 -0
  392. package/dist/scripts/92.chunk.js +266 -0
  393. package/dist/scripts/92.chunk.js.map +1 -0
  394. package/dist/scripts/bundle-f28b86bf5b.min.js +8 -0
  395. package/dist/scripts/bundle.js +67206 -0
  396. package/dist/scripts/bundle.js.map +1 -0
  397. package/dist/scripts/bundles.json +2 -2
  398. package/dist/scripts/{polyfills-1554419c02.min.js → polyfills-1d2233ebcc.min.js} +1 -1
  399. package/dist/scripts/polyfills.js +14866 -0
  400. package/dist/scripts/polyfills.js.map +1 -0
  401. package/package.json +4 -4
  402. package/dist/scripts/23-d0172ec9d2.chunk.js +0 -1
  403. package/dist/scripts/25-36d490b1c6.chunk.js +0 -1
  404. package/dist/scripts/bundle-c2eae7224c.min.js +0 -8
  405. /package/dist/libs/shared/src/interfaces/models/{Interactive.d.ts → interactive.d.ts} +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@clickview/library-editor",
3
3
  "description": "Library Editor",
4
- "version": "1.1.27-dev.0",
4
+ "version": "1.1.27-dev.1",
5
5
  "main": "dist/scripts/bundle.js",
6
6
  "types": "dist/projects/library-editor/src/index.d.ts",
7
7
  "scripts": {
@@ -30,8 +30,8 @@
30
30
  "author": "Shale Kuzmanovski, Michael McDonnell",
31
31
  "license": "ISC",
32
32
  "devDependencies": {
33
- "@clickview/eslint-config": "0.0.0-rc.0",
34
- "@clickview/tooling": "0.0.19-dev.0",
33
+ "@clickview/eslint-config": "1.0.0",
34
+ "@clickview/tooling": "0.0.19-dev.1",
35
35
  "@fortawesome/fontawesome": "1.1.8",
36
36
  "@types/clipboard": "2.0.1",
37
37
  "@types/cropperjs": "1.3.0",
@@ -61,7 +61,7 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@babel/polyfill": "7.4.4",
64
- "@clickview/styles": "1.0.12-dev.0",
64
+ "@clickview/styles": "1.0.12-dev.1",
65
65
  "@clickview/url-signer": "1.0.0",
66
66
  "@microsoft/signalr": "^3.1.0",
67
67
  "autotrack": "2.4.1",
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[23],{1054:function(e,t,n){"use strict";n.d(t,"a",(function(){return p})),n.d(t,"k",(function(){return h})),n.d(t,"g",(function(){return y})),n.d(t,"e",(function(){return m})),n.d(t,"j",(function(){return g})),n.d(t,"i",(function(){return v})),n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return C})),n.d(t,"d",(function(){return S})),n.d(t,"f",(function(){return k})),n.d(t,"h",(function(){return b}));var r=n(2),o=n(1),i=n(19),a=n(29),s=n(3),l="libraryEditor.utils",u=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function c(e,t){if(e){var n=o.reduce(e,(function(e,n,r){var i=t[r];return n||i?o.isObject(n)&&o.isObject(i)&&!o.isUndefined(n.id)&&n.id===i.id?e:o.isArray(n)?f(n,i).length?e.concat(r):e:o.isEqual(n,i)?e:e.concat(r):e}),[]);if(n.length)return o.object(o.map(n,(function(n){return o.isArray(t[n])?[n,f(e[n],t[n])]:[n,t[n]]})))}}function f(e,t){var n=[];return o.each(t,(function(t){var r=o.findWhere(e,{id:t.id});if(!o.isUndefined(r)||0!==Object.keys(t).length){var i=o.isUndefined(r)?t:c(r,t);i&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(i.id=t.id,n.push(i))))}})),n}var p={getChanges:function(e,t){var n=c(o.omit(e.toJSON(),u),o.omit(t.toJSON(),u));if(n)return o.object(o.map(o.keys(n),(function(e){return[e,p.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(o.isObject(t)&&o.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return o.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new i.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var i=["distributors","producers","directors","productionCompanies"];for(var a in o.each(o.keys(n),(function(e){i.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(o.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[a]&&e.associations[a]){var s=e.get(a);(s instanceof r.a.Model||s instanceof r.a.NestedModel)&&s.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return o.each(o.keys(e.toJSON()),(function(i){if(o.contains(n,i)){var a=e.get(i).map((function(e){return e.id})),s=t.get(i).map((function(e){return e.id})),l=o.filter(a,(function(e){return e&&!o.contains(s,e)}));l.length&&(r[i]=l)}})),r}},h={name:[{required:!0,msg:function(){return s.a.getPhrase(l,"videoTitleRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(l,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return s.a.getPhrase(l,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?s.a.getPhrase(l,"episodeNumberLessThanOne"):e&&e>2147483647?s.a.getPhrase(l,"episodeNumberExceeds"):e%1!=0?s.a.getPhrase(l,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?s.a.getPhrase(l,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":s.a.getPhrase(l,"seasonNoEpisodeNumber")}},d=a().year(),m={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>d?s.a.getPhrase(l,"validProductionYears",{currentYear:d}):void 0):""}},y={name:[{required:!0,msg:function(){return s.a.getPhrase(l,"resourceNameRequired")}}]},g={suggestion:[{required:!0,msg:function(){return s.a.getPhrase(l,"suggestEditRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(l,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return s.a.getPhrase(l,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(l,"suggestEditReasonExceeds")}}]},b={number:function(e){return e?+e<1?s.a.getPhrase(l,"seasonLessThanOne"):+e>255?s.a.getPhrase(l,"seasonExceeds"):+e%1!=0?s.a.getPhrase(l,"seasonNotWhole"):"":s.a.getPhrase(l,"seasonRequired")}},v={empty:function(){return s.a.getPhrase(l,"suggestEditRatingRequired")},original:function(){return s.a.getPhrase(l,"suggestEditRatingInvalid")}},k={url:[{required:!0,pattern:"url",msg:function(){return s.a.getPhrase(l,"linkUrlRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(l,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return s.a.getPhrase(l,"linkNameRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(l,"linkNameExceeds")}}]},w={name:[{maxLength:128,msg:function(){return s.a.getPhrase(l,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return s.a.getPhrase(l,"fieldValueExceeds")}}]},C={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":s.a.getPhrase(l,"fieldsInvalid"):""}};function S(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1055:function(e,t,n){"use strict";var r=n(1061),o=n(1054),i=(n(1059),n(3),n(1062)),a=(n(1064),n(1060)),s=n(81),l={getVideoDownloadUrl:function(e,t){return s.a.safeUrlConcat(s.a.makeHttps(e),"/download?token=".concat(t))}};n.d(t,"a",(function(){return r.a})),n.d(t,"e",(function(){return o.g})),n.d(t,"h",(function(){return o.j})),n.d(t,"g",(function(){return o.i})),n.d(t,"d",(function(){return o.f})),n.d(t,"f",(function(){return o.h})),n.d(t,"c",(function(){return i.a})),n.d(t,"i",(function(){return a.a})),n.d(t,"b",(function(){return l}))},1059:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(49),i=n(159),a=n(3),s="libraryEditor.utils",l={name:[{required:!0,msg:function(){return a.a.getPhrase(s,"folderNameRequired")}},{maxLength:255,msg:function(){return a.a.getPhrase(s,"folderNameExceeds")}}]},u=function(e,t){return{parentId:function(n){return n?o.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?a.a.getPhrase(s,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":a.a.getPhrase(s,"selectParentFolder")}}},c=function(e){var t=e.validateName,n=e.validateParent,o=e.folder,i=e.collection;return t&&n?r.extend({},l,u(o,i)):t?l:n?u(o,i):void 0}},1060:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(15),o=n(3),i=n(185),a=n(1072),s=n(58);function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u,c="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(u||(u={}));var f={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-success";case e<80:return"bg-info";case e<96:return"bg-danger";case e<128:return"bg-pink";case e>=128:return"bg-warning";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case s.a.HostedLibrary:case s.a.CustomLibrary:return e.get("name");case s.a.Exchange:return o.a.getPhrase(c,"exchange");case s.a.Workspace:return o.a.getPhrase(c,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case s.a.HostedLibrary:case s.a.CustomLibrary:return"bg-info";case s.a.Exchange:return"bg-success";case s.a.Workspace:default:return"bg-danger"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(l(t={},u.Pdf,r.b.FilePDF),l(t,u.Image,r.b.FileImg),l(t,u.PowerPoint,r.b.FilePowerpoint),l(t,u.Document,r.b.FileWord),l(t,u.Excel,r.b.FileExcel),l(t,u.Zip,r.b.FileZip),l(t,u.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case u.Pdf:return"icon-red";case u.Image:return"icon-purple";case u.Document:return"icon-blue";case u.Excel:return"icon-green";case u.PowerPoint:return"icon-orange";case u.Zip:return"icon-teal";case u.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case u.Pdf:return o.a.getPhrase(c,"pdf");case u.Image:return o.a.getPhrase(c,"image");case u.Document:return o.a.getPhrase(c,"document");case u.Excel:return o.a.getPhrase(c,"spreadsheet");case u.PowerPoint:return o.a.getPhrase(c,"presentation");case u.Zip:return o.a.getPhrase(c,"zipArchive");case u.File:return o.a.getPhrase(c,"file");default:return""}},translateMetadataCollectionNames:function(e){return new a.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:f.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case i.e.VideoTitle:t+="VideoTitle";break;case i.e.Description:t+="Description";break;case i.e.Rating:t+="Rating";break;case i.e.SeriesTitle:t+="SeriesTitle";break;case i.e.Season:t+="SeasonNumber";break;case i.e.EpisodeNumber:t+="EpisodeNumber";break;case i.e.BroadcastDate:t+="BroadcastDate";break;case i.e.Channel:t+="Channel";break;case i.e.ProductionYear:t+="ProductionYear";break;case i.e.Distributors:t+="Distributors";break;case i.e.ProductionCompanies:t+="ProductionCompanies";break;case i.e.Directors:t+="Directors";break;case i.e.Producers:t+="Producers";break;case i.e.Other:t+="Other"}return o.a.getPhrase(c,t)}}},1061:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1),o=n(12),i=n(3),a="libraryEditor.utils",s={isValidChapterTime:function(e,t,n,i){if(i){if(!r.isNumber(t))return l.StartTime.Invalid();if(t<0)return l.StartTime.Invalid();if(t>o.w.millisecondsToSeconds(n))return l.StartTime.Exceeds();if(i.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return l.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?l.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?l.Name.Exists():r.isEmpty(t.trim())?l.Name.Invalid():void 0:l.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},l={Name:{Invalid:function(){return i.a.getPhrase(a,"chapterNameInvalid")},Exists:function(){return i.a.getPhrase(a,"chapterNameExists")},MaxLength:function(){return i.a.getPhrase(a,"chapterNameExceeds")}},StartTime:{Invalid:function(){return i.a.getPhrase(a,"chapterStartTimeInvalid")},Exists:function(){return i.a.getPhrase(a,"chapterStartTimeExists")},Exceeds:function(){return i.a.getPhrase(a,"chapterStartTimeExceeds")}}}},1062:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(3),o="libraryEditor.utils",i={name:[{required:!0,msg:function(){return r.a.getPhrase(o,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(o,"libraryNameExceeds")}}]}},1064:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),o=n(1054),i=r.a.encloseNamespace("libraryEditor.utils"),a={name:[{required:!0,msg:function(){return i("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return i("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return i("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?i("episodeNumberLessThanOne"):e&&e>255?i("episodeNumberExceeds"):e&&e%1!=0?i("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?i("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":i("seasonNoEpisodeNumber")},productionYear:function(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return(e=o.e.productionYear).apply.apply(e,[null].concat(n))}}},1072:function(e,t,n){"use strict";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 o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(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=l(e);if(t){var o=l(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"!==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 l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return u}));var u=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)}(n,e);var t=a(n);function n(){return o(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1108:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(1),o=n(2),i=n(1109),a=n.n(i),s=n(1110),l=n.n(s);function u(e){return(u="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 c(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 f(e,t){return(f=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=d(e);if(t){var o=d(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"!==u(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 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&&f(e,t)}(s,e);var t,n,o,i=p(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),i.call(this,e)}return t=s,(n=[{key:"viewOptions",value:function(){var e=this.options.tabs.map((function(e){return Object.assign(Object.assign({},e),{link:e.link.selector.replace(".","")})}));return{styles:a.a,tabs:e}}},{key:"setActiveTab",value:function(){var e=this,t=!1;if(this.options.tabs.forEach((function(n){n.active=!1,n.link.selector===e.options.activeTab&&(n.active=!0,t=!0)})),!t){var n=r.first(this.options.tabs);n&&(n.active=!0)}}},{key:"onBeforeRender",value:function(){this.setActiveTab()}},{key:"name",get:function(){return"TabsView"}},{key:"className",get:function(){var e="bg-white py-2 border-bottom";return this.options.className&&(e+=" ".concat(this.options.className)),e}},{key:"template",get:function(){return l.a}},{key:"appLinks",get:function(){var e={};return this.options.tabs.forEach((function(t){return e[t.link.selector]=t.link.appLink})),e}}])&&c(t.prototype,n),o&&c(t,o),s}(o.a.Component)},1109:function(e,t,n){e.exports={link:"_5idZs",active:"_3Ty4M"}},1110:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o,i,a){var s;e.propertyIsEnumerable;return null!=(s=n.unless.call(null!=t?t:e.nullContext||{},null!=t?t.hide:t,{name:"unless",hash:{},fn:e.program(2,o,0,i,a),inverse:e.noop,data:o}))?s:""},2:function(e,t,n,r,o,i,a){e.propertyIsEnumerable;var s,l=e.lambda,u=e.escapeExpression;return' <a class="'+u(l(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.link:s,t))+" p-2 "+u(l(null!=t?t.link:t,t))+" "+(null!=(s=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.active:t,{name:"if",hash:{},fn:e.program(3,o,0,i,a),inverse:e.noop,data:o}))?s:"")+'">'+u(l(null!=t?t.name:t,t))+"</a>\r\n"},3:function(e,t,n,r,o,i,a){var s;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.active:s,t))+" border-bottom border-primary text-primary"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o,i,a){var s;e.propertyIsEnumerable;return null!=(s=n.each.call(null!=t?t:e.nullContext||{},null!=(s=null!=t?t.options:t)?s.tabs:s,{name:"each",hash:{},fn:e.program(1,o,0,i,a),inverse:e.noop,data:o}))?s:""},useData:!0,useDepths:!0})},1118:function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n(1),o=n(6),i=n(2),a=n(19),s=n(15),l=n(92),u=n(12),c=n(1168),f=n.n(c),p=n(1169),h=n.n(p);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 m(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 y(e,t){return(y=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,r=v(e);if(t){var o=v(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 v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=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&&y(e,t)}(d,e);var t,n,c,p=g(d);function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),p.call(this,e)}return t=d,(n=[{key:"events",value:function(){return{submit:"onSubmit","click .remove":"onClickRemove"}}},{key:"initialize",value:function(){this.model||this.options.parentChannelName||i.a.ErrorHelper.throw(new a.a("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new i.a.Model),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=o.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"clearInput",value:function(){this.getUI("input").typeahead("val",null)}},{key:"setInput",value:function(e){this.getUI("input").typeahead("val",e)}},{key:"onTypeaheadSelect",value:function(e,t){var n;e.preventDefault(),n="string"==typeof t?t:t.title||t.name||t.query,this.model.set(this.options.stickItProperty,n),this.parentChannel&&this.options.selectEvent&&this.parentChannel.trigger(this.options.selectEvent,t),this.onSubmit(e),this.toggleRemove()}},{key:"onSubmit",value:function(e){var t=this;if(e.preventDefault(),!this.isDestroyed()&&this.getTypeaheadActionOptions().clearOnSelect)return this.getUI("input").typeahead("close"),setTimeout((function(){t.model.clear(),t.clearInput()}),0),!1}},{key:"onClickRemove",value:function(){this.model.clear(),this.parentChannel.trigger(this.options.removeEvent,this.model),this.toggleRemove()}},{key:"getSources",value:function(){return r.isArray(this.options.typeaheadConfigs)?l.a.getSearchSources(this.options.typeaheadConfigs):l.a.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?r.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return r.isObject(this.options.actionOptions)?r.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){r.isObject(this.options.callbacks)&&(r.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",r.bind(this.options.callbacks.onRender,this)),r.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),r.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",r.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",r.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:h.a},this.options),{showRemove:this.shouldShowRemove(),svgRemove:s.a.getSvg(s.b.Close)})}},{key:"onRender",value:function(){this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),o.Validation.bind(this),this.toggleRemove()}},{key:"onClose",value:function(){this.getUI("input").off(),this.unstickit(),o.Validation.unbind(this)}},{key:"name",get:function(){return"SearchTypeaheadComponent"}},{key:"template",get:function(){return f.a}},{key:"className",get:function(){return"search-container ".concat(h.a.typeaheadContainer," mb-2")}},{key:"channelName",get:function(){return u.k.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{input:"#".concat(this.options.inputId)}}},{key:"defaults",get:function(){return{inputId:"search-typeahead",placeholderText:"Search",stickItProperty:"name",selectEvent:"select:result",additionalClasses:"",editable:!0}}},{key:"bindings",get:function(){var e,t,n,r="[name=".concat(this.options.inputName,"]");return e={},t=r,n={observe:this.options.stickItProperty,setOptions:{validate:!0}},t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}])&&m(t.prototype,n),c&&m(t,c),d}(i.a.Component)},1130:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(6),o=n(2),i=n(15),a=n(1131),s=n.n(a),l=n(1132),u=n.n(l),c=n(0),f=n(1108);function p(e){return(p="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 h(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 m(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=g(e);if(t){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){return!t||"object"!==p(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 g(e){return(g=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)}(l,e);var t,n,o,a=m(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,(n=[{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){var e=Object.assign(Object.assign({},this.options.goBackTab),{link:this.options.goBackTab.link.selector.replace(".","")});return{styles:s.a,backTab:e,backArrow:i.a.getSvg(i.b.ArrowLeft)}}},{key:"onSave",value:function(){r.Radio.channel(c.b.LIBRARY_EDITOR).trigger(c.a.LibraryEditor.SAVE_VIDEO)}},{key:"onRender",value:function(){this.showChildView("tabs",new f.a({tabs:this.options.tabs,activeTab:this.options.activeTab}))}},{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"template",get:function(){return u.a}},{key:"appLinks",get:function(){var e,t,n,r=this.options.goBackTab.link;return e={},t=r.selector,n=r.appLink,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}])&&h(t.prototype,n),o&&h(t,o),l}(o.a.Component)},1131:function(e,t,n){e.exports={svgContainer:"_27gR6"}},1132:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression;return'<div class="row">\r\n <h4>\r\n <a class="d-inline-flex align-items-center '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.link:i,t))+" "+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.backTab:i)?i.link:i,t))+'">\r\n <span class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+' d-inline-block mx-2">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.backArrow:i,t))?i:"")+"</span>\r\n "+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.backTab:i)?i.name:i,t))+'\r\n </a>\r\n </h4>\r\n</div>\r\n<div class="tabs-region pl-2"></div>'},useData:!0})},1136:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(3),o=n(15),i=n(58);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s,l="shared.shared-utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(s||(s={}));var u={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-success";case e<80:return"bg-info";case e<96:return"bg-danger";case e<128:return"bg-pink";case e>=128:return"bg-warning";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.type){case i.a.HostedLibrary:case i.a.CustomLibrary:return e.name;case i.a.Exchange:return r.a.getPhrase(l,"exchange");case i.a.Workspace:return r.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case i.a.HostedLibrary:case i.a.CustomLibrary:return"bg-info";case i.a.Exchange:return"bg-success";case i.a.Workspace:default:return"bg-danger"}},isInteractive:function(e){var t,n,r;return!!(null===(r=null===(n=null===(t=e)||void 0===t?void 0:t.interactives)||void 0===n?void 0:n.data)||void 0===r?void 0:r.length)},mapTypeToSvg:function(e){var t,n=(a(t={},s.Pdf,o.b.FilePDF),a(t,s.Image,o.b.FileImg),a(t,s.PowerPoint,o.b.FilePowerpoint),a(t,s.Document,o.b.FileWord),a(t,s.Excel,o.b.FileExcel),a(t,s.Zip,o.b.FileZip),a(t,s.File,o.b.File),t)[e];return n||(n=o.b.Folder),n},mapTypeToClass:function(e){switch(e){case s.Pdf:return"icon-red";case s.Image:return"icon-purple";case s.Document:return"icon-blue";case s.Excel:return"icon-green";case s.PowerPoint:return"icon-orange";case s.Zip:return"icon-teal";case s.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case s.Pdf:return r.a.getPhrase(l,"pdf");case s.Image:return r.a.getPhrase(l,"image");case s.Document:return r.a.getPhrase(l,"document");case s.Excel:return r.a.getPhrase(l,"spreadsheet");case s.PowerPoint:return r.a.getPhrase(l,"presentation");case s.Zip:return r.a.getPhrase(l,"zipArchive");case s.File:return r.a.getPhrase(l,"file");default:return""}}}},1145:function(e,t,n){"use strict";var r=n(2),o=n(6),i=n(1156),a=n.n(i),s=n(192),l=n(4),u=n(42),c=n(15),f=n(1136),p=n(1157),h=n.n(p);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 m(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 y(e,t){return(y=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,r=v(e);if(t){var o=v(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 v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=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&&y(e,t)}(i,e);var t,n,r,o=g(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"onClickEdit",value:function(){var e=u.a.mergeOptions(this.options.analyticsOptions,{actionType:l.q.Edit,entity:l.e.Resource,workflowPhase:l.r.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};u.a.logUserAction(t,e)}},{key:"onClickDelete",value:function(){s.a.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){var e=this.model.get("metadata"),t=e?e.type:"";return{editable:this.options.editable,extension:f.a.mapTypeToExtension(t),svg:c.a.getSvg(f.a.mapTypeToSvg(t)),iconClass:f.a.mapTypeToClass(t),resourceType:f.a.mapTypeToName(t),editSvg:c.a.getSvg(c.b.Edit),trashSvg:c.a.getSvg(c.b.Delete)}}},{key:"name",get:function(){return"ResourceItemComponent"}},{key:"template",get:function(){return h.a}},{key:"className",get:function(){return this.options.className||"mb-2"}},{key:"appLinks",get:function(){return{".edit":this.options.getEditAppLink(this.model.get("id"))}}}])&&m(t.prototype,n),r&&m(t,r),i}(r.a.Component),w=n(3),C=n(137),S=n(143),O=n(193);function P(e){return(P="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 E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(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 x(e,t,n){return t&&R(e.prototype,t),n&&R(e,n),e}function T(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&&N(e,t)}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(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=D(e);if(t){var o=D(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){return!t||"object"!==P(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)}n.d(t,"b",(function(){return j})),n.d(t,"a",(function(){return L}));var j=function(e){T(n,e);var t=_(n);function n(e){return E(this,n),t.call(this,e)}return x(n,[{key:"onClickDelete",value:function(e){var t=this;new O.a({title:w.a.getPhrase(this.lang,"removeHeading"),text:w.a.getPhrase(this.lang,"removeBody",{resourceName:e.get("name")}),buttons:[{text:w.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:w.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){o.Radio.channel(t.options.channelName).trigger("delete:resource",e.get("id"))}))}},{key:"name",get:function(){return"VideoResourcesComponentCollection"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"childView",get:function(){return k}},{key:"childViewOptions",get:function(){var e=this;return{editable:this.options.editable,videoId:this.options.videoId,analyticsOptions:this.options.analyticsOptions,onClickDelete:function(t){return e.onClickDelete(t)},getEditAppLink:function(t){return{application:C.a.LIBRARY_EDITOR,action:S.a.LibraryEditor.EDIT_RESOURCE,args:[e.options.videoId,t]}}}}}]),n}(r.a.ComponentCollection),L=function(e){T(n,e);var t=_(n);function n(e){return E(this,n),t.call(this,e)}return x(n,[{key:"regions",value:function(){return{resources:{replaceElement:!0,el:".resource-list-region"}}}},{key:"renderResources",value:function(){var e=new j({collection:this.options.customCollection||this.model.resources,editable:this.options.editable||!1,videoId:this.options.videoId||this.model.get("id"),channelName:this.options.parentChannelName||this.channelName});this.showChildView("resources",e)}},{key:"viewOptions",value:function(){return{resourcesHeadingText:this.options.headerText||w.a.getPhrase(this.lang,"heading"),emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.renderResources()}},{key:"name",get:function(){return"VideoResourcesComponent"}},{key:"template",get:function(){return a.a}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}}]),n}(r.a.Component)},1156: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"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.resourcesHeadingText:i,t))+"</h5>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n<div class="resource-list-region"></div>'},useData:!0})},1157: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,a=e.lambda;return'<a class="float-right svg-container cursor-pointer text-muted delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\r\n<a class="float-right svg-container cursor-pointer text-muted edit">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<span title="'+l(s(null!=(i=null!=t?t.options:t)?i.resourceType:i,t))+'" class="d-inline-block align-middle mr-2 svg-container '+l(s(null!=(i=null!=t?t.options:t)?i.iconClass:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\r\n<a href="'+l("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:c)?a.call(u,{name:"url",hash:{},data:o}):a)+"?name="+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:o}):a)+'" class="align-middle">\r\n '+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:o}):a)+"\r\n</a>\r\n"+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1162: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,a=e.lambda,s=e.escapeExpression;return'<a class="float-right '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+" "+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.actionSvg:i,t))+' text-muted delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\r\n<a class="float-right '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+" "+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.actionSvg:i,t))+' text-muted edit">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<span class="d-inline-block align-middle mr-2 icon-blue '+l(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.linkSvg:i,t))?i:"")+'</span>\r\n<a href="'+l("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:c)?a.call(u,{name:"url",hash:{},data:o}):a)+'" target="_blank" class="align-middle info-link">\r\n '+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:o}):a)+"\r\n</a>\r\n"+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1163:function(e,t,n){e.exports={svgContainer:"_3T40U",actionSvg:"_3FRzz"}},1164: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"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.headingText:i,t))+"</h5>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n<div class="links-region"></div>'},useData:!0})},1168: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 e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,r,o){return"autofocus"},5:function(e,t,n,r,o){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<input\r\n name="'+s(a(null!=(i=null!=t?t.options:t)?i.inputName:i,t))+'"\r\n type="text"\r\n class="form-control '+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+" "+s(a(null!=(i=null!=t?t.options:t)?i.additionalClasses:i,t))+'"\r\n id="'+s(a(null!=(i=null!=t?t.options:t)?i.inputId:i,t))+'"\r\n autocomplete="off"\r\n placeholder="'+s(a(null!=(i=null!=t?t.options:t)?i.placeholderText:i,t))+'"\r\n '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.autofocus:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n "+(null!=(i=n.unless.call(l,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"unless",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n></input>\r\n<span class="svg-container mb-2 '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svg:i,t))+' remove" style="display: none;">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.svgRemove:i,t))?i:"")+"</span>"},useData:!0})},1169:function(e,t,n){e.exports={svg:"_1iL3O",typeaheadContainer:"_1SWXc",disabled:"_3C2O8"}},1170:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(2),o=n(244),i=n(12),a=n(3),s=n(283),l=n(185),u=n(1171),c=n.n(u),f=n(1172),p=n.n(f);function h(e){return(h="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 d(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 m(e,t){return(m=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=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==h(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 b(e){return(b=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&&m(e,t)}(h,e);var t,n,u,f=y(h);function h(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),f.call(this,e)}return t=h,(n=[{key:"initialize",value:function(){this.spinnerModel=new r.a.Model({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,l.d.MergeChapters,this.onClickMergeChapters)}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(o.c.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==s.a.New&&this.model.get("status")!==s.a.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:a.a.getPhrase(this.lang,"mergeChapters"),subtitles:a.a.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:a.a.getPhrase(this.lang,"enabledCustomSubtitles")},t=new o.a({buttonText:e[this.options.type],extraButtonClass:"btn-primary ".concat(p.a.btn),model:this.spinnerModel,spinnerOptions:{size:i.r.Small,type:i.s.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:l.d.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:a.a.getPhrase(this.lang,"chaptersHeading"),line1:a.a.getPhrase(this.lang,"chaptersInfo1"),line2:a.a.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:a.a.getPhrase(this.lang,"subtitlesHeading"),line1:a.a.getPhrase(this.lang,"subtitlesInfo1"),line2:a.a.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:a.a.getPhrase(this.lang,"cvSubtitlesHeading"),line1:a.a.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:a.a.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&a.a.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(o.c.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===s.a.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return c.a}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}}])&&d(t.prototype,n),u&&d(t,u),h}(r.a.Component)},1171: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=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.progress:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:""},2:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.escapeExpression;return' <span class="m-3 text-muted">'+a(e.lambda(null!=(i=null!=t?t.options:t)?i.progress:i,t))+'</span>\r\n <p class="pt-2">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:o}))+"</p>\r\n"},4:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.failed:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:""},5:function(e,t,n,r,o){e.propertyIsEnumerable;return'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:o}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression;return"<h4>"+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.componentOptions:i)?i.heading:i,t))+"</h4>\r\n<p>"+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.componentOptions:i)?i.line1:i,t))+"</p>\r\n<p>"+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.componentOptions:i)?i.line2:i,t))+'</p>\r\n<div class="btn-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.processing:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(4,o,0),data:o}))?i:"")},useData:!0})},1172:function(e,t,n){e.exports={btn:"_59zg9"}},1208:function(e,t,n){"use strict";var r=n(2),o=n(6),i=n(15),a=n(4),s=n(42),l=n(12),u=n(0),c=n(1162),f=n.n(c),p=n(1163),h=n.n(p),d=n(3);function m(e){return(m="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 r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(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=k(e);if(t){var o=k(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==m(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 k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=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&&g(e,t)}(p,e);var t,n,r,c=b(p);function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),c.call(this,e)}return t=p,(n=[{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"onClickEdit",value:function(){var e=s.a.mergeOptions(this.options.analyticsOptions,{actionType:a.q.Edit,entity:a.e.Resource,workflowPhase:a.r.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};s.a.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new l.d({title:d.a.getPhrase(this.lang,"removeHeading"),text:d.a.getPhrase(this.lang,"removeConfirm",{name:l.v.escapeExpression(this.model.get("name"))}),buttons:[{text:d.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:d.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:l.k.generateUniqueChannelName(this)}).render().done((function(){o.Radio.channel(e.options.channelName).trigger("delete:link",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:h.a,editable:this.options.editable,linkSvg:i.a.getSvg(i.b.Link),editSvg:i.a.getSvg(i.b.Edit),trashSvg:i.a.getSvg(i.b.Delete)}}},{key:"name",get:function(){return"LinkItemComponent"}},{key:"template",get:function(){return f.a}},{key:"className",get:function(){return"mb-2"}},{key:"lang",get:function(){return"libraryEditor.editLinks"}},{key:"appLinks",get:function(){return{".edit":{application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.EDIT_LINK,args:[this.options.videoId,this.model.get("id")]}}}}])&&y(t.prototype,n),r&&y(t,r),p}(r.a.Component),C=n(1164),S=n.n(C);function O(e){return(O="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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(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 R(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),e}function x(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&&T(e,t)}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(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=I(e);if(t){var o=I(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}function _(e,t){return!t||"object"!==O(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 I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return D}));var D=function(e){x(n,e);var t=N(n);function n(e){return P(this,n),t.call(this,e)}return R(n,[{key:"regions",value:function(){return{links:{el:".links-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return this.options}},{key:"onRender",value:function(){this.showChildView("links",new j({collection:this.options.customCollection||this.model.get("links"),channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions,editable:this.options.editable,videoId:this.options.videoId,headingText:this.options.headingText,emptyStateText:this.options.emptyStateText}))}},{key:"name",get:function(){return"VideoLinksComponent"}},{key:"template",get:function(){return S.a}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}}]),n}(r.a.Component),j=function(e){x(n,e);var t=N(n);function n(e){return P(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"LinkItemComponentCollection"}},{key:"childViewOptions",get:function(){return this.options}},{key:"childView",get:function(){return w}}]),n}(r.a.ComponentCollection)},1299:function(e,t,n){e.exports={fileDrop:"_3-Sp5",dropMask:"TuDHp",dragOver:"_3Dz1H"}},1300:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,s=e.escapeExpression;return'<div class="'+s("function"==typeof(a=null!=(a=n.dropMask||(null!=t?t.dropMask:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"dropMask",hash:{},data:o}):a)+'">\r\n <h3>'+s(e.lambda(null!=(i=null!=t?t.options:t)?i.fileDropText:i,t))+"</h3>\r\n</div>"},useData:!0})},1301: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'<p class="alert alert-warning mb-0">'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.limitText:i,t))+"</p>\r\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<div class="file-drop '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.fileDrop:i,t))+" p-2"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.limitText:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+'">\r\n <button class="browse btn btn-secondary mr-2">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"browse",{name:"lang",hash:{},data:o}))+'</button>\r\n <span class="text-muted align-middle">'+s(a(null!=(i=null!=t?t.options:t)?i.alternateText:i,t))+"</span>\r\n</div>\r\n"},4:function(e,t,n,r,o){return" col-6 "},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda;return"<h5>"+e.escapeExpression(a(null!=(i=null!=t?t.options:t)?i.title:i,t))+"</h5>\r\n<p>"+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+"</p>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.limitText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:"")},useData:!0})},1302: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,a=e.lambda;return'<span class="d-inline-block align-middle mr-2 '+e.escapeExpression(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+' float-right text-success">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.tickSvg:i,t))?i:"")+"</span>\r\n"},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<span class="d-inline-block align-middle mr-2 '+e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+' cursor-pointer cancel-upload close float-right">&times;</span>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<span class="d-inline-block align-middle mr-2 '+l(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\r\n<span class="align-middle">\r\n '+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(u,{name:"name",hash:{},data:o}):a)+"\r\n</span>\r\n"+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.finished:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:"")+'\r\n<div class="progress my-2 '+l(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.progress:i,t))+' mt-2">\r\n <div class="progress-bar bg-info" style="width: '+l("function"==typeof(a=null!=(a=n.progress||(null!=t?t.progress:t))?a:c)?a.call(u,{name:"progress",hash:{},data:o}):a)+'%" aria-valuenow="'+l("function"==typeof(a=null!=(a=n.progress||(null!=t?t.progress:t))?a:c)?a.call(u,{name:"progress",hash:{},data:o}):a)+'" aria-valuemin="0" aria-valuemax="100"></div>\r\n</div>'},useData:!0})},1303:function(e,t,n){e.exports={svgContainer:"QNFLR",progress:"_1q_ig"}},1304:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;return'<form>\r\n <div class="form-group">\r\n <label for="language">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="typahead-region"></div>\r\n </div>\r\n</form>'},useData:!0})},1305: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,a=e.lambda,s=e.escapeExpression;return'<a class="float-right '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+" "+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.actionSvg:i,t))+' text-muted delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,s=e.lambda,l=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<span class="d-inline-block align-middle mr-2 '+l(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\r\n<a href="'+l("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:e.hooks.helperMissing)?a.call(u,{name:"url",hash:{},data:o}):a)+"?name="+l(s(null!=(i=null!=t?t.options:t)?i.name:i,t))+'" class="align-middle">\r\n '+l(s(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n</a>\r\n"+(null!=(i=n.unless.call(u,null!=(i=null!=t?t.options:t)?i.isClickViewContent:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1306:function(e,t,n){e.exports={svgContainer:"_186X3",actionSvg:"_3_l1b"}},1307: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 e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.headerText:i,t))+"</h5>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n<div class="subtitles-list-region"></div>'},useData:!0})},1308: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'<p class="alert alert-warning col-8">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"limit",{name:"lang",hash:{limit:null!=(i=null!=t?t.options:t)?i.limit:i},data:o}))+"</p>\r\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||a).call(i,"subheading",{name:"lang",hash:{},data:o}))+'</p>\r\n<div class="form-group mb-1">\r\n <label for="url">'+s((n.lang||t&&t.lang||a).call(i,"urlLabel",{name:"lang",hash:{},data:o}))+'</label>\r\n <input name="url" id="url" class="form-control" type="text" placeholder="'+s((n.lang||t&&t.lang||a).call(i,"urlPlaceholder",{name:"lang",hash:{},data:o}))+'">\r\n <div class="form-feedback"></div>\r\n</div>\r\n<div class="form-group mb-1" id="name-container" style="display: none;">\r\n <input type="text" class="form-control" name="name" placeholder="'+s((n.lang||t&&t.lang||a).call(i,"namePlaceholder",{name:"lang",hash:{},data:o}))+'">\r\n <div class="form-feedback"></div>\r\n</div>\r\n<div class="attach-btn-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<h5 class="pt-2">Resource Links</h5>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.hide:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:"")},useData:!0})},1309:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return"col-5"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{};return'<div class="tab-region"></div>\r\n\r\n<div class="row py-3">\r\n <div class="'+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.isClickViewContent:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">\r\n <div class="clickview-subtitles-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="subtitles-upload-region"></div>\r\n <div class="subtitles-upload-list-region p-0 col-8"></div>\r\n <div class="customer-subtitles-list-region p-0 col-8"></div>\r\n </div>\r\n</div>\r\n\r\n<div class="row border-top py-3">\r\n <div class="'+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.isClickViewContent:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">\r\n <div class="clickview-resources-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="resources-upload-region"></div>\r\n <div class="resources-upload-list-region p-0 col-8"></div>\r\n <div class="customer-resources-list-region p-0 col-8"></div>\r\n </div>\r\n</div>\r\n\r\n<div class="row border-top py-3">\r\n <div class="'+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.isClickViewContent:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">\r\n <div class="clickview-link-list-region"></div>\r\n </div>\r\n <div class="col-7">\r\n <div class="add-links-region mb-2"></div>\r\n <div class="customer-link-list-region p-0 col-8"></div>\r\n </div>\r\n</div>'},useData:!0})},1478:function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(6),i=n(2),a=n(5),s=n(3),l=n(14),u=n(113),c=n(299),f=n(43),p=n(178),h=n(292),d=n(470),m=n(1299),y=n.n(m),g=n(1300),b=n.n(g),v=n(1301),k=n.n(v);function w(e){return(w="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 C(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 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(e);if(t){var o=E(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return P(this,n)}}function P(e,t){return!t||"object"!==w(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(e){return(E=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&&S(e,t)}(i,e);var t,n,r,o=O(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"events",value:function(){var e,t,n,r="dragleave .".concat(y.a.dropMask);return n="onDragLeave",(t=r)in(e={"drop .file-drop":"onDrop","dragover .file-drop":"onDragOver"})?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"onDrop",value:function(){this.$el.removeClass(y.a.dragOver)}},{key:"onDragOver",value:function(e){this.$el.addClass(y.a.dragOver),e.preventDefault()}},{key:"onDragLeave",value:function(){this.$el.removeClass(y.a.dragOver)}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({},this.options),{styles:y.a,limitText:this.options.limitText,isClickViewContent:this.options.isClickViewContent})}},{key:"onRender",value:function(){this.getUI("dropArea").append(b()({dropMask:y.a.dropMask,fileDropText:s.a.getPhrase(this.lang,"drop")}))}},{key:"name",get:function(){return"FileSelectComponent"}},{key:"template",get:function(){return k.a}},{key:"lang",get:function(){return"shared._fileSelect"}},{key:"elements",get:function(){return{dropArea:".file-drop"}}},{key:"defaults",get:function(){return{acceptMultiple:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:h.a,buttonSelector:".browse",channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple,mimeType:this.options.mimeType},{behaviorClass:d.a,channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple}]}}])&&C(t.prototype,n),r&&C(t,r),i}(i.a.Component),x=n(0),T=n(12),N=n(174),_=n(9),I=n(282),D=n(134),j=n(1145),L=n(1170),V=n(15),U=n(1302),F=n.n(U),A=n(1303),M=n.n(A),q=n(192);function B(e){return(B="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 H(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 z(e,t){return(z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(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 W(this,n)}}function W(e,t){return!t||"object"!==B(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 Z=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&&z(e,t)}(i,e);var t,n,r,o=J(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"events",value:function(){return{"click .cancel-upload":"onClickCancelUpload"}}},{key:"onClickCancelUpload",value:function(){q.a.isFunction(this.options.onClickCancelUpload)&&this.options.onClickCancelUpload(this.model.get("id"))}},{key:"viewOptions",value:function(){return{styles:M.a,svg:V.a.getSvg(V.b.Folder),tickSvg:V.a.getSvg(V.b.Check),finished:this.model.get("progress")>=100}}},{key:"name",get:function(){return"FileUploadComponent"}},{key:"template",get:function(){return F.a}}])&&H(t.prototype,n),r&&H(t,r),i}(i.a.Component);function X(e){return(X="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 Q(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 G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function K(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=te(e);if(t){var o=te(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ee(this,n)}}function ee(e,t){return!t||"object"!==X(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)}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&&G(e,t)}(a,e);var t,n,r,i=K(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"FileUploadsComponentCollection"}},{key:"childView",get:function(){return Z}},{key:"childViewOptions",get:function(){var e=this;return{onClickCancelUpload:function(t){o.Radio.channel(e.options.channelName).trigger("cancel:upload",t)}}}}])&&Q(t.prototype,n),r&&Q(t,r),a}(i.a.ComponentCollection),re=n(30),oe=n(1118),ie=n(130),ae={handleQuery:function(){return function(e,t){var n=[];if(e){var o=CVLanguages.getEnglishNameContains(e);return r.each(o,(function(e,t){n.push({key:t,name:e.englishName})})),t(n)}t()}},getTypeaheadConfig:function(){return function(){return{name:"languages",source:ae.handleQuery(),limit:5,display:function(e){return e.name},templates:{suggestion:ie.d,pending:ie.b,notFound:ie.c}}}}},se=n(1304),le=n.n(se);function ue(e){return(ue="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 ce(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 fe(e,t){return(fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function pe(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=de(e);if(t){var o=de(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return he(this,n)}}function he(e,t){return!t||"object"!==ue(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 de(e){return(de=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var me=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&&fe(e,t)}(i,e);var t,n,r,o=pe(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"initialize",value:function(e){this.model=re.a.get("subtitle:language",e.defaultLanguage),this.model.addValidation(T.t),this.listenTo(this.channelName,"select:language",this.onLanguageSelected)}},{key:"events",value:function(){return{"click .submit":"onClickSubmit",submit:"onClickSubmit"}}},{key:"regions",value:function(){return{typeahead:".typahead-region"}}},{key:"getTypeaheadConfigs",value:function(){return[{name:"languages",typeaheadConfig:ae.getTypeaheadConfig()}]}},{key:"renderTypeahead",value:function(){this.showChildView("typeahead",new oe.a({model:this.model,parentChannelName:this.channelName,inputId:"language",selectEvent:"select:language",typeaheadConfigs:this.getTypeaheadConfigs()}))}},{key:"onLanguageSelected",value:function(e){this.model.set("code",e.key)}},{key:"onClickSubmit",value:function(){this.model.validate(),this.model.isValid()&&(this.options.promise.resolve(this.model.toJSON()),this.triggerMethod("hide"))}},{key:"onBeforeDestroy",value:function(){"pending"===this.options.promise.state()&&this.options.promise.reject()}},{key:"onRender",value:function(){this.renderTypeahead()}},{key:"template",get:function(){return le.a}},{key:"name",get:function(){return"LanguageSelectComponent"}},{key:"lang",get:function(){return"libraryEditor.languageSelect"}},{key:"behaviors",get:function(){return[{behaviorClass:I.e,title:s.a.getPhrase(this.lang,"heading"),buttons:[{text:s.a.getPhrase(this.lang,"submit"),type:"submit",className:"btn btn-primary submit"}]},{behaviorClass:I.a}]}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}}])&&ce(t.prototype,n),r&&ce(t,r),i}(i.a.Component),ye=n(1130),ge=n(1136),be=function(e,t){var n,r,o,i=e.language;return o=(null===(n=t)||void 0===n?void 0:n.filter((function(e){return e.language!==i}))).length>0?CVLanguages.getFullEnglishName(i):CVLanguages.getEnglishName(i),(null===(r=e.metadata)||void 0===r?void 0:r.autoGenerated)?s.a.getPhrase("shared.shared-utils","autoGeneratedSubtitle",{name:o}):o},ve=n(1305),ke=n.n(ve),we=n(1306),Ce=n.n(we);function Se(e){return(Se="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 Oe(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 Pe(e,t){return(Pe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ee(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=xe(e);if(t){var o=xe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Re(this,n)}}function Re(e,t){return!t||"object"!==Se(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 xe(e){return(xe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Te=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&&Pe(e,t)}(i,e);var t,n,r,o=Ee(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"events",value:function(){return{"click .delete":"onClickDelete"}}},{key:"getEnglishName",value:function(){return be(this.model.toJSON(),this.model.collection.toJSON())}},{key:"onClickDelete",value:function(){!this.options.isClickViewContent&&q.a.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){return{styles:Ce.a,svg:V.a.getSvg(ge.a.mapTypeToSvg("subtitle")),trashSvg:V.a.getSvg(V.b.Delete),name:this.getEnglishName(),isClickViewContent:this.options.isClickViewContent}}},{key:"name",get:function(){return"SubtitleItemComponent"}},{key:"template",get:function(){return ke.a}},{key:"className",get:function(){return this.options.className||"mb-2"}}])&&Oe(t.prototype,n),r&&Oe(t,r),i}(i.a.Component),Ne=n(193),_e=n(1307),Ie=n.n(_e);function De(e){return(De="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 je(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Le(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 Ve(e,t,n){return t&&Le(e.prototype,t),n&&Le(e,n),e}function Ue(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&&Fe(e,t)}function Fe(e,t){return(Fe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ae(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=qe(e);if(t){var o=qe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Me(this,n)}}function Me(e,t){return!t||"object"!==De(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 qe(e){return(qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Be=function(e){Ue(n,e);var t=Ae(n);function n(e){return je(this,n),t.call(this,e)}return Ve(n,[{key:"regions",value:function(){return{subtitles:{el:".subtitles-list-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{headerText:this.options.headerText,emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.showChildView("subtitles",new He({collection:this.collection,channelName:this.options.channelName,isClickViewContent:this.options.isClickViewContent}))}},{key:"name",get:function(){return"VideoSubtitlesComponent"}},{key:"template",get:function(){return Ie.a}}]),n}(i.a.Component),He=function(e){Ue(n,e);var t=Ae(n);function n(e){return je(this,n),t.call(this,e)}return Ve(n,[{key:"onClickDelete",value:function(e){var t=this;this.options.isClickViewContent||new Ne.a({title:s.a.getPhrase(this.lang,"removeHeading"),text:s.a.getPhrase(this.lang,"removeBody",{language:this.getEnglishName(e)}),buttons:[{text:s.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:s.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){o.Radio.channel(t.options.channelName).trigger("delete:subtitle",e.get("id"))}))}},{key:"getEnglishName",value:function(e){return be(e.toJSON(),e.collection.toJSON())}},{key:"name",get:function(){return"VideoSubtitlesComponentCollection"}},{key:"lang",get:function(){return"libraryEditor.videoSubtitles"}},{key:"childView",get:function(){return Te}},{key:"childViewOptions",get:function(){var e=this;return{isClickViewContent:this.options.isClickViewContent,onClickDelete:function(t){return e.onClickDelete(t)}}}}]),n}(i.a.ComponentCollection),ze=n(244),Je=n(1055),We=n(1308),Ye=n.n(We);function Ze(e){return(Ze="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 $e(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 Xe(e,t){return(Xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Qe(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=Ke(e);if(t){var o=Ke(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ge(this,n)}}function Ge(e,t){return!t||"object"!==Ze(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 Ke(e){return(Ke=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var et=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&&Xe(e,t)}(a,e);var t,n,r,i=Qe(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).showNameField=!1,t.disableBtn=!0,t}return t=a,(n=[{key:"initialize",value:function(){this.model=re.a.get(this.viewModelName),this.model.addValidation(Je.d),this.bindListeners()}},{key:"regions",value:function(){return{attachBtn:".attach-btn-region"}}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change:url",this.onChangeUrl),this.listenTo(this.model,"change:name",this.onChangeName),this.listenTo(this.options.channelName,"attach:link",this.onClickAttach)}},{key:"onChangeUrl",value:function(){this.showNameField&&!this.model.isValid("url")?(this.getUI("nameField").hide(),this.model.set("name",""),this.showNameField=!1):!this.showNameField&&this.model.isValid("url")&&(this.getUI("nameField").show(),this.showNameField=!0)}},{key:"onChangeName",value:function(){this.model.validate("name"),this.disableBtn=!this.model.isValid(),this.renderAttachButton()}},{key:"onClickAttach",value:function(){var e=this.model.toJSON();this.model.clear(),o.Radio.channel(this.options.channelName).trigger("add:link",e),this.render()}},{key:"renderAttachButton",value:function(){this.options.hide||this.showChildView("attachBtn",new ze.a({saveEvent:"attach:link",channelName:this.options.channelName,buttonText:s.a.getPhrase(this.lang,"attach"),extraButtonClass:"btn-secondary attach",disabled:this.disableBtn,buttonType:"submit",spinnerOptions:{size:T.r.Medium,type:T.s.Light,extraClasses:"mx-auto"}}))}},{key:"viewOptions",value:function(){return{limit:this.options.limit,hide:this.options.hide}}},{key:"onRender",value:function(){this.renderAttachButton(),this.stickit(),o.Validation.bind(this)}},{key:"onClose",value:function(){this.unstickit(),o.Validation.unbind(this)}},{key:"name",get:function(){return"AddLinksComponent"}},{key:"template",get:function(){return Ye.a}},{key:"lang",get:function(){return"libraryEditor.addLinks"}},{key:"tagName",get:function(){return"form"}},{key:"bindings",get:function(){return{"[name=url]":{observe:"url",setOptions:{validate:!0}},"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"behaviors",get:function(){return[{behaviorClass:I.f},{behaviorClass:I.a}]}},{key:"elements",get:function(){return{nameField:"#name-container"}}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}}])&&$e(t.prototype,n),r&&$e(t,r),a}(i.a.Component),tt=n(1208),nt=n(36);function rt(e){return(rt="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 ot(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 it(e,t){return(it=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function at(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=lt(e);if(t){var o=lt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return st(this,n)}}function st(e,t){return!t||"object"!==rt(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 lt(e){return(lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ut="shared.errors.tooManyResources",ct=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&&it(e,t)}(i,e);var t,n,r,o=at(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,"Cannot add that many resources")).resourceLimit=e,t}return t=i,(n=[{key:"name",get:function(){return"TooManyResourcesError"}},{key:"dialogOptions",get:function(){return{title:s.a.getPhrase(ut,"heading"),text:s.a.getPhrase(ut,"body",{resourceLimit:this.resourceLimit}),buttons:[{text:s.a.getPhrase(ut,"okay"),className:"btn btn-primary",success:!0}]}}}])&&ot(t.prototype,n),r&&ot(t,r),i}(nt.a);function ft(e){return(ft="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 pt(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 ht(e,t){return(ht=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function dt(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=yt(e);if(t){var o=yt(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return mt(this,n)}}function mt(e,t){return!t||"object"!==ft(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 yt(e){return(yt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var gt=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&&ht(e,t)}(i,e);var t,n,r,o=dt(i);function i(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this,"Cannot add that many subtitles")).subtileLimit=e,t}return t=i,(n=[{key:"name",get:function(){return"TooManySubtitlesError"}},{key:"dialogOptions",get:function(){return{title:s.a.getPhrase("shared.errors.tooManySubtitles","heading"),text:s.a.getPhrase("shared.errors.tooManySubtitles","body",{subtitleLimit:this.subtileLimit}),buttons:[{text:s.a.getPhrase("shared.errors.tooManySubtitles","okay"),className:"btn btn-primary",success:!0}]}}}])&&pt(t.prototype,n),r&&pt(t,r),i}(nt.a),bt=n(191),vt=n(185),kt=n(283),wt=n(245),Ct=n(4),St=n(42),Ot=n(1309),Pt=n.n(Ot);function Et(e){return(Et="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 Rt(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 xt(e,t){return(xt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Tt(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=_t(e);if(t){var o=_t(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Nt(this,n)}}function Nt(e,t){return!t||"object"!==Et(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 _t(e){return(_t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"EditResourcesView",(function(){return It}));var It=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&&xt(e,t)}(m,e);var t,n,h,d=Tt(m);function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),d.call(this,e)}return t=m,(n=[{key:"initialize",value:function(){this.initializeUploadServices(),this.bindDataListeners(),this.bindViewListeners(),this.bindFileSelectListeners(),T.u.initBackButton(),this.chapterDataService=a.a.getInstance(x.g.Chapter,this),this.videoDataService=a.a.getInstance(x.g.Video,this),this.linkDataService=a.a.getInstance(x.g.Link,this),this.resourceDataService=a.a.getInstance(x.g.Resource,this),this.subtitleDataService=a.a.getInstance(x.g.Subtitle,this),this.resourceUploads=[],this.resourceUploadCount=0}},{key:"initializeUploadServices",value:function(){this.resourceUploadService=new c.b,this.listenTo(x.w.RESOURCE_UPLOAD,f.a.UPLOAD_COMPLETE,this.onResourceUploadComplete),this.subtitleUploadService=new c.c,this.listenTo(x.w.SUBTITLE_UPLOAD,f.a.UPLOAD_COMPLETE,this.onSubtitleUploadComplete)}},{key:"bindDataListeners",value:function(){this.listenTo(x.e.VIDEO,"".concat(x.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(x.e.VIDEO,"".concat(x.f.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(x.e.VIDEO,"".concat(x.f.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(x.e.CHAPTER,"".concat(x.f.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError)}},{key:"bindViewListeners",value:function(){this.listenTo(this.channelName,"add:link",this.onAddLink),this.listenTo(this.channelName,"delete:subtitle",this.onDeleteSubtitle),this.listenTo(this.channelName,"delete:resource",this.onDeleteResource),this.listenTo(this.channelName,"delete:link",this.onDeleteLink),this.listenTo(this.channelName,"cancel:upload",this.onCancelUpload),this.listenTo(this.channelName,vt.d.MergeChapters,this.onMergeChapters)}},{key:"bindFileSelectListeners",value:function(){this.listenTo(this.getSubtitleSelectChannelName(),f.a.FILES_SELECTED,this.onSubtitleFilesAdded),this.listenTo(this.getResourceSelectChannelName(),f.a.FILES_SELECTED,this.onResourceFilesAdded)}},{key:"getSubtitleSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"subtitles")}},{key:"getResourceSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"resources")}},{key:"onVideoDataError",value:function(e){switch(e.type){case u.a.NotFound:i.a.ErrorHelper.throw(new bt.l);break;case u.a.Forbidden:i.a.ErrorHelper.throw(new bt.f)}}},{key:"onConcatenateDataError",value:function(e){e.type===u.a.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"onSubtitleFilesAdded",value:function(e,t){e.length>5-this.model.subtitles.length?i.a.ErrorHelper.throw(new gt(5)):(t&&(this.interactionType=t),this.subtitleUploadService.addFiles(e))}},{key:"onResourceFilesAdded",value:function(e,t){e.length>25-this.model.resources.length?i.a.ErrorHelper.throw(new ct(25)):(this.resourceUploadCount+=e.length,t&&(this.interactionType=t),this.resourceUploadService.addFiles(e))}},{key:"onAddLink",value:function(e){var t=this;25!==this.model.links.length&&(this.model.links.length+1===25&&this.renderAddLinks(!0),this.linkDataService.addLink(this.model.get("id"),e,(function(e){t.model.links.add(e),t.render()})))}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:_.h.EditVideoTabs},subtitlesUpload:{el:".subtitles-upload-region",partialLoading:_.h.EditVideoUploadArea},subtitlesUploadList:".subtitles-upload-list-region",customerSubtitlesList:".customer-subtitles-list-region",clickViewSubtitlesList:".clickview-subtitles-list-region",resourcesUpload:{el:".resources-upload-region",partialLoading:_.h.EditVideoUploadArea},resourcesUploadList:".resources-upload-list-region",customerResourcesList:".customer-resources-list-region",clickViewResourcesList:".clickview-resources-list-region",addLinks:{el:".add-links-region",partialLoading:_.h.EditVideoUploadArea},customerLinkList:".customer-link-list-region",clickViewLinkList:".clickview-link-list-region"}}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[kt.a.SingleFile,kt.a.ConcatenationFailed];r.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==kt.a.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.videoDataService.hasPhysicalChapters(e.options.videoId,(function(t){e.hasPhysicalChapters=t,e.renderSubtitleFileSelect()}))}))}},{key:"onDeleteResource",value:function(e){var t=this;this.resourceDataService.deleteResource(this.options.videoId,e,(function(){t.logDeleteAction(Ct.e.Resource,e),t.render()}))}},{key:"onDeleteSubtitle",value:function(e){var t=this;this.subtitleDataService.deleteSubtitle(this.options.videoId,e,(function(){t.logDeleteAction(Ct.e.Subtitle,e),t.render()}))}},{key:"onDeleteLink",value:function(e){var t=this;this.linkDataService.deleteLink(this.options.videoId,e,(function(){t.logDeleteAction(Ct.e.Link,e),t.render()}))}},{key:"onCancelUpload",value:function(e){this.resourceUploadService.cancelUpload(e),this.subtitleUploadService.cancelUpload(e)}},{key:"onResourceUploadComplete",value:function(e){var t=this,n=e.toJSON(),r={fileId:n.fileInfo.id,uploadId:n.file.cvUpload.uploadId,name:n.fileInfo.name,type:p.a.getResourceType(n.fileInfo.extension),extension:n.fileInfo.extension,fileSize:n.fileInfo.size,fileUrl:n.fileInfo.url,ingestUrl:n.file.cvUpload.ingestUrl,metaData:{type:p.a.getResourceType(n.fileInfo.extension)},contribution:!1,url:n.fileInfo.url,fileIdType:2};this.resourceUploads.push(r),this.resourceUploadCount--,this.resourceUploadCount>0||(this.resourceDataService.addResource(this.options.videoId,this.resourceUploads,(function(e){t.model.resources.add(e);var n=t.resourceUploadService.getCollection().filter((function(t){return t.get("fileInfo").id===e.get("fileId")}));t.resourceUploadService.getCollection().remove(n),t.logUploadAction(e),t.render()})),this.resourceUploads=[])}},{key:"onSubtitleUploadComplete",value:function(e){var t=this,n=$.Deferred(),r=new me({defaultLanguage:{code:"en",name:"English"},promise:n});n.done((function(n){var r=e.toJSON(),o={fileId:r.fileInfo.id,name:n.name,language:n.code,type:p.a.getResourceType(r.fileInfo.extension),fileIdType:2};t.subtitleDataService.addSubtitle(t.options.videoId,o,(function(n){t.model.subtitles.add(n),t.subtitleUploadService.getCollection().remove(e),t.logUploadAction(n),t.render()}))})).fail((function(){t.subtitleUploadService.cancelUpload(e.get("id"))})),o.Radio.channel(l.a.POPUP).trigger(i.a.EventNames.SHOW_POPUP,r)}},{key:"logUploadAction",value:function(e){var t=e instanceof N.a?Ct.e.Resource:Ct.e.Subtitle,n=St.a.mapInteractionType(this.interactionType),r={location:Ct.k.EditVideoResources,actionType:Ct.q.Upload,entity:t,descriptor:n};St.a.logUserAction(e,r)}},{key:"logDeleteAction",value:function(e,t){var n={location:Ct.k.EditVideoResources,actionType:Ct.q.Delete,entity:e},r={id:t,parentId:+this.options.videoId};St.a.logUserAction(r,n)}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"renderTabs",value:function(){var e=!T.j.canEditVideo(this.model);this.showChildView("tabs",new ye.a({tabs:T.u.getEditVideoTabs(this.options.videoId,{hideChaptersTab:e}),activeTab:".edit-resources-subtitles-applink",goBackTab:T.u.getBackButton(this.options.videoId)}))}},{key:"renderSubtitleFileSelect",value:function(){if(this.hasPhysicalChapters.get("value"))this.renderConcatenationRequest();else{var e=s.a.getPhrase(this.lang,"subtitlesLimit",{limit:5});this.showChildView("subtitlesUpload",new R({title:this.isClickViewContent?s.a.getPhrase(this.lang,"customerSubtitles"):s.a.getPhrase(this.lang,"subtitles"),description:s.a.getPhrase(this.lang,"subtitlesInfo"),alternateText:s.a.getPhrase(this.lang,"subtitlesAlternative"),mimeType:p.b.SUBTITLES,channelName:this.getSubtitleSelectChannelName(),acceptMultiple:!1,limitText:this.model.subtitles.length>=5?e:null,isClickViewContent:this.isClickViewContent}))}}},{key:"renderSubtitleUploadList",value:function(){var e=this.subtitleUploadService.getCollection();this.showChildView("subtitlesUploadList",new ne({collection:e,channelName:this.channelName}))}},{key:"renderSubtitlesLists",value:function(){this.renderClickViewSubtitlesList(),this.renderCustomerSubtitlesList()}},{key:"renderClickViewSubtitlesList",value:function(){if(this.isClickViewContent){var e=T.j.filterObjectsByOwnerType(this.model.subtitles,wt.a.ClickView);this.showChildView("clickViewSubtitlesList",new Be({collection:e,channelName:this.channelName,isClickViewContent:!0,headerText:s.a.getPhrase(this.lang,"clickViewSubtitles"),emptyStateText:e.models.length?"":s.a.getPhrase(this.lang,"clickViewSubtitlesEmpty")}))}}},{key:"renderCustomerSubtitlesList",value:function(){this.showChildView("customerSubtitlesList",new Be({collection:T.j.filterObjectsByOwnerType(this.model.subtitles,wt.a.Customer,this.currentUser.get("customerId")),channelName:this.channelName}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("subtitlesUpload",new L.a({type:this.isClickViewContent?"clickViewSubtitles":"subtitles",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderResourcesFileSelect",value:function(){var e=s.a.getPhrase(this.lang,"resourcesLimit",{limit:25});this.showChildView("resourcesUpload",new R({title:this.isClickViewContent?s.a.getPhrase(this.lang,"customerResources"):s.a.getPhrase(this.lang,"resources"),description:s.a.getPhrase(this.lang,"resourcesDescription"),alternateText:s.a.getPhrase(this.lang,"resourcesAlternative"),mimeType:p.b.RESOURCES,channelName:this.getResourceSelectChannelName(),limitText:this.model.resources.length>=25?e:null,isClickViewContent:this.isClickViewContent}))}},{key:"renderResourcesUploadList",value:function(){var e=this.resourceUploadService.getCollection();this.showChildView("resourcesUploadList",new ne({collection:e,channelName:this.channelName}))}},{key:"renderResourcesLists",value:function(){this.renderClickViewResourcesList(),this.renderCustomerResourcesList()}},{key:"renderClickViewResourcesList",value:function(){if(this.isClickViewContent){var e=T.j.filterObjectsByOwnerType(this.model.resources,wt.a.ClickView);this.showChildView("clickViewResourcesList",new j.a({model:this.model,customCollection:e,editable:!1,videoId:this.options.videoId,parentChannelName:this.channelName,headerText:s.a.getPhrase(this.lang,"clickViewResources"),emptyStateText:e.models.length?"":s.a.getPhrase(this.lang,"clickViewResourcesEmpty"),analyticsOptions:{location:Ct.k.EditVideoResources}}))}}},{key:"renderCustomerResourcesList",value:function(){this.showChildView("customerResourcesList",new j.b({collection:T.j.filterObjectsByOwnerType(this.model.resources,wt.a.Customer,this.currentUser.get("customerId")),editable:!0,videoId:this.options.videoId,channelName:this.channelName,analyticsOptions:{location:Ct.k.EditVideoResources}}))}},{key:"renderAddLinks",value:function(e){this.showChildView("addLinks",new et({collection:this.model.get("links"),channelName:this.channelName,hide:e||25===this.model.get("links").length,limit:25}))}},{key:"renderLinkLists",value:function(){var e={channelName:this.channelName,analyticsOptions:{location:Ct.k.EditVideoResources},videoId:this.options.videoId};this.renderClickViewLinkList(e),this.renderCustomerLinkList(e)}},{key:"renderClickViewLinkList",value:function(e){if(this.isClickViewContent){var t=T.j.filterObjectsByOwnerType(this.model.links,wt.a.ClickView);this.showChildView("clickViewLinkList",new tt.a(Object.assign(Object.assign({},e),{headingText:"Resource Links by ClickView",emptyStateText:t.models.length?"":"There are no ClickView links for this video",customCollection:t,editable:!1})))}}},{key:"renderCustomerLinkList",value:function(e){this.showChildView("customerLinkList",new tt.a(Object.assign(Object.assign({},e),{customCollection:T.j.filterObjectsByOwnerType(this.model.links,wt.a.Customer,this.currentUser.get("customerId")),editable:!0})))}},{key:"fetchData",value:function(){var e=this;this.model=this.videoDataService.getVideo(this.options.videoId),this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.isClickViewContent=this.model&&!T.j.canEditVideo(this.model),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"viewOptions",value:function(){return{isClickViewContent:this.isClickViewContent}}},{key:"onRender",value:function(){this.renderTabs(),this.renderSubtitleFileSelect(),this.renderSubtitleUploadList(),this.renderSubtitlesLists(),this.renderResourcesFileSelect(),this.renderResourcesUploadList(),this.renderResourcesLists(),this.renderAddLinks(),this.renderLinkLists(),this.startPollingConcatenation()}},{key:"onDestroy",value:function(){this.subtitleUploadService.destroy(),this.resourceUploadService.destroy()}},{key:"name",get:function(){return"EditResourcesView"}},{key:"lang",get:function(){return"libraryEditor.editResources"}},{key:"title",get:function(){return this.model&&this.model.get("name")||"Edit Resources"}},{key:"template",get:function(){return Pt.a}},{key:"props",get:function(){return["videoDataService"]}},{key:"className",get:function(){return"bg-white p-3"}},{key:"channelName",get:function(){return T.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:I.d}]}},{key:"requiredResources",get:function(){return{currentUser:D.b.currentUser}}}])&&Rt(t.prototype,n),h&&Rt(t,h),m}(i.a.View)}}]);
@@ -1 +0,0 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[25],{1111:function(e,t,n){"use strict";var r=n(189),o=n(1),i=n(187),a=n(0),l=n(135),s=n(284);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 u(e){return function(e){if(Array.isArray(e))return f(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 f(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 f(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 f(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 h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(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 m(this,n)}}function m(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 g=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,r,i=d(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=i.call(this,{collectionPrefix:"".concat(a.f.RECENT_VIDEOS,":collection"),cursor:e.cursor,sort:e.sort})).setAdditionalData(e),t}return t=c,(n=[{key:"setAdditionalData",value:function(e){var t=e.libraryIds,n=e.dateQueryString,r=e.subjects;t&&(this.libraryIds=t),r&&(o.isArray(r)&&r.length&&(this.subjects=r),o.isArray(r)||(this.subjects=[r]));var i=o.findWhere(s.g,{queryString:n})||s.e;this.dateOption=new l.b(i)}},{key:"toString",value:function(){var e=this.subjects&&this.subjects.length&&this.subjects.map((function(e){return escape(e.get("name"))}))||[];return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].concat(u(e),[this.cursor]).filter(Boolean).join(":")}},{key:"toParams",value:function(){var e={};return this.libraryIds&&(e.libraryIds=this.libraryIds),this.dateOption&&(e.from=this.dateOption.get("from"),e.to=this.dateOption.get("to")),this.subjects&&(e.subjectIds=o.flatten(this.subjects.map((function(e){return e.get("subjectIds")})))),this.cursor&&(e.cursor=this.cursor),e}}])&&p(t.prototype,n),r&&p(t,r),c}(i.a);function b(e){return(b="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 v(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 w(e,t){return(w=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function k(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(e);if(t){var o=E(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"!==b(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(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var O=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&&w(e,t)}(c,e);var t,n,r,i=k(c);function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),(t=i.call(this,{collectionPrefix:"".concat(a.f.RECENT_SUBJECTS,":collection"),sort:e.sort})).setAdditionalData(e),t}return t=c,(n=[{key:"setAdditionalData",value:function(e){var t=e.libraryIds,n=e.dateQueryString;t&&(this.libraryIds=t);var r=o.findWhere(s.g,{queryString:n})||s.e;this.dateOption=new l.b(r)}},{key:"toString",value:function(){return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].filter(Boolean).join(":")}},{key:"toParams",value:function(){var e={};return this.libraryIds&&(e.libraryIds=this.libraryIds),this.dateOption&&(e.from=this.dateOption.get("from"),e.to=this.dateOption.get("to")),e}}])&&v(t.prototype,n),r&&v(t,r),c}(i.a);function S(e){return(S="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 x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(e,t){return(R=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _(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=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return P(this,n)}}function P(e,t){return!t||"object"!==S(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 T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var I=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&&R(e,t)}(n,e);var t=_(n);function n(e,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return x(this,n),t.call(this,{collectionPrefix:a.f.LIBRARY_FOLDERS,id:e,sort:r,cursor:o})}return n}(i.a);n.d(t,"d",(function(){return r.a})),n.d(t,"b",(function(){return g})),n.d(t,"c",(function(){return O})),n.d(t,"a",(function(){return I}))},1136:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(3),o=n(15),i=n(58);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l,s="shared.shared-utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(l||(l={}));var c={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-success";case e<80:return"bg-info";case e<96:return"bg-danger";case e<128:return"bg-pink";case e>=128:return"bg-warning";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.type){case i.a.HostedLibrary:case i.a.CustomLibrary:return e.name;case i.a.Exchange:return r.a.getPhrase(s,"exchange");case i.a.Workspace:return r.a.getPhrase(s,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case i.a.HostedLibrary:case i.a.CustomLibrary:return"bg-info";case i.a.Exchange:return"bg-success";case i.a.Workspace:default:return"bg-danger"}},isInteractive:function(e){var t,n,r;return!!(null===(r=null===(n=null===(t=e)||void 0===t?void 0:t.interactives)||void 0===n?void 0:n.data)||void 0===r?void 0:r.length)},mapTypeToSvg:function(e){var t,n=(a(t={},l.Pdf,o.b.FilePDF),a(t,l.Image,o.b.FileImg),a(t,l.PowerPoint,o.b.FilePowerpoint),a(t,l.Document,o.b.FileWord),a(t,l.Excel,o.b.FileExcel),a(t,l.Zip,o.b.FileZip),a(t,l.File,o.b.File),t)[e];return n||(n=o.b.Folder),n},mapTypeToClass:function(e){switch(e){case l.Pdf:return"icon-red";case l.Image:return"icon-purple";case l.Document:return"icon-blue";case l.Excel:return"icon-green";case l.PowerPoint:return"icon-orange";case l.Zip:return"icon-teal";case l.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case l.Pdf:return r.a.getPhrase(s,"pdf");case l.Image:return r.a.getPhrase(s,"image");case l.Document:return r.a.getPhrase(s,"document");case l.Excel:return r.a.getPhrase(s,"spreadsheet");case l.PowerPoint:return r.a.getPhrase(s,"presentation");case l.Zip:return r.a.getPhrase(s,"zipArchive");case l.File:return r.a.getPhrase(s,"file");default:return""}}}},1137:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(6),o=n(2),i=n(30),a=n(15),l=n(282),s=n(12),c=n(1061),u=n(185),f=n(1158),p=n.n(f);function h(e){return(h="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 d(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 m(e,t){return(m=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=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==h(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 b(e){return(b=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&&m(e,t)}(h,e);var t,n,o,f=y(h);function h(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),f.call(this,e)}return t=h,(n=[{key:"initialize",value:function(){this.options.playerViewModelKey&&this.listenToPlayerViewModel(),this.initViewModel(),this.options.editing&&this.syncTime()}},{key:"events",value:function(){return{submit:"onSubmit","change .chapter-name":"validateName","keyup .chapter-name":"validateName","change .time-input":"onTimeInputUpdate","click .time-input":"onTimeInputUpdate","keyup .time-input":"onTimeInputUpdate","click .cancel":"destroyView"}}},{key:"initViewModel",value:function(){this.viewModel=i.a.get(this.viewModelName,this.model.toJSON())}},{key:"listenToPlayerViewModel",value:function(){var e=i.a.get(this.options.playerViewModelKey);this.listenTo(e,"change:currenttime",this.updateTime)}},{key:"updateTime",value:function(e){this.webPlayerTime=e.get("currenttime"),this.syncTime()}},{key:"syncTime",value:function(){var e=this.viewModel.get("startTime")||this.webPlayerTime;this.viewModel.set({hours:s.w.getHoursComponent(e),minutes:s.w.getMinutesComponent(e),seconds:s.w.getSecondsComponent(e)})}},{key:"getNewTime",value:function(){return this.enabled()?s.w.parseTime(this.viewModel.pick("hours","minutes","seconds")):0}},{key:"enabled",value:function(){return this.options.creating||0!==this.model.collection.indexOf(this.model)}},{key:"maxTimes",value:function(){var e=s.w.millisecondsToSeconds(this.options.duration),t=s.w.getHoursComponent(e),n=t>0?59:s.w.getMinutesComponent(e);return{maxHr:t,maxMin:n,maxSec:n>0?59:s.w.getSecondsComponent(e)}}},{key:"onTimeInputUpdate",value:function(){r.Radio.channel(this.options.channelName).trigger(u.d.UpdateChapterTime,this.getNewTime()),this.validateStartTime()}},{key:"destroyView",value:function(){r.Radio.channel(this.options.channelName).trigger(u.d.CancelChapterEdit),this.destroy()}},{key:"onSubmit",value:function(e){if(e.preventDefault(),!this.validate())return!1;var t={id:this.viewModel.get("id"),name:this.viewModel.get("name"),startTime:this.getNewTime()},n=r.Radio.channel(this.options.channelName),o=u.d.CreateChapter;this.options.editing&&(o=u.d.UpdateChapter),n.trigger(o,t),this.stopListening(this.viewModel),i.a.clear(this.viewModelName)}},{key:"validate",value:function(){this.viewModel.validate();var e=this.validateStartTime(),t=this.validateName();return this.viewModel.isValid()&&e&&t}},{key:"validateStartTime",value:function(){var e=this,t=r.Validation.callbacks,n=t.valid,o=t.invalid,i=this.model.collection||this.options.collection,a=this.getNewTime(),l=c.a.isValidChapterTime(this.model,a,this.options.duration,i),s=[],u=["seconds","minutes","hours"];return a<0?s=u:l&&(s.push("seconds"),a>59&&s.push("minutes"),a>3540&&s.push("hours")),u.forEach((function(t){return n(e,t,null)})),s.forEach((function(t){return o(e,t,l,null)})),!l}},{key:"validateName",value:function(e){if(!e||13!==e.keyCode){var t=r.Validation.callbacks,n=t.valid,o=t.invalid,i=this.model.collection||this.options.collection,a=c.a.isValidChapterName(this.model,this.viewModel.get("name"),i);return a?o(this,"name",a,null):n(this,"name",null),!a}}},{key:"viewOptions",value:function(){var e=this.maxTimes(),t=e.maxHr,n=e.maxMin,r=0===e.maxSec,o=0===n,i=0===t;return Object.assign(Object.assign({},this.options),{enabled:this.enabled(),timeId:"".concat(this.cid,"-time"),chapterId:"".concat(this.cid,"-chapter-name"),plusSvg:a.a.getSvg(a.b.Plus),secDisabled:r,minDisabled:o,hrDisabled:i})}},{key:"name",get:function(){return"ChapterFormComponent"}},{key:"lang",get:function(){return"libraryEditor.chapterForm"}},{key:"tagName",get:function(){return"form"}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"template",get:function(){return p.a}},{key:"className",get:function(){return this.options.creating?"py-3":"border-top p-2"}},{key:"behaviors",get:function(){return[{behaviorClass:l.a,bindViewModel:!0},{behaviorClass:l.f,bindViewModel:!0}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}},"[name=hours]":{observe:"hours",setOptions:{validate:!0}},"[name=minutes]":{observe:"minutes",setOptions:{validate:!0}},"[name=seconds]":{observe:"seconds",setOptions:{validate:!0}}}}}])&&d(t.prototype,n),o&&d(t,o),h}(o.a.Component)},1145:function(e,t,n){"use strict";var r=n(2),o=n(6),i=n(1156),a=n.n(i),l=n(192),s=n(4),c=n(42),u=n(15),f=n(1136),p=n(1157),h=n.n(p);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 m(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 y(e,t){return(y=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,r=v(e);if(t){var o=v(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 v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=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&&y(e,t)}(i,e);var t,n,r,o=g(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"onClickEdit",value:function(){var e=c.a.mergeOptions(this.options.analyticsOptions,{actionType:s.q.Edit,entity:s.e.Resource,workflowPhase:s.r.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};c.a.logUserAction(t,e)}},{key:"onClickDelete",value:function(){l.a.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){var e=this.model.get("metadata"),t=e?e.type:"";return{editable:this.options.editable,extension:f.a.mapTypeToExtension(t),svg:u.a.getSvg(f.a.mapTypeToSvg(t)),iconClass:f.a.mapTypeToClass(t),resourceType:f.a.mapTypeToName(t),editSvg:u.a.getSvg(u.b.Edit),trashSvg:u.a.getSvg(u.b.Delete)}}},{key:"name",get:function(){return"ResourceItemComponent"}},{key:"template",get:function(){return h.a}},{key:"className",get:function(){return this.options.className||"mb-2"}},{key:"appLinks",get:function(){return{".edit":this.options.getEditAppLink(this.model.get("id"))}}}])&&m(t.prototype,n),r&&m(t,r),i}(r.a.Component),k=n(3),C=n(137),E=n(143),O=n(193);function S(e){return(S="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 x(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function R(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 _(e,t,n){return t&&R(e.prototype,t),n&&R(e,n),e}function P(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&&T(e,t)}function T(e,t){return(T=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function I(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=j(e);if(t){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return D(this,n)}}function D(e,t){return!t||"object"!==S(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 j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"b",(function(){return V})),n.d(t,"a",(function(){return L}));var V=function(e){P(n,e);var t=I(n);function n(e){return x(this,n),t.call(this,e)}return _(n,[{key:"onClickDelete",value:function(e){var t=this;new O.a({title:k.a.getPhrase(this.lang,"removeHeading"),text:k.a.getPhrase(this.lang,"removeBody",{resourceName:e.get("name")}),buttons:[{text:k.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:k.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){o.Radio.channel(t.options.channelName).trigger("delete:resource",e.get("id"))}))}},{key:"name",get:function(){return"VideoResourcesComponentCollection"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"childView",get:function(){return w}},{key:"childViewOptions",get:function(){var e=this;return{editable:this.options.editable,videoId:this.options.videoId,analyticsOptions:this.options.analyticsOptions,onClickDelete:function(t){return e.onClickDelete(t)},getEditAppLink:function(t){return{application:C.a.LIBRARY_EDITOR,action:E.a.LibraryEditor.EDIT_RESOURCE,args:[e.options.videoId,t]}}}}}]),n}(r.a.ComponentCollection),L=function(e){P(n,e);var t=I(n);function n(e){return x(this,n),t.call(this,e)}return _(n,[{key:"regions",value:function(){return{resources:{replaceElement:!0,el:".resource-list-region"}}}},{key:"renderResources",value:function(){var e=new V({collection:this.options.customCollection||this.model.resources,editable:this.options.editable||!1,videoId:this.options.videoId||this.model.get("id"),channelName:this.options.parentChannelName||this.channelName});this.showChildView("resources",e)}},{key:"viewOptions",value:function(){return{resourcesHeadingText:this.options.headerText||k.a.getPhrase(this.lang,"heading"),emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.renderResources()}},{key:"name",get:function(){return"VideoResourcesComponent"}},{key:"template",get:function(){return a.a}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}}]),n}(r.a.Component)},1154:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})},1155: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 e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):i)+"\r\n"},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<a class="info-link">'+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):i)+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.isActive:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1156: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"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.resourcesHeadingText:i,t))+"</h5>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n<div class="resource-list-region"></div>'},useData:!0})},1157: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,a=e.lambda;return'<a class="float-right svg-container cursor-pointer text-muted delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\r\n<a class="float-right svg-container cursor-pointer text-muted edit">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,l=e.lambda,s=e.escapeExpression,c=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<span title="'+s(l(null!=(i=null!=t?t.options:t)?i.resourceType:i,t))+'" class="d-inline-block align-middle mr-2 svg-container '+s(l(null!=(i=null!=t?t.options:t)?i.iconClass:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\r\n<a href="'+s("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:u)?a.call(c,{name:"url",hash:{},data:o}):a)+"?name="+s("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:u)?a.call(c,{name:"name",hash:{},data:o}):a)+'" class="align-middle">\r\n '+s("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:u)?a.call(c,{name:"name",hash:{},data:o}):a)+"\r\n</a>\r\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1158: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,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-6 form-group">\r\n <label class="d-block" for="'+l(a(null!=(i=null!=t?t.options:t)?i.timeId:i,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"startTimeLabel",{name:"lang",hash:{},data:o}))+'</label>\r\n <input\r\n class="form-control d-inline-block col-3 time-input hour-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"hoursPlaceholder",{name:"lang",hash:{},data:o}))+'"\r\n name="hours"\r\n autocomplete="off"\r\n '+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.hrDisabled:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:"")+'> <b>:</b>\r\n <input\r\n class="form-control d-inline-block col-3 time-input minute-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"minutesPlaceholder",{name:"lang",hash:{},data:o}))+'"\r\n name="minutes"\r\n autocomplete="off"\r\n '+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.minDisabled:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:"")+'> <b>:</b>\r\n <input\r\n class="form-control d-inline-block col-3 time-input second-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"secondsPlaceholder",{name:"lang",hash:{},data:o}))+'"\r\n name="seconds"\r\n id="'+l(a(null!=(i=null!=t?t.options:t)?i.timeId:i,t))+'"\r\n autocomplete="off"\r\n '+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.secDisabled:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:"")+'>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},2:function(e,t,n,r,o){return"disabled"},4:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return' <button type="submit" class="btn btn-primary btn-sm ml-2">\r\n <span class="d-inline-block align-middle svg-container">'+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.plusSvg:i,t))?i:"")+'</span>\r\n <span class="align-middle">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"add",{name:"lang",hash:{},data:o}))+"</span>\r\n </button>\r\n"},6:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return' <button type="submit" class="btn btn-primary btn-sm ml-2">'+l((n.lang||t&&t.lang||a).call(i,"save",{name:"lang",hash:{},data:o}))+'</button>\r\n <button type="button" class="btn btn-secondary btn-sm cancel ml-2">'+l((n.lang||t&&t.lang||a).call(i,"cancel",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<div class="row">\r\n <div class="col-6 form-group">\r\n <label for="'+l(a(null!=(i=null!=t?t.options:t)?i.chapterId:i,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"nameLabel",{name:"lang",hash:{},data:o}))+'</label>\r\n <input type="text" class="form-control chapter-name" name="name" id="'+l(a(null!=(i=null!=t?t.options:t)?i.chapterId:i,t))+'" placeholder="'+l((n.lang||t&&t.lang||c).call(s,"namePlaceholder",{name:"lang",hash:{},data:o}))+'" autofocus autocomplete="off">\r\n <div class="form-feedback"></div>\r\n </div>\r\n'+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.enabled:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n\r\n<div class="row">\r\n'+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.creating:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.editing:i,{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o}))?i:"")+"</div>"},useData:!0})},1159: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 e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.loading:i,t))},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-2 text-right">\r\n <a class="action edit-chapter my-2 svg-container '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+' d-inline-block text-muted"\r\n title="'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"edit",{name:"lang",hash:{},data:o}))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\r\n"+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.allowDelete:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+" </div>\r\n"},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <a class="action delete-chapter my-2 svg-container '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+' d-inline-block text-muted"\r\n title="'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"delete",{name:"lang",hash:{},data:o}))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.deleteSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,l=null!=t?t:e.nullContext||{},s=e.lambda,c=e.escapeExpression;return'<div class="row mx-0 border-top chapter-item '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.loading:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">\r\n <div class="clickable-seek col-1">\r\n <p class="m-0 py-2">'+c(s(null!=(i=null!=t?t.options:t)?i.index:i,t))+'</p>\r\n </div>\r\n <div class="clickable-seek col-6">\r\n <p class="m-0 py-2">'+c("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(l,{name:"name",hash:{},data:o}):a)+'</p>\r\n </div>\r\n <div class="clickable-seek col-3 text-right">\r\n <p class="m-0 py-2">'+c(s(null!=(i=null!=t?t.options:t)?i.time:i,t))+"</p>\r\n </div>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.showActions:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="edit-form-region"></div>\r\n'},useData:!0})},1160:function(e,t,n){e.exports={darkBackground:"_2jtQl",loading:"_152ia",svgContainer:"xdD5o",chapterItem:"_3G38c"}},1161:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return"<h5>"+l((n.lang||t&&t.lang||a).call(i,"chapters",{name:"lang",hash:{},data:o}))+'</h5>\r\n<div class="row mt-3 m-0 border-bottom">\r\n <div class="col-1">\r\n <label>#</label>\r\n </div>\r\n <div class="col-6">\r\n <label>'+l((n.lang||t&&t.lang||a).call(i,"nameLabel",{name:"lang",hash:{},data:o}))+'</label>\r\n </div>\r\n <div class="col-3 text-right">\r\n <label>'+l((n.lang||t&&t.lang||a).call(i,"startLabel",{name:"lang",hash:{},data:o}))+'</>\r\n </div>\r\n</div>\r\n<div class="chapter-list-region"></div>'},useData:!0})},1162: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,a=e.lambda,l=e.escapeExpression;return'<a class="float-right '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+" "+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.actionSvg:i,t))+' text-muted delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\r\n<a class="float-right '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+" "+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.actionSvg:i,t))+' text-muted edit">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,l=e.lambda,s=e.escapeExpression,c=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<span class="d-inline-block align-middle mr-2 icon-blue '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.linkSvg:i,t))?i:"")+'</span>\r\n<a href="'+s("function"==typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:u)?a.call(c,{name:"url",hash:{},data:o}):a)+'" target="_blank" class="align-middle info-link">\r\n '+s("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:u)?a.call(c,{name:"name",hash:{},data:o}):a)+"\r\n</a>\r\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1163:function(e,t,n){e.exports={svgContainer:"_3T40U",actionSvg:"_3FRzz"}},1164: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"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.headingText:i,t))+"</h5>\r\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\r\n<div class="links-region"></div>'},useData:!0})},1165:function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));var r=n(1),o=n(29),i=n(2),a=n(81),l=n(15),s=n(133),c=n(0),u=n(9),f=n(1081),p=n(1058),h=n(1055),d=n(1166),m=n.n(d),y=n(1167),g=n.n(y),b=n(3);function v(e){return(v="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,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 k(e,t){return(k=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,r=O(e);if(t){var o=O(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}function E(e,t){return!t||"object"!==v(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 O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var S=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&&k(e,t)}(y,e);var t,n,i,d=C(y);function y(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,y),d.call(this,e)}return t=y,(n=[{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0,partialLoading:u.h.VideoBasicInfo},series:{el:".series-region",replaceElement:!0}}}},{key:"getBroadcastDate",value:function(){return this.model.get("dateBroadcast")?o(this.model.get("dateBroadcast")).format(u.l.FULL_YEAR):""}},{key:"getSeriesUrl",value:function(){if(this.options.externalSeriesLink&&this.model.series)return a.a.safeUrlConcat(this.options.config.get("onlineUrl"),"series/".concat(this.model.series.id))}},{key:"renderSeries",value:function(){this.model.series&&this.model.series.get("name")&&this.showChildView("series",new p.a({model:this.model,highlight:!1,seriesUrl:this.getSeriesUrl(),styleUppercase:!1}))}},{key:"renderDescription",value:function(){if(this.model&&this.model.get("description")){var e=new f.a({model:this.model,linkify:!0,size:f.b.Large,truncate:this.options.truncateDescription,allowExpand:!0});this.showChildView("description",e)}}},{key:"getSubtitleLanguage",value:function(){var e=this;return this.model.subtitles&&this.model.get("subtitles").length?r.uniq(this.model.get("subtitles").map((function(t){var n,r=t.get("language"),o=CVLanguages.getFullEnglishName(r);return(null===(n=t.get("metadata"))||void 0===n?void 0:n.autoGenerated)?b.a.getPhrase(e.lang,"autoGenerated",{name:o}):o}))).join(", "):""}},{key:"getCitationHeading",value:function(e,t,n){return this.model.get(e)?this.model.get(e).length>1?n:t:""}},{key:"getCitationHeadings",value:function(){return{productionCompaniesText:this.getCitationHeading(u.a.ProductionCompany,"Production Company","Production Companies"),producersText:this.getCitationHeading(u.a.Producer,"Producer","Producers"),disributorsText:this.getCitationHeading(u.a.Distributor,"Distributor","Distributors"),directorsText:this.getCitationHeading(u.a.Director,"Director","Directors")}}},{key:"viewOptions",value:function(){return Object.assign({styles:m.a,ratingClass:this.model.rating&&h.i.mapRatingToClass(this.model.rating.get("value")),broadcastDate:this.getBroadcastDate(),showHeading:this.options.showHeading,subtitles:this.getSubtitleLanguage(),publisherArchiveSvg:l.a.getSvg(l.b.PublisherArchive),showPublisherVideoDetails:this.options.showPublisherVideoDetails},this.getCitationHeadings())}},{key:"onRender",value:function(){this.renderSeries(),this.renderDescription()}},{key:"name",get:function(){return"VideoBasicInfoComponent"}},{key:"template",get:function(){return g.a}},{key:"lang",get:function(){return"shared.videoBasicInfo"}},{key:"defaults",get:function(){return{truncateDescription:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:s.a,selector:".tool-tip"}]}},{key:"appLinks",get:function(){return{".applink-publisher-video":{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.SHOW_PUBLISHER_VIDEO,args:[this.model.get("id")]}}}}])&&w(t.prototype,n),i&&w(t,i),y}(i.a.Component)},1166:function(e,t,n){e.exports={columnNames:"_1N_VT",seriesContainer:"_4pk2s",icon:"_3SoBV",citationValues:"_1nYZg"}},1167: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,a=null!=t?t:e.nullContext||{};return'<div class="position-relative">\r\n <h5 class="d-inline-block">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"basicInfo",{name:"lang",hash:{},data:o}))+"</h5>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.showPublisherVideoDetails:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:"")+"</div>\r\n"},2:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <a class="float-right cursor-pointer applink-publisher-video">\r\n <span class="d-inline-block align-middle '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.icon:i,t))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.publisherArchiveSvg:i,t))?i:"")+"</span> "+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"viewInPublisherArchive",{name:"lang",hash:{},data:o}))+"\r\n </a>\r\n"},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-3 '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"videoTitle",{name:"lang",hash:{},data:o}))+'</div>\r\n <p class="col-9">'+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:c)?a.call(s,{name:"name",hash:{},data:o}):a)+"</p>\r\n"},6:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"series",{name:"lang",hash:{},data:o}))+'</div>\r\n <div class="col-9 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.seriesContainer:i,t))+'"><div class="series-region"></div></div>\r\n'},8:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"rating",{name:"lang",hash:{},data:o}))+'</div>\r\n <p class="col-9"><span class="p-1 badge text-white tool-tip '+l(a(null!=(i=null!=t?t.options:t)?i.ratingClass:i,t))+" "+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.rating:i,t))+'" title="'+l(a(null!=(i=null!=t?t.rating:t)?i.name:i,t))+'">'+l(a(null!=(i=null!=t?t.rating:t)?i.code:i,t))+"</span></p>\r\n"},10:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.escapeExpression;return' <div class="col-3 '+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"description",{name:"lang",hash:{},data:o}))+'</div>\r\n <div class="col-9">\r\n <div class="description-region"></div>\r\n </div>\r\n'},12:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-3 '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"productionYear",{name:"lang",hash:{},data:o}))+'</div>\r\n <p class="col-9">'+l("function"==typeof(a=null!=(a=n.productionYear||(null!=t?t.productionYear:t))?a:c)?a.call(s,{name:"productionYear",hash:{},data:o}):a)+"</p>\r\n"},14:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"producers",{name:"lang",hash:{},data:o}))+'</div>\r\n <div class="col-9 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(s,null!=t?t.producers:t,{name:"each",hash:{},fn:e.program(15,o,0),inverse:e.noop,data:o}))?i:"")+" </p>\r\n </div>\r\n"},15:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return" <span>"+e.escapeExpression("function"==typeof(i=null!=(i=n.name||(null!=t?t.name:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):i)+"</span>\r\n"},17:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"directors",{name:"lang",hash:{},data:o}))+'</div>\r\n <div class="col-9 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(s,null!=t?t.directors:t,{name:"each",hash:{},fn:e.program(15,o,0),inverse:e.noop,data:o}))?i:"")+" </p>\r\n </div>\r\n"},19:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"productionCompanies",{name:"lang",hash:{},data:o}))+'</div>\r\n <div class="col-9 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(s,null!=t?t.productionCompanies:t,{name:"each",hash:{},fn:e.program(15,o,0),inverse:e.noop,data:o}))?i:"")+" </p>\r\n </div>\r\n"},21:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"distributors",{name:"lang",hash:{},data:o}))+'</div>\r\n <div class="col-9 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.citationValues:i,t))+'">\r\n <p>\r\n'+(null!=(i=n.each.call(s,null!=t?t.distributors:t,{name:"each",hash:{},fn:e.program(15,o,0),inverse:e.noop,data:o}))?i:"")+" </p>\r\n </div>\r\n"},23:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.channel:t,{name:"if",hash:{},fn:e.program(24,o,0),inverse:e.noop,data:o}))?i:""},24:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return'\r\n <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"channel",{name:"lang",hash:{},data:o}))+'</div>\r\n <p class="col-9">'+l(a(null!=(i=null!=t?t.channel:t)?i.name:i,t))+"</p>\r\n "},26:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"broadcastDate",{name:"lang",hash:{},data:o}))+'</div>\r\n <p class="col-9">'+l(a(null!=(i=null!=t?t.options:t)?i.broadcastDate:i,t))+"</p>\r\n"},28:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return' <div class="col-3 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"subtitles",{name:"lang",hash:{},data:o}))+'</div>\r\n <p class="col-9">'+l(a(null!=(i=null!=t?t.options:t)?i.subtitles:i,t))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.showHeading:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<div class="row mb-0">\r\n'+(null!=(i=n.if.call(a,null!=t?t.name:t,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.series:t)?i.name:i,{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.rating:t)?i.code:i,{name:"if",hash:{},fn:e.program(8,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=t?t.description:t,{name:"if",hash:{},fn:e.program(10,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=t?t.productionYear:t,{name:"if",hash:{},fn:e.program(12,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.producers:t)?i.length:i,{name:"if",hash:{},fn:e.program(14,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.directors:t)?i.length:i,{name:"if",hash:{},fn:e.program(17,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.productionCompanies:t)?i.length:i,{name:"if",hash:{},fn:e.program(19,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.distributors:t)?i.length:i,{name:"if",hash:{},fn:e.program(21,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n "+(null!=(i=n.if.call(a,null!=(i=null!=t?t.channel:t)?i.name:i,{name:"if",hash:{},fn:e.program(23,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.broadcastDate:i,{name:"if",hash:{},fn:e.program(26,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.subtitles:i,{name:"if",hash:{},fn:e.program(28,o,0),inverse:e.noop,data:o}))?i:"")+"</div>"},useData:!0})},1205:function(e,t,n){"use strict";var r=n(2),o=n(6),i=n(15),a=n(133),l=n(12),s=n(1137),c=n(185),u=n(1159),f=n.n(u),p=n(1160),h=n.n(p);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 m(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 y(e,t){return(y=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,r=v(e);if(t){var o=v(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 v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=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&&y(e,t)}(p,e);var t,n,r,u=g(p);function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),u.call(this,e)}return t=p,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"regions",value:function(){return{editForm:{replaceElement:!1,el:".edit-form-region"}}}},{key:"events",value:function(){return{"click @ui.editChapter":"onEditChapter","click @ui.deleteChapter":"onDeleteChapter","click .clickable-seek":"onClick"}}},{key:"bindListeners",value:function(){this.listenTo(this.instanceChannelName,c.d.CancelChapterEdit,this.onCancelEdit),this.listenTo(this.instanceChannelName,c.d.UpdateChapter,this.onUpdateChapter),this.listenTo(this.instanceChannelName,c.d.UpdateChapterTime,this.onUpdateChapterTime),this.listenTo(this.model,"change:showEditor",this.onShowEditorChange),this.listenTo(this.model,"change:loading",this.onLoadingChange);var e=this.model.collection.first();this.model!==e?this.listenTo(this.model.collection,"sort",this.render):this.listenTo(this.model.collection,"add remove sort",this.render)}},{key:"onClick",value:function(){var e=o.Radio.channel(this.options.channelName);this.model.get("isPhysicalChapter")?e.trigger(c.d.SeekToChapter,this.model.get("index")):e.trigger(c.d.UpdateChapterTime,this.model.get("startTime"))}},{key:"onLoadingChange",value:function(){var e=this.model.get("loading")?"disable":"enable";this.getUI("editChapter").tooltip(e),this.getUI("deleteChapter").tooltip(e),this.model.set("showEditor",!1,{silent:!0}),this.render()}},{key:"onShowEditorChange",value:function(){this.model.get("loading")||(this.model.get("showEditor")?this.showEditView():this.hideEditView())}},{key:"showEditView",value:function(){this.renderEditForm(),this.getUI("chapterItem").addClass(h.a.darkBackground)}},{key:"hideEditView",value:function(){this.model.set("showEditor",!1,{silent:!0}),this.getUI("chapterItem").removeClass(h.a.darkBackground),this.detachChildView("editForm")}},{key:"onCancelEdit",value:function(){this.hideEditView()}},{key:"onDeleteChapter",value:function(){this.model.get("loading")||o.Radio.channel(this.options.channelName).trigger(c.d.DeleteChapter,this.model)}},{key:"onUpdateChapter",value:function(e){o.Radio.channel(this.options.channelName).trigger(c.d.UpdateChapter,e),this.render()}},{key:"onUpdateChapterTime",value:function(e){o.Radio.channel(this.options.channelName).trigger(c.d.UpdateChapterTime,e)}},{key:"onEditChapter",value:function(){o.Radio.channel(this.options.channelName).trigger(c.d.ToggleEdit,this.model)}},{key:"canDelete",value:function(e){var t=this.model.collection.length;return 1===e&&1===t||!(1===e&&t>1)}},{key:"viewOptions",value:function(){var e=this.model.collection.indexOf(this.model)+1,t=l.w.trimToMinutes(l.w.secondsToHoursFormatted(this.model.get("startTime")));return Object.assign(Object.assign({},this.options),{styles:h.a,time:t,index:e,loading:this.model.get("loading"),allowDelete:this.canDelete(e),editSvg:i.a.getSvg(i.b.Edit),deleteSvg:i.a.getSvg(i.b.Delete)})}},{key:"renderEditForm",value:function(){this.showChildView("editForm",new s.a({model:this.model,editing:!0,channelName:this.instanceChannelName,duration:this.options.duration}))}},{key:"onBeforeDetach",value:function(){$(".tooltip").remove()}},{key:"name",get:function(){return"ChapterItemComponent"}},{key:"lang",get:function(){return"libraryEditor.chapterItem"}},{key:"instanceChannelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return f.a}},{key:"className",get:function(){return"chapter ".concat(h.a.chapterItem)}},{key:"behaviors",get:function(){return[{behaviorClass:a.a,selector:".action"}]}},{key:"elements",get:function(){return{chapterItem:".chapter-item",editChapter:".edit-chapter",deleteChapter:".delete-chapter"}}}])&&m(t.prototype,n),r&&m(t,r),p}(r.a.Component);function k(e){return(k="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 C(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 E(e,t){return(E=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=x(e);if(t){var o=x(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"!==k(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 x(e){return(x=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&&E(e,t)}(i,e);var t,n,r,o=O(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"initialize",value:function(){this.bindEditorListeners()}},{key:"bindEditorListeners",value:function(){this.options.editable&&this.listenTo(this.options.channelName,c.d.ToggleEdit,this.toggleEditForm)}},{key:"toggleEditForm",value:function(e){this.collection.each((function(t){return t!==e&&t.set("showEditor",!1)})),e.set("showEditor",!e.get("showEditor"))}},{key:"name",get:function(){return"ChapterComponentCollection"}},{key:"className",get:function(){return"chapters"}},{key:"childView",get:function(){return w}},{key:"childViewOptions",get:function(){return{showActions:this.options.showActions,duration:this.options.duration,channelName:this.options.channelName}}}])&&C(t.prototype,n),r&&C(t,r),i}(r.a.ComponentCollection),_=n(1161),P=n.n(_);function T(e){return(T="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 I(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 j(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=L(e);if(t){var o=L(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return V(this,n)}}function V(e,t){return!t||"object"!==T(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 L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return N}));var N=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)}(i,e);var t,n,r,o=j(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"regions",value:function(){return{chapterList:{replaceElement:!0,el:".chapter-list-region"}}}},{key:"viewOptions",value:function(){return{showHeader:this.options.showHeader}}},{key:"onRender",value:function(){this.showChildView("chapterList",new R({collection:this.collection,duration:this.options.duration,channelName:this.options.channelName,showActions:this.options.showActions,editable:this.options.editable}))}},{key:"name",get:function(){return"ChaptersComponent"}},{key:"template",get:function(){return P.a}},{key:"lang",get:function(){return"libraryEditor.chapters"}},{key:"className",get:function(){return"chapters ".concat(!this.options.editable&&"py-3 border-top")}}])&&I(t.prototype,n),r&&I(t,r),i}(r.a.Component)},1207:function(e,t,n){"use strict";var r=n(2),o=n(1154),i=n.n(o),a=n(1155),l=n.n(a);function s(e){return(s="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 c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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 f(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function p(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)}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(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 m(this,n)}}function m(e,t){return!t||"object"!==s(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 g=function(e){p(n,e);var t=d(n);function n(){return c(this,n),t.apply(this,arguments)}return f(n,[{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}},{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return l.a}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var e="breadcrumb-item";return this.model.get("active")&&(e+=" active"),e}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}}]),n}(r.a.Component),b=function(e){p(n,e);var t=d(n);function n(){return c(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return g}}]),n}(r.a.ComponentCollection),v=n(49),w=n(0);function k(e){return(k="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 C(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 E(e,t){return(E=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=x(e);if(t){var o=x(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"!==k(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 x(e){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return R}));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&&E(e,t)}(l,e);var t,n,o,a=O(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,(n=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"getBreadcrumbs",value:function(){this.breadcrumbCollection=new r.a.Collection;var e,t=this.options.folder;do{if(e=v.a.getParent(t.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(t,!!e),{at:0}),!e)break;t=e}while(e);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:w.b.LIBRARY_EDITOR,action:w.a.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?w.a.LibraryEditor.FOLDER:w.a.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:w.b.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new b({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return i.a}},{key:"className",get:function(){return"d-inline-block"}}])&&C(t.prototype,n),o&&C(t,o),l}(r.a.Component)},1208:function(e,t,n){"use strict";var r=n(2),o=n(6),i=n(15),a=n(4),l=n(42),s=n(12),c=n(0),u=n(1162),f=n.n(u),p=n(1163),h=n.n(p),d=n(3);function m(e){return(m="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 r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(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=w(e);if(t){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==m(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 w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=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&&g(e,t)}(p,e);var t,n,r,u=b(p);function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),u.call(this,e)}return t=p,(n=[{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"onClickEdit",value:function(){var e=l.a.mergeOptions(this.options.analyticsOptions,{actionType:a.q.Edit,entity:a.e.Resource,workflowPhase:a.r.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};l.a.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new s.d({title:d.a.getPhrase(this.lang,"removeHeading"),text:d.a.getPhrase(this.lang,"removeConfirm",{name:s.v.escapeExpression(this.model.get("name"))}),buttons:[{text:d.a.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:d.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}],channelName:s.k.generateUniqueChannelName(this)}).render().done((function(){o.Radio.channel(e.options.channelName).trigger("delete:link",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:h.a,editable:this.options.editable,linkSvg:i.a.getSvg(i.b.Link),editSvg:i.a.getSvg(i.b.Edit),trashSvg:i.a.getSvg(i.b.Delete)}}},{key:"name",get:function(){return"LinkItemComponent"}},{key:"template",get:function(){return f.a}},{key:"className",get:function(){return"mb-2"}},{key:"lang",get:function(){return"libraryEditor.editLinks"}},{key:"appLinks",get:function(){return{".edit":{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.EDIT_LINK,args:[this.options.videoId,this.model.get("id")]}}}}])&&y(t.prototype,n),r&&y(t,r),p}(r.a.Component),C=n(1164),E=n.n(C);function O(e){return(O="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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(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 R(e,t,n){return t&&x(e.prototype,t),n&&x(e,n),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)}function P(e,t){return(P=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function T(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=D(e);if(t){var o=D(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){return!t||"object"!==O(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)}n.d(t,"a",(function(){return j}));var j=function(e){_(n,e);var t=T(n);function n(e){return S(this,n),t.call(this,e)}return R(n,[{key:"regions",value:function(){return{links:{el:".links-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return this.options}},{key:"onRender",value:function(){this.showChildView("links",new V({collection:this.options.customCollection||this.model.get("links"),channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions,editable:this.options.editable,videoId:this.options.videoId,headingText:this.options.headingText,emptyStateText:this.options.emptyStateText}))}},{key:"name",get:function(){return"VideoLinksComponent"}},{key:"template",get:function(){return E.a}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}}]),n}(r.a.Component),V=function(e){_(n,e);var t=T(n);function n(e){return S(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"LinkItemComponentCollection"}},{key:"childViewOptions",get:function(){return this.options}},{key:"childView",get:function(){return k}}]),n}(r.a.ComponentCollection)},1253:function(e,t,n){e.exports={svgContainer:"_2fUyj"}},1254: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,a=e.lambda,l=e.escapeExpression;return' <span class="d-inline-block ml-2 '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'" title="'+l(a(null!=(i=null!=t?t.options:t)?i.restrictionMessage:i,t))+'">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.lockSvg:i,t))?i:"")+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,l=null!=t?t:e.nullContext||{};return'<div class="d-inline-flex align-items-center">\r\n <h4 class="d-inline-block mb-0">'+e.escapeExpression("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(l,{name:"name",hash:{},data:o}):a)+"</h4>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.hasRestriction:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="video-actions-region d-inline-block"></div>'},useData:!0})},1255: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,a=e.escapeExpression;return' <span class="badge p-1 '+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.interactive:i,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"interactive",{name:"lang",hash:{},data:o}))+"</span>\r\n"},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return' <div class="mt-3">\r\n <h5>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"folders",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.folders:i},data:o}))+'</h5>\r\n <div class="folders-region"></div>\r\n </div>\r\n'},5:function(e,t,n,r,o){e.propertyIsEnumerable;return' <div class="mt-3">\r\n <h5>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"tags",{name:"lang",hash:{},data:o}))+'</h5>\r\n <div class="tags-region"></div>\r\n </div>\r\n'},7:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.escapeExpression;return' <div class="mt-3">\r\n <h5>'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"curriculumLinks",{name:"lang",hash:{},data:o}))+"</h5>\r\n <p>"+a(e.lambda(null!=(i=null!=t?t.options:t)?i.links:i,t))+"</p>\r\n </div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{};return'<div class="border-right h-100 pl-2 pr-3">\r\n <div class="video-preview-region"></div>\r\n <div class="mt-3">\r\n'+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.interactive:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+" </div>\r\n\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.folders:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.tags:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.links:i,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?i:"")+"</div>"},useData:!0})},1256:function(e,t,n){e.exports={interactive:"cAujD"}},1257:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,l=e.escapeExpression;return'<div class="col-3 '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.columnNames:i,t))+'">'+l("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):a)+'</div>\r\n<div class="col-9">\r\n <div class="description-region"></div>\r\n</div>'},useData:!0})},1258:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<h5 class="mb-0">Extra Information</h5>\r\n<div class="text-muted mb-3">This information is only visible to admins and will not be searchable</div>\r\n<div class="fields-region"></div>'},useData:!0})},1259:function(e,t,n){e.exports={columnNames:"_1ZuuN"}},1260:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return'<div class="d-inline-block '+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.licenseContainer:i,t))+'">\r\n <div class="'+l(a(null!=(i=null!=t?t.options:t)?i.logoClass:i,t))+'">'+l(a(null!=(i=null!=t?t.options:t)?i.labelText:i,t))+'</div>\r\n <p class="'+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.license:i,t))+' bg-white p-2 border box-shadow">\r\n '+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.licenseText:i,t))?i:"")+"\r\n </p>\r\n</div>"},useData:!0})},1261:function(e,t,n){e.exports={licenseContainer:"_3xIoE",license:"_1fpgM",era:"_3S6te"}},1262:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return'<div class="row pl-3 pt-3 pr-3">\r\n <div class="breadcrumbs-region"></div>\r\n</div>\r\n'},3:function(e,t,n,r,o){return' <div class="fields-region"></div>\r\n'},5:function(e,t,n,r,o){return' <div class="video-chapters-region"></div>\r\n'},7:function(e,t,n,r,o){return' <div class="video-resources-region"></div>\r\n'},9:function(e,t,n,r,o){return' <div class="video-links-region"></div>\r\n'},11:function(e,t,n,r,o){return' <div class="screenright-disclaimer-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasFolder:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'<div class="row border-bottom">\r\n <div class="video-header-region"></div>\r\n</div>\r\n<div class="row">\r\n <div class="col-4">\r\n <div class="main-video-information-region"></div>\r\n </div>\r\n <div class="col-8">\r\n <div class="basic-video-information-region py-3 pr-2"></div>\r\n'+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasFields:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasChapters:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasResources:i,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasLinks:i,{name:"if",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.showScreenrightsDisclaimer:i,{name:"if",hash:{},fn:e.program(11,o,0),inverse:e.noop,data:o}))?i:"")+" </div>\r\n</div>"},useData:!0})},1484:function(e,t,n){"use strict";n.r(t);var r=n(2),o=n(0),i=n(1),a=n(4),l=n(15),s=n(133),c=n(12),u=n(1121),f=n(1253),p=n.n(f),h=n(1254),d=n.n(h);function m(e){return(m="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 r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e,t){return(g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(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=w(e);if(t){var o=w(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function v(e,t){return!t||"object"!==m(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 w(e){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=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&&g(e,t)}(h,e);var t,n,r,f=b(h);function h(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),f.call(this,e)}return t=h,(n=[{key:"regions",value:function(){return{actions:{el:".video-actions-region",replaceElement:!1}}}},{key:"viewOptions",value:function(){return{styles:p.a,lockSvg:l.a.getSvg(l.b.Lock),hasRestriction:!i.isUndefined(this.model.get("restrictions")),restrictionMessage:c.n.getRestrictionTooltipMessage(this.model)}}},{key:"onRender",value:function(){this.showChildView("actions",new u.a({model:this.model,showActionLabels:!0,application:o.b.LIBRARY_EDITOR,customerHasLocalCache:this.options.customerHasLocalCache,customerHasExchange:this.options.customerHasExchange,collectionIdentifier:this.options.collectionIdentifier,routeToFolderOnDelete:!0,analyticsOptions:{entity:a.e.Video,location:a.k.VideoDetailsHeader,descriptor:a.l.Single},config:this.options.config}))}},{key:"name",get:function(){return"VideoHeaderComponent"}},{key:"template",get:function(){return d.a}},{key:"className",get:function(){return"d-flex align-items-center justify-content-between p-3 w-100"}},{key:"behaviors",get:function(){return[{behaviorClass:s.a,selector:".".concat(p.a.svgContainer)}]}}])&&y(t.prototype,n),r&&y(t,r),h}(r.a.Component),C=n(1145),E=n(1098),O=n(1067),S=n(134),x=n(245),R=n(1083),_=n(1060),P=n(283),T=n(1255),I=n.n(T),D=n(1256),j=n.n(D);function V(e){return(V="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){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 N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(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=U(e);if(t){var o=U(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return A(this,n)}}function A(e,t){return!t||"object"!==V(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 U(e){return(U=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&&N(e,t)}(i,e);var t,n,r,o=M(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"initialize",value:function(){this.isClickViewContent=this.model&&!c.j.canEditVideo(this.model)}},{key:"regions",value:function(){return{preview:{el:".video-preview-region",replaceElement:!0},folders:{el:".folders-region",replaceElement:!0},tags:{el:".tags-region",replaceElement:!0}}}},{key:"renderVideoPreview",value:function(){this.showChildView("preview",new E.a({model:this.model,webPlayerUrl:this.options.webPlayerUrl,channelName:this.options.channelName,analyticsOptions:{location:a.k.VideoDetails}}))}},{key:"renderTags",value:function(){this.model.get("tags")&&this.model.get("tags").length&&this.showChildView("tags",new R.a({collection:this.model.get("tags"),orientation:P.c.Flex,behavior:P.b.Link}))}},{key:"renderFolders",value:function(){this.model.get("categories")&&this.model.get("categories").length&&this.showChildView("folders",new O.a({model:this.model,showFolder:!0,hideLabel:!0}))}},{key:"viewOptions",value:function(){return{styles:j.a,interactive:_.a.isInteractive(this.model),duration:c.e.ToDisplayDuration(this.model.get("duration")),folders:this.model.categories&&this.model.categories.length,multipleFolders:this.model.categories.length>1,tags:this.model.get("tags")&&this.model.get("tags").length,isClickViewContent:this.isClickViewContent,hasCustomerTags:this.isClickViewContent&&c.j.filterObjectsByOwnerType(this.model.tags,x.a.Customer,this.options.currentUser.get("customerId")).length}}},{key:"onRender",value:function(){this.renderVideoPreview(),this.renderTags(),this.renderFolders()}},{key:"name",get:function(){return"VideoSidebarInfoComponent"}},{key:"lang",get:function(){return"libraryEditor.videoSidebarInfo"}},{key:"className",get:function(){return"py-3 h-100"}},{key:"template",get:function(){return I.a}},{key:"requiredResources",get:function(){return{currentUser:S.b.currentUser}}}])&&L(t.prototype,n),r&&L(t,r),i}(r.a.Component),B=n(1205),H=n(1208),Y=n(1165),z=n(1207),q=n(1081),Z=n(1257),J=n.n(Z),W=n(1258),G=n.n(W),K=n(1259),Q=n.n(K);function $(e){return($="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 X(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(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 te(e,t,n){return t&&ee(e.prototype,t),n&&ee(e,n),e}function ne(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&&re(e,t)}function re(e,t){return(re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function oe(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=ae(e);if(t){var o=ae(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ie(this,n)}}function ie(e,t){return!t||"object"!==$(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 ae(e){return(ae=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var le=function(e){ne(n,e);var t=oe(n);function n(){return X(this,n),t.apply(this,arguments)}return te(n,[{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{styles:Q.a}}},{key:"renderDescription",value:function(){this.model.get("value")&&this.showChildView("description",new q.a({model:new r.a.Model({description:this.model.get("value")}),linkify:!0,size:q.b.Large,truncate:!0,allowExpand:!0}))}},{key:"onRender",value:function(){this.renderDescription()}},{key:"name",get:function(){return"FieldComponent"}},{key:"template",get:function(){return J.a}},{key:"className",get:function(){return"row mb-0"}}]),n}(r.a.Component),se=function(e){ne(n,e);var t=oe(n);function n(){return X(this,n),t.apply(this,arguments)}return te(n,[{key:"name",get:function(){return"FieldsComponentCollection"}},{key:"childView",get:function(){return le}}]),n}(r.a.ComponentCollection),ce=function(e){ne(n,e);var t=oe(n);function n(){return X(this,n),t.apply(this,arguments)}return te(n,[{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new se({collection:this.collection}))}},{key:"name",get:function(){return"FieldsComponent"}},{key:"template",get:function(){return G.a}},{key:"className",get:function(){return"py-3 border-top"}}]),n}(r.a.Component),ue=n(32),fe=n(5),pe=n(16),he=n(186),de=n(9),me=n(291),ye=n(113),ge=n(290),be=n(136),ve=n(1111),we=n(3),ke=n(1260),Ce=n.n(ke),Ee=n(1261),Oe=n.n(Ee);function Se(e){return(Se="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 xe(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 Re(e,t){return(Re=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _e(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=Te(e);if(t){var o=Te(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Pe(this,n)}}function Pe(e,t){return!t||"object"!==Se(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)}var Ie=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&&Re(e,t)}(i,e);var t,n,r,o=_e(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"getLogoClass",value:function(){switch(this.options.config.get("countryCode").toLowerCase()){case"uk":return Oe.a.era;case"au":default:return""}}},{key:"getLicenseText",value:function(){switch(this.options.config.get("countryCode").toLowerCase()){case"uk":return we.a.getPhrase(this.lang,"era");case"au":return we.a.getPhrase(this.lang,"copyrightAct");case"nz":default:return""}}},{key:"viewOptions",value:function(){var e=this.options.config.get("countryCode").toLowerCase();return{styles:Oe.a,logoClass:this.getLogoClass(),labelText:"au"===e?we.a.getPhrase(this.lang,"labelAu"):"",licenseText:this.getLicenseText()}}},{key:"name",get:function(){return"ScreenrightsDisclaimerComponent"}},{key:"template",get:function(){return Ce.a}},{key:"lang",get:function(){return"shared.screenrightsDisclaimer"}},{key:"className",get:function(){return"py-3 border-top"}}])&&xe(t.prototype,n),r&&xe(t,r),i}(r.a.Component),De=n(1262),je=n.n(De);function Ve(e){return(Ve="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 Le(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 Ne(e,t){return(Ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Me(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=Ue(e);if(t){var o=Ue(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ae(this,n)}}function Ae(e,t){return!t||"object"!==Ve(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 Ue(e){return(Ue=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"VideoDetailsView",(function(){return Fe}));var Fe=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&&Ne(e,t)}(l,e);var t,n,i,a=Me(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,(n=[{key:"initialize",value:function(){this.bindListeners(),this.videoDataService=fe.a.getInstance(pe.a.Video,this),this.videoMixinService=fe.a.getInstance(pe.b.VideoMixin,this),this.localCacheDataService=fe.a.getInstance(pe.a.LocalCache,this),this.migrationVideoDataService=fe.a.getInstance(pe.a.MigrationVideo,this)}},{key:"bindListeners",value:function(){this.listenTo(o.e.VIDEO,"".concat(ue.a.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(o.e.VIDEO,"".concat(ue.a.VIDEOS,":").concat(this.options.videoId,":error"),this.onError),this.listenTo(o.e.VIDEO,"".concat(ue.a.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(o.e.VIDEO,"cache:cleared",this.render),this.listenTo(o.e.LIBRARY,"libraries:sync",this.render),this.listenTo(o.e.RESTRICTED_VIDEO,"".concat(ue.a.UPDATE_VIDEO_RESTRICTION,":sync"),this.updateRestriction),this.listenTo(o.e.RESTRICTED_VIDEO,"".concat(ue.a.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(o.e.LOCAL_CACHE,"".concat(ue.a.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(o.e.LOCAL_CACHE,"".concat(ue.a.LOCAL_CACHE_DEVICES,":error"),this.onError)}},{key:"onError",value:function(e){switch(e.type){case ye.a.NotFound:r.a.ErrorHelper.throw(new me.a);break;case ye.a.Forbidden:r.a.ErrorHelper.throw(new ge.a)}}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1},header:{replaceElement:!0,el:".video-header-region",partialLoading:de.h.VideoHeader},main:{replaceElement:!0,el:".main-video-information-region",partialLoading:de.h.VideoSidebarInfo},basic:{replaceElement:!1,el:".basic-video-information-region",partialLoading:de.h.VideoBasicInfo},chapters:{replaceElement:!0,el:".video-chapters-region"},resources:{replaceElement:!0,el:".video-resources-region"},fields:{replaceElement:!0,el:".fields-region"},links:{replaceElement:!0,el:".video-links-region"},screenrightsDisclaimer:{replaceElement:!0,el:".screenright-disclaimer-region"}}}},{key:"updateRestriction",value:function(){this.videoMixinService.getAndMixinVideoRestriction(this.video)}},{key:"showLicense",value:function(){return!!(this.video&&"nz"!==this.config.get("countryCode").toLowerCase()&&(this.video.get("channel")&&this.video.get("channel").get("id")||this.video.get("dateBroadcast")))}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.showChildView("breadcrumbs",new z.a({folder:this.folder,libraries:this.libraries,enableLastItemAppLink:!0}))}},{key:"renderVideoHeader",value:function(){this.showChildView("header",new k({model:this.video,customerHasLocalCache:c.i.customerHasLocalCache(this.devices,this.currentUser.get("customerId")),customerHasExchange:this.exchanges.any(),collectionIdentifier:this.folder&&new ve.d(this.folder.id,c.p.GetCurrentSortType()),config:this.config}))}},{key:"renderSidebarInfo",value:function(){this.showChildView("main",new F({model:this.video,webPlayerUrl:this.config.get("webPlayerUrl"),channelName:this.channelName,currentUser:this.currentUser}))}},{key:"renderBasicInfo",value:function(){this.video&&this.showChildView("basic",new Y.a({model:this.video,showHeading:!0,showPublisherVideoDetails:!!this.publisherVideo,config:this.config}))}},{key:"renderFields",value:function(){this.video.fields&&this.video.fields.length&&this.showChildView("fields",new ce({collection:this.video.fields}))}},{key:"renderChapters",value:function(){var e=this.video.chapters;e&&e.length>0&&this.showChildView("chapters",new B.a({channelName:this.channelName,collection:this.video.chapters}))}},{key:"renderResources",value:function(){var e=this.video.resources;e&&e.length>0&&this.showChildView("resources",new C.a({model:this.video}))}},{key:"renderLinks",value:function(){var e=this.video.links;e&&e.length&&this.showChildView("links",new H.a({model:this.video,headingText:"Links"}))}},{key:"renderScreenrightsDisclaimer",value:function(){this.showLicense()&&this.showChildView("screenrightsDisclaimer",new Ie({config:this.config}))}},{key:"onBeforeRender",value:function(){var e=this;return this.video=this.videoDataService.getVideo(this.options.videoId),this.video&&(this.folder=this.video.categories.first()),this.devices=this.localCacheDataService.getDevices(this.currentUser.get("customerId")),this.migrationVideoDataService.getCustomerVideoByMasterId(this.options.videoId,(function(t){var n=!!e.publisherVideo;e.publisherVideo=t,n&&e.isRendered()&&e.renderBasicInfo()})),!!this.video}},{key:"viewOptions",value:function(){if(this.video){var e=this.video,t=e.chapters,n=e.resources,r=e.fields,o=e.links;return{hasFolder:!!this.folder,hasChapters:t&&t.length,hasResources:n&&n.length,hasFields:r&&r.length,hasLinks:o&&o.length,showScreenrightsDisclaimer:this.showLicense()}}}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderVideoHeader(),this.renderSidebarInfo(),this.renderBasicInfo(),this.renderFields(),this.renderChapters(),this.renderResources(),this.renderLinks(),this.renderScreenrightsDisclaimer()}},{key:"name",get:function(){return"VideoDetailsView"}},{key:"title",get:function(){return this.video&&this.video.get("name")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return je.a}},{key:"className",get:function(){return"container-fluid h-100 bg-white"}},{key:"requiredResources",get:function(){return{config:he.b.config,currentUser:S.b.currentUser,libraries:be.b.libraries,exchanges:be.b.exchanges}}}])&&Le(t.prototype,n),i&&Le(t,i),l}(r.a.View)}}]);