@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
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7634],{21053:function(e,t,n){"use strict";n.d(t,{W:function(){return m}});var o=n(48088),i=n(31647),r={svgContainer:"mtegw"},a=n(43791),s=n.n(a),l=n(48090),c=n(35630),u=n(57085),d=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,o.key,o)}}function p(e,t){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},p(e,t)}function 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 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&&p(e,t)}(m,e);var t,n,i,a,f=(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),f.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:r}}},{key:"onSave",value:function(){o.Radio.channel(l.OV.LIBRARY_EDITOR).trigger(l.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:d.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:d.T.getPhrase(this.lang,"chapters")};case"resources":return{name:d.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new c.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}))}}])&&h(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.Q.Component)},44391:function(e,t,n){"use strict";n.d(t,{K:function(){return k}});var o=n(31647),i=n(11306),r=n(48088),a=n(48090),s=n(26457),l=n(15564),c=n.n(l);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(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,o.key,o)}}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function h(e,t){if(t&&("object"===u(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 y=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)}(u,e);var t,n,o,i,l=(o=u,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 h(this,e)});function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),l.call(this,e)}return t=u,(n=[{key:"name",get:function(){return"TagItemComponent"}},{key:"tagName",get:function(){return this.options.behavior===s.Dm.Link?"a":"span"}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?"":" d-inline-flex"),t="".concat(this.isSaving()?" saving":""),n="".concat(this.options.behavior===s.Dm.Disabled?" ".concat("dE3WC"):""),o="".concat(this.options.behavior===s.Dm.Filter?" cursor-pointer":"");return"badge-pill tag py-1 px-2 my-1 mr-1".concat(o).concat(e).concat(t).concat(n)}},{key:"template",get:function(){return c()}},{key:"elements",get:function(){return{close:".close"}}},{key:"appLinks",get:function(){return this.options.behavior!==s.Dm.Link?{}:{"[this]":{application:a.OV.SEARCH,action:a.eX.Search.HOME,params:{tag:this.model.get("name")}}}}},{key:"defaults",get:function(){return{behavior:s.Dm.Link,orientation:s.zM.Flex}}},{key:"events",value:function(){return this.options.removeEvent?{"click @ui.close":"onRemoveTag"}:{click:"onClickTag"}}},{key:"initialize",value:function(){this.options.behavior===s.Dm.Edit&&this.listenTo(this.model,"change",this.render)}},{key:"isSaving",value:function(){if(this.options.behavior!==s.Dm.Filter){var e=this.model.pick("id","name","remove"),t=e.id,n=e.name;return!!e.remove||!t||!n}}},{key:"onRemoveTag",value:function(e){if(e.stopPropagation(),!this.isSaving())return this.model.set("remove",!0),r.Radio.channel(this.options.channelName).trigger(this.options.removeEvent,this.model),!1}},{key:"onClickTag",value:function(){this.options.behavior!==s.Dm.Filter||this.options.removeEvent||r.Radio.channel(this.options.channelName).trigger(this.options.clickEvent,this.model)}},{key:"viewOptions",value:function(){return{removable:this.options.removeEvent}}},{key:"onRender",value:function(){this.resetClassName()}}])&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.Q.Component);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function m(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function g(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 w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(c,e);var t,n,r,a,l=(r=c,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=w(r);if(a){var n=w(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),l.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.options.behavior!==s.Dm.Edit||this.options.removeEvent||o.Q.ErrorHelper.throw(new i.H("removeEvent is required to edit tags."))}},{key:"name",get:function(){return"TagComponentCollection"}},{key:"defaults",get:function(){return{orientation:s.zM.Flex}}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?" d-flex align-items-start flex-column":"");return"tags".concat(e)}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent,clickEvent:this.options.clickEvent}}},{key:"childView",get:function(){return y}}])&&m(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.Q.ComponentCollection)},29613:function(e,t,n){"use strict";n.r(t),n.d(t,{EditVideoView:function(){return at}});var o=n(39479),i=n(48088),r=n(31647),a=n(11306),s=n(99249),l=n(57857),c=n(25417),u=n(21679),d=n(99748),f=n(48090),h=n(29625),p=n(19226),y=n(61843),v=n(71192),m=n(68619),b=n(13156),g=n(29457),w=n(70065),k=n(8371),S=n(52076),O=n(40622),E=n(57785),C=n(45837),T=n(72998),P=n(95168),j=n(24184),x=n(99844),R=n(72891),D=n.n(R);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 N(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function V(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 I(e){return I=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},I(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&&_(e,t)}(s,e);var t,n,o,r,a=(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=I(o);if(r){var n=I(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return V(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),a.call(this,e)}return t=s,(n=[{key:"initialize",value:function(){var e=this;this.listenTo(this.model,"change",(function(){return e.options.viewModel.validate()}))}},{key:"template",get:function(){return D()}},{key:"name",get:function(){return"ExtraInfoItemComponent"}},{key:"regions",value:function(){return{textArea:{el:".text-area-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=value]":{observe:"value",setOptions:{validate:!0}}}}},{key:"onRender",value:function(){this.showChildView("textArea",new x.F({name:"value",class:"form-control",placeholder:this.model.get("placeholder"),id:"admin-notes"})),this.stickit(),i.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),i.Validation.unbind(this)}}])&&N(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.Q.Component),L=n(44106),U=n.n(L);function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Q(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function z(e,t,n){return t&&Q(e.prototype,t),n&&Q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function J(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)}function H(e,t){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},H(e,t)}function K(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=G(e);if(t){var i=G(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Z(this,n)}}function Z(e,t){if(t&&("object"===A(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}var W=function(e){J(n,e);var t=K(n);function n(e){return F(this,n),t.call(this,e)}return z(n,[{key:"name",get:function(){return"ExtraInfoComponentCollection"}},{key:"childView",get:function(){return B}},{key:"childViewOptions",get:function(){return{viewModel:this.options.viewModel}}}]),n}(r.Q.ComponentCollection),Y=function(e){J(n,e);var t=K(n);function n(e){return F(this,n),t.call(this,e)}return z(n,[{key:"name",get:function(){return"ExtraInfoComponent"}},{key:"template",get:function(){return U()}},{key:"className",get:function(){return"border-top pt-3"}},{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new W({collection:this.model.fields,viewModel:this.model}))}}]),n}(r.Q.Component),q=n(17391),X=n(3974),$=n(36022),ee=n(44391),te=n(26457),ne=n(30992),oe=n.n(ne);function ie(e){return ie="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},ie(e)}function re(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ae(e,t){return ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ae(e,t)}function se(e,t){if(t&&("object"===ie(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 le(e){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},le(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&&ae(e,t)}(c,e);var t,n,o,i,s=(o=c,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=le(o);if(i){var n=le(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return se(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"name",get:function(){return"TagsComponent"}},{key:"template",get:function(){return oe()}},{key:"lang",get:function(){return"libraryEditor.tags"}},{key:"defaults",get:function(){return{headerText:l.T.getPhrase(this.lang,"heading"),orientation:te.zM.Flex}}},{key:"regions",value:function(){return{tagList:{el:".tag-list-region",replaceElement:!0},tagSelector:{el:".tag-selector-region",replaceElement:!0}}}},{key:"initialize",value:function(){this.options.behavior!==te.Dm.Edit||this.options.parentId||r.Q.ErrorHelper.throw(new a.H("parentId is required to edit tags."))}},{key:"getTypeaheadConfigs",value:function(){var e=X.M.getTypeaheadConfig(),t=X.M.getBloodhoundConfig(),n={newType:f.n8.TagsRaw},o={newType:f.n8.TagsRaw,footerTemplate:q.J.getConfirmSelectionTemplate()};return[{name:f.n8.TagsRaw,typeaheadConfig:e,bloodhoundConfig:t,options:{hideEmptyResults:!0}},{name:"add-new",typeaheadConfig:e,bloodhoundConfig:t,options:n},{name:"empty-suggestion",typeaheadConfig:e,bloodhoundConfig:t,options:o}]}},{key:"viewOptions",value:function(){var e;return this.showEmptyStateText()&&(e=this.options.emptyStateText),{headerText:this.options.headerText,editable:this.options.behavior===te.Dm.Edit,emptyStateText:e}}},{key:"showEmptyStateText",value:function(){return this.options.behavior!==te.Dm.Edit&&!this.collection.length&&!!this.options.emptyStateText}},{key:"renderTagSelector",value:function(){this.options.behavior===te.Dm.Edit&&this.showChildView("tagSelector",new $.M({model:this.model,parentChannelName:this.options.channelName,inputId:"tag-select",selectEvent:"add:tag",typeaheadConfigs:this.getTypeaheadConfigs(),placeholderText:l.T.getPhrase(this.lang,"placeholder"),callbacks:{onRender:q.J.selectFirstResult,onBlur:q.J.clearInputOnBlur},typeaheadOptions:{hint:!1},actionOptions:{clearOnSelect:!0},autofocus:this.options.autofocus}))}},{key:"renderTagList",value:function(){this.showEmptyStateText()||this.showChildView("tagList",new ee.K({collection:this.collection,channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent}))}},{key:"onRender",value:function(){this.renderTagSelector(),this.renderTagList()}}])&&re(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.Q.Component),ue=n(88172),de=n(99724),fe=n.n(de),he={saveButton:"G_FDK",undo:"dcV70"};function pe(e){return pe="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},pe(e)}function ye(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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,o.key,o)}}function me(e,t){return me=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},me(e,t)}function be(e,t){if(t&&("object"===pe(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 ge(e){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ge(e)}var we=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&&me(e,t)}(c,e);var t,n,o,a,s=(o=c,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=ge(o);if(a){var n=ge(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return be(this,e)});function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return fe()}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return i.Radio.channel(this.options.channelName)}},{key:"getSaveChannelName",value:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .undo":"onUndo"}}},{key:"initialize",value:function(){var e;this.model||(this.model=new r.Q.Model((ye(e={},ue.ZV.ShowSpinner,this.options.showSpinner),ye(e,ue.ZV.Disabled,this.options.isDisabled),e)));var t=this.options.channelName;this.listenTo(t,O.LibraryEditorActions.DisableSave,this.onDisableSave),this.listenTo(t,O.LibraryEditorActions.EnableSave,this.onEnableSave),this.listenTo(t,O.LibraryEditorActions.CancelSave,this.onCancelSave);var n=i.Radio.channel(this.getSaveChannelName());this.listenTo(n,O.LibraryEditorActions.Save,this.onSave),this.options.allowUndo&&(this.options.hasChanges&&this.model.set("showUndo",!0),this.listenTo(this.model,"change:showUndo",this.render))}},{key:"onCancelSave",value:function(){this.model.set(ue.ZV.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(ue.ZV.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(ue.ZV.ShowSpinner)&&this.model.set(ue.ZV.ShowSpinner,!1,{silent:!0}),this.model.set(ue.ZV.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(O.LibraryEditorActions.Undo)}},{key:"onSave",value:function(){this.model.set(ue.ZV.ShowSpinner,!0),this.getParentChannel().trigger(O.LibraryEditorActions.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:he}}},{key:"renderSaveButton",value:function(){var e=new ue.Py({saveEvent:O.LibraryEditorActions.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:l.T.getPhrase(this.lang,"save"),extraButtonClass:"btn-dark ".concat(he.saveButton),spinnerOptions:{size:y.Ey.Small,type:y.dR.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}])&&ve(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.Q.Component),ke=n(2772),Se=n(88483),Oe=n(10101),Ee=n(86272),Ce=n.n(Ee);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 Pe(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function je(e,t){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},je(e,t)}function xe(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 Re(e){return Re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Re(e)}var De=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&&je(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Re(o);if(i){var n=Re(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return xe(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){this.viewModel=s.r.get("image:storage")}},{key:"name",get:function(){return"EditThumbnailComponent"}},{key:"lang",get:function(){return"libraryEditor.editThumbnail"}},{key:"template",get:function(){return Ce()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:Oe.YR,channelName:this.options.channelName,buttonSelector:".upload-thumbnail",imageType:g.__.Thumbnails,appLink:{application:f.OV.LIBRARY_EDITOR,action:f.eX.LibraryEditor.UPLOAD_THUMBNAIL,args:[this.options.model.id]},saveImage:function(t){return e.viewModel.set({dataUrl:t})}}]}},{key:"defaults",get:function(){return{editable:!0}}},{key:"regions",value:function(){return{thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{editable:this.options.editable,dimensions:f.nq[g.__.Thumbnails]}}},{key:"onRender",value:function(){this.showChildView("thumbnail",new ke.Z({model:this.model,thumbnailOptions:{size:Se.h2.Medium}}))}}])&&Pe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),Me=n(58259),Ne=n.n(Me);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 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,o.key,o)}}function Ie(e,t){return Ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ie(e,t)}function Be(e,t){if(t&&("object"===_e(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 Le(e){return Le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Le(e)}var Ue=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&&Ie(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Le(o);if(i){var n=Le(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Be(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"CollapseButtonComponent"}},{key:"className",get:function(){return"d-inline-block cursor-pointer expand-details info-link mb-3"}},{key:"lang",get:function(){return"libraryEditor.collapseButton"}},{key:"template",get:function(){return Ne()}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){this.options.onClick()}},{key:"viewOptions",value:function(){return{showMorePhrase:this.options.collapse?"showMore":"showLess"}}}])&&Ve(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),Ae=n(23468),Fe=n.n(Ae),Qe={suggestEdit:"AgfOM"};function ze(e){return ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ze(e)}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,o.key,o)}}function He(e,t){return He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},He(e,t)}function Ke(e,t){if(t&&("object"===ze(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 Ge=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&&He(e,t)}(a,e);var t,n,o,i,r=(o=a,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Ze(o);if(i){var n=Ze(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ke(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){var e=this;this.listenTo(this.options.channelName,"update:tags",(function(){return e.renderCustomerTags(!0)})),this.initializeCollapse()}},{key:"name",get:function(){return"EditVideoDetailsComponent"}},{key:"className",get:function(){return"edit-video-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editVideoDetails"}},{key:"template",get:function(){return Fe()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:f.OV.LIBRARY_EDITOR,action:f.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.id]}}}},{key:"events",value:function(){return{"click .expand-details":"onClickExpandDetails"}}},{key:"elements",get:function(){return{expandable:".collapse-area"}}},{key:"regions",value:function(){return{topSave:{el:".top-save-region",replaceElement:!0},bottomSave:{el:".bottom-save-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},basicInfo:{el:".basic-info-region",replaceElement:!0},collapseButton:{el:".collapse-button-region",replaceElement:!0},additionalInfo:{el:".additional-details-region",replaceElement:!0},productionInfo:{el:".production-info-region",replaceElement:!0},fields:{el:".fields-region",replaceElement:!0},clickViewTags:{el:".cv-tags-region",replaceElement:!1},customerTags:{el:".customer-tags-region",replaceElement:!0}}}},{key:"initializeCollapse",value:function(){var e,t,n,o,i,r;this.collapse=!(this.model.get("broadcastDate")||(null===(e=this.model.channel)||void 0===e?void 0:e.get("id"))||this.model.get("productionYear")||(null===(t=this.model.productionCompanies)||void 0===t?void 0:t.any((function(e){return e.get("id")})))||(null===(n=this.model.distributors)||void 0===n?void 0:n.any((function(e){return e.get("id")})))||(null===(o=this.model.producers)||void 0===o?void 0:o.any((function(e){return e.get("id")})))||(null===(i=this.model.directors)||void 0===i?void 0:i.any((function(e){return e.get("id")})))||(null===(r=this.model.fields)||void 0===r?void 0:r.any((function(e){return e.get("id")>0}))))}},{key:"onClickCollapse",value:function(){this.collapse=!this.collapse,this.renderCollapseButton(),this.collapse?this.getUI("expandable").hide():this.getUI("expandable").show()}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new we({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-right"})),this.showChildView("bottomSave",new we({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-right"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new T.J({model:this.model,ratings:this.options.ratings,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new De({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderCollapseButton",value:function(){this.showChildView("collapseButton",new Ue({onClick:this.onClickCollapse.bind(this),collapse:this.collapse}))}},{key:"renderAdditionalInfo",value:function(){this.options.currentUser.get("instanceRegion")!==k.b.US&&this.showChildView("additionalInfo",new j.a({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderProductionInfo",value:function(){this.showChildView("productionInfo",new P.O({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderFields",value:function(){this.options.currentUser.get("instanceRegion")!==k.b.US&&this.showChildView("fields",new Y({model:this.model,channelName:this.options.channelName}))}},{key:"renderClickViewTags",value:function(){if(!this.options.editable){var e=y.BK.filterObjectsByOwnerType(this.model.tags,C.N.ClickView,this.options.currentUser.get("customerId"));this.showChildView("clickViewTags",new ce({parentId:this.model.get("id"),collection:e,orientation:te.zM.Flex,behavior:te.Dm.Disabled,channelName:this.options.channelName,headerText:l.T.getPhrase(this.lang,"clickviewTags"),emptyStateText:l.T.getPhrase(this.lang,"clickviewTagsEmpty")}))}}},{key:"renderCustomerTags",value:function(e){var t=y.BK.filterObjectsByOwnerType(this.model.tags,C.N.Customer,this.options.currentUser.get("customerId"));this.showChildView("customerTags",new ce({parentId:this.model.get("id"),collection:t,channelName:this.options.channelName,behavior:te.Dm.Edit,headerText:this.options.editable?l.T.getPhrase(this.lang,"tags"):l.T.getPhrase(this.lang,"customerTags"),removeEvent:"remove:tag",autofocus:!!e}))}},{key:"renderTags",value:function(){this.renderClickViewTags(),this.renderCustomerTags()}},{key:"viewOptions",value:function(){return{styles:Qe,editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:y.M2.isExchangeVideo(this.model),collapse:this.collapse}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail(),this.renderTags(),this.renderCollapseButton(),this.renderAdditionalInfo(),this.renderProductionInfo(),this.renderFields()}}])&&Je(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),We=n(21053),Ye=n(53854),qe=n(75535),Xe=n(95061),$e=n(55230),et=n.n($e);function tt(e){return tt="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},tt(e)}function nt(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ot(e,t){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ot(e,t)}function it(e,t){if(t&&("object"===tt(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 rt(e){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},rt(e)}var 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&&ot(e,t)}(j,e);var t,n,C,T,P=(C=j,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}}(),function(){var e,t=rt(C);if(T){var n=rt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return it(this,e)});function j(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,j),(t=P.call(this,e)).editable=!1,t}return t=j,n=[{key:"name",get:function(){return"EditVideoView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editVideo"}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"template",get:function(){return et()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",replaceElement:!0,partialLoading:g.LP.EditVideoTabs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:g.LP.EditVideoDetails}}}},{key:"initialize",value:function(){this.navLock=u.u.getInstance(f.K9.NavLock,this),this.initDataListeners(),y.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=u.u.getInstance(f.Or.Video,this),this.tagDataService=u.u.getInstance(f.Or.Tags,this),this.seriesDataService=u.u.getInstance(f.Or.Series,this),this.ratingsDataService=u.u.getInstance(f.Or.Ratings,this),this.fieldsDataService=u.u.getInstance(f.Or.Fields,this),this.alertService=u.u.getInstance(f.K9.Alerts,this),this.personDataService=u.u.getInstance(f.Or.Person,this),this.companyDataService=u.u.getInstance(f.Or.Company,this)}},{key:"initDataListeners",value:function(){this.listenTo(c.G.SHELL,r.Q.EventNames.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(f.Vk.VIDEO,"videos:".concat(this.options.videoId,":sync"),this.render),this.listenTo(f.Vk.VIDEO,"videos:".concat(this.options.videoId,":error"),this.onError),this.listenTo(f.Vk.RATINGS,"".concat(f.M_.RATINGS,":sync"),this.render),this.listenTo(f.Vk.VIDEO,"".concat(f.M_.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),this.onThumbnailUpdated),this.listenTo(this.channelName,"select:rating",o.partial(this.onTypeaheadSelection,o,"rating")),this.listenTo(this.channelName,"select:channel",o.partial(this.onTypeaheadSelection,o,"channel")),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.channelName,"add:distributors",this.onSelectDistributor),this.listenTo(this.channelName,"add:productionCompanies",this.onSelectProductionCompany),this.listenTo(this.channelName,"add:directors",this.onSelectDirector),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:tag",this.onAddTag),this.listenTo(this.channelName,"remove:distributors",this.onRemoveDistributor),this.listenTo(this.channelName,"remove:productionCompanies",this.onRemoveProductionCompany),this.listenTo(this.channelName,"remove:directors",this.onRemoveDirector),this.listenTo(this.channelName,"remove:producers",this.onRemoveProducer),this.listenTo(this.channelName,"remove:tag",this.onRemoveTag),this.listenTo(this.channelName,O.LibraryEditorActions.Save,this.onSave),this.listenTo(this.channelName,O.LibraryEditorActions.Undo,this.onUndo),this.listenTo(this.channelName,O.LibraryEditorActions.DetectInput,this.onTypeaheadInput),this.listenTo(this.channelName,"image:load",this.onBeforeThumbnailUpload)}},{key:"onError",value:function(e){switch(e.type){case d.h.NotFound:r.Q.ErrorHelper.throw(new qe.l);break;case d.h.Forbidden:r.Q.ErrorHelper.throw(new Ye.a)}}},{key:"onTypeaheadSelection",value:function(e,t,n){if(n){var i=this.viewModel.get(t),r=i.filter({name:e.name});o.each(r,(function(e){return i.remove(e)})),i.add(e)}else this.viewModel.set(t,e);this.onModelChange(e,{manualUpdate:!0})}},{key:"onTypeaheadInput",value:function(e,t,n){e.get("name")||(n&&n.isCollection?this.viewModel.get(t).remove(e.get("id"),{silent:!0}):this.viewModel.get(t).clear({silent:!0}),this.onModelChange(null,{manualUpdate:!0}),"series"===t&&(this.validateSeries(),i.Radio.channel(this.channelName).trigger("clear:series")))}},{key:"onSelectSeries",value:function(e){var t=this;e.id?this.seriesDataService.getSeries(e.id,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection(e.toJSON(),"series")})):e.name&&this.seriesDataService.createSeries(e.name,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection({id:e.id},"series")}))}},{key:"onSelectSeason",value:function(e){var t=this;if(o.isNull(e))return this.viewModel.get("season").clear({silent:!0}),this.viewModel.set("episodeNumber",null),y.yV.deselectAll(this.viewModel.get("series.seasons")),void this.onModelChange(null,{manualUpdate:!0});if(e.id)return this.viewModel.set("season",e),y.yV.setSelected(e.id,this.viewModel.get("series.seasons")),void this.onModelChange(e,{manualUpdate:!0});if(e.number){var n=this.viewModel.get("series.id");this.seriesDataService.createSeason(e,n,(function(e){t.viewModel.set("season",e.toJSON()),!t.viewModel.get("series.seasons")&&t.viewModel.get("series").set("seasons",new h.i),t.viewModel.get("series.seasons").add(e.toJSON()),y.yV.setSelected(e.id,t.viewModel.get("series.seasons")),t.onModelChange(e.toJSON(),{manualUpdate:!0}),t.render()}))}}},{key:"onSelectDistributor",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"distributors",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"distributors",!0)}))}},{key:"onSelectProductionCompany",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"productionCompanies",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"productionCompanies",!0)}))}},{key:"onSelectDirector",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"directors",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"directors",!0)}))}},{key:"onSelectProducer",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"producers",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"producers",!0)}))}},{key:"onRemoveDistributor",value:function(e){this.removeFromCollection(e,"distributors")}},{key:"onRemoveProductionCompany",value:function(e){this.removeFromCollection(e,"productionCompanies")}},{key:"onRemoveDirector",value:function(e){this.removeFromCollection(e,"directors")}},{key:"onRemoveProducer",value:function(e){this.removeFromCollection(e,"producers")}},{key:"removeFromCollection",value:function(e,t){e&&e.id&&t&&(this.viewModel.get(t).remove(e.id),this.onModelChange(null,{manualUpdate:!0}))}},{key:"onAddTag",value:function(e){var t=this;if(e&&e.name){var n=e.name.trim().toLowerCase();if(n&&!y.yV.findModelByName(n,this.viewModel.tags)){var o=new m.V({name:n});this.viewModel.tags.add(o),this.tagDataService.createTag(n,this.model.get("id"),(function(e){o.set(e.toJSON()),i.Radio.channel(t.channelName).trigger("update:tags")}))}}}},{key:"onRemoveTag",value:function(e){var t=this;e instanceof m.V&&e.id&&this.tagDataService.dissociateTag(e.id,this.model.get("id"),(function(){t.viewModel.tags.remove(e),i.Radio.channel(t.channelName).trigger("update:tags"),t.logDissocAction(t.model.get("id"),e,w.EntityType.Tag)}))}},{key:"saveFields",value:function(e,t){var n=this,i=0;e.updatedVideo=o.extend({},e.updatedVideo||{});var r=function(){++i===e.dataChanges.fields.length&&t(e)};o.each(e.dataChanges.fields,(function(e){if(e.id&&!e.value)return n.viewModel.fields.remove(n.viewModel.fields.findWhere({id:e.id})),void n.fieldsDataService.deleteField(e.id,r);!e.id||e.id>0?n.fieldsDataService.updateField(e,r):n.fieldsDataService.addField(n.options.videoId,e,(function(t){n.viewModel.fields.findWhere({id:e.id}).set("id",t.id),r()}))}))}},{key:"bulkDissoc",value:function(e,t){this.videoDataService.bulkDissoc(this.model.id,e.pendingDissocs,(function(){t(e)}))}},{key:"saveVideo",value:function(e,t){var n=this,i=o.omit(e.dataChanges,"fields");if(o.isEmpty(i))t(e);else{var r=o.omit(e.dataChanges,"fields");this.videoDataService.updateVideo(this.model.get("id"),this.folder.get("id"),r,(function(i){(e.dataChanges.series&&e.dataChanges.series.id||e.dataChanges.episodeNumber||e.dataChanges.season)&&n.videoDataService.clearVideoCache(),e.updatedVideo=o.extend({},e.updatedVideo||{},i),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(O.LibraryEditorActions.DisableSave),this.logEditAction(e.dataChanges,w.WorkflowPhase.Save);var t=b.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Video was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(O.LibraryEditorActions.CancelSave),!1;this.validateSeries();var e=E.xC.getChanges(this.model,this.viewModel),t=E.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!o.keys(t).length)return this.updateSaveButton(O.LibraryEditorActions.CancelSave),!1;var n=new r.Q.Middleware;return e&&e.fields&&n.use(o.bind(this.saveFields,this)),t&&o.keys(t).length&&n.use(o.bind(this.bulkDissoc,this)),this.editable&&n.use(o.bind(this.saveVideo,this)),n.use(o.bind(this.afterSave,this)),n.go({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new y.Mr({title:l.T.getPhrase(this.lang,"undoTitle"),text:l.T.getPhrase(this.lang,"undoBody",{videoName:this.model.get("name")}),buttons:[{text:l.T.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:l.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}]}).render().done((function(){e.logEditAction({},w.WorkflowPhase.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),E.xC.updateModelState(this.model,this.viewModel,e),s.r.clear(this.viewModelName),this.getViewModel(),this.renderContent(),this.renderTabs()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.undo;this.stopListening(this.viewModel),s.r.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),t&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:l.T.getPhrase(this.lang,"navLockHeading"),text:l.T.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{key:"onBeforeThumbnailUpload",value:function(){this.navLock.isLocked()&&(this.navLock.unlock(),s.r.get("upload:thumbnail:options").set("lockNav",!0))}},{key:"onModelChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.stickitChange||t.manualUpdate)if(this.viewModel.validate(),!1!==this.viewModel.isValid()){var n=E.xC.getChanges(this.model,this.viewModel)||o.keys(E.xC.getRemovedObjectIds(this.model,this.viewModel)).length;if(!n)return this.unlockNav(),void this.updateSaveButton(O.LibraryEditorActions.DisableSave);this.lockNav(),this.updateSaveButton(O.LibraryEditorActions.EnableSave)}else this.updateSaveButton(O.LibraryEditorActions.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=i.Radio.channel(this.channelName),n=O.LibraryEditorActions.EnableSave,o=O.LibraryEditorActions.DisableSave,s=O.LibraryEditorActions.CancelSave;switch(e){case n:return void t.trigger(n);case o:return void t.trigger(o);case s:return void t.trigger(s)}r.Q.ErrorHelper.throw(new a.H("Save action type is not valid."))}},{key:"onThumbnailUpdated",value:function(){var e=this;this.videoDataService.clearCacheAndGetVideo(this.options.videoId,(function(t){e.model=t,e.viewModel.set("thumbnail",e.model.thumbnail.toJSON())}))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);S.k.logUserAction(n,{actionType:w.UserAction.Edit,entity:w.EntityType.Video,location:w.LocationContext.EditVideoDetails,workflowPhase:t})}},{key:"logDissocAction",value:function(e,t,n){var o=Object.assign({videoId:e},t.pick("id","name"));S.k.logUserAction(o,{actionType:w.UserAction.Dissociate,entity:n,location:w.LocationContext.EditVideoDetails})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.model.fields&&this.model.fields.length||this.model.set("fields",(0,E.aj)()),this.viewModel=s.r.get(this.viewModelName,this.model.toJSON(),{ctor:v.n}),this.editable&&(this.viewModel.addValidation(E.rr),this.viewModel.addValidation(E.tD));var e=this.currentUser.get("instanceRegion")!==k.b.US;e&&this.viewModel.addValidation(E.oJ),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange),this.listenTo(this.viewModel,"change:dateBroadcast",o.partial(this.onModelChange,o,{manualUpdate:!0})),this.viewModel.fields&&e&&(this.viewModel.fields&&this.viewModel.fields.each((function(e){return e.addValidation(E.Zg)})),this.listenTo(this.viewModel.fields,"change",this.onModelChange))}},{key:"validateSeries",value:function(){this.viewModel.get("series.id")||(this.viewModel.unset("season"),this.viewModel.set("episodeNumber",null))}},{key:"fetchData",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.ratings=this.ratingsDataService.getAllRatings(),this.model&&(this.editable=y.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.ratings&&(this.viewModel instanceof v.n||this.getViewModel()))}},{key:"requiredResources",get:function(){return{currentUser:p.K.currentUser,libraries:Xe.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.ratings&&!!this.viewModel}},{key:"renderContent",value:function(){var e=E.xC.getChanges(this.model,this.viewModel)||o.keys(E.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new Ge({model:this.viewModel,ratings:this.ratings,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"renderTabs",value:function(){this.showChildView("tabs",new We.W({model:this.viewModel,tabs:y.Si.getEditVideoTabs(this.options.videoId,this.editable),activeTab:".edit-video-applink",context:"edit",folder:this.folder,libraries:this.libraries}))}},{key:"onRender",value:function(){this.renderTabs(),this.renderContent()}}],n&&nt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),j}(r.Q.View)},86272:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return e.propertyIsEnumerable,"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+"</h5>\n"},3:function(e,t,n,o,i){return"my-2"},5:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return' <div class="text-muted mt-3 mb-1"><em>'+l((n.lang||t&&t.lang||s).call(a,"recommendedSize",{name:"lang",hash:{height:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.height:r,width:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.width:r},data:i}))+'</em></div>\n <button class="upload-thumbnail btn btn-outline-dark mb-3 w-100">'+l((n.lang||t&&t.lang||s).call(a,"upload",{name:"lang",hash:{},data:i}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="thumbnail-region"></div>\n<div class="'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'">\n'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},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})},23468:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"mb-4"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.suggestEdit:r,t))+'">\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isExchange:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.program(6,i,0),data:i}))?r:"")+" </p>\n"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEditExchange",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},6:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},8:function(e,t,n,o,i){return"none"},10:function(e,t,n,o,i){return"block"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return'<div class="row">\n <div class="left-pane col-4">\n <div class="thumbnail-region"></div>\n <div class="cv-tags-region '+(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:"")+'"></div>\n <div class="customer-tags-region"></div>\n </div>\n <div class="right-pane col-8">\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="top-save-region"></div>\n <div class="basic-info-region mb-4"></div> \n <div class="collapse-button-region"></div>\n <div class="collapse-area" style="display: '+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.collapse:r,{name:"if",hash:{},fn:e.program(8,i,0),inverse:e.program(10,i,0),data:i}))?r:"")+';">\n <div class="additional-details-region"></div> \n <div class="production-info-region mb-4"></div> \n <div class="fields-region mb-4"></div>\n </div>\n <div class="bottom-save-region"></div>\n </div>\n</div>'},useData:!0})},58259: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,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.showMorePhrase:r,{name:"lang",hash:{},data:i}))},useData:!0})},99724:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-muted mx-2 undo '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.undo:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"undo",{name:"lang",hash:{},data:i}))+"</span>\n"},compiler:[8,">= 4.3.0"],main: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.allowUndo:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="save-region"></div>'},useData:!0})},15564:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return'<span class="close cursor-pointer" aria-hidden="true">&times;</span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,c="function",u=e.escapeExpression;return'<span class="clamp-1" title="'+u(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)===c?a.call(s,{name:"name",hash:{},data:i}):a)+'">'+u(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)===c?a.call(s,{name:"name",hash:{},data:i}):a)+"</span>\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.removable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},30992: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,"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>\n"},5:function(e,t,n,o,i){return'<div class="tag-selector-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.headerText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="tag-list-region"></div>'},useData:!0})},55230: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'<div class="tab-region"></div>\n<div class="edit-content-region"></div>\n<div class="dialog-region"></div>'},useData:!0})},44106: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'<h5 class="mb-0">Extra Information</h5>\n<div class="text-muted mb-3">This information is only visible to administrators and will not be searchable</div>\n<div class="fields-region"></div>'},useData:!0})},72891: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,'<div class="form-group">\n <label for="edit-description">'+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)+'</label>\n <div class="text-area-region"></div>\n <div class="form-feedback"></div>\n</div>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8124],{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)(),d=(0,i.useSelector)((function(t){return t.viewModelData[e]}));function m(){return null!=s}"undefined"!==s&&"null"!==s||(s=null);var p=(void 0!==t||m())&&void 0===d;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 m()?void f(s):void f(t)}),[]),p?m()?[s,f]:[t,f]:[null!=d?d: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}},1182:function(e,t,n){"use strict";n.r(t),n.d(t,{ShareView:function(){return Tn}});var r,a=n(1024),i=n.n(a),o=n(58566),c=n(57857),l=n(86120),s=n(15408),u=n(66703),d=n(71575),m=n(2491),p=n(36357);!function(e){e.GoogleClassroom="google-classroom",e.MicrosoftTeams="microsoft-teams"}(r||(r={}));var f,v=c.T.encloseNamespace("shared.shared-utils"),y=function(e,t){return[{id:r.GoogleClassroom,name:v("googleClassroom"),enabled:null!=e&&e,settingName:p.E.ShareToGoogleClassroom},{id:r.MicrosoftTeams,name:v("msftTeams"),enabled:null!=t&&t,settingName:p.E.ShareToMicrosoftTeams}]},g=n(98495),h=n(40221),b=n(68003),E=n(16771),S=n(13034),C=n(8952),w=n(53808);function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}!function(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)"}(f||(f={}));var I=n(39396),O=n(63791),x="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 T(e){var t="d-inline-block svg-container";return w.q.isFunction(e)?t+" cursor-pointer":t}function N(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(I.x,{svgName:O.vn.Search,size:I.S.Standard,onClick:t,className:T(t)}))};return a.createElement("div",{className:"position-relative ".concat("utnMG")},"left"===n&&a.createElement("div",{className:"".concat(x," ").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(x," ").concat("V23aG")},!!r&&a.createElement((function(){return a.createElement("div",{className:"d-inline-block text-muted ".concat("TAoT9")},a.createElement(I.x,{svgName:O.vn.Close,size:I.S.Standard,onClick:i,className:T(i)}))}),null),"right"===n&&a.createElement(u,null)))}var L=n(99910),P=n(2248),j=n(85887);function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}var V,F={isNumber:function(e){return F.isType(e,"number")},isString:function(e){return F.isType(e,"string")},isType:function(e,t){return U(e)===t}};function R(e){return function(e){if(Array.isArray(e))return D(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 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}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){(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,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e,t){var n;return _(n={},V.Recent,t),_(n,V.Local,e),_(n,V.Remote,[]),_(n,V.Generic,[]),n}function B(e,t){return j.t.isObject(e)&&e.hasOwnProperty(t)&&F.isString(e[t])}function G(e,t){e(Object.assign(Object.assign({},M([],[])),_({},V.Generic,[{type:t,generic:!0}])))}function z(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=w.q.isFunction(e.getLocalSuggestions)?e.getLocalSuggestions(o,e.local):(u=o,d=e.local,m=e.valueKey,(p=u.trim().toLowerCase()).length?d.filter((function(e){return!(!B(e,m)||!F.isString(e[m]))&&e[m].trim().toLowerCase().includes(p)})):[]);if(!s.length&&e.getEmptyStateComponent)return void G(t,"empty");t((function(e){var t;return Object.assign(Object.assign({},e),(_(t={},V.Local,s),_(t,V.Generic,[]),t))}))}var u,d,m,p;e.getRemoteUrl&&(G(t,"loading"),function(n,r,a,i,o){var c=w.q.isFunction(n)&&n(r);c&&l.a.ajaxRequest({resource:c,type:P.k.GET,success:function(n){var r=w.q.isFunction(e.formatRemoteSuggestions)?e.formatRemoteSuggestions(n):n;r.length||!e.getEmptyStateComponent?t((function(e){var t;return Object.assign(Object.assign({},e),(_(t={},V.Remote,r),_(t,V.Generic,[]),t))})):G(t,"empty")},error:function(){G(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(V.Recent),c=i(V.Local),l=i(V.Remote),s=i(V.Generic);if(s.length)return[{data:s,suggestionType:V.Generic}];if(w.q.isFunction(r))return r([].concat(R(c),R(l),R(o)));var u=[];return((null==c?void 0:c.length)||(null==l?void 0:l.length))&&u.push({title:t,data:H([].concat(R(c),R(l)),a),suggestionType:V.Local}),(null==o?void 0:o.length)&&u.push({title:n,data:H(o,a),suggestionType:V.Recent}),u}function H(e,t){return"boolean"==typeof t||e.length<=t?e:e.slice(0,t)}function K(e){return e.data}function W(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||Z(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 Z(e,t){if(e){if("string"==typeof e)return $(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)?$(e,t):void 0}}function $(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"}(V||(V={}));var Q="shared.searchBar",X=w.q.isFunction;function Y(e){return e.renderAsForm?a.createElement("form",{onSubmit:e.onSubmit},e.children):a.createElement(a.Fragment,null,e.children)}function J(e){var t,n=M(e.initialLocalSuggestions,e.recentSearches),r=W(a.useState(e.initialQuery||""),2),i=r[0],o=r[1],l=W(a.useState(n),2),s=l[0],u=l[1],d=W(a.useState(e.initialQuery||""),2),m=d[0],p=d[1],v=W(a.useState("none"),2),y=v[0],h=v[1],b=function(e){var t,n,r=(t=(0,a.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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return k(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)?k(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(0,a.useEffect)((function(){var t=window.matchMedia(e);t.matches!==i&&o(t.matches);var n=function(){return o(t.matches)};return t.addListener(n),function(){return t.removeListener(n)}}),[e]),i}(f.XS);a.useEffect((function(){if(!i.length){var t=M(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 E=function(){var t=M(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 I,O,x,A,T,P=function(){h("none")},j=function(t){t.preventDefault(),X(e.onSubmit)&&e.onSubmit(i),e.clearQueryOnSelect&&S()},U=a.useMemo((function(){return e.debounceTime?w.q.debounce(z(e,u,E),e.debounceTime):z(e,u,E)}),[e.debounceTime].concat(function(e){if(Array.isArray(e))return $(e)}(I=e.onSuggestionDependencies)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(I)||Z(I)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));return a.createElement(Y,{onSubmit:j,renderAsForm:!!e.renderAsForm},a.createElement(C,Object.assign({ref:function(e){null!==e&&(t=e.input)},suggestions:q(s,e.suggestionsHeading,e.recentSearchHeading||c.T.getPhrase(Q,"recentSearchesHeading"),e.getSections,e.suggestionLimit),onSuggestionsFetchRequested:U,onSuggestionHighlighted:function(e){var t=e.suggestion;("none"!==y||t)&&h(t?"suggestion":"custom")},onSuggestionsClearRequested:function(){e.alwaysRenderSuggestions||E()},onSuggestionSelected:function(n,r){var a=r.suggestion;a.generic||(e.clearQueryOnSelect&&S(),e.onSuggestionSelected(a,t))},getSuggestionValue:function(t){return function(t){return X(e.shouldUpdateQueryOnSelection)?e.shouldUpdateQueryOnSelection(t):e.shouldUpdateQueryOnSelection}(t)?function(e,t){return B(t,e)?t[e]:""}(e.valueKey,t):i},renderSuggestion:function(t){if(t.generic){if("empty"===t.type)return i.length>=e.activationLength&&X(e.getEmptyStateComponent)?e.getEmptyStateComponent(i):a.createElement(a.Fragment,null);if("errored"===t.type&&X(e.getErrorStateComponent)){var n=z(e,u,E);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(L.Spinner,{as:"span",animation:"border",role:"status"}))}var r;return X(e.getSuggestionComponent)?e.getSuggestionComponent(t):function(e,t){return B(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:P}),t.children,e.getCreateComponent&&e.getCreateComponent(Object.assign({userInput:m,isActive:"custom"===y,onClear:function(){S(),E()}},c)),e.getFooterComponent&&e.getFooterComponent(c))}return a.createElement(g.ZP,Object.assign({ref:r},e.customScrollbarProps,o),t.children)},alwaysRenderSuggestions:e.alwaysRenderSuggestions,focusInputOnSuggestionClick:!b&&e.focusInputOnSuggestionClick,inputProps:{placeholder:e.placeholder||c.T.getPhrase(Q,"placeholder"),value:i,onChange:function(t,n){var r=n.newValue,a=n.method;"type"===a&&p(r),"escape"===a&&h("none"),["up","down"].includes(a)||(o(r),X(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&&j,searchIconPlacement:e.searchIconPlacement,showClearInputIcon:!!e.showClearInputIcon&&!!i.length,onClickClearInput:function(){S(),X(e.onClickClearInput)&&e.onClickClearInput()},formSize:e.size,onBlur:function(){e.onBlur&&e.onBlur(i)}},renderInputComponent:N,theme:(O=e.theme,x=!!s.generic.length,A="function"==typeof O?O(x):O,T=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")}}(x),Object.assign(T,A)),multiSection:!0,renderSectionTitle:function(t){return X(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:K},e.renderSuggestionsOnInputFocus?{shouldRenderSuggestions:function(){return X(e.renderSuggestionsOnInputFocus)?e.renderSuggestionsOnInputFocus(i):e.renderSuggestionsOnInputFocus}}:{})))}J.defaultProps={valueKey:"name",activationLength:3,suggestionLimit:5,recentSearches:[],initialLocalSuggestions:[],searchIconPlacement:"right",renderAsForm:!0,onSuggestionDependencies:[],shouldUpdateQueryOnSelection:!0,focusInputOnSuggestionClick:!0};var ee=n(74421),te=n(63946),ne=function(e,t){return(null==e?void 0:e.typeId)===t},re=n(83891),ae=n(38182),ie=n(1268),oe=n(46237),ce="Zcpg3",le=c.T.encloseNamespace("shared.userRecipientItemMetadata");function se(e){var t;return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(ce," d-inline-block")},i().createElement(ae.q,{imageUrl:null===(t=e.user.avatar)||void 0===t?void 0:t.url,imageCdnUrl:e.imageCdnUrl,initials:re.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"},re.l.getDisplayName(e.user)),i().createElement("p",{className:"text-muted m-0"},function(e){var t=re.l.getUserType(e),n=re.l.getUserRole(e);if(t===ie.Y.Staff)return n===oe.i.Admin?le("admin"):le("staff");var r=re.l.getYearGroup(e);return(null==r?void 0:r.name)?r.name:le("student")}(e.user))))}var ue=n(84611);function de(e){return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(ce," d-inline-block")},i().createElement(ue.f,{svgName:O.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 me=n(16287);function pe(e){switch(e){case me.ClassroomGroupColour.Pink:return"pink";case me.ClassroomGroupColour.Orange:return"orange";case me.ClassroomGroupColour.Green:return"green";case me.ClassroomGroupColour.Blue:return"blue";case me.ClassroomGroupColour.Purple:return"purple";case me.ClassroomGroupColour.Indigo:return"indigo";default:return"pink"}}function fe(e){var t;return i().createElement(i().Fragment,null,i().createElement("div",{className:"".concat(ce," d-inline-block")},i().createElement(ue.f,{svgName:O.vn.Group,variant:pe(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 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}var ye=c.T.encloseNamespace("share.recipientItem");function ge(e){switch(e){case ee.E.User:return ye("removeUser");case ee.E.Classroom:return ye("removeClassroom");case ee.E.ClassroomGroup:return ye("removeGroup")}return null}function he(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(t,n)||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}}(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},ne(e.entity,ee.E.User)?i().createElement(se,{user:e.entity,imageCdnUrl:e.imageCdnUrl,detailsClassName:l}):ne(e.entity,ee.E.Classroom)?i().createElement(de,{classroom:e.entity,detailsClassName:l}):ne(e.entity,ee.E.ClassroomGroup)?i().createElement(fe,{classroomGroup:e.entity,detailsClassName:l}):void 0,w.q.isFunction(e.removeRecipient)&&i().createElement("div",{className:"".concat("mCbMC"," d-inline-flex justify-content-center align-items-center")},a?i().createElement(L.Spinner,{as:"div",size:"sm",animation:"border",role:"status"}):i().createElement(te.u,{title:ge(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 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}function Ee(e){var t,n,r,a,o,c,l=e.query,s=void 0===l?"":l,d=e.imageUrl,m=(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(o,c)||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}}(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:d,className:"pb-2 ".concat("bKTf0")}),i().createElement("h2",{className:"h6"},i().createElement(u.x,{namespace:"shared.typeaheadEmptyState",phrase:"noResults",options:{query:m,smartCount:m.length}})))}var Se=n(58424),Ce="shared.typeaheadErrorState";function we(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:Ce,phrase:"error"})),i().createElement(Se.L,{onClick:function(t){t.stopPropagation(),e.onClickTryAgain()},className:"btn btn-link info-link p-0"},i().createElement(u.x,{namespace:Ce,phrase:"tryAgain"})))}function ke(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 Ie="laVU4",Oe="rFH4W",xe=c.T.encloseNamespace("shared.inputSelection");function Ae(e){var t,n="".concat(Ie," ").concat("BarYz");return e.typeId===ee.E.Classroom?n+=" text-teal":n+=" text-".concat(pe(null===(t=e.metadata)||void 0===t?void 0:t.colour)),n}function Te(e){var t,n=function(e){var t;switch(e.typeId){case ee.E.Classroom:return"text-hover-teal";case ee.E.ClassroomGroup:return"text-hover-".concat(pe(null===(t=e.metadata)||void 0===t?void 0:t.colour))}}(e.selection),r=e.selection.typeId===ee.E.Classroom;if(!e.canExpand){if(e.selection.typeId===ee.E.User){var a=e.selection;return i().createElement("div",{className:Ie},i().createElement(ke,{imageUrl:null===(t=a.avatar)||void 0===t?void 0:t.url,initials:re.l.getInitials(e.selection.name,e.selection.surname)}))}return i().createElement(te.u,{title:xe(r?"emptyClassroom":"emptyGroup")},i().createElement("div",{className:"align-items-center border border-white bg-white ".concat(Oe)},i().createElement(I.x,{className:Ae(e.selection),svgName:r?O.vn.Classrooms:O.vn.Group})))}return e.hasExpanded?i().createElement("div",{className:"d-flex align-items-center text-white ".concat("iKeXW"," ").concat(Ie)},i().createElement(L.Spinner,{as:"div",size:"sm",animation:"border",role:"status"})):i().createElement(i().Fragment,null,i().createElement(Se.L,{className:"align-items-center cursor-pointer text-white border border-white rounded-circle ".concat("d1NHd"," ").concat(n),onClick:e.onClickExpand},i().createElement(I.x,{svgName:O.vn.Plus,className:"d-flex align-items-center ".concat(Ie)})),i().createElement("div",{className:"align-items-center border border-white bg-white ".concat(Oe)},i().createElement(I.x,{className:Ae(e.selection),svgName:r?O.vn.Classrooms:O.vn.Group})))}function Ne(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Le(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)?Le(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 Le(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 Pe(e){var t;switch(e.typeId){case ee.E.User:return"number"==typeof e.userType?2===e.userType?"dark-blue":"indigo":e.userType===ie.Y.Learner?"dark-blue":"indigo";case ee.E.Classroom:return"teal";case ee.E.ClassroomGroup:return pe(null===(t=e.metadata)||void 0===t?void 0:t.colour)}}function je(e){var t,n,r,a=ne(e.selection,ee.E.Classroom),o=ne(e.selection,ee.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=Ne(i().useState(!1),2),d=u[0],m=u[1],p=Ne(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=Pe(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(Ue,{key:"".concat(t.id,":").concat(e.selection.id),selection:t,colourVariant:g})})),i().createElement(Se.L,{className:"cursor-pointer position-absolute text-".concat(g," ").concat("mgt6Y"),onClick:function(){return e.onClickRemove(e.selection.id)}},i().createElement(I.x,{svgName:O.vn.Close,className:"d-flex align-items-center ".concat(Ie)})))}return i().createElement(Ue,{selection:e.selection,canExpand:f,hasExpanded:d,onClickExpand:function(){m(!0),e.onClickExpand(e.selection.id)},onClickRemove:e.onClickRemove,colourVariant:Pe(e.selection)})}function Ue(e){var t=e.colourVariant||Pe(e.selection),n=e.selection.name;return e.selection.typeId===ee.E.User&&(n=re.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(Te,{canExpand:e.canExpand,hasExpanded:e.hasExpanded,onClickExpand:e.onClickExpand,selection:e.selection}),i().createElement("span",{className:"mx-1 text-white"},n),w.q.isFunction(e.onClickRemove)&&i().createElement(Se.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(I.x,{svgName:O.vn.Close,className:"d-flex align-items-center ".concat(Ie)})))}function Ve(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(I.x,{className:"svg-container m-1",svgName:O.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(je,{key:t.id,selection:t,onClickRemove:function(t){return e.removeSelection(t)},onClickExpand:e.fetchSelectionMembers})})),i().createElement(J,{getRemoteUrl:e.getRemoteUrl,requestHeaders:e.requestHeaders,formatRemoteSuggestions:e.formatRemoteSuggestions,onSuggestionSelected:function(t){e.updateSelections(t)},onBackspace:function(){return e.selections.length&&e.removeSelection(h.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(he,{entity:t,imageCdnUrl:e.imageCdnUrl})},getEmptyStateComponent:function(t){return i().createElement(Ee,{query:t,imageUrl:e.emptyStateImageUrl})},getErrorStateComponent:function(t){return i().createElement(we,{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 Fe=n(59087);function Re(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 De=c.T.encloseNamespace("shared.copyInput");function _e(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Re(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)?Re(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(Fe,{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))}},De(i?"copied":"copy")))));return e.label?a.createElement(L.Form.Group,null,a.createElement(L.Form.Label,null,e.label),c):c}_e.defaultProps={styling:"normal"};var Me,Be=n(33192),Ge=n.n(Be);function ze(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(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"}(Me||(Me={}));var He=c.T.encloseNamespace("share.shareLinkInfo");function Ke(e){var t=ze(i().useState(!1),2),n=t[0],r=t[1],a=ze(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===ee.E.Playlist)return r?{icon:O.vn.Warning,text:He("hasPrivateVideos")}:{icon:O.vn.VisibleOn,text:He("public")};if(t===ee.E.Topic||t===ee.E.Series)return{icon:O.vn.VisibleOn,text:He("justMySchool")};if(!Array.isArray(n))switch(n.privacy){case"public":return{icon:O.vn.VisibleOn,text:He("public")};case"protected":return{icon:O.vn.VisibleOn,text:He("clickViewOnly")};case"just_my_customer":return{icon:O.vn.Lock,text:He("justMySchool")};case"restricted":case"private":return{icon:O.vn.Lock,text:He("private")};default:return{}}}(e);if(!t)return{icon:O.vn.Lock,text:He("password")};var a=Ge().utc(t).local(),i=Ge()(),o=a.isSame(i,"day"),c=a.diff(i,"days");if(!n){var l=o?He("expiryToday"):He("expiry",{days:c});return r===Me.Expired&&(l=He("expired")),{icon:O.vn.Timer,text:l}}var s=o?He("passwordExpiryToday"):He("passwordExpiry",{days:c});return r===Me.Expired&&(s=He("passwordExpired")),{icon:O.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===ee.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(I.x,{svgName:s,className:"svg-container mr-1"}),n&&e.onClickShowPrivacies?i().createElement(Se.L,{className:"info-link",onClick:e.onClickShowPrivacies},u):i().createElement("span",null,u))}var We=n(52076),Ze=n(22218),$e=n(34254);function Qe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xe,Ye={namespace:"share"},Je=function(e,t){e.sort();var n={id:e};return t===ee.E.User&&(n.query="yearGroups,avatar"),t===ee.E.Classroom&&(n.query="users[count()]{limit:0}"),t===ee.E.ClassroomGroup&&(n.query="classroom,users[count()]{limit:0}"),{url:b._.urlBuilder("{gateway}/v1/objects",n),key:"share:recipients:".concat(e.join(":"),":").concat(t)}},et=n(4705),tt={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=tt.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)),tt.setRecentItem(e,o,t),o},removeRecentItem:function(e,t,n){var r=tt.getRecentItem(e,n).filter((function(e){return e!==t.toString()}));tt.setRecentItem(e,r,n)}},nt=function(e){return"recently:shared:to:".concat(e)},rt=(n(90335),n(84657));!function(e){e.Topic="topic",e.Series="series",e.Playlist="playlist"}(Xe||(Xe={})),n(50028);var at,it,ot,ct,lt=(n(42227),n(48318));(ct=at||(at={})).Newest="newest",ct.Oldest="oldest",ct.RecentlyUpdated="recently_added",ct.AtoZ="atoz",ct.ZtoA="ztoa",(ot=it||(it={})).OwnedByMe="owned_by_me",ot.Followed="followed",ot.All="all",lt.BaseCollectionIdentifier,n(18830);var st,ut;!function(e){e.Playlists="playlists",e.Series="series",e.Videos="videos",e.PinnedVideos="pinnedVideos"}(st||(st={})),function(e){e.Subject="Subject",e.Curriculum="Curriculum"}(ut||(ut={})),n(85523);var dt=c.T.encloseNamespace("shared.share"),mt={getObjectTypeId:function(e){switch(e){case"video":return ee.E.Video;case"playlist":return ee.E.Playlist;case"subject":return ee.E.Subject;case"series":return ee.E.Series;case"interactive":return ee.E.Interactive;case"clip":return ee.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:P.k.POST,data:e,normalizeOptions:Ye,invalidationKeys:["share:link:object:".concat(e.resourceId),"privacy:".concat(e.resourceId)],success:t,error:n,always:r}}(t,(function(t){We.k.logUserAction(t,We.k.mergeOptions(mt.getAnalyticsOptions(e.entityType),{actionType:Ze.Vw.Create,entity:Ze.py.ShareLink,eventVersion:Ze.eq.V3})),e.success&&e.success(t)}),(function(){e.alerts.error(dt("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:P.k.PUT,normalizeOptions:Ye,invalidationKeys:["share:".concat(e.id),"share:link:object:".concat(e.objectId),"share:sent"],success:n,error:r,always:a}}(r,a,(function(e){We.k.logUserAction(e,We.k.mergeOptions(mt.getAnalyticsOptions(n),{actionType:Ze.Vw.Edit,entity:Ze.py.ShareLink,eventVersion:Ze.eq.V3})),o&&o(e),i.success(dt("editSuccess",{name:t.name,escapeText:!0}))}),(function(){c&&c(),i.error(dt("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:P.k.DELETE,normalizeOptions:Ye,invalidationKeys:["share:".concat(e.id),"share:link:object:".concat(e.objectId)],success:t,error:n,always:r}}(r,(function(){We.k.logUserAction({shareLink:r},We.k.mergeOptions(mt.getAnalyticsOptions(n),{actionType:Ze.Vw.Delete,entity:Ze.py.ShareLink})),i&&i(),a.success(dt("deleteSuccess",{name:t.name,escapeText:!0}))}),(function(){a.error(dt("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,d=e.onDone,m=function(e){s&&s(e),We.k.logUserAction(Object.assign(Object.assign({},n),{shareCount:i.length}),We.k.mergeOptions(mt.getAnalyticsOptions(r),{actionType:Ze.Vw.Share,descriptor:Ze.YM.DirectShare,eventVersion:Ze.eq.V3})),i.map((function(e){!function(e,t){tt.addRecentItem(nt(e),et.SG,t)}(a.id,{id:e.id})}))},p={objectId:n.id,objectTypeId:mt.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:P.k.POST,normalizeOptions:Ye,invalidationKeys:"share:sent",updateState:{keys:i,updateData:function(e){return!e[i]||t.recipients.length?e:Object.assign(Object.assign({},e),Qe({},i,[]))}},success:n,error:r,always:a}}(o.id,f,m,u,d):function(e,t,n,r){return{url:"{gateway}/v1/share",key:"create:direct:share",data:e,type:P.k.POST,normalizeOptions:Ye,invalidationKeys:["direct:share:sent:object:".concat(e.objectId),"share:sent"],success:t,error:n,always:r}}(p,m,u,d);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:b._.urlBuilder("{gateway}/v1/share/".concat(e,"/recipients"),{recipientId:t}),key:"remove:direct:share:recipient",type:P.k.DELETE,normalizeOptions:Ye,invalidationKeys:"share:sent",updateState:{keys:i,updateData:function(e){return e[i]?Object.assign(Object.assign({},e),Qe({},i,[])):e}},success:n,error:r,always:a}}(r.id,t,(function(e){a&&a(e),We.k.logUserAction({shareCount:1},We.k.mergeOptions(mt.getAnalyticsOptions(n),{actionType:Ze.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=h.m.groupBy(e,"typeId"),n=t[ee.E.User],r=t[ee.E.Classroom],a=t[ee.E.ClassroomGroup];l.a.useBasicFetch(!!(null==n?void 0:n.length)&&Je(n.map((function(e){return e.id})),ee.E.User)),l.a.useBasicFetch(!!(null==r?void 0:r.length)&&Je(r.map((function(e){return e.id})),ee.E.Classroom)),l.a.useBasicFetch(!!(null==a?void 0:a.length)&&Je(a.map((function(e){return e.id})),ee.E.ClassroomGroup))},getAnalyticsOptions:function(e){var t;switch(e){case"playlist":t=Ze.py.Playlist;break;case"subject":t=Ze.py.Classification;break;case"video":t=Ze.py.Video;break;case"series":t=Ze.py.Series;break;case"interactive":t=Ze.py.Interactive;break;case"clip":t=Ze.py.Clip}return{entity:t,location:Ze.LZ.Popup,workflowPhase:Ze.eu.Complete}},getFetchFunctionByType:function(e){switch(e){case"video":return function(e){return l.a.useBasicFetch(function(e,t){return{url:b._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:rt.v.VIDEO,permissionFilterOption:t}),publicUrl:b._.urlBuilder("/api/objects/".concat(e),{query:rt.t.VIDEO,permissionFilterOption:$e.r.StripMetadata}),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:b._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"".concat(rt.v.PLAYLIST,",_isClickViewPlaylist,_liteOwner")}),publicUrl:b._.urlBuilder("/api/objects/".concat(e),{query:"".concat(rt.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:b._.urlBuilder("/api/domain/v1/subjects/".concat(e),{query:rt.v.CLASSIFICATION(t)}),publicUrl:b._.urlBuilder("/api/subjects/classifications/".concat(e),{query:rt.t.CLASSIFICATION}),key:"classification:".concat(e),error:n}}(e,t))};case"series":return function(e){return l.a.useBasicFetch(function(e){var t={query:rt.v.SERIES};return{url:b._.urlBuilder("{gateway}/v1/objects/".concat(e),t),publicUrl:b._.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:b._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:rt.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:b._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:rt.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:""}},pt=n(70065);function ft(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return vt(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)?vt(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 vt(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 yt="share.shareAsLink";function gt(e){var t=ft(i().useState(!1),2),n=t[0],r=t[1],a=ft(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(L.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(te.u,{title:"playlist"===e.entityType||"series"===e.entityType?c.T.getPhrase(yt,"deleteLinkTooltipPlaylist"):"",spanHack:!0},i().createElement(Se.L,{onClick:e.onClickDeleteLink,className:"info-link justify-self-start"},i().createElement(u.x,{namespace:yt,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(Ke,{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(Se.L,{className:"cursor-pointer",onClick:e.onClickShowSettings},i().createElement(I.x,{svgName:O.vn.Cog}))),i().createElement(_e,{value:e.shareLink.url,onCopy:function(){o||(l(!0),We.k.logUserAction(Object.assign({},e.entity),We.k.mergeOptions(mt.getAnalyticsOptions(e.entityType),{actionType:pt.UserAction.Share,descriptor:pt.ShareDescriptors.CopyLink,eventVersion:pt.EventVersion.V3})))}})):i().createElement("div",{className:"d-flex align-items-center"},i().createElement(I.x,{svgName:O.vn.Link,className:"svg-container mr-1"}),i().createElement("span",null,i().createElement(u.x,{namespace:yt,phrase:"generate"})))),!e.shareLink&&i().createElement(Se.L,{className:"info-link",onClick:function(){r(!0),e.onClickCreateLink()}},i().createElement(u.x,{phrase:"createLink"}))))}var ht=n(5173),bt=n(92802),Et=n(86347),St=n(63038),Ct=n(85610),wt=c.T.encloseNamespace("share.shareMessage"),kt=ht.Ry().shape({message:ht.Z_().max(280,(function(){return wt("maxMessageLen")}))});function It(){var e=(0,Et.b)();return i().createElement(bt.l0,null,i().createElement(St.W,{component:"textarea",name:"message",id:"message",placeholder:wt("placeholder"),value:e.values.message,label:wt("label"),showOptionalLabel:!0}),i().createElement(Ct.u,null,i().createElement(Ct.u.Submit,{variant:"dark",text:wt("share")})))}function Ot(e){return i().createElement(Et.n,{initialValues:{message:""},validationSchema:kt,onSubmit:function(t,n){var r=null;t.message&&(r=t.message),e.onClickShare(r,n)},allowInitialSubmit:!0},i().createElement(It,null))}var xt=n(41387),At=n(79410),Tt=n(54753),Nt=n(52086);function Lt(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 Pt(e){var t,n,r=(t=(0,At.D)(Nt.g.LOOKING_FOR_INTEGRATION,{show:!0},{storage:et.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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return Lt(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)?Lt(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(Tt.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(I.x,{svgName:O.vn.Close,size:I.S.Small,className:"text-info d-inline-block svg-container cursor-pointer",onClick:function(){return o({show:!1})}})):a.createElement(a.Fragment,null)}var jt="g-share-to-classroom";function Ut(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(jt))}),[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(Pt,{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:jt,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 Vt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ft(e){return function(e){if(Array.isArray(e))return Dt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Rt(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 Rt(e,t){if(e){if("string"==typeof e)return Dt(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)?Dt(e,t):void 0}}function Dt(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 _t=c.T.encloseNamespace("shared.share");function Mt(e,t,n,r){if(!e)return[];var a=[].concat(Ft(t),Ft(n)).map((function(e){return e.id}));return e.filter((function(e){return!a.includes(e.id)&&e.id!==r}))}function Bt(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(n,r)||Rt(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=(0,E.T)().hasPermissions,s=l(S.C.ManageIntegrations),d=Mt(e.recentlySharedTo,o,e.directShareRecipients,e.currentUser.id);return i().createElement(i().Fragment,null,i().createElement("div",{className:"d-flex justify-content-between align-items-center pb-3"},i().createElement(Ve,{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=b._.safeUrlConcat(e.gatewayApiUrl,"v1/search/users"),a=["user"];return l(S.C.ShareToClassrooms)&&a.push("classroom"),l(S.C.ShareToClassroomGroups)&&a.push("classroom_group"),b._.urlBuilder(r,(Vt(n={query:t,index:a},"".concat(xt.w.FILTER_PARAM_PREFIX,"customerId"),e.currentUser.customerId),Vt(n,"limit",10),n))},requestHeaders:e.searchRequestHeaders,formatRemoteSuggestions:function(t){return Mt(null==t?void 0:t.results,o,e.directShareRecipients,e.currentUser.id)},recentSearches:d,selections:o,updateSelections:function(e){return c([].concat(Ft(o),[e]))},removeSelection:function(e){return c(o.filter((function(t){return t.id!==e})))},placeholder:_t("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=j.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(h.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(g.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(he,{entity:t,imageCdnUrl:e.imageCdnUrl,removeRecipient:e.onClickRemoveRecipient}))}))))):i().createElement(i().Fragment,null),o.length?i().createElement(Ot,{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 pt-3 border-top"},i().createElement(gt,{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(Ut,{integrations:e.integrations,url:e.shareLink.url,closePopup:e.closePopup,appLink:s?e.integrationSettingAppLink:e.messagePopupAppLink})))}var Gt=n(42905),zt=n(39023),qt="share.embedSize";function Ht(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:qt,phrase:"videoSize"})),i().createElement("div",{className:"pr-3"},i().createElement(L.Dropdown,null,i().createElement(L.Dropdown.Toggle,{id:"embed-resolution",variant:"outline-dark"},r.label),i().createElement(L.Dropdown.Menu,null,o.map((function(e){return i().createElement(L.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:qt,phrase:"autoplay"})),i().createElement(zt.X,{id:"autoplay-checkbox",checked:t,onChange:function(){return n(!t)}}))}function Kt(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Wt(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)?Wt(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 Wt(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 Zt="share.copyEmbedHtml",$t=c.T.encloseNamespace(Zt);function Qt(e){var t=Gt.i.getEmbedResolutions(),n=Kt(i().useState("copy"),2),r=n[0],a=n[1],o=Kt(i().useState(!1),2),c=o[0],l=o[1],s=Kt(i().useState(t.find((function(e){return"100%"===e.width}))),2),d=s[0],m=s[1],p=Kt(i().useState(!1),2),f=p[0],v=p[1],y=Gt.i.buildEmbedUrl({embedUrl:e.embedUrl,host:e.config.primaryUrl,shareId:e.shareId,autoplay:c}),g=Gt.i.getEmbedString({url:y,size:d});return i().createElement(u.D.Provider,{value:Zt},i().createElement("label",null,i().createElement(u.x,{namespace:Zt,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(Fe,{onCopy:function(){a("copied"),setTimeout((function(){return a("copy")}),2e3),f||(v(!0),We.k.logUserAction(Object.assign(Object.assign({},e.entity),{embedDetails:{size:d,autoplay:c}}),We.k.mergeOptions(mt.getAnalyticsOptions(e.entityType),{actionType:pt.UserAction.Share,descriptor:pt.ShareDescriptors.CopyEmbedHtml,eventVersion:pt.EventVersion.V3})))},text:g},i().createElement("button",{className:"btn btn-outline-dark border border-secondary ".concat("zgdag"),type:"button"},$t(r))))),i().createElement(Ht,{autoplay:c,setAutoplay:l,videoSize:d,setVideoSize:m,videoSizes:t}))}var Xt=(0,ht.Ry)().shape({removePassword:(0,ht.O7)(),resourceId:(0,ht.Z_)(),linkExpireDate:(0,ht.Z_)().nullable(),password:(0,ht.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("")}),Yt=n(9063);function Jt(e){if(!e)return null;var t=new Date;return t.setDate(t.getDate()+30),t.toISOString()}var en="shared.linkExpiry",tn=c.T.encloseNamespace(en);function nn(e){var t=(0,bt.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:en,phrase:"linkExpirationHeading"})),i().createElement("p",{className:"m-0"},i().createElement(u.x,{namespace:en,phrase:"linkExpirationInfo"}))),i().createElement(te.u,{title:tn("passwordProtected"),disable:!e.passwordProtectLink,spanHack:!0,trigger:"hover"},i().createElement(Yt.Z,{onClick:function(){e.passwordProtectLink||t.setFieldValue("linkExpireDate",Jt(!t.values.linkExpireDate))},on:!!t.values.linkExpireDate,disabled:e.passwordProtectLink,showStateWhenDisabled:!0})))}var rn="W9Jl8";function an(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 on=c.T.encloseNamespace("share.setPasswordInput");function cn(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(n,r)||function(e,t){if(e){if("string"==typeof e)return an(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)?an(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,bt.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||on("passwordPlaceholder"),readOnly:!e.canEdit}),!!l&&a.createElement(L.Form.Control.Feedback,{type:"invalid"},l),!!e.canEdit&&a.createElement(Se.L,{className:rn,onClick:function(){return c(!o)}},a.createElement(I.x,{svgName:o?O.vn.VisibleOn:O.vn.VisibleOff,title:on(o?"hidePassword":"revealPassword"),tooltipPlacement:"top"})),!e.canEdit&&!!e.canReset&&!!e.onReset&&a.createElement(Se.L,{className:rn,onClick:e.onReset},a.createElement(I.x,{svgName:O.vn.Close,title:on("resetPassword"),tooltipPlacement:"top"})))}function ln(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 sn="shared.linkPassword";function un(e){var t,n,r,a=e.passwordProtectLink,o=e.setPasswordProtectLink,c=(0,bt.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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(n,r)||function(e,t){if(e){if("string"==typeof e)return ln(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)?ln(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],d=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:sn,phrase:"passwordProtectHeading"})),i().createElement("p",{className:"m-0"},i().createElement(u.x,{namespace:sn,phrase:"passwordProtectInfo"}))),i().createElement(Yt.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",Jt(!a))},on:a})),a&&i().createElement("div",{className:"position-relative mt-2"},i().createElement(cn,{value:s?"********":c.values.password,onChange:function(e){c.setFieldValue("password",e)},onReset:function(){c.setFieldValue("password",""),c.setFieldValue("removePassword",!0),d(!1)},canEdit:!s,canReset:!0})))}function dn(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 mn=c.T.encloseNamespace("shared.share");function pn(e){var t,n,r=(0,bt.u6)(),a=(0,E.T)().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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(t,n)||function(e,t){if(e){if("string"==typeof e)return dn(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)?dn(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(bt.l0,null,i().createElement("div",{className:"d-flex align-items-center justify-content-between pb-3"},i().createElement(Ke,{linkExpireDate:r.values.linkExpireDate,isPasswordProtected:c,privacy:e.privacy,entityTypeId:e.shareLink.objectTypeId,status:e.shareLink.status,onClickShowPrivacies:e.onClickShowPrivacies}),i().createElement(te.u,{title:mn("deleteLinkTooltip"),spanHack:!0},i().createElement(Se.L,{onClick:e.onClickDeleteLink,className:"info-link justify-self-start"},i().createElement(u.x,{phrase:"deleteLink"})))),a(S.C.ManageShareLinkSettings)&&i().createElement(i().Fragment,null,i().createElement(nn,{passwordProtectLink:c}),i().createElement(un,{shareLink:e.shareLink,passwordProtectLink:c,setPasswordProtectLink:l})),!!e.canEmbed&&i().createElement("div",{className:"pb-3"},i().createElement(Qt,{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(Ct.u,null,i().createElement(Ct.u.Cancel,{onClick:e.onClickCancel,text:mn("back"),variant:"outline-dark"}),i().createElement(Ct.u.Submit,{variant:"dark"})))}function fn(e){var t={password:"",removePassword:!1,linkExpireDate:e.shareLink.linkExpireDate};return i().createElement(Et.n,{initialValues:t,onSubmit:e.onClickSaveLink,castInitialValues:!1,validationSchema:Xt},i().createElement(pn,{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 vn=n(28294);function yn(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||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}}(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 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="share.shareLinkPrivacies",bn=c.T.encloseNamespace(hn);function En(e){return i().createElement("div",{className:"pb-3"},i().createElement(L.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 Sn(e){var t="private";Array.isArray(e.privacy)||(t=e.privacy.privacy);var n=yn(i().useState(t),2),r=n[0],a=n[1],o=yn(i().useState(!1),2),c=o[0],l=o[1];function s(e){r!==e&&("restricted"===r&&"private"===e||a(e))}var d=e.shareLink.isPasswordProtected;return i().createElement(i().Fragment,null,e.shareLink.objectTypeId===ee.E.Playlist&&i().createElement("div",null,i().createElement(u.x,{namespace:hn,phrase:"privatePlaylistVideos"})),d&&i().createElement(Ke,{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(En,{key:"public",id:"public",name:bn("public"),description:bn("publicDescription"),checked:!d&&"public"===r,onSelect:s,disabled:d}),i().createElement(En,{key:"just_my_customer",id:"just_my_customer",name:bn("protected"),description:bn("protectedDescription"),checked:!d&&"just_my_customer"===r,onSelect:s,disabled:d}),i().createElement(En,{key:"private",id:"private",name:bn("private"),description:bn("privateDescription"),checked:!d&&("private"===r||"restricted"===r),onSelect:s,disabled:d})),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:hn,phrase:"back"})),i().createElement(vn.m,{className:"btn btn-dark",type:"button",onClick:function(){l(!0),e.onClickSavePrivacy(r)},disabled:r===t,showSpinner:c},i().createElement(u.x,{namespace:hn,phrase:"save"})))))}var Cn=n(91656);function wn(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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return kn(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)?kn(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 kn(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 In="shared.share",On=c.T.encloseNamespace(In);function xn(e){switch(e){case"video":return On("titleVideo");case"clip":return On("titleClip");case"interactive":return On("titleInteractive");case"series":return On("titleSeries");case"playlist":return On("titlePlaylist");case"subject":return On("titleTopic")}}var An=function(e){return"video"===e||"interactive"===e||"clip"===e};function Tn(e){var t,n,r,a,c,p,f,v,g=(0,o.useDispatch)(),h=(0,m.Z)(),b=!e.gatewayApiUrl,E=wn(i().useState(!1),2),S=E[0],C=E[1],w=wn(i().useState("main"),2),k=w[0],I=w[1],O=(n=k,r=i().useRef(),i().useEffect((function(){r.current=n})),r.current),x=wn(i().useState(!1),2),A=x[0],T=x[1],N=l.a.useBasicFetch(s.N.currentUser()),L=mt.getFetchFunctionByType(e.entityType)(e.entityId,null===(t=N.data)||void 0===t?void 0:t.id),j=l.a.useBasicFetch({url:"/api/config",key:"config",bootstrapName:"config",success:f,error:v}),U=l.a.useBasicFetch(b&&s.N.token()),V=l.a.useBasicFetch((p=e.entityId,{url:"{gateway}/v1/share/links?objectId=".concat(p),key:"share:link:object:".concat(p),normalizeOptions:Ye,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:Ye})),R=l.a.useBasicFetch(mt.getDirectShareRecipientsRequest(F.data)),D=N.data&&(a=N.data.id,tt.getRecentItem(nt(a),et.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,Cn.r)(null),z=G.shareToGoogleClassroom,q=G.shareToMicrosoftTeams,H=G.isLoadingSettings;function K(e){var t;(null===(t=e.recipients)||void 0===t?void 0:t.length)&&l.a.getFetch(g)(mt.getDirectShareRecipientsRequest(e))}function W(e,t){l.a.getFetch(g)(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 Z(){V.data||mt.createLink({dispatch:g,entity:L.data,entityType:e.entityType,alerts:h})}function $(t,n){mt.updateLink(g,L.data,e.entityType,V.data,t,h,(function(){return I("main")}),n)}function Q(){C(!0),T(!1),mt.deleteLink(g,L.data,e.entityType,V.data,h,(function(){return I("main")}),(function(){return C(!1)}))}function X(t,n,r){mt.createOrUpdateDirectShare({dispatch:g,entity:L.data,entityType:e.entityType,currentUser:N.data,recipients:t,message:n,sentDirectShare:F.data,onSuccess:K,onError:function(){return h.error(On("directShareError",{name:L.data.name}))},onDone:r})}function Y(t,n){mt.removeDirectShareRecipient(g,t,e.entityType,F.data,K,(function(){h.error(On("removeDirectShareError")),n&&n()}))}function J(t){l.a.fetch(g,function(e,t,n,r){return{url:"{gateway}/v1/objects/privacy",key:"update:privacy",type:P.k.PUT,data:{privacy:t,objectId:e},invalidationKeys:"privacy",normalize:!1,success:n,error:r}}(e.entityId,t,(function(){return I(O)}),(function(){return h.error(On("privaciesError",{name:L.data.name}))})))}mt.useHydrateRecipients(R.data),mt.useHydrateRecipients(M.data),i().useEffect((function(){V.hasCompleted&&T(!0)}),[V.hasCompleted,A]);var ee=!!N.data&&!!j.data&&(!b||!!U.data)&&!!F.hasCompleted&&A&&!!B.data&&!!L.data&&!H;return i().createElement(u.D.Provider,{value:In},i().createElement(d.G,{title:xn(e.entityType),closePopup:e.closePopup,showLoadingSpinner:S||!ee},function(){if(S||!ee)return i().createElement(i().Fragment,null);switch(k){case"main":return i().createElement(Bt,{shareLink:V.data,shareLinkIsLoading:V.isFetching,entity:L.data,entityType:e.entityType,directShareRecipients:R.data||[],recentlySharedTo:M.data||[],onClickCreateLink:Z,onClickShowSettings:function(){return I("link-settings")},onClickShare:X,onClickRemoveRecipient:Y,onClickDeleteLink:Q,analyticsOptions:mt.getAnalyticsOptions(e.entityType),gatewayApiUrl:e.gatewayApiUrl||j.data.gatewayApiUrl,imageCdnUrl:j.data.imageCdnUrl,searchRequestHeaders:b?{authorization:"Bearer ".concat(U.data.value)}:null,currentUser:N.data,fetchRecipientUsers:W,privacy:B.data,onClickShowPrivacies:function(){return I("privacy")},canAddPolicies:(r=e.entityType,"video"===r||"interactive"===r||"clip"===r),emptyStateImageUrl:e.emptyStateImageUrl,errorStateImageUrl:e.errorStateImageUrl,integrations:(t=z,n=q,y(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(fn,{entity:L.data,entityType:e.entityType,config:j.data,shareLink:V.data,entityId:e.entityId,analyticsOptions:mt.getAnalyticsOptions(e.entityType),onClickSaveLink:$,onClickDeleteLink:Q,onClickCancel:function(){return I("main")},canEmbed:An(e.entityType),privacy:B.data,onClickShowPrivacies:function(){return I("privacy")}});case"privacy":return i().createElement(Sn,{privacy:B.data,shareLink:V.data,onClickCancel:function(){return I(O)},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),d=n(63791),m=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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(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.")}()),m=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:m,className:"".concat("RBJnf"," border-0 w-100 h-100 outline-none rounded")}),y),"password"===l.type&&r.createElement(u.x,{svgName:"password"===m?d.vn.VisibleOn:d.vn.VisibleOff,className:"svg-container cursor-pointer ".concat("jCfI0"),onClick:function(){p("password"===m?"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,E=e.showOptionalLabel,S=v(e,["label","className","showCharacterCounter","showRequiredStar","infoTooltip","infoText","formSize","showOptionalLabel"]),C=(0,a.u6)(),w=C.errors,k=C.touched,I=function(){};if("checkbox"===S.type){var O=o.t.omit(e,["formSize"]);return e.disabled&&(O.onChange=I),r.createElement(s,Object.assign({},O))}var x=Object.assign(Object.assign({},S),{className:l(w,k,S.name,b,n)});return e.disabled&&(x.onChange=I),r.createElement(i.Form.Group,null,!!t&&r.createElement(i.Form.Label,{htmlFor:S.id,className:"d-flex align-items-center"},t,f&&r.createElement("span",{className:"text-danger"},"*"),g&&r.createElement(u.x,{svgName:d.vn.Info,title:g,tooltipPlacement:"top",tooltipSpanHack:!0}),E&&r.createElement("span",{className:"text-muted"}," ",r.createElement(m.x,{namespace:"shared.formField",phrase:"optional"})),!!c&&!!S.maxLength&&r.createElement("div",{className:"ml-auto"},r.createElement(p,{fieldName:S.name,limit:S.maxLength}))),r.createElement(y,Object.assign({},x)),!!h&&r.createElement(i.Form.Text,{className:"text-muted"},h),r.createElement(a.Bc,{name:S.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 d},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=!0,c=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);o=!0);}catch(e){c=!0,a=e}finally{try{o||null==n.return||n.return()}finally{if(c)throw a}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,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"]),d=t&&e.validationSchema?e.validationSchema.cast(s(o)):o,m={allowInitialSubmit:e.allowInitialSubmit};return r.createElement(a.J9,Object.assign({enableReinitialize:!0},u,{initialValues:d,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:m}),i.q.isFunction(e.children)?function(t){return e.children(t)}:r.Children.count(e.children)?e.children:null)}function d(){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={}))},34254:function(e,t,n){"use strict";var r;n.d(t,{r:function(){return r}}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(r||(r={}))},13034:function(e,t,n){"use strict";var r,a;n.d(t,{C:function(){return r},E:function(){return a}}),function(e){e.ManageSubjectPreferences="subjects.preferences.manage",e.FollowSubjects="subjects.follow",e.ViewClassrooms="classrooms.view",e.ManageAllClassrooms="classrooms.manage.all",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.ViewTrialBanner="trial.banner.view",e.ViewTrialEndPage="trial.endpage.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"}(r||(r={})),function(e){e.ManagePublicPresentation="presentation.public.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"}(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})}}}},16771:function(e,t,n){"use strict";n.d(t,{T:function(){return c}});var r=n(86120),a=n(15408),i=n(13034);function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=function(){var e=r.a.useBasicFetch(a.N.currentUser()),t=r.a.useBasicFetch(e.hasCompleted&&a.N.permissions()),n=function(e){var t;return o(t={},i.E.ManagePublicPresentation,!(null==e?void 0:e.isAuthenticated)),o(t,i.E.ViewPlaylistsLanding,!(null==e?void 0:e.isAuthenticated)),o(t,i.E.ViewMyVideosLanding,!(null==e?void 0:e.isAuthenticated)),o(t,i.E.ViewMyFavouritesLanding,!(null==e?void 0:e.isAuthenticated)),o(t,i.E.ViewWatchHistoryLanding,!(null==e?void 0:e.isAuthenticated)),o(t,i.E.WatchVideos,null==e?void 0:e.isAuthenticated),o(t,i.E.UseVideoActions,null==e?void 0:e.isAuthenticated),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}}},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 l}});var r=n(57857),a=n(74421),i=n(70065),o=n(50028),c=r.T.encloseNamespace("shared.shared-utils"),l={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 l.isVideo(e)||l.isInteractive(e)||l.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 l.isVideo(e)?e.thumbnail:l.isClip(e)?null===(t=e.video)||void 0===t?void 0:t.thumbnail:l.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(l.isVideo(e))return e.duration;if(l.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 l.isClip(e)?1e3*(e.endTime-e.startTime):void 0},getAnalyticsEntity:function(e){return l.isVideo(e)?i.EntityType.Video:l.isInteractive(e)?i.EntityType.Interactive:l.isClip(e)?i.EntityType.Clip:void 0},getCanBeConsumed:function(e){return e&&(l.isVideo(e)||l.isClip(e)||l.isInteractive(e))?e._canBeConsumed?e._canBeConsumed:{value:!0}:null},getPrivacyReasoning:function(e){var t=l.getCanBeConsumed(e);if(t&&!t.value)switch(t.reason){case"rating-not-allowed":return c("ratingNotAllowed");case"video-deleted":return l.isClip(e)?c("clipParentDeleted"):l.isInteractive(e)?c("interactiveParentDeleted"):c("videoDeleted");case"clickview-private":return c("clickViewPrivate");default:return c("genericCannotAccess")}return l.isInteractive(e)&&e.status===o.X.Draft?c("draftInteractive"):""},getTitle:function(e){if(e.name)return e.name;var t=l.getCanBeConsumed(e);return(null==t?void 0:t.value)||"private"!==(null==t?void 0:t.reason)?(null==t?void 0:t.value)||"video-deleted"!==(null==t?void 0:t.reason)?c("privateVideo"):c("videoUnavailable"):c("privateVideo")},getParentVideo:function(e){var t;return l.isVideo(e)?e:l.isClip(e)?e.video:l.isInteractive(e)?e.video||(null===(t=e.clip)||void 0===t?void 0:t.video):void 0}}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8362],{38362:function(e,t,n){"use strict";n.r(t),n.d(t,{EditLinkView:function(){return _}});var o=n(48088),r=n(31647),i=n(21679),u=n(99249),a=n(52076),l=n(10101),c=n(88172),s=n(61843),f=n(48090),p=n(13823),d=n(67670),y=n(7190),b=n(8407),h=n.n(b),v=n(57857);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 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,o.key,o)}}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function g(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 O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}(S,e);var t,n,b,m,_=(b=S,m=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(b);if(m){var n=O(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return g(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),_.call(this,e)}return t=S,(n=[{key:"initialize",value:function(){this.listenTo(f.Vk.LINK,"link:".concat(this.options.linkId,":sync"),this.render),this.linkDataService=i.u.getInstance(f.Or.Link,this)}},{key:"name",get:function(){return"EditLinkView"}},{key:"title",get:function(){return"Edit link"}},{key:"template",get:function(){return h()}},{key:"channelName",get:function(){return s.N0.generateUniqueChannelName(this)}},{key:"bindings",get:function(){return{"[name=url]":{observe:"url",setOptions:{validate:!0}},"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"lang",get:function(){return"libraryEditor.editLink"}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:l.Yw,title:v.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new d.v,buttonText:v.T.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(o.Radio.channel(this.channelName).trigger(c.I3.ShowSpinner),this.linkDataService.updateLink(this.options.videoId,this.viewModel,(function(){t.logAction(),r.Q.AppLinkHelper.trigger({application:f.OV.LIBRARY_EDITOR,action:f.eX.LibraryEditor.EDIT_VIDEO_RESOURCES,args:[t.options.videoId]})})))}},{key:"logAction",value:function(){var e={id:this.options.linkId,parentId:+this.options.videoId,name:this.viewModel.get("name")};a.k.logUserAction(e,this.options.analyticsOptions)}},{key:"dataFetched",value:function(){return!!this.model&&!!this.viewModel}},{key:"onBeforeRender",value:function(){var e=this;this.model=this.linkDataService.getLink(this.options.linkId,(function(t){e.viewModel=u.r.get("link:".concat(e.options.linkId),t.toJSON(),{ctor:p.r}),e.viewModel.addValidation(y.yU)})),this.dataFetched()&&this.spinnerModel.set(c.ZV.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:s.Kp.getSpinner({size:s.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.viewModel&&(this.stickit(this.viewModel),o.Validation.bind(this,{model:this.viewModel}))}},{key:"onClose",value:function(){this.unstickit()}}])&&k(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),S}(r.Q.View)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var o=n(31647),r=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(d,e);var t,n,o,i,p=(o=d,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(o);if(i){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return s(this,e)});function d(){return a(this,d),p.apply(this,arguments)}return t=d,(n=[{key:"defaults",value:function(){var e;return u(e={},r.ZV.Disabled,!0),u(e,r.ZV.Hidden,!1),e}}])&&l(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.Q.Model)},8407:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},3:function(e,t,n,o,r){return'<form>\n <div class="form-group">\n <label for="url" class="control-label">URL</label>\n <input name="url" id="url" type="text" class="form-control" placeholder="URL" autocomplete="off" autofocus/>\n <div class="form-feedback"></div>\n </div>\n <div class="form-group">\n <label for="name" class="control-label">Name</label>\n <input name="name" id="name" type="text" class="form-control" placeholder="Name" autocomplete="off" autofocus/>\n <div class="form-feedback"></div>\n </div>\n</form>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:""},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8727],{14129:function(e,t,n){"use strict";n.d(t,{U:function(){return m}});var o=n(48088),r=n(31647),i=n(70065),a=n(52076),l=n(61843),u=n(57857),c=n(91553),s=n.n(c);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){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function y(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(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 h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(m,e);var t,n,r,c,p=(r=m,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(r);if(c){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return d(this,e)});function m(){return f(this,m),p.apply(this,arguments)}return t=m,(n=[{key:"name",get:function(){return"AwaitingReviewHeaderComponent"}},{key:"className",get:function(){return"d-flex justify-content-between align-items-center p-3 border-bottom"}},{key:"template",get:function(){return s()}},{key:"lang",get:function(){return"contentUpdates.awaitingReviewHeader"}},{key:"events",value:function(){return{"click .approve-all":"onClickApproveAll"}}},{key:"onClickApproveAll",value:function(){var e=this;new l.Mr(this.getApproveAllDialogOptions()).render().done((function(){return e.onConfirmApproveAll()})),this.logAction(i.WorkflowPhase.Start)}},{key:"onConfirmApproveAll",value:function(){o.Radio.channel(this.options.channelName).trigger("approve:all"),this.logAction(i.WorkflowPhase.Complete)}},{key:"getApproveAllDialogOptions",value:function(){return{title:u.T.getPhrase(this.lang,"dialogTitle"),text:u.T.getPhrase(this.lang,"dialogBody"),buttons:[{text:u.T.getPhrase(this.lang,"dialogButton"),className:"btn btn-dark",success:!0}]}}},{key:"logAction",value:function(e){var t={location:i.LocationContext.AwaitingReviewVideoListHeader,actionType:i.UserAction.Approve,descriptor:i.OperationDescriptor.All,entity:i.EntityType.Video,workflowPhase:e},n={approvedCount:this.collection.length};a.k.logUserAction(n,t)}},{key:"viewOptions",value:function(){return{videosToReview:!!this.collection.length,multipleVideos:this.collection.length>1,numVideos:this.collection.length}}}])&&y(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(r.Q.Component)},7572:function(e,t,n){"use strict";n.d(t,{u:function(){return m}});var o=n(31647),r=n(5181),i=n.n(r),a=n(35630),l=n(39090),u={tabsContainer:"PDRLS"},c=n(57085),s=n(50997),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 y(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function d(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 h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(m,e);var t,n,o,r,f=(o=m,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=h(o);if(r){var n=h(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),f.call(this,e)}return t=m,(n=[{key:"name",get:function(){return"ContentUpdatesHeaderComponent"}},{key:"className",get:function(){return"border-bottom px-3 d-flex flex-column"}},{key:"template",get:function(){return i()}},{key:"lang",get:function(){return"contentUpdates.contentUpdatesHeader"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region"},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"getTabs",value:function(){var e=l.HW;return this.options.reviewEnabled?e:e.filter((function(e){return e.name!==l.tF.AwaitingReview}))}},{key:"renderBreadcrumbs",value:function(){this.showChildView("breadcrumbs",new c.n({enableLastItemAppLink:!1,customBreadcrumbs:[{name:p.T.getPhrase(this.lang,"libraryEditor"),appLink:{application:s.OV.LIBRARY_EDITOR,action:s.eX.LibraryEditor.HOME},active:!1},{name:p.T.getPhrase(this.lang,"contentUpdates"),active:!0}]}))}},{key:"renderTabs",value:function(){var e=this.getTabs();e.length<=1||this.showChildView("tabs",new a.n({tabs:e,activeTab:this.options.activeTab,className:"border-0"}))}},{key:"viewOptions",value:function(){return{styles:u}}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderTabs()}}])&&y(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(o.Q.Component)},46415:function(e,t,n){"use strict";n.d(t,{m:function(){return m}});var o=n(31647),r=n(25692),i=n(98985),a=n(70065),l=n(52076),u=n(48090),c=n(67732),s=n.n(c),p=n(264);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 y(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function d(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 h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b(e,t)}(m,e);var t,n,o,c,f=(o=m,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(o);if(c){var n=h(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),f.call(this,e)}return t=m,(n=[{key:"name",get:function(){return"ContentUpdatesLeftNavComponent"}},{key:"className",get:function(){return"d-inline-block ".concat("GuWDP")}},{key:"template",get:function(){return s()}},{key:"lang",get:function(){return"contentUpdates.contentUpdatesLeftNav"}},{key:"appLinks",get:function(){return{".disable-review":{application:u.OV.CONTENT_UPDATES,action:u.eX.ContentUpdates.DISABLE_REVIEW}}}},{key:"events",value:function(){return{"click .disable-review":"onClickDisableReview"}}},{key:"onClickDisableReview",value:function(){var e={location:a.LocationContext.LeftNav,actionType:a.UserAction.Disable,entity:a.EntityType.CustomerSetting,descriptor:a.CustomerSettingDescriptor.LibraryReview,workflowPhase:a.WorkflowPhase.Start};l.k.logUserAction({},e)}},{key:"viewOptions",value:function(){return{supportUrl:!p.g.hasLite&&i.o.getOnlineArticle(r.s.LibraryReview)}}}])&&y(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),m}(o.Q.Component)},82405:function(e,t,n){"use strict";n.d(t,{D:function(){return T}});var o=n(31647),r=n(57857),i=n(80758),a=n(48090),l=n(29457),u=n(23096),c=n(58688),s=n(89364),p=n.n(s),f=n(14727),y=n.n(f);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,o.key,o)}}function m(e,t,n){return t&&h(e.prototype,t),n&&h(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function v(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)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function w(e){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=O(e);if(t){var r=O(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return k(this,n)}}function k(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}var C=function(e){v(n,e);var t=w(n);function n(e){return d(this,n),t.call(this,e)}return m(n,[{key:"name",get:function(){return"VideoGroupItemComponent"}},{key:"template",get:function(){return y()}},{key:"className",get:function(){return"pt-3"}},{key:"defaults",get:function(){return{videoItemComponentType:c.U.Base}}},{key:"regions",value:function(){return{videos:{el:".video-list-region",replaceElement:!0}}}},{key:"getGroupTitle",value:function(){var e=this.options.groupTitleAttr||"groupTitle";return this.model.get(e)}},{key:"viewOptions",value:function(){return{groupTitle:this.getGroupTitle()}}},{key:"onRender",value:function(){this.showChildView("videos",new u.Y({collection:this.model.videos,videosWithMetadata:this.options.videosWithMetadata,application:a.OV.CONTENT_UPDATES,collectionIdentifier:null,videoItemComponentType:this.options.videoItemComponentType,config:this.options.config,sourceMetadataOptions:this.options.sourceMetadataOptions,collectionViewChannel:this.options.collectionViewChannel,customerHasLocalCache:this.options.customerHasLocalCache,customerHasCustomLibrary:this.options.customerHasCustomLibrary,currentUser:this.options.currentUser,hasCursors:!1,showEmptyState:!0,libraries:this.options.libraries}))}}]),n}(o.Q.Component),P=function(e){v(n,e);var t=w(n);function n(e){return d(this,n),t.call(this,e)}return m(n,[{key:"name",get:function(){return"VideoGroupItemComponentCollection"}},{key:"childView",get:function(){return C}},{key:"childViewOptions",get:function(){return this.options.childOptions}}]),n}(o.Q.ComponentCollection),T=function(e){v(n,e);var t=w(n);function n(e){return d(this,n),t.call(this,e)}return m(n,[{key:"name",get:function(){return"VideoGroupListComponent"}},{key:"template",get:function(){return p()}},{key:"lang",get:function(){return"contentUpdates.videoGroupList"}},{key:"defaults",get:function(){return{emptyState:l.ub.Default}}},{key:"behaviors",get:function(){return[{behaviorClass:i.o,region:"videos",type:this.options.emptyStateType,componentOptions:this.getEmptyStateComponentOptions(),emptyStateComponents:a.aW}]}},{key:"regions",value:function(){return{videos:{el:".videos-region",replaceElement:!0}}}},{key:"getEmptyStateComponentOptions",value:function(){return this.options.emptyStateType===l.ub.AwaitingReview?{heading:r.T.getPhrase(this.lang,"awaitingReviewEmptyStateHeading"),description:r.T.getPhrase(this.lang,"awaitingReviewEmptyStateBody")}:this.options.emptyStateType===l.ub.PastReleases?{heading:r.T.getPhrase(this.lang,"pastReleasesEmptyStateHeading")}:void 0}},{key:"onRender",value:function(){this.showChildView("videos",new P(this.options))}}]),n}(o.Q.Component)},91553:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression;return'<button class="approve-all btn btn-dark d-inline-block '+a(e.lambda(null!=(i=null!=t?t.options:t)?i.btnClass:i,t))+'" type="button">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"approveBtn",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.numVideos:i},data:r}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<h5 class="d-inline-block m-0 '+a(e.lambda(null!=(i=null!=t?t.options:t)?i.headingClass:i,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"heading",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.numVideos:i},data:r}))+"</h5>\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.videosToReview:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},5181: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,r){e.propertyIsEnumerable;var i,a=e.escapeExpression;return'<div class="pt-3 pb-2">\n <h1 class="h3 m-0">\n '+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"contentUpdates",{name:"lang",hash:{},data:r}))+'\n </h1>\n</div>\n\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region d-inline-flex align-items-end '+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.tabsContainer:i,t))+'"></div>'},useData:!0})},67732:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,u=e.escapeExpression;return' <p class="m-0">'+u((n.lang||t&&t.lang||l).call(a,"learnMore",{name:"lang",hash:{},data:r}))+" <a href="+u(e.lambda(null!=(i=null!=t?t.options:t)?i.supportUrl:i,t))+' target="_blank">'+u((n.lang||t&&t.lang||l).call(a,"learnMoreLink",{name:"lang",hash:{},data:r}))+"</a></p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,u=e.escapeExpression;return'<div class="p-3 border-bottom">\n <h5>'+u((n.lang||t&&t.lang||l).call(a,"manualReviewHeading",{name:"lang",hash:{},data:r}))+"</h5>\n <p>"+u((n.lang||t&&t.lang||l).call(a,"manualReviewBody",{name:"lang",hash:{},data:r}))+'</p>\n <button class="btn btn-outline-dark text-center disable-review" type="button">'+u((n.lang||t&&t.lang||l).call(a,"manualReviewOffBtn",{name:"lang",hash:{},data:r}))+'</button>\n</div>\n<div class="p-3 border-bottom">\n <p class="m-0">'+u((n.lang||t&&t.lang||l).call(a,"noActionDisclaimer",{name:"lang",hash:{},data:r}))+"</p>\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.supportUrl:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+"</div>"},useData:!0})},14727: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,r){var i;return e.propertyIsEnumerable,'<h4 class="pl-3">'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.groupTitle:i,t))+'</h4>\n<div class="video-list-region"></div>'},useData:!0})},89364: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,r){return'<div class="videos-region"></div>'},useData:!0})},29565:function(e,t){"use strict";t.Z={content:"utl4w",contentWithLeftNav:"K9CFZ"}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8762],{23380:function(e,t,n){"use strict";n.r(t),n.d(t,{NewFolderView:function(){return P}});var r=n(48088),i=n(11306),o=n(31647),l=n(21679),a=n(99249),s=n(52076),c=n(10101),u=n(48090),d=n(60103),f=n(67670),p=n(60602),h=n(61843),y=n(88172),b=n(57857),v=n(77739),g=n(77830),w=n.n(g),m=n(56906);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 I(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(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 S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}var P=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M(e,t)}(E,e);var t,n,g,k,P=(g=E,k=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=S(g);if(k){var n=S(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return O(this,e)});function E(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,E),P.call(this,e)}return t=E,(n=[{key:"initialize",value:function(e){var t=e.parentId,n=e.libraryId;(t?!n:n)||o.Q.ErrorHelper.throw(new i.H("Must provide either a libraryId or a parentId to ".concat(this.name))),this.bindListeners(),this.libraryDataService=l.u.getInstance(u.Or.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(u.Vk.LIBRARY,"libraries:sync",this.render)}},{key:"name",get:function(){return"NewFolderView"}},{key:"lang",get:function(){return"libraryEditor.newFolder"}},{key:"title",get:function(){return b.T.getPhrase(this.lang,"title")}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"template",get:function(){return w()}},{key:"channelName",get:function(){return h.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.Yw,title:b.T.getPhrase(this.lang,"heading"),appLink:this.options.returnAppLink,spinnerButtonOptions:{model:this.spinnerModel=new f.v,channelName:this.channelName,buttonText:b.T.getPhrase(this.lang,"create"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(r.Radio.channel(this.channelName).trigger(y.I3.ShowSpinner),this.trimFolderName(),this.addFolder(),this.logAction())}},{key:"addFolder",value:function(){var e=this,t=this.viewModel.get("parentId").toString()===this.library.get("id").toString()?null:this.viewModel.get("parentId").toString();this.libraryDataService.addFolder(this.viewModel,this.library.get("id").toString(),t,(function(t){a.r.clear(e.getViewModelKey()),e.options.routeToFolderOnCreate?o.Q.AppLinkHelper.trigger({application:u.OV.LIBRARY_EDITOR,action:u.eX.LibraryEditor.FOLDER,args:[t.get("id")]}):e.triggerMethod("hide")}))}},{key:"trimFolderName",value:function(){var e=this.viewModel.get("name");this.viewModel.set("name",e.trim())}},{key:"logAction",value:function(){var e={id:this.options.libraryId,name:this.viewModel.get("name"),isSubfolder:this.viewModel.get("parentId").toString()!==this.library.get("id").toString()};s.k.logUserAction(e,this.options.analyticsOptions)}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e=this.getViewModelKey();this.viewModel=a.r.get(e,null,{ctor:p.g}),this.viewModel.set({parentId:this.options.parentId||this.options.libraryId})}}},{key:"getViewModelKey",value:function(){return"folder:new:".concat(this.options.libraryId,":").concat(this.options.parentId)}},{key:"renderFolderDetails",value:function(){if(this.collection){var e=new v.r({model:this.viewModel,collection:this.collection,library:this.library,channelName:this.channelName,editName:!0,editParent:!0,folderTreeKey:this.folderTreeKey});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){var e=this;if(this.libraryDataService.getLibraries((function(t){if(!e.collection){var n=e.options.libraryId||e.options.parentId;e.library=h.PU.getLibrary(n,t),e.setUpViewModel(),e.collection=new d.I([e.library]),h.PU.setSelected(e.folderTreeKey,e.viewModel.get("parentId"),e.collection)}})),this.collection&&this.spinnerModel.set(y.ZV.Disabled,!1),h.PU.getFolderDepth(this.options.parentId,this.collection)>=u.pA.MAX_FOLDER_DEPTH)return window.setTimeout((function(){e.triggerMethod("hide"),o.Q.ErrorHelper.throw(new m.al)}),u.pA.POPUP_FADE_TIMEOUT),!1}},{key:"viewOptions",value:function(){return{dataFetched:!!this.collection,spinnerEl:h.Kp.getSpinner({size:h.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}])&&I(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),E}(o.Q.View)},77830: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){return'<div class="folder-details-region"></div>\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})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[8906],{11224:function(e,t,n){"use strict";n.r(t),n.d(t,{AddToExchangeView:function(){return O}});var r=n(31647),o=n(21679),i=n(68003),l=n(21186),u=n(10101),c=n(67670),a=n(61843),s=n(48404),f=n(88172),p=n(20072),d=n(48090),y=n(28274),h=n.n(y),b=n(57857);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function g(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}function w(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}var O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m(e,t)}(O,e);var t,n,r,y,v=(r=O,y=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=k(r);if(y){var n=k(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return w(this,e)});function O(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,O),v.call(this,e)}return t=O,(n=[{key:"initialize",value:function(){this.libraryDataService=o.u.getInstance(d.Or.Library,this),this.videoDataService=o.u.getInstance(d.Or.Video,this),this.alertService=o.u.getInstance(d.K9.Alerts,this),this.listenTo(d.Vk.LIBRARY,"exchange:".concat(10,":sync"),this.render),this.listenTo(this.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"AddToExchangeView"}},{key:"lang",get:function(){return"libraryEditor.addToExchange"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return h()}},{key:"channelName",get:function(){return a.N0.generateUniqueChannelName(this)}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{folderDropdown:".folder-dropdown-region"}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.Yw,title:b.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new c.v,channelName:this.channelName,buttonText:b.T.getPhrase(this.lang,"add"),onClick:function(t){return e.onClickSubmit(t)}}}]}},{key:"getExchange",value:function(){return this.exchangeLibraries.first()}},{key:"onClickSubmit",value:function(e){var t=this;e&&e.preventDefault(),this.spinnerModel.set(f.ZV.ShowSpinner,!0),this.videoDataService.copyVideo(this.options.videoId,this.getExchange().get("id"),this.folder.get("id"),(function(){t.alertService.createAlert({heading:"Request submitted",message:"We will notify you once your Exchange request has been approved",type:l.NK.Success}),t.triggerMethod("hide")}))}},{key:"onFolderSelected",value:function(e){this.folder=e,this.spinnerModel.set(f.ZV.Disabled,!1),a.PU.setSelected(this.folderTreeKey,e,this.getExchange().children)}},{key:"requiredResources",get:function(){return{config:s.p.config}}},{key:"onBeforeRender",value:function(){this.exchangeLibraries=this.libraryDataService.getExchange(10)}},{key:"onRender",value:function(){this.exchangeLibraries&&this.showChildView("folderDropdown",new p.Y({collection:this.getExchange().children,channelName:this.channelName,folderTreeKey:this.folderTreeKey}))}},{key:"viewOptions",value:function(){return{foldersLoaded:!!this.exchangeLibraries,guidelinesUrl:i._.safeUrlConcat(this.config.get("onlineUrl"),"/exchange/community-guidelines"),spinnerEl:a.Kp.getSpinner({size:a.Ey.Large,extraClasses:"mx-auto"})}}}])&&g(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),O}(r.Q.View)},20072:function(e,t,n){"use strict";n.d(t,{Y:function(){return b}});var r=n(48088),o=n(31647),i=n(57857),l=n(50299),u=n(61843),c=n(68979),a=n.n(c),s={selectBtn:"tZUtI",list:"MxlSt",selector:"qHvbU",customItem:"aJzJB"};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 p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function 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 h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(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,o,c,f=(o=b,c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=h(o);if(c){var n=h(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:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e}({},t))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return a()}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".button-text"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=u.PU.getSelected(this.options.folderTreeKey,this.collection),o=r?r.get("name"):i.T.getPhrase(this.lang,"button");this.getUI("button").text(o)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.J({styles:s,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:s.list,extraClasses:s.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:s,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&p(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),b}(o.Q.Component)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function s(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(d,e);var t,n,r,i,p=(r=d,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=f(r);if(i){var n=f(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return s(this,e)});function d(){return u(this,d),p.apply(this,arguments)}return t=d,(n=[{key:"defaults",value:function(){var e;return l(e={},o.ZV.Disabled,!0),l(e,o.ZV.Hidden,!1),e}}])&&c(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),d}(r.Q.Model)},28274:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<div class="alert alert-info" role="alert">\n The ClickView Exchange is a community for educators, read our <a class="info-link" href="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.guidelinesUrl:i,t))+'" target="_blank">community guidelines</a> and let\'s ensure that we keep the Exchange a place we\'re proud of!\n</div>\n<p>After you submit your video to the Exchange, we will review it and notify you when your video has been made available.</p>\n<div class="form-group">\n <label>Select a folder</label>\n <div class="folder-dropdown-region"></div>\n</div>\n'},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable," "+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.foldersLoaded:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},68979:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,u=e.escapeExpression;return'<button\n class="'+u(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\n data-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n name='+u(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+'\n>\n <span class="d-block text-truncate button-text">\n '+u(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'\n </span>\n</button>\n<div class="dropdown-menu '+u(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\n <div class="selector-region"></div>\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\n<div class="form-feedback"></div>'},useData:!0})}}]);