@clickview/library-editor 1.16.1-dev.1 → 1.16.1-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{969-library-editor-c6e04e5107.chunk.css → 4274-library-editor-2e7ad56bc8.chunk.css} +9 -1
  3. package/dist/css/{58-library-editor-6b4606a972.chunk.css → 6833-library-editor-cf78223244.chunk.css} +10 -1
  4. package/dist/css/{library-editor-app-0f73fdab81.css → library-editor-app-bb91d6169b.css} +1 -1
  5. package/dist/languages/en.json +1 -1
  6. package/dist/scripts/101-882794aeb8.chunk.js +1 -0
  7. package/dist/scripts/1010-deb50c7ea4.chunk.js +1 -0
  8. package/dist/scripts/1086-c589e7a188.chunk.js +1 -0
  9. package/dist/scripts/1203-81d0661e18.chunk.js +1 -0
  10. package/dist/scripts/1216-7f24ede8e0.chunk.js +1 -0
  11. package/dist/scripts/1269-0663125949.chunk.js +1 -0
  12. package/dist/scripts/1364-3cdf7e5e62.chunk.js +1 -0
  13. package/dist/scripts/1409-061e3f9029.chunk.js +1 -0
  14. package/dist/scripts/1492-e352aa8d88.chunk.js +1 -0
  15. package/dist/scripts/1601-1ef0e562fc.chunk.js +2 -0
  16. package/dist/scripts/1671-f88be3329a.chunk.js +1 -0
  17. package/dist/scripts/1832-4939bef81a.chunk.js +1 -0
  18. package/dist/scripts/1887-10d9bb03cb.chunk.js +1 -0
  19. package/dist/scripts/1911-23568f6138.chunk.js +1 -0
  20. package/dist/scripts/2227-af3bb5232c.chunk.js +2 -0
  21. package/dist/scripts/243-7bb390ea4d.chunk.js +1 -0
  22. package/dist/scripts/259-fdac3828c2.chunk.js +1 -0
  23. package/dist/scripts/2692-a74b07a169.chunk.js +1 -0
  24. package/dist/scripts/{2802-2218d4b4bb.chunk.js → 2802-af98ef08cd.chunk.js} +1 -1
  25. package/dist/scripts/2803-29511f028a.chunk.js +1 -0
  26. package/dist/scripts/2888-eec152c5f5.chunk.js +1 -0
  27. package/dist/scripts/299-e581e06f46.chunk.js +1 -0
  28. package/dist/scripts/3096-3b816591ce.chunk.js +1 -0
  29. package/dist/scripts/3400-d4b59083ef.chunk.js +1 -0
  30. package/dist/scripts/3639-63ad27fb38.chunk.js +1 -0
  31. package/dist/scripts/3746-1f13b0764f.chunk.js +1 -0
  32. package/dist/scripts/3763-f486c7b891.chunk.js +1 -0
  33. package/dist/scripts/4000-9ac17853ea.chunk.js +1 -0
  34. package/dist/scripts/4177-d135a23ab6.chunk.js +1 -0
  35. package/dist/scripts/4201-84129dfc88.chunk.js +1 -0
  36. package/dist/scripts/4245-a95daa8056.chunk.js +1 -0
  37. package/dist/scripts/4274-3eb2257694.chunk.js +1 -0
  38. package/dist/scripts/4591-706f7173dd.chunk.js +1 -0
  39. package/dist/scripts/4830-a10093b5d2.chunk.js +1 -0
  40. package/dist/scripts/4860-f9a7be96c8.chunk.js +1 -0
  41. package/dist/scripts/4885-7c1d78dd3d.chunk.js +1 -0
  42. package/dist/scripts/4993-1e2baa25b7.chunk.js +1 -0
  43. package/dist/scripts/514-520d9e5687.chunk.js +1 -0
  44. package/dist/scripts/{5173-088a10449c.chunk.js → 5173-02a0713c0b.chunk.js} +1 -1
  45. package/dist/scripts/5235-d8a1857ab9.chunk.js +1 -0
  46. package/dist/scripts/5412-3b77eef79d.chunk.js +1 -0
  47. package/dist/scripts/5418-8318e5971b.chunk.js +1 -0
  48. package/dist/scripts/5424-164897f2cf.chunk.js +1 -0
  49. package/dist/scripts/546-7f77850497.chunk.js +1 -0
  50. package/dist/scripts/5747-c7570a4dee.chunk.js +1 -0
  51. package/dist/scripts/{5891-12bda30b4c.chunk.js → 5891-784e65ff2e.chunk.js} +1 -1
  52. package/dist/scripts/6093-e000b9f0a3.chunk.js +1 -0
  53. package/dist/scripts/6220-3273db4569.chunk.js +1 -0
  54. package/dist/scripts/6357-d37e948f5e.chunk.js +1 -0
  55. package/dist/scripts/6505-8ae1da1dfa.chunk.js +1 -0
  56. package/dist/scripts/6732-73f12b3316.chunk.js +1 -0
  57. package/dist/scripts/6756-73653a9e01.chunk.js +1 -0
  58. package/dist/scripts/6774-3b27ee5b7d.chunk.js +1 -0
  59. package/dist/scripts/6788-d25db35e6c.chunk.js +1 -0
  60. package/dist/scripts/6833-36be90324c.chunk.js +1 -0
  61. package/dist/scripts/{6963-473a09e985.chunk.js → 6963-222d163a4b.chunk.js} +1 -1
  62. package/dist/scripts/6995-6be8d799d2.chunk.js +1 -0
  63. package/dist/scripts/6999-9284afd732.chunk.js +1 -0
  64. package/dist/scripts/7002-baa9e9e285.chunk.js +1 -0
  65. package/dist/scripts/7053-cce5055ceb.chunk.js +1 -0
  66. package/dist/scripts/708-44fa959bcc.chunk.js +1 -0
  67. package/dist/scripts/{7190-3632c1b97b.chunk.js → 7190-aa3f4b4ba1.chunk.js} +1 -1
  68. package/dist/scripts/7376-e3e7d54126.chunk.js +1 -0
  69. package/dist/scripts/755-03d4567c99.chunk.js +1 -0
  70. package/dist/scripts/7634-bcbee3cbfc.chunk.js +1 -0
  71. package/dist/scripts/8362-ccb5f61d03.chunk.js +1 -0
  72. package/dist/scripts/8727-86d52bc39b.chunk.js +1 -0
  73. package/dist/scripts/8762-ab438942a2.chunk.js +1 -0
  74. package/dist/scripts/8906-e6be28b199.chunk.js +1 -0
  75. package/dist/scripts/8947-50189acd36.chunk.js +1 -0
  76. package/dist/scripts/9357-cac07c3362.chunk.js +1 -0
  77. package/dist/scripts/{9379-12465b685a.chunk.js → 9379-dc10121a03.chunk.js} +1 -1
  78. package/dist/scripts/9695-b789b2a9be.chunk.js +1 -0
  79. package/dist/scripts/9927-773e307959.chunk.js +1 -0
  80. package/dist/scripts/9976-aa31d18e61.chunk.js +1 -0
  81. package/dist/scripts/bundle-eb490e61aa.min.js +2 -0
  82. package/package.json +2 -2
  83. package/dist/scripts/101-d96e2f6c30.chunk.js +0 -1
  84. package/dist/scripts/1010-9322c39308.chunk.js +0 -1
  85. package/dist/scripts/1086-65173e4f6f.chunk.js +0 -1
  86. package/dist/scripts/1203-50f5844bcc.chunk.js +0 -1
  87. package/dist/scripts/1216-7a9f411abd.chunk.js +0 -1
  88. package/dist/scripts/1269-391b95a348.chunk.js +0 -1
  89. package/dist/scripts/1364-2540e700a9.chunk.js +0 -1
  90. package/dist/scripts/1409-9ca416a3a6.chunk.js +0 -1
  91. package/dist/scripts/1601-4fee3d2336.chunk.js +0 -2
  92. package/dist/scripts/1832-84b066cd22.chunk.js +0 -1
  93. package/dist/scripts/1887-59656a5c74.chunk.js +0 -1
  94. package/dist/scripts/1911-fb86f6cf48.chunk.js +0 -1
  95. package/dist/scripts/2227-2504e75ca4.chunk.js +0 -2
  96. package/dist/scripts/243-6b31d75a3e.chunk.js +0 -1
  97. package/dist/scripts/259-14636ed69c.chunk.js +0 -1
  98. package/dist/scripts/2692-2bd19c2b39.chunk.js +0 -1
  99. package/dist/scripts/2803-c102b0ab98.chunk.js +0 -1
  100. package/dist/scripts/2888-7a0e8d2574.chunk.js +0 -1
  101. package/dist/scripts/299-529b3d1c71.chunk.js +0 -1
  102. package/dist/scripts/3096-3ca8e8973f.chunk.js +0 -1
  103. package/dist/scripts/3400-181a33c06f.chunk.js +0 -1
  104. package/dist/scripts/3639-69c8ac5224.chunk.js +0 -1
  105. package/dist/scripts/3746-5e91d1f43b.chunk.js +0 -1
  106. package/dist/scripts/3763-99ac8ff777.chunk.js +0 -1
  107. package/dist/scripts/4000-a623369bef.chunk.js +0 -1
  108. package/dist/scripts/4177-719ae5d83e.chunk.js +0 -1
  109. package/dist/scripts/4201-8af865508e.chunk.js +0 -1
  110. package/dist/scripts/4245-1eba9c3cf2.chunk.js +0 -1
  111. package/dist/scripts/4353-ec529c5ba1.chunk.js +0 -1
  112. package/dist/scripts/4591-c6ba353e39.chunk.js +0 -1
  113. package/dist/scripts/4830-e87392f843.chunk.js +0 -1
  114. package/dist/scripts/4860-3da347c5a2.chunk.js +0 -1
  115. package/dist/scripts/4885-cc2e3d4f81.chunk.js +0 -1
  116. package/dist/scripts/514-bea172c18c.chunk.js +0 -1
  117. package/dist/scripts/5235-b6c96f2729.chunk.js +0 -1
  118. package/dist/scripts/5412-273d33a674.chunk.js +0 -1
  119. package/dist/scripts/5418-32716c915a.chunk.js +0 -1
  120. package/dist/scripts/5424-208acbb259.chunk.js +0 -1
  121. package/dist/scripts/546-a82365178d.chunk.js +0 -1
  122. package/dist/scripts/5747-fea829f6ed.chunk.js +0 -1
  123. package/dist/scripts/58-69552d3a8a.chunk.js +0 -1
  124. package/dist/scripts/6093-8b76178c29.chunk.js +0 -1
  125. package/dist/scripts/6220-36949a4ae4.chunk.js +0 -1
  126. package/dist/scripts/6732-fdb443a7b2.chunk.js +0 -1
  127. package/dist/scripts/6774-1322f42232.chunk.js +0 -1
  128. package/dist/scripts/6788-3450bef42f.chunk.js +0 -1
  129. package/dist/scripts/6995-5aa2da66d8.chunk.js +0 -1
  130. package/dist/scripts/6999-deb99c2bc6.chunk.js +0 -1
  131. package/dist/scripts/7002-cc2ef03644.chunk.js +0 -1
  132. package/dist/scripts/7053-f60b518071.chunk.js +0 -1
  133. package/dist/scripts/708-a654139b29.chunk.js +0 -1
  134. package/dist/scripts/7295-78d818c45e.chunk.js +0 -1
  135. package/dist/scripts/7376-0cb303b67a.chunk.js +0 -1
  136. package/dist/scripts/7634-0af03f5b05.chunk.js +0 -1
  137. package/dist/scripts/8124-1a4f25b158.chunk.js +0 -1
  138. package/dist/scripts/8362-3956de64fc.chunk.js +0 -1
  139. package/dist/scripts/8727-f4069ff97d.chunk.js +0 -1
  140. package/dist/scripts/8762-d2131ead72.chunk.js +0 -1
  141. package/dist/scripts/8906-6ebd80b566.chunk.js +0 -1
  142. package/dist/scripts/8947-fdf495502b.chunk.js +0 -1
  143. package/dist/scripts/9040-3f59b66adc.chunk.js +0 -1
  144. package/dist/scripts/9268-6b2b1cd07c.chunk.js +0 -1
  145. package/dist/scripts/9357-985ceb4f17.chunk.js +0 -1
  146. package/dist/scripts/9383-65c422d821.chunk.js +0 -1
  147. package/dist/scripts/969-85e83a6a9b.chunk.js +0 -1
  148. package/dist/scripts/9695-6ad5f06aef.chunk.js +0 -1
  149. package/dist/scripts/9927-998d2ca69d.chunk.js +0 -1
  150. package/dist/scripts/9976-0072a2700d.chunk.js +0 -1
  151. package/dist/scripts/bundle-6c2338a38f.min.js +0 -2
  152. /package/dist/css/{7295-library-editor-cdf829452c.chunk.css → 1492-library-editor-cdf829452c.chunk.css} +0 -0
  153. /package/dist/css/{8124-library-editor-bd1f6e2ee3.chunk.css → 1671-library-editor-bd1f6e2ee3.chunk.css} +0 -0
  154. /package/dist/css/{9383-library-editor-c6a9216107.chunk.css → 6505-library-editor-c6a9216107.chunk.css} +0 -0
  155. /package/dist/css/{4353-library-editor-7a8f34cf74.chunk.css → 6756-library-editor-7a8f34cf74.chunk.css} +0 -0
  156. /package/dist/scripts/{1601-4fee3d2336.chunk.js.LICENSE.txt → 1601-1ef0e562fc.chunk.js.LICENSE.txt} +0 -0
  157. /package/dist/scripts/{2227-2504e75ca4.chunk.js.LICENSE.txt → 2227-af3bb5232c.chunk.js.LICENSE.txt} +0 -0
  158. /package/dist/scripts/{2802-2218d4b4bb.chunk.js.LICENSE.txt → 2802-af98ef08cd.chunk.js.LICENSE.txt} +0 -0
  159. /package/dist/scripts/{3969-a22b097163.chunk.js → 3969-2a1261acad.chunk.js} +0 -0
  160. /package/dist/scripts/{8495-c2a8d27ffa.chunk.js → 8495-80e0f9737d.chunk.js} +0 -0
  161. /package/dist/scripts/{9770-f16965ec13.chunk.js → 9770-d498ca5470.chunk.js} +0 -0
  162. /package/dist/scripts/{bundle-6c2338a38f.min.js.LICENSE.txt → bundle-eb490e61aa.min.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1492],{6697:function(e,t,n){"use strict";n.d(t,{y:function(){return i}});var o=n(57857),i={getEnglishName:function(e,t){var n,i,r=e.language;return i=(null==t?void 0:t.filter((function(e){return e.language!==r}))).length>0?CVLanguages.getFullEnglishName(r):CVLanguages.getEnglishName(r),(null===(n=e.metadata)||void 0===n?void 0:n.autoGenerated)?o.T.getPhrase("shared.shared-utils","autoGeneratedSubtitle",{name:i}):i}}},70680:function(e,t,n){"use strict";n.d(t,{r:function(){return m}});var o=n(31647),i=n(88172),r=n(61843),l=n(57857),s=n(26457),a=n(40622),u=n(97781),c=n.n(u);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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(void 0,i=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!==p(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key,"string"),"symbol"===p(i)?i:String(i)),o)}var i}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}function d(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 y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(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&&h(e,t)}(b,e);var t,n,u,p,m=(u=b,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=y(u);if(p){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return d(this,e)});function b(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),m.call(this,e)}return t=b,(n=[{key:"initialize",value:function(){this.spinnerModel=new o.Q.Model({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,a.LibraryEditorActions.MergeChapters,this.onClickMergeChapters)}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return c()}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(i.ZV.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==s.Um.New&&this.model.get("status")!==s.Um.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:l.T.getPhrase(this.lang,"mergeChapters"),subtitles:l.T.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:l.T.getPhrase(this.lang,"enabledCustomSubtitles")},t=new i.Py({buttonText:e[this.options.type],extraButtonClass:"btn-dark ".concat("XKFne"),model:this.spinnerModel,spinnerOptions:{size:r.Ey.Small,type:r.dR.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:a.LibraryEditorActions.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:l.T.getPhrase(this.lang,"chaptersHeading"),line1:l.T.getPhrase(this.lang,"chaptersInfo1"),line2:l.T.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:l.T.getPhrase(this.lang,"subtitlesHeading"),line1:l.T.getPhrase(this.lang,"subtitlesInfo1"),line2:l.T.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:l.T.getPhrase(this.lang,"cvSubtitlesHeading"),line1:l.T.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:l.T.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&l.T.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(i.ZV.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===s.Um.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),b}(o.Q.Component)},21053:function(e,t,n){"use strict";n.d(t,{W:function(){return b}});var o=n(48088),i=n(31647),r={svgContainer:"mtegw"},l=n(43791),s=n.n(l),a=n(48090),u=n(35630),c=n(57085),p=n(57857);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function h(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,(void 0,i=function(e,t){if("object"!==f(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!==f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key,"string"),"symbol"===f(i)?i:String(i)),o)}var i}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(e,t){if(t&&("object"===f(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){!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&&d(e,t)}(b,e);var t,n,i,l,f=(i=b,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=m(i);if(l){var n=m(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function b(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),f.call(this,e)}return t=b,(n=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return s()}},{key:"viewOptions",value:function(){return{styles:r}}},{key:"onSave",value:function(){o.Radio.channel(a.OV.LIBRARY_EDITOR).trigger(a.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:p.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:p.T.getPhrase(this.lang,"chapters")};case"resources":return{name:p.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new u.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new c.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&h(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),b}(i.Q.Component)},85881:function(e,t,n){"use strict";n.r(t),n.d(t,{EditResourcesView:function(){return St}});var o=n(39479),i=n(48088),r=n(31647),l=n(21679),s=n(57857),a=n(25417),u=n(99748),c=n(88410),p=n(81937),f=n(18222),h=n(57769),d=n(83162),y={fileDrop:"ejhuF",dropMask:"fLdBH",dragOver:"_sk3R"},m=n(61571),b=n.n(m),v=n(44237),g=n.n(v);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 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,C(o.key),o)}}function C(e){var t=function(e,t){if("object"!==k(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!==k(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===k(t)?t:String(t)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}function O(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 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)}(l,e);var t,n,o,i,r=(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=P(o);if(i){var n=P(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return O(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),r.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"FileSelectComponent"}},{key:"template",get:function(){return g()}},{key:"lang",get:function(){return"shared._fileSelect"}},{key:"elements",get:function(){return{dropArea:".file-drop"}}},{key:"defaults",get:function(){return{acceptMultiple:!0}}},{key:"behaviors",get:function(){return[{behaviorClass:h.Z,buttonSelector:".browse",channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple,mimeType:this.options.mimeType},{behaviorClass:d.V,channelName:this.options.channelName,acceptMultiple:this.options.acceptMultiple}]}},{key:"events",value:function(){var e,t,n;return e={"drop .file-drop":"onDrop","dragover .file-drop":"onDragOver"},n="onDragLeave",(t=C(t="dragleave .".concat(y.dropMask)))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"onDrop",value:function(){this.$el.removeClass(y.dragOver)}},{key:"onDragOver",value:function(e){this.$el.addClass(y.dragOver),e.preventDefault()}},{key:"onDragLeave",value:function(){this.$el.removeClass(y.dragOver)}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({},this.options),{styles:y,limitText:this.options.limitText,isClickViewContent:this.options.isClickViewContent})}},{key:"onRender",value:function(){this.getUI("dropArea").append(b()({dropMask:y.dropMask,fileDropText:s.T.getPhrase(this.lang,"drop")}))}}])&&w(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.Component),E=n(48090),j=n(61843),R=n(14327),x=n(29457),L=n(10101),_=n(19226),V=n(77605),I=n(70680),N=n(63791),U=n(97237),D=n.n(U),B={svgContainer:"sr9KQ",progress:"Cn0ad"},A=n(53808);function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(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,(void 0,i=function(e,t){if("object"!==M(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!==M(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key,"string"),"symbol"===M(i)?i:String(i)),o)}var i}function q(e,t){return q=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},q(e,t)}function Q(e,t){if(t&&("object"===M(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 z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q(e,t)}(l,e);var t,n,o,i,r=(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=H(o);if(i){var n=H(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Q(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),r.call(this,e)}return t=l,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:progress",this.render)}},{key:"name",get:function(){return"FileUploadComponent"}},{key:"template",get:function(){return D()}},{key:"events",value:function(){return{"click .cancel-upload":"onClickCancelUpload"}}},{key:"onClickCancelUpload",value:function(){A.q.isFunction(this.options.onClickCancelUpload)&&this.options.onClickCancelUpload(this.model.get("id"))}},{key:"viewOptions",value:function(){return{styles:B,svg:N.Nj.getSvg(N.vn.Folder),tickSvg:N.Nj.getSvg(N.vn.Check),finished:this.model.get("progress")>=100}}}])&&F(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.Component);function J(e){return J="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},J(e)}function K(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,(void 0,i=function(e,t){if("object"!==J(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!==J(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key,"string"),"symbol"===J(i)?i:String(i)),o)}var i}function G(e,t){return G=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},G(e,t)}function Y(e,t){if(t&&("object"===J(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 W(e){return W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},W(e)}var X=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)}(s,e);var t,n,o,r,l=(o=s,r=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=W(o);if(r){var n=W(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Y(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),l.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"FileUploadsComponentCollection"}},{key:"childView",get:function(){return z}},{key:"childViewOptions",get:function(){var e=this;return{onClickCancelUpload:function(t){i.Radio.channel(e.options.channelName).trigger("cancel:upload",t)}}}}])&&K(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Q.ComponentCollection),Z=n(99249),ee=n(36022),te=n(19249),ne={handleQuery:function(){return function(e,t){var n=[];if(e){var i=CVLanguages.getEnglishNameContains(e);return o.each(i,(function(e,t){n.push({key:t,name:e.englishName})})),t(n)}t()}},getTypeaheadConfig:function(){return function(){return{name:"languages",source:ne.handleQuery(),limit:5,display:function(e){return e.name},templates:{suggestion:te.ou,pending:te.gb,notFound:te.TX}}}}},oe=n(56730),ie=n.n(oe);function re(e){return re="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},re(e)}function le(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,(void 0,i=function(e,t){if("object"!==re(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!==re(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key,"string"),"symbol"===re(i)?i:String(i)),o)}var i}function se(e,t){return se=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},se(e,t)}function ae(e,t){if(t&&("object"===re(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 ue(e){return ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ue(e)}var ce=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&&se(e,t)}(l,e);var t,n,o,i,r=(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=ue(o);if(i){var n=ue(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ae(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),r.call(this,e)}return t=l,(n=[{key:"initialize",value:function(e){this.model=Z.r.get("subtitle:language",e.defaultLanguage),this.model.addValidation(j.AJ),this.listenTo(this.channelName,"select:language",this.onLanguageSelected)}},{key:"template",get:function(){return ie()}},{key:"name",get:function(){return"LanguageSelectComponent"}},{key:"lang",get:function(){return"libraryEditor.languageSelect"}},{key:"events",value:function(){return{"click .submit":"onClickSubmit",submit:"onClickSubmit"}}},{key:"behaviors",get:function(){return[{behaviorClass:L.Yw,title:s.T.getPhrase(this.lang,"heading"),buttons:[{text:s.T.getPhrase(this.lang,"submit"),type:"submit",className:"btn btn-dark submit"}]},{behaviorClass:L.fS}]}},{key:"regions",value:function(){return{typeahead:".typahead-region"}}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"getTypeaheadConfigs",value:function(){return[{name:"languages",typeaheadConfig:ne.getTypeaheadConfig()}]}},{key:"renderTypeahead",value:function(){this.showChildView("typeahead",new ee.M({model:this.model,parentChannelName:this.channelName,inputId:"language",selectEvent:"select:language",typeaheadConfigs:this.getTypeaheadConfigs()}))}},{key:"onLanguageSelected",value:function(e){this.model.set("code",e.key)}},{key:"onClickSubmit",value:function(){this.model.validate(),this.model.isValid()&&(this.options.promise.resolve(this.model.toJSON()),this.triggerMethod("hide"))}},{key:"onBeforeDestroy",value:function(){"pending"===this.options.promise.state()&&this.options.promise.reject()}},{key:"onRender",value:function(){this.renderTypeahead()}}])&&le(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.Component),pe=n(21053),fe=n(21974),he=n(6697),de=n(85985),ye=n.n(de),me={container:"SizJb",svgContainer:"PuqLQ",actionSvg:"L9P1P"};function be(e){return be="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},be(e)}function ve(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,(void 0,i=function(e,t){if("object"!==be(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!==be(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key,"string"),"symbol"===be(i)?i:String(i)),o)}var i}function ge(e,t){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ge(e,t)}function ke(e,t){if(t&&("object"===be(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 we(e){return we=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},we(e)}var Ce=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&&ge(e,t)}(l,e);var t,n,o,i,r=(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=we(o);if(i){var n=we(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ke(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),r.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"SubtitleItemComponent"}},{key:"template",get:function(){return ye()}},{key:"className",get:function(){return"".concat(me.container," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete"}}},{key:"getEnglishName",value:function(){return he.y.getEnglishName(this.model.toJSON(),this.model.collection.toJSON())}},{key:"onClickDelete",value:function(){!this.options.isClickViewContent&&A.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){return{styles:me,svg:N.Nj.getSvg(fe.u.mapTypeToSvg("subtitle")),trashSvg:N.Nj.getSvg(N.vn.Delete),name:this.getEnglishName(),isClickViewContent:this.options.isClickViewContent}}}])&&ve(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.Component),Se=n(54758),Oe=n(71060),Pe=n.n(Oe);function Te(e){return Te="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},Te(e)}function Ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function je(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,(void 0,i=function(e,t){if("object"!==Te(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!==Te(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key,"string"),"symbol"===Te(i)?i:String(i)),o)}var i}function Re(e,t,n){return t&&je(e.prototype,t),n&&je(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xe(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&&Le(e,t)}function Le(e,t){return Le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Le(e,t)}function _e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ie(e);if(t){var i=Ie(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Ve(this,n)}}function Ve(e,t){if(t&&("object"===Te(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 Ie(e){return Ie=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ie(e)}var Ne=function(e){xe(n,e);var t=_e(n);function n(e){return Ee(this,n),t.call(this,e)}return Re(n,[{key:"name",get:function(){return"VideoSubtitlesComponent"}},{key:"template",get:function(){return Pe()}},{key:"regions",value:function(){return{subtitles:{el:".subtitles-list-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{headerText:this.options.headerText,emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.showChildView("subtitles",new Ue({collection:this.collection,channelName:this.options.channelName,isClickViewContent:this.options.isClickViewContent}))}}]),n}(r.Q.Component),Ue=function(e){xe(n,e);var t=_e(n);function n(e){return Ee(this,n),t.call(this,e)}return Re(n,[{key:"name",get:function(){return"VideoSubtitlesComponentCollection"}},{key:"lang",get:function(){return"libraryEditor.videoSubtitles"}},{key:"childView",get:function(){return Ce}},{key:"childViewOptions",get:function(){var e=this;return{isClickViewContent:this.options.isClickViewContent,onClickDelete:function(t){return e.onClickDelete(t)}}}},{key:"onClickDelete",value:function(e){var t=this;this.options.isClickViewContent||new Se.M({title:s.T.getPhrase(this.lang,"removeHeading"),text:s.T.getPhrase(this.lang,"removeBody",{language:this.getEnglishName(e)}),buttons:[{text:s.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:s.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){i.Radio.channel(t.options.channelName).trigger("delete:subtitle",e.get("id"))}))}},{key:"getEnglishName",value:function(e){return he.y.getEnglishName(e.toJSON(),e.collection.toJSON())}}]),n}(r.Q.ComponentCollection),De=n(88172),Be=n(7190),Ae=n(41165),Me=n.n(Ae);function Fe(e){return Fe="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},Fe(e)}function qe(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,(void 0,i=function(e,t){if("object"!==Fe(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!==Fe(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key,"string"),"symbol"===Fe(i)?i:String(i)),o)}var i}function Qe(e,t){return Qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Qe(e,t)}function He(e,t){if(t&&("object"===Fe(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 ze(e){return ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ze(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&&Qe(e,t)}(a,e);var t,n,o,r,l=(o=a,r=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=ze(o);if(r){var n=ze(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return He(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=l.call(this,e)).showNameField=!1,t.disableBtn=!0,t}return t=a,(n=[{key:"initialize",value:function(){this.model=Z.r.get(this.viewModelName),this.model.addValidation(Be.yU),this.bindListeners()}},{key:"name",get:function(){return"AddLinksComponent"}},{key:"template",get:function(){return Me()}},{key:"lang",get:function(){return"libraryEditor.addLinks"}},{key:"tagName",get:function(){return"form"}},{key:"bindings",get:function(){return{"[name=url]":{observe:"url",setOptions:{validate:!0}},"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"regions",value:function(){return{attachBtn:".attach-btn-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:L.Bp},{behaviorClass:L.fS}]}},{key:"elements",get:function(){return{nameField:"#name-container"}}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"bindListeners",value:function(){this.listenTo(this.model,"change:url",this.onChangeUrl),this.listenTo(this.model,"change:name",this.onChangeName),this.listenTo(this.options.channelName,"attach:link",this.onClickAttach)}},{key:"onChangeUrl",value:function(){this.showNameField&&!this.model.isValid("url")?(this.getUI("nameField").hide(),this.model.set("name",""),this.showNameField=!1):!this.showNameField&&this.model.isValid("url")&&(this.getUI("nameField").show(),this.showNameField=!0)}},{key:"onChangeName",value:function(){this.model.validate("name"),this.disableBtn=!this.model.isValid(),this.renderAttachButton()}},{key:"onClickAttach",value:function(){var e=this.model.toJSON();this.model.clear(),i.Radio.channel(this.options.channelName).trigger("add:link",e),this.render()}},{key:"renderAttachButton",value:function(){this.options.hide||this.showChildView("attachBtn",new De.Py({saveEvent:"attach:link",channelName:this.options.channelName,buttonText:s.T.getPhrase(this.lang,"attach"),extraButtonClass:"btn-dark attach",disabled:this.disableBtn,buttonType:"submit",spinnerOptions:{size:j.Ey.Medium,type:j.dR.Light,extraClasses:"mx-auto"}}))}},{key:"viewOptions",value:function(){return{limit:this.options.limit,hide:this.options.hide}}},{key:"onRender",value:function(){this.renderAttachButton(),this.stickit(),i.Validation.bind(this)}},{key:"onClose",value:function(){this.unstickit(),i.Validation.unbind(this)}}])&&qe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),Ke=n(68708),$e=n(85835);function Ge(e){return Ge="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},Ge(e)}function Ye(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,(void 0,i=function(e,t){if("object"!==Ge(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!==Ge(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key,"string"),"symbol"===Ge(i)?i:String(i)),o)}var i}function We(e,t){return We=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},We(e,t)}function Xe(e,t){if(t&&("object"===Ge(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 Ze(e){return Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ze(e)}var et="shared.errors.tooManyResources",tt=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&&We(e,t)}(l,e);var t,n,o,i,r=(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=Ze(o);if(i){var n=Ze(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Xe(this,e)});function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=r.call(this,"Cannot add that many resources")).resourceLimit=e,t}return t=l,(n=[{key:"name",get:function(){return"TooManyResourcesError"}},{key:"dialogOptions",get:function(){return{title:s.T.getPhrase(et,"heading"),text:s.T.getPhrase(et,"body",{resourceLimit:this.resourceLimit}),buttons:[{text:s.T.getPhrase(et,"okay"),className:"btn btn-dark",success:!0}]}}}])&&Ye(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}($e.S);function nt(e){return nt="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},nt(e)}function ot(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,(void 0,i=function(e,t){if("object"!==nt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!==nt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key,"string"),"symbol"===nt(i)?i:String(i)),o)}var i}function it(e,t){return it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},it(e,t)}function rt(e,t){if(t&&("object"===nt(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 lt(e){return lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},lt(e)}var st="shared.errors.tooManySubtitles",at=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&&it(e,t)}(l,e);var t,n,o,i,r=(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=lt(o);if(i){var n=lt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return rt(this,e)});function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=r.call(this,"Cannot add that many subtitles")).subtileLimit=e,t}return t=l,(n=[{key:"name",get:function(){return"TooManySubtitlesError"}},{key:"dialogOptions",get:function(){return{title:s.T.getPhrase(st,"heading"),text:s.T.getPhrase(st,"body",{subtitleLimit:this.subtileLimit}),buttons:[{text:s.T.getPhrase(st,"okay"),className:"btn btn-dark",success:!0}]}}}])&&ot(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}($e.S),ut=n(56906),ct=n(40622),pt=n(26457),ft=n(45837),ht=n(70065),dt=n(52076),yt=n(51069),mt=n.n(yt),bt=n(95061);function vt(e){return vt="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},vt(e)}function gt(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,(void 0,i=function(e,t){if("object"!==vt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!==vt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key,"string"),"symbol"===vt(i)?i:String(i)),o)}var i}function kt(e,t){return kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},kt(e,t)}function wt(e,t){if(t&&("object"===vt(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 Ct(e){return Ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ct(e)}var St=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&&kt(e,t)}(m,e);var t,n,h,d,y=(h=m,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=Ct(h);if(d){var n=Ct(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return wt(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),y.call(this,e)}return t=m,n=[{key:"initialize",value:function(){this.initializeUploadServices(),this.bindDataListeners(),this.bindViewListeners(),this.bindFileSelectListeners(),j.Si.initBackButton(),this.chapterDataService=l.u.getInstance(E.Or.Chapter,this),this.videoDataService=l.u.getInstance(E.Or.Video,this),this.linkDataService=l.u.getInstance(E.Or.Link,this),this.resourceDataService=l.u.getInstance(E.Or.Resource,this),this.subtitleDataService=l.u.getInstance(E.Or.Subtitle,this),this.resourceUploads=[],this.resourceUploadCount=0}},{key:"name",get:function(){return"EditResourcesView"}},{key:"lang",get:function(){return"libraryEditor.editResources"}},{key:"title",get:function(){return this.model&&this.model.get("name")||"Edit Resources"}},{key:"template",get:function(){return mt()}},{key:"props",get:function(){return["videoDataService"]}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return j.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:L._7}]}},{key:"requiredResources",get:function(){return{currentUser:_.K.currentUser,libraries:bt.T.libraries}}},{key:"initializeUploadServices",value:function(){this.resourceUploadService=new c.L1,this.listenTo(E.jr.RESOURCE_UPLOAD,p.S.UPLOAD_COMPLETE,this.onResourceUploadComplete),this.subtitleUploadService=new c.M_,this.listenTo(E.jr.SUBTITLE_UPLOAD,p.S.UPLOAD_COMPLETE,this.onSubtitleUploadComplete)}},{key:"bindDataListeners",value:function(){this.listenTo(E.Vk.VIDEO,"".concat(E.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(E.Vk.VIDEO,"".concat(E.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(E.Vk.VIDEO,"".concat(E.M_.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(E.Vk.CHAPTER,"".concat(E.M_.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError)}},{key:"bindViewListeners",value:function(){this.listenTo(this.channelName,"add:link",this.onAddLink),this.listenTo(this.channelName,"delete:subtitle",this.onDeleteSubtitle),this.listenTo(this.channelName,"delete:resource",this.onDeleteResource),this.listenTo(this.channelName,"delete:link",this.onDeleteLink),this.listenTo(this.channelName,"cancel:upload",this.onCancelUpload),this.listenTo(this.channelName,ct.LibraryEditorActions.MergeChapters,this.onMergeChapters)}},{key:"bindFileSelectListeners",value:function(){this.listenTo(this.getSubtitleSelectChannelName(),p.S.FILES_SELECTED,this.onSubtitleFilesAdded),this.listenTo(this.getResourceSelectChannelName(),p.S.FILES_SELECTED,this.onResourceFilesAdded)}},{key:"getSubtitleSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"subtitles")}},{key:"getResourceSelectChannelName",value:function(){return"".concat(this.name).concat(this.cid,"resources")}},{key:"onVideoDataError",value:function(e){switch(e.type){case u.h.NotFound:r.Q.ErrorHelper.throw(new ut.l1);break;case u.h.Forbidden:r.Q.ErrorHelper.throw(new ut.aV)}}},{key:"onConcatenateDataError",value:function(e){e.type===u.h.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"onSubtitleFilesAdded",value:function(e,t){e.length>5-this.model.subtitles.length?r.Q.ErrorHelper.throw(new at(5)):(t&&(this.interactionType=t),this.subtitleUploadService.addFiles(e))}},{key:"onResourceFilesAdded",value:function(e,t){e.length>25-this.model.resources.length?r.Q.ErrorHelper.throw(new tt(25)):(this.resourceUploadCount+=e.length,t&&(this.interactionType=t),this.resourceUploadService.addFiles(e))}},{key:"onAddLink",value:function(e){var t=this;25!==this.model.links.length&&(this.model.links.length+1===25&&this.renderAddLinks(!0),this.linkDataService.addLink(this.model.get("id"),e,(function(e){t.model.links.add(e),t.render()})))}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:x.LP.EditVideoTabs},subtitlesUpload:{el:".subtitles-upload-region",partialLoading:x.LP.EditVideoUploadArea},subtitlesUploadList:".subtitles-upload-list-region",customerSubtitlesList:".customer-subtitles-list-region",clickViewSubtitlesList:".clickview-subtitles-list-region",resourcesUpload:{el:".resources-upload-region",partialLoading:x.LP.EditVideoUploadArea},resourcesUploadList:".resources-upload-list-region",customerResourcesList:".customer-resources-list-region",clickViewResourcesList:".clickview-resources-list-region",addLinks:{el:".add-links-region",partialLoading:x.LP.EditVideoUploadArea},customerLinkList:".customer-link-list-region",clickViewLinkList:".clickview-link-list-region"}}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[pt.Um.SingleFile,pt.Um.ConcatenationFailed];o.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==pt.Um.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.videoDataService.hasPhysicalChapters(e.options.videoId,(function(t){e.hasPhysicalChapters=t,e.renderSubtitleFileSelect()}))}))}},{key:"onDeleteResource",value:function(e){var t=this;this.resourceDataService.deleteResource(this.options.videoId,e,(function(){t.logDeleteAction(ht.EntityType.Resource,e),t.render()}))}},{key:"onDeleteSubtitle",value:function(e){var t=this;this.subtitleDataService.deleteSubtitle(this.options.videoId,e,(function(){t.logDeleteAction(ht.EntityType.Subtitle,e),t.render()}))}},{key:"onDeleteLink",value:function(e){var t=this;this.linkDataService.deleteLink(this.options.videoId,e,(function(){t.logDeleteAction(ht.EntityType.Link,e),t.render()}))}},{key:"onCancelUpload",value:function(e){this.resourceUploadService.cancelUpload(e),this.subtitleUploadService.cancelUpload(e)}},{key:"onResourceUploadComplete",value:function(e){var t=this,n=e.toJSON(),o={fileId:n.fileInfo.id,uploadId:n.file.cvUpload.uploadId,name:n.fileInfo.name,type:f.v.getResourceType(n.fileInfo.extension),extension:n.fileInfo.extension,fileSize:n.fileInfo.size,fileUrl:n.fileInfo.url,ingestUrl:n.file.cvUpload.ingestUrl,metaData:{type:f.v.getResourceType(n.fileInfo.extension)},contribution:!1,url:n.fileInfo.url,fileIdType:2};this.resourceUploads.push(o),this.resourceUploadCount--,this.resourceUploadCount>0||(this.resourceDataService.addResource(this.options.videoId,this.resourceUploads,(function(e){t.model.resources.add(e);var n=t.resourceUploadService.getCollection().filter((function(t){return t.get("fileInfo").id===e.get("fileId")}));t.resourceUploadService.getCollection().remove(n),t.logUploadAction(e),t.render()})),this.resourceUploads=[])}},{key:"onSubtitleUploadComplete",value:function(e){var t=this,n=$.Deferred(),o=new ce({defaultLanguage:{code:"en",name:"English"},promise:n});n.done((function(n){var o=e.toJSON(),i={fileId:o.fileInfo.id,name:n.name,language:n.code,type:f.v.getResourceType(o.fileInfo.extension),fileIdType:2};t.subtitleDataService.addSubtitle(t.options.videoId,i,(function(n){t.model.subtitles.add(n),t.subtitleUploadService.getCollection().remove(e),t.logUploadAction(n),t.render()}))})).fail((function(){t.subtitleUploadService.cancelUpload(e.get("id"))})),i.Radio.channel(a.G.POPUP).trigger(r.Q.EventNames.SHOW_POPUP,o)}},{key:"logUploadAction",value:function(e){var t=e instanceof R._?ht.EntityType.Resource:ht.EntityType.Subtitle,n=dt.k.mapInteractionType(this.interactionType),o={location:ht.LocationContext.EditVideoResources,actionType:ht.UserAction.Upload,entity:t,descriptor:n};dt.k.logUserAction(e,o)}},{key:"logDeleteAction",value:function(e,t){var n={location:ht.LocationContext.EditVideoResources,actionType:ht.UserAction.Delete,entity:e},o={id:t,parentId:+this.options.videoId};dt.k.logUserAction(o,n)}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"renderTabs",value:function(){var e=j.BK.canEditVideo(this.model);this.showChildView("tabs",new pe.W({model:this.model,tabs:j.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-resources-subtitles-applink",context:"resources",folder:this.folder,libraries:this.libraries}))}},{key:"renderSubtitleFileSelect",value:function(){if(this.hasPhysicalChapters.get("value"))this.renderConcatenationRequest();else{var e=s.T.getPhrase(this.lang,"subtitlesLimit",{limit:5});this.showChildView("subtitlesUpload",new T({title:this.isClickViewContent?s.T.getPhrase(this.lang,"customerSubtitles"):s.T.getPhrase(this.lang,"subtitles"),description:s.T.getPhrase(this.lang,"subtitlesInfo"),alternateText:s.T.getPhrase(this.lang,"subtitlesAlternative"),mimeType:f.l.SUBTITLES,channelName:this.getSubtitleSelectChannelName(),acceptMultiple:!1,limitText:this.model.subtitles.length>=5?e:null,isClickViewContent:this.isClickViewContent}))}}},{key:"renderSubtitleUploadList",value:function(){var e=this.subtitleUploadService.getCollection();this.showChildView("subtitlesUploadList",new X({collection:e,channelName:this.channelName}))}},{key:"renderSubtitlesLists",value:function(){this.renderClickViewSubtitlesList(),this.renderCustomerSubtitlesList()}},{key:"renderClickViewSubtitlesList",value:function(){if(this.isClickViewContent){var e=j.BK.filterObjectsByOwnerType(this.model.subtitles,ft.N.ClickView);this.showChildView("clickViewSubtitlesList",new Ne({collection:e,channelName:this.channelName,isClickViewContent:!0,headerText:s.T.getPhrase(this.lang,"clickViewSubtitles"),emptyStateText:e.models.length?"":s.T.getPhrase(this.lang,"clickViewSubtitlesEmpty")}))}}},{key:"renderCustomerSubtitlesList",value:function(){this.showChildView("customerSubtitlesList",new Ne({collection:j.BK.filterObjectsByOwnerType(this.model.subtitles,ft.N.Customer,this.currentUser.get("customerId")),channelName:this.channelName}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("subtitlesUpload",new I.r({type:this.isClickViewContent?"clickViewSubtitles":"subtitles",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderResourcesFileSelect",value:function(){var e=s.T.getPhrase(this.lang,"resourcesLimit",{limit:25});this.showChildView("resourcesUpload",new T({title:this.isClickViewContent?s.T.getPhrase(this.lang,"customerResources"):s.T.getPhrase(this.lang,"resources"),description:s.T.getPhrase(this.lang,"resourcesDescription"),alternateText:s.T.getPhrase(this.lang,"resourcesAlternative"),mimeType:f.l.RESOURCES,channelName:this.getResourceSelectChannelName(),limitText:this.model.resources.length>=25?e:null,isClickViewContent:this.isClickViewContent}))}},{key:"renderResourcesUploadList",value:function(){var e=this.resourceUploadService.getCollection();this.showChildView("resourcesUploadList",new X({collection:e,channelName:this.channelName}))}},{key:"renderResourcesLists",value:function(){this.renderClickViewResourcesList(),this.renderCustomerResourcesList()}},{key:"renderClickViewResourcesList",value:function(){if(this.isClickViewContent){var e=j.BK.filterObjectsByOwnerType(this.model.resources,ft.N.ClickView);this.showChildView("clickViewResourcesList",new V.c({model:this.model,customCollection:e,editable:!1,videoId:this.options.videoId,parentChannelName:this.channelName,headerText:s.T.getPhrase(this.lang,"clickViewResources"),emptyStateText:e.models.length?"":s.T.getPhrase(this.lang,"clickViewResourcesEmpty"),analyticsOptions:{location:ht.LocationContext.EditVideoResources}}))}}},{key:"renderCustomerResourcesList",value:function(){this.showChildView("customerResourcesList",new V.h({collection:j.BK.filterObjectsByOwnerType(this.model.resources,ft.N.Customer,this.currentUser.get("customerId")),editable:!0,videoId:this.options.videoId,channelName:this.channelName,analyticsOptions:{location:ht.LocationContext.EditVideoResources}}))}},{key:"renderAddLinks",value:function(e){this.showChildView("addLinks",new Je({collection:this.model.get("links"),channelName:this.channelName,hide:e||25===this.model.get("links").length,limit:25}))}},{key:"renderLinkLists",value:function(){var e={channelName:this.channelName,analyticsOptions:{location:ht.LocationContext.EditVideoResources},videoId:this.options.videoId};this.renderClickViewLinkList(e),this.renderCustomerLinkList(e)}},{key:"renderClickViewLinkList",value:function(e){if(this.isClickViewContent){var t=j.BK.filterObjectsByOwnerType(this.model.links,ft.N.ClickView);this.showChildView("clickViewLinkList",new Ke.c(Object.assign(Object.assign({},e),{headingText:"Resource links by ClickView",emptyStateText:t.models.length?"":"There are no ClickView links for this video",customCollection:t,editable:!1})))}}},{key:"renderCustomerLinkList",value:function(e){this.showChildView("customerLinkList",new Ke.c(Object.assign(Object.assign({},e),{customCollection:j.BK.filterObjectsByOwnerType(this.model.links,ft.N.Customer,this.currentUser.get("customerId")),editable:!0})))}},{key:"fetchData",value:function(){var e=this;this.model=this.videoDataService.getVideo(this.options.videoId),this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.isClickViewContent=this.model&&!j.BK.canEditVideo(this.model),this.folder=this.model&&this.model.categories.first(),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"viewOptions",value:function(){return{isClickViewContent:this.isClickViewContent}}},{key:"onRender",value:function(){this.renderTabs(),this.renderSubtitleFileSelect(),this.renderSubtitleUploadList(),this.renderSubtitlesLists(),this.renderResourcesFileSelect(),this.renderResourcesUploadList(),this.renderResourcesLists(),this.renderAddLinks(),this.renderLinkLists(),this.startPollingConcatenation()}},{key:"onDestroy",value:function(){this.subtitleUploadService.destroy(),this.resourceUploadService.destroy()}}],n&&gt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(r.Q.View)},36022:function(e,t,n){"use strict";n.d(t,{M:function(){return g}});var o=n(39479),i=n(48088),r=n(31647),l=n(11306),s=n(63791),a=n(17391),u=n(61843),c=n(94407),p=n.n(c),f={svg:"QbFgf",typeaheadContainer:"Y3ErG",disabled:"VTCM4"};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 d(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,y(o.key),o)}}function y(e){var t=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t);if("object"!==h(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===h(t)?t:String(t)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function b(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 v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(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)}(k,e);var t,n,c,h,g=(c=k,h=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=v(c);if(h){var n=v(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return b(this,e)});function k(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),g.call(this,e)}return t=k,(n=[{key:"name",get:function(){return"SearchTypeaheadComponent"}},{key:"template",get:function(){return p()}},{key:"className",get:function(){return"search-container ".concat(f.typeaheadContainer," mb-2")}},{key:"channelName",get:function(){return u.N0.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{input:"#".concat(this.options.inputId)}}},{key:"defaults",get:function(){return{inputId:"search-typeahead",placeholderText:"Search",stickItProperty:"name",selectEvent:"select:result",additionalClasses:"",editable:!0}}},{key:"events",value:function(){return{submit:"onSubmit","click .remove":"onClickRemove"}}},{key:"initialize",value:function(){this.model||this.options.parentChannelName||r.Q.ErrorHelper.throw(new l.H("Either pass a model or a channelName to access the typeahead selection")),this.model||(this.model=new r.Q.Model),this.options.inputName||(this.options.inputName=this.options.inputId),this.bindListeners()}},{key:"bindListeners",value:function(){this.options.parentChannelName&&(this.parentChannel=i.Radio.channel(this.options.parentChannelName)),this.listenTo(this.channelName,"typeahead:set:input",this.setInput),this.listenTo(this.channelName,"typeahead:clear:input",this.clearInput)}},{key:"bindings",get:function(){var e,t,n;return e={},t="[name=".concat(this.options.inputName,"]"),n={observe:this.options.stickItProperty,setOptions:{validate:!0}},(t=y(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"clearInput",value:function(){this.getUI("input").typeahead("val",null)}},{key:"setInput",value:function(e){this.getUI("input").typeahead("val",e)}},{key:"onTypeaheadSelect",value:function(e,t){var n;e.preventDefault(),n="string"==typeof t?t:t.title||t.name||t.query,this.model.set(this.options.stickItProperty,n),this.parentChannel&&this.options.selectEvent&&this.parentChannel.trigger(this.options.selectEvent,t),this.onSubmit(e),this.toggleRemove()}},{key:"onSubmit",value:function(e){var t=this;if(e.preventDefault(),!this.isDestroyed()&&this.getTypeaheadActionOptions().clearOnSelect)return this.getUI("input").typeahead("close"),setTimeout((function(){t.model.clear(),t.clearInput()}),0),!1}},{key:"onClickRemove",value:function(){this.model.clear(),this.parentChannel.trigger(this.options.removeEvent,this.model),this.toggleRemove()}},{key:"getSources",value:function(){return o.isArray(this.options.typeaheadConfigs)?a.J.getSearchSources(this.options.typeaheadConfigs):a.J.getSearchSources([this.options.typeaheadConfigs])}},{key:"getTypeaheadOptions",value:function(){var e={minLength:1,highlight:!0};return this.options.typeaheadOptions?o.extend({},e,this.options.typeaheadOptions):e}},{key:"getTypeaheadActionOptions",value:function(){var e={clearOnSelect:!1};return o.isObject(this.options.actionOptions)?o.extend({},e,this.options.actionOptions):e}},{key:"bindOptionalCallbacks",value:function(){o.isObject(this.options.callbacks)&&(o.isFunction(this.options.callbacks.onRender)&&this.getUI("input").on("typeahead:render",o.bind(this.options.callbacks.onRender,this)),o.isFunction(this.options.callbacks.onInput)&&this.listenTo(this.model,"change:".concat(this.options.stickItProperty),this.options.callbacks.onInput),o.isFunction(this.options.callbacks.onBlur)&&this.getUI("input").on("blur",o.bind(this.options.callbacks.onBlur,this,this.channelName,this.options.stickItProperty)))}},{key:"initTypeahead",value:function(){this.getUI("input").typeahead(this.getTypeaheadOptions(),this.getSources())}},{key:"initTypeaheadListeners",value:function(){this.getUI("input").on("typeahead:select",o.bind(this.onTypeaheadSelect,this)),this.bindOptionalCallbacks()}},{key:"toggleRemove",value:function(){this.shouldShowRemove()?this.$el.find(".remove").show():this.$el.find(".remove").hide()}},{key:"shouldShowRemove",value:function(){return!!this.options.editable&&(!!this.options.forceShowRemoveButton||this.options.removeEvent&&!!this.model.get(this.options.stickItProperty))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:f},this.options),{showRemove:this.shouldShowRemove(),svgRemove:s.Nj.getSvg(s.vn.Close)})}},{key:"onRender",value:function(){var e=this;this.stickit(),this.initTypeahead(),this.initTypeaheadListeners(),i.Validation.bind(this),this.toggleRemove(),this.options.autofocus&&window.requestAnimationFrame((function(){e.getUI("input").focus()}))}},{key:"onClose",value:function(){this.getUI("input").off(),this.unstickit(),i.Validation.unbind(this)}}])&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),k}(r.Q.Component)},44237: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,'<p class="alert alert-warning mb-0">'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.limitText:r,t))+"</p>\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<div class="file-drop '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.fileDrop:r,t))+" p-2"+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.limitText:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <button class="browse btn btn-outline-dark mr-2">'+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(a,"browse",{name:"lang",hash:{},data:i}))+'</button>\n <span class="text-muted align-middle">'+s(l(null!=(r=null!=t?t.options:t)?r.alternateText:r,t))+"</span>\n</div>\n"},4:function(e,t,n,o,i){return" col-6 "},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda;return"<h5>"+e.escapeExpression(l(null!=(r=null!=t?t.options:t)?r.title:r,t))+"</h5>\n<p>"+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.description:r,t))?r:"")+"</p>\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.limitText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},61571: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,l,s=e.escapeExpression;return'<div class="'+s("function"==typeof(l=null!=(l=n.dropMask||(null!=t?t.dropMask:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"dropMask",hash:{},data:i}):l)+'">\n <h3>'+s(e.lambda(null!=(r=null!=t?t.options:t)?r.fileDropText:r,t))+"</h3>\n</div>"},useData:!0})},97237: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,l=e.lambda;return'<span class="d-inline-block align-middle mr-2 '+e.escapeExpression(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' float-right text-success">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.tickSvg:r,t))?r:"")+"</span>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="d-inline-block align-middle mr-2 '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' cursor-pointer cancel-upload close float-right">&times;</span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing,p="function";return'<span class="d-inline-block align-middle mr-2 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\n<span class="align-middle">\n '+a(typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:c)===p?l.call(u,{name:"name",hash:{},data:i}):l)+"\n</span>\n"+(null!=(r=n.if.call(u,null!=(r=null!=t?t.options:t)?r.finished:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")+'\n<div class="progress my-2 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.progress:r,t))+' mt-2">\n <div class="progress-bar bg-info" style="width: '+a(typeof(l=null!=(l=n.progress||(null!=t?t.progress:t))?l:c)===p?l.call(u,{name:"progress",hash:{},data:i}):l)+'%" aria-valuenow="'+a(typeof(l=null!=(l=n.progress||(null!=t?t.progress:t))?l:c)===p?l.call(u,{name:"progress",hash:{},data:i}):l)+'" aria-valuemin="0" aria-valuemax="100"></div>\n</div>'},useData:!0})},85985: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,l=e.lambda,s=e.escapeExpression;return'<a class="float-right '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+" "+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.actionSvg:r,t))+' text-muted delete">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.trashSvg:r,t))?r:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l,s=e.lambda,a=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<span class="d-inline-block align-middle mr-2 '+a(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.svg:r,t))?r:"")+'</span>\n<a href="'+a("function"==typeof(l=null!=(l=n.url||(null!=t?t.url:t))?l:e.hooks.helperMissing)?l.call(u,{name:"url",hash:{},data:i}):l)+"?name="+a(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+'" class="align-middle">\n '+a(s(null!=(r=null!=t?t.options:t)?r.name:r,t))+"\n</a>\n"+(null!=(r=n.unless.call(u,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},41165: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,'<p class="alert alert-warning col-8">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"limit",{name:"lang",hash:{limit:null!=(r=null!=t?t.options:t)?r.limit:r},data:i}))+"</p>\n"},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||l).call(r,"subheading",{name:"lang",hash:{},data:i}))+'</p>\n<div class="form-group mb-1">\n <label for="url">'+s((n.lang||t&&t.lang||l).call(r,"urlLabel",{name:"lang",hash:{},data:i}))+'</label>\n <input name="url" id="url" class="form-control" type="text" placeholder="'+s((n.lang||t&&t.lang||l).call(r,"urlPlaceholder",{name:"lang",hash:{},data:i}))+'">\n <div class="form-feedback"></div>\n</div>\n<div class="form-group mb-1" id="name-container" style="display: none;">\n <input type="text" class="form-control" name="name" placeholder="'+s((n.lang||t&&t.lang||l).call(r,"namePlaceholder",{name:"lang",hash:{},data:i}))+'">\n <div class="form-feedback"></div>\n</div>\n<div class="attach-btn-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h5 class="pt-2">Resource links</h5>\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.hide:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:"")},useData:!0})},97781: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,null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.progress:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:""},2:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.escapeExpression;return' <span class="m-3 text-muted">'+l(e.lambda(null!=(r=null!=t?t.options:t)?r.progress:r,t))+'</span>\n <p class="pt-2">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:i}))+"</p>\n"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.failed:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:""},5:function(e,t,n,o,i){return e.propertyIsEnumerable,'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:i}))+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression;return"<h4>"+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.heading:r,t))+"</h4>\n<p>"+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line1:r,t))+"</p>\n<p>"+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line2:r,t))+'</p>\n<div class="btn-region"></div>\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.processing:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?r:"")},useData:!0})},43791: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){var r;return e.propertyIsEnumerable,'<h1 class="h3">\n '+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region pl-2"></div>'},useData:!0})},56730: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){return e.propertyIsEnumerable,'<form>\n <div class="form-group">\n <label for="language">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+'</label>\n <div class="typahead-region"></div>\n </div>\n</form>'},useData:!0})},71060: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!=t?t.options:t)?r.emptyStateText:r,t))},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\n"+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'\n<div class="subtitles-list-region"></div>'},useData:!0})},51069:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"col-5"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=null!=t?t:e.nullContext||{};return'<div class="tab-region"></div>\n\n<div class="row py-3">\n <div class="'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="clickview-subtitles-list-region"></div>\n </div>\n <div class="col-7">\n <div class="subtitles-upload-region"></div>\n <div class="subtitles-upload-list-region p-0 col-8"></div>\n <div class="customer-subtitles-list-region p-0 col-8"></div>\n </div>\n</div>\n\n<div class="row border-top py-3">\n <div class="'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="clickview-resources-list-region"></div>\n </div>\n <div class="col-7">\n <div class="resources-upload-region"></div>\n <div class="resources-upload-list-region p-0 col-8"></div>\n <div class="customer-resources-list-region p-0 col-8"></div>\n </div>\n</div>\n\n<div class="row border-top py-3">\n <div class="'+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.isClickViewContent:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\n <div class="clickview-link-list-region"></div>\n </div>\n <div class="col-7">\n <div class="add-links-region mb-2"></div>\n <div class="customer-link-list-region p-0 col-8"></div>\n </div>\n</div>'},useData:!0})},94407: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.disabled:r,t))},3:function(e,t,n,o,i){return"autofocus"},5:function(e,t,n,o,i){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,l=e.lambda,s=e.escapeExpression,a=null!=t?t:e.nullContext||{};return'<input\n name="'+s(l(null!=(r=null!=t?t.options:t)?r.inputName:r,t))+'"\n type="text"\n class="form-control '+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+" "+s(l(null!=(r=null!=t?t.options:t)?r.additionalClasses:r,t))+'"\n id="'+s(l(null!=(r=null!=t?t.options:t)?r.inputId:r,t))+'"\n autocomplete="off"\n placeholder="'+s(l(null!=(r=null!=t?t.options:t)?r.placeholderText:r,t))+'"\n '+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.autofocus:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+"\n "+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'\n></input>\n<span class="svg-container mb-2 '+s(l(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svg:r,t))+' remove" style="display: none;">'+(null!=(r=l(null!=(r=null!=t?t.options:t)?r.svgRemove:r,t))?r:"")+"</span>"},useData:!0})}}]);
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 1601-1ef0e562fc.chunk.js.LICENSE.txt */
2
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1601],{70680:function(e,t,n){"use strict";n.d(t,{r:function(){return v}});var r=n(31647),i=n(88172),o=n(61843),a=n(57857),s=n(26457),c=n(40622),l=n(97781),u=n.n(l);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 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,(void 0,i=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key,"string"),"symbol"===h(i)?i:String(i)),r)}var i}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function d(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 y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(m,e);var t,n,l,h,v=(l=m,h=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(l);if(h){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return d(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),v.call(this,e)}return t=m,(n=[{key:"initialize",value:function(){this.spinnerModel=new r.Q.Model({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,c.LibraryEditorActions.MergeChapters,this.onClickMergeChapters)}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return u()}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(i.ZV.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==s.Um.New&&this.model.get("status")!==s.Um.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:a.T.getPhrase(this.lang,"mergeChapters"),subtitles:a.T.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:a.T.getPhrase(this.lang,"enabledCustomSubtitles")},t=new i.Py({buttonText:e[this.options.type],extraButtonClass:"btn-dark ".concat("XKFne"),model:this.spinnerModel,spinnerOptions:{size:o.Ey.Small,type:o.dR.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:c.LibraryEditorActions.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:a.T.getPhrase(this.lang,"chaptersHeading"),line1:a.T.getPhrase(this.lang,"chaptersInfo1"),line2:a.T.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:a.T.getPhrase(this.lang,"subtitlesHeading"),line1:a.T.getPhrase(this.lang,"subtitlesInfo1"),line2:a.T.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:a.T.getPhrase(this.lang,"cvSubtitlesHeading"),line1:a.T.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:a.T.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&a.T.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(i.ZV.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===s.Um.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(r.Q.Component)},21053:function(e,t,n){"use strict";n.d(t,{W:function(){return m}});var r=n(48088),i=n(31647),o={svgContainer:"mtegw"},a=n(43791),s=n.n(a),c=n(48090),l=n(35630),u=n(57085),h=n(57857);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,(void 0,i=function(e,t){if("object"!==p(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key,"string"),"symbol"===p(i)?i:String(i)),r)}var i}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function y(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 v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(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&&d(e,t)}(m,e);var t,n,i,a,p=(i=m,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=v(i);if(a){var n=v(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return y(this,e)});function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),p.call(this,e)}return t=m,(n=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return s()}},{key:"viewOptions",value:function(){return{styles:o}}},{key:"onSave",value:function(){r.Radio.channel(c.OV.LIBRARY_EDITOR).trigger(c.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:h.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:h.T.getPhrase(this.lang,"chapters")};case"resources":return{name:h.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new l.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new u.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&f(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.Q.Component)},16704:function(e,t,n){"use strict";n.r(t),n.d(t,{EditChaptersView:function(){return M}});var r=n(39479),i=n(31647),o=n(21679),a=n(57857),s=n(99748),c=n(59054),l=n(99952),u=n(74749),h=n(61843),p=n(48090),f=n(48404),d=n(29457),y=n(70065),v=n(52076),m=n(89167),g=n(13156),b=n(19226),w=n(36280),C=n(264),E=n(21053),k=n(70680),P=n(45114),T=n(70693),O=n(56906),S=n(40622),L=n(7190),_=n(26457),x=n(61159),R=n.n(x),j=n(95061);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 I(){I=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,i){var o=t&&t.prototype instanceof p?t:p,a=Object.create(o.prototype),s=new T(i||[]);return r(a,"_invoke",{value:C(e,n,s)}),a}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var h={};function p(){}function f(){}function d(){}var y={};c(y,o,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(O([])));m&&m!==t&&n.call(m,o)&&(y=m);var g=d.prototype=p.prototype=Object.create(y);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function i(r,o,a,s){var c=u(e[r],e,o);if("throw"!==c.type){var l=c.arg,h=l.value;return h&&"object"==V(h)&&n.call(h,"__await")?t.resolve(h.__await).then((function(e){i("next",e,a,s)}),(function(e){i("throw",e,a,s)})):t.resolve(h).then((function(e){l.value=e,a(l)}),(function(e){return i("throw",e,a,s)}))}s(c.arg)}var o;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){i(e,n,t,r)}))}return o=o?o.then(r,r):r()}})}function C(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return{value:void 0,done:!0}}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=u(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function E(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=u(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function P(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function O(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return f.prototype=d,r(g,"constructor",{value:d,configurable:!0}),r(d,"constructor",{value:f,configurable:!0}),f.displayName=c(d,s,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,c(e,s,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},b(w.prototype),c(w.prototype,a,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new w(l(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},b(g),c(g,s,"Generator"),c(g,o,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},e.values=O,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(P),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(s&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),P(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;P(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},e}function D(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function 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,(void 0,i=function(e,t){if("object"!==V(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==V(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key,"string"),"symbol"===V(i)?i:String(i)),r)}var i}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}function U(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 q(e){return q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},q(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&&N(e,t)}(B,e);var t,n,x,V,M=(x=B,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=q(x);if(V){var n=q(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return U(this,e)});function B(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,B),(t=M.call(this,e))._viewKeyRequested=!1,t}return t=B,(n=[{key:"initialize",value:function(){this.bindListeners(),this.initializeDataServices(),h.Si.initBackButton()}},{key:"name",get:function(){return"EditVideoChaptersView"}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editChapters"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"template",get:function(){return R()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:d.LP.EditVideoTabs},webplayer:{replaceElement:!0,el:".webplayer-region",partialLoading:d.LP.WebPlayer},addChapter:{replaceElement:!0,el:".add-chapter-region",partialLoading:d.LP.EditVideoChaptersForm},chapterList:{replaceElement:!0,el:".chapter-list-region",partialLoading:d.LP.EditVideoChapterList}}}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.Vk.CHAPTER,"".concat(p.M_.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError),this.listenTo(this.channelName,S.LibraryEditorActions.CreateChapter,this.onCreateChapter),this.listenTo(this.channelName,S.LibraryEditorActions.UpdateChapter,this.onUpdateChapter),this.listenTo(this.channelName,S.LibraryEditorActions.DeleteChapter,this.onDeleteChapter),this.listenTo(this.channelName,S.LibraryEditorActions.UpdateChapterTime,this.onTimeInputUpdate),this.listenTo(this.channelName,S.LibraryEditorActions.SeekToChapter,this.onSeekToChapter),this.listenTo(this.channelName,S.LibraryEditorActions.MergeChapters,this.onMergeChapters)}},{key:"initializeDataServices",value:function(){this.videoDataService=o.u.getInstance(p.Or.Video,this),this.chapterDataService=o.u.getInstance(p.Or.Chapter,this),this.playerDataService=o.u.getInstance(p.Or.Player,this)}},{key:"onVideoDataError",value:function(e){switch(e.type){case s.h.NotFound:i.Q.ErrorHelper.throw(new O.l1);break;case s.h.Forbidden:i.Q.ErrorHelper.throw(new O.aV)}}},{key:"onConcatenateDataError",value:function(e){e.type===s.h.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"updateChapters",value:function(){var e=this;if(C.g.hasLite){var t=this.chapters.toJSON().reverse().reduce((function(t,n){var r,i=t[t.length-1];return[].concat(function(e){if(Array.isArray(e))return D(e)}(r=t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||function(e,t){if(e){if("string"==typeof e)return D(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)?D(e,t):void 0}}(r)||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.")}(),[{timestamp:n.startTime,endTimestamp:(null==i?void 0:i.timestamp)||e.player.duration(),name:n.name}])}),[]).reverse();this.player.setChapters(t)}}},{key:"onCreateChapter",value:function(e){0===this.chapters.length&&0!==e.startTime&&this.createChapter({name:a.T.getPhrase(this.lang,"intro"),startTime:0}),this.createChapter(e)}},{key:"createChapter",value:function(e){var t=this,n=new u.W(e);this.chapters.add(n),n.set("loading",!0),this.chapterDataService.createChapter(this.model.get("id"),e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.renderChapterForm(),t.updateChapters(),t.logAction(e,y.UserAction.Create)}))}},{key:"onUpdateChapter",value:function(e){var t=this,n=this.chapters.find((function(t){return t.get("id")===e.id}));n.set("loading",!0);var r=g.J.updatedChaptersAlert(this.model.get("name"));this.chapterDataService.updateChapter(n.id,e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.updateChapters(),t.logAction(e,y.UserAction.Edit)}),r)}},{key:"onDeleteChapter",value:function(e){var t=this;e.set("loading",!0),this.chapterDataService.deleteChapter(e.id,(function(){t.logAction(e,y.UserAction.Delete),t.chapters.remove(e),t.updateChapters()}))}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"onTimeInputUpdate",value:function(e){e>=0&&e<=h.X4.millisecondsToSeconds(this.model.get("duration"))&&(this.player?this.player.currentTime(e):this.webPlayer.seekTo(e))}},{key:"logAction",value:function(e,t){var n=Object.assign({videoId:this.model.get("id")},e.pick("id","name","startTime"));v.k.logUserAction(n,{actionType:t,entity:y.EntityType.Chapter,location:y.LocationContext.EditVideoChapters})}},{key:"onSeekToChapter",value:function(e){return t=this,n=void 0,r=void 0,i=I().mark((function t(){var n,r;return I().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(e<0)){t.next=2;break}return t.abrupt("return");case 2:if(!this.player){t.next=9;break}return t.next=5,this.player.getChapters();case 5:return n=t.sent,r=n[e],this.player.currentTime(r.timestamp),t.abrupt("return");case 9:this.webPlayer.seekToChapter(e);case 10:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(e,o){function a(e){try{c(i.next(e))}catch(e){o(e)}}function s(e){try{c(i.throw(e))}catch(e){o(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(a,s)}c((i=i.apply(t,n||[])).next())}));var t,n,r,i}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[_.Um.SingleFile,_.Um.ConcatenationFailed];r.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==_.Um.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.render()}))}},{key:"renderChapterList",value:function(){this.showChildView("chapterList",new T.Q({collection:this.chapters,duration:this.model.get("duration"),channelName:this.channelName,showActions:!this.hasPhysicalChapters.get("value"),editable:!this.hasPhysicalChapters.get("value"),showHeader:!0}))}},{key:"renderChapterForm",value:function(){this.showChildView("addChapter",new P.L({model:new u.W,collection:this.chapters,creating:!0,duration:this.model.get("duration"),channelName:this.channelName,playerViewModelKey:"".concat(p._2.NAME,"-").concat(this.model.get("id"))}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("addChapter",new k.r({type:"chapters",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderEditComponents",value:function(){if(this.hasPhysicalChapters.get("value"))return this.renderConcatenationRequest(),void this.mapPhysicalChapters();this.renderChapterForm(),this.renderChapterList()}},{key:"renderTabs",value:function(){var e=h.BK.canEditVideo(this.model);this.showChildView("tabs",new E.W({model:this.model,tabs:h.Si.getEditVideoTabs(this.options.videoId,e),activeTab:".edit-chapters-applink",context:"chapters",folder:this.folder,libraries:this.libraries}))}},{key:"renderWebPlayer",value:function(){if(this.playerViewKey)return this.player=new w.l({model:this.playerViewKey,playerApiUrl:this.config.get("playerApiUrl"),channelName:this.channelName,inactivityTimeout:0}),void this.showChildView("webplayer",this.player);this.webPlayer=new m.Q({model:this.model,webPlayerUrl:this.config.get("webPlayerUrl"),captureAnalytics:!1,currentUser:this.currentUser}),this.showChildView("webplayer",this.webPlayer)}},{key:"mapPhysicalChapters",value:function(){var e=this;this.renderPartialLoading("chapterList");var t=function(t){e.chapters=new l.q(L.$k.mapPhysicalChapters(t)),e.renderChapterList()};this.player?this.player.getChapters().then(t):this.webPlayer.query("getChapters",t)}},{key:"redirectToVideoDetails",value:function(){i.Q.AppLinkHelper.trigger({application:p.OV.LIBRARY_EDITOR,action:p.eX.LibraryEditor.VIDEO_DETAILS,args:[this.model.get("id")]},{replace:!0})}},{key:"fetchData",value:function(){var e=this;if(this.model=this.videoDataService.getVideo(this.options.videoId),this.model){if(!h.BK.canEditVideo(this.model))return void this.redirectToVideoDetails();this.chapters=this.model.chapters,this.folder=this.model.categories.first(),C.g.hasLite&&!this._viewKeyRequested&&(this._viewKeyRequested=!0,this.playerDataService.createViewKey(this.model.get("id"),c.f.MasterObject,(function(t){e.playerViewKey=t,e.render()})))}this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||C.g.hasLite&&!this.playerViewKey||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"requiredResources",get:function(){return{config:f.p.config,currentUser:b.K.currentUser,libraries:j.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"onRender",value:function(){this.renderTabs(),this.renderWebPlayer(),this.renderEditComponents(),this.startPollingConcatenation()}}])&&A(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),B}(i.Q.View)},97781: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,null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.progress:o,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?o:""},2:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.escapeExpression;return' <span class="m-3 text-muted">'+a(e.lambda(null!=(o=null!=t?t.options:t)?o.progress:o,t))+'</span>\n <p class="pt-2">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:i}))+"</p>\n"},4:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.failed:o,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?o:""},5:function(e,t,n,r,i){return e.propertyIsEnumerable,'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:i}))+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return"<h4>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.heading:o,t))+"</h4>\n<p>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.line1:o,t))+"</p>\n<p>"+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.componentOptions:o)?o.line2:o,t))+'</p>\n<div class="btn-region"></div>\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.processing:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?o:"")},useData:!0})},43791: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,i){var o;return e.propertyIsEnumerable,'<h1 class="h3">\n '+e.escapeExpression("function"==typeof(o=null!=(o=n.name||(null!=t?t.name:t))?o:e.hooks.helperMissing)?o.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):o)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region pl-2"></div>'},useData:!0})},61159: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,i){return'<div class="tab-region w-100"></div>\n<div class="row">\n <div class="col-6 pt-3">\n <div class="webplayer-region"></div>\n <div class="add-chapter-region"></div>\n </div>\n <div class="col-6 mb-2 pt-3">\n <div class="chapter-list-region"></div>\n </div>\n</div>'},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1671],{54096:function(e,t,n){"use strict";n.d(t,{G:function(){return i}});var r=n(1024),a=n(21679);function i(e){var t,n;return t=e,n=a.u.getInstance(t),r.useEffect((function(){return function(){a.u.releaseInstance(t)}})),n}},79410:function(e,t,n){"use strict";n.d(t,{D:function(){return l}});var r=n(1024),a=n.n(r),i=n(58566),o=n(34279),c=n(4705),l=function(e,t,n){var r,l=(r=null==n?void 0:n.storage)?r===c.Z1.SessionStorage?c.qS:c.SG:null,s=null==l?void 0:l.get(e),u=(0,i.useDispatch)(),m=(0,i.useSelector)((function(t){return t.viewModelData[e]}));function d(){return null!=s}"undefined"!==s&&"null"!==s||(s=null);var p=(void 0!==t||d())&&void 0===m;function f(t,n){l&&function(t,n){if(l){var r=l.get(e);"string"!=typeof t||void 0===n?l.set(e,t):l.set(e,Object.assign(Object.assign({},r),{dataOrKey:n}))}}(t,n),u({type:o.B.UPDATE,payload:{viewModelKey:e,dataOrKey:t,keyData:n}})}return a().useEffect((function(){if(p)return d()?void f(s):void f(t)}),[]),p?d()?[s,f]:[t,f]:[null!=m?m:void 0,f]}},42227:function(){},41387:function(e,t,n){"use strict";n.d(t,{w:function(){return r}});var r={FILTER_PARAM_PREFIX:"filters.",MAX_CHECKBOXES_PER_COLUMN:10}},3344:function(e,t,n){"use strict";n.r(t),n.d(t,{ShareView:function(){return Vn}});var r,a=n(1024),i=n.n(a),o=n(58566),c=n(57857),l=n(86120),s=n(15408),u=n(66703),m=n(71575),d=n(2491),p=n(36357);!function(e){e.GoogleClassroom="google-classroom",e.MicrosoftTeams="microsoft-teams"}(r||(r={}));var f,v,y=c.T.encloseNamespace("shared.shared-utils"),g=function(e,t){return[{id:r.GoogleClassroom,name:y("googleClassroom"),enabled:null!=e&&e,settingName:p.E.ShareToGoogleClassroom},{id:r.MicrosoftTeams,name:y("msftTeams"),enabled:null!=t&&t,settingName:p.E.ShareToMicrosoftTeams}]},h=n(98495),b=n(40221),S=n(68003);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function C(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==E(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===E(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.ManageSubjectPreferences="subjects.preferences.manage",e.FollowSubjects="subjects.follow",e.ViewClassrooms="classrooms.view",e.ManageAllClassrooms="classrooms.manage.all",e.ShareToUsers="share.direct.users",e.ShareToClassrooms="share.direct.classrooms",e.ShareToClassroomGroups="share.direct.classroomgroups",e.CreateClassrooms="classrooms.create",e.DeleteClassrooms="classrooms.delete",e.StudentExperience="studentexperience",e.ManageUsers="users.manage",e.ManageIntegrations="integrations.manage",e.EditProfileDetails="profile.edit",e.ManageCustomerSettings="customersettings.manage",e.ManageLocalCache="localcache.manage",e.ViewCustomerAnalytics="analytics.customeranalytics.view",e.ManageShareLinkSettings="sharelink.settings.edit",e.ViewProductBoard="productboard.view",e.ViewTrialDuration="trial.duration.view",e.ViewTrialEndPage="trial.endpage.view",e.ViewInviteColleague="invitecolleague.view",e.UploadVideo="video.upload",e.FavouriteVideo="video.favourite",e.ViewVideoPointsOfInterest="video.pointsofinterest.view",e.ViewVideoGlance="video.glance.view",e.ViewVideoInteractives="video.interactives.view",e.ViewVideoClips="video.clips.view",e.ViewCurriculums="curriculums.view",e.ViewLibraries="libraries.view"}(f||(f={})),function(e){e.ManagePublicPresentation="presentation.public.manage",e.ManageDiscoverPreferences="discover.preferences.manage",e.ViewPlaylistsLanding="playlists.landing.view",e.ViewMyVideosLanding="myvideos.landing.view",e.ViewMyFavouritesLanding="myfavourites.landing.view",e.ViewWatchHistoryLanding="watchhistory.landing.view",e.WatchVideos="video.watch",e.UseVideoActions="video.actions",e.UseSeriesActions="series.actions",e.CanSubmitFeedback="feedback.submit",e.ViewNotifications="notifications.view",e.ViewTrendingTopics="classifications.trending.view"}(v||(v={}));var w=function(){var e=l.a.useBasicFetch(s.N.currentUser()),t=l.a.useBasicFetch(e.hasCompleted&&s.N.permissions()),n=function(e){var t,n=null==e?void 0:e.isAuthenticated;return C(t={},v.ManagePublicPresentation,!n),C(t,v.ManageDiscoverPreferences,n),C(t,v.ViewPlaylistsLanding,!n),C(t,v.ViewMyVideosLanding,!n),C(t,v.ViewMyFavouritesLanding,!n),C(t,v.ViewWatchHistoryLanding,!n),C(t,v.WatchVideos,n),C(t,v.UseVideoActions,n),C(t,v.UseSeriesActions,n),C(t,v.ViewNotifications,n),C(t,v.ViewTrendingTopics,n),C(t,v.CanSubmitFeedback,n),t}(e.data);return{permissions:t.data,hasPermissions:function(e){return!(!t.hasCompleted||t.hasError||e&&(null==e?void 0:e.length)&&(Array.isArray(e)?e.find((function(e){return!t.data[e]})):!t.data[e]))},hasLocalPermissions:function(e){return!(e&&(null==e?void 0:e.length)&&(Array.isArray(e)?e.find((function(e){return!n[e]})):!n[e]))},isLoaded:t.hasCompleted}},k=n(8952),O=n(53808),I=n(5256),T=n(90547),x=n(39396),j=n(63791),N="h8OBl";function A(e,t,n,r,a){var i="form-control";return n||(i+=" ".concat("cKcry")),"left"===e&&(i+=" ".concat("Rt24D")),("right"===e&&!t||"left"===e&&t)&&(i+=" ".concat("pxKzq")),"right"===e&&t&&(i+=" ".concat("Oerjh")),"lg"===a&&(i+=" form-control-lg"),"sm"===a&&(i+=" form-control-sm"),r&&(i+=" ".concat(r)),i}function P(e){var t="d-inline-block svg-container";return O.q.isFunction(e)?t+" cursor-pointer":t}function L(e){var t=e.onClickSearchIcon,n=e.searchIconPlacement,r=e.showClearInputIcon,i=e.onClickClearInput,o=e.highlightOnFocus,c=e.className,l=e.formSize,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}(e,["onClickSearchIcon","searchIconPlacement","showClearInputIcon","onClickClearInput","highlightOnFocus","className","formSize"]),u=function(){return a.createElement("div",{className:"d-inline-block"},a.createElement(x.x,{svgName:j.vn.Search,size:x.S.Standard,onClick:t,className:P(t)}))};return a.createElement("div",{className:"position-relative ".concat("utnMG")},"left"===n&&a.createElement("div",{className:"".concat(N," ").concat("L5mrV")},a.createElement(u,null)),a.createElement("input",Object.assign({className:A(n,r,o,c,l)},s)),("right"===n||!!r)&&a.createElement("div",{className:"".concat(N," ").concat("V23aG")},!!r&&a.createElement((function(){return a.createElement("div",{className:"d-inline-block text-muted ".concat("TAoT9")},a.createElement(x.x,{svgName:j.vn.Close,size:x.S.Standard,onClick:i,className:P(i)}))}),null),"right"===n&&a.createElement(u,null)))}var U=n(99910),V=n(2248),F=n(85887);function R(e){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R(e)}var D,_={isNumber:function(e){return _.isType(e,"number")},isString:function(e){return _.isType(e,"string")},isType:function(e,t){return R(e)===t}};function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function B(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,r=new Array(t);n<t;n++)r[n]=e[n];return r}function q(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==M(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==M(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===M(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function z(e,t){var n;return q(n={},D.Recent,t),q(n,D.Local,e),q(n,D.Remote,[]),q(n,D.Generic,[]),n}function H(e,t){return F.t.isObject(e)&&e.hasOwnProperty(t)&&_.isString(e[t])}function K(e,t){e(Object.assign(Object.assign({},z([],[])),q({},D.Generic,[{type:t,generic:!0}])))}function W(e,t,n){return function(r){var a,i,o=r.value,c=r.reason;if((null===(i=null===(a=e.allowableSuggestionFetchRequestedReasons)||void 0===a?void 0:a.includes(c))||void 0===i||i)&&(o.length||n(),!(o.length<e.activationLength))){if(e.local){var s=O.q.isFunction(e.getLocalSuggestions)?e.getLocalSuggestions(o,e.local):(u=o,m=e.local,d=e.valueKey,(p=u.trim().toLowerCase()).length?m.filter((function(e){return!(!H(e,d)||!_.isString(e[d]))&&e[d].trim().toLowerCase().includes(p)})):[]);if(!s.length&&e.getEmptyStateComponent)return void K(t,"empty");t((function(e){var t;return Object.assign(Object.assign({},e),(q(t={},D.Local,s),q(t,D.Generic,[]),t))}))}var u,m,d,p;e.getRemoteUrl&&(K(t,"loading"),function(n,r,a,i,o){var c=O.q.isFunction(n)&&n(r);c&&l.a.ajaxRequest({resource:c,type:V.k.GET,success:function(n){var r=O.q.isFunction(e.formatRemoteSuggestions)?e.formatRemoteSuggestions(n):n;r.length||!e.getEmptyStateComponent?t((function(e){var t;return Object.assign(Object.assign({},e),(q(t={},D.Remote,r),q(t,D.Generic,[]),t))})):K(t,"empty")},error:function(){K(t,"errored")},headers:o})}(e.getRemoteUrl,o,0,0,e.requestHeaders))}}}function Q(e,t,n,r,a){var i=function(t){var n=e[t];return n?n.map((function(e){return Object.assign(Object.assign({},e),{suggestionType:t})})):[]},o=i(D.Recent),c=i(D.Local),l=i(D.Remote),s=i(D.Generic);if(s.length)return[{data:s,suggestionType:D.Generic}];if(O.q.isFunction(r))return r([].concat(B(c),B(l),B(o)));var u=[];return((null==c?void 0:c.length)||(null==l?void 0:l.length))&&u.push({title:t,data:Z([].concat(B(c),B(l)),a),suggestionType:D.Local}),(null==o?void 0:o.length)&&u.push({title:n,data:Z(o,a),suggestionType:D.Recent}),u}function Z(e,t){return"boolean"==typeof t||e.length<=t?e:e.slice(0,t)}function $(e){return e.data}function X(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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||Y(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 Y(e,t){if(e){if("string"==typeof e)return J(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)?J(e,t):void 0}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e.Local="local",e.Recent="recent",e.Remote="remote",e.Generic="generic"}(D||(D={}));var ee="shared.searchBar",te=O.q.isFunction;function ne(e){return e.renderAsForm?a.createElement("form",{onSubmit:e.onSubmit},e.children):a.createElement(a.Fragment,null,e.children)}function re(e){var t,n=z(e.initialLocalSuggestions,e.recentSearches),r=X(a.useState(e.initialQuery||""),2),i=r[0],o=r[1],l=X(a.useState(n),2),s=l[0],u=l[1],m=X(a.useState(e.initialQuery||""),2),d=m[0],p=m[1],f=X(a.useState("none"),2),v=f[0],y=f[1],g=(0,I.a)(T.r.XS);a.useEffect((function(){if(!i.length){var t=z(e.initialLocalSuggestions,e.recentSearches);u(t)}}),[e.initialLocalSuggestions,e.recentSearches]),a.useEffect((function(){var t=e.initialQuery||"";i!==t&&(o(t),p(t))}),[e.initialQuery]);var b=function(){var t=z(e.initialLocalSuggestions,e.recentSearches);u(t)},S=function(){o(""),p("")};!function(e,t){a.useEffect((function(){e&&!e.current&&(e.current={resetQuery:t})}),[null==e?void 0:e.current])}(e.controlsRef,S);var E,C,w,x,j,N=function(){y("none")},A=function(t){t.preventDefault(),te(e.onSubmit)&&e.onSubmit(i),e.clearQueryOnSelect&&S()},P=a.useMemo((function(){return e.debounceTime?O.q.debounce(W(e,u,b),e.debounceTime):W(e,u,b)}),[e.debounceTime].concat(function(e){if(Array.isArray(e))return J(e)}(E=e.onSuggestionDependencies)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(E)||Y(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.")}()));return a.createElement(ne,{onSubmit:A,renderAsForm:!!e.renderAsForm},a.createElement(k,Object.assign({ref:function(e){null!==e&&(t=e.input)},suggestions:Q(s,e.suggestionsHeading,e.recentSearchHeading||c.T.getPhrase(ee,"recentSearchesHeading"),e.getSections,e.suggestionLimit),onSuggestionsFetchRequested:P,onSuggestionHighlighted:function(e){var t=e.suggestion;("none"!==v||t)&&y(t?"suggestion":"custom")},onSuggestionsClearRequested:function(){e.alwaysRenderSuggestions||b()},onSuggestionSelected:function(n,r){var a=r.suggestion;a.generic||(e.clearQueryOnSelect&&S(),e.onSuggestionSelected(a,t))},getSuggestionValue:function(t){return function(t){return te(e.shouldUpdateQueryOnSelection)?e.shouldUpdateQueryOnSelection(t):e.shouldUpdateQueryOnSelection}(t)?function(e,t){return H(t,e)?t[e]:""}(e.valueKey,t):i},renderSuggestion:function(t){if(t.generic){if("empty"===t.type)return i.length>=e.activationLength&&te(e.getEmptyStateComponent)?e.getEmptyStateComponent(i):a.createElement(a.Fragment,null);if("errored"===t.type&&te(e.getErrorStateComponent)){var n=W(e,u,b);return e.getErrorStateComponent((function(){return n({value:i,reason:"input-changed"})}))}if("loading"===t.type)return r=e.loadingComponentClassName,a.createElement("div",{className:"d-flex justify-content-center cursor-default ".concat(null!=r?r:""),onClick:function(e){e.stopPropagation()}},a.createElement(U.Spinner,{as:"span",animation:"border",role:"status"}))}var r;return te(e.getSuggestionComponent)?e.getSuggestionComponent(t):function(e,t){return H(t,e)?a.createElement(a.Fragment,null,t[e]):a.createElement(a.Fragment,null)}(e.valueKey,t)},renderSuggestionsContainer:function(t){var n=t.containerProps,r=n.ref,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}(n,["ref"]);if(!e.customScrollbarProps){var c={suggestions:s,query:i,isDropdownOpen:!!t.children};return a.createElement("div",Object.assign({ref:r},o,{onMouseOut:N}),t.children,e.getCreateComponent&&e.getCreateComponent(Object.assign({userInput:d,isActive:"custom"===v,onClear:function(){S(),b()}},c)),e.getFooterComponent&&e.getFooterComponent(c))}return a.createElement(h.ZP,Object.assign({ref:r},e.customScrollbarProps,o),t.children)},alwaysRenderSuggestions:e.alwaysRenderSuggestions,focusInputOnSuggestionClick:!g&&e.focusInputOnSuggestionClick,inputProps:{placeholder:e.placeholder||c.T.getPhrase(ee,"placeholder"),value:i,onChange:function(t,n){var r=n.newValue,a=n.method;"type"===a&&p(r),"escape"===a&&y("none"),["up","down"].includes(a)||(o(r),te(e.onQueryChange)&&e.onQueryChange(r))},onKeyDown:function(t){8===t.keyCode&&e.onBackspace&&!i&&e.onBackspace()},autoFocus:!!e.autoFocusInput,highlightOnFocus:e.highlightInputOnFocus,onClickSearchIcon:!!e.submitOnClickSearchIcon&&A,searchIconPlacement:e.searchIconPlacement,showClearInputIcon:!!e.showClearInputIcon&&!!i.length,onClickClearInput:function(){S(),te(e.onClickClearInput)&&e.onClickClearInput()},formSize:e.size,onBlur:function(){e.onBlur&&e.onBlur(i)}},renderInputComponent:L,theme:(C=e.theme,w=!!s.generic.length,x="function"==typeof C?C(w):C,j=function(e){return{container:"position-relative",suggestionsContainerOpen:"bg-white py-1 border rounded ".concat("avM9L"),suggestionsList:"list-unstyled m-0",suggestion:"".concat(e?"":"cursor-pointer"," py-1 px-2"),suggestionHighlighted:e?"":"gFitp",sectionContainer:"border-bottom py-1 ".concat("u35Wz")}}(w),Object.assign(j,x)),multiSection:!0,renderSectionTitle:function(t){return te(e.renderSectionTitle)?e.renderSectionTitle(t,e.sectionTitleClassName):function(e,t){if(e.title)return a.createElement("div",{className:"pb-1 ".concat(null!=t?t:"")},a.createElement("strong",null,e.title))}(t,e.sectionTitleClassName)},getSectionSuggestions:$},e.renderSuggestionsOnInputFocus?{shouldRenderSuggestions:function(){return te(e.renderSuggestionsOnInputFocus)?e.renderSuggestionsOnInputFocus(i):e.renderSuggestionsOnInputFocus}}:{})))}re.defaultProps={valueKey:"name",activationLength:3,suggestionLimit:5,recentSearches:[],initialLocalSuggestions:[],searchIconPlacement:"right",renderAsForm:!0,onSuggestionDependencies:[],shouldUpdateQueryOnSelection:!0,focusInputOnSuggestionClick:!0};var ae=n(74421),ie=n(63946),oe=function(e,t){return(null==e?void 0:e.typeId)===t},ce=n(83891),le=n(38182),se=n(1268),ue=n(46237),me="Zcpg3",de=c.T.encloseNamespace("shared.userRecipientItemMetadata");function pe(e){var t;return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(me," d-inline-block")},i().createElement(le.q,{imageUrl:null===(t=e.user.avatar)||void 0===t?void 0:t.url,imageCdnUrl:e.imageCdnUrl,initials:ce.l.getInitials(e.user.name,e.user.surname)})),i().createElement("div",{className:e.detailsClassName},i().createElement("h4",{className:"font-size-normal font-weight-normal m-0"},ce.l.getDisplayName(e.user)),i().createElement("p",{className:"text-muted m-0"},function(e){var t=ce.l.getUserType(e),n=ce.l.getUserRole(e);if(t===se.Y.Staff)return n===ue.i.Admin?de("admin"):de("staff");var r=ce.l.getYearGroup(e);return(null==r?void 0:r.name)?r.name:de("student")}(e.user))))}var fe=n(84611);function ve(e){return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(me," d-inline-block")},i().createElement(fe.f,{svgName:j.vn.Classrooms,variant:"teal"})),i().createElement("div",{className:e.detailsClassName},i().createElement("h4",{className:"font-size-normal font-weight-normal m-0"},e.classroom.name),i().createElement("p",{className:"text-muted m-0"},(n=null===(t=e.classroom.users)||void 0===t?void 0:t.count,Number.isInteger(n)?c.T.getPhrase("shared.classroomRecipientItemMetadata","subheading",{smartCount:n}):""))));var t,n}var ye=n(16287);function ge(e){switch(e){case ye.ClassroomGroupColour.Pink:return"pink";case ye.ClassroomGroupColour.Orange:return"orange";case ye.ClassroomGroupColour.Green:return"green";case ye.ClassroomGroupColour.Blue:return"blue";case ye.ClassroomGroupColour.Purple:return"purple";case ye.ClassroomGroupColour.Indigo:return"indigo";default:return"pink"}}function he(e){var t;return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(me," d-inline-block")},i().createElement(fe.f,{svgName:j.vn.Group,variant:ge(null===(t=e.classroomGroup.metadata)||void 0===t?void 0:t.colour)})),i().createElement("div",{className:e.detailsClassName},i().createElement("h4",{className:"font-size-normal font-weight-normal m-0"},e.classroomGroup.name),i().createElement("p",{className:"text-muted m-0"},function(e){var t,n,r,a=null!==(n=null===(t=e.users)||void 0===t?void 0:t.count)&&void 0!==n?n:0,i=null===(r=e.classroom)||void 0===r?void 0:r.name;return i?c.T.getPhrase("shared.classroomGroupRecipientItemMetadata","subheading",{classroomName:i,smartCount:a}):""}(e.classroomGroup))))}function be(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Se=c.T.encloseNamespace("share.recipientItem");function Ee(e){switch(e){case ae.E.User:return Se("removeUser");case ae.E.Classroom:return Se("removeClassroom");case ae.E.ClassroomGroup:return Se("removeGroup")}return null}function Ce(e){var t,n,r=(t=i().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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return be(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)?be(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.")}()),a=r[0],o=r[1],c="".concat("kdcb0"," d-flex");a&&(c+=" ".concat("xH6Mu"));var l="".concat(e.removeRecipient?"_V928":"v5EmV"," d-inline-block ml-2");return i().createElement("div",{className:c},oe(e.entity,ae.E.User)?i().createElement(pe,{user:e.entity,imageCdnUrl:e.imageCdnUrl,detailsClassName:l}):oe(e.entity,ae.E.Classroom)?i().createElement(ve,{classroom:e.entity,detailsClassName:l}):oe(e.entity,ae.E.ClassroomGroup)?i().createElement(he,{classroomGroup:e.entity,detailsClassName:l}):void 0,O.q.isFunction(e.removeRecipient)&&i().createElement("div",{className:"".concat("mCbMC"," d-inline-flex justify-content-center align-items-center")},a?i().createElement(U.Spinner,{as:"div",size:"sm",animation:"border",role:"status"}):i().createElement(ie.u,{title:Ee(e.entity.typeId),spanHack:!0},i().createElement("div",{className:"close cursor-pointer",role:"button",onClick:function(){o(!0),e.removeRecipient(e.entity.id,(function(){return o(!1)}))}},"×"))))}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ke(e){var t,n,r,a,o,c,l=e.query,s=void 0===l?"":l,m=e.imageUrl,d=(t=s,300,o=i().useState(t),c=2,r=(n=function(e){if(Array.isArray(e))return e}(o)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(o,c)||function(e,t){if(e){if("string"==typeof e)return we(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)?we(e,t):void 0}}(o,c)||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.")}())[0],a=n[1],i().useEffect((function(){var e=setTimeout((function(){return a(t)}),300);return function(){return clearTimeout(e)}}),[t,300]),r);return i().createElement("div",{className:"d-flex flex-column align-items-center text-center",onClick:function(e){e.stopPropagation()}},i().createElement("img",{alt:"",role:"presentation",src:m,className:"pb-2 ".concat("bKTf0")}),i().createElement("h2",{className:"h6"},i().createElement(u.x,{namespace:"shared.typeaheadEmptyState",phrase:"noResults",options:{query:d,smartCount:d.length}})))}var Oe=n(58424),Ie="shared.typeaheadErrorState";function Te(e){return i().createElement("div",{className:"d-flex flex-column align-items-center text-center",onClick:function(e){e.stopPropagation()}},i().createElement("img",{alt:"",role:"presentation",src:e.imageUrl,className:"pb-2 ".concat("k5mEG")}),i().createElement("h2",{className:"h6"},i().createElement(u.x,{namespace:Ie,phrase:"error"})),i().createElement(Oe.L,{onClick:function(t){t.stopPropagation(),e.onClickTryAgain()},className:"btn btn-link info-link p-0"},i().createElement(u.x,{namespace:Ie,phrase:"tryAgain"})))}function xe(e){var t=e.imageUrl,n=e.initials,r={};return t&&(r.backgroundImage="url('".concat(t,"')")),i().createElement("div",{className:"srrS3",style:r},t?i().createElement(i().Fragment,null," "):n)}var je="laVU4",Ne="rFH4W",Ae=c.T.encloseNamespace("shared.inputSelection");function Pe(e){var t,n="".concat(je," ").concat("BarYz");return e.typeId===ae.E.Classroom?n+=" text-teal":n+=" text-".concat(ge(null===(t=e.metadata)||void 0===t?void 0:t.colour)),n}function Le(e){var t,n=function(e){var t;switch(e.typeId){case ae.E.Classroom:return"text-hover-teal";case ae.E.ClassroomGroup:return"text-hover-".concat(ge(null===(t=e.metadata)||void 0===t?void 0:t.colour))}}(e.selection),r=e.selection.typeId===ae.E.Classroom;if(!e.canExpand){if(!e.selection.typeId||e.selection.typeId===ae.E.User){var a=e.selection;return i().createElement("div",{className:je},i().createElement(xe,{imageUrl:null===(t=a.avatar)||void 0===t?void 0:t.url,initials:ce.l.getInitials(e.selection.name,e.selection.surname)}))}return i().createElement(ie.u,{title:Ae(r?"emptyClassroom":"emptyGroup")},i().createElement("div",{className:"align-items-center border border-white bg-white ".concat(Ne)},i().createElement(x.x,{className:Pe(e.selection),svgName:r?j.vn.Classrooms:j.vn.Group})))}return e.hasExpanded?i().createElement("div",{className:"d-flex align-items-center text-white ".concat("iKeXW"," ").concat(je)},i().createElement(U.Spinner,{as:"div",size:"sm",animation:"border",role:"status"})):i().createElement(i().Fragment,null,i().createElement(Oe.L,{className:"align-items-center cursor-pointer text-white border border-white rounded-circle ".concat("d1NHd"," ").concat(n),onClick:e.onClickExpand},i().createElement(x.x,{svgName:j.vn.Plus,className:"d-flex align-items-center ".concat(je)})),i().createElement("div",{className:"align-items-center border border-white bg-white ".concat(Ne)},i().createElement(x.x,{className:Pe(e.selection),svgName:r?j.vn.Classrooms:j.vn.Group})))}function Ue(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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Ve(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)?Ve(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 Ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fe(e){var t;if(!e.typeId)return"dark-blue";switch(e.typeId){case ae.E.User:return"number"==typeof e.userType?2===e.userType?"dark-blue":"indigo":e.userType===se.Y.Learner?"dark-blue":"indigo";case ae.E.Classroom:return"teal";case ae.E.ClassroomGroup:return ge(null===(t=e.metadata)||void 0===t?void 0:t.colour)}}function Re(e){var t,n,r,a=oe(e.selection,ae.E.Classroom),o=oe(e.selection,ae.E.ClassroomGroup),c=e.onClickExpand&&(a||o),l=!!(null===(t=e.selection.users)||void 0===t?void 0:t.count),s=!!(null===(r=null===(n=e.selection.users)||void 0===n?void 0:n.data)||void 0===r?void 0:r.length),u=Ue(i().useState(!1),2),m=u[0],d=u[1],p=Ue(i().useState(c&&l),2),f=p[0],v=p[1];if(i().useEffect((function(){v(c&&l)}),[c,l]),s){var y=e.selection,g=Fe(e.selection);return i().createElement("div",{className:"d-flex align-items-center flex-wrap mr-1 mt-1 pb-1 pl-1 pr-4 position-relative border-".concat(g," text-").concat(g," ").concat("HF0E8")},y.users.data.map((function(t){return i().createElement(De,{key:"".concat(t.id,":").concat(e.selection.id),selection:t,colourVariant:g})})),i().createElement(Oe.L,{className:"cursor-pointer position-absolute text-".concat(g," ").concat("mgt6Y"),onClick:function(){return e.onClickRemove(e.selection.id)}},i().createElement(x.x,{svgName:j.vn.Close,className:"d-flex align-items-center ".concat(je)})))}return i().createElement(De,{selection:e.selection,canExpand:f,hasExpanded:m,onClickExpand:function(){d(!0),e.onClickExpand(e.selection.id)},onClickRemove:e.onClickRemove,colourVariant:Fe(e.selection)})}function De(e){var t=e.colourVariant||Fe(e.selection),n=e.selection.name;return e.selection.typeId===ae.E.User&&(n=ce.l.getDisplayName(e.selection)),i().createElement("div",{className:"".concat("vEOCt"," bg-").concat(t," badge-pill text-").concat(t," d-flex align-items-center mr-1 mt-1 overflow-hidden")},i().createElement(Le,{canExpand:e.canExpand,hasExpanded:e.hasExpanded,onClickExpand:e.onClickExpand,selection:e.selection}),i().createElement("span",{className:"mx-1 text-white"},n),O.q.isFunction(e.onClickRemove)&&i().createElement(Oe.L,{className:"d-flex align-items-center cursor-pointer align-self-stretch text-white ".concat("pyzCM"),onClick:function(){return e.onClickRemove(e.selection.id)}},i().createElement(x.x,{svgName:j.vn.Close,className:"d-flex align-items-center ".concat(je)})))}function _e(e){var t;return i().createElement("div",{className:"form-control h-auto d-flex align-items-top py-1 px-0 position-relative"},i().createElement(x.x,{className:"svg-container m-1",svgName:j.vn.Search}),i().createElement("div",{className:"".concat("kFjoN"," d-flex flex-wrap align-items-center mt-n1")},e.selections.map((function(t){return i().createElement(Re,{key:t.id,selection:t,onClickRemove:function(t){return e.removeSelection(t)},onClickExpand:e.fetchSelectionMembers})})),i().createElement(re,{getRemoteUrl:e.getRemoteUrl,requestHeaders:e.requestHeaders,formatRemoteSuggestions:e.formatRemoteSuggestions,onSuggestionSelected:function(t){e.updateSelections(t)},onBackspace:function(){return e.selections.length&&e.removeSelection(b.m.last(e.selections).id)},local:e.localSuggestions,recentSearchHeading:e.recentSearchHeading||c.T.getPhrase("shared.tokenizedTypeahead","recentSearchHeading"),recentSearches:e.recentSearches,placeholder:(null===(t=e.selections)||void 0===t?void 0:t.length)?" ":e.placeholder,searchIconPlacement:!1,activationLength:e.activationLength,clearQueryOnSelect:!0,getSuggestionComponent:function(t){return i().createElement(Ce,{entity:t,imageCdnUrl:e.imageCdnUrl})},getEmptyStateComponent:function(t){return i().createElement(ke,{query:t,imageUrl:e.emptyStateImageUrl})},getErrorStateComponent:function(t){return i().createElement(Te,{imageUrl:e.errorStateImageUrl,onClickTryAgain:t})},theme:{container:"Dc3kX",suggestionsContainerOpen:"bg-white py-1 rounded border mt-1 ".concat("c5t3e")},sectionTitleClassName:"pl-2",renderSuggestionsOnInputFocus:!0,debounceTime:e.debounceTime})),!!e.sharePermissionsDescription&&i().createElement("span",{className:"px-2 text-secondary text-nowrap"},e.sharePermissionsDescription))}var Me=n(59087);function Be(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ge=c.T.encloseNamespace("shared.copyInput");function qe(e){var t,n,r=(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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Be(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)?Be(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.")}()),i=r[0],o=r[1],c=a.createElement("div",{className:"input-group"},a.createElement("input",{type:"text",autoComplete:"off",className:"form-control ".concat("normal"===e.styling?"Q1UGv":""),spellCheck:!1,value:e.value,readOnly:!0}),a.createElement("div",{className:"input-group-append"},a.createElement(Me,{text:e.value},a.createElement("button",{className:"btn btn-outline-dark border border-secondary py-0 text-nowrap ".concat("J3fBx"),onClick:function(t){t.preventDefault(),e.onCopy&&e.onCopy(),i||(o(!0),setTimeout((function(){return o(!1)}),2e3))}},Ge(i?"copied":"copy")))));return e.label?a.createElement(U.Form.Group,null,a.createElement(U.Form.Label,null,e.label),c):c}qe.defaultProps={styling:"normal"};var ze,He=n(33192),Ke=n.n(He);function We(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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Qe(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)?Qe(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 Qe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(e){e.Expired="Expired",e.Active="Active"}(ze||(ze={}));var Ze=c.T.encloseNamespace("share.shareLinkInfo");function $e(e){var t=We(i().useState(!1),2),n=t[0],r=t[1],a=We(i().useState(!1),2),o=a[0],c=a[1],l=function(e){var t=e.linkExpireDate,n=e.isPasswordProtected,r=e.status;if(!t&&!n)return function(e){var t=e.entityTypeId,n=e.privacy,r=e.hasPrivatePlaylistVideos;if(t===ae.E.Playlist)return r?{icon:j.vn.Warning,text:Ze("hasPrivateVideos")}:{icon:j.vn.VisibleOn,text:Ze("public")};if(t===ae.E.Topic||t===ae.E.Series)return{icon:j.vn.VisibleOn,text:Ze("justMySchool")};if(!Array.isArray(n))switch(n.privacy){case"public":return{icon:j.vn.VisibleOn,text:Ze("public")};case"protected":return{icon:j.vn.VisibleOn,text:Ze("clickViewOnly")};case"just_my_customer":return{icon:j.vn.Lock,text:Ze("justMySchool")};case"restricted":case"private":return{icon:j.vn.Lock,text:Ze("private")};default:return{}}}(e);if(!t)return{icon:j.vn.Lock,text:Ze("password")};var a=Ke().utc(t).local(),i=Ke()(),o=a.isSame(i,"day"),c=a.diff(i,"days");if(!n){var l=o?Ze("expiryToday"):Ze("expiry",{days:c});return r===ze.Expired&&(l=Ze("expired")),{icon:j.vn.Timer,text:l}}var s=o?Ze("passwordExpiryToday"):Ze("passwordExpiry",{days:c});return r===ze.Expired&&(s=Ze("passwordExpired")),{icon:j.vn.Lock,text:s}}(Object.assign(Object.assign({},e),{hasPrivatePlaylistVideos:o})),s=l.icon,u=l.text;return i().useEffect((function(){if(Array.isArray(e.privacy)){if(e.privacy.length&&e.entityTypeId===ae.E.Playlist){var t=e.privacy.some((function(e){return!!e.canManageAccess&&("private"===e.privacy||"restricted"===e.privacy)}));r(t),c(t)}}else r(e.privacy.canManageAccess)}),[e.privacy]),i().createElement("div",{className:"d-flex align-items-center"},i().createElement(x.x,{svgName:s,className:"svg-container mr-1"}),n&&e.onClickShowPrivacies?i().createElement(Oe.L,{className:"info-link",onClick:e.onClickShowPrivacies},u):i().createElement("span",null,u))}var Xe,Ye=n(52076),Je=n(22218);function et(e){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},et(e)}function tt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==et(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==et(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===et(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(Xe||(Xe={}));var nt,rt={namespace:"share"},at=function(e,t){e.sort();var n={id:e};return t===ae.E.User&&(n.query="yearGroups,avatar"),t===ae.E.Classroom&&(n.query="users[count()]{limit:0}"),t===ae.E.ClassroomGroup&&(n.query="classroom,users[count()]{limit:0}"),{url:S._.urlBuilder("{gateway}/v1/objects",n),key:"share:recipients:".concat(e.join(":"),":").concat(t)}},it=n(4705),ot={getRecentItem:function(e,t){var n=t.cacheGet(e);return Array.isArray(n)||(n=[]),n},setRecentItem:function(e,t,n){Array.isArray(t)&&n.cacheSet(e,t)},addRecentItem:function(e,t,n){var r=n.id,a=n.limit,i=void 0===a?5:a,o=ot.getRecentItem(e,t),c=o.indexOf(r);return c>-1&&o.splice(c,1),o.unshift(r),o.length>i&&(o=o.slice(0,i)),ot.setRecentItem(e,o,t),o},removeRecentItem:function(e,t,n){var r=ot.getRecentItem(e,n).filter((function(e){return e!==t.toString()}));ot.setRecentItem(e,r,n)}},ct=function(e){return"recently:shared:to:".concat(e)},lt=(n(90335),n(84657));!function(e){e.Topic="topic",e.Series="series",e.Playlist="playlist"}(nt||(nt={})),n(50028);var st,ut,mt,dt,pt=(n(42227),n(48318));(dt=st||(st={})).Newest="newest",dt.Oldest="oldest",dt.RecentlyUpdated="recently_added",dt.AtoZ="atoz",dt.ZtoA="ztoa",(mt=ut||(ut={})).OwnedByMe="owned_by_me",mt.Followed="followed",mt.All="all",pt.BaseCollectionIdentifier,n(18830);var ft,vt;!function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos",e.PinnedVideos="pinnedVideos"}(ft||(ft={})),function(e){e.Subject="Subject",e.Curriculum="Curriculum"}(vt||(vt={})),n(85523);var yt=c.T.encloseNamespace("shared.share"),gt={getObjectTypeId:function(e){switch(e){case"video":return ae.E.Video;case"playlist":return ae.E.Playlist;case"subject":return ae.E.Subject;case"series":return ae.E.Series;case"interactive":return ae.E.Interactive;case"clip":return ae.E.Clip}},createLink:function(e){var t={resourceId:e.entity.id};e.password&&(t.password=e.password),e.linkExpireDate&&(t.linkExpireDate=e.linkExpireDate),l.a.fetch(e.dispatch,function(e,t,n,r){return{url:"{gateway}/v1/share/links",key:"create:share:link",type:V.k.POST,data:e,normalizeOptions:rt,invalidationKeys:["share:link:object:".concat(e.resourceId),"privacy:".concat(e.resourceId)],success:t,error:n,always:r}}(t,(function(t){Ye.k.logUserAction(t,Ye.k.mergeOptions(gt.getAnalyticsOptions(e.entityType),{actionType:Je.Vw.Create,entity:Je.py.ShareLink,eventVersion:Je.eq.V3})),e.success&&e.success(t)}),(function(){e.alerts.error(yt("createLinkError",{name:e.entity.name}))})))},updateLink:function(e,t,n,r,a,i,o,c){l.a.fetch(e,function(e,t,n,r,a){return{url:"{gateway}/v1/share/links/".concat(e.id),key:"edit:share:link",data:t,type:V.k.PUT,normalizeOptions:rt,invalidationKeys:["share:".concat(e.id),"share:link:object:".concat(e.objectId),"share:sent"],success:n,error:r,always:a}}(r,a,(function(e){Ye.k.logUserAction(e,Ye.k.mergeOptions(gt.getAnalyticsOptions(n),{actionType:Je.Vw.Edit,entity:Je.py.ShareLink,eventVersion:Je.eq.V3})),o&&o(e),i.success(yt("editSuccess",{name:t.name,escapeText:!0}))}),(function(){c&&c(),i.error(yt("editError",{name:t.name,escapeText:!0}))})))},deleteLink:function(e,t,n,r,a,i,o){l.a.fetch(e,function(e,t,n,r){return{url:"{gateway}/v1/share/links/".concat(e.id),key:"delete:share:link",type:V.k.DELETE,normalizeOptions:rt,invalidationKeys:["share:".concat(e.id),"share:link:object:".concat(e.objectId)],success:t,error:n,always:r}}(r,(function(){Ye.k.logUserAction({shareLink:r},Ye.k.mergeOptions(gt.getAnalyticsOptions(n),{actionType:Je.Vw.Delete,entity:Je.py.ShareLink})),i&&i(),a.success(yt("deleteSuccess",{name:t.name,escapeText:!0}))}),(function(){a.error(yt("deleteError",{name:t.name,escapeText:!0}))}),(function(){o&&o()})))},createOrUpdateDirectShare:function(e){var t=e.dispatch,n=e.entity,r=e.entityType,a=e.currentUser,i=e.recipients,o=e.sentDirectShare,c=e.message,s=e.onSuccess,u=e.onError,m=e.onDone,d=function(e){s&&s(e),Ye.k.logUserAction(Object.assign(Object.assign({},n),{shareCount:i.length}),Ye.k.mergeOptions(gt.getAnalyticsOptions(r),{actionType:Je.Vw.Share,descriptor:Je.YM.DirectShare,eventVersion:Je.eq.V3})),i.map((function(e){!function(e,t){ot.addRecentItem(ct(e),it.SG,t)}(a.id,{id:e.id})}))},p={objectId:n.id,objectTypeId:gt.getObjectTypeId(r),recipients:i,message:c},f={recipients:i,message:c},v=o?function(e,t,n,r,a){var i="direct:share:recipients:".concat(e);return{url:"{gateway}/v1/share/".concat(e,"/recipients"),key:"edit:direct:share",data:t,type:V.k.POST,normalizeOptions:rt,invalidationKeys:"share:sent",updateState:{keys:i,updateData:function(e){return!e[i]||t.recipients.length?e:Object.assign(Object.assign({},e),tt({},i,[]))}},success:n,error:r,always:a}}(o.id,f,d,u,m):function(e,t,n,r){return{url:"{gateway}/v1/share",key:"create:direct:share",data:e,type:V.k.POST,normalizeOptions:rt,invalidationKeys:["direct:share:sent:object:".concat(e.objectId),"share:sent"],success:t,error:n,always:r}}(p,d,u,m);l.a.fetch(t,v)},removeDirectShareRecipient:function(e,t,n,r,a,i){l.a.fetch(e,function(e,t,n,r,a){var i="direct:share:recipients:".concat(e);return{url:S._.urlBuilder("{gateway}/v1/share/".concat(e,"/recipients"),{recipientId:t}),key:"remove:direct:share:recipient",type:V.k.DELETE,normalizeOptions:rt,invalidationKeys:"share:sent",updateState:{keys:i,updateData:function(e){return e[i]?Object.assign(Object.assign({},e),tt({},i,[])):e}},success:n,error:r,always:a}}(r.id,t,(function(e){a&&a(e),Ye.k.logUserAction({shareCount:1},Ye.k.mergeOptions(gt.getAnalyticsOptions(n),{actionType:Je.Vw.Unshare}))}),i))},getDirectShareRecipientsRequest:function(e){var t,n,r,a;return!!(null===(t=null==e?void 0:e.recipients)||void 0===t?void 0:t.length)&&(n=e.id,r=e.recipients,a=r.map((function(e){return"id=".concat(e.id)})).join("&"),{url:"{gateway}/v1/objects?".concat(a),key:"direct:share:recipients:".concat(n)})},useHydrateRecipients:function(e){var t=b.m.groupBy(e,"typeId"),n=t[ae.E.User],r=t[ae.E.Classroom],a=t[ae.E.ClassroomGroup];l.a.useBasicFetch(!!(null==n?void 0:n.length)&&at(n.map((function(e){return e.id})),ae.E.User)),l.a.useBasicFetch(!!(null==r?void 0:r.length)&&at(r.map((function(e){return e.id})),ae.E.Classroom)),l.a.useBasicFetch(!!(null==a?void 0:a.length)&&at(a.map((function(e){return e.id})),ae.E.ClassroomGroup))},getAnalyticsOptions:function(e){var t;switch(e){case"playlist":t=Je.py.Playlist;break;case"subject":t=Je.py.Classification;break;case"video":t=Je.py.Video;break;case"series":t=Je.py.Series;break;case"interactive":t=Je.py.Interactive;break;case"clip":t=Je.py.Clip}return{entity:t,location:Je.LZ.Popup,workflowPhase:Je.eu.Complete}},getFetchFunctionByType:function(e){switch(e){case"video":return function(e){return l.a.useBasicFetch(function(e,t){return{url:S._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:lt.v.VIDEO,permissionFilterOption:t}),publicUrl:S._.urlBuilder("/api/objects/".concat(e),{query:lt.t.VIDEO}),key:"videos:".concat(e,":").concat(t),formatData:function(e){var t,n;return(null===(t=e.interactives)||void 0===t?void 0:t.data)&&(e.interactives.data=e.interactives.data.map((function(t){return Object.assign(Object.assign({},t),{video:{id:e.id}})}))),(null===(n=e.clips)||void 0===n?void 0:n.data)&&(e.clips.data=e.clips.data.map((function(t){return Object.assign(Object.assign({},t),{video:{id:e.id}})}))),e}}}(e))};case"playlist":return function(e){return l.a.useBasicFetch(function(e,t,n){return{url:S._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"".concat(lt.v.PLAYLIST,",_isClickViewPlaylist,_liteOwner")}),publicUrl:S._.urlBuilder("/api/objects/".concat(e),{query:"".concat(lt.v.PLAYLIST,",_isClickViewPlaylist")}),key:"playlist:".concat(e),success:t,error:n}}(e))};case"subject":return function(e,t){return l.a.useBasicFetch(function(e,t,n){return{url:S._.urlBuilder("/api/domain/v1/subjects/".concat(e),{query:lt.v.CLASSIFICATION(t)}),publicUrl:S._.urlBuilder("/api/subjects/classifications/".concat(e),{query:lt.t.CLASSIFICATION}),key:"classification:".concat(e),error:n}}(e,t))};case"series":return function(e){return l.a.useBasicFetch(function(e){var t={query:lt.v.SERIES};return{url:S._.urlBuilder("{gateway}/v1/objects/".concat(e),t),publicUrl:S._.urlBuilder("/api/objects/".concat(e),t),key:"series:".concat(e)}}(e))};case"interactive":return function(e){return l.a.useBasicFetch(function(e,t){return{url:S._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:lt.v.INTERACTIVE,permissionFilterOption:t}),key:"interactive:metadata:".concat(e,":").concat(t)}}(e))};case"clip":return function(e){return l.a.useBasicFetch(function(e,t){return{key:"clip:".concat(e,":").concat(t),url:S._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:lt.v.CLIP,permissionFilterOption:t})}}(e))}}},getImageUrl:function(e){var t,n,r,a,i,o,c,l;return"thumbnail"in e&&e.thumbnail?null===(t=e.thumbnail)||void 0===t?void 0:t.url:"cover"in e?null===(n=e.cover)||void 0===n?void 0:n.url:"tallPoster"in e?null===(r=e.tallPoster)||void 0===r?void 0:r.url:"video"in e&&e.video?null===(i=null===(a=e.video)||void 0===a?void 0:a.thumbnail)||void 0===i?void 0:i.url:"clip"in e?null===(l=null===(c=null===(o=null==e?void 0:e.clip)||void 0===o?void 0:o.video)||void 0===c?void 0:c.thumbnail)||void 0===l?void 0:l.url:""}},ht=n(70065);function bt(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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return St(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)?St(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 St(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Et="share.shareAsLink";function Ct(e){var t=bt(i().useState(!1),2),n=t[0],r=t[1],a=bt(i().useState(!1),2),o=a[0],l=a[1];return i().useEffect((function(){r(!!e.shareLinkIsLoading)}),[e.shareLinkIsLoading]),n?i().createElement("div",{className:"text-center"},i().createElement(U.Spinner,{as:"div",animation:"border",role:"status"})):i().createElement(i().Fragment,null,i().createElement("div",{className:"d-flex justify-content-between"},i().createElement("h3",{className:"h6"},i().createElement(u.x,{phrase:"shareALink"})),e.shareLink&&("playlist"===e.entityType||"series"===e.entityType)&&i().createElement(ie.u,{title:"playlist"===e.entityType||"series"===e.entityType?c.T.getPhrase(Et,"deleteLinkTooltipPlaylist"):"",spanHack:!0},i().createElement(Oe.L,{onClick:e.onClickDeleteLink,className:"info-link justify-self-start"},i().createElement(u.x,{namespace:Et,phrase:"deleteLink"})))),i().createElement("div",{className:"d-flex justify-content-between align-items-center"},i().createElement("div",{className:"".concat(e.shareLink?"w-100":"w-75 d-flex align-items-center")},e.shareLink?i().createElement(i().Fragment,null,i().createElement("div",{className:"d-flex justify-content-between align-items-center mb-1"},i().createElement($e,{linkExpireDate:e.shareLink.linkExpireDate,isPasswordProtected:e.shareLink.isPasswordProtected,privacy:e.privacy,entityTypeId:e.shareLink.objectTypeId,status:e.shareLink.status,onClickShowPrivacies:e.onClickShowPrivacies}),e.canAddPolicies&&i().createElement(Oe.L,{className:"cursor-pointer",onClick:e.onClickShowSettings},i().createElement(x.x,{svgName:j.vn.Cog}))),i().createElement(qe,{value:e.shareLink.url,onCopy:function(){o||(l(!0),Ye.k.logUserAction(Object.assign({},e.entity),Ye.k.mergeOptions(gt.getAnalyticsOptions(e.entityType),{actionType:ht.UserAction.Share,descriptor:ht.ShareDescriptors.CopyLink,eventVersion:ht.EventVersion.V3})))}})):i().createElement("div",{className:"d-flex align-items-center"},i().createElement(x.x,{svgName:j.vn.Link,className:"svg-container mr-1"}),i().createElement("span",null,i().createElement(u.x,{namespace:Et,phrase:"generate"})))),!e.shareLink&&i().createElement(Oe.L,{className:"info-link",onClick:function(){r(!0),e.onClickCreateLink()}},i().createElement(u.x,{phrase:"createLink"}))))}var wt=n(5173),kt=n(92802),Ot=n(86347),It=n(63038),Tt=n(85610),xt=c.T.encloseNamespace("share.shareMessage"),jt=wt.Ry().shape({message:wt.Z_().max(280,(function(){return xt("maxMessageLen")}))});function Nt(){var e=(0,Ot.b)();return i().createElement(kt.l0,null,i().createElement(It.W,{component:"textarea",name:"message",id:"message",placeholder:xt("placeholder"),value:e.values.message,label:xt("label"),showOptionalLabel:!0}),i().createElement(Tt.u,null,i().createElement(Tt.u.Submit,{variant:"dark",text:xt("share")})))}function At(e){return i().createElement(Ot.n,{initialValues:{message:""},validationSchema:jt,onSubmit:function(t,n){var r=null;t.message&&(r=t.message),e.onClickShare(r,n)},allowInitialSubmit:!0},i().createElement(Nt,null))}var Pt=n(41387),Lt=n(79410),Ut=n(54753),Vt=n(52086);function Ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rt(e){var t,n,r=(t=(0,Lt.D)(Vt.g.LOOKING_FOR_INTEGRATION,{show:!0},{storage:it.Z1.LocalStorage}),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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Ft(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)?Ft(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.")}()),i=r[0],o=r[1];return i.show?a.createElement("div",{className:"d-flex justify-content-between rounded mt-3 p-2 ".concat("hVQto")},a.createElement(Ut.F,{appLink:e.appLink,onClick:function(){var t;return null===(t=e.closePopup)||void 0===t?void 0:t.call(e)},className:"d-inline-flex align-items-center mb-0"},a.createElement("span",{className:"ml-1 font-weight-500 text-info"},c.T.getPhrase("shared.lookingForIntegration","lookingForIntegration"))),a.createElement(x.x,{svgName:j.vn.Close,size:x.S.Small,className:"text-info d-inline-block svg-container cursor-pointer",onClick:function(){return o({show:!1})}})):a.createElement(a.Fragment,null)}var Dt="g-share-to-classroom";function _t(e){var t;if(t=e.integrations,i().useEffect((function(){var e;t.includes(r.GoogleClassroom)&&(null===(e=null===gapi||void 0===gapi?void 0:gapi.sharetoclassroom)||void 0===e||e.go(Dt))}),[t.includes(r.GoogleClassroom)]),i().useEffect((function(){t.includes(r.MicrosoftTeams)&&(null===shareToMicrosoftTeams||void 0===shareToMicrosoftTeams||shareToMicrosoftTeams.renderButtons())}),[t.includes(r.MicrosoftTeams)]),!e.integrations.length)return i().createElement(Rt,{appLink:e.appLink,closePopup:e.closePopup});var n="".concat("Rkyqz"," rounded mx-1");return i().createElement("div",{className:"d-flex mt-2 mx-n1"},e.integrations.includes(r.GoogleClassroom)&&i().createElement("div",{id:Dt,className:"".concat(n," partial-loading-background")},i().createElement("div",{className:"g-sharetoclassroom","data-size":"32","data-url":e.url})),e.integrations.includes(r.MicrosoftTeams)&&i().createElement("div",{className:"teams-share-button ".concat(n," ").concat("mPAD2"),"data-href":e.url,"data-button-type":"smallTransWhite","data-preview":"false","data-icon-px-size":"32"}))}function Mt(e){return Mt="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},Mt(e)}function Bt(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==Mt(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==Mt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===Mt(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gt(e){return function(e){if(Array.isArray(e))return zt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||qt(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 qt(e,t){if(e){if("string"==typeof e)return zt(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)?zt(e,t):void 0}}function zt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Ht=c.T.encloseNamespace("shared.share");function Kt(e,t,n,r){if(!e)return[];var a=[].concat(Gt(t),Gt(n)).map((function(e){return e.id}));return e.filter((function(e){return!a.includes(e.id)&&e.id!==r}))}function Wt(e){var t,n,r,a=(n=i().useState([]),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(n,r)||qt(n,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.")}()),o=a[0],c=a[1],l=w().hasPermissions,s=l(f.ManageIntegrations),m=l([f.ShareToUsers,f.ShareToClassrooms,f.ShareToClassroomGroups]),d=Kt(e.recentlySharedTo,o,e.directShareRecipients,e.currentUser.id);return i().createElement(i().Fragment,null,m&&i().createElement("div",{className:"d-flex justify-content-between align-items-center pb-3"},i().createElement(_e,{key:null!==(t=null==d?void 0:d.map((function(e){return e.id})).join(":"))&&void 0!==t?t:"share:search",getRemoteUrl:function(t){var n,r=S._.safeUrlConcat(e.gatewayApiUrl,"v1/search/users"),a=[];return l(f.ShareToUsers)&&a.push("users"),l(f.ShareToClassrooms)&&a.push("classroom"),l(f.ShareToClassroomGroups)&&a.push("classroom_group"),S._.urlBuilder(r,(Bt(n={query:t,index:a},"".concat(Pt.w.FILTER_PARAM_PREFIX,"customerId"),e.currentUser.customerId),Bt(n,"limit",10),n))},requestHeaders:e.searchRequestHeaders,formatRemoteSuggestions:function(t){return Kt(null==t?void 0:t.results,o,e.directShareRecipients,e.currentUser.id)},recentSearches:d,selections:o,updateSelections:function(e){return c([].concat(Gt(o),[e]))},removeSelection:function(e){return c(o.filter((function(t){return t.id!==e})))},placeholder:Ht("searchPlaceholder"),imageCdnUrl:e.imageCdnUrl,activationLength:2,fetchSelectionMembers:e.fetchRecipientUsers&&function(t){e.fetchRecipientUsers&&e.fetchRecipientUsers(t,(function(e){var n=[];o.forEach((function(r){var a;if(r.id!==t)return n.push(r);var i=F.t.deepClone(r);(null===(a=null==e?void 0:e.data)||void 0===a?void 0:a.length)?i.users=e:i.users={count:0,data:[],pagination:null},n.push(i)})),c(b.m.uniq(n,"id"))}))},debounceTime:300,emptyStateImageUrl:e.emptyStateImageUrl,errorStateImageUrl:e.errorStateImageUrl})),!o.length&&e.directShareRecipients.length?i().createElement("div",null,i().createElement("h3",{className:"font-size-normal"},i().createElement(u.x,{phrase:"sharedTo"})),i().createElement(h.ZP,{autoHeight:!0},i().createElement("ul",{className:"list-unstyled"},e.directShareRecipients.map((function(t){return i().createElement("li",{key:t.id,className:"mb-2 pr-1"},i().createElement(Ce,{entity:t,imageCdnUrl:e.imageCdnUrl,removeRecipient:e.onClickRemoveRecipient}))}))))):i().createElement(i().Fragment,null),o.length?i().createElement(At,{onClickShare:function(t,n){e.onClickShare(o.map((function(e){return{id:e.id,typeId:e.typeId}})),t,(function(){c([]),n()}))}}):i().createElement("div",{className:"mx-n3 px-3 ".concat(m?"pt-3 border-top":"")},i().createElement(Ct,{entity:e.entity,entityType:e.entityType,shareLink:e.shareLink,onClickShowSettings:e.onClickShowSettings,onClickCreateLink:e.onClickCreateLink,shareLinkIsLoading:e.shareLinkIsLoading,canAddPolicies:e.canAddPolicies,privacy:e.privacy,entityTypeId:e.entity.typeId,onClickShowPrivacies:e.onClickShowPrivacies,onClickDeleteLink:e.onClickDeleteLink}),!!e.shareLink&&e.enableIntegrationBanner&&i().createElement(_t,{integrations:e.integrations,url:e.shareLink.url,closePopup:e.closePopup,appLink:s?e.integrationSettingAppLink:e.messagePopupAppLink})))}var Qt=n(42905),Zt=n(39023),$t="share.embedSize";function Xt(e){var t=e.autoplay,n=e.setAutoplay,r=e.videoSize,a=e.setVideoSize,o=e.videoSizes;return i().createElement("div",{className:"d-flex align-items-center"},!!o.length&&i().createElement(i().Fragment,null,i().createElement("div",{className:"mr-1"},i().createElement(u.x,{namespace:$t,phrase:"videoSize"})),i().createElement("div",{className:"pr-3"},i().createElement(U.Dropdown,null,i().createElement(U.Dropdown.Toggle,{id:"embed-resolution",variant:"outline-dark"},r.label),i().createElement(U.Dropdown.Menu,null,o.map((function(e){return i().createElement(U.Dropdown.Item,{key:"".concat(e.width,"x").concat(e.height),onClick:function(){return a(e)}},e.label)})))))),i().createElement("div",{className:"mr-2"},i().createElement(u.x,{namespace:$t,phrase:"autoplay"})),i().createElement(Zt.X,{id:"autoplay-checkbox",checked:t,onChange:function(){return n(!t)}}))}function Yt(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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Jt(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)?Jt(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 Jt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var en="share.copyEmbedHtml",tn=c.T.encloseNamespace(en);function nn(e){var t=Qt.i.getEmbedResolutions(),n=Yt(i().useState("copy"),2),r=n[0],a=n[1],o=Yt(i().useState(!1),2),c=o[0],l=o[1],s=Yt(i().useState(t.find((function(e){return"100%"===e.width}))),2),m=s[0],d=s[1],p=Yt(i().useState(!1),2),f=p[0],v=p[1],y=Qt.i.buildEmbedUrl({embedUrl:e.embedUrl,host:e.config.primaryUrl,shareId:e.shareId,autoplay:c}),g=Qt.i.getEmbedString({url:y,size:m});return i().createElement(u.D.Provider,{value:en},i().createElement("label",null,i().createElement(u.x,{namespace:en,phrase:"label"})),i().createElement("div",{className:"input-group mb-2"},i().createElement("textarea",{className:"form-control rounded w-100 h-100 ".concat("mwvd0"),spellCheck:!1,value:g,rows:5,readOnly:!0}),i().createElement("div",{className:"input-group-append ".concat("myePx")},i().createElement(Me,{onCopy:function(){a("copied"),setTimeout((function(){return a("copy")}),2e3),f||(v(!0),Ye.k.logUserAction(Object.assign(Object.assign({},e.entity),{embedDetails:{size:m,autoplay:c}}),Ye.k.mergeOptions(gt.getAnalyticsOptions(e.entityType),{actionType:ht.UserAction.Share,descriptor:ht.ShareDescriptors.CopyEmbedHtml,eventVersion:ht.EventVersion.V3})))},text:g},i().createElement("button",{className:"btn btn-outline-dark border border-secondary ".concat("zgdag"),type:"button"},tn(r))))),i().createElement(Xt,{autoplay:c,setAutoplay:l,videoSize:m,setVideoSize:d,videoSizes:t}))}var rn=(0,wt.Ry)().shape({removePassword:(0,wt.O7)(),resourceId:(0,wt.Z_)(),linkExpireDate:(0,wt.Z_)().nullable(),password:(0,wt.Z_)().test({name:"password-length",exclusive:!1,params:{},message:c.T.getPhrase("share.validation","minPassword"),test:function(e){return!((null==e?void 0:e.length)&&e.length<3)}}).default("")}),an=n(9063);function on(e){if(!e)return null;var t=new Date;return t.setDate(t.getDate()+30),t.toISOString()}var cn="shared.linkExpiry",ln=c.T.encloseNamespace(cn);function sn(e){var t=(0,kt.u6)();return i().createElement("div",{className:"d-flex justify-content-between align-items-center pb-3"},i().createElement("div",null,i().createElement("label",{className:"m-0",htmlFor:""},i().createElement(u.x,{namespace:cn,phrase:"linkExpirationHeading"})),i().createElement("p",{className:"m-0"},i().createElement(u.x,{namespace:cn,phrase:"linkExpirationInfo"}))),i().createElement(ie.u,{title:ln("passwordProtected"),disable:!e.passwordProtectLink,spanHack:!0,trigger:"hover"},i().createElement(an.Z,{onClick:function(){e.passwordProtectLink||t.setFieldValue("linkExpireDate",on(!t.values.linkExpireDate))},on:!!t.values.linkExpireDate,disabled:e.passwordProtectLink,showStateWhenDisabled:!0})))}var un="W9Jl8";function mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var dn=c.T.encloseNamespace("share.setPasswordInput");function pn(e){var t,n,r,i=(n=a.useState(!1),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(n,r)||function(e,t){if(e){if("string"==typeof e)return mn(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)?mn(e,t):void 0}}(n,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.")}()),o=i[0],c=i[1],l=null===(t=(0,kt.u6)().errors)||void 0===t?void 0:t.password;return a.createElement(a.Fragment,null,a.createElement("input",{className:"form-control ".concat(l?"is-invalid":""),value:e.value,onChange:function(t){e.canEdit&&e.onChange(t.target.value)},type:o?"text":"password",placeholder:e.placeholder||dn("passwordPlaceholder"),readOnly:!e.canEdit}),!!l&&a.createElement(U.Form.Control.Feedback,{type:"invalid"},l),!!e.canEdit&&a.createElement(Oe.L,{className:un,onClick:function(){return c(!o)}},a.createElement(x.x,{svgName:o?j.vn.VisibleOn:j.vn.VisibleOff,title:dn(o?"hidePassword":"revealPassword"),tooltipPlacement:"top"})),!e.canEdit&&!!e.canReset&&!!e.onReset&&a.createElement(Oe.L,{className:un,onClick:e.onReset},a.createElement(x.x,{svgName:j.vn.Close,title:dn("resetPassword"),tooltipPlacement:"top"})))}function fn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var vn="shared.linkPassword";function yn(e){var t,n,r,a=e.passwordProtectLink,o=e.setPasswordProtectLink,c=(0,kt.u6)(),l=(n=i().useState(!!(null===(t=e.shareLink)||void 0===t?void 0:t.isPasswordProtected)),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(n,r)||function(e,t){if(e){if("string"==typeof e)return fn(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)?fn(e,t):void 0}}(n,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.")}()),s=l[0],m=l[1];return i().createElement("div",{className:"pb-3"},i().createElement("div",{className:"d-flex justify-content-between align-items-center"},i().createElement("div",null,i().createElement("label",{className:"m-0",htmlFor:""},i().createElement(u.x,{namespace:vn,phrase:"passwordProtectHeading"})),i().createElement("p",{className:"m-0"},i().createElement(u.x,{namespace:vn,phrase:"passwordProtectInfo"}))),i().createElement(an.Z,{onClick:function(){var t;(null===(t=e.shareLink)||void 0===t?void 0:t.isPasswordProtected)&&c.setFieldValue("removePassword",a),c.setFieldValue("password",""),o(!a),c.setFieldValue("linkExpireDate",on(!a))},on:a})),a&&i().createElement("div",{className:"position-relative mt-2"},i().createElement(pn,{value:s?"********":c.values.password,onChange:function(e){c.setFieldValue("password",e)},onReset:function(){c.setFieldValue("password",""),c.setFieldValue("removePassword",!0),m(!1)},canEdit:!s,canReset:!0})))}function gn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var hn=c.T.encloseNamespace("shared.share");function bn(e){var t,n,r=(0,kt.u6)(),a=w().hasPermissions,o=(t=i().useState(!!e.shareLink.isPasswordProtected),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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return gn(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)?gn(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.")}()),c=o[0],l=o[1];return i().createElement(kt.l0,null,i().createElement("div",{className:"d-flex align-items-center justify-content-between pb-3"},i().createElement($e,{linkExpireDate:r.values.linkExpireDate,isPasswordProtected:c,privacy:e.privacy,entityTypeId:e.shareLink.objectTypeId,status:e.shareLink.status,onClickShowPrivacies:e.onClickShowPrivacies}),i().createElement(ie.u,{title:hn("deleteLinkTooltip"),spanHack:!0},i().createElement(Oe.L,{onClick:e.onClickDeleteLink,className:"info-link justify-self-start"},i().createElement(u.x,{phrase:"deleteLink"})))),a(f.ManageShareLinkSettings)&&i().createElement(i().Fragment,null,i().createElement(sn,{passwordProtectLink:c}),i().createElement(yn,{shareLink:e.shareLink,passwordProtectLink:c,setPasswordProtectLink:l})),!!e.canEmbed&&i().createElement("div",{className:"pb-3"},i().createElement(nn,{embedUrl:e.shareLink.embedUrl,entity:e.entity,entityType:e.entityType,config:e.config,entityId:e.entityId,shareId:e.shareLink.id,analyticsOptions:e.analyticsOptions})),i().createElement(Tt.u,null,i().createElement(Tt.u.Cancel,{onClick:e.onClickCancel,text:hn("back"),variant:"outline-dark"}),i().createElement(Tt.u.Submit,{variant:"dark"})))}function Sn(e){var t={password:"",removePassword:!1,linkExpireDate:e.shareLink.linkExpireDate};return i().createElement(Ot.n,{initialValues:t,onSubmit:e.onClickSaveLink,castInitialValues:!1,validationSchema:rn},i().createElement(bn,{entity:e.entity,entityType:e.entityType,config:e.config,shareLink:e.shareLink,entityId:e.entityId,onClickCancel:e.onClickCancel,analyticsOptions:e.analyticsOptions,canEmbed:e.canEmbed,privacy:e.privacy,onClickShowPrivacies:e.onClickShowPrivacies,onClickDeleteLink:e.onClickDeleteLink}))}var En=n(28294);function Cn(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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return wn(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)?wn(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 wn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var kn="share.shareLinkPrivacies",On=c.T.encloseNamespace(kn);function In(e){return i().createElement("div",{className:"pb-3"},i().createElement(U.Form.Check,{type:"radio",name:e.id,id:e.id,value:e.id,label:e.name,onChange:function(){return e.onSelect(e.id)},checked:e.checked,className:"".concat("Hxlr9"," m-0"),custom:!0,disabled:e.disabled}),i().createElement("p",{className:"mb-0 ".concat("ZFUnb")},e.description))}function Tn(e){var t="private";Array.isArray(e.privacy)||(t=e.privacy.privacy);var n=Cn(i().useState(t),2),r=n[0],a=n[1],o=Cn(i().useState(!1),2),c=o[0],l=o[1];function s(e){r!==e&&("restricted"===r&&"private"===e||a(e))}var m=e.shareLink.isPasswordProtected;return i().createElement(i().Fragment,null,e.shareLink.objectTypeId===ae.E.Playlist&&i().createElement("div",null,i().createElement(u.x,{namespace:kn,phrase:"privatePlaylistVideos"})),m&&i().createElement($e,{entityTypeId:e.shareLink.objectTypeId,linkExpireDate:e.shareLink.linkExpireDate,isPasswordProtected:e.shareLink.isPasswordProtected,status:e.shareLink.status,privacy:e.privacy}),i().createElement("div",{className:"py-3"},i().createElement(In,{key:"public",id:"public",name:On("public"),description:On("publicDescription"),checked:!m&&"public"===r,onSelect:s,disabled:m}),i().createElement(In,{key:"just_my_customer",id:"just_my_customer",name:On("protected"),description:On("protectedDescription"),checked:!m&&"just_my_customer"===r,onSelect:s,disabled:m}),i().createElement(In,{key:"private",id:"private",name:On("private"),description:On("privateDescription"),checked:!m&&("private"===r||"restricted"===r),onSelect:s,disabled:m})),i().createElement("div",{className:"d-flex justify-content-between align-items-center"},i().createElement("div",{className:"d-flex justify-content-end"},i().createElement("button",{type:"button",className:"btn btn-outline-dark mr-2",onClick:e.onClickCancel},i().createElement(u.x,{namespace:kn,phrase:"back"})),i().createElement(En.m,{className:"btn btn-dark",type:"button",onClick:function(){l(!0),e.onClickSavePrivacy(r)},disabled:r===t,showSpinner:c},i().createElement(u.x,{namespace:kn,phrase:"save"})))))}var xn=n(33755);function jn(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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Nn(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)?Nn(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 Nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var An="shared.share",Pn=c.T.encloseNamespace(An);function Ln(e){switch(e){case"video":return Pn("titleVideo");case"clip":return Pn("titleClip");case"interactive":return Pn("titleInteractive");case"series":return Pn("titleSeries");case"playlist":return Pn("titlePlaylist");case"subject":return Pn("titleTopic")}}var Un=function(e){return"video"===e||"interactive"===e||"clip"===e};function Vn(e){var t,n,r,a,c,p,f,v,y=(0,o.useDispatch)(),h=(0,d.Z)(),b=!e.gatewayApiUrl,S=jn(i().useState(!1),2),E=S[0],C=S[1],w=jn(i().useState("main"),2),k=w[0],O=w[1],I=(n=k,r=i().useRef(),i().useEffect((function(){r.current=n})),r.current),T=jn(i().useState(!1),2),x=T[0],j=T[1],N=l.a.useBasicFetch(s.N.currentUser()),A=gt.getFetchFunctionByType(e.entityType)(e.entityId,null===(t=N.data)||void 0===t?void 0:t.id),P=l.a.useBasicFetch({url:"/api/config",key:"config",bootstrapName:"config",success:f,error:v}),L=l.a.useBasicFetch(b&&s.N.token()),U=l.a.useBasicFetch((p=e.entityId,{url:"{gateway}/v1/share/links?objectId=".concat(p),key:"share:link:object:".concat(p),normalizeOptions:rt,formatData:function(e){return Object.assign(Object.assign({},e),{linkExpireDate:e.linkExpireDate||null})}})),F=l.a.useBasicFetch((c=e.entityId,{url:"{gateway}/v1/users/me/share/direct/sent-items?objectId=".concat(c),key:"direct:share:sent:object:".concat(c),normalizeOptions:rt})),R=l.a.useBasicFetch(gt.getDirectShareRecipientsRequest(F.data)),D=N.data&&(a=N.data.id,ot.getRecentItem(ct(a),it.SG)),_=!!(null==D?void 0:D.length),M=l.a.useBasicFetch(_&&function(e){e.sort();var t=e.map((function(e){return"id=".concat(e)})).join("&");return{url:"{gateway}/v1/objects?".concat(t,"&query.user=avatar"),key:"share:recipients:".concat(e.join(","))}}(D)),B=l.a.useBasicFetch(function(e){return{url:"{gateway}/v1/objects/".concat(e,"/access"),key:"privacy:".concat(e),normalize:!1}}(e.entityId)),G=(0,xn.r)(null),q=G.shareToGoogleClassroom,z=G.shareToMicrosoftTeams,H=G.isLoadingSettings;function K(e){var t;(null===(t=e.recipients)||void 0===t?void 0:t.length)&&l.a.getFetch(y)(gt.getDirectShareRecipientsRequest(e))}function W(e,t){l.a.getFetch(y)(function(e,t){return{url:"{gateway}/v1/objects/".concat(e,"/users?query={limit:100}"),key:"share:recipients:".concat(e,":users"),success:t}}(e,t))}function Q(){U.data||gt.createLink({dispatch:y,entity:A.data,entityType:e.entityType,alerts:h})}function Z(t,n){gt.updateLink(y,A.data,e.entityType,U.data,t,h,(function(){return O("main")}),n)}function $(){C(!0),j(!1),gt.deleteLink(y,A.data,e.entityType,U.data,h,(function(){return O("main")}),(function(){return C(!1)}))}function X(t,n,r){gt.createOrUpdateDirectShare({dispatch:y,entity:A.data,entityType:e.entityType,currentUser:N.data,recipients:t,message:n,sentDirectShare:F.data,onSuccess:K,onError:function(){return h.error(Pn("directShareError",{name:A.data.name}))},onDone:r})}function Y(t,n){gt.removeDirectShareRecipient(y,t,e.entityType,F.data,K,(function(){h.error(Pn("removeDirectShareError")),n&&n()}))}function J(t){l.a.fetch(y,function(e,t,n,r){return{url:"{gateway}/v1/objects/privacy",key:"update:privacy",type:V.k.PUT,data:{privacy:t,objectId:e},invalidationKeys:"privacy",normalize:!1,success:n,error:r}}(e.entityId,t,(function(){return O(I)}),(function(){return h.error(Pn("privaciesError",{name:A.data.name}))})))}gt.useHydrateRecipients(R.data),gt.useHydrateRecipients(M.data),i().useEffect((function(){U.hasCompleted&&j(!0)}),[U.hasCompleted,x]);var ee=!!N.data&&!!P.data&&(!b||!!L.data)&&!!F.hasCompleted&&x&&!!B.data&&!!A.data&&!H;return i().createElement(u.D.Provider,{value:An},i().createElement(m.G,{title:Ln(e.entityType),closePopup:e.closePopup,showLoadingSpinner:E||!ee},function(){if(E||!ee)return i().createElement(i().Fragment,null);switch(k){case"main":return i().createElement(Wt,{shareLink:U.data,shareLinkIsLoading:U.isFetching,entity:A.data,entityType:e.entityType,directShareRecipients:R.data||[],recentlySharedTo:M.data||[],onClickCreateLink:Q,onClickShowSettings:function(){return O("link-settings")},onClickShare:X,onClickRemoveRecipient:Y,onClickDeleteLink:$,analyticsOptions:gt.getAnalyticsOptions(e.entityType),gatewayApiUrl:e.gatewayApiUrl||P.data.gatewayApiUrl,imageCdnUrl:P.data.imageCdnUrl,searchRequestHeaders:b?{authorization:"Bearer ".concat(L.data.value)}:null,currentUser:N.data,fetchRecipientUsers:W,privacy:B.data,onClickShowPrivacies:function(){return O("privacy")},canAddPolicies:(r=e.entityType,"video"===r||"interactive"===r||"clip"===r),emptyStateImageUrl:e.emptyStateImageUrl,errorStateImageUrl:e.errorStateImageUrl,integrations:(t=q,n=z,g(t,n).filter((function(e){return e.enabled})).map((function(e){return e.id}))),integrationSettingAppLink:e.integrationSettingAppLink,messagePopupAppLink:e.messagePopupAppLink,closePopup:e.closePopup,enableIntegrationBanner:e.enableIntegrationBanner});case"link-settings":return i().createElement(Sn,{entity:A.data,entityType:e.entityType,config:P.data,shareLink:U.data,entityId:e.entityId,analyticsOptions:gt.getAnalyticsOptions(e.entityType),onClickSaveLink:Z,onClickDeleteLink:$,onClickCancel:function(){return O("main")},canEmbed:Un(e.entityType),privacy:B.data,onClickShowPrivacies:function(){return O("privacy")}});case"privacy":return i().createElement(Tn,{privacy:B.data,shareLink:U.data,onClickCancel:function(){return O(I)},onClickSavePrivacy:J})}var t,n,r}()))}},38182:function(e,t,n){"use strict";n.d(t,{q:function(){return l}});var r=n(1024),a=n.n(r),i=n(68003),o=n(87013),c=n(88483);function l(e){var t,n,r=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 a().createElement("div",{className:"position-relative h-100 w-100"},a().createElement("div",{className:"".concat("Gvwzj"," ").concat((null==e?void 0:e.extraClasses)||""),style:{backgroundImage:"url('".concat(r,"')")}}," "),e.showDot&&a().createElement("div",{className:"".concat("JJHBJ"," rounded-circle bg-danger")}))}},39023:function(e,t,n){"use strict";n.d(t,{X:function(){return a}});var r=n(1024);function a(e){var t=e.isLabelEllipsis,n=r.useRef(null);return r.useEffect((function(){n.current&&(e.checked?n.current.indeterminate&&(n.current.indeterminate=!1):!e.indeterminate||n.current.indeterminate?!e.indeterminate&&n.current.indeterminate&&(n.current.indeterminate=!1):n.current.indeterminate=!0)}),[n.current,e.indeterminate,e.checked]),r.createElement("div",{className:"custom-control custom-checkbox ".concat(e.className)},r.createElement("input",{ref:n,type:"checkbox",className:"custom-control-input",id:e.id,name:e.name,checked:e.checked,onChange:e.onChange,disabled:e.disabled}),r.createElement("label",{className:"custom-control-label cursor-pointer",htmlFor:e.id},r.createElement("span",{className:"".concat(t?"clamp-1":"")},e.label)))}a.defaultProps={checked:!1,label:"",className:""}},63038:function(e,t,n){"use strict";n.d(t,{n:function(){return y},W:function(){return g}});var r=n(1024),a=n(92802),i=n(99910),o=n(85887),c=n(53808),l=function(e,t,n,r,i){var o="form-control";return"sm"===r&&(o+=" form-control-sm"),"lg"===r&&(o+=" form-control-lg"),(0,a.u9)(t,n)&&(0,a.u9)(e,n)&&(o+=" is-invalid"),i&&(o+=" ".concat(i)),o};function s(e){var t=e.label,n=e.checkboxLabelClassName,a=e.checkboxLabelFontWeight,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}(e,["label","checkboxLabelClassName","checkboxLabelFontWeight"]);return r.createElement(i.Form.Group,null,r.createElement("div",{className:"custom-control custom-checkbox"},r.createElement(y,Object.assign({className:"custom-control-input"},o)),r.createElement(i.Form.Label,{className:"custom-control-label cursor-pointer ".concat("normal"===a?"font-weight-normal":""," \n ").concat(n),htmlFor:o.id},t)))}var u=n(39396),m=n(63791),d=n(66703);function p(e){var t=(0,a.u6)().values[e.fieldName];return"string"!=typeof t?r.createElement(r.Fragment,null):r.createElement("div",{className:"float-right text-muted font-weight-normal"},t.length,"/",e.limit," characters")}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var v=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function y(e){var t,n,i=e.children,l=v(e,["children"]),s=(t=r.useState(e.type),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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return f(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)?f(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=s[0],p=s[1],y=c.q.isFunction(i)?function(e){return i(e)}:r.Children.count(i)?i:null;if("password"!==l.type)return r.createElement(a.gN,Object.assign({},o.t.omit(l,["formSize"])),y);var g="position-relative ".concat("d78lK");return l.className&&(g+=" ".concat(l.className)),l.disabled&&(g+=" ".concat("asbVo")),r.createElement("div",{className:g},r.createElement(a.gN,Object.assign({},o.t.omit(l,["formSize","type","className"]),{type:d,className:"".concat("RBJnf"," border-0 w-100 h-100 outline-none rounded")}),y),"password"===l.type&&r.createElement(u.x,{svgName:"password"===d?m.vn.VisibleOn:m.vn.VisibleOff,className:"svg-container cursor-pointer ".concat("jCfI0"),onClick:function(){p("password"===d?"text":"password")}}))}function g(e){var t=e.label,n=e.className,c=e.showCharacterCounter,f=e.showRequiredStar,g=e.infoTooltip,h=e.infoText,b=e.formSize,S=e.showOptionalLabel,E=v(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoText","formSize","showOptionalLabel"]),C=(0,a.u6)(),w=C.errors,k=C.touched,O=function(){};if("checkbox"===E.type){var I=o.t.omit(e,["formSize"]);return e.disabled&&(I.onChange=O),r.createElement(s,Object.assign({},I))}var T=Object.assign(Object.assign({},E),{className:l(w,k,E.name,b,n)});return e.disabled&&(T.onChange=O),r.createElement(i.Form.Group,null,!!t&&r.createElement(i.Form.Label,{htmlFor:E.id,className:"d-flex align-items-center"},t,f&&r.createElement("span",{className:"text-danger"},"*"),g&&r.createElement(u.x,{svgName:m.vn.Info,title:g,tooltipPlacement:"top",tooltipSpanHack:!0}),S&&r.createElement("span",{className:"text-muted"}," ",r.createElement(d.x,{namespace:"shared.formField",phrase:"optional"})),!!c&&!!E.maxLength&&r.createElement("div",{className:"ml-auto"},r.createElement(p,{fieldName:E.name,limit:E.maxLength}))),r.createElement(y,Object.assign({},T)),!!h&&r.createElement(i.Form.Text,{className:"text-muted"},h),r.createElement(a.Bc,{name:E.name},(function(e){return r.createElement(i.Form.Control.Feedback,{type:"invalid"},e)})))}y.defaultProps={autoComplete:"off"},g.defaultProps={autoComplete:"off"}},86347:function(e,t,n){"use strict";n.d(t,{b:function(){return m},n:function(){return u}});var r=n(1024),a=n(92802),i=n(53808),o=n(85887);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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(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,r=new Array(t);n<t;n++)r[n]=e[n];return r}function s(e){var t=o.t.deepClone(e);return Object.keys(t).forEach((function(e){t.hasOwnProperty(e)&&(o.t.isObject(t[e])?t[e]=s(t[e]):null===t[e]&&delete t[e])})),t}function u(e){var t=e.castInitialValues,n=e.castValuesOnSubmit,o=e.initialValues,l=e.onSubmit,u=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}(e,["castInitialValues","castValuesOnSubmit","initialValues","onSubmit"]),m=t&&e.validationSchema?e.validationSchema.cast(s(o)):o,d={allowInitialSubmit:e.allowInitialSubmit};return r.createElement(a.J9,Object.assign({enableReinitialize:!0},u,{initialValues:m,onSubmit:function(t,r){var a=r.setSubmitting,i=r.resetForm,o=r.setFieldError,s=n&&e.validationSchema?e.validationSchema.cast(t):t;l(s,(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.reset&&i(),e.errors)for(var t=0,n=Object.entries(e.errors);t<n.length;t++){var r=c(n[t],2),l=r[0],s=r[1];o(l,s)}a(!1)}))},initialStatus:d}),i.q.isFunction(e.children)?function(t){return e.children(t)}:r.Children.count(e.children)?e.children:null)}function m(){return(0,a.u6)()}u.defaultProps={castInitialValues:!0,castValuesOnSubmit:!0}},84611:function(e,t,n){"use strict";n.d(t,{f:function(){return o}});var r=n(1024),a=n.n(r),i=n(39396);function o(e){return e.imageUrl||e.svgName?e.imageUrl?a().createElement("div",{className:"".concat("BQ87Y"," rounded-circle h-100 w-100"),style:{backgroundImage:"url(".concat(e.imageUrl,")")}}," "):a().createElement("div",{className:"".concat("Uxnsl"," ").concat(e.variant?"bg-".concat(e.variant):""," text-").concat(e.textVariant," rounded-circle h-100 w-100")},a().createElement(i.x,{svgName:e.svgName,size:e.svgSize})):a().createElement(a().Fragment,null)}o.defaultProps={textVariant:"white"}},52086:function(e,t,n){"use strict";n.d(t,{g:function(){return r}});var r={PERMISSIONS:"permissions",AUDIENCE_FILTER:"audience:filter",LAYOUT_CONTAINER_FLUID:"layout:container:fluid",BULK_USER_UPLOAD:"bulk:user:upload",BULK_REMOVE_USERS:"bulk:remove:users",BULK_USER_ACTIONS:"bulk:user:actions",CURATOR_WORKING_SET:"curator:working:set",LOOKING_FOR_INTEGRATION:"looking:for:integration",PUBLIC_PRESENTATION_ID:"public:presentation:id"}},84657:function(e,t,n){"use strict";n.d(t,{t:function(){return a},v:function(){return r}});var r={BASE_VIDEO_COLLECTION:"thumbnail,tags,rating,series,season,owner",VIDEO_COLLECTION:"(videoCollection)",SERIES:"tallposter,rating,banner",FOLDER:"banner,thumbnail",CLASSIFICATION_COLLECTION:"banner,cover,tallPoster",CLASSIFICATION:function(e){return"banner,cover,tallPoster,thumbnail,followers{id:".concat(e,"},pinnedVideos[count()]{limit:0},playlists[count()]{limit:0},series[count()]{limit:0}")},VIDEO:"series,season,rating,producers,glance,distributors,owner,resources[thumbnail,pdf],tags,productionCompanies,directors,links,thumbnail,interactives[thumbnail,_canBeConsumed,_isClickViewContent,owner[avatar]],clips[_canBeConsumed,owner[avatar],_isClickViewContent],_canUpdate,_videoProgress,_canBeConsumed,categories,libraries,_canAddToLibrary",PLAYLIST:"cover,banner,owner,videos[count()]{limit:0},clips[count()]{limit:0},interactives[count()]{limit:0},followers[count()]{limit:0}",PLAYLIST_COLLECTION:"videos[count()]{limit:0},interactives[count()]{limit:0},clips[count()]{limit:0},cover",CLIP:"(clip)",CLIP_COLLECTION:"(clipCollection)",INTERACTIVE:"(interactive)",LIBRARY_COLLECTION:"owner[logo]",LIBRARY:"owner[logo],categorytree"},a={CLASSIFICATION:"banner,cover,tallPoster,pinnedVideos[count()]{limit:0},playlists[count()]{limit:0},series[count()]{limit:0}",CLASSIFICATION_COLLECTION:"banner,cover,tallPoster",VIDEO:"series,season,rating,producers,glance,distributors,resources[thumbnail,pdf],tags,productionCompanies,directors,links,thumbnail,interactives[thumbnail,_canBeConsumed,_isClickViewContent],clips[_canBeConsumed,_isClickViewContent],_canBeConsumed,categories,libraries",VIDEO_COLLECTION:"thumbnail,rating,series,season,_canBeConsumed"}},74421:function(e,t,n){"use strict";var r;n.d(t,{E:function(){return r}}),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"}(r||(r={}))},90547:function(e,t,n){"use strict";var r;n.d(t,{r:function(){return r}}),function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(r||(r={}))},89603:function(e,t,n){"use strict";var r,a;n.d(t,{Q:function(){return r}}),function(e){e.Normal="normal",e.Pedagogy="pedagogy",e.Hidden="hidden",e.Skill="skill"}(r||(r={})),function(e){e[e.Normal=0]="Normal",e[e.Pedagogy=1]="Pedagogy",e[e.Hidden=2]="Hidden"}(a||(a={}))},90335:function(e,t,n){"use strict";var r;n.d(t,{D:function(){return r}}),function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series"}(r||(r={}))},2491:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(54096),a=n(21186),i=n(92159);function o(){var e=(0,r.G)(i.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:a.NK.Warning,heading:a.R6.Warning,message:t})}}}},5256:function(e,t,n){"use strict";n.d(t,{a:function(){return i}});var r=n(1024);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e){var t,n,i=(t=(0,r.useState)(window.matchMedia(e).matches),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 r,a,i,o,c=[],l=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(e){s=!0,a=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return a(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)?a(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];return(0,r.useEffect)((function(){var t=window.matchMedia(e);t.matches!==o&&c(t.matches);var n=function(){return c(t.matches)};return t.addListener(n),function(){return t.removeListener(n)}}),[e]),o}},42905:function(e,t,n){"use strict";n.d(t,{i:function(){return o}});var r=n(57857),a=n(68003),i="shared.shared-utils",o={getEmbedResolutions:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=[{label:r.T.getPhrase(i,"small"),width:"640",height:"360"},{label:r.T.getPhrase(i,"medium"),width:"1014",height:"576"},{label:r.T.getPhrase(i,"large"),width:"1280",height:"720"}];return e&&t.unshift({label:r.T.getPhrase(i,"responsive"),width:"100%",height:"100%"}),t},getEmbedString:function(e){var t=e.url,n=e.size,r="100%"===n.width,a=r?'style="position:absolute; top:0; left:0; width:100%; height:100%;"':'width="'.concat(n.width,'" height="').concat(n.height,'"'),i='src="'.concat(t,'"'),o="<iframe ".concat(a," ").concat('frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen allow="autoplay"'," ").concat(i,"></iframe>");return r?'<div style="padding:56.25% 0 0 0; position:relative;">'.concat(o,"</div>"):o},buildEmbedUrl:function(e){var t=e.embedUrl,n=e.host,r=e.shareId,i=e.autoplay,o=e.consumerKey,c=t;c||(c=a._.safeUrlConcat(n,"share/embed/".concat(r)));var l={};return i&&(l.a=!0),o&&(l.consumerKey=o),a._.urlBuilder(c,l)}}},18830:function(e,t,n){"use strict";n.d(t,{M:function(){return s}});var r=n(57857),a=n(74421),i=n(70065),o=n(50028),c=n(89603),l=r.T.encloseNamespace("shared.shared-utils"),s={isVideo:function(e){return(null==e?void 0:e.typeId)===a.E.Video},isClip:function(e){return(null==e?void 0:e.typeId)===a.E.Clip},isInteractive:function(e){return(null==e?void 0:e.typeId)===a.E.Interactive},isVideoType:function(e){return s.isVideo(e)||s.isInteractive(e)||s.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,r,a;return s.isVideo(e)?e.thumbnail:s.isClip(e)?null===(t=e.video)||void 0===t?void 0:t.thumbnail:s.isInteractive(e)?e.thumbnail||(null===(n=e.video)||void 0===n?void 0:n.thumbnail)||(null===(a=null===(r=e.clip)||void 0===r?void 0:r.video)||void 0===a?void 0:a.thumbnail):void 0},getDuration:function(e){var t,n;if(s.isVideo(e))return e.duration;if(s.isInteractive(e)){if(null===(t=e.video)||void 0===t?void 0:t.duration)return e.video.duration;if(null===(n=e.clip)||void 0===n?void 0:n.id)return 1e3*(e.clip.endTime-e.clip.startTime)}return s.isClip(e)?1e3*(e.endTime-e.startTime):void 0},getAnalyticsEntity:function(e){return s.isVideo(e)?i.EntityType.Video:s.isInteractive(e)?i.EntityType.Interactive:s.isClip(e)?i.EntityType.Clip:void 0},getCanBeConsumed:function(e){var t,n;return e&&s.isVideoType(e)?e._canBeConsumed?{canNavigate:"login-required"===(null===(t=e._canBeConsumed)||void 0===t?void 0:t.reason)&&s.isVideo(e)||!0===e._canBeConsumed.value,canConsume:e._canBeConsumed.value,reason:null===(n=e._canBeConsumed)||void 0===n?void 0:n.reason}:{value:!0}:null},getPrivacyReasoning:function(e){var t=s.getCanBeConsumed(e),n=t.canConsume,r=t.canNavigate,a=t.reason;if(!n&&!r)switch(a){case"rating-not-allowed":return l("ratingNotAllowed");case"video-deleted":return s.isClip(e)?l("clipParentDeleted"):s.isInteractive(e)?l("interactiveParentDeleted"):l("videoDeleted");case"clickview-private":return l("clickViewPrivate");case"private":default:return l("genericCannotAccess");case"login-required":return s.isClip(e)?l("clipLoginRequired"):s.isInteractive(e)?l("interactiveLoginRequired"):l("videoLoginRequired")}return s.isInteractive(e)&&e.status===o.X.Draft?l("draftInteractive"):""},getTitle:function(e){if(e.name)return e.name;var t=s.getCanBeConsumed(e),n=t.canConsume,r=t.reason;return l(n||"private"!==r?n||"video-deleted"!==r?"privateVideo":"videoUnavailable":"privateVideo")},getParentVideo:function(e){var t;return s.isVideo(e)?e:s.isClip(e)?e.video:s.isInteractive(e)?e.video||(null===(t=e.clip)||void 0===t?void 0:t.video):void 0},showWhyThisVideo:function(e){var t,n;return!!s.isVideo(e)&&(null===(n=null===(t=e.tags)||void 0===t?void 0:t.data)||void 0===n?void 0:n.some((function(e){return e.tagType===c.Q.Pedagogy||e.tagType===c.Q.Skill})))},showWhatsIncluded:function(e){var t,n,r,a,i,o;if(!s.isVideo(e))return!1;var c=!!(null===(n=null===(t=e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length),l=!!(null===(a=null===(r=e.resources)||void 0===r?void 0:r.data)||void 0===a?void 0:a.length),u=!!(null===(o=null===(i=e.subtitles)||void 0===i?void 0:i.data)||void 0===o?void 0:o.length);return c||l||u}}}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1832],{21832:function(e,t,n){"use strict";n.r(t),n.d(t,{GeneratePdfView:function(){return S}});var r=n(48088),i=n(31647),o=n(21679),a=n(57857),c=n(70065),l=n(52076),u=n(77502),s=n(10101),f=n(88172),p=n(67670),h=n(19226),y=n(48090),d=n(61843),b=n(56906),v=n(44634),m=n.n(v),g={image:"Di3M6"};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 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,(void 0,i=function(e,t){if("object"!==w(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key,"string"),"symbol"===w(i)?i:String(i)),r)}var i}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function E(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 k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(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&&O(e,t)}(T,e);var t,n,v,w,S=(v=T,w=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(v);if(w){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return E(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),S.call(this,e)}return t=T,(n=[{key:"initialize",value:function(){this.collectionIdentifier=this.options.collectionIdentifier,this.libraryDataService=o.u.getInstance(y.Or.Library,this),this.videoDataService=o.u.getInstance(y.Or.Video,this),this.exportDataService=o.u.getInstance(y.Or.Export,this),this.bindListeners()}},{key:"name",get:function(){return"GeneratePdfView"}},{key:"title",get:function(){return a.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.generatePdf"}},{key:"template",get:function(){return m()}},{key:"channelName",get:function(){return d.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:s.Yw,title:a.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new p.v,saveEvent:"generate:pdf",channelName:this.channelName,buttonText:a.T.getPhrase(this.lang,"generate"),extraButtonClass:"btn-dark",spinnerOptions:{size:d.Ey.Small,type:d.dR.Light,extraClasses:"mx-auto"}}}]}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"generate:pdf",this.onClickGeneratePdf),this.listenTo(y.Vk.LIBRARY,"".concat(y.M_.FOLDER,":").concat(this.collectionIdentifier.id,":sync"),this.render),this.listenTo(y.Vk.VIDEO,"".concat(this.collectionIdentifier.toString(),":sync"),this.render),this.listenTo(y.Vk.EXPORT,"".concat(y.M_.GENERATE_COLLECTION_PDF,":").concat(this.collectionIdentifier.id,":sync"),(function(){return e.triggerMethod("hide")}))}},{key:"onClickGeneratePdf",value:function(){this.hasDataFetched()&&(r.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner),this.exportDataService.generateCollectionPdf(this.library.id,this.collectionIdentifier.id,this.currentUser,this.collectionIdentifier.sort),this.logAction(this.collectionIdentifier.id,this.collectionIdentifier.sort))}},{key:"fetchData",value:function(){var e=this;this.videos=this.videoDataService.getCollectionVideos(this.collectionIdentifier),this.model=this.libraryDataService.getFolder(this.collectionIdentifier.id),this.library||this.libraryDataService.getLibraries((function(t){e.library=d.PU.getLibrary(e.collectionIdentifier.id,t),e.render()}))}},{key:"logAction",value:function(e,t){var n={location:c.LocationContext.Popup,actionType:c.UserAction.Create,entity:c.EntityType.PDF,workflowPhase:c.WorkflowPhase.Complete},r={id:e,sort:u.E[t]};l.k.logUserAction(r,n)}},{key:"hasDataFetched",value:function(){return!!this.model&&!!this.videos&&!!this.library}},{key:"requiredResources",get:function(){return{currentUser:h.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this;return this.fetchData(),!!this.hasDataFetched()&&(this.videos&&!this.videos.length?(window.setTimeout((function(){e.triggerMethod("hide"),i.Q.ErrorHelper.throw(new b.Xz(a.T.getPhrase(e.lang,"errorHeading")))}),y.pA.POPUP_FADE_TIMEOUT),!1):(this.hasDataFetched()&&this.spinnerModel.set(f.ZV.Disabled,!1),!0))}},{key:"viewOptions",value:function(){return{dataFetched:this.hasDataFetched(),spinnerEl:d.Kp.getSpinner({size:d.Ey.Large,extraClasses:"mx-auto"}),imageUrl:y.Wn.Shared.GENERATE_PDF,infoText:a.T.getPhrase(this.lang,"info",{name:this.model.get("name"),email:this.currentUser.get("email"),escapeText:!0}),styles:g}}}])&&P(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),T}(i.Q.View)},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 a(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(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 r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function u(e){var t=function(e,t){if("object"!==o(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"===o(t)?t:String(t)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}function f(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 p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(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&&s(e,t)}(h,e);var t,n,r,o,u=(r=h,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=p(r);if(o){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return f(this,e)});function h(){return c(this,h),u.apply(this,arguments)}return t=h,(n=[{key:"defaults",value:function(){var e;return a(e={},i.ZV.Disabled,!0),a(e,i.ZV.Hidden,!1),e}}])&&l(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),h}(r.Q.Model)},44634: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,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\n"},3:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,c=e.escapeExpression;return'<div class="pb-3 text-center">\n <img src="'+c(a(null!=(o=null!=t?t.options:t)?o.imageUrl:o,t))+'" class="'+c(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.image:o,t))+'" />\n</div>\n<p class="m-0">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.infoText:o,t))?o:"")+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);