@clickview/library-editor 1.8.1-dev.0 → 1.8.1-rc.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 (147) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/{2011-library-editor-9b9cd091d0.chunk.css → 1341-library-editor-8f2e8cbfe9.chunk.css} +3 -1
  3. package/dist/css/{2284-library-editor-436a0d1ce1.chunk.css → 1601-library-editor-ecad02e1a4.chunk.css} +0 -2
  4. package/dist/css/{2417-library-editor-1232df0f0a.chunk.css → 4000-library-editor-8150c8f4ce.chunk.css} +2 -0
  5. package/dist/css/{3987-library-editor-2271e5262a.chunk.css → 58-library-editor-727313a113.chunk.css} +3 -1
  6. package/dist/css/9379-library-editor-76fe7e394b.chunk.css +2 -0
  7. package/dist/css/{library-editor-app-1cd9634b7b.css → library-editor-app-8f64d67638.css} +1 -7
  8. package/dist/en.json +1 -1
  9. package/dist/scripts/1002-eedad4d1e2.chunk.js +1 -0
  10. package/dist/scripts/101-e0ab8c2ffa.chunk.js +1 -0
  11. package/dist/scripts/1010-cca9607505.chunk.js +1 -0
  12. package/dist/scripts/{1086-b559030dcf.chunk.js → 1086-53200b17d0.chunk.js} +1 -1
  13. package/dist/scripts/1216-4563d51ee5.chunk.js +1 -0
  14. package/dist/scripts/1269-5ece71eeb9.chunk.js +1 -0
  15. package/dist/scripts/1341-edc88ba644.chunk.js +1 -0
  16. package/dist/scripts/1364-3692b00910.chunk.js +1 -0
  17. package/dist/scripts/1409-d946186bd3.chunk.js +1 -0
  18. package/dist/scripts/1601-52f8e3cec5.chunk.js +2 -0
  19. package/dist/scripts/1832-fdaaff5a29.chunk.js +1 -0
  20. package/dist/scripts/1887-4a4581b103.chunk.js +1 -0
  21. package/dist/scripts/1911-2776792a06.chunk.js +1 -0
  22. package/dist/scripts/{1934-3b82bbbc99.chunk.js → 1934-3f8be23263.chunk.js} +1 -1
  23. package/dist/scripts/{243-c9fdd938fd.chunk.js → 243-5fae01d256.chunk.js} +1 -1
  24. package/dist/scripts/{259-e1d9ce07f4.chunk.js → 259-704ed09bf8.chunk.js} +1 -1
  25. package/dist/scripts/{2692-9ebe6d1ea4.chunk.js → 2692-960ba7e67f.chunk.js} +1 -1
  26. package/dist/scripts/{2802-160b25677d.chunk.js → 2802-b27bcc7922.chunk.js} +1 -1
  27. package/dist/scripts/{2803-86fc1b1e3f.chunk.js → 2803-7570954088.chunk.js} +1 -1
  28. package/dist/scripts/{2888-80050720b2.chunk.js → 2888-eb32d5080d.chunk.js} +1 -1
  29. package/dist/scripts/{299-d19e77b508.chunk.js → 299-32a3414fbe.chunk.js} +1 -1
  30. package/dist/scripts/{3096-ca9e2f0dfd.chunk.js → 3096-80f7168798.chunk.js} +1 -1
  31. package/dist/scripts/{3639-36a34d483b.chunk.js → 3639-d119eeab5a.chunk.js} +1 -1
  32. package/dist/scripts/{3746-46e0073a46.chunk.js → 3746-5c295544de.chunk.js} +1 -1
  33. package/dist/scripts/{3763-3bef6ac728.chunk.js → 3763-7bc0f591a5.chunk.js} +1 -1
  34. package/dist/scripts/4000-61e8eea600.chunk.js +1 -0
  35. package/dist/scripts/4177-c8f227c57c.chunk.js +1 -0
  36. package/dist/scripts/4201-95bf1e627c.chunk.js +1 -0
  37. package/dist/scripts/4353-eb7e1815d1.chunk.js +1 -0
  38. package/dist/scripts/{4591-9a2868f8a0.chunk.js → 4591-3bafdf04eb.chunk.js} +1 -1
  39. package/dist/scripts/4830-78b7f854d2.chunk.js +1 -0
  40. package/dist/scripts/{4860-b3e5cb9cbd.chunk.js → 4860-b5a0c5a4f7.chunk.js} +1 -1
  41. package/dist/scripts/{4885-9e4ce006c8.chunk.js → 4885-5665393708.chunk.js} +1 -1
  42. package/dist/scripts/4973-f61032e6d9.chunk.js +2 -0
  43. package/dist/scripts/{514-59d9a9a7bd.chunk.js → 514-6bbcc11ccd.chunk.js} +1 -1
  44. package/dist/scripts/{5412-a1721cffc4.chunk.js → 5412-49e9416193.chunk.js} +1 -1
  45. package/dist/scripts/5424-95917d027e.chunk.js +1 -0
  46. package/dist/scripts/{546-81473f1035.chunk.js → 546-9118f60b37.chunk.js} +1 -1
  47. package/dist/scripts/5745-a8f263230f.chunk.js +2 -0
  48. package/dist/scripts/{5747-8a168b816b.chunk.js → 5747-4bbf211b9d.chunk.js} +1 -1
  49. package/dist/scripts/58-f573cef3f1.chunk.js +1 -0
  50. package/dist/scripts/5891-2384394abf.chunk.js +1 -0
  51. package/dist/scripts/6220-24ae226c29.chunk.js +1 -0
  52. package/dist/scripts/6732-a203523ce8.chunk.js +1 -0
  53. package/dist/scripts/{6774-185468f6f5.chunk.js → 6774-ed211c8b34.chunk.js} +1 -1
  54. package/dist/scripts/{6788-2368a122f1.chunk.js → 6788-e7b22ee5cf.chunk.js} +1 -1
  55. package/dist/scripts/{6963-a576fd9c4d.chunk.js → 6963-83e5a0386b.chunk.js} +1 -1
  56. package/dist/scripts/6995-578fe09b1a.chunk.js +1 -0
  57. package/dist/scripts/6999-d783593ecd.chunk.js +1 -0
  58. package/dist/scripts/{7002-9b2aad8369.chunk.js → 7002-a84edb1c55.chunk.js} +1 -1
  59. package/dist/scripts/7053-58277bab40.chunk.js +1 -0
  60. package/dist/scripts/708-e426a1101a.chunk.js +1 -0
  61. package/dist/scripts/{7190-d294d5b67c.chunk.js → 7190-9bf273416d.chunk.js} +1 -1
  62. package/dist/scripts/7295-9a110bc5ab.chunk.js +1 -0
  63. package/dist/scripts/{7376-21f5de2ce6.chunk.js → 7376-4d9b431384.chunk.js} +1 -1
  64. package/dist/scripts/7634-e4421c5635.chunk.js +1 -0
  65. package/dist/scripts/{8362-195c5ba6c3.chunk.js → 8362-e6279acee7.chunk.js} +1 -1
  66. package/dist/scripts/{8727-20ae545e12.chunk.js → 8727-17faa28384.chunk.js} +1 -1
  67. package/dist/scripts/{8762-b445a592a5.chunk.js → 8762-e44f72c32c.chunk.js} +1 -1
  68. package/dist/scripts/{8906-efcc846fad.chunk.js → 8906-dddb217ad3.chunk.js} +1 -1
  69. package/dist/scripts/{8929-6fac19a7a3.chunk.js → 8929-0454971ba3.chunk.js} +1 -1
  70. package/dist/scripts/{8947-4df5e81810.chunk.js → 8947-7242c90cef.chunk.js} +1 -1
  71. package/dist/scripts/9228-110536ffde.chunk.js +1 -0
  72. package/dist/scripts/{9357-2e288289f3.chunk.js → 9357-f27151e9a5.chunk.js} +1 -1
  73. package/dist/scripts/9379-621391591b.chunk.js +1 -0
  74. package/dist/scripts/9383-4fd2e86d6e.chunk.js +1 -0
  75. package/dist/scripts/{9695-4bb132be57.chunk.js → 9695-995f37e82e.chunk.js} +1 -1
  76. package/dist/scripts/9770-717c5d2e82.chunk.js +1 -0
  77. package/dist/scripts/9927-5fc9373f85.chunk.js +1 -0
  78. package/dist/scripts/9976-88ad110f6b.chunk.js +1 -0
  79. package/dist/scripts/bundle-60969796d5.min.js +2 -0
  80. package/dist/scripts/bundle-60969796d5.min.js.LICENSE.txt +1 -0
  81. package/package.json +1 -1
  82. package/dist/css/1521-library-editor-b3d6d791c2.chunk.css +0 -24
  83. package/dist/scripts/101-98e020bd6f.chunk.js +0 -1
  84. package/dist/scripts/1010-cd4e715098.chunk.js +0 -1
  85. package/dist/scripts/1132-3f29e51c9d.chunk.js +0 -1
  86. package/dist/scripts/1409-8f5c1c9d0e.chunk.js +0 -1
  87. package/dist/scripts/1521-0c23d44c5e.chunk.js +0 -1
  88. package/dist/scripts/1832-d4427bb6f5.chunk.js +0 -1
  89. package/dist/scripts/1887-d306fab87c.chunk.js +0 -1
  90. package/dist/scripts/1911-41bf677d7e.chunk.js +0 -1
  91. package/dist/scripts/2011-f178a6dabf.chunk.js +0 -1
  92. package/dist/scripts/2098-31d99bc407.chunk.js +0 -1
  93. package/dist/scripts/2119-cbaa6000b1.chunk.js +0 -1
  94. package/dist/scripts/2284-a57db3563f.chunk.js +0 -1
  95. package/dist/scripts/2417-48687b3eeb.chunk.js +0 -1
  96. package/dist/scripts/2733-e8cc6e3610.chunk.js +0 -1
  97. package/dist/scripts/3019-8c7fdaf749.chunk.js +0 -1
  98. package/dist/scripts/3987-e3a4ade0c9.chunk.js +0 -1
  99. package/dist/scripts/400-00070f1714.chunk.js +0 -1
  100. package/dist/scripts/4177-0be8ceed3c.chunk.js +0 -1
  101. package/dist/scripts/4201-25e82e2429.chunk.js +0 -1
  102. package/dist/scripts/435-fb19753c8d.chunk.js +0 -1
  103. package/dist/scripts/4353-c7a0df4214.chunk.js +0 -1
  104. package/dist/scripts/5263-38198ed595.chunk.js +0 -1
  105. package/dist/scripts/5664-d6cbc77d63.chunk.js +0 -1
  106. package/dist/scripts/5891-63973f5678.chunk.js +0 -1
  107. package/dist/scripts/6181-fa5e7bcbf9.chunk.js +0 -1
  108. package/dist/scripts/6220-984f02c732.chunk.js +0 -1
  109. package/dist/scripts/6420-1537f8f587.chunk.js +0 -1
  110. package/dist/scripts/693-0ae38e2ba5.chunk.js +0 -1
  111. package/dist/scripts/6999-1fe379ca99.chunk.js +0 -1
  112. package/dist/scripts/7053-643499a3a6.chunk.js +0 -1
  113. package/dist/scripts/708-9e2ef23c87.chunk.js +0 -1
  114. package/dist/scripts/7173-a4f745b0ed.chunk.js +0 -1
  115. package/dist/scripts/7251-a247842ccb.chunk.js +0 -2
  116. package/dist/scripts/7295-96fcbaa176.chunk.js +0 -1
  117. package/dist/scripts/8074-b610b1ba63.chunk.js +0 -1
  118. package/dist/scripts/8179-f5cc87ded7.chunk.js +0 -2
  119. package/dist/scripts/9167-9c54b36e3a.chunk.js +0 -1
  120. package/dist/scripts/9298-d8c9ed5471.chunk.js +0 -1
  121. package/dist/scripts/9383-6d0392b17f.chunk.js +0 -1
  122. package/dist/scripts/9770-9eaef2c966.chunk.js +0 -1
  123. package/dist/scripts/9927-25579dff18.chunk.js +0 -1
  124. package/dist/scripts/995-3a6de1eec1.chunk.js +0 -1
  125. package/dist/scripts/bundle-2b73fa6c21.min.js +0 -2
  126. package/dist/css/{2119-library-editor-1d6a95fb9f.chunk.css → 4830-library-editor-1d6a95fb9f.chunk.css} +0 -0
  127. package/dist/css/{8179-library-editor-df33c921f0.chunk.css → 4973-library-editor-df33c921f0.chunk.css} +0 -0
  128. package/dist/css/{435-library-editor-2ea33d243e.chunk.css → 5424-library-editor-2ea33d243e.chunk.css} +0 -0
  129. package/dist/css/{9298-library-editor-e65d819068.chunk.css → 6732-library-editor-e65d819068.chunk.css} +0 -0
  130. package/dist/css/{1132-library-editor-c1a116496b.chunk.css → 7634-library-editor-fe9fc69e35.chunk.css} +2 -2
  131. package/dist/css/{9383-library-editor-d5cab29692.chunk.css → 9383-library-editor-898835bbbe.chunk.css} +2 -2
  132. /package/dist/css/{6181-library-editor-db9baf23c2.chunk.css → 9976-library-editor-db9baf23c2.chunk.css} +0 -0
  133. /package/dist/scripts/{1203-b828105755.chunk.js → 1203-2fbc5898fa.chunk.js} +0 -0
  134. /package/dist/scripts/{8179-f5cc87ded7.chunk.js.LICENSE.txt → 1601-52f8e3cec5.chunk.js.LICENSE.txt} +0 -0
  135. /package/dist/scripts/{1934-3b82bbbc99.chunk.js.LICENSE.txt → 1934-3f8be23263.chunk.js.LICENSE.txt} +0 -0
  136. /package/dist/scripts/{2802-160b25677d.chunk.js.LICENSE.txt → 2802-b27bcc7922.chunk.js.LICENSE.txt} +0 -0
  137. /package/dist/scripts/{3400-3a56ad67d9.chunk.js → 3400-bd718e889d.chunk.js} +0 -0
  138. /package/dist/scripts/{3969-258fca82a8.chunk.js → 3969-b2512efce3.chunk.js} +0 -0
  139. /package/dist/scripts/{4245-4d98c3f676.chunk.js → 4245-a4ab06b0e3.chunk.js} +0 -0
  140. /package/dist/scripts/{bundle-2b73fa6c21.min.js.LICENSE.txt → 4973-f61032e6d9.chunk.js.LICENSE.txt} +0 -0
  141. /package/dist/scripts/{5173-e1b904c06c.chunk.js → 5173-1375c05784.chunk.js} +0 -0
  142. /package/dist/scripts/{5235-abc8ea83ed.chunk.js → 5235-ad7fce4516.chunk.js} +0 -0
  143. /package/dist/scripts/{5418-bfa546cf33.chunk.js → 5418-e74c7fda2f.chunk.js} +0 -0
  144. /package/dist/scripts/{7251-a247842ccb.chunk.js.LICENSE.txt → 5745-a8f263230f.chunk.js.LICENSE.txt} +0 -0
  145. /package/dist/scripts/{6093-a62d8ebc86.chunk.js → 6093-b7bb0fe8ff.chunk.js} +0 -0
  146. /package/dist/scripts/{8495-0a9a71f2dc.chunk.js → 8495-718f82fe43.chunk.js} +0 -0
  147. /package/dist/scripts/{polyfills-c62d0e7aec.min.js → polyfills-513148dd03.min.js} +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[435],{21771:function(e,t,n){"use strict";n.r(t),n.d(t,{MoveVideoView:function(){return T}});var r=n(39479),i=n(57857),o=n(21679),l=n(31647),a=n(43875),s=n(52076),c=n(10101),u=n(28099),f=n(90680),h=n(67670),d=n(13156),p=n(61843),y=n(20072),b=n(88172),v=n(79665),g=n(97011),m=n.n(g);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},w(e)}function O(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?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function k(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function P(e){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},P(e)}var T=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(T,e);var t,n,l,g,w=(l=T,g=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=P(l);if(g){var n=P(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return k(this,e)});function T(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,T),w.call(this,e)}return t=T,(n=[{key:"initialize",value:function(){this.listenTo(u.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(u.Vk.VIDEO,"".concat(u.M_.VIDEOS_BY_ID,":").concat(this.options.videoIds.join(","),":sync"),this.render),this.listenTo(this.channelName,"library:selected",this.onLibrarySelected),this.listenTo(this.channelName,"folder:selected",this.onFolderSelected),this.libraryDataService=o.u.getInstance(u.Or.Library,this),this.videoDataService=o.u.getInstance(u.Or.Video,this)}},{key:"name",get:function(){return"MoveVideoView"}},{key:"title",get:function(){return this.options.videoIds&&i.T.getPhrase(this.lang,"title",{smartCount:this.options.videoIds.length})}},{key:"lang",get:function(){return"libraryEditor.moveVideo"}},{key:"channelName",get:function(){return p.N0.generateUniqueChannelName(this)}},{key:"libraryTreeKey",get:function(){return"libraryselect:".concat(this.cid)}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"template",get:function(){return m()}},{key:"regions",value:function(){return{folder:".folder-region",library:".library-region"}}},{key:"events",value:function(){return{submit:"onSubmit","click .submit":"onSubmit"}}},{key:"elements",get:function(){return{folderLabel:".folder-label"}}},{key:"behaviors",get:function(){var e,t,n,r,o=this;return[{title:i.T.getPhrase(this.lang,"heading",{smartCount:null!==(t=null===(e=this.options.videoIds)||void 0===e?void 0:e.length)&&void 0!==t?t:1}),behaviorClass:c.Yw,closeOnRoute:!1,spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new h.v,buttonText:i.T.getPhrase(this.lang,"submit",{smartCount:null!==(r=null===(n=this.options.videoIds)||void 0===n?void 0:n.length)&&void 0!==r?r:1}),tooltip:function(){return o.getSubmitBtnTooltipOptions()},onClick:function(){return o.onSubmit()}}}]}},{key:"filterLibrariesWithVideo",value:function(){var e=this;if(this.libraries&&this.collection&&this.hasMultipleLibraries()){var t=this.collection.map((function(e){return e.get("libraries").map((function(e){return e.get("id")}))})),n=r.uniq(r.flatten(t)),i=[],o=[];this.libraries.forEach((function(t){var l=p.PU.getModelFromCollection(e.options.folderId,t.get("children"));!r.contains(n,+t.get("id"))||l?i.push(t):o.push(t)})),this.libraries=new f.q(i),this.hiddenLibraryNames=o.map((function(e){return e.get("name")})),1===this.libraries.length&&this.onLibrarySelected(this.libraries.first())}}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.spinnerModel.get(b.ZV.Disabled))return{title:i.T.getPhrase(this.lang,"btnTooltip")}}},{key:"onLibrarySelected",value:function(e){var t=p.PU.getSelected(this.libraryTreeKey,this.libraries);t&&p.PU.deselectAll(this.folderTreeKey,t.get("children")),p.PU.setSelected(this.libraryTreeKey,e,this.libraries),this.hasMultipleLibraries()&&this.getUI("folderLabel").show(),this.spinnerModel.set(b.ZV.Disabled,!0),this.render()}},{key:"onFolderSelected",value:function(e,t){var n=p.PU.getSelected(this.libraryTreeKey,this.libraries).get("children");p.PU.setSelected(this.folderTreeKey,e,n,t),t||this.spinnerModel.set(b.ZV.Disabled,!1)}},{key:"onSubmit",value:function(){var e=this;this.spinnerModel.set(b.ZV.ShowSpinner,!0);var t,n,r=p.PU.getSelected(this.folderTreeKey,this.libraries),i=r.get("id"),o=this.collection.map((function(e){return e.get("id")}));this.collection.each((function(r){t||(t=r.categories.find((function(t){return t.get("id")===+e.options.folderId})),n=r)}));var l=1===o.length?n.get("name"):"",a=d.J.moveVideoAlert(t.get("name"),r.get("name"),r.get("id"),o.length,l);this.videoDataService.moveVideos(o,i,this.options.folderId,(function(){e.triggerMethod("hide")}),a),this.logAction(o,i)}},{key:"hasMultipleLibraries",value:function(){return this.libraries&&this.libraries.length>1}},{key:"getFormattedHiddenLibraryNames",value:function(){var e=r.map(this.hiddenLibraryNames,(function(e){return"<strong>".concat(a.m.escapeExpression(e),"</strong>")}));if(1===e.length)return e[0];var t=i.T.getPhrase(this.lang,"and");return"".concat(e.slice(0,-1).join(", ")," ").concat(t," ").concat(e.slice(-1))}},{key:"logAction",value:function(e,t){var n={newParentId:t,oldParentId:this.options.folderId,count:e.length};1===e.length&&(n.id=r.first(e)),s.k.logUserAction(n,this.options.analyticsOptions)}},{key:"renderLibrarySelect",value:function(){if(this.libraries&&1!==this.libraries.length){var e=p.PU.getSelected(this.libraryTreeKey,this.libraries);this.showChildView("library",new v.A({collection:this.libraries,channelName:this.channelName,currentLibraryId:e?e.get("id"):null}))}}},{key:"renderFolderSelect",value:function(){var e=p.PU.getSelected(this.libraryTreeKey,this.libraries);this.showChildView("folder",new y.Y({collection:e.get("children"),channelName:this.channelName,folderTreeKey:this.folderTreeKey,disabledIds:[this.options.folderId]}))}},{key:"viewOptions",value:function(){var e,t;return{hasMultipleLibraries:this.hasMultipleLibraries(),hiddenLibraryNames:(null===(e=this.hiddenLibraryNames)||void 0===e?void 0:e.length)?this.getFormattedHiddenLibraryNames():"",hiddenLibraryNamesLength:null===(t=this.hiddenLibraryNames)||void 0===t?void 0:t.length}}},{key:"onBeforeRender",value:function(){var e=this;return this.libraries||this.libraryDataService.getLibraries((function(t){e.libraries=new f.q(t.filter((function(e){return!!e.get("children").length}))),e.hasMultipleLibraries()||e.onLibrarySelected(e.libraries.first()),e.filterLibrariesWithVideo(),e.render()})),this.collection||this.videoDataService.getVideos(this.options.videoIds,(function(t){e.collection=t,e.filterLibrariesWithVideo(),e.render()})),!!this.collection&&!!this.libraries}},{key:"onRender",value:function(){this.renderLibrarySelect(),p.PU.getSelected(this.libraryTreeKey,this.libraries)&&this.renderFolderSelect()}}])&&O(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),T}(l.Q.View)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return f}});var r=n(39479),i=n(31647),o=n(55142);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function c(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(h,e);var t,n,i,l,f=(i=h,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=u(i);if(l){var n=u(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});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:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return o.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return r.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,r=e.extraClasses,i="dropdown-menu-".concat(n);return r&&(i="".concat(i," ").concat(r)),i}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],n&&a(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(i.Q.ComponentCollection)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return h}});var r=n(31647),i=n(88172);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},o(e)}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}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function u(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var h=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(d,e);var t,n,r,o,h=(r=d,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(r);if(o){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function d(){return a(this,d),h.apply(this,arguments)}return t=d,(n=[{key:"defaults",value:function(){var e;return l(e={},i.ZV.Disabled,!0),l(e,i.ZV.Hidden,!1),e}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(r.Q.Model)},97011:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,' <div class="alert alert-info" role="alert">\r\n <p class="m-0">'+(null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"hiddenLibraryNames",{name:"lang",hash:{smartCount:null!=(o=null!=t?t.options:t)?o.hiddenLibraryNamesLength:o,libraries:null!=(o=null!=t?t.options:t)?o.hiddenLibraryNames:o},data:i}))?o:"")+"</p>\r\n </div>\r\n"},3:function(e,t,n,r,i){return e.propertyIsEnumerable,' <div class="form-group">\r\n <label class="control-label">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"library",{name:"lang",hash:{},data:i}))+'</label>\r\n <div class="library-region"></div>\r\n </div>\r\n'},5:function(e,t,n,r,i){return'style="display: none;"'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,l=null!=t?t:e.nullContext||{};return"<form>\r\n"+(null!=(o=n.if.call(l,null!=(o=null!=t?t.options:t)?o.hiddenLibraryNames:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+"\r\n"+(null!=(o=n.if.call(l,null!=(o=null!=t?t.options:t)?o.hasMultipleLibraries:o,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?o:"")+'\r\n <div class="form-group">\r\n <label class="control-label folder-label" '+(null!=(o=n.if.call(l,null!=(o=null!=t?t.options:t)?o.hasMultipleLibraries:o,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?o:"")+">"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"folder",{name:"lang",hash:{},data:i}))+'</label>\r\n <div class="folder-region"></div>\r\n </div>\r\n</form>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[4353],{18068:function(e,t,n){"use strict";n.r(t),n.d(t,{SuggestAnEditView:function(){return ee}});var o=n(39479),r=n(57857),i=n(31647),a=n(21679),s=n(99249),l=n(70065),c=n(52076),u=n(61843);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},d(e)}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function h(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(i,e);var t,n,o,r=(n=i,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(n);if(o){var r=y(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return h(this,e)});function i(){return p(this,i),r.apply(this,arguments)}return t=i,Object.defineProperty(t,"prototype",{writable:!1}),t}(i.Q.Model),m=n(13102),b=n(67670),v=n(9484),w=n(48404),S=n(28099),O=n(83665),k=n(26357),T=n(88172),M=n(10101),P=n(75459),E=n(8371),C=n(48088),j=n(33192),R=n(17422),V=n(48726),x=n(40622),_=n(7190),N=n(19098),I=n.n(N),D={metadataValue:"mvVSS"};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},B(e)}function L(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function A(e,t){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},A(e,t)}function U(e,t){if(t&&("object"===B(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}var H,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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&A(e,t)}(l,e);var t,n,o,a,s=(o=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=F(o);if(a){var n=F(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return U(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),s.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return I()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{key:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=suggestion]":{observe:"suggestion",setOptions:{validate:!0}},"[name=reason]":{observe:"reason",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{ratingValidation:".rating-form-feedback"}}},{key:"getMetadataValue",value:function(){return this.options.metadataType===x.MetadataType.BroadcastDate?this.options.metadataValue?j(this.options.metadataValue).format(R.K4.FULL_YEAR):r.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof i.Q.Collection?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):r.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||r.T.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===x.MetadataType.Other?r.T.getPhrase(this.lang,"otherSuggestionPlaceholder"):r.T.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:_.uB.translateMetadataName(this.options.metadataType).toLowerCase()})}},{key:"renderRatingSelect",value:function(){this.options.ratingValidationMessage?this.getUI("ratingValidation").text(this.options.ratingValidationMessage).attr("style","display: block;"):this.getUI("ratingValidation").hide(),this.options.metadataType===x.MetadataType.Rating&&this.showChildView("ratingSelect",new V.R({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:D,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===x.MetadataType.Rating,isOtherType:this.options.metadataType===x.MetadataType.Other,metadataType:_.uB.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),C.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),C.Validation.unbind(this)}}])&&L(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(i.Q.Component);!function(e){e[e.Email=0]="Email"}(H||(H={}));var Q=n(60519),Z=n(68249),z=Object.assign(Object.assign({},Q.c),{createSuggestEditNotification:function(e){return{_type:Z.k.SuggestEdit,groupId:e.groupId,receiverId:0,instanceRegion:e.instanceRegion,countryCode:e.countryCode,channels:[H.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),$=n(34651),q=n.n($);function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function J(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}function Y(e,t){if(t&&("object"===G(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function X(e){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X(e)}var ee=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(f,e);var t,n,i,d,p=(i=f,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=X(i);if(d){var n=X(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Y(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),p.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=a.u.getInstance(S.Or.Video,this),this.ratingsDataService=a.u.getInstance(S.Or.Ratings,this),this.notificationDataService=a.u.getInstance(S.Or.Notifications,this),this.selectedMetadata=new g,this.bindListeners()}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return q()}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"lang",get:function(){return"libraryEditor.suggestAnEdit"}},{key:"title",get:function(){return r.T.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return u.N0.generateUniqueChannelName(this)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:M.Yw,title:r.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new b.v,channelName:this.channelName,buttonText:r.T.getPhrase(this.lang,"submit"),onClick:function(){return e.onSubmit()}}}]}},{key:"requiredResources",get:function(){return{config:w.p.config,currentUser:v.K.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(S.Vk.VIDEO,"".concat(S.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(S.Vk.NOTIFICATIONS,"".concat(S.M_.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(){var e=this;if(this.validateForm()){this.spinnerModel.set(T.ZV.ShowSpinner,!0);var t=this.selectedMetadata.get("metadataType")===x.MetadataType.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),n=this.config.get("suggestEditMetadataGroupId"),o=z.createSuggestEditNotification({groupId:n,instanceRegion:this.currentUser.get("instanceRegion"),countryCode:this.currentUser.get("countryCode"),video:this.model.toJSON(),user:this.currentUser.toJSON(),property:this.selectedMetadata.get("metadataType").toLowerCase(),suggestion:t,reason:this.viewModel.get("reason"),currentValue:this.selectedMetadata.get("metadataValue")});this.notificationDataService.suggestEdit(o,(function(){e.triggerMethod("hide"),e.spinnerModel.set(T.ZV.ShowSpinner,!1),e.spinnerModel.set(T.ZV.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(T.ZV.ShowSpinner,!1)}},{key:"onMetadataSelect",value:function(e){this.selectMetadata(e),this.renderSuggestEdit()}},{key:"onSelectRating",value:function(e){this.viewModel.set("ratingSuggestion",e.get("name")),this.renderSuggestEdit()}},{key:"selectMetadata",value:function(e){this.spinnerModel.set(T.ZV.Disabled,!1),u.yV.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==x.MetadataType.Other?this.model.get(e.get("property")):null}),e.get("name")!==x.MetadataType.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){var e=Object.keys(x.MetadataTypes).map((function(e){return x.MetadataTypes[e]}));return this.currentUser.get("instanceRegion")===E.b.US&&(e=e.filter((function(e){return e.name!==x.MetadataType.Channel&&e.name!==x.MetadataType.BroadcastDate}))),new O.L(e)}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=s.r.get(this.viewModelName),this.viewModel.addValidation(_.xs)}},{key:"validateForm",value:function(){this.renderSuggestEdit(),this.viewModel.validate();var e=this.viewModel.toJSON(),t=e.reason,n=e.suggestion;return!(this.getRatingValidationMessage()||this.selectedMetadata.get("metadataType")!==x.MetadataType.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==x.MetadataType.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?_.nf.original():"":_.nf.empty()}},{key:"checkPreselection",value:function(){if(!this.selectedMetadata.get("metadataType")&&this.options.metadata&&this.dataFetched()){var e=this.getMetadataByType(this.options.metadata);this.selectMetadata(e)}}},{key:"logAction",value:function(){var e=u.M2.getSourceTypes(this.model);e=o.filter(e,(function(e){return e!==P.r.CustomLibrary}));var t={videoSourceTypes:o.sortBy(o.unique(e),(function(e){return e})).join(","),videoId:this.model.get("id"),metadataProperty:this.selectedMetadata.get("metadataType"),metadataPropertyValue:this.selectedMetadata.get("metadataValue"),suggestion:this.viewModel.get("suggestion"),reason:this.viewModel.get("reason")};c.k.logUserAction(t,{descriptor:l.SuggestionDescriptor.Edit,location:l.LocationContext.Popup,actionType:l.UserAction.Suggest,entity:l.EntityType.Video})}},{key:"dataFetched",value:function(){return!!this.model&&!!this.ratingCollection}},{key:"renderMetadataDropdown",value:function(){this.showChildView("dropdown",new k.H({collection:_.uB.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||r.T.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:c.k}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new K({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new m.i(this.ratingCollection.findWhere({name:this.viewModel.get("ratingSuggestion")})):null,metadataType:this.selectedMetadata.get("metadataType"),metadataValue:this.selectedMetadata.get("metadataValue"),ratingValidationMessage:this.getRatingValidationMessage()}))}},{key:"onBeforeRender",value:function(){this.dataFetched()||(this.model=this.videoDataService.getVideo(this.options.videoId),this.ratingCollection=this.ratingsDataService.getAllRatings()),this.metadataCollection||(this.metadataCollection=this.getMetadataCollection()),this.checkPreselection()}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:u.Kp.getSpinner({size:u.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}}])&&J(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(i.Q.View)},71641:function(e,t,n){"use strict";n.d(t,{w:function(){return d}});var o=n(39479),r=n(31647),i=n(55142);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function c(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(p,e);var t,n,r,a,d=(r=p,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=u(r);if(a){var n=u(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),d.call(this,e)}return t=p,n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,r="dropdown-menu-".concat(n);return o&&(r="".concat(r," ").concat(o)),r}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],n&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.ComponentCollection)},26357:function(e,t,n){"use strict";n.d(t,{H:function(){return g}});var o=n(39479),r=n(48088),i=n(31647),a=n(71641),s=n(61843),l=n(46635),c=n.n(l),u={dropdownMenu:"oKdKI",selectButton:"fTeoW",disabled:"gZbQ4"};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},d(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function h(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(g,e);var t,n,i,l,d=(i=g,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=y(i);if(l){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function g(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),(t=d.call(this,e)).selectSearch="",t.sameCharIndex=1,t.optionStep=1,t}return t=g,n=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c()}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){r.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),r.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){s.yV.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(s.yV.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(s.yV.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),r.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=s.yV.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=s.yV.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(s.yV.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=o.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=o.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var r=n[this.sameCharIndex];return r||(r=o.first(n),this.sameCharIndex=0),this.sameCharIndex++,r}return o.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){var t;if(e.get("divider"))return!0;if(!o.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(r))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=s.yV.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:u,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.w({collection:this.collection,channelName:this.options.channelName,childOptions:o.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(u.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}],n&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),g}(i.Q.Component)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var o=n(31647),r=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}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}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function u(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}var p=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(f,e);var t,n,o,i,p=(o=f,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(o);if(i){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function f(){return s(this,f),p.apply(this,arguments)}return t=f,(n=[{key:"defaults",value:function(){var e;return a(e={},r.ZV.Disabled,!0),a(e,r.ZV.Hidden,!1),e}}])&&l(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.Q.Model)},19098:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression,s=e.lambda;return'<p class="font-weight-bold mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(i=null!=t?t.options:t)?i.metadataType:i},data:r}))+'</p>\r\n<p class="mb-3 '+a(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.metadataValue:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.metadataValue:i,t))?i:"")+"</p>\r\n"},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,' <textarea\r\n id="suggest-edit"\r\n placeholder="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.suggestionPlaceholder:i,t))+'"\r\n class="form-control"\r\n name="suggestion"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(i=n.unless.call(a,null!=(i=null!=t?t.options:t)?i.isOtherType:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n<div class="dropdown-divider"></div>\r\n\r\n<div class="form-group">\r\n <label for="suggest-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"suggestionSubheading",{name:"lang",hash:{},data:r}))+'</label>\r\n <div class="rating-select-region"></div>\r\n <div class="rating-form-feedback invalid-feedback"></div>\r\n'+(null!=(i=n.unless.call(a,null!=(i=null!=t?t.options:t)?i.useRatingSelect:i,{name:"unless",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+'</div>\r\n\r\n<div class="form-group">\r\n <label for="reason-for-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"reasoningSubheading",{name:"lang",hash:{},data:r}))+'</label>\r\n <textarea\r\n id="reason-for-edit"\r\n placeholder="'+l((n.lang||t&&t.lang||s).call(a,"reasoningPlaceholder",{name:"lang",hash:{},data:r}))+'"\r\n class="form-control"\r\n name="reason"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})},34651:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){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,"guidelines",{name:"lang",hash:{},data:r}))+'</p>\r\n<p class="font-weight-bold mb-1">'+s((n.lang||t&&t.lang||a).call(i,"dropdownHeading",{name:"lang",hash:{},data:r}))+'</p>\r\n<div class="metadata-dropdown-region position-relative"></div>\r\n<div class="suggest-edit-region"></div>\r\n'},3:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:""},useData:!0})},46635:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,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,o,r){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<button \r\n class="dropdown-toggle form-control btn-block text-left position-relative '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectButton:i,t))+" "+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'" \r\n type="button" \r\n id="dropdownMenuButton" \r\n data-toggle="dropdown" \r\n aria-haspopup="true" \r\n aria-expanded="false"\r\n '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' \r\n name="'+s(a(null!=(i=null!=t?t.options:t)?i.inputName:i,t))+'"\r\n >\r\n '+s(a(null!=(i=null!=t?t.options:t)?i.placeholderText:i,t))+'\r\n</button>\r\n<div class="dropdown-region"></div>\r\n<div class="form-feedback"></div>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[5263],{23689:function(e,t,n){n.d(t,{i:function(){return f}});var a=n(1024),r=n(48088),i=n(21679),o=n(11306),c=n(53808),l=n(51092),s=function(e,t){var n=e.dataServiceName,a=e.eventPrefix,s=e.fetchData,u=e.setData,d=e.onError,m=e.deleteEventPrefix;if(c.q.isFunction(s)){if(c.q.isFunction(u)){var v=d&&c.q.isFunction(d),f=i.u.getInstance(n),p=r.Radio.channel(f.channelName),g="".concat(a,":request"),y="".concat(a,":sync"),b="".concat(a,":error"),h="".concat(a,":invalidate"),E=m&&"".concat(m,":sync"),C=function(){return t(!1)},N=function(){return t(!0)},S=function(){return t(!1)},w=function(){return p.off(h,S)};p.once(g,C),p.once(y,N),p.once(h,S),v&&p.once(b,d),E&&p.once(E,w);var k=s(f);return k&&(t(!0),e.setData(k)),function(){i.u.releaseInstance(n),p.off(g,C),p.off(y,N),p.off(h,S),v&&p.off(b,d),E&&p.off(E,w)}}l.ErrorHelper.throw(new o.H("A setData function must be passed to fetch"))}else l.ErrorHelper.throw(new o.H("A fetchData function must be passed to fetch"))};function u(e){return function(e){if(Array.isArray(e))return v(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(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 d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(i.push(a.value),!t||i.length!==t);o=!0);}catch(e){c=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw r}}return i}}(e,t)||m(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){if(e){if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(e,t):void 0}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function f(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=a.useState(!1),i=d(r,2),o=i[0],c=i[1];a.useEffect((function(){c(!1)}),u(t)),a.useEffect((function(){if(n)return s(e,c)}),[o,n])}},38182:function(e,t,n){n.d(t,{q:function(){return l}});var a=n(1024),r=n.n(a),i=n(68003),o=n(87013),c=n(88483);function l(e){var t,n,a=e.imageUrl||(t=e.imageCdnUrl,(n=e.initials)?o.j.createUrl(i._.safeUrlConcat(t,"/v1/profile-images?initials=".concat(n)),{size:c.h2.Small}):"");return r().createElement("div",{className:"Gvwzj",style:{backgroundImage:"url('".concat(a,"')")}}," ")}},45458:function(e,t,n){n.d(t,{C:function(){return v},g:function(){return a}});var a,r=n(1024),i=n(57857),o=n(18582),c=n(27866),l=n(63946),s=n(39396),u=n(6681),d=n(50028),m=i.T.encloseNamespace("shared.badges");function v(e){var t=e.type,n=e.data;if(!function(e,t){var n,r,i;return"boolean"==typeof t?!!t:e===a.Rating?t&&!!t.value:e===a.Resources?!!(null==t?void 0:t.length)||!!(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.length):e===a.Interactive?!!(null==t?void 0:t.length)||!!(null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.length):e===a.Captions?!!(null==t?void 0:t.length)||!!(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.length):e===a.Status?"number"==typeof t:!!t}(t,n))return r.createElement(r.Fragment,null);var i=function(e,t){var n="";return e===a.Duration&&(n="duration-badge"),e===a.Interactive&&(n="interactive-badge"),e===a.Rating&&(n="rating-badge ".concat(o.u.mapRatingToClass(t.value))),e===a.ProductionYear&&(n="production-year-badge"),e===a.Resources&&(n="resources-badge"),e===a.Captions?"p-0":e===a.Status?"badge badge-".concat(function(e){switch(e){case d.X.Published:return"success";case d.X.Archive:case d.X.Rejected:return"danger";case d.X.Draft:case d.X.Pending:case d.X.Processing:return"warning"}}(t)):"".concat("badge"," ").concat(n)}(t,n),v=function(e,t){return e===a.Interactive?m("interactive"):e===a.Duration?c.T.ToDisplayDuration(t):e===a.Rating?t.code:e===a.ProductionYear?t:e===a.Resources?m("resources"):e===a.Captions?r.createElement(s.x,{svgName:u.vn.CloseCaptionBadge}):e===a.Status?d.X[t]:void 0}(t,n),f=function(e,t){return e===a.Rating?{title:t.name,placement:"top"}:null}(t,n);return f?r.createElement("span",{className:"badge-wrapper"},r.createElement(l.u,Object.assign({},f,{spanHack:!0}),r.createElement("span",{className:"".concat(i," d-flex justify-content-center")},v))):r.createElement("span",{className:"".concat(i," badge-wrapper")},v)}!function(e){e.Duration="duration",e.Interactive="interactive",e.Rating="rating",e.ProductionYear="production-year",e.Resources="resources",e.Captions="captions",e.Status="status"}(a||(a={}))},41777:function(e,t,n){n.d(t,{u:function(){return d}});var a=n(1024),r=n.n(a);function i(e){var t;return r().createElement("img",{alt:"",role:"presentation",src:e.src,className:"".concat("NsLci"," ").concat(null!==(t=e.className)&&void 0!==t?t:"")})}var o=n(31647),c=n(53808),l=n(17439),s=n(54753);function u(e){var t=e.className||"btn btn-dark";return e.icon?r().createElement(l.h,{className:t,onClick:e.onClick,appLink:e.appLink,svgName:e.icon,href:e.href,openInNewTab:e.openInNewTab},e.text):e.appLink&&!c.q.isFunction(e.onClick)?r().createElement(s.F,{appLink:e.appLink,className:t},e.text):e.href?r().createElement("a",{className:t,href:e.href,target:e.openInNewTab?"_blank":null},e.text):r().createElement("button",{onClick:function(){c.q.isFunction(e.onClick)&&e.onClick(),e.appLink&&o.Q.AppLinkHelper.trigger(e.appLink)},className:t},e.text)}function d(e){var t;return r().createElement("div",{className:"text-center d-flex flex-column align-items-center ".concat(null!==(t=e.className)&&void 0!==t?t:"")},e.children)}d.defaultProps={className:"pt-5"},d.Image=function(e){return r().createElement(i,Object.assign({},e))},d.Cta=function(e){return r().createElement(u,Object.assign({},e))},d.Heading=function(e){return r().createElement("h2",{className:e.className||"h6"},e.children)},d.Info=function(e){return e.injectHtml?r().createElement("p",{className:e.className||"mb-3 w-50",dangerouslySetInnerHTML:{__html:e.children}}):r().createElement("p",{className:e.className||"mb-3 w-50"},e.children)}},17439:function(e,t,n){n.d(t,{h:function(){return s}});var a=n(1024),r=n(31647),i=n(53808),o=n(52076),c=n(39396),l=n(54753);function s(e){var t="".concat(e.className," ").concat("aGxoe");e.children?t+=" ".concat("_cjiV"):t+=" ".concat("T1CzO");var n=a.createElement(c.x,{svgName:e.svgName,className:"svg-container ".concat("q6vwS"),size:e.svgSize});return e.appLink||e.href?e.href?a.createElement("a",{className:t,href:e.href,onClick:function(t){t.preventDefault(),e.analyticsData&&e.analyticsOptions&&o.k.logUserAction(e.analyticsData,e.analyticsOptions),i.q.isFunction(e.onClick)&&e.onClick(t),r.Q.LocationUtils.PageLoad(e.href,e.openInNewTab)}},n,e.children):a.createElement(l.F,{appLink:e.appLink,className:t,onClick:e.onClick,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled},n,e.children):a.createElement("button",{className:t,onClick:function(t){e.analyticsData&&e.analyticsOptions&&o.k.logUserAction(e.analyticsData,e.analyticsOptions),i.q.isFunction(e.onClick)&&e.onClick(t)},disabled:e.disabled},n,e.children)}},72564:function(e,t,n){n.d(t,{Q:function(){return u},M:function(){return d}});var a=n(1024),r=n(63151),i=function(e,t){var n=e.toString();if(n.length>=t)return n;for(t-=n.length;t>0;)n="0"+n,t--;return n},o=n(54753),c=n(22218),l="b0KLR",s="ts6Yo";function u(e){var t=e.video,n=t.season;if(!t.episodeNumber||!n)return a.createElement(a.Fragment,null);var r=i(n.number,2),o=i(t.episodeNumber,2);return a.createElement("span",{className:"d-inline-block ".concat(e.appLink?"YR5Q7":"")},e.withSeriesTitle&&a.createElement(a.Fragment,null," "),!!r&&"S".concat(r," • "),"E",o)}function d(e){var t,n=e.appLink,d=e.video,m=e.className,v=void 0===m?"":m,f=null==d?void 0:d.series;if(!f||!f.id)return a.createElement(a.Fragment,null);var p=n&&Object.assign(Object.assign({},n),{args:[f.id,r.m.slugify(f.name)]}),g=Object.assign(Object.assign({},e.analyticsData),{id:null==f?void 0:f.id,name:null==f?void 0:f.name,videoId:null==d?void 0:d.id,videoName:null==d?void 0:d.name}),y=Object.assign(Object.assign({},e.analyticsOptions),{entity:c.py.Series,actionType:c.Vw.Click,descriptor:c._S.Title}),b=function(e,t,n){if(!e)return"";if(!t||!n)return e.toUpperCase();var a=i(t,2),r=i(n,2);return"".concat(e.toUpperCase()," S").concat(a," • E").concat(r)}(f.name,null===(t=d.season)||void 0===t?void 0:t.number,d.episodeNumber);return p?a.createElement("div",null,a.createElement(o.F,{appLink:p,className:"text-uppercase d-inline-block text-truncate ".concat(l," ").concat("sm"===e.size?"".concat(s," font-weight-normal"):""," ").concat(v),analyticsData:g,analyticsOptions:y,title:b},f.name,a.createElement(u,Object.assign({},e,{withSeriesTitle:!0})))):a.createElement("div",{className:"text-uppercase text-truncate ".concat(l," ").concat("sm"===e.size?"".concat(s," font-weight-normal"):""," ").concat(v),title:b},f.name,a.createElement(u,Object.assign({},e,{withSeriesTitle:!0})))}},24828:function(e,t,n){n.d(t,{o:function(){return a}});var a=["bg-pink","bg-orange"].concat(["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"])},8371:function(e,t,n){var a;n.d(t,{b:function(){return a}}),function(e){e.AU="cv-ap-southeast-1",e.NZ="cv-ap-southeast-2",e.UK="cv-eu-west-1",e.US="cv-na-west-1"}(a||(a={}))},74421:function(e,t,n){var a;n.d(t,{E:function(){return a}}),function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience",e[e.TallPoster=60]="TallPoster",e[e.Classroom=67]="Classroom",e[e.ClassroomGroup=68]="ClassroomGroup"}(a||(a={}))},59054:function(e,t,n){var a;n.d(t,{f:function(){return a}}),function(e){e.Share="share",e.MasterObject="masterobject"}(a||(a={}))},34254:function(e,t,n){var a;n.d(t,{r:function(){return a}}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(a||(a={}))},90335:function(e,t,n){var a;n.d(t,{D:function(){return a}}),function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series"}(a||(a={}))},65657:function(e,t,n){n.d(t,{i:function(){return l}});var a=n(1024),r=n(58566),i=n(86120),o=n(53808);function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function l(e,t){var n=e,l=t,s=function(e,t,n){function l(e){if(e)return o.q.isFunction(t)?t(e):e.data}function s(e){var t,n;if(e)return null===(n=null===(t=e.pagination)||void 0===t?void 0:t.cursors)||void 0===n?void 0:n.next}return(0,r.useSelector)((0,a.useMemo)((function(){return function(t){if(o.q.isFunction(e)){for(var n=e,a=o.q.isFunction(e)&&n(),r=a&&i.a.getResponse(t,a),u=r&&r.isFetching,d=r&&r.statusCode,m=r&&r.hasCompleted,v=r&&r.shouldFetch,f=l(r&&r.data),p=s(r&&r.data),g=function(e){var t;if(e)return null===(t=e)||void 0===t?void 0:t.count}(r&&r.data);p&&(u=(r=i.a.getResponse(t,n(p))).isFetching,d=r.statusCode,m=r.hasCompleted,!r.shouldFetch);){var y=l(r.data);y&&f.push.apply(f,function(e){if(Array.isArray(e))return c(e)}(E=y)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(E)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(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.")}());var b=s(r.data);p=b===p?null:b}var h={shouldInitialFetch:v,items:f,nextCursor:p,isFetching:u,statusCode:d,hasCompleted:m};return"number"==typeof g&&(h.totalItems=g),h}var E}}),[e]))}(e&&function(e){return n(e).key});return(0,a.useEffect)((function(){s&&s.shouldInitialFetch&&t&&l()}),[null==s?void 0:s.shouldInitialFetch,t]),(0,a.useEffect)((function(){s&&s.nextCursor&&!s.isFetching&&t&&l(s.nextCursor)}),[null==s?void 0:s.nextCursor,null==s?void 0:s.isFetching,t]),s}n(35656).o.Ok},32557:function(e,t,n){n.d(t,{X:function(){return m}});var a=n(1024),r=n.n(a),i=n(53808),o=function(){var e=r().useRef(!0);return r().useEffect((function(){return function(){e.current=!1}}),[]),e};function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(i.push(a.value),!t||i.length!==t);o=!0);}catch(e){c=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var s={className:"",delay:0,style:null};function u(e,t){var n;e.current&&(t.className&&(null===(n=e.current.classList)||void 0===n||n.add(t.className)),t.style&&Object.keys(t.style).forEach((function(n){e.current.style[n]=t.style[n]})))}function d(e,t){var n;e.current&&(t.className&&(null===(n=e.current.classList)||void 0===n||n.remove(t.className)),t.style&&Object.keys(t.style).forEach((function(t){e.current.style[t]=null})))}function m(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s,t=o(),n=a.useState(!1),r=c(n,2),l=r[0],m=r[1],v=a.useRef(null),f=i.q.throttle((function(){u(v,e),t.current&&m(!0)}),e.delay,{leading:!1}),p=function(){i.q.isFunction(f.cancel)&&f.cancel(),d(v,e),t.current&&m(!1)};return a.useLayoutEffect((function(){var e=v.current;if(e)return e.addEventListener("mouseenter",f),e.addEventListener("mouseleave",p),function(){e.removeEventListener("mouseenter",f),e.removeEventListener("mouseleave",p)}}),[v.current,f,p]),[v,l]}},29267:function(e,t,n){n.d(t,{Y:function(){return o}});var a=n(64038);function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(i.push(a.value),!t||i.length!==t);o=!0);}catch(e){c=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function o(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.prevent,n=e.rootMargin,i=e.triggerOnce,o=void 0===i||i,c=a.useInView({triggerOnce:o,rootMargin:n}),l=r(c,3),s=l[0],u=l[1],d=l[2];return!0!==t&&void 0!==window.IntersectionObserver||(u=!0,s=null),{ref:s,inView:u,initialized:!!d}}},18582:function(e,t,n){n.d(t,{u:function(){return s}});var a,r=n(57857),i=n(6681),o=n(75459);function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(a||(a={}));var l="shared.shared-utils",s={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e,t){switch(e.type){case o.r.HostedLibrary:case o.r.CustomLibrary:return e.name;case o.r.Exchange:return r.T.getPhrase(l,"exchange");case o.r.Workspace:return r.T.getPhrase(l,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case o.r.HostedLibrary:case o.r.CustomLibrary:return"bg-info";case o.r.Exchange:return"bg-green";case o.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t,n=(c(t={},a.Pdf,i.vn.FilePDF),c(t,a.Image,i.vn.FileImg),c(t,a.PowerPoint,i.vn.FilePowerpoint),c(t,a.Document,i.vn.FileWord),c(t,a.Excel,i.vn.FileExcel),c(t,a.Zip,i.vn.FileZip),c(t,a.File,i.vn.File),t)[e];return n||(n=i.vn.Folder),n},mapTypeToClass:function(e){switch(e){case a.Pdf:return"icon-red";case a.Image:return"icon-purple";case a.Document:return"icon-blue";case a.Excel:return"icon-green";case a.PowerPoint:return"icon-orange";case a.Zip:return"icon-teal";case a.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case a.Pdf:return r.T.getPhrase(l,"pdf");case a.Image:return r.T.getPhrase(l,"image");case a.Document:return r.T.getPhrase(l,"document");case a.Excel:return r.T.getPhrase(l,"spreadsheet");case a.PowerPoint:return r.T.getPhrase(l,"presentation");case a.Zip:return r.T.getPhrase(l,"zipArchive");case a.File:return r.T.getPhrase(l,"file");default:return""}}}},18830:function(e,t,n){n.d(t,{M:function(){return c}});var a=n(57857),r=n(74421),i=n(70065),o=a.T.encloseNamespace("shared.shared-utils"),c={isVideo:function(e){return(null==e?void 0:e.typeId)===r.E.Video},isClip:function(e){return(null==e?void 0:e.typeId)===r.E.Clip},isInteractive:function(e){return(null==e?void 0:e.typeId)===r.E.Interactive},isVideoType:function(e){return c.isVideo(e)||c.isInteractive(e)||c.isClip(e)},hasSeries:function(e){var t;return!!(null===(t=null==e?void 0:e.series)||void 0===t?void 0:t.id)},getVideoProgress:function(e){var t,n;return(null==e?void 0:e.lastProgressPoint)?null==e?void 0:e.lastProgressPoint:(null===(t=null==e?void 0:e._videoProgress)||void 0===t?void 0:t.progress)?null===(n=null==e?void 0:e._videoProgress)||void 0===n?void 0:n.progress:0},getThumbnail:function(e){var t,n,a,r;return c.isVideo(e)?e.thumbnail:c.isClip(e)?null===(t=e.video)||void 0===t?void 0:t.thumbnail:c.isInteractive(e)?e.thumbnail||(null===(n=e.video)||void 0===n?void 0:n.thumbnail)||(null===(r=null===(a=e.clip)||void 0===a?void 0:a.video)||void 0===r?void 0:r.thumbnail):void 0},getDuration:function(e){var t;return c.isVideo(e)?e.duration:c.isInteractive(e)?null===(t=e.video)||void 0===t?void 0:t.duration:c.isClip(e)?1e3*(e.endTime-e.startTime):void 0},getAnalyticsEntity:function(e){return c.isVideo(e)?i.EntityType.Video:c.isInteractive(e)?i.EntityType.Interactive:c.isClip(e)?i.EntityType.Clip:void 0},getCanBeConsumed:function(e){return e&&(c.isVideo(e)||c.isClip(e)||c.isInteractive(e))?e._canBeConsumed?e._canBeConsumed:{value:!0}:null},getPrivacyReasoning:function(e){var t=c.getCanBeConsumed(e);if(t&&!t.value)switch(t.reason){case"rating-not-allowed":return o("ratingNotAllowed");case"video-deleted":return c.isClip(e)?o("clipParentDeleted"):c.isInteractive(e)?o("interactiveParentDeleted"):o("videoDeleted");case"clickview-private":return o("clickViewPrivate");default:return o("genericCannotAccess")}return""},getTitle:function(e){if(e.name)return e.name;var t=c.getCanBeConsumed(e);return(null==t?void 0:t.value)||"private"!==(null==t?void 0:t.reason)?(null==t?void 0:t.value)||"video-deleted"!==(null==t?void 0:t.reason)?o("privateVideo"):o("videoUnavailable"):o("privateVideo")}}},22231:function(e,t,n){function a(e,t){return t[e.charCodeAt(0)%t.length]}n.d(t,{x:function(){return a}})},23657:function(e,t,n){n.d(t,{x:function(){return P}});var a=n(1024),r=n.n(a),i=n(66703),o=n(45458),c=n(56285),l=n(50997),s=n(89707),u=n(72564);function d(e){var t,n;return(null===(n=null===(t=e.items)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)?r().createElement("p",{className:"mb-0"},e.items.data.map((function(e,t){return r().createElement("span",{key:t},e.name)}))):null}function m(e){return r().createElement(r().Fragment,null,r().createElement("div",{className:"col-3"},r().createElement("label",null,r().createElement(i.x,{namespace:"libraryRequests.videoDetails",phrase:e.phrase}))),r().createElement("div",{className:"col-9 mb-3"},e.children))}function v(e){var t,n,a,i,v,f,p,g,y,b,h,E,C,N,S=e.libraryRequest.object;return r().createElement("div",{className:"row"},((null==S?void 0:S.name)||e.libraryRequest.name)&&r().createElement(m,{phrase:"title"},(null==S?void 0:S.name)||e.libraryRequest.name),!!S&&r().createElement(r().Fragment,null,!!S.series&&r().createElement(m,{phrase:"series"},r().createElement("a",{target:"_blank",href:(E=S.series,C=e.config,N="series/".concat(E.id),s.k.getMainProductUrl(C,N,N)),className:"".concat("Z5BW7"," text-reset")},S.series.name,r().createElement(u.Q,{video:S,withSeriesTitle:!0}))),!!(null===(t=S.rating)||void 0===t?void 0:t.code)&&r().createElement(m,{phrase:"rating"},r().createElement("div",{className:"d-flex"},r().createElement(o.C,{type:o.g.Rating,data:S.rating}))),!!S.description&&r().createElement(m,{phrase:"description"},r().createElement("span",{className:"pre-wrap"},S.description)),!!S.productionYear&&r().createElement(m,{phrase:"productionYear"},S.productionYear),!!(null===(a=null===(n=S.producers)||void 0===n?void 0:n.data)||void 0===a?void 0:a.length)&&r().createElement(m,{phrase:"producers"},r().createElement(d,{items:S.producers})),!!(null===(v=null===(i=S.directors)||void 0===i?void 0:i.data)||void 0===v?void 0:v.length)&&r().createElement(m,{phrase:"directors"},r().createElement(d,{items:S.directors})),!!(null===(p=null===(f=S.productionCompanies)||void 0===f?void 0:f.data)||void 0===p?void 0:p.length)&&r().createElement(m,{phrase:"productionCompanies"},r().createElement(d,{items:S.productionCompanies})),!!(null===(y=null===(g=S.distributors)||void 0===g?void 0:g.data)||void 0===y?void 0:y.length)&&r().createElement(m,{phrase:"distributors"},r().createElement(d,{items:S.distributors})),!e.hideBroadcastInfo&&!!(null===(b=S.channel)||void 0===b?void 0:b.name)&&r().createElement(m,{phrase:"channel"},null===(h=S.channel)||void 0===h?void 0:h.name),!e.hideBroadcastInfo&&!!S.dateBroadcast&&r().createElement(m,{phrase:"broadcastDate"},c.O.format(S.dateBroadcast,l.K4.FULL_YEAR))))}var f=n(53808);function p(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}(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 g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}n(31647);var y=a.createContext({});function b(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?h(e,t):void 0}}(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 h(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function E(e){var t=e.view,n=e.options,r=void 0===n?{}:n,i=e.className,o=void 0===i?"":i,c=a.useMemo((function(){return new t(r)}),[r]);!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=a.useContext(y).setPageTitle;a.useEffect((function(){"boolean"!=typeof e&&f.q.isFunction(n)&&(e||(e=""),n(e))}),[e].concat(b(t)))}(c.title);var l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=a.useRef(null);return a.useEffect((function(){if(e){var t=n.current;return e.render(),t.hasChildNodes()?t.replaceChild(e.el,t.firstChild):t.appendChild(e.el),e.triggerMethod&&e.triggerMethod("attach"),e.trigger("rendered"),function(){f.q.isFunction(e.close)?e.close():f.q.isFunction(e.destroy)&&e.destroy()}}}),p(t)),n}(c,[c]);return t?a.createElement("div",{ref:l,className:o}):a.createElement(a.Fragment,null)}var C=n(70065),N=n(89545),S=n(71192);function w(e){return r().createElement("div",{className:"col-8 mb-3 p-0"},r().createElement(E,{view:N.c,options:{model:new S.n(e.video,{parse:!0}),webPlayerUrl:e.webPlayerUrl,analyticsOptions:{location:C.LocationContext.VideoRequest},currentUser:e.currentUser,createViewKey:e.createViewKey,playerApiUrl:e.playerApiUrl}}))}var k=n(38182),O=n(83891),T="libraryRequests.comments";function A(e){var t,n=e.comment,a="".concat(n.user.name," ").concat(n.user.surname);return r().createElement("div",{className:"d-flex ".concat("LyFKD")},r().createElement("div",{className:"".concat("hwnEk"," mr-2 flex-shrink-0")},r().createElement(k.q,{imageUrl:null===(t=n.user.avatar)||void 0===t?void 0:t.url,imageCdnUrl:e.imageCdnUrl,initials:O.l.getInitials(n.user.name,n.user.surname)})),r().createElement("div",null,r().createElement("span",{className:"font-weight-bold pr-2"},a),r().createElement("span",{className:"text-muted"},r().createElement(i.x,{namespace:T,phrase:"time",options:{date:c.O.format(n.dateCreated,l.K4.FULL_YEAR),time:c.O.format(n.dateCreated,l.K4.TIME)}})),r().createElement("p",{className:"mb-0"},n.message)))}function I(e){var t;return(null===(t=e.comments)||void 0===t?void 0:t.length)?r().createElement("div",{className:"pb-3 border-bottom mb-3"},r().createElement("h2",{className:"h5"},r().createElement(i.x,{namespace:T,phrase:"comments"})),r().createElement("div",{className:"border rounded p-2"},e.comments.map((function(t,n){return r().createElement(A,{key:n,comment:t,imageCdnUrl:e.imageCdnUrl})})))):r().createElement(r().Fragment,null)}var j=n(8371);function P(e){return r().createElement("div",{className:"bg-white rounded p-3"},r().createElement(I,{comments:e.comments,imageCdnUrl:e.config.get("imageCdnUrl")}),r().createElement("h2",{className:"h5"},r().createElement(i.x,{namespace:"libraryRequests.info",phrase:"videoDetails"})),r().createElement(w,{video:e.libraryRequest.object,webPlayerUrl:e.config.get("webPlayerUrl"),currentUser:e.currentUser,createViewKey:e.createViewKey,playerApiUrl:e.config.get("playerApiUrl")}),r().createElement(v,{libraryRequest:e.libraryRequest,hideBroadcastInfo:e.currentUser.get("instanceRegion")===j.b.US,config:e.config}))}},49824:function(e,t,n){n.d(t,{j:function(){return i}});var a=n(1024),r=n.n(a);function i(){return r().createElement("div",{className:"bg-white rounded p-3"},r().createElement("div",{className:"partial-loading-background mb-2",style:{height:"1.25rem",width:"9rem"}}),r().createElement("div",{className:"col-8 mb-3 p-0"},r().createElement("div",{className:"responsive-img partial-loading-background rounded"})),r().createElement("div",{className:"row"},r().createElement("div",{className:"col-3"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"3.4rem"}})),r().createElement("div",{className:"col-9 mb-3"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"9rem"}})),r().createElement("div",{className:"col-3"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"5rem"}})),r().createElement("div",{className:"col-9 mb-3"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"2rem"}})),r().createElement("div",{className:"col-3"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"7rem"}})),r().createElement("div",{className:"col-9 mb-3"},r().createElement("div",{className:"partial-loading-background",style:{height:"1.25rem",width:"16rem"}}))))}},5421:function(e,t,n){n.d(t,{q:function(){return Me}});var a=n(1024),r=n.n(a),i=n(98495),o=["second","minute","hour","day","week","month","year"],c=["秒","分钟","小时","天","周","个月","年"],l={},s=function(e,t){l[e]=t},u=[60,60,24,7,365/7/12,12];function d(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}s("en_US",(function(e,t){if(0===t)return["just now","right now"];var n=o[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]})),s("zh_CN",(function(e,t){if(0===t)return["刚刚","片刻后"];var n=c[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}));var m=n(70065),v=n(57857),f=n(53808),p=n(6681),g=n(39396),y=n(2491),b=n(40221),h=n(37360),E=n(18830),C={isFavouritedByCurrentUser:function(e){var t;return!(1!==(null===(t=null==e?void 0:e.favouritedBy)||void 0===t?void 0:t.data.length))},isFavouritedByUser:function(e,t){var n;return!!b.m.findWhere(null===(n=null==e?void 0:e.favouritedBy)||void 0===n?void 0:n.data,{id:null==t?void 0:t.id})},updateVideoState:function(e,t,n){return{id:e.id,favouritedBy:{data:n?[{id:t.id}]:[],pagination:{limit:25,cursors:{next:"",previous:""}}}}},showFavouriteButton:function(e,t){var n;return!(!(null===(n=E.M.getCanBeConsumed(e))||void 0===n?void 0:n.value)||!t&&!h.V.isTabletOrMobile()&&!C.isFavouritedByCurrentUser(e))}},N=n(58424),S=n(58566),w=n(86120),k=n(84868),O=n(15408),T=n(2248),A=n(68003),I=n(34254),j=n(84657),P={getFavourites:function(e,t){var n=j.v.VIDEO_COLLECTION,a=j.v.CLIP_COLLECTION,r=j.v.INTERACTIVE,i={query:"(favouriteVideos[".concat(n,"]|favouriteClips[").concat(a,"]|favouriteInteractives[").concat(r,"]){orderbydesc:timestamp}"),permissionFilterOption:I.r.StripMetadata};return t&&(i.cursor=t),{url:A._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),i),key:"favourites:".concat(e).concat(t?":".concat(t):"")}},favourite:function(e,t,n,a){return{url:"{gateway}/v1/objects/".concat(t.id),key:"favourite:".concat(t.id,":").concat(e.id),data:E.M.isClip(e)?{favouriteClips:e.id}:E.M.isInteractive(e)?{favouriteInteractives:e.id}:{favouriteVideos:e.id},type:T.k.PUT,invalidationKeys:["favourites:".concat(t.id),"is:favourited:".concat(t.id)],formatData:function(n){return Object.assign(Object.assign({},n),{favouriteVideos:[C.updateVideoState(e,t,!0)]})},success:n,error:a}},unfavourite:function(e,t,n,a){return{url:A._.urlBuilder(E.M.isClip(e)?"{gateway}/v1/objects/".concat(t.id,"/favouriteClips"):E.M.isInteractive(e)?"{gateway}/v1/objects/".concat(t.id,"/favouriteInteractives"):"{gateway}/v1/objects/".concat(t.id,"/favouriteVideos"),{memberId:e.id}),key:"unfavourite:".concat(t.id,":").concat(e.id),type:T.k.DELETE,invalidationKeys:["favourites:".concat(t.id),"is:favourited:".concat(t.id)],formatData:function(t){return{data:Object.assign(Object.assign({},t),{favouriteVideos:[]}),video:{id:e.id,favouritedBy:{data:[]}}}},success:n,error:a}},isFavourited:function(e,t,n){var a=t.slice().sort(),r=a.map((function(e){return"id=".concat(e)}));if(r.length)return{url:"{gateway}/v1/objects?query=favouritedBy{id:".concat(e,"}&").concat(r.join("&")),key:"is:favourited:".concat(e,":by:id:").concat(a.join(",")),normalizeOptions:{namespace:n}}}},F=n(52076),x=v.T.encloseNamespace("shared.hooks");function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var M=v.T.encloseNamespace("shared.favouriteButton");function R(e){var t,n,r=(0,y.Z)(),i=function(e){var t=w.a.useBasicFetch(O.N.currentUser(),{optimize:!0}),n=function(){var e,t,n,a=w.a.useBasicFetch(O.N.currentUser()),r=w.a.useBasicFetch((null===(e=a.data)||void 0===e?void 0:e.isAuthenticated)&&{url:"{gateway}/v1/users/me/products",key:"user:products",normalizeOptions:{namespace:"product"},success:t,error:n});return{hasProduct:function(e){var t;return!(!r.hasCompleted||r.hasError)&&!!(null===(t=r.data)||void 0===t?void 0:t.length)&&r.data.some((function(t){return t.id===e}))},products:r}}(),a=n.hasProduct,r=(0,S.useDispatch)(),i=(0,y.Z)();return{setFavourite:function(n,a,o,c,l){var s=a?P.favourite:P.unfavourite;w.a.fetch(r,s(n,t.data,(function(){f.q.isFunction(o)&&o(),i.success(x(a?"favourited":"unfavourited",{name:n.name,escapeText:!0}));var t={entity:E.M.getAnalyticsEntity(n),actionType:m.UserAction.Favourite,descriptor:a?m.ToggleDescriptor.On:m.ToggleDescriptor.Off,location:e,workflowPhase:m.WorkflowPhase.Complete},r=Object.assign(Object.assign({},l||{}),{id:n.id});F.k.logUserAction(r,t)}),c))},canFavourite:function(e){var n;return!!t.data.isAuthenticated&&!!a(k.x.Primary)&&!(!(null==e?void 0:e.favouritedBy)||!Array.isArray(null===(n=null==e?void 0:e.favouritedBy)||void 0===n?void 0:n.data))}}}(null).canFavourite,o=C.isFavouritedByCurrentUser(e.video),c=(t=a.useState(o),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(i.push(a.value),!t||i.length!==t);o=!0);}catch(e){c=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw r}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return L(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=c[0],s=c[1];a.useEffect((function(){s(o)}),[o]);var u="cursor-pointer ".concat("CFRo3"," ").concat(l?"t0svX":"");return e.className&&(u+=" ".concat(e.className)),i(e.video)&&f.q.isFunction(e.setFavourite)?a.createElement(N.L,{className:u,onClick:function(){var t=!l;s(t),e.setFavourite(e.video,t,null,(function(){r.error(M(E.M.isClip(e.video)?t?"favouriteClipError":"unfavouriteClipError":E.M.isInteractive(e.video)?t?"favouriteInteractiveError":"unfavouriteInteractiveError":t?"favouriteVideoError":"unfavouriteVideoError")),s(!t)}),e.analyticsData,e.analyticsOptions)}},a.createElement(g.x,{svgName:p.vn.Heart,size:g.S.Large,className:"svg-container ".concat("ZMMQu")}),a.createElement(g.x,{svgName:p.vn.HeartOutline,size:g.S.Large,className:"svg-container ".concat("truFo")})):a.createElement(a.Fragment,null)}var D=n(85887),U=n(29267),V="fVSzb";function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var q=a.memo((function(e){var t,n,r=e.forceLoad,i=e.extraClasses,o=void 0===i?"":i,c=e.errorFallbackImageSrc,l=e.src,s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n}(e,["forceLoad","extraClasses","errorFallbackImageSrc","src"]),u=(0,U.Y)({rootMargin:"500px"}),d=u.ref,m=u.inView,v=(t=a.useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(i.push(a.value),!t||i.length!==t);o=!0);}catch(e){c=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw r}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return B(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?B(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),f=v[0],p=v[1];function g(){return f&&c?c:e.src}if(a.useEffect((function(){if(r||m){var e=new Image;return e.onerror=function(){p(!0),c&&(e.src=c)},e.src=l,function(){return e.onerror=null}}}),[m]),f&&!c)return a.createElement(a.Fragment,null);if(!d)return a.createElement("img",Object.assign({className:"".concat(V," ").concat(o),alt:"",src:g()},s));var y=Object.assign(Object.assign({alt:""},s),m||r?{src:g()}:{});return r||(y.ref=d),a.createElement("img",Object.assign({className:"".concat(V," ").concat(o)},y))})),_=n(54753),z=n(87013),H=n(88483);function Z(e){var t="vdd4V",n="";return e.imageType===H.__.Thumbnails&&(n="thumbnail ".concat("Ez0E7")),e.imageType===H.__.TallPosters&&(n="H9bQA"),e.imageType===H.__.Covers&&(n="Nudts"),e.imageType===H.__.Banners&&(n="IOvDH"),e.imageType===H.__.Posters&&(n="iiY56"),e.imageType===H.__.Pdf&&(n="aDJiJ"),e.imageType===H.__.Link&&(n="wDpui"),n&&(t+=" ".concat(n)),e.className&&(t+=" ".concat(e.className)),t}function K(e){var t=e.data,n=e.imageOptions,r=e.appLink,i=e.preload,o=e.analyticsOptions,c=e.analyticsData,l=e.imageClassName,s="";"string"==typeof t?s=t:D.t.isObject(t)&&(s=t.url);var u=s&&n?z.j.createUrl(s,n):s;return a.createElement("div",{className:Z(e),style:e.imageStyle},r?a.createElement(_.F,{appLink:r,analyticsData:c,analyticsOptions:o},e.children,u&&a.createElement(q,{src:u,forceLoad:i,extraClasses:l,errorFallbackImageSrc:e.errorFallbackImageSrc})):a.createElement(a.Fragment,null,e.children,u&&a.createElement(q,{src:u,forceLoad:i,extraClasses:l,errorFallbackImageSrc:e.errorFallbackImageSrc})))}var Q=n(72564);function Y(e){var t="d-flex align-items-center badge-list ".concat("jEh7m");return e.className&&(t+=" ".concat(e.className)),a.createElement("div",{className:t},e.children)}var X=n(45458);function W(e){var t=E.M.getVideoProgress(e.video),n=t&&e.video.duration&&t/e.video.duration*1e5;return n?a.createElement("div",{className:"bg-primary h-100",style:{width:"".concat(n,"%")}}):a.createElement(a.Fragment,null)}function G(e){var t=e.clip,n=e.size;if(!t.video)return a.createElement(a.Fragment,null);var r=t.endTime-t.startTime,i=Math.floor(t.video.duration/1e3),o=t.startTime/i*100,c=r/i*100,l="".concat("ifCKp"," ").concat("lg"===n?"nHNts":"");return a.createElement("div",{className:"position-relative h-100"},a.createElement("div",{className:l},a.createElement("div",{className:"".concat("TAxd_"),style:{width:"".concat(c,"%"),left:"".concat(o,"%")}},a.createElement("div",{className:"position-relative h-100"},a.createElement("div",{className:"bg-info ".concat("ZFHSL")}),a.createElement("div",{className:"bg-info ".concat("iuR4H")})))))}var $="trhW1";function J(e){var t="L7yKq ";return t+="white"===e.color?"tNJTB":"ltvcb","lg"===e.size&&(t+=" Iyvjg"),a.createElement("div",{className:"position-relative h-100"},a.createElement("div",{className:t},a.createElement("div",{className:"bg-blue ".concat($),style:{left:"10%"}}),a.createElement("div",{className:"bg-purple ".concat($),style:{left:"20%"}}),a.createElement("div",{className:"bg-orange ".concat($),style:{left:"25%"}}),a.createElement("div",{className:"bg-indigo ".concat($),style:{left:"55%"}}),a.createElement("div",{className:"bg-green ".concat($),style:{left:"70%"}})))}J.defaultProps={color:"white"};var ee="YnXtZ",te="S9lm2";function ne(e){return"none"===e.style?r().createElement(r().Fragment,null):E.M.isVideo(e.video)?r().createElement("div",{className:"".concat(ee," ").concat("BdUh9")},r().createElement(W,{video:e.video})):E.M.isClip(e.video)?r().createElement("div",{className:"".concat(ee," ").concat("KrLcn"," ").concat("lg"===e.style?te:"")},r().createElement(G,{clip:e.video,size:e.style})):E.M.isInteractive(e.video)?r().createElement("div",{className:"".concat(ee," ").concat("zEClK"," ").concat("lg"===e.style?te:"")},r().createElement(J,{size:e.style})):r().createElement(r().Fragment,null)}function ae(){return r().createElement("div",{className:"".concat("w4cg8"," bg-white cursor-default d-flex align-items-center justify-content-center")},r().createElement(g.x,{svgName:p.vn.Lock}))}var re,ie,oe=n(63946),ce="atIHN",le=n(22231),se=n(24828);function ue(e){var t,n=e.type,r=e.mediaType,i=e.extraClasses;if(n===re.Video)return a.createElement("div",{className:"".concat("LolCW"," bg-light-blue")});if(n===re.Folder)return a.createElement("div",{className:"".concat("mdrT5"," ").concat(e.extraClasses," ").concat((0,le.x)(e.name,se.o))});var o=function(e){return e===re.SeriesItem?"epoLB":e===re.Playlist?"ZbKBN":e===re.Series||e===re.TallSubject?"I1mTo":e===re.Subject?"".concat("kNG8Z"," svg-container d-inline-block"):""}(n),c=function(e){return e===re.SeriesItem?p.vn.Play:e===re.Playlist?p.vn.Image:e===re.Series?p.vn.Series:e===re.Subject||e===re.TallSubject?p.vn.Subject:""}(n),l=function(e){return e===re.Subject?g.S.ExtraLarge:g.S.Standard}(n),s="".concat(function(e,t){return t===re.Subject?"m20L7":e===ie.Svg?t===re.SeriesItem?"".concat(ce," rounded-lg"):ce:"ZvbeV"}(r,n));return i&&(s+=" ".concat(e.extraClasses)),a.createElement("div",{className:s},r===ie.Svg?a.createElement(g.x,{svgName:c,className:"".concat(o," ").concat(null!==(t=e.svgContainerClassName)&&void 0!==t?t:""),tagName:"div",size:l}):a.createElement("div",{className:"nKsWZ",style:{backgroundImage:"url('".concat(c,"')")}}))}!function(e){e[e.Playlist=0]="Playlist",e[e.Series=1]="Series",e[e.SeriesItem=2]="SeriesItem",e[e.Subject=3]="Subject",e[e.TallSubject=4]="TallSubject",e[e.Video=5]="Video",e[e.Folder=6]="Folder"}(re||(re={})),function(e){e[e.Svg=0]="Svg",e[e.Image=1]="Image"}(ie||(ie={})),ue.defaultProps={mediaType:ie.Svg};var de,me="XAfZW";function ve(e){var t=e.video,n=e.appLink,a=e.imageOptions,i=e.setFavourite,o=e.preload,c=e.hovering,l=E.M.getCanBeConsumed(e.video),s=Object.assign(Object.assign({},e.analyticsOptions),{entity:E.M.getAnalyticsEntity(t)}),u=C.showFavouriteButton(e.video,c);return r().createElement(oe.u,{title:E.M.getPrivacyReasoning(e.video),spanHack:!0,spanHackClassName:""},r().createElement("div",{className:"position-relative rounded overflow-hidden"},!e.hideFavouriteButton&&u&&r().createElement("div",{className:me},r().createElement(R,{setFavourite:i,video:t,className:"rounded-circle ".concat("t6k1e"),analyticsData:e.analyticsData,analyticsOptions:s})),!(null==l?void 0:l.value)&&r().createElement("div",{className:me},r().createElement(ae,null)),r().createElement(K,{data:E.M.getThumbnail(t),appLink:(null==l?void 0:l.value)?n:null,imageType:H.__.Thumbnails,imageOptions:a,preload:o,className:"rXzR8",analyticsData:Object.assign(Object.assign({},e.analyticsData),{id:t.id,name:t.name}),analyticsOptions:Object.assign(Object.assign({},s),{actionType:m.UserAction.Click,descriptor:m.ClickDescriptor.Thumbnail})},!(!c||!(null==l?void 0:l.value))&&r().createElement(g.x,{className:"dndOA",svgName:p.vn.PlayCircle}),r().createElement(ue,{type:re.Video}),r().createElement("div",{className:"qu3A3"},r().createElement("div",{className:"".concat("_6FukN"," ").concat(c?"puKcM":"")},E.M.isVideo(t)&&E.M.hasSeries(t)&&r().createElement(Q.M,{className:"text-shadow clamp-1",video:t,appLink:null,analyticsOptions:null}),r().createElement("span",{className:"h6 text-reset text-shadow clamp-1"},E.M.getTitle(t)),r().createElement(ne,{video:t,style:e.bottomBarStyle}),c&&r().createElement(Y,{className:"align-items-center mb-n1 mt-1"},r().createElement(X.C,{type:X.g.Duration,data:E.M.isClip(t)?1e3*(t.endTime-t.startTime):t.duration}),E.M.isVideo(t)&&r().createElement(X.C,{type:X.g.Rating,data:t.rating}),E.M.isVideo(t)&&r().createElement(r().Fragment,null,t.hasSubtitle&&r().createElement("span",{className:"badge p-0"},r().createElement(g.x,{svgName:p.vn.CloseCaptionBadge})),r().createElement(X.C,{type:X.g.Interactive,data:t.hasInteractives}))))))))}!function(e){e[e.Below=1]="Below",e[e.Overlay=2]="Overlay",e[e.Independent=3]="Independent"}(de||(de={}));var fe;function pe(e){var t=e.type,n=function(e){return e===fe.Video?"b8kJW":e===fe.Playlist?"eo2p2":""}(t),r=function(e){return e===fe.Video?p.vn.PlayCircle:e===fe.Playlist?p.vn.AddToPlaylists:""}(t);return a.createElement("div",{className:"lpwag"},a.createElement("div",{className:"qpc7L"}),a.createElement(g.x,{svgName:r,className:n}))}!function(e){e[e.Video=0]="Video",e[e.Playlist=1]="Playlist",e[e.Series=2]="Series"}(fe||(fe={}));var ge=n(9579),ye=n(74421),be={unchecked:"maxOx",checked:"k3CBB"};function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}var Ee=v.T.encloseNamespace("shared.toggleActivityStatusButton");function Ce(e){var t,n,r=(0,y.Z)(),i=(t=a.useState(e.activityStatus===ge.T.Complete),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(i.push(a.value),!t||i.length!==t);o=!0);}catch(e){c=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw r}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return he(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?he(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=i[0],c=i[1];a.useEffect((function(){c(e.activityStatus===ge.T.Complete)}),[e.activityStatus]);var l="cursor-pointer rounded-circle ".concat(o?be.checked:be.unchecked);return e.className&&(l+=" ".concat(e.className)),e.shareId&&e.activityStatus&&e.activityStatus!==ge.T.None&&f.q.isFunction(e.setActivityStatus)?a.createElement("div",{className:l,onClick:function(){var t=!o;c(t);var n=t?ge.T.Complete:ge.T.Incomplete;e.setActivityStatus(e.shareId,e.sharedEntity,n,null,(function(){r.error(Ee(function(){switch(e.sharedEntity.typeId){case ye.E.Video:return t?"completeVideoActivityError":"uncompleteVideoActivityError";case ye.E.Clip:return t?"completeClipActivityError":"uncompleteClipActivityError";case ye.E.Interactive:return t?"completeInteractiveActivityError":"uncompleteInteractiveActivityError";case ye.E.Playlist:return t?"completePlaylistActivityError":"uncompletePlaylistActivityError";case ye.E.Series:return t?"completeSeriesActivityError":"uncompleteSeriesActivityError"}}())),c(!t)}))}},a.createElement(g.x,{svgName:p.vn.Check,size:g.S.Large,className:"svg-container ".concat(be.checkMark)})):a.createElement(a.Fragment,null)}var Ne="efxnE",Se="vWvGn";function we(e){var t=E.M.getCanBeConsumed(e.video);return(null==t?void 0:t.value)?function(e){var t;return!(null===(t=E.M.getCanBeConsumed(e.video))||void 0===t?void 0:t.value)||!(!f.q.isFunction(e.setFavourite)||e.hideFavouriteButton)||!!f.q.isFunction(e.setActivityStatus)}(e)?r().createElement("div",{className:"".concat(Ne," d-flex align-items-center")},r().createElement(Ce,{activityStatus:e.activityStatus,setActivityStatus:e.setActivityStatus,sharedEntity:e.sharedEntity,shareId:e.shareId,className:Se}),!e.hideFavouriteButton&&r().createElement(R,{setFavourite:e.setFavourite,video:e.video,className:Se,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions})):r().createElement(r().Fragment,null):r().createElement("div",{className:Ne},r().createElement(ae,null))}var ke=n(32557);function Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function Te(e,t){var n="VAx36";return"none"===t||("lg"===t&&(n+=" g5_ww"),E.M.isVideo(e)?n+=" rwEAC":E.M.isClip(e)?n+=" MPRU6":E.M.isInteractive(e)&&(n+=" Zzo3e")),n}function Ae(e){var t,n=e.video,a=e.seriesAppLink,i=e.textPosition,o=e.appLink,c=e.bottomBarStyle,l=i===de.Overlay,s=E.M.getCanBeConsumed(e.video),u="";return l?(u="krg9f",(null==s?void 0:s.value)&&(E.M.isClip(n)&&(u+=" MPRU6"),E.M.isInteractive(n)&&(u+=" Zzo3e"),"lg"===c&&(u+=" g5_ww"))):u="tZjPt",r().createElement("div",{className:u},E.M.isVideo(n)&&E.M.hasSeries(n)&&r().createElement(Q.M,{className:l?"text-shadow clamp-1":"clamp-2",video:n,appLink:l?null:a,analyticsOptions:{location:m.LocationContext.VideoThumbnail}}),l||!(null==s?void 0:s.value)?r().createElement("span",{className:"h6 text-reset text-shadow clamp-1"},null!==(t=n.name)&&void 0!==t?t:v.T.getPhrase("shared.staticVideoThumbnail","videoUnavailable")):r().createElement(_.F,{className:"h6 text-reset clamp-2",appLink:o},n.name))}function Ie(e){var t,n,a=e.video,i=e.appLink,o=e.textPosition,c=e.imageOptions,l=e.setFavourite,s=e.preload,u=(t=(0,ke.X)(),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i=[],o=!0,c=!1;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(i.push(a.value),!t||i.length!==t);o=!0);}catch(e){c=!0,r=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw r}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Oe(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Oe(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=u[0],v=u[1],f=E.M.getCanBeConsumed(a),p=C.showFavouriteButton(a,v),g="position-relative";i&&(null==f?void 0:f.value)?g+=" cursor-pointer":g+=" cursor-default",e.extraClasses&&(g+=" ".concat(e.extraClasses)),o===de.Overlay&&(g+=" rounded overflow-hidden");var y=Object.assign(Object.assign({},e.analyticsOptions),{entity:E.M.getAnalyticsEntity(a)}),b="rounded overflow-hidden";o===de.Overlay&&(b+=" LS_EH");var h=!!i&&!e.hideMask&&!!(null==f?void 0:f.value),N=E.M.getPrivacyReasoning(e.video);return r().createElement(oe.u,{title:N,spanHack:!0,spanHackClassName:""},r().createElement("div",{className:g,ref:d},r().createElement(we,{video:a,shareId:e.shareId,sharedEntity:e.sharedEntity,activityStatus:e.activityStatus,setActivityStatus:e.setActivityStatus,setFavourite:l,hideFavouriteButton:e.hideFavouriteButton||!p,analyticsData:e.analyticsData,analyticsOptions:y}),r().createElement(K,{data:E.M.getThumbnail(a),appLink:(null==f?void 0:f.value)?i:null,imageType:H.__.Thumbnails,imageOptions:c,preload:s,className:b,analyticsData:Object.assign(Object.assign({},e.analyticsData),{id:a.id,name:a.name}),analyticsOptions:Object.assign(Object.assign({},y),{actionType:m.UserAction.Click,descriptor:m.ClickDescriptor.Thumbnail})},h&&r().createElement(pe,{type:fe.Video}),r().createElement(ue,{type:re.Video}),r().createElement("div",{className:"EElm1"},o===de.Overlay&&r().createElement(Ae,Object.assign({},e)),"none"!==e.bottomBarStyle&&r().createElement(ne,{video:a,style:e.bottomBarStyle}),!e.hideDuration&&r().createElement(Y,{className:Te(e.video,e.bottomBarStyle)},r().createElement(X.C,{type:X.g.Duration,data:E.M.getDuration(e.video)})))),o===de.Below&&r().createElement(Ae,Object.assign({},e))))}function je(e){var t,n=e.bottomBarStyle;(null===(t=E.M.getCanBeConsumed(e.video))||void 0===t?void 0:t.value)||(n="none");var r=Object.assign(Object.assign({},e),{bottomBarStyle:n});return"expandable"===e.type?a.createElement(ve,Object.assign({},r)):a.createElement(Ie,Object.assign({},r))}je.defaultProps={bottomBarStyle:"sm"};var Pe=n(66703),Fe=n(50072),xe=n(65402);function Le(e){var t,n,a,i,o,c,s=e.libraryRequest,v=s.sender&&"".concat(s.sender.name," ").concat(s.sender.surname),f=(null===(t=s.object)||void 0===t?void 0:t.name)||s.name;return r().createElement(_.F,{className:"d-flex py-3 px-3 text-decoration-none ".concat("GyyRT"," ").concat(e.active?"aVNhj":""),appLink:Object.assign(Object.assign({},e.appLink),{args:[s.id],params:e.queryParams})},r().createElement("div",{className:"col-5 px-0"},r().createElement(je,{video:null!==(n=s.object)&&void 0!==n?n:{},type:"static",imageOptions:{size:H.h2.Small},textPosition:de.Independent,analyticsOptions:{location:m.LocationContext.StaffRequestDetails},hideMask:!0})),r().createElement("div",{className:"col-7 pr-0"},r().createElement("div",{className:"d-flex justify-content-between w-100"},r().createElement("div",{className:"overflow-hidden"},r().createElement(Q.M,{video:s.object,analyticsOptions:{location:m.LocationContext.StaffRequestDetails}}),!!f&&r().createElement("h5",{className:"m-0 mb-1 h6",title:f},r().createElement("span",{className:"text-truncate overflow-hidden d-block"},f))),s.status!==Fe.l.Pending&&r().createElement("div",{className:"flex-shrink-0 ml-1"},r().createElement(xe.h,{status:s.status}))),!!v&&r().createElement("div",null,r().createElement(Pe.x,{namespace:"libraryRequests.leftNav",phrase:"requestedBy",options:{fullName:v}})),r().createElement("div",null,(a=s.dateCreated,c=function(e,t){return(+(t?d(t):new Date)-+d(e))/1e3}(a,o&&o.relativeDate),function(e,t){for(var n=e<0?1:0,a=e=Math.abs(e),r=0;e>=u[r]&&r<u.length;r++)e/=u[r];return(e=Math.floor(e))>(0==(r*=2)?9:1)&&(r+=1),t(e,r,a)[n].replace("%s",e.toString())}(c,function(e){return l[e]||l.en_US}(i))))))}function Me(e){return r().createElement("div",{className:"uQ6as"},r().createElement(i.ZP,{hideTracksWhenNotNeeded:!0},r().createElement("div",{className:"bg-white rounded"},e.libraryRequests.map((function(t,n){return r().createElement(Le,{libraryRequest:t,key:n,active:e.selectedId===t.id,appLink:e.appLink,queryParams:e.queryParams})})))))}},7044:function(e,t,n){n.d(t,{p:function(){return o}});var a=n(1024),r=n.n(a);function i(){return r().createElement("div",{className:"d-flex p-3"},r().createElement("div",{className:"col-5 px-0"},r().createElement("div",{className:"responsive-img partial-loading-background rounded"})),r().createElement("div",{className:"col-7 pr-0"},r().createElement("div",{className:"partial-loading-background mb-1",style:{height:"1.25rem",width:"9rem"}}),r().createElement("div",{className:"partial-loading-background",style:{height:"1rem",width:"4rem"}})))}function o(){return r().createElement("div",{className:"bg-white rounded"},Array(5).fill(null).map((function(e,t){return r().createElement(i,{key:t})})))}},17950:function(e,t,n){n.d(t,{F:function(){return g}});var a=n(1024),r=n.n(a),i=n(57857),o=n(90335),c=n(53808),l=n(54753);function s(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="shared.videoSortSelect",d=c.q.memoize((function(){var e;return s(e={},o.D.RecentlyAdded,{name:i.T.getPhrase(u,"recentlyAdded")}),s(e,o.D.AtoZ,{name:i.T.getPhrase(u,"atoz")}),s(e,o.D.ZtoA,{name:i.T.getPhrase(u,"ztoa")}),s(e,o.D.Newest,{name:i.T.getPhrase(u,"newest")}),s(e,o.D.Oldest,{name:i.T.getPhrase(u,"oldest")}),s(e,o.D.Series,{name:i.T.getPhrase(u,"series")}),e}));function m(e){var t=e.sortTypes||d();return a.createElement("div",{className:"dropdown"},a.createElement("a",{className:"btn btn-".concat(e.variant," ml-2 dropdown-toggle"),type:"button",id:"sort-select","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"},t[e.type].name),a.createElement("div",{className:"dropdown-menu dropdown-menu-right","aria-labelledby":"sort-select"},Object.keys(t).map((function(n){var r="dropdown-item";return n===e.type&&(r+=" active"),a.createElement(l.F,{key:n,className:r,appLink:e.getSortAppLink(n),analyticsData:{sort:t[n].name},analyticsOptions:e.analyticsOptions},t[n].name)}))))}m.defaultProps={variant:"light"};var v=n(70065);function f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var p=i.T.encloseNamespace("libraryRequests.sort");function g(e){var t,n=(f(t={},o.D.Newest,{name:p("newest")}),f(t,o.D.Oldest,{name:p("oldest")}),t);return r().createElement(m,{variant:"outline-dark",type:e.queryParams.sort||o.D.Newest,getSortAppLink:function(t){return Object.assign(Object.assign({},e.appLink),{params:Object.assign(Object.assign({},e.queryParams),{sort:t})})},sortTypes:n,analyticsOptions:{location:v.LocationContext.StaffRequestDetails,entity:v.EntityType.StaffRequest,actionType:v.UserAction.Sort,workflowPhase:v.WorkflowPhase.Complete}})}},65402:function(e,t,n){n.d(t,{h:function(){return l}});var a=n(1024),r=n.n(a),i=n(39396),o=n(6681),c=n(50072);function l(e){var t="",n="".concat("O2Czg"," text-white d-inline-block svg-container rounded-circle ");switch(e.status){case c.l.Approved:t=o.vn.Check,n+="bg-success";break;case c.l.Closed:t=o.vn.Minus,n+="bg-secondary";break;case c.l.Rejected:t=o.vn.Close,n+="bg-danger"}return r().createElement(i.x,{svgName:t,className:n,size:i.S.Small})}},9416:function(e,t,n){n.d(t,{A:function(){return d}});var a=n(1024),r=n.n(a),i=n(58424),o=n(54753),c="hUJx1";function l(e){var t;return r().createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:""},r().createElement("ul",{className:"list-unstyled d-inline-block m-0 ".concat("Hdi6o")},e.tabs.map((function(e){return e.appLink||e.onSelect?r().createElement("li",{className:"p-0 ".concat(e.active?"btn btn-dark":"btn btn-outline-dark"),key:e.name},e.appLink?r().createElement(o.F,{appLink:e.appLink,className:"cursor-pointer d-block text-decoration-none text-reset px-2 ".concat(c)},e.name):r().createElement(i.L,{className:"".concat(c," px-2"),onClick:function(){return function(e){e.active||e.onSelect()}(e)}},e.name)):r().createElement(r().Fragment,{key:e.name})}))))}var s=n(50997),u=n(57857).T.encloseNamespace("libraryRequests.tabs");function d(e){var t=[{name:u("pending"),appLink:{application:s.OV.LIBRARY_REQUESTS,action:s.eX.LibraryRequests.PENDING_REQUESTS,args:[""]},active:"pending"===e.active},{name:u("past"),appLink:{application:s.OV.LIBRARY_REQUESTS,action:s.eX.LibraryRequests.PAST_REQUESTS,args:[""]},active:"past"===e.active}];return r().createElement("div",{className:"mb-3"},r().createElement(l,{tabs:t}))}},50072:function(e,t,n){var a;n.d(t,{l:function(){return a}}),function(e){e.Pending="Pending",e.Approved="Approved",e.Rejected="Rejected",e.Closed="Closed"}(a||(a={}))},59198:function(e,t,n){n.d(t,{s:function(){return o}});var a=n(25796),r=n(86120),i=n(65657);function o(e){var t=r.a.useGetFetch(),n=function(t){return a.y.comments(e,t)};return(0,i.i)(!!e&&n,(function(e){return t(n(e))}))}},85739:function(e,t,n){n.d(t,{p:function(){return o}});var a=n(25796),r=n(86120),i=n(65657);function o(e,t){var n=r.a.useGetFetch(),o=function(n){return a.y.libraryRequests(e,t,n)};return(0,i.i)(o,(function(e){return n(o(e))}))}},30328:function(e,t,n){n.d(t,{A:function(){return o}});var a=n(31647),r=n(1024),i=n.n(r);function o(e){var t=e.id,n=e.appLink,r=e.requests;i().useEffect((function(){!t&&(null==r?void 0:r.length)&&a.Q.AppLinkHelper.trigger(Object.assign(Object.assign({},n),{args:[r[0].id]}),{replace:!0})}),[t,null==r?void 0:r.length])}},64429:function(e,t,n){n.d(t,{m:function(){return l}});var a=n(1024),r=n.n(a),i=n(50072),o=n(31647),c=n(50997);function l(e,t,n){r().useEffect((function(){e&&(e.status===i.l.Pending&&"pending"!==t&&o.Q.AppLinkHelper.trigger({application:c.OV.LIBRARY_REQUESTS,action:c.eX.LibraryRequests.PENDING_REQUESTS,args:[e.id],params:n},{replace:!0}),e.status!==i.l.Pending&&"pending"===t&&o.Q.AppLinkHelper.trigger({application:c.OV.LIBRARY_REQUESTS,action:c.eX.LibraryRequests.PAST_REQUESTS,args:[e.id],params:n},{replace:!0}))}),[e,t])}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[5664],{71641:function(e,t,n){"use strict";n.d(t,{w:function(){return p}});var r=n(39479),o=n(31647),i=n(55142);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(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 u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function a(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}var p=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(f,e);var t,n,o,l,p=(o=f,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(o);if(l){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return a(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),p.call(this,e)}return t=f,n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.N}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return r.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,r=e.extraClasses,o="dropdown-menu-".concat(n);return r&&(o="".concat(o," ").concat(r)),o}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}],n&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.Q.ComponentCollection)},23130:function(e,t,n){"use strict";n.d(t,{Z:function(){return g},t:function(){return o}});var r,o,i=n(31647),l=n(61843),s=n(57857),u=n(58040),a=n.n(u),c={columnNames:"hkjBy",descriptionWrapper:"vGCSU",description:"lM8Hu",ellipsis:"zcKZV",singleEllipsis:"sLOGz",showMoreEllipsis:"mUQy_",showEllipsis:"Dn0yN",hideEllipsis:"Y0fDv",open:"JcPWW",truncateSmall:"FgeiQ",truncateLarge:"x5Rgi"};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},p(e)}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function h(e,t){if(t&&("object"===p(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Small="sm",e.Large="lg"}(o||(o={}));var b=(m(r={},o.Small,3),m(r,o.Large,5),r),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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}(p,e);var t,n,r,i,u=(r=p,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=d(r);if(i){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return h(this,e)});function p(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),(t=u.call(this,e)).showingMore=!1,t}return t=p,(n=[{key:"name",get:function(){return"VideoDescriptionComponent"}},{key:"template",get:function(){return a()}},{key:"lang",get:function(){return"shared.videoDescription"}},{key:"defaults",get:function(){return{size:"sm"}}},{key:"elements",get:function(){return{description:".description-element",ellipsis:this.options.allowExpand?".".concat(c.showMoreEllipsis):".".concat(c.singleEllipsis)}}},{key:"events",value:function(){return m({},"click .".concat(c.showMoreEllipsis),"onClickShowMore")}},{key:"onClickShowMore",value:function(e){e.preventDefault(),this.showingMore?this.showLessDescription():this.showMoreDescription()}},{key:"getDescription",value:function(){return this.options.linkify?l.m$.linkifyText(this.model.get("description")):this.options.highlighter?l.m$.wordsHighlighter(l.m$.escapeExpression(this.model.get("description")),this.model.get("_matchedWords")):void 0}},{key:"getDescriptionElements",value:function(){return{descriptionTextEl:this.getUI("description"),ellipsisEl:this.getUI("ellipsis")}}},{key:"showMoreDescription",value:function(){var e=this.getDescriptionElements(),t=e.descriptionTextEl,n=e.ellipsisEl;t.removeClass(c.truncateLarge).addClass(c.open),n.text(s.T.getPhrase(this.lang,"showLess")),this.showingMore=!0}},{key:"showLessDescription",value:function(){var e,t=this.getDescriptionElements(),n=t.descriptionTextEl,r=t.ellipsisEl;this.options.size===o.Small&&(e="truncateSmall"),this.options.size===o.Large&&(e="truncateLarge"),n.addClass(c[e]),r.text(this.options.allowExpand?"... ".concat(s.T.getPhrase(this.lang,"showMore")):"...").removeClass(c.hideEllipsis).addClass(c.showEllipsis),this.showingMore=!1}},{key:"truncateDescription",value:function(){if(this.options.truncate){var e=this.getDescriptionElements().descriptionTextEl,t=b[this.options.size];e.height()<=21*t||this.showLessDescription()}}},{key:"viewOptions",value:function(){return{styles:c,truncate:this.options.truncate,expandable:this.options.allowExpand,description:this.getDescription()}}},{key:"onAttach",value:function(){this.truncateDescription()}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(i.Q.Component)},37570:function(e,t,n){"use strict";n.d(t,{O:function(){return d}});var r=n(31647),o=n(6681),i=n(61843),l=n(28099),s={svgContainer:"kKrQJ",series:"zJvxj"},u=n(19021),a=n.n(u);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},c(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function y(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(d,e);var t,n,r,u,c=(r=d,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(r);if(u){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),c.call(this,e)}return t=d,(n=[{key:"defaults",get:function(){return{styleUppercase:!0}}},{key:"name",get:function(){return"VideoItemSeriesComponent"}},{key:"template",get:function(){return a()}},{key:"appLinks",get:function(){return this.options.seriesUrl?{}:{".series-applink":{application:l.OV.LIBRARY_EDITOR,action:l.eX.LibraryEditor.SERIES,args:[this.model.series.get("id")]}}}},{key:"padNumber",value:function(e){if(!e)return null;var t=e.toString(),n=2;if(t.length>=n)return t;for(n-=t.length;n>0;)t="0"+t,n--;return t}},{key:"getSeriesName",value:function(){var e=i.m$.escapeExpression(this.model.series.get("name"));return this.options.highlight?i.m$.wordsHighlighter(e,this.model.get("_matchedWords")):e}},{key:"viewOptions",value:function(){return{styles:s,seasonNumber:this.padNumber(this.model.season&&this.model.season.get("number")),episodeNumber:this.padNumber(this.model.get("episodeNumber")),seriesName:this.getSeriesName(),seriesUrl:this.options.seriesUrl,externalSvg:o.Nj.getSvg(o.vn.NewWindow),styleUppercase:this.options.styleUppercase}}},{key:"onBeforeRender",value:function(){return this.model.series&&!!this.model.series.get("id")}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(r.Q.Component)},58040:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return' <div class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.descriptionWrapper:i,t))+'">\r\n <p class="description-element '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.expandable:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.program(4,o,0),data:o}))?i:"")+"</p>\r\n </div>\r\n"},2:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.showMoreEllipsis:i,t))+" "+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">... '+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"showMore",{name:"lang",hash:{},data:o}))+"</span>"},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.singleEllipsis:i,t))+" "+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">...</span>'},6:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda;return' <p class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.truncate:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(6,o,0),data:o}))?i:""},useData:!0})},19021:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.series:i,t))},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'href="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.seriesUrl:i,t))+'" target="_blank"'},5:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.seasonNumber:i,{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o}))?i:"")+" E"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.episodeNumber:i,t))+"\r\n"},6:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"&nbsp;S"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.seasonNumber:i,t))+" &bull;"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return'<a class="series-applink text-reset '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.styleUppercase:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'" '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.seriesUrl:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+">\r\n "+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.seriesName:i,t))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.episodeNumber:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+"</a>"},useData:!0})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[5891],{54096:function(e,t,r){r.d(t,{G:function(){return i}});var n=r(1024),o=r(21679);function i(e){var t,r;return t=e,r=o.u.getInstance(t),n.useEffect((function(){return function(){o.u.releaseInstance(t)}})),r}},90335:function(e,t,r){var n;r.d(t,{D:function(){return n}}),function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series"}(n||(n={}))},2491:function(e,t,r){r.d(t,{Z:function(){return a}});var n=r(54096),o=r(21186),i=r(92159);function a(){var e=(0,n.G)(i.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:o.NK.Warning,heading:o.R6.Warning,message:t})}}}},65657:function(e,t,r){r.d(t,{i:function(){return c}});var n=r(1024),o=r(58566),i=r(86120),a=r(53808);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function c(e,t){var r=e,c=t,l=function(e,t,r){function c(e){if(e)return a.q.isFunction(t)?t(e):e.data}function l(e){var t,r;if(e)return null===(r=null===(t=e.pagination)||void 0===t?void 0:t.cursors)||void 0===r?void 0:r.next}return(0,o.useSelector)((0,n.useMemo)((function(){return function(t){if(a.q.isFunction(e)){for(var r=e,n=a.q.isFunction(e)&&r(),o=n&&i.a.getResponse(t,n),s=o&&o.isFetching,d=o&&o.statusCode,f=o&&o.hasCompleted,p=o&&o.shouldFetch,y=c(o&&o.data),v=l(o&&o.data),m=function(e){var t;if(e)return null===(t=e)||void 0===t?void 0:t.count}(o&&o.data);v&&(s=(o=i.a.getResponse(t,r(v))).isFetching,d=o.statusCode,f=o.hasCompleted,!o.shouldFetch);){var h=c(o.data);h&&y.push.apply(y,function(e){if(Array.isArray(e))return u(e)}(I=h)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(I)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(I)||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.")}());var b=l(o.data);v=b===v?null:b}var g={shouldInitialFetch:p,items:y,nextCursor:v,isFetching:s,statusCode:d,hasCompleted:f};return"number"==typeof m&&(g.totalItems=m),g}var I}}),[e]))}(e&&function(e){return r(e).key});return(0,n.useEffect)((function(){l&&l.shouldInitialFetch&&t&&c()}),[null==l?void 0:l.shouldInitialFetch,t]),(0,n.useEffect)((function(){l&&l.nextCursor&&!l.isFetching&&t&&c(l.nextCursor)}),[null==l?void 0:l.nextCursor,null==l?void 0:l.isFetching,t]),l}r(35656).o.Ok},50072:function(e,t,r){var n;r.d(t,{l:function(){return n}}),function(e){e.Pending="Pending",e.Approved="Approved",e.Rejected="Rejected",e.Closed="Closed"}(n||(n={}))},85739:function(e,t,r){r.d(t,{p:function(){return a}});var n=r(25796),o=r(86120),i=r(65657);function a(e,t){var r=o.a.useGetFetch(),a=function(r){return n.y.libraryRequests(e,t,r)};return(0,i.i)(a,(function(e){return r(a(e))}))}},31170:function(e,t,r){r.r(t),r.d(t,{ApproveLibraryRequestView:function(){return C}});var n=r(1024),o=r.n(n),i=r(57857),a=r(86120),u=r(31647),c=r(71575),l=r(66703),s=r(85610),d=r(2491),f=r(25796),p=r(50072),y=r(90335),v=r(50997),m=r(85739),h=r(70065),b=r(52076);function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var I="libraryRequests.approve",A=i.T.encloseNamespace(I);function C(e){var t,r,n=(t=o().useState(!1),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,u=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(u)throw o}}return i}}(t,r)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=n[0],C=n[1],S=a.a.useGetFetch(),w=(0,d.Z)(),F=(0,m.p)(e.queryParams.sort||y.D.Newest,[p.l.Pending]),R=a.a.useBasicFetch(f.y.libraryRequest(e.libraryRequestId)),E=a.a.useBasicFetch(f.y.library(e.libraryId)),q=a.a.useBasicFetch(f.y.folder(e.folderId));function k(){var t,r,n,o,i,a;i={location:h.LocationContext.Popup,actionType:h.UserAction.Approve,entity:h.EntityType.StaffRequest,workflowPhase:h.WorkflowPhase.Complete},a={id:R.data.id,videoId:null===(t=R.data.object)||void 0===t?void 0:t.id,requestingUserId:null===(r=R.data.sender)||void 0===r?void 0:r.id,sourceLibraryId:null===(n=R.data.sourceLibrary)||void 0===n?void 0:n.id,sourceFolderId:null===(o=R.data.sourceCategory)||void 0===o?void 0:o.id,destinationLibraryId:e.libraryId,destinationFolderId:e.folderId},b.k.logUserAction(a,i),w.success(A("success"));var c=F.items.findIndex((function(t){return t.id.toString()===e.libraryRequestId.toString()})),l=F.items[c+1];u.Q.AppLinkHelper.trigger({application:v.OV.LIBRARY_REQUESTS,action:v.eX.LibraryRequests.PENDING_REQUESTS,args:[(null==l?void 0:l.id)||""],params:e.queryParams},{replace:!0})}var P=!!(F.hasCompleted&&R.data&&E.data&&q.data);return o().createElement(c.G,{title:A("title"),closePopup:e.closePopup,showLoadingSpinner:!P},P&&o().createElement(o().Fragment,null,o().createElement("p",null,o().createElement(l.x,{namespace:I,phrase:"confirmation",options:{videoName:R.data.object.name,libraryName:E.data.name,folderName:q.data.name}})),o().createElement(s.u,null,o().createElement(s.u.Cancel,{onClick:e.closePopup}),o().createElement(s.u.Submit,{onClick:function(){C(!0);var t={response:p.l.Approved,metadata:{destinationLibraryId:e.libraryId,destinationCategoryId:e.folderId}};S(f.y.fulfilRequest(e.libraryRequestId,t,k,(function(){return w.error(A("error"))}),e.closePopup))},text:A("approve"),showSpinner:i,variant:"dark"}))))}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6181],{59054:function(e,t,n){"use strict";var r;n.d(t,{f:function(){return r}}),function(e){e.Share="share",e.MasterObject="masterobject"}(r||(r={}))},79641:function(e,t,n){"use strict";n.r(t),n.d(t,{VideoDetailsView:function(){return Be}});var r,o=n(39479),i=n.n(o),s=n(31647);!function(e){e.AU="content-ap-southeast-1",e.NZ="content-ap-southeast-2",e.UK="content-eu-west-1",e.SCOT="content-eu-west-2",e.US="content-na-central-1",e.GLOBAL="content-global"}(r||(r={}));var l=n(8371),c=n(28099),a=n(70065),u=n(6681),f=n(56210),p=n(61843),d=n(66882),h={svgContainer:"qOHRG"},y=n(86745),m=n.n(y);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},b(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 g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function w(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(l,e);var t,n,r,i,s=(r=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=k(r);if(i){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return w(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),s.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"VideoHeaderComponent"}},{key:"template",get:function(){return m()}},{key:"className",get:function(){return"d-flex align-items-center justify-content-between px-3 pt-3 pb-2 w-100"}},{key:"behaviors",get:function(){return[{behaviorClass:f.H,selector:".".concat(h.svgContainer)}]}},{key:"regions",value:function(){return{actions:{el:".video-actions-region",replaceElement:!1}}}},{key:"viewOptions",value:function(){return{styles:h,lockSvg:u.Nj.getSvg(u.vn.Lock),hasRestriction:!o.isUndefined(this.model.get("restrictions")),restrictionMessage:p.S9.getRestrictionTooltipMessage(this.model)}}},{key:"onRender",value:function(){this.showChildView("actions",new d.R({model:this.model,showActionLabels:!0,application:c.OV.LIBRARY_EDITOR,customerHasLocalCache:this.options.customerHasLocalCache,customerHasExchange:this.options.customerHasExchange,collectionIdentifier:this.options.collectionIdentifier,routeToFolderOnDelete:!0,analyticsOptions:{entity:a.EntityType.Video,location:a.LocationContext.VideoDetailsHeader,descriptor:a.OperationDescriptor.Single},config:this.options.config}))}}])&&v(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(s.Q.Component),C=n(77605),E=n(89545),R=n(7427),S=n(9484),j=n(45837),P=n(44391),_=n(70042),V=n(26457),x=n(17349),I=n.n(x),T={interactive:"N1mrU"};function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(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 B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}function U(e,t){if(t&&("object"===L(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B(e,t)}(s,e);var t,n,r,o,i=(r=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=A(r);if(o){var n=A(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return U(this,e)});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:"initialize",value:function(){this.isClickViewContent=this.model&&!p.BK.canEditVideo(this.model)}},{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()}},{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:"requiredResources",get:function(){return{currentUser:S.K.currentUser}}},{key:"renderVideoPreview",value:function(){this.showChildView("preview",new E.c({model:this.model,webPlayerUrl:this.options.webPlayerUrl,channelName:this.options.channelName,analyticsOptions:{location:a.LocationContext.VideoDetails},currentUser:this.options.currentUser,createViewKey:this.options.createViewKey,playerApiUrl:this.options.playerApiUrl}))}},{key:"renderTags",value:function(){this.model.get("tags")&&this.model.get("tags").length&&this.showChildView("tags",new P.K({collection:this.model.get("tags"),orientation:V.zM.Flex,behavior:V.Dm.Link}))}},{key:"renderFolders",value:function(){this.model.get("categories")&&this.model.get("categories").length&&this.showChildView("folders",new R.V({model:this.model,libraries:this.options.libraries,showFolder:!0,hideLabel:!0}))}},{key:"viewOptions",value:function(){return{styles:T,interactive:_.u.isInteractive(this.model),duration:p.T.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&&p.BK.filterObjectsByOwnerType(this.model.tags,j.N.Customer,this.options.currentUser.get("customerId")).length}}},{key:"onRender",value:function(){this.renderVideoPreview(),this.renderTags(),this.renderFolders()}}])&&D(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(s.Q.Component),N=n(70693),H=n(68708),F=n(63122),K=n(57085),Q=n(23130),z=n(10386),Y=n.n(z),Z=n(90118),q=n.n(Z),X={columnNames:"Hs0Sh"};function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function J(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $(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,n){return t&&$(e.prototype,t),n&&$(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function ee(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&te(e,t)}function te(e,t){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},te(e,t)}function ne(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 Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=oe(e);if(t){var o=oe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return re(this,n)}}function re(e,t){if(t&&("object"===G(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function oe(e){return oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},oe(e)}var ie=function(e){ee(n,e);var t=ne(n);function n(){return J(this,n),t.apply(this,arguments)}return W(n,[{key:"name",get:function(){return"FieldComponent"}},{key:"template",get:function(){return Y()}},{key:"className",get:function(){return"row mb-0"}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{styles:X}}},{key:"renderDescription",value:function(){this.model.get("value")&&this.showChildView("description",new Q.Z({model:new s.Q.Model({description:this.model.get("value")}),linkify:!0,size:Q.t.Large,truncate:!0,allowExpand:!0}))}},{key:"onRender",value:function(){this.renderDescription()}}]),n}(s.Q.Component),se=function(e){ee(n,e);var t=ne(n);function n(){return J(this,n),t.apply(this,arguments)}return W(n,[{key:"name",get:function(){return"FieldsComponentCollection"}},{key:"childView",get:function(){return ie}}]),n}(s.Q.ComponentCollection),le=function(e){ee(n,e);var t=ne(n);function n(){return J(this,n),t.apply(this,arguments)}return W(n,[{key:"name",get:function(){return"FieldsComponent"}},{key:"template",get:function(){return q()}},{key:"className",get:function(){return"py-3 border-top"}},{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new se({collection:this.collection}))}}]),n}(s.Q.Component),ce=n(21251),ae=n(21679),ue=n(33800),fe=n(48404),pe=n(17422),de=n(75535),he=n(99748),ye=n(53854),me=n(95061),be=n(3059),ve=n(57857),ge=n(26835),we=n.n(ge),ke={licenseContainer:"eHMZ_",license:"I0iMx",era:"qgIXx"};function Oe(e){return Oe="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},Oe(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 Ee(e,t){return Ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ee(e,t)}function Re(e,t){if(t&&("object"===Oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Se(e){return Se=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Se(e)}var je=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ee(e,t)}(l,e);var t,n,o,i,s=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Se(o);if(i){var n=Se(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Re(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),s.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"ScreenrightsDisclaimerComponent"}},{key:"template",get:function(){return we()}},{key:"lang",get:function(){return"shared.screenrightsDisclaimer"}},{key:"className",get:function(){return"py-3 border-top"}},{key:"getLogoClass",value:function(){return p.mU.isInContentRegion(this.options.contentRegion,r.UK)?ke.era:""}},{key:"getLicenseText",value:function(){switch(this.options.contentRegion){case r.UK:return ve.T.getPhrase(this.lang,"era");case r.AU:return ve.T.getPhrase(this.lang,"copyrightAct");case r.NZ:default:return""}}},{key:"viewOptions",value:function(){var e=p.mU.isInContentRegion(this.options.contentRegion,r.AU);return{styles:ke,logoClass:this.getLogoClass(),labelText:e?ve.T.getPhrase(this.lang,"labelAu"):"",licenseText:this.getLicenseText()}}}])&&Ce(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(s.Q.Component),Pe=n(91865),_e=n.n(Pe),Ve=n(59054);function xe(e){return xe="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},xe(e)}function Ie(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){return Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Te(e,t)}function Le(e,t){if(t&&("object"===xe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function De(e){return De=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},De(e)}var Be=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Te(e,t)}(f,e);var t,n,o,a,u=(o=f,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=De(o);if(a){var n=De(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Le(this,e)});function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),u.call(this,e)}return t=f,n=[{key:"initialize",value:function(){this.bindListeners(),this.videoDataService=ae.u.getInstance(ue.O.Video,this),this.videoMixinService=ae.u.getInstance(ue.K.VideoMixin,this),this.localCacheDataService=ae.u.getInstance(ue.O.LocalCache,this),this.playerDataService=ae.u.getInstance(ue.O.Player,this),this.createViewKey=this.createViewKey.bind(this)}},{key:"bindListeners",value:function(){this.listenTo(c.Vk.VIDEO,"".concat(ce.M.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(c.Vk.VIDEO,"".concat(ce.M.VIDEOS,":").concat(this.options.videoId,":error"),this.onError),this.listenTo(c.Vk.VIDEO,"".concat(ce.M.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(c.Vk.VIDEO,"cache:cleared",this.render),this.listenTo(c.Vk.LIBRARY,"libraries:sync",this.render),this.listenTo(c.Vk.RESTRICTED_VIDEO,"".concat(ce.M.UPDATE_VIDEO_RESTRICTION,":sync"),this.updateRestriction),this.listenTo(c.Vk.RESTRICTED_VIDEO,"".concat(ce.M.RESTRICTED_OBJECTS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(c.Vk.LOCAL_CACHE,"".concat(ce.M.LOCAL_CACHE_DEVICES,":sync"),this.render),this.listenTo(c.Vk.LOCAL_CACHE,"".concat(ce.M.LOCAL_CACHE_DEVICES,":error"),this.onError)}},{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 _e()}},{key:"className",get:function(){return"container-fluid h-100 bg-white rounded"}},{key:"onError",value:function(e){switch(e.type){case he.h.NotFound:s.Q.ErrorHelper.throw(new de.l);break;case he.h.Forbidden:s.Q.ErrorHelper.throw(new ye.a)}}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1,partialLoading:pe.LP.Breadcrumbs},header:{replaceElement:!0,el:".video-header-region",partialLoading:pe.LP.VideoHeader},main:{replaceElement:!0,el:".main-video-information-region",partialLoading:pe.LP.VideoSidebarInfo},basic:{replaceElement:!1,el:".basic-video-information-region",partialLoading:pe.LP.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||p.mU.isInContentRegion(this.currentUser.get("contentRegion"),r.NZ)||(!this.video.get("channel")||!this.video.get("channel").get("id"))&&!this.video.get("dateBroadcast"))}},{key:"createViewKey",value:function(e,t){this.playerDataService.createViewKey(e,Ve.f.MasterObject,t)}},{key:"getCustomLibraryFolders",value:function(){var e;if(!(null===(e=this.video)||void 0===e?void 0:e.categories)||!this.libraries)return[];var t=this.libraries.reduce((function(e,t){return e[t.id]=!0,e}),{});return this.video.categories.filter((function(e){var n=e.libraries.first().get("id");return t[n]}))}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.video&&this.showChildView("breadcrumbs",new K.n({folder:this.folder,libraries:this.libraries,video:this.video,enableLastItemAppLink:!1}))}},{key:"renderVideoHeader",value:function(){this.showChildView("header",new O({model:this.video,customerHasLocalCache:p.o8.customerHasLocalCache(this.devices,this.currentUser.get("customerId")),customerHasExchange:this.exchanges.any(),collectionIdentifier:this.folder&&new be.F7(this.folder.id,p.x$.GetCurrentSortType()),config:this.config}))}},{key:"renderSidebarInfo",value:function(){this.showChildView("main",new M({model:this.video,webPlayerUrl:this.config.get("webPlayerUrl"),channelName:this.channelName,currentUser:this.currentUser,createViewKey:this.createViewKey,playerApiUrl:this.config.get("playerApiUrl"),libraries:this.libraries}))}},{key:"renderBasicInfo",value:function(){this.video&&this.showChildView("basic",new F.S({model:this.video,showHeading:!0,config:this.config,hideBroadcastInfo:this.currentUser.get("instanceRegion")===l.b.US}))}},{key:"renderFields",value:function(){this.video.fields&&this.video.fields.length&&this.currentUser.get("instanceRegion")!==l.b.US&&this.showChildView("fields",new le({collection:this.video.fields}))}},{key:"renderChapters",value:function(){var e=this.video.chapters;e&&e.length>0&&this.showChildView("chapters",new N.Q({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.c({model:this.video}))}},{key:"renderLinks",value:function(){var e=this.video.links;e&&e.length&&this.showChildView("links",new H.c({model:this.video,headingText:"Links"}))}},{key:"renderScreenrightsDisclaimer",value:function(){this.showLicense()&&this.showChildView("screenrightsDisclaimer",new je({contentRegion:this.currentUser.get("contentRegion")}))}},{key:"requiredResources",get:function(){return{config:fe.p.config,currentUser:S.K.currentUser,libraries:me.T.libraries,exchanges:me.T.exchanges}}},{key:"onBeforeRender",value:function(){return this.video=this.videoDataService.getVideo(this.options.videoId),this.video&&(this.folder=i().first(this.getCustomLibraryFolders())),this.devices=this.localCacheDataService.getDevices(this.currentUser.get("customerId")),!!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()}}],n&&Ie(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(s.Q.View)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return S}});var r=n(31647),o=n(93933),i=n.n(o),s=n(86363),l=n.n(s);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function a(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),Object.defineProperty(e,"prototype",{writable:!1}),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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var b=function(e){p(n,e);var t=h(n);function n(){return a(this,n),t.apply(this,arguments)}return f(n,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return l()}},{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")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}]),n}(r.Q.Component),v=function(e){p(n,e);var t=h(n);function n(){return a(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 b}}]),n}(r.Q.ComponentCollection),g=n(22557),w=n(28099);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},k(e)}function O(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 C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}function E(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(c,e);var t,n,o,s,l=(o=c,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=R(o);if(s){var n=R(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return E(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),l.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return i()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var e=this;this.breadcrumbCollection=new r.Q.Collection([]);var t,n=this.options.folder;do{if(!n)break;if(t=g.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!t),{at:0}),!t)break;n=t}while(t);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:w.OV.LIBRARY_EDITOR,action:w.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(t){return e.breadcrumbCollection.add(t)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?w.eX.LibraryEditor.FOLDER:w.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:w.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new v({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&O(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.Q.Component)},86745:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,s=e.lambda,l=e.escapeExpression;return' <span class="d-inline-block ml-2 '+l(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'" title="'+l(s(null!=(i=null!=t?t.options:t)?i.restrictionMessage:i,t))+'">'+(null!=(i=s(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,s,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(s=null!=(s=n.name||(null!=t?t.name:t))?s:e.hooks.helperMissing)?s.call(l,{name:"name",hash:{},data:o}):s)+"</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})},17349:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,s=e.escapeExpression;return' <span class="badge p-1 '+s(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.interactive:i,t))+'">'+s((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;return e.propertyIsEnumerable,' <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){return e.propertyIsEnumerable,' <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,s=e.escapeExpression;return' <div class="mt-3">\r\n <h5>'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"curriculumLinks",{name:"lang",hash:{},data:o}))+"</h5>\r\n <p>"+s(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,s=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(s,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(s,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(s,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(s,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})},91865:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return' <div class="fields-region"></div>\r\n'},3:function(e,t,n,r,o){return' <div class="video-chapters-region"></div>\r\n'},5:function(e,t,n,r,o){return' <div class="video-resources-region"></div>\r\n'},7:function(e,t,n,r,o){return' <div class="video-links-region"></div>\r\n'},9: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,s=null!=t?t:e.nullContext||{};return'<div class="row border-bottom">\r\n <div class="video-header-region"></div>\r\n\r\n <div class="px-3 pb-3">\r\n <div class="breadcrumbs-region"></div>\r\n </div>\r\n</div>\r\n\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(s,null!=(i=null!=t?t.options:t)?i.hasFields:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.hasChapters:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.hasResources:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.hasLinks:i,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.showScreenrightsDisclaimer:i,{name:"if",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o}))?i:"")+" </div>\r\n</div>"},useData:!0})},86363:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<span class="font-weight-bolder">'+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"},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<a>"+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;return e.propertyIsEnumerable,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})},93933:function(e,t,n){var r=n(32227);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})},10386:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,s,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(s=null!=(s=n.name||(null!=t?t.name:t))?s:e.hooks.helperMissing)?s.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:o}):s)+'</div>\r\n<div class="col-9">\r\n <div class="description-region"></div>\r\n</div>'},useData:!0})},90118:function(e,t,n){var r=n(32227);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})},26835:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,s=e.lambda,l=e.escapeExpression;return'<div class="d-inline-block '+l(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.licenseContainer:i,t))+'">\r\n <div class="'+l(s(null!=(i=null!=t?t.options:t)?i.logoClass:i,t))+'">'+l(s(null!=(i=null!=t?t.options:t)?i.labelText:i,t))+'</div>\r\n <p class="'+l(s(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=s(null!=(i=null!=t?t.options:t)?i.licenseText:i,t))?i:"")+"\r\n </p>\r\n</div>"},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6220],{26328:function(e,t,i){"use strict";i.r(t),i.d(t,{AwaitingReviewView:function(){return N}});var n=i(39479),r=i(31647),o=i(21679),a=i(57857),s=i(36357),c=i(28099),l=i(70763),u=i(71192),d=i(17422),h=i(14129),f=i(39090),v=i(82405),p=i(13809),g=i(48404),y=i(9484),w=i(46415),b=i(7572),m=i(71010),S=i.n(m),V=i(29565),k=i(95061);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},C(e)}function T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function _(e,t){if(t&&("object"===C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(U,e);var t,i,m,C,N=(m=U,C=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=R(m);if(C){var i=R(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return _(this,e)});function U(){return T(this,U),N.apply(this,arguments)}return t=U,(i=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=o.u.getInstance(c.Or.Settings,this),this.contentUpdatesDataService=o.u.getInstance(c.Or.ContentUpdates,this),this.videoDataService=o.u.getInstance(c.Or.Video,this)}},{key:"name",get:function(){return"AwaitingReviewView"}},{key:"title",get:function(){return a.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.awaitingReview"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white rounded"}},{key:"template",get:function(){return S()}},{key:"regions",value:function(){return{header:{el:".header-region",replaceElement:!0},leftNav:{el:".left-nav-region",replaceElement:!0},listHeader:{el:".list-header-region",replaceElement:!0,partialLoading:d.LP.AwaitingReviewHeader},videos:{el:".video-list-region",replaceElement:!0,partialLoading:d.LP.VideoGroupList}}}},{key:"bindListeners",value:function(){this.listenTo(c.Vk.SETTINGS,"".concat(c.M_.CUSTOMER_SETTINGS,":sync ").concat(c.M_.USER_SETTINGS,":sync"),this.render),this.listenTo(c.Vk.CONTENT_UPDATES,"".concat(c.M_.VIDEOS_TO_REVIEW,":sync"),this.render),this.listenTo(c.Vk.RESTRICTED_VIDEO,"".concat(c.M_.VIDEOS_TO_REVIEW,":invalidate"),this.fetchVideos),this.listenTo(this.channelName,"approve:all",this.approveAllVideos),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata)}},{key:"approveAllVideos",value:function(){this.contentUpdatesDataService.approveAllVideos(n.bind(this.fetchVideos,this))}},{key:"redirectToPastReleases",value:function(){r.Q.AppLinkHelper.trigger({application:c.OV.CONTENT_UPDATES,action:c.eX.ContentUpdates.PAST_RELEASES},{replace:!0})}},{key:"getContentClassName",value:function(){var e="".concat(V.Z.content," border-left ").concat(V.Z.contentWithLeftNav);return this.videoCollection&&!this.videoCollection.length?e+=" d-inline-flex justify-content-center align-items-center":e+=" d-inline-block",e}},{key:"setVideosWithMetadata",value:function(){this.videoCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new l.t(this.videoCollection.map((function(e){return new u.n({id:e.get("id")})}))))}},{key:"renderHeader",value:function(){this.reviewSetting?this.showChildView("header",new b.u({activeTab:f.JI.AwaitingReview,reviewEnabled:this.reviewSetting.get("value")})):this.renderPartialLoading("header")}},{key:"renderLeftNav",value:function(){this.reviewSetting&&this.showChildView("leftNav",new w.m({supportSiteUrl:this.config.get("supportSiteUrl"),currentUser:this.currentUser}))}},{key:"renderListHeader",value:function(){this.videoCollection?this.videoCollection.length&&this.showChildView("listHeader",new h.U({collection:this.videoCollection,channelName:this.channelName})):this.renderPartialLoading("listHeader")}},{key:"renderVideos",value:function(){this.groupedVideoCollection?this.showChildView("videos",new v.D({collection:this.groupedVideoCollection,childOptions:{videoItemComponentType:p.UC.AwaitingReview,videosWithMetadata:this.videosWithMetadata,config:this.config,collectionViewChannel:this.channelName,currentUser:this.currentUser,libraries:this.libraries},emptyStateType:d.ub.AwaitingReview,emptyStateOptions:{heading:a.T.getPhrase(this.lang,"emptyStateHeading"),description:a.T.getPhrase(this.lang,"emptyStateDescription",{classNames:"disable-review info-link"})}})):this.renderPartialLoading("videos")}},{key:"fetchVideos",value:function(){this.videoCollection=this.contentUpdatesDataService.getVideosToReview(),this.videoCollection&&(this.setVideosWithMetadata(),this.groupedVideoCollection=f.hp.groupVideosByHostedLibrary(this.videoCollection))}},{key:"fetchVideoWithMetadata",value:function(e){var t=this;this.videoDataService.getVideo(e,(function(i){var n=t.videosWithMetadata.get(e);n&&(n.set(i.toJSON()),n.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:g.p.config,currentUser:y.K.currentUser,libraries:k.T.libraries}}},{key:"onBeforeRender",value:function(){this.reviewSetting=this.settingsDataService.getSetting(this.currentUser.get("customerId"),s.E.LibraryReview),this.fetchVideos(),this.reviewSetting&&!this.reviewSetting.get("value")&&this.redirectToPastReleases()}},{key:"viewOptions",value:function(){return{contentClass:this.getContentClassName()}}},{key:"onRender",value:function(){this.renderHeader(),this.renderLeftNav(),this.renderListHeader(),this.renderVideos()}}])&&E(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),U}(r.Q.View)},13809:function(e,t,i){"use strict";i.d(t,{UC:function(){return n.U}});var n=i(58688);i(86605),i(14898)},71010:function(e,t,i){var n=i(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){var o;return e.propertyIsEnumerable,'<div class="header-region"></div>\r\n<div class="left-nav-region"></div><div class="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.contentClass:o,t))+'">\r\n<div class="list-header-region"></div>\r\n<div class="video-list-region"></div>\r\n</div>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6420],{96417:function(e,t,n){"use strict";n.d(t,{s:function(){return i},p:function(){return s}});var r=n(57857),o="staffRequests.utils",i={destinationLibrary:function(e){if(!e||!e.id)return r.T.getPhrase(o,"selectLibrary")},destinationFolder:function(e){if(!e||!e.id)return r.T.getPhrase(o,"selectFolder")}},s={message:[{required:!0,msg:function(){return r.T.getPhrase("staffRequests.utils","provideMessage")}}]}},36420:function(e,t,n){"use strict";n.r(t),n.d(t,{RejectStaffRequestView:function(){return T}});var r=n(48088),o=n(31647),i=n(99249),s=n(21679),a=n(70065),u=n(52076),l=n(10101),c=n(88172),f=n(67670),p=n(28099),d=n(61843),h=n(57857),y=n(96417),b=n(44275),m=n.n(b);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},v(e)}function g(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?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function S(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}var T=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}(O,e);var t,n,b,v,T=(b=O,v=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=k(b);if(v){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return S(this,e)});function O(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,O),T.call(this,e)}return t=O,(n=[{key:"initialize",value:function(){this.staffRequestDataService=s.u.getInstance(p.Or.StaffRequests,this),this.getViewModel(),this.bindListeners()}},{key:"name",get:function(){return"RejectStaffRequestView"}},{key:"title",get:function(){return h.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"staffRequests.rejectStaffRequest"}},{key:"template",get:function(){return m()}},{key:"tagName",get:function(){return"form"}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.requestId)}},{key:"channelName",get:function(){return d.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:l.Yw,title:h.T.getPhrase(this.lang,"rejectCheck"),size:"modal-md",spinnerButtonOptions:{model:this.spinnerModel=new f.v,channelName:this.channelName,buttonText:h.T.getPhrase(this.lang,"reject"),extraButtonClass:"btn-danger",onClick:function(t){return e.onSubmit(t)},tooltip:function(){return e.getBtnTooltipOptions()}}},{behaviorClass:l.Bp,bindViewModel:!0}]}},{key:"bindings",get:function(){return{"[name=message]":{observe:"message",setOptions:{validate:!0}}}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"bindListeners",value:function(){var e="".concat(p.M_.STAFF_REQUEST_BY_ID,":").concat(this.options.requestId);this.listenTo(p.Vk.STAFF_REQUEST,"".concat(e,":sync"),this.render),this.listenTo(p.Vk.STAFF_REQUEST,"".concat(e,":error"),this.redirectToHome);var t="".concat(p.M_.STAFF_REQUESTS,":").concat(this.options.requestId,":update");this.listenTo(p.Vk.STAFF_REQUEST,"".concat(t,":sync"),this.redirectToHome),this.listenTo(p.Vk.STAFF_REQUEST,"".concat(t,":error"),this.redirectToHome),this.listenTo(this.viewModel,"change",this.onChange)}},{key:"getViewModel",value:function(){this.viewModel=i.r.get(this.viewModelName),this.viewModel.addValidation(y.p)}},{key:"getBtnTooltipOptions",value:function(){if(!this.viewModel.isValid())return{title:h.T.getPhrase(this.lang,"provideMessage")}}},{key:"onChange",value:function(){this.spinnerModel.set(c.ZV.Disabled,!1===this.viewModel.isValid())}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(r.Radio.channel(this.channelName).trigger(c.I3.ShowSpinner),this.staffRequestDataService.rejectStaffRequest(this.options.requestId,this.viewModel.get("message")),this.logAction())}},{key:"logAction",value:function(){var e={location:a.LocationContext.Popup,actionType:a.UserAction.Reject,entity:a.EntityType.StaffRequest,workflowPhase:a.WorkflowPhase.Complete},t={id:this.options.requestId,videoId:this.model.get("video")&&this.model.get("video").id,requestingUserId:this.model.get("user")&&this.model.get("user").id,sourceLibraryId:this.model.get("sourceLibrary")&&this.model.get("sourceLibrary").id,sourceFolderId:this.model.get("sourceFolder")&&this.model.get("sourceFolder").id};u.k.logUserAction(t,e)}},{key:"redirectToHome",value:function(){o.Q.AppLinkHelper.trigger({application:p.OV.STAFF_REQUESTS,action:p.eX.StaffRequests.HOME})}},{key:"onBeforeRender",value:function(){this.model=this.staffRequestDataService.getStaffRequest(this.options.requestId)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model,spinnerEl:d.Kp.getSpinner({size:d.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){r.Validation.bind(this,{model:this.viewModel})}}])&&g(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),O}(o.Q.View)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function s(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(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 l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var p=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(d,e);var t,n,r,i,p=(r=d,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(r);if(i){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return c(this,e)});function d(){return a(this,d),p.apply(this,arguments)}return t=d,(n=[{key:"defaults",value:function(){var e;return s(e={},o.ZV.Disabled,!0),s(e,o.ZV.Hidden,!1),e}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(r.Q.Model)},44275:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,s=e.escapeExpression,a=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return"<p><strong>"+s(e.lambda(null!=(i=null!=t?t.video:t)?i.name:i,t))+"</strong> "+s((n.lang||t&&t.lang||u).call(a,"notAddedToLibrary",{name:"lang",hash:{},data:o}))+'</p>\r\n<div class="form-group">\r\n <label for="message">'+s((n.lang||t&&t.lang||u).call(a,"provideMessageForUser",{name:"lang",hash:{lastName:null!=(i=null!=t?t.user:t)?i.surname:i,firstName:null!=(i=null!=t?t.user:t)?i.username:i},data:o}))+'</label>\r\n <textarea class="form-control" id="message" name="message" autofocus></textarea>\r\n <div class="form-feedback"></div>\r\n</div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[693],{45114:function(e,t,n){"use strict";n.d(t,{L:function(){return g}});var o=n(48088),i=n(31647),r=n(99249),a=n(6681),l=n(10101),s=n(61843),c=n(61596),u=n(40622),p=n(89039),d=n.n(p);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},h(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(g,e);var t,n,i,p,h=(i=g,p=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(i);if(p){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),h.call(this,e)}return t=g,(n=[{key:"initialize",value:function(){this.options.playerViewModelKey&&this.listenToPlayerViewModel(),this.initViewModel(),this.options.editing&&this.syncTime()}},{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 d()}},{key:"className",get:function(){return this.options.creating?"py-3":"border-top p-2"}},{key:"behaviors",get:function(){return[{behaviorClass:l.fS,bindViewModel:!0},{behaviorClass:l.Bp,bindViewModel:!0}]}},{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:"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}}}}},{key:"initViewModel",value:function(){this.viewModel=r.r.get(this.viewModelName,this.model.toJSON())}},{key:"listenToPlayerViewModel",value:function(){var e=r.r.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.X4.getHoursComponent(e),minutes:s.X4.getMinutesComponent(e),seconds:s.X4.getSecondsComponent(e)})}},{key:"getNewTime",value:function(){return this.enabled()?s.X4.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.X4.millisecondsToSeconds(this.options.duration),t=s.X4.getHoursComponent(e),n=t>0?59:s.X4.getMinutesComponent(e);return{maxHr:t,maxMin:n,maxSec:n>0?59:s.X4.getSecondsComponent(e)}}},{key:"onTimeInputUpdate",value:function(){o.Radio.channel(this.options.channelName).trigger(u.LibraryEditorActions.UpdateChapterTime,this.getNewTime()),this.validateStartTime()}},{key:"destroyView",value:function(){o.Radio.channel(this.options.channelName).trigger(u.LibraryEditorActions.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=o.Radio.channel(this.options.channelName),i=u.LibraryEditorActions.CreateChapter;this.options.editing&&(i=u.LibraryEditorActions.UpdateChapter),n.trigger(i,t),this.stopListening(this.viewModel),r.r.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=o.Validation.callbacks,n=t.valid,i=t.invalid,r=this.model.collection||this.options.collection,a=this.getNewTime(),l=c.$.isValidChapterTime(this.model,a,this.options.duration,r),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 i(e,t,l,null)})),!l}},{key:"validateName",value:function(e){if(!e||13!==e.keyCode){var t=o.Validation.callbacks,n=t.valid,i=t.invalid,r=this.model.collection||this.options.collection,a=c.$.isValidChapterName(this.model,this.viewModel.get("name"),r);return a?i(this,"name",a,null):n(this,"name",null),!a}}},{key:"viewOptions",value:function(){var e=this.maxTimes(),t=e.maxHr,n=e.maxMin,o=0===e.maxSec,i=0===n,r=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.Nj.getSvg(a.vn.Plus),secDisabled:o,minDisabled:i,hrDisabled:r})}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),g}(i.Q.Component)},70693:function(e,t,n){"use strict";n.d(t,{Q:function(){return M}});var o=n(31647),i=n(48088),r=n(6681),a=n(56210),l=n(61843),s=n(45114),c=n(40622),u=n(95637),p=n.n(u),d={darkBackground:"Ubazj",loading:"rOhrX",svgContainer:"SiNm3",chapterItem:"MOpQI"};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},h(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function y(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(g,e);var t,n,o,u,h=(o=g,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=b(o);if(u){var n=b(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),h.call(this,e)}return t=g,(n=[{key:"initialize",value:function(){this.bindListeners()}},{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 p()}},{key:"className",get:function(){return"chapter ".concat(d.chapterItem)}},{key:"behaviors",get:function(){return[{behaviorClass:a.H,selector:".action"}]}},{key:"regions",value:function(){return{editForm:{replaceElement:!1,el:".edit-form-region"}}}},{key:"elements",get:function(){return{chapterItem:".chapter-item",editChapter:".edit-chapter",deleteChapter:".delete-chapter"}}},{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.LibraryEditorActions.CancelChapterEdit,this.onCancelEdit),this.listenTo(this.instanceChannelName,c.LibraryEditorActions.UpdateChapter,this.onUpdateChapter),this.listenTo(this.instanceChannelName,c.LibraryEditorActions.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=i.Radio.channel(this.options.channelName);this.model.get("isPhysicalChapter")?e.trigger(c.LibraryEditorActions.SeekToChapter,this.model.get("index")):e.trigger(c.LibraryEditorActions.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(d.darkBackground)}},{key:"hideEditView",value:function(){this.model.set("showEditor",!1,{silent:!0}),this.getUI("chapterItem").removeClass(d.darkBackground),this.detachChildView("editForm")}},{key:"onCancelEdit",value:function(){this.hideEditView()}},{key:"onDeleteChapter",value:function(){this.model.get("loading")||i.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.DeleteChapter,this.model)}},{key:"onUpdateChapter",value:function(e){i.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.UpdateChapter,e),this.render()}},{key:"onUpdateChapterTime",value:function(e){i.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.UpdateChapterTime,e)}},{key:"onEditChapter",value:function(){i.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.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.X4.trimToMinutes(l.X4.secondsToHoursFormatted(this.model.get("startTime")));return Object.assign(Object.assign({},this.options),{styles:d,time:t,index:e,loading:this.model.get("loading"),allowDelete:this.canDelete(e),editSvg:r.Nj.getSvg(r.vn.Edit),deleteSvg:r.Nj.getSvg(r.vn.Delete)})}},{key:"renderEditForm",value:function(){this.showChildView("editForm",new s.L({model:this.model,editing:!0,channelName:this.instanceChannelName,duration:this.options.duration}))}},{key:"onBeforeDetach",value:function(){$(".tooltip").remove()}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),g}(o.Q.Component);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},v(e)}function w(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}function C(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=E(o);if(i){var n=E(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return C(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){this.bindEditorListeners()}},{key:"name",get:function(){return"ChapterComponentCollection"}},{key:"className",get:function(){return"chapters"}},{key:"childView",get:function(){return g}},{key:"bindEditorListeners",value:function(){this.options.editable&&this.listenTo(this.options.channelName,c.LibraryEditorActions.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:"childViewOptions",get:function(){return{showActions:this.options.showActions,duration:this.options.duration,channelName:this.options.channelName}}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Q.ComponentCollection),T=n(46055),j=n.n(T);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},S(e)}function x(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}function N(e,t){if(t&&("object"===S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_(o);if(i){var n=_(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return N(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"ChaptersComponent"}},{key:"template",get:function(){return j()}},{key:"lang",get:function(){return"libraryEditor.chapters"}},{key:"className",get:function(){return"chapters ".concat(!this.options.editable&&"py-3 border-top")}},{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 O({collection:this.collection,duration:this.options.duration,channelName:this.options.channelName,showActions:this.options.showActions,editable:this.options.editable}))}}])&&x(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(o.Q.Component)},89039:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,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!=(r=null!=t?t.options:t)?r.timeId:r,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"startTimeLabel",{name:"lang",hash:{},data:i}))+'</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:i}))+'"\r\n name="hours"\r\n autocomplete="off"\r\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.hrDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'> <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:i}))+'"\r\n name="minutes"\r\n autocomplete="off"\r\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.minDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'> <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:i}))+'"\r\n name="seconds"\r\n id="'+l(a(null!=(r=null!=t?t.options:t)?r.timeId:r,t))+'"\r\n autocomplete="off"\r\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.secDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},2:function(e,t,n,o,i){return"disabled"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <button type="submit" class="btn btn-dark ml-2">\r\n <span class="d-inline-block align-middle svg-container">'+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.plusSvg:r,t))?r:"")+'</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:i}))+"</span>\r\n </button>\r\n"},6:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return' <button type="submit" class="btn btn-dark ml-2">'+l((n.lang||t&&t.lang||a).call(r,"save",{name:"lang",hash:{},data:i}))+'</button>\r\n <button type="button" class="btn btn-secondary cancel ml-2">'+l((n.lang||t&&t.lang||a).call(r,"cancel",{name:"lang",hash:{},data:i}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,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!=(r=null!=t?t.options:t)?r.chapterId:r,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"nameLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n <input type="text" class="form-control chapter-name" name="name" id="'+l(a(null!=(r=null!=t?t.options:t)?r.chapterId:r,t))+'" placeholder="'+l((n.lang||t&&t.lang||c).call(s,"namePlaceholder",{name:"lang",hash:{},data:i}))+'" autofocus autocomplete="off">\r\n <div class="form-feedback"></div>\r\n </div>\r\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.enabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\r\n\r\n<div class="row">\r\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.creating:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+"\r\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.editing:r,{name:"if",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},useData:!0})},95637:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.loading:r,t))},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,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!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,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:i}))+'">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.editSvg:r,t))?r:"")+"</a>\r\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.allowDelete:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+" </div>\r\n"},4:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression;return' <a class="action delete-chapter my-2 svg-container '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,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:i}))+'">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.deleteSvg:r,t))?r:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,l=null!=t?t:e.nullContext||{},s=e.lambda,c=e.escapeExpression;return'<div class="row mx-0 border-top chapter-item '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.loading:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickable-seek col-1">\r\n <p class="m-0 py-2">'+c(s(null!=(r=null!=t?t.options:t)?r.index:r,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:i}):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!=(r=null!=t?t.options:t)?r.time:r,t))+"</p>\r\n </div>\r\n"+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.showActions:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\r\n<div class="edit-form-region"></div>\r\n'},useData:!0})},46055:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return"<h5>"+l((n.lang||t&&t.lang||a).call(r,"chapters",{name:"lang",hash:{},data:i}))+'</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(r,"nameLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n </div>\r\n <div class="col-3 text-right">\r\n <label>'+l((n.lang||t&&t.lang||a).call(r,"startLabel",{name:"lang",hash:{},data:i}))+'</>\r\n </div>\r\n</div>\r\n<div class="chapter-list-region"></div>'},useData:!0})}}]);