@clickview/library-editor 1.54.0 → 1.54.1-dev.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 (164) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/{826-library-editor-2797c4568f.chunk.css → 4001-library-editor-da87291909.chunk.css} +3 -2
  3. package/dist/css/{library-editor-app-cade5e4b6a.css → library-editor-app-08d619de95.css} +2 -2
  4. package/dist/languages/en.json +1 -1
  5. package/dist/scripts/101-1aa755b98b.chunk.js +1 -0
  6. package/dist/scripts/{1010-37e7c83417.chunk.js → 1010-2c4e71bac2.chunk.js} +1 -1
  7. package/dist/scripts/{1086-7632f7b45b.chunk.js → 1086-d0efa1a0ca.chunk.js} +1 -1
  8. package/dist/scripts/1216-9d2e314558.chunk.js +1 -0
  9. package/dist/scripts/{1269-02d8d91784.chunk.js → 1269-ec70091b19.chunk.js} +1 -1
  10. package/dist/scripts/{1409-79be9fc25d.chunk.js → 1409-f3fea6c3c3.chunk.js} +1 -1
  11. package/dist/scripts/1537-2945b91924.chunk.js +1 -0
  12. package/dist/scripts/{1703-4d41a9e919.chunk.js → 1703-0e6940a3c0.chunk.js} +1 -1
  13. package/dist/scripts/{1832-305c691701.chunk.js → 1832-9fd96d5efe.chunk.js} +1 -1
  14. package/dist/scripts/{1876-33e86bc26f.chunk.js → 1876-fc815ba31e.chunk.js} +1 -1
  15. package/dist/scripts/1973-074d4e72c2.chunk.js +1 -0
  16. package/dist/scripts/209-f9e52775b1.chunk.js +1 -0
  17. package/dist/scripts/{243-526e36736c.chunk.js → 243-d27b3c7903.chunk.js} +1 -1
  18. package/dist/scripts/2516-0290fc7712.chunk.js +1 -0
  19. package/dist/scripts/{259-e1c3eb98ce.chunk.js → 259-d6a4aa6694.chunk.js} +1 -1
  20. package/dist/scripts/{2601-f14eacbf73.chunk.js → 2601-d42245cb40.chunk.js} +1 -1
  21. package/dist/scripts/2639-efe1222211.chunk.js +2 -0
  22. package/dist/scripts/2639-efe1222211.chunk.js.LICENSE.txt +8 -0
  23. package/dist/scripts/{2644-60bdfc1c95.chunk.js → 2644-cadc6531d6.chunk.js} +1 -1
  24. package/dist/scripts/2648-61a84bc983.chunk.js +1 -0
  25. package/dist/scripts/{2692-1ddd87476e.chunk.js → 2692-b7dff9da8a.chunk.js} +1 -1
  26. package/dist/scripts/{2803-fbb9d2439d.chunk.js → 2803-026f3af7cb.chunk.js} +1 -1
  27. package/dist/scripts/{2888-c2c8b859cd.chunk.js → 2888-a406bcd564.chunk.js} +1 -1
  28. package/dist/scripts/2955-521e238d27.chunk.js +1 -0
  29. package/dist/scripts/299-32a1391000.chunk.js +1 -0
  30. package/dist/scripts/{2998-aae0ec14de.chunk.js → 2998-a3c3a1e950.chunk.js} +1 -1
  31. package/dist/scripts/{3400-ebc91cde7a.chunk.js → 3400-326dc33968.chunk.js} +1 -1
  32. package/dist/scripts/{35-278014f3ca.chunk.js → 35-d04a61537f.chunk.js} +1 -1
  33. package/dist/scripts/{3551-17275d533c.chunk.js → 3551-97ac416527.chunk.js} +1 -1
  34. package/dist/scripts/{3639-c5cc04c72d.chunk.js → 3639-171b53e474.chunk.js} +1 -1
  35. package/dist/scripts/3746-9f89d2e526.chunk.js +1 -0
  36. package/dist/scripts/376-4d9e8d5305.chunk.js +1 -0
  37. package/dist/scripts/{3763-47619f0e54.chunk.js → 3763-21a9bc8c81.chunk.js} +1 -1
  38. package/dist/scripts/3969-14f58e46c8.chunk.js +1 -0
  39. package/dist/scripts/4001-5f16bcaff3.chunk.js +2 -0
  40. package/dist/scripts/4024-e76b07c207.chunk.js +1 -0
  41. package/dist/scripts/{4201-ffd35af9cb.chunk.js → 4201-9f363cadea.chunk.js} +1 -1
  42. package/dist/scripts/{4245-9262674448.chunk.js → 4245-3680566469.chunk.js} +1 -1
  43. package/dist/scripts/{8727-30dadf014c.chunk.js → 4506-e3e16c1c39.chunk.js} +1 -1
  44. package/dist/scripts/4523-e918636e67.chunk.js +1 -0
  45. package/dist/scripts/{4591-78600e384c.chunk.js → 4591-84bc2f21f0.chunk.js} +1 -1
  46. package/dist/scripts/471-9ae0a7d088.chunk.js +2 -0
  47. package/dist/scripts/{4860-6001ab4e2a.chunk.js → 4860-7e9c7b578f.chunk.js} +1 -1
  48. package/dist/scripts/4984-e55e0bfa17.chunk.js +1 -0
  49. package/dist/scripts/514-9e42f33112.chunk.js +2 -0
  50. package/dist/scripts/514-9e42f33112.chunk.js.LICENSE.txt +6 -0
  51. package/dist/scripts/{5173-d333602893.chunk.js → 5173-6fe93f90b8.chunk.js} +1 -1
  52. package/dist/scripts/{5286-b5a0097954.chunk.js → 5286-c55bd5882c.chunk.js} +1 -1
  53. package/dist/scripts/535-96be75b325.chunk.js +1 -0
  54. package/dist/scripts/{5412-e2505df3a4.chunk.js → 5412-abf3c7ab24.chunk.js} +1 -1
  55. package/dist/scripts/{5418-f84d0ff359.chunk.js → 5418-4cf3592f6a.chunk.js} +1 -1
  56. package/dist/scripts/{5424-65be3c657c.chunk.js → 5424-fb9af4cac5.chunk.js} +1 -1
  57. package/dist/scripts/5524-83e92242a1.chunk.js +1 -0
  58. package/dist/scripts/5698-74d4a95cab.chunk.js +1 -0
  59. package/dist/scripts/{5707-41459498e9.chunk.js → 5707-2455798bbe.chunk.js} +1 -1
  60. package/dist/scripts/{5747-f28298b80d.chunk.js → 5747-dc100fe944.chunk.js} +1 -1
  61. package/dist/scripts/5850-21711256a9.chunk.js +1 -0
  62. package/dist/scripts/5891-1f548b9c62.chunk.js +1 -0
  63. package/dist/scripts/{6093-e19df1d1fa.chunk.js → 6093-c4d7d99258.chunk.js} +1 -1
  64. package/dist/scripts/61-35a4e0dd3d.chunk.js +2 -0
  65. package/dist/scripts/{6352-d267f9afea.chunk.js → 6352-9f5498c43f.chunk.js} +1 -1
  66. package/dist/scripts/6637-3078ed12bc.chunk.js +1 -0
  67. package/dist/scripts/6725-52d65e0d02.chunk.js +2 -0
  68. package/dist/scripts/{6732-85afd02f41.chunk.js → 6732-0223b7e084.chunk.js} +1 -1
  69. package/dist/scripts/{6774-a002ac7253.chunk.js → 6774-7d16e3a1b2.chunk.js} +1 -1
  70. package/dist/scripts/{6788-dc6b522995.chunk.js → 6788-1baf5483df.chunk.js} +1 -1
  71. package/dist/scripts/6963-2e5edf04ac.chunk.js +1 -0
  72. package/dist/scripts/{7053-00950d18ae.chunk.js → 7053-5f6f2bf8ee.chunk.js} +1 -1
  73. package/dist/scripts/7071-9ae15d6979.chunk.js +1 -0
  74. package/dist/scripts/7153-11798dda90.chunk.js +1 -0
  75. package/dist/scripts/{7190-2b40df1e89.chunk.js → 7190-b143292308.chunk.js} +1 -1
  76. package/dist/scripts/7295-c5ccbfe2be.chunk.js +1 -0
  77. package/dist/scripts/{7376-e3bf3a94f9.chunk.js → 7376-e476873e22.chunk.js} +1 -1
  78. package/dist/scripts/{7408-49b32d5829.chunk.js → 7408-eb04403233.chunk.js} +1 -1
  79. package/dist/scripts/7416-bafece2a3d.chunk.js +1 -0
  80. package/dist/scripts/7827-53c10fe9d7.chunk.js +1 -0
  81. package/dist/scripts/8080-540165cb5c.chunk.js +1 -0
  82. package/dist/scripts/8113-eb9901344c.chunk.js +1 -0
  83. package/dist/scripts/{8213-6c873c853e.chunk.js → 8213-4d11becb33.chunk.js} +1 -1
  84. package/dist/scripts/{8362-267efdac61.chunk.js → 8362-2712404025.chunk.js} +1 -1
  85. package/dist/scripts/8542-7dbc2fa676.chunk.js +1 -0
  86. package/dist/scripts/8591-920b0560e4.chunk.js +1 -0
  87. package/dist/scripts/{8726-2d0bc64637.chunk.js → 8726-10013d1e22.chunk.js} +1 -1
  88. package/dist/scripts/8757-8ba60a3c5f.chunk.js +2 -0
  89. package/dist/scripts/8757-8ba60a3c5f.chunk.js.LICENSE.txt +44 -0
  90. package/dist/scripts/{8762-be126e413d.chunk.js → 8762-0c818e61d0.chunk.js} +1 -1
  91. package/dist/scripts/{8906-2ae58fb990.chunk.js → 8906-3052c24e98.chunk.js} +1 -1
  92. package/dist/scripts/{8952-27f5ea4a16.chunk.js → 8952-5dfd08cdc7.chunk.js} +2 -2
  93. package/dist/scripts/9077-fd1d054d31.chunk.js +1 -0
  94. package/dist/scripts/9134-8845590ece.chunk.js +1 -0
  95. package/dist/scripts/{9357-e71ea6a34d.chunk.js → 9357-04700677af.chunk.js} +1 -1
  96. package/dist/scripts/9369-cacc5f30e5.chunk.js +2 -0
  97. package/dist/scripts/9383-26ce3e3847.chunk.js +1 -0
  98. package/dist/scripts/{9695-636ea0ef64.chunk.js → 9695-8b46921478.chunk.js} +1 -1
  99. package/dist/scripts/{9927-7a935c955d.chunk.js → 9927-1a5a65a341.chunk.js} +1 -1
  100. package/dist/scripts/bundle-5d010f1f12.min.js +2 -0
  101. package/dist/scripts/bundle-5d010f1f12.min.js.LICENSE.txt +133 -0
  102. package/dist/scripts/{polyfills-5ce436cbbe.min.js → polyfills-e4d8584da7.min.js} +1 -1
  103. package/package.json +4 -4
  104. package/dist/scripts/101-c8fa0bf8c0.chunk.js +0 -1
  105. package/dist/scripts/112-4f413f94c0.chunk.js +0 -1
  106. package/dist/scripts/1216-83f6fbc7be.chunk.js +0 -1
  107. package/dist/scripts/152-808e046b1f.chunk.js +0 -2
  108. package/dist/scripts/1973-7a1768228d.chunk.js +0 -1
  109. package/dist/scripts/2417-e85abc4005.chunk.js +0 -1
  110. package/dist/scripts/2482-ded3090c15.chunk.js +0 -1
  111. package/dist/scripts/2648-0a58c0fc05.chunk.js +0 -1
  112. package/dist/scripts/2802-d428814c29.chunk.js +0 -2
  113. package/dist/scripts/2802-d428814c29.chunk.js.LICENSE.txt +0 -8
  114. package/dist/scripts/299-e59ef1fc4f.chunk.js +0 -1
  115. package/dist/scripts/343-4f77983932.chunk.js +0 -1
  116. package/dist/scripts/3746-1fd61fe062.chunk.js +0 -1
  117. package/dist/scripts/376-0ae51da38f.chunk.js +0 -1
  118. package/dist/scripts/3969-c636ff3159.chunk.js +0 -1
  119. package/dist/scripts/4024-8372510247.chunk.js +0 -1
  120. package/dist/scripts/4523-e244d0dae2.chunk.js +0 -1
  121. package/dist/scripts/5046-7f741b88da.chunk.js +0 -1
  122. package/dist/scripts/514-eeb95eba47.chunk.js +0 -1
  123. package/dist/scripts/535-b26597b4d0.chunk.js +0 -1
  124. package/dist/scripts/5524-04583b6e40.chunk.js +0 -1
  125. package/dist/scripts/5850-996ea58208.chunk.js +0 -1
  126. package/dist/scripts/5891-bf6bb58afe.chunk.js +0 -1
  127. package/dist/scripts/61-29f179811f.chunk.js +0 -2
  128. package/dist/scripts/6532-48f3f080f5.chunk.js +0 -2
  129. package/dist/scripts/6963-68cce4d38c.chunk.js +0 -1
  130. package/dist/scripts/7002-48057608dc.chunk.js +0 -1
  131. package/dist/scripts/7071-78d0b6c0cb.chunk.js +0 -1
  132. package/dist/scripts/708-4faf09f1e5.chunk.js +0 -1
  133. package/dist/scripts/7153-b581d35045.chunk.js +0 -1
  134. package/dist/scripts/7295-5a82c36f28.chunk.js +0 -1
  135. package/dist/scripts/7827-ef0d617862.chunk.js +0 -1
  136. package/dist/scripts/8113-d678e76098.chunk.js +0 -1
  137. package/dist/scripts/8234-d793dd9bda.chunk.js +0 -1
  138. package/dist/scripts/826-c6d1a46e45.chunk.js +0 -2
  139. package/dist/scripts/8542-475ab8438e.chunk.js +0 -1
  140. package/dist/scripts/8591-149f4a2b62.chunk.js +0 -1
  141. package/dist/scripts/9369-f43ee314be.chunk.js +0 -2
  142. package/dist/scripts/9383-2c77c78fe8.chunk.js +0 -1
  143. package/dist/scripts/bundle-8f42183790.min.js +0 -2
  144. package/dist/scripts/bundle-8f42183790.min.js.LICENSE.txt +0 -1
  145. package/typings/libs/CVEvents.d.ts +0 -13
  146. package/typings/libs/CVLanguages.d.ts +0 -24
  147. package/typings/libs/LazyLoad.d.ts +0 -30
  148. package/typings/libs/LazyLoad.ts +0 -27
  149. package/typings/libs/cookiesjs.d.ts +0 -24
  150. /package/dist/css/{2417-library-editor-46f8e6e95b.chunk.css → 1537-library-editor-46f8e6e95b.chunk.css} +0 -0
  151. /package/dist/css/{2482-library-editor-1b6dc45d45.chunk.css → 209-library-editor-1b6dc45d45.chunk.css} +0 -0
  152. /package/dist/css/{343-library-editor-d2f704c6a5.chunk.css → 2955-library-editor-d2f704c6a5.chunk.css} +0 -0
  153. /package/dist/css/{112-library-editor-6a2d152d7d.chunk.css → 6637-library-editor-6a2d152d7d.chunk.css} +0 -0
  154. /package/dist/css/{152-library-editor-01b4461ff1.chunk.css → 6725-library-editor-01b4461ff1.chunk.css} +0 -0
  155. /package/dist/css/{708-library-editor-7ffe353138.chunk.css → 8080-library-editor-7ffe353138.chunk.css} +0 -0
  156. /package/dist/css/{5046-library-editor-765ea88cb0.chunk.css → 9077-library-editor-765ea88cb0.chunk.css} +0 -0
  157. /package/dist/css/{8234-library-editor-5a1c6fc3b4.chunk.css → 9134-library-editor-5a1c6fc3b4.chunk.css} +0 -0
  158. /package/dist/scripts/{61-29f179811f.chunk.js.LICENSE.txt → 4001-5f16bcaff3.chunk.js.LICENSE.txt} +0 -0
  159. /package/dist/scripts/{6532-48f3f080f5.chunk.js.LICENSE.txt → 471-9ae0a7d088.chunk.js.LICENSE.txt} +0 -0
  160. /package/dist/scripts/{546-40961bc779.chunk.js → 546-2cf4378b0c.chunk.js} +0 -0
  161. /package/dist/scripts/{826-c6d1a46e45.chunk.js.LICENSE.txt → 61-35a4e0dd3d.chunk.js.LICENSE.txt} +0 -0
  162. /package/dist/scripts/{152-808e046b1f.chunk.js.LICENSE.txt → 6725-52d65e0d02.chunk.js.LICENSE.txt} +0 -0
  163. /package/dist/scripts/{8952-27f5ea4a16.chunk.js.LICENSE.txt → 8952-5dfd08cdc7.chunk.js.LICENSE.txt} +0 -0
  164. /package/dist/scripts/{9369-f43ee314be.chunk.js.LICENSE.txt → 9369-cacc5f30e5.chunk.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1703],{74250:function(e,t,n){"use strict";n.d(t,{z:function(){return g}});var o=n(48088),i=n(57857),r=n(31647),a=n(88172),l=n(93569),s=n(40622),u=n(99724),c=n.n(u),d={saveButton:"G_FDK",undo:"dcV70"};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,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,v(o.key),o)}}function v(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=y(t),function(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)}(e,b()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}(this,t,[e])}return 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)}(t,e),n=t,u=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return o.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(){this.model||(this.model=new r.Q.Hn(h(h({},a.ZV.ShowSpinner,this.options.showSpinner),a.ZV.Disabled,this.options.isDisabled)));var e=this.options.channelName;this.listenTo(e,s.NT.DisableSave,this.onDisableSave),this.listenTo(e,s.NT.EnableSave,this.onEnableSave),this.listenTo(e,s.NT.CancelSave,this.onCancelSave);var t=o.Radio.channel(this.getSaveChannelName());this.listenTo(t,s.NT.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(a.ZV.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(a.ZV.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(a.ZV.ShowSpinner)&&this.model.set(a.ZV.ShowSpinner,!1,{silent:!0}),this.model.set(a.ZV.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(s.NT.Undo)}},{key:"onSave",value:function(){this.model.set(a.ZV.ShowSpinner,!0),this.getParentChannel().trigger(s.NT.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:d}}},{key:"renderSaveButton",value:function(){var e=new a.Py({saveEvent:s.NT.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:i.T.getPhrase(this.lang,"save"),extraButtonClass:"btn-dark ".concat(d.saveButton),spinnerOptions:{size:l.Ey.Small,type:l.dR.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}],u&&p(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Q.wA)},66481:function(e,t,n){"use strict";n.r(t),n.d(t,{EditClipView:function(){return H}});var o=n(48088),i=n(39479),r=n(25417),a=n(99748),l=n(11306),s=n(21679),u=n(57857),c=n(99249),d=n(31647),f=n(52076),h=n(70065),p=n(13156),v=n(57085),b=n(57098),y=n(29457),m=n(610),g=n(48404),w=n(19226),k=n(93569),S=n(88483),C=n(2772),E=n(72998),O=n(74250),j=n(47122),P=n.n(j);function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(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){var t=function(e){if("object"!=T(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==T(t)?t:t+""}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}var B=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=D(t),function(e,t){if(t&&("object"==T(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)}(e,x()?Reflect.construct(t,n||[],D(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&V(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"EditClipDetailsComponent"}},{key:"className",get:function(){return"edit-clip-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editClipDetails"}},{key:"template",get:function(){return P()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:b.OV.LIBRARY_EDITOR,action:b.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id"),this.model.get("typeId")]}}}},{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}}}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new O.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"})),this.showChildView("bottomSave",new O.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new E.J({model:this.model,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new C.Z({model:this.model,thumbnail:k.M2.getThumbnail(this.model),thumbnailOptions:{size:S.h2.Medium},duration:k.M2.getDuration(this.model),durationNewStyle:!0}))}},{key:"viewOptions",value:function(){return{editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:k.M2.isExchangeVideo(this.model)}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail()}}])&&N(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),M=n(40622),R=n(53854),I=n(75535),L=n(95061),U=n(57785),A=n(50814),Q=n.n(A);function Z(e){return Z="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},Z(e)}function z(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,K(o.key),o)}}function K(e){var t=function(e){if("object"!=Z(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Z(t)?t:t+""}function F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(F=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function Y(e,t){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y(e,t)}var H=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=G(t),function(e,t){if(t&&("object"==Z(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)}(e,F()?Reflect.construct(t,n||[],G(e).constructor):t.apply(e,n))}(this,t,[e])).editable=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Y(e,t)}(t,e),n=t,S=[{key:"name",get:function(){return"EditClipView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editClip"}},{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.clipId)}},{key:"template",get:function(){return Q()}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1,partialLoading:y.LP.Breadcrumbs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:y.LP.EditClipDetails}}}},{key:"initialize",value:function(){this.navLock=s.u.getInstance(b.K9.NavLock,this),this.initDataListeners(),k.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=s.u.getInstance(b.Or.Video,this),this.alertService=s.u.getInstance(b.K9.Alerts,this)}},{key:"initDataListeners",value:function(){this.listenTo(r.G.SHELL,d.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(b.Vk.VIDEO,"".concat(b.M_.CLIPS,":").concat(this.options.clipId,":sync"),this.render),this.listenTo(b.Vk.VIDEO,"".concat(b.M_.CLIPS,":").concat(this.options.clipId,":error"),this.onError),this.listenTo(this.channelName,M.NT.Save,this.onSave),this.listenTo(this.channelName,M.NT.Undo,this.onUndo)}},{key:"onError",value:function(e){switch(e.type){case a.h.NotFound:d.Q.Ry.throw(new I.l);break;case a.h.Forbidden:d.Q.Ry.throw(new R.a)}}},{key:"saveVideo",value:function(e,t){var n=this,o=e.dataChanges;if(i.isEmpty(o))t(e);else{var r=e.dataChanges;this.videoDataService.updateClip(this.model.get("id"),this.folder.get("id"),r,(function(o){n.videoDataService.clearVideoCache(),e.updatedVideo=i.extend({},e.updatedVideo||{},o),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(M.NT.DisableSave),this.logEditAction(e.dataChanges,h.eu.Save);var t=p.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Clip was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(M.NT.CancelSave),!1;var e=U.xC.getChanges(this.model,this.viewModel),t=U.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!i.keys(t).length)return this.updateSaveButton(M.NT.CancelSave),!1;var n=new d.Q.dM;return this.editable&&n.useAsync(i.bind(this.saveVideo,this)),n.useAsync(i.bind(this.afterSave,this)),n.goAsync({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new k.Mr({title:u.T.getPhrase(this.lang,"undoTitle"),text:u.T.getPhrase(this.lang,"undoBody",{clipName:this.model.get("name")}),buttons:[{text:u.T.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:u.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}]}).render().done((function(){e.logEditAction({},h.eu.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),U.xC.updateModelState(this.model,this.viewModel,e),c.r.clear(this.viewModelName),this.getViewModel(),this.renderContent()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).undo;this.stopListening(this.viewModel),c.r.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),e&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:u.T.getPhrase(this.lang,"navLockHeading"),text:u.T.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{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()){if(!U.xC.getChanges(this.model,this.viewModel)&&!i.keys(U.xC.getRemovedObjectIds(this.model,this.viewModel)).length)return this.unlockNav(),void this.updateSaveButton(M.NT.DisableSave);this.lockNav(),this.updateSaveButton(M.NT.EnableSave)}else this.updateSaveButton(M.NT.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=o.Radio.channel(this.channelName),n=M.NT.EnableSave,i=M.NT.DisableSave,r=M.NT.CancelSave;switch(e){case n:return void t.trigger(n);case i:return void t.trigger(i);case r:return void t.trigger(r)}d.Q.Ry.throw(new l.H("Save action type is not valid."))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);f.k.logUserAction(n,{actionType:h.Vw.Edit,entity:h.py.Clip,location:h.LZ.EditClipDetails,workflowPhase:t})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.viewModel=c.r.get(this.viewModelName,this.model.toJSON(),{ctor:m.b}),this.editable&&this.viewModel.addValidation(U.Zl),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange)}},{key:"fetchData",value:function(){this.model=this.videoDataService.getClip(this.options.clipId),this.model&&(this.editable=k.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.viewModel instanceof m.b||this.getViewModel())}},{key:"requiredResources",get:function(){return{config:g.p.config,currentUser:w.K.currentUser,libraries:L.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.viewModel}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.showChildView("breadcrumbs",new v.n({folder:this.folder,libraries:this.libraries,video:this.model,enableLastItemAppLink:!1}))}},{key:"renderContent",value:function(){var e=U.xC.getChanges(this.model,this.viewModel)||i.keys(U.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new B({model:this.viewModel,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderContent()}}],S&&z(n.prototype,S),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,S}(d.Q.G7)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return T}});var o=n(31647),i=n(57098),r=n(22557),a=n(86363),l=n.n(a);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function d(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function h(e,t,n){return t=v(t),function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}var m=function(e){function t(){return u(this,t),h(this,t,arguments)}return b(t,e),d(t,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return l()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var e="breadcrumb-item";return this.model.get("active")&&(e+=" active"),e}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}])}(o.Q.wA),g=function(e){function t(){return u(this,t),h(this,t,arguments)}return b(t,e),d(t,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return m}}])}(o.Q.$W),w=n(93933),k=n.n(w);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function C(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,E(o.key),o)}}function E(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(O=function(){return!!e})()}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}var T=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=j(t),function(e,t){if(t&&("object"==S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,O()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}(this,t,[e])}return 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)}(t,e),n=t,(a=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return k()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var e=this;this.breadcrumbCollection=new o.Q.FE([]);var t,n=this.options.folder;do{if(!n)break;if(t=r.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!t),{at:0}),!t)break;n=t}while(t);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:i.OV.LIBRARY_EDITOR,action:i.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(t){return e.breadcrumbCollection.add(t)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?i.eX.LibraryEditor.FOLDER:i.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:i.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new g({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&C(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a}(o.Q.wA)},47122:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info rounded fw-semibold">\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(2,i,0),inverse:e.program(4,i,0),data:i}))?r:"")+" </p>\n"},2: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"},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||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="row">\n <div class="left-pane col-4">\n <div class="thumbnail-region"></div>\n </div>\n <div class="right-pane col-8">\n'+(null!=(r=n.unless.call(null!=t?t:e.nullContext||{},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 class="top-save-region"></div>\n <div class="basic-info-region mb-4"></div> \n <div class="bottom-save-region"></div>\n </div>\n</div>'},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-secondary 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})},50814: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="row pb-3 border-bottom">\n <h1 class="h3">'+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)+'</h1>\n\n <div class="breadcrumbs-region"></div>\n</div>\n<div class="edit-content-region"></div>'},useData:!0})},86363: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,'<span class="fw-bolder">'+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)+"</span>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<a>"+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)+"</a>\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.isActive:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:""},useData:!0})},93933: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'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1703],{74250:function(e,t,n){"use strict";n.d(t,{z:function(){return g}});var o=n(43823),i=n(57857),r=n(31647),a=n(88172),l=n(93569),s=n(40622),u=n(99724),c=n.n(u),d={saveButton:"G_FDK",undo:"dcV70"};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,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,v(o.key),o)}}function v(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=y(t),function(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)}(e,b()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}(this,t,[e])}return 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)}(t,e),n=t,u=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return o.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(){this.model||(this.model=new r.Q.Hn(h(h({},a.ZV.ShowSpinner,this.options.showSpinner),a.ZV.Disabled,this.options.isDisabled)));var e=this.options.channelName;this.listenTo(e,s.NT.DisableSave,this.onDisableSave),this.listenTo(e,s.NT.EnableSave,this.onEnableSave),this.listenTo(e,s.NT.CancelSave,this.onCancelSave);var t=o.Radio.channel(this.getSaveChannelName());this.listenTo(t,s.NT.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(a.ZV.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(a.ZV.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(a.ZV.ShowSpinner)&&this.model.set(a.ZV.ShowSpinner,!1,{silent:!0}),this.model.set(a.ZV.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(s.NT.Undo)}},{key:"onSave",value:function(){this.model.set(a.ZV.ShowSpinner,!0),this.getParentChannel().trigger(s.NT.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:d}}},{key:"renderSaveButton",value:function(){var e=new a.Py({saveEvent:s.NT.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:i.T.getPhrase(this.lang,"save"),extraButtonClass:"btn-dark ".concat(d.saveButton),spinnerOptions:{size:l.Ey.Small,type:l.dR.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}],u&&p(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Q.wA)},66481:function(e,t,n){"use strict";n.r(t),n.d(t,{EditClipView:function(){return H}});var o=n(43823),i=n(21161),r=n(25417),a=n(99748),l=n(11306),s=n(21679),u=n(57857),c=n(99249),d=n(31647),f=n(52076),h=n(70065),p=n(13156),v=n(57085),b=n(57098),y=n(29457),m=n(610),g=n(48404),w=n(19226),k=n(93569),S=n(88483),C=n(2772),E=n(72998),O=n(74250),j=n(47122),P=n.n(j);function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(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){var t=function(e){if("object"!=T(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=T(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==T(t)?t:t+""}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}function D(e){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},D(e)}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}var B=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=D(t),function(e,t){if(t&&("object"==T(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)}(e,x()?Reflect.construct(t,n||[],D(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&V(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"EditClipDetailsComponent"}},{key:"className",get:function(){return"edit-clip-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editClipDetails"}},{key:"template",get:function(){return P()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:b.OV.LIBRARY_EDITOR,action:b.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id"),this.model.get("typeId")]}}}},{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}}}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new O.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"})),this.showChildView("bottomSave",new O.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new E.J({model:this.model,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new C.Z({model:this.model,thumbnail:k.M2.getThumbnail(this.model),thumbnailOptions:{size:S.h2.Medium},duration:k.M2.getDuration(this.model),durationNewStyle:!0}))}},{key:"viewOptions",value:function(){return{editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:k.M2.isExchangeVideo(this.model)}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail()}}])&&N(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),M=n(40622),R=n(53854),I=n(75535),L=n(95061),U=n(57785),A=n(50814),Q=n.n(A);function Z(e){return Z="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},Z(e)}function z(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,K(o.key),o)}}function K(e){var t=function(e){if("object"!=Z(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Z(t)?t:t+""}function F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(F=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function Y(e,t){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y(e,t)}var H=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=G(t),function(e,t){if(t&&("object"==Z(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)}(e,F()?Reflect.construct(t,n||[],G(e).constructor):t.apply(e,n))}(this,t,[e])).editable=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Y(e,t)}(t,e),n=t,S=[{key:"name",get:function(){return"EditClipView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editClip"}},{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.clipId)}},{key:"template",get:function(){return Q()}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1,partialLoading:y.LP.Breadcrumbs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:y.LP.EditClipDetails}}}},{key:"initialize",value:function(){this.navLock=s.u.getInstance(b.K9.NavLock,this),this.initDataListeners(),k.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=s.u.getInstance(b.Or.Video,this),this.alertService=s.u.getInstance(b.K9.Alerts,this)}},{key:"initDataListeners",value:function(){this.listenTo(r.G.SHELL,d.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(b.Vk.VIDEO,"".concat(b.M_.CLIPS,":").concat(this.options.clipId,":sync"),this.render),this.listenTo(b.Vk.VIDEO,"".concat(b.M_.CLIPS,":").concat(this.options.clipId,":error"),this.onError),this.listenTo(this.channelName,M.NT.Save,this.onSave),this.listenTo(this.channelName,M.NT.Undo,this.onUndo)}},{key:"onError",value:function(e){switch(e.type){case a.h.NotFound:d.Q.Ry.throw(new I.l);break;case a.h.Forbidden:d.Q.Ry.throw(new R.a)}}},{key:"saveVideo",value:function(e,t){var n=this,o=e.dataChanges;if(i.isEmpty(o))t(e);else{var r=e.dataChanges;this.videoDataService.updateClip(this.model.get("id"),this.folder.get("id"),r,(function(o){n.videoDataService.clearVideoCache(),e.updatedVideo=i.extend({},e.updatedVideo||{},o),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(M.NT.DisableSave),this.logEditAction(e.dataChanges,h.eu.Save);var t=p.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Clip was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(M.NT.CancelSave),!1;var e=U.xC.getChanges(this.model,this.viewModel),t=U.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!i.keys(t).length)return this.updateSaveButton(M.NT.CancelSave),!1;var n=new d.Q.dM;return this.editable&&n.useAsync(i.bind(this.saveVideo,this)),n.useAsync(i.bind(this.afterSave,this)),n.goAsync({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new k.Mr({title:u.T.getPhrase(this.lang,"undoTitle"),text:u.T.getPhrase(this.lang,"undoBody",{clipName:this.model.get("name")}),buttons:[{text:u.T.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:u.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}]}).render().done((function(){e.logEditAction({},h.eu.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),U.xC.updateModelState(this.model,this.viewModel,e),c.r.clear(this.viewModelName),this.getViewModel(),this.renderContent()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).undo;this.stopListening(this.viewModel),c.r.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),e&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:u.T.getPhrase(this.lang,"navLockHeading"),text:u.T.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{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()){if(!U.xC.getChanges(this.model,this.viewModel)&&!i.keys(U.xC.getRemovedObjectIds(this.model,this.viewModel)).length)return this.unlockNav(),void this.updateSaveButton(M.NT.DisableSave);this.lockNav(),this.updateSaveButton(M.NT.EnableSave)}else this.updateSaveButton(M.NT.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=o.Radio.channel(this.channelName),n=M.NT.EnableSave,i=M.NT.DisableSave,r=M.NT.CancelSave;switch(e){case n:return void t.trigger(n);case i:return void t.trigger(i);case r:return void t.trigger(r)}d.Q.Ry.throw(new l.H("Save action type is not valid."))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);f.k.logUserAction(n,{actionType:h.Vw.Edit,entity:h.py.Clip,location:h.LZ.EditClipDetails,workflowPhase:t})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.viewModel=c.r.get(this.viewModelName,this.model.toJSON(),{ctor:m.b}),this.editable&&this.viewModel.addValidation(U.Zl),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange)}},{key:"fetchData",value:function(){this.model=this.videoDataService.getClip(this.options.clipId),this.model&&(this.editable=k.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.viewModel instanceof m.b||this.getViewModel())}},{key:"requiredResources",get:function(){return{config:g.p.config,currentUser:w.K.currentUser,libraries:L.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.viewModel}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.showChildView("breadcrumbs",new v.n({folder:this.folder,libraries:this.libraries,video:this.model,enableLastItemAppLink:!1}))}},{key:"renderContent",value:function(){var e=U.xC.getChanges(this.model,this.viewModel)||i.keys(U.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new B({model:this.viewModel,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderContent()}}],S&&z(n.prototype,S),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,S}(d.Q.G7)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return T}});var o=n(31647),i=n(57098),r=n(22557),a=n(86363),l=n.n(a);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function d(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=function(e){if("object"!=s(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==s(t)?t:t+""}function h(e,t,n){return t=v(t),function(e,t){if(t&&("object"==s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}var m=function(e){function t(){return u(this,t),h(this,t,arguments)}return b(t,e),d(t,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return l()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var e="breadcrumb-item";return this.model.get("active")&&(e+=" active"),e}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}])}(o.Q.wA),g=function(e){function t(){return u(this,t),h(this,t,arguments)}return b(t,e),d(t,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return m}}])}(o.Q.$W),w=n(93933),k=n.n(w);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function C(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,E(o.key),o)}}function E(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function O(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(O=function(){return!!e})()}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}var T=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=j(t),function(e,t){if(t&&("object"==S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,O()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}(this,t,[e])}return 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)}(t,e),n=t,(a=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return k()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var e=this;this.breadcrumbCollection=new o.Q.FE([]);var t,n=this.options.folder;do{if(!n)break;if(t=r.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!t),{at:0}),!t)break;n=t}while(t);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:i.OV.LIBRARY_EDITOR,action:i.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(t){return e.breadcrumbCollection.add(t)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?i.eX.LibraryEditor.FOLDER:i.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:i.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new g({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&C(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a}(o.Q.wA)},47122:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info rounded fw-semibold">\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(2,i,0),inverse:e.program(4,i,0),data:i}))?r:"")+" </p>\n"},2: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"},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||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="row">\n <div class="left-pane col-4">\n <div class="thumbnail-region"></div>\n </div>\n <div class="right-pane col-8">\n'+(null!=(r=n.unless.call(null!=t?t:e.nullContext||{},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 class="top-save-region"></div>\n <div class="basic-info-region mb-4"></div> \n <div class="bottom-save-region"></div>\n </div>\n</div>'},useData:!0})},99724:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-secondary 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})},50814:function(e,t,n){var o=n(31197);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="row pb-3 border-bottom">\n <h1 class="h3">'+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)+'</h1>\n\n <div class="breadcrumbs-region"></div>\n</div>\n<div class="edit-content-region"></div>'},useData:!0})},86363:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="fw-bolder">'+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)+"</span>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<a>"+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)+"</a>\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.isActive:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:""},useData:!0})},93933:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1832],{21832:function(e,t,n){"use strict";n.r(t),n.d(t,{GeneratePdfView:function(){return T}});var r=n(48088),i=n(21679),o=n(57857),a=n(31647),c=n(52076),l=n(70065),u=n(77502),s=n(10101),f=n(88172),p=n(57098),h=n(67670),y=n(19226),d=n(93569),b=n(56906),v=n(44634),m=n.n(v),g={image:"Di3M6"};function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P(r.key),r)}}function P(e){var t=function(e){if("object"!=w(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==w(t)?t:t+""}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var T=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=k(t),function(e,t){if(t&&("object"==w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,E()?Reflect.construct(t,n||[],k(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(t,e),n=t,(v=[{key:"initialize",value:function(){this.collectionIdentifier=this.options.collectionIdentifier,this.libraryDataService=i.u.getInstance(p.Or.Library,this),this.videoDataService=i.u.getInstance(p.Or.Video,this),this.exportDataService=i.u.getInstance(p.Or.Export,this),this.bindListeners()}},{key:"name",get:function(){return"GeneratePdfView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.generatePdf"}},{key:"template",get:function(){return m()}},{key:"channelName",get:function(){return d.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:s.Yw,title:o.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new h.v,saveEvent:"generate:pdf",channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"generate"),extraButtonClass:"btn-dark",spinnerOptions:{size:d.Ey.Small,type:d.dR.Light,extraClasses:"mx-auto"}}}]}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"generate:pdf",this.onClickGeneratePdf),this.listenTo(p.Vk.LIBRARY,"".concat(p.M_.FOLDER,":").concat(this.collectionIdentifier.id,":sync"),this.render),this.listenTo(p.Vk.VIDEO,"".concat(this.collectionIdentifier.toString(),":sync"),this.render),this.listenTo(p.Vk.EXPORT,"".concat(p.M_.GENERATE_COLLECTION_PDF,":").concat(this.collectionIdentifier.id,":sync"),(function(){return e.triggerMethod("hide")}))}},{key:"onClickGeneratePdf",value:function(){this.hasDataFetched()&&(r.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner),this.exportDataService.generateCollectionPdf(this.library.id,this.collectionIdentifier.id,this.currentUser,this.collectionIdentifier.sort),this.logAction(this.collectionIdentifier.id,this.collectionIdentifier.sort))}},{key:"fetchData",value:function(){var e=this;this.videos=this.videoDataService.getCollectionVideos(this.collectionIdentifier),this.model=this.libraryDataService.getFolder(this.collectionIdentifier.id),this.library||this.libraryDataService.getLibraries((function(t){e.library=d.PU.getLibrary(e.collectionIdentifier.id,t),e.render()}))}},{key:"logAction",value:function(e,t){var n={location:l.LZ.Popup,actionType:l.Vw.Create,entity:l.py.PDF,workflowPhase:l.eu.Complete},r={id:e,sort:u.E[t]};c.k.logUserAction(r,n)}},{key:"hasDataFetched",value:function(){return!!this.model&&!!this.videos&&!!this.library}},{key:"requiredResources",get:function(){return{currentUser:y.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this;return this.fetchData(),!!this.hasDataFetched()&&(this.videos&&!this.videos.length?(window.setTimeout((function(){e.triggerMethod("hide"),a.Q.Ry.throw(new b.Xz(o.T.getPhrase(e.lang,"errorHeading")))}),p.pA.POPUP_FADE_TIMEOUT),!1):(this.hasDataFetched()&&this.spinnerModel.set(f.ZV.Disabled,!1),!0))}},{key:"viewOptions",value:function(){return{dataFetched:this.hasDataFetched(),spinnerEl:d.Kp.getSpinner({size:d.Ey.Large,extraClasses:"mx-auto"}),imageUrl:p.Wn.Shared.GENERATE_PDF,infoText:o.T.getPhrase(this.lang,"info",{name:this.model.get("name"),email:this.currentUser.get("email"),escapeText:!0}),styles:g}}}])&&O(n.prototype,v),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,v}(a.Q.G7)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),i=n(88172);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=s(t),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],s(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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)}(t,e),n=t,(r=[{key:"defaults",value:function(){return a(a({},i.ZV.Disabled,!0),i.ZV.Hidden,!1)}}])&&c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},44634:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\n"},3:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,c=e.escapeExpression;return'<div class="pb-3 text-center">\n <img src="'+c(a(null!=(o=null!=t?t.options:t)?o.imageUrl:o,t))+'" class="'+c(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.image:o,t))+'" />\n</div>\n<p class="m-0">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.infoText:o,t))?o:"")+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1832],{21832:function(e,t,n){"use strict";n.r(t),n.d(t,{GeneratePdfView:function(){return T}});var r=n(43823),i=n(21679),o=n(57857),a=n(31647),c=n(52076),l=n(70065),u=n(77502),s=n(10101),f=n(88172),p=n(57098),h=n(67670),y=n(19226),d=n(93569),b=n(56906),v=n(44634),m=n.n(v),g={image:"Di3M6"};function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,P(r.key),r)}}function P(e){var t=function(e){if("object"!=w(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==w(t)?t:t+""}function E(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(E=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function S(e,t){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},S(e,t)}var T=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=k(t),function(e,t){if(t&&("object"==w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,E()?Reflect.construct(t,n||[],k(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(t,e),n=t,(v=[{key:"initialize",value:function(){this.collectionIdentifier=this.options.collectionIdentifier,this.libraryDataService=i.u.getInstance(p.Or.Library,this),this.videoDataService=i.u.getInstance(p.Or.Video,this),this.exportDataService=i.u.getInstance(p.Or.Export,this),this.bindListeners()}},{key:"name",get:function(){return"GeneratePdfView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.generatePdf"}},{key:"template",get:function(){return m()}},{key:"channelName",get:function(){return d.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){return[{behaviorClass:s.Yw,title:o.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new h.v,saveEvent:"generate:pdf",channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"generate"),extraButtonClass:"btn-dark",spinnerOptions:{size:d.Ey.Small,type:d.dR.Light,extraClasses:"mx-auto"}}}]}},{key:"bindListeners",value:function(){var e=this;this.listenTo(this.channelName,"generate:pdf",this.onClickGeneratePdf),this.listenTo(p.Vk.LIBRARY,"".concat(p.M_.FOLDER,":").concat(this.collectionIdentifier.id,":sync"),this.render),this.listenTo(p.Vk.VIDEO,"".concat(this.collectionIdentifier.toString(),":sync"),this.render),this.listenTo(p.Vk.EXPORT,"".concat(p.M_.GENERATE_COLLECTION_PDF,":").concat(this.collectionIdentifier.id,":sync"),(function(){return e.triggerMethod("hide")}))}},{key:"onClickGeneratePdf",value:function(){this.hasDataFetched()&&(r.Radio.channel(this.channelName).trigger(f.I3.ShowSpinner),this.exportDataService.generateCollectionPdf(this.library.id,this.collectionIdentifier.id,this.currentUser,this.collectionIdentifier.sort),this.logAction(this.collectionIdentifier.id,this.collectionIdentifier.sort))}},{key:"fetchData",value:function(){var e=this;this.videos=this.videoDataService.getCollectionVideos(this.collectionIdentifier),this.model=this.libraryDataService.getFolder(this.collectionIdentifier.id),this.library||this.libraryDataService.getLibraries((function(t){e.library=d.PU.getLibrary(e.collectionIdentifier.id,t),e.render()}))}},{key:"logAction",value:function(e,t){var n={location:l.LZ.Popup,actionType:l.Vw.Create,entity:l.py.PDF,workflowPhase:l.eu.Complete},r={id:e,sort:u.E[t]};c.k.logUserAction(r,n)}},{key:"hasDataFetched",value:function(){return!!this.model&&!!this.videos&&!!this.library}},{key:"requiredResources",get:function(){return{currentUser:y.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this;return this.fetchData(),!!this.hasDataFetched()&&(this.videos&&!this.videos.length?(window.setTimeout((function(){e.triggerMethod("hide"),a.Q.Ry.throw(new b.Xz(o.T.getPhrase(e.lang,"errorHeading")))}),p.pA.POPUP_FADE_TIMEOUT),!1):(this.hasDataFetched()&&this.spinnerModel.set(f.ZV.Disabled,!1),!0))}},{key:"viewOptions",value:function(){return{dataFetched:this.hasDataFetched(),spinnerEl:d.Kp.getSpinner({size:d.Ey.Large,extraClasses:"mx-auto"}),imageUrl:p.Wn.Shared.GENERATE_PDF,infoText:o.T.getPhrase(this.lang,"info",{name:this.model.get("name"),email:this.currentUser.get("email"),escapeText:!0}),styles:g}}}])&&O(n.prototype,v),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,v}(a.Q.G7)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),i=n(88172);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=s(t),function(e,t){if(t&&("object"==o(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,n||[],s(e).constructor):t.apply(e,n))}(this,t,arguments)}return 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)}(t,e),n=t,(r=[{key:"defaults",value:function(){return a(a({},i.ZV.Disabled,!0),i.ZV.Hidden,!1)}}])&&c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},44634:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\n"},3:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,c=e.escapeExpression;return'<div class="pb-3 text-center">\n <img src="'+c(a(null!=(o=null!=t?t.options:t)?o.imageUrl:o,t))+'" class="'+c(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.image:o,t))+'" />\n</div>\n<p class="m-0">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.infoText:o,t))?o:"")+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);
@@ -1 +1 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1876],{74250:function(e,t,n){"use strict";n.d(t,{z:function(){return g}});var o=n(48088),i=n(57857),r=n(31647),a=n(88172),s=n(93569),l=n(40622),u=n(99724),c=n.n(u),d={saveButton:"G_FDK",undo:"dcV70"};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,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,v(o.key),o)}}function v(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=y(t),function(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)}(e,b()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}(this,t,[e])}return 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)}(t,e),n=t,u=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return o.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(){this.model||(this.model=new r.Q.Hn(h(h({},a.ZV.ShowSpinner,this.options.showSpinner),a.ZV.Disabled,this.options.isDisabled)));var e=this.options.channelName;this.listenTo(e,l.NT.DisableSave,this.onDisableSave),this.listenTo(e,l.NT.EnableSave,this.onEnableSave),this.listenTo(e,l.NT.CancelSave,this.onCancelSave);var t=o.Radio.channel(this.getSaveChannelName());this.listenTo(t,l.NT.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(a.ZV.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(a.ZV.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(a.ZV.ShowSpinner)&&this.model.set(a.ZV.ShowSpinner,!1,{silent:!0}),this.model.set(a.ZV.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(l.NT.Undo)}},{key:"onSave",value:function(){this.model.set(a.ZV.ShowSpinner,!0),this.getParentChannel().trigger(l.NT.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:d}}},{key:"renderSaveButton",value:function(){var e=new a.Py({saveEvent:l.NT.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:i.T.getPhrase(this.lang,"save"),extraButtonClass:"btn-dark ".concat(d.saveButton),spinnerOptions:{size:s.Ey.Small,type:s.dR.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}],u&&p(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Q.wA)},18007:function(e,t,n){"use strict";n.r(t),n.d(t,{EditInteractiveView:function(){return H}});var o=n(48088),i=n(39479),r=n(25417),a=n(99748),s=n(11306),l=n(21679),u=n(57857),c=n(99249),d=n(31647),f=n(52076),h=n(70065),p=n(13156),v=n(57085),b=n(57098),y=n(29457),m=n(86205),g=n(48404),w=n(19226),k=n(93569),S=n(88483),E=n(2772),O=n(72998),C=n(74250),T=n(49965),j=n.n(T);function N(e){return N="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},N(e)}function P(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_(o.key),o)}}function _(e){var t=function(e){if("object"!=N(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==N(t)?t:t+""}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}var D=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=x(t),function(e,t){if(t&&("object"==N(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)}(e,I()?Reflect.construct(t,n||[],x(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&V(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"EditInteractiveDetailsComponent"}},{key:"className",get:function(){return"edit-interactive-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editInteractiveDetails"}},{key:"template",get:function(){return j()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:b.OV.LIBRARY_EDITOR,action:b.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id"),this.model.get("typeId")]}}}},{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}}}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new C.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"})),this.showChildView("bottomSave",new C.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new O.J({model:this.model,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new E.Z({model:this.model,thumbnail:k.M2.getThumbnail(this.model),thumbnailOptions:{size:S.h2.Medium},duration:k.M2.getDuration(this.model),durationNewStyle:!0}))}},{key:"viewOptions",value:function(){return{editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:k.M2.isExchangeVideo(this.model)}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail()}}])&&P(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),B=n(40622),M=n(53854),R=n(75535),L=n(95061),A=n(57785),U=n(44665),Q=n.n(U);function Z(e){return Z="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},Z(e)}function z(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,K(o.key),o)}}function K(e){var t=function(e){if("object"!=Z(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Z(t)?t:t+""}function F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(F=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function Y(e,t){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y(e,t)}var H=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=G(t),function(e,t){if(t&&("object"==Z(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)}(e,F()?Reflect.construct(t,n||[],G(e).constructor):t.apply(e,n))}(this,t,[e])).editable=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Y(e,t)}(t,e),n=t,S=[{key:"name",get:function(){return"EditInteractiveView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editInteractive"}},{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.interactiveId)}},{key:"template",get:function(){return Q()}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1,partialLoading:y.LP.Breadcrumbs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:y.LP.EditInteractiveDetails}}}},{key:"initialize",value:function(){this.navLock=l.u.getInstance(b.K9.NavLock,this),this.initDataListeners(),k.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=l.u.getInstance(b.Or.Video,this),this.alertService=l.u.getInstance(b.K9.Alerts,this)}},{key:"initDataListeners",value:function(){this.listenTo(r.G.SHELL,d.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(b.Vk.VIDEO,"".concat(b.M_.INTERACTIVES,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(b.Vk.VIDEO,"".concat(b.M_.INTERACTIVES,":").concat(this.options.interactiveId,":error"),this.onError),this.listenTo(this.channelName,B.NT.Save,this.onSave),this.listenTo(this.channelName,B.NT.Undo,this.onUndo)}},{key:"onError",value:function(e){switch(e.type){case a.h.NotFound:d.Q.Ry.throw(new R.l);break;case a.h.Forbidden:d.Q.Ry.throw(new M.a)}}},{key:"saveVideo",value:function(e,t){var n=this,o=e.dataChanges;if(i.isEmpty(o))t(e);else{var r=e.dataChanges;this.videoDataService.updateInteractive(this.model.get("id"),this.folder.get("id"),r,(function(o){n.videoDataService.clearVideoCache(),e.updatedVideo=i.extend({},e.updatedVideo||{},o),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(B.NT.DisableSave),this.logEditAction(e.dataChanges,h.eu.Save);var t=p.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Interactive was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(B.NT.CancelSave),!1;var e=A.xC.getChanges(this.model,this.viewModel),t=A.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!i.keys(t).length)return this.updateSaveButton(B.NT.CancelSave),!1;var n=new d.Q.dM;return this.editable&&n.useAsync(i.bind(this.saveVideo,this)),n.useAsync(i.bind(this.afterSave,this)),n.goAsync({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new k.Mr({title:u.T.getPhrase(this.lang,"undoTitle"),text:u.T.getPhrase(this.lang,"undoBody",{interactiveName:this.model.get("name")}),buttons:[{text:u.T.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:u.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}]}).render().done((function(){e.logEditAction({},h.eu.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),A.xC.updateModelState(this.model,this.viewModel,e),c.r.clear(this.viewModelName),this.getViewModel(),this.renderContent()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).undo;this.stopListening(this.viewModel),c.r.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),e&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:u.T.getPhrase(this.lang,"navLockHeading"),text:u.T.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{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()){if(!A.xC.getChanges(this.model,this.viewModel)&&!i.keys(A.xC.getRemovedObjectIds(this.model,this.viewModel)).length)return this.unlockNav(),void this.updateSaveButton(B.NT.DisableSave);this.lockNav(),this.updateSaveButton(B.NT.EnableSave)}else this.updateSaveButton(B.NT.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=o.Radio.channel(this.channelName),n=B.NT.EnableSave,i=B.NT.DisableSave,r=B.NT.CancelSave;switch(e){case n:return void t.trigger(n);case i:return void t.trigger(i);case r:return void t.trigger(r)}d.Q.Ry.throw(new s.H("Save action type is not valid."))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);f.k.logUserAction(n,{actionType:h.Vw.Edit,entity:h.py.Interactive,location:h.LZ.EditInteractiveVideoDetails,workflowPhase:t})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.viewModel=c.r.get(this.viewModelName,this.model.toJSON(),{ctor:m.v}),this.editable&&this.viewModel.addValidation(A.B9),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange)}},{key:"fetchData",value:function(){this.model=this.videoDataService.getInteractive(this.options.interactiveId),this.model&&(this.editable=k.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.viewModel instanceof m.v||this.getViewModel())}},{key:"requiredResources",get:function(){return{config:g.p.config,currentUser:w.K.currentUser,libraries:L.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.viewModel}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.showChildView("breadcrumbs",new v.n({folder:this.folder,libraries:this.libraries,video:this.model,enableLastItemAppLink:!1}))}},{key:"renderContent",value:function(){var e=A.xC.getChanges(this.model,this.viewModel)||i.keys(A.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new D({model:this.viewModel,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderContent()}}],S&&z(n.prototype,S),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,S}(d.Q.G7)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return N}});var o=n(31647),i=n(57098),r=n(22557),a=n(86363),s=n.n(a);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function 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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function d(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}function h(e,t,n){return t=v(t),function(e,t){if(t&&("object"==l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}var m=function(e){function t(){return u(this,t),h(this,t,arguments)}return b(t,e),d(t,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return s()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var e="breadcrumb-item";return this.model.get("active")&&(e+=" active"),e}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}])}(o.Q.wA),g=function(e){function t(){return u(this,t),h(this,t,arguments)}return b(t,e),d(t,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return m}}])}(o.Q.$W),w=n(93933),k=n.n(w);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function E(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(o.key),o)}}function O(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}var N=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=T(t),function(e,t){if(t&&("object"==S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,C()?Reflect.construct(t,n||[],T(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&j(e,t)}(t,e),n=t,(a=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return k()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var e=this;this.breadcrumbCollection=new o.Q.FE([]);var t,n=this.options.folder;do{if(!n)break;if(t=r.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!t),{at:0}),!t)break;n=t}while(t);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:i.OV.LIBRARY_EDITOR,action:i.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(t){return e.breadcrumbCollection.add(t)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?i.eX.LibraryEditor.FOLDER:i.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:i.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new g({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&E(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a}(o.Q.wA)},49965:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info rounded fw-semibold">\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(2,i,0),inverse:e.program(4,i,0),data:i}))?r:"")+" </p>\n"},2: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"},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||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="row">\n <div class="left-pane col-4">\n <div class="thumbnail-region"></div>\n </div>\n <div class="right-pane col-8">\n'+(null!=(r=n.unless.call(null!=t?t:e.nullContext||{},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 class="top-save-region"></div>\n <div class="basic-info-region mb-4"></div> \n <div class="bottom-save-region"></div>\n </div>\n</div>'},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-secondary 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})},44665: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="row pb-3 border-bottom">\n <h1 class="h3">'+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)+'</h1>\n\n <div class="breadcrumbs-region"></div>\n</div>\n<div class="edit-content-region"></div>'},useData:!0})},86363: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,'<span class="fw-bolder">'+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)+"</span>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<a>"+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)+"</a>\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.isActive:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:""},useData:!0})},93933: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'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})}}]);
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1876],{74250:function(e,t,n){"use strict";n.d(t,{z:function(){return g}});var o=n(43823),i=n(57857),r=n(31647),a=n(88172),s=n(93569),l=n(40622),u=n(99724),c=n.n(u),d={saveButton:"G_FDK",undo:"dcV70"};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,n){return(t=v(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,v(o.key),o)}}function v(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=f(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}var g=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=y(t),function(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)}(e,b()?Reflect.construct(t,n||[],y(e).constructor):t.apply(e,n))}(this,t,[e])}return 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)}(t,e),n=t,u=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return o.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(){this.model||(this.model=new r.Q.Hn(h(h({},a.ZV.ShowSpinner,this.options.showSpinner),a.ZV.Disabled,this.options.isDisabled)));var e=this.options.channelName;this.listenTo(e,l.NT.DisableSave,this.onDisableSave),this.listenTo(e,l.NT.EnableSave,this.onEnableSave),this.listenTo(e,l.NT.CancelSave,this.onCancelSave);var t=o.Radio.channel(this.getSaveChannelName());this.listenTo(t,l.NT.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(a.ZV.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(a.ZV.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(a.ZV.ShowSpinner)&&this.model.set(a.ZV.ShowSpinner,!1,{silent:!0}),this.model.set(a.ZV.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(l.NT.Undo)}},{key:"onSave",value:function(){this.model.set(a.ZV.ShowSpinner,!0),this.getParentChannel().trigger(l.NT.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:d}}},{key:"renderSaveButton",value:function(){var e=new a.Py({saveEvent:l.NT.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:i.T.getPhrase(this.lang,"save"),extraButtonClass:"btn-dark ".concat(d.saveButton),spinnerOptions:{size:s.Ey.Small,type:s.dR.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}],u&&p(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Q.wA)},18007:function(e,t,n){"use strict";n.r(t),n.d(t,{EditInteractiveView:function(){return H}});var o=n(43823),i=n(21161),r=n(25417),a=n(99748),s=n(11306),l=n(21679),u=n(57857),c=n(99249),d=n(31647),f=n(52076),h=n(70065),p=n(13156),v=n(57085),b=n(57098),y=n(29457),m=n(86205),g=n(48404),w=n(19226),k=n(93569),S=n(88483),E=n(2772),O=n(72998),C=n(74250),T=n(49965),j=n.n(T);function N(e){return N="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},N(e)}function P(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_(o.key),o)}}function _(e){var t=function(e){if("object"!=N(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==N(t)?t:t+""}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function x(e){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},x(e)}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}var D=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=x(t),function(e,t){if(t&&("object"==N(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)}(e,I()?Reflect.construct(t,n||[],x(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&V(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"EditInteractiveDetailsComponent"}},{key:"className",get:function(){return"edit-interactive-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editInteractiveDetails"}},{key:"template",get:function(){return j()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:b.OV.LIBRARY_EDITOR,action:b.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.get("id"),this.model.get("typeId")]}}}},{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}}}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new C.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"})),this.showChildView("bottomSave",new C.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new O.J({model:this.model,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new E.Z({model:this.model,thumbnail:k.M2.getThumbnail(this.model),thumbnailOptions:{size:S.h2.Medium},duration:k.M2.getDuration(this.model),durationNewStyle:!0}))}},{key:"viewOptions",value:function(){return{editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:k.M2.isExchangeVideo(this.model)}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail()}}])&&P(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),B=n(40622),M=n(53854),R=n(75535),L=n(95061),A=n(57785),U=n(44665),Q=n.n(U);function Z(e){return Z="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},Z(e)}function z(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,K(o.key),o)}}function K(e){var t=function(e){if("object"!=Z(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Z(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Z(t)?t:t+""}function F(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(F=function(){return!!e})()}function G(e){return G=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},G(e)}function Y(e,t){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Y(e,t)}var H=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=G(t),function(e,t){if(t&&("object"==Z(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)}(e,F()?Reflect.construct(t,n||[],G(e).constructor):t.apply(e,n))}(this,t,[e])).editable=!1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Y(e,t)}(t,e),n=t,S=[{key:"name",get:function(){return"EditInteractiveView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editInteractive"}},{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.interactiveId)}},{key:"template",get:function(){return Q()}},{key:"regions",value:function(){return{breadcrumbs:{el:".breadcrumbs-region",replaceElement:!1,partialLoading:y.LP.Breadcrumbs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:y.LP.EditInteractiveDetails}}}},{key:"initialize",value:function(){this.navLock=l.u.getInstance(b.K9.NavLock,this),this.initDataListeners(),k.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=l.u.getInstance(b.Or.Video,this),this.alertService=l.u.getInstance(b.K9.Alerts,this)}},{key:"initDataListeners",value:function(){this.listenTo(r.G.SHELL,d.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(b.Vk.VIDEO,"".concat(b.M_.INTERACTIVES,":").concat(this.options.interactiveId,":sync"),this.render),this.listenTo(b.Vk.VIDEO,"".concat(b.M_.INTERACTIVES,":").concat(this.options.interactiveId,":error"),this.onError),this.listenTo(this.channelName,B.NT.Save,this.onSave),this.listenTo(this.channelName,B.NT.Undo,this.onUndo)}},{key:"onError",value:function(e){switch(e.type){case a.h.NotFound:d.Q.Ry.throw(new R.l);break;case a.h.Forbidden:d.Q.Ry.throw(new M.a)}}},{key:"saveVideo",value:function(e,t){var n=this,o=e.dataChanges;if(i.isEmpty(o))t(e);else{var r=e.dataChanges;this.videoDataService.updateInteractive(this.model.get("id"),this.folder.get("id"),r,(function(o){n.videoDataService.clearVideoCache(),e.updatedVideo=i.extend({},e.updatedVideo||{},o),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(B.NT.DisableSave),this.logEditAction(e.dataChanges,h.eu.Save);var t=p.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Interactive was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(B.NT.CancelSave),!1;var e=A.xC.getChanges(this.model,this.viewModel),t=A.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!i.keys(t).length)return this.updateSaveButton(B.NT.CancelSave),!1;var n=new d.Q.dM;return this.editable&&n.useAsync(i.bind(this.saveVideo,this)),n.useAsync(i.bind(this.afterSave,this)),n.goAsync({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new k.Mr({title:u.T.getPhrase(this.lang,"undoTitle"),text:u.T.getPhrase(this.lang,"undoBody",{interactiveName:this.model.get("name")}),buttons:[{text:u.T.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:u.T.getPhrase(this.lang,"cancel"),className:"btn btn-link",close:!0}]}).render().done((function(){e.logEditAction({},h.eu.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),A.xC.updateModelState(this.model,this.viewModel,e),c.r.clear(this.viewModelName),this.getViewModel(),this.renderContent()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).undo;this.stopListening(this.viewModel),c.r.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),e&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:u.T.getPhrase(this.lang,"navLockHeading"),text:u.T.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{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()){if(!A.xC.getChanges(this.model,this.viewModel)&&!i.keys(A.xC.getRemovedObjectIds(this.model,this.viewModel)).length)return this.unlockNav(),void this.updateSaveButton(B.NT.DisableSave);this.lockNav(),this.updateSaveButton(B.NT.EnableSave)}else this.updateSaveButton(B.NT.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=o.Radio.channel(this.channelName),n=B.NT.EnableSave,i=B.NT.DisableSave,r=B.NT.CancelSave;switch(e){case n:return void t.trigger(n);case i:return void t.trigger(i);case r:return void t.trigger(r)}d.Q.Ry.throw(new s.H("Save action type is not valid."))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);f.k.logUserAction(n,{actionType:h.Vw.Edit,entity:h.py.Interactive,location:h.LZ.EditInteractiveVideoDetails,workflowPhase:t})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.viewModel=c.r.get(this.viewModelName,this.model.toJSON(),{ctor:m.v}),this.editable&&this.viewModel.addValidation(A.B9),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange)}},{key:"fetchData",value:function(){this.model=this.videoDataService.getInteractive(this.options.interactiveId),this.model&&(this.editable=k.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.viewModel instanceof m.v||this.getViewModel())}},{key:"requiredResources",get:function(){return{config:g.p.config,currentUser:w.K.currentUser,libraries:L.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.viewModel}},{key:"renderBreadcrumbs",value:function(){this.folder&&this.showChildView("breadcrumbs",new v.n({folder:this.folder,libraries:this.libraries,video:this.model,enableLastItemAppLink:!1}))}},{key:"renderContent",value:function(){var e=A.xC.getChanges(this.model,this.viewModel)||i.keys(A.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new D({model:this.viewModel,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"onRender",value:function(){this.renderBreadcrumbs(),this.renderContent()}}],S&&z(n.prototype,S),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,S}(d.Q.G7)},57085:function(e,t,n){"use strict";n.d(t,{n:function(){return N}});var o=n(31647),i=n(57098),r=n(22557),a=n(86363),s=n.n(a);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function 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 o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,f(o.key),o)}}function d(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function f(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}function h(e,t,n){return t=v(t),function(e,t){if(t&&("object"==l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function b(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}var m=function(e){function t(){return u(this,t),h(this,t,arguments)}return b(t,e),d(t,[{key:"name",get:function(){return"BreadcrumbItemComponent"}},{key:"template",get:function(){return s()}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var e="breadcrumb-item";return this.model.get("active")&&(e+=" active"),e}},{key:"attributes",get:function(){return this.model.get("active")?{"aria-current":"page"}:{}}},{key:"appLinks",get:function(){return this.model.get("active")?{}:{a:this.model.get("appLink")}}},{key:"viewOptions",value:function(){return{isActive:this.model.get("active")}}}])}(o.Q.wA),g=function(e){function t(){return u(this,t),h(this,t,arguments)}return b(t,e),d(t,[{key:"name",get:function(){return"BreadcrumbComponentCollection"}},{key:"tagName",get:function(){return"ol"}},{key:"className",get:function(){return"breadcrumb m-0 p-0"}},{key:"childView",get:function(){return m}}])}(o.Q.$W),w=n(93933),k=n.n(w);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function E(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(o.key),o)}}function O(e){var t=function(e){if("object"!=S(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=S(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}var N=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=T(t),function(e,t){if(t&&("object"==S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,C()?Reflect.construct(t,n||[],T(e).constructor):t.apply(e,n))}(this,t,[e])}return 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&&j(e,t)}(t,e),n=t,(a=[{key:"initialize",value:function(){this.getBreadcrumbs()}},{key:"name",get:function(){return"BreadcrumbsComponent"}},{key:"template",get:function(){return k()}},{key:"className",get:function(){return"d-inline-block"}},{key:"regions",value:function(){return{breadcrumbs:".breadcrumbs-region"}}},{key:"defaults",get:function(){return{customBreadcrumbs:[]}}},{key:"getBreadcrumbs",value:function(){var e=this;this.breadcrumbCollection=new o.Q.FE([]);var t,n=this.options.folder;do{if(!n)break;if(t=r.P.getParent(n.id,this.options.libraries),this.breadcrumbCollection.add(this.getBreadcrumb(n,!!t),{at:0}),!t)break;n=t}while(t);this.options.video&&this.breadcrumbCollection.add({name:this.options.video.get("name"),appLink:{application:i.OV.LIBRARY_EDITOR,action:i.eX.LibraryEditor.VIDEO_DETAILS,args:[this.options.video.id]}}),this.options.customBreadcrumbs&&this.options.customBreadcrumbs.forEach((function(t){return e.breadcrumbCollection.add(t)})),this.breadcrumbCollection.length&&this.breadcrumbCollection.last().set("active",!this.options.enableLastItemAppLink)}},{key:"getBreadcrumb",value:function(e,t){var n=t?i.eX.LibraryEditor.FOLDER:i.eX.LibraryEditor.LIBRARY;return{name:e.get("name"),appLink:{application:i.OV.LIBRARY_EDITOR,action:n,args:[e.id]}}}},{key:"onRender",value:function(){var e=new g({collection:this.breadcrumbCollection});this.showChildView("breadcrumbs",e)}}])&&E(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a}(o.Q.wA)},49965:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info rounded fw-semibold">\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(2,i,0),inverse:e.program(4,i,0),data:i}))?r:"")+" </p>\n"},2: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"},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||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="row">\n <div class="left-pane col-4">\n <div class="thumbnail-region"></div>\n </div>\n <div class="right-pane col-8">\n'+(null!=(r=n.unless.call(null!=t?t:e.nullContext||{},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 class="top-save-region"></div>\n <div class="basic-info-region mb-4"></div> \n <div class="bottom-save-region"></div>\n </div>\n</div>'},useData:!0})},99724:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-secondary 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})},44665:function(e,t,n){var o=n(31197);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="row pb-3 border-bottom">\n <h1 class="h3">'+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)+'</h1>\n\n <div class="breadcrumbs-region"></div>\n</div>\n<div class="edit-content-region"></div>'},useData:!0})},86363:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<span class="fw-bolder">'+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)+"</span>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<a>"+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)+"</a>\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.isActive:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?r:""},useData:!0})},93933:function(e,t,n){var o=n(31197);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<nav class="breadcrumbs-region" aria-label="breadcrumb"></nav>'},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1973],{51541:function(e,t,n){"use strict";t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==c(e)&&"function"!=typeof e)return{default:e};var t=l();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(32735)),o=a(n(60216)),i=a(n(19897)),u=a(n(73355)),s=n(42662);function a(e){return e&&e.__esModule?e:{default:e}}function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return 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){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=function(){return!0},v="suggestions-revealed",S="input-focused",w="input-changed",O="escape-pressed",I=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(l,e);var t,n,o,a=(o=l,function(){var e,t=h(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?d(e):t}(this,e)});function l(e){var t,n=e.alwaysRenderSuggestions;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),y(d(t=a.call(this)),"onDocumentMouseDown",(function(e){t.justClickedOnSuggestionsContainer=!1;for(var n=e.detail&&e.detail.target||e.target;null!==n&&n!==document;){if(n.getAttribute&&null!==n.getAttribute("data-suggestion-index"))return;if(n===t.suggestionsContainer)return void(t.justClickedOnSuggestionsContainer=!0);n=n.parentNode}})),y(d(t),"storeAutowhateverRef",(function(e){null!==e&&(t.autowhatever=e)})),y(d(t),"onSuggestionMouseEnter",(function(e,n){var r=n.sectionIndex,o=n.itemIndex;t.updateHighlightedSuggestion(r,o),e.target===t.pressedSuggestion&&(t.justSelectedSuggestion=!0),t.justMouseEntered=!0,setTimeout((function(){t.justMouseEntered=!1}))})),y(d(t),"highlightFirstSuggestion",(function(){t.updateHighlightedSuggestion(t.props.multiSection?0:null,0)})),y(d(t),"onDocumentMouseUp",(function(){t.pressedSuggestion&&!t.justSelectedSuggestion&&t.input.focus(),t.pressedSuggestion=null})),y(d(t),"onSuggestionMouseDown",(function(e){t.justSelectedSuggestion||(t.justSelectedSuggestion=!0,t.pressedSuggestion=e.target)})),y(d(t),"onSuggestionsClearRequested",(function(){var e=t.props.onSuggestionsClearRequested;e&&e()})),y(d(t),"onSuggestionSelected",(function(e,n){var r=t.props,o=r.alwaysRenderSuggestions,i=r.onSuggestionSelected,u=r.onSuggestionsFetchRequested;i&&i(e,n);var s=t.props.shouldKeepSuggestionsOnSelect(n.suggestion);o||s?u({value:n.suggestionValue,reason:"suggestion-selected"}):t.onSuggestionsClearRequested(),t.resetHighlightedSuggestion()})),y(d(t),"onSuggestionClick",(function(e){var n=t.props,r=n.alwaysRenderSuggestions,o=n.focusInputOnSuggestionClick,i=t.getSuggestionIndices(t.findSuggestionElement(e.target)),u=i.sectionIndex,s=i.suggestionIndex,a=t.getSuggestion(u,s),l=t.props.getSuggestionValue(a);t.maybeCallOnChange(e,l,"click"),t.onSuggestionSelected(e,{suggestion:a,suggestionValue:l,suggestionIndex:s,sectionIndex:u,method:"click"});var c=t.props.shouldKeepSuggestionsOnSelect(a);r||c||t.closeSuggestions(),!0===o?t.input.focus():t.onBlur(),setTimeout((function(){t.justSelectedSuggestion=!1}))})),y(d(t),"onBlur",(function(){var e=t.props,n=e.inputProps,r=e.shouldRenderSuggestions,o=n.value,i=n.onBlur,u=t.getHighlightedSuggestion(),s=r(o,"input-blurred");t.setState({isFocused:!1,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!s}),i&&i(t.blurEvent,{highlightedSuggestion:u})})),y(d(t),"onSuggestionMouseLeave",(function(e){t.resetHighlightedSuggestion(!1),t.justSelectedSuggestion&&e.target===t.pressedSuggestion&&(t.justSelectedSuggestion=!1)})),y(d(t),"onSuggestionTouchStart",(function(){t.justSelectedSuggestion=!0})),y(d(t),"onSuggestionTouchMove",(function(){t.justSelectedSuggestion=!1,t.pressedSuggestion=null,t.input.focus()})),y(d(t),"itemProps",(function(e){return{"data-section-index":e.sectionIndex,"data-suggestion-index":e.itemIndex,onMouseEnter:t.onSuggestionMouseEnter,onMouseLeave:t.onSuggestionMouseLeave,onMouseDown:t.onSuggestionMouseDown,onTouchStart:t.onSuggestionTouchStart,onTouchMove:t.onSuggestionTouchMove,onClick:t.onSuggestionClick}})),y(d(t),"renderSuggestionsContainer",(function(e){var n=e.containerProps,r=e.children;return(0,t.props.renderSuggestionsContainer)({containerProps:n,children:r,query:t.getQuery()})})),t.state={isFocused:!1,isCollapsed:!n,highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null},t.justPressedUpDown=!1,t.justMouseEntered=!1,t.pressedSuggestion=null,t}return t=l,n=[{key:"componentDidMount",value:function(){document.addEventListener("mousedown",this.onDocumentMouseDown),document.addEventListener("mouseup",this.onDocumentMouseUp),this.input=this.autowhatever.input,this.suggestionsContainer=this.autowhatever.itemsContainer}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){var t=0===this.state.highlightedSuggestionIndex&&this.props.highlightFirstSuggestion&&!e.highlightFirstSuggestion;(0,i.default)(e.suggestions,this.props.suggestions)?e.highlightFirstSuggestion&&e.suggestions.length>0&&!1===this.justPressedUpDown&&!1===this.justMouseEntered?this.highlightFirstSuggestion():t&&this.resetHighlightedSuggestion():this.willRenderSuggestions(e,"suggestions-updated")?(this.state.isCollapsed&&!this.justSelectedSuggestion&&this.revealSuggestions(),t&&this.resetHighlightedSuggestion()):this.resetHighlightedSuggestion()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.suggestions,o=n.onSuggestionHighlighted,u=n.highlightFirstSuggestion;if(!(0,i.default)(r,e.suggestions)&&r.length>0&&u)this.highlightFirstSuggestion();else if(o){var s=this.getHighlightedSuggestion();s!=t.highlightedSuggestion&&o({suggestion:s})}}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousedown",this.onDocumentMouseDown),document.removeEventListener("mouseup",this.onDocumentMouseUp)}},{key:"updateHighlightedSuggestion",value:function(e,t,n){var r=this;this.setState((function(o){var i=o.valueBeforeUpDown;return null===t?i=null:null===i&&void 0!==n&&(i=n),{highlightedSectionIndex:e,highlightedSuggestionIndex:t,highlightedSuggestion:null===t?null:r.getSuggestion(e,t),valueBeforeUpDown:i}}))}},{key:"resetHighlightedSuggestion",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.setState((function(t){var n=t.valueBeforeUpDown;return{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:e?null:n}}))}},{key:"revealSuggestions",value:function(){this.setState({isCollapsed:!1})}},{key:"closeSuggestions",value:function(){this.setState({highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null,valueBeforeUpDown:null,isCollapsed:!0})}},{key:"getSuggestion",value:function(e,t){var n=this.props,r=n.suggestions,o=n.multiSection,i=n.getSectionSuggestions;return o?i(r[e])[t]:r[t]}},{key:"getHighlightedSuggestion",value:function(){var e=this.state,t=e.highlightedSectionIndex,n=e.highlightedSuggestionIndex;return null===n?null:this.getSuggestion(t,n)}},{key:"getSuggestionValueByIndex",value:function(e,t){return(0,this.props.getSuggestionValue)(this.getSuggestion(e,t))}},{key:"getSuggestionIndices",value:function(e){var t=e.getAttribute("data-section-index"),n=e.getAttribute("data-suggestion-index");return{sectionIndex:"string"==typeof t?parseInt(t,10):null,suggestionIndex:parseInt(n,10)}}},{key:"findSuggestionElement",value:function(e){var t=e;do{if(t.getAttribute&&null!==t.getAttribute("data-suggestion-index"))return t;t=t.parentNode}while(null!==t);throw console.error("Clicked element:",e),new Error("Couldn't find suggestion element")}},{key:"maybeCallOnChange",value:function(e,t,n){var r=this.props.inputProps,o=r.value,i=r.onChange;t!==o&&i(e,{newValue:t,method:n})}},{key:"willRenderSuggestions",value:function(e,t){var n=e.suggestions,r=e.inputProps,o=e.shouldRenderSuggestions,i=r.value;return n.length>0&&o(i,t)}},{key:"getQuery",value:function(){var e=this.props.inputProps.value,t=this.state.valueBeforeUpDown;return(null===t?e:t).trim()}},{key:"render",value:function(){var e=this,t=this.props,n=t.suggestions,o=t.renderInputComponent,i=t.onSuggestionsFetchRequested,a=t.renderSuggestion,l=t.inputProps,c=t.multiSection,f=t.renderSectionTitle,p=t.id,d=t.getSectionSuggestions,h=t.theme,m=t.getSuggestionValue,y=t.alwaysRenderSuggestions,I=t.highlightFirstSuggestion,j=t.containerProps,P=this.state,k=P.isFocused,_=P.isCollapsed,x=P.highlightedSectionIndex,C=P.highlightedSuggestionIndex,D=P.valueBeforeUpDown,R=y?b:this.props.shouldRenderSuggestions,E=l.value,M=l.onFocus,T=l.onKeyDown,q=this.willRenderSuggestions(this.props,"render"),H=y||k&&!_&&q,F=H?n:[],A=g({},l,{onFocus:function(t){if(!e.justSelectedSuggestion&&!e.justClickedOnSuggestionsContainer){var n=R(E,S);e.setState({isFocused:!0,isCollapsed:!n}),M&&M(t),n&&i({value:E,reason:S})}},onBlur:function(t){e.justClickedOnSuggestionsContainer?e.input.focus():(e.blurEvent=t,e.justSelectedSuggestion||(e.onBlur(),e.onSuggestionsClearRequested()))},onChange:function(t){var n=t.target.value,r=R(n,w);e.maybeCallOnChange(t,n,"type"),e.suggestionsContainer&&(e.suggestionsContainer.scrollTop=0),e.setState(g({},I?{}:{highlightedSectionIndex:null,highlightedSuggestionIndex:null,highlightedSuggestion:null},{valueBeforeUpDown:null,isCollapsed:!r})),r?i({value:n,reason:w}):e.onSuggestionsClearRequested()},onKeyDown:function(t,r){var o=t.keyCode;switch(o){case 40:case 38:if(_)R(E,v)&&(i({value:E,reason:v}),e.revealSuggestions(),t.preventDefault());else if(n.length>0){var u,s=r.newHighlightedSectionIndex,a=r.newHighlightedItemIndex;u=null===a?null===D?E:D:e.getSuggestionValueByIndex(s,a),e.updateHighlightedSuggestion(s,a,E),e.maybeCallOnChange(t,u,40===o?"down":"up"),t.preventDefault()}e.justPressedUpDown=!0,setTimeout((function(){e.justPressedUpDown=!1}));break;case 13:if(229===t.keyCode)break;var l=e.getHighlightedSuggestion();if(H&&!y&&e.closeSuggestions(),null!=l){t.preventDefault();var c=m(l);e.maybeCallOnChange(t,c,"enter"),e.onSuggestionSelected(t,{suggestion:l,suggestionValue:c,suggestionIndex:C,sectionIndex:x,method:"enter"}),e.justSelectedSuggestion=!0,setTimeout((function(){e.justSelectedSuggestion=!1}))}break;case 27:H&&t.preventDefault();var f=H&&!y;null===D?f||(e.maybeCallOnChange(t,"","escape"),R("",O)?i({value:"",reason:O}):e.onSuggestionsClearRequested()):e.maybeCallOnChange(t,D,"escape"),f?(e.onSuggestionsClearRequested(),e.closeSuggestions()):e.resetHighlightedSuggestion()}T&&T(t)}}),U={query:this.getQuery()};return r.default.createElement(u.default,{multiSection:c,items:F,renderInputComponent:o,renderItemsContainer:this.renderSuggestionsContainer,renderItem:a,renderItemData:U,renderSectionTitle:f,getSectionItems:d,highlightedSectionIndex:x,highlightedItemIndex:C,containerProps:j,inputProps:A,itemProps:this.itemProps,theme:(0,s.mapToAutowhateverTheme)(h),id:p,ref:this.storeAutowhateverRef})}}],n&&p(t.prototype,n),l}(r.Component);t.default=I,y(I,"propTypes",{suggestions:o.default.array.isRequired,onSuggestionsFetchRequested:function(e,t){if("function"!=typeof e[t])throw new Error("'onSuggestionsFetchRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsFetchRequestedProp")},onSuggestionsClearRequested:function(e,t){var n=e[t];if(!1===e.alwaysRenderSuggestions&&"function"!=typeof n)throw new Error("'onSuggestionsClearRequested' must be implemented. See: https://github.com/moroshko/react-autosuggest#onSuggestionsClearRequestedProp")},shouldKeepSuggestionsOnSelect:o.default.func,onSuggestionSelected:o.default.func,onSuggestionHighlighted:o.default.func,renderInputComponent:o.default.func,renderSuggestionsContainer:o.default.func,getSuggestionValue:o.default.func.isRequired,renderSuggestion:o.default.func.isRequired,inputProps:function(e,t){var n=e[t];if(!n)throw new Error("'inputProps' must be passed.");if(!Object.prototype.hasOwnProperty.call(n,"value"))throw new Error("'inputProps' must have 'value'.");if(!Object.prototype.hasOwnProperty.call(n,"onChange"))throw new Error("'inputProps' must have 'onChange'.")},shouldRenderSuggestions:o.default.func,alwaysRenderSuggestions:o.default.bool,multiSection:o.default.bool,renderSectionTitle:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'renderSectionTitle' must be implemented. See: https://github.com/moroshko/react-autosuggest#renderSectionTitleProp")},getSectionSuggestions:function(e,t){var n=e[t];if(!0===e.multiSection&&"function"!=typeof n)throw new Error("'getSectionSuggestions' must be implemented. See: https://github.com/moroshko/react-autosuggest#getSectionSuggestionsProp")},focusInputOnSuggestionClick:o.default.bool,highlightFirstSuggestion:o.default.bool,theme:o.default.object,id:o.default.string,containerProps:o.default.object}),y(I,"defaultProps",{renderSuggestionsContainer:function(e){var t=e.containerProps,n=e.children;return r.default.createElement("div",t,n)},shouldRenderSuggestions:function(e){return e.trim().length>0},alwaysRenderSuggestions:!1,multiSection:!1,shouldKeepSuggestionsOnSelect:function(){return!1},focusInputOnSuggestionClick:!0,highlightFirstSuggestion:!1,theme:s.defaultTheme,id:"1",containerProps:{}})},73355:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==d(e)&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(32735)),o=l(n(60216)),i=l(n(91661)),u=l(n(97818)),s=l(n(16054)),a=l(n(57331));function l(e){return e&&e.__esModule?e:{default:e}}function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){v(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(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 d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function b(e,t){return b=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},b(e,t)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var S={},w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&b(e,t)}(c,e);var t,n,o,l=(o=c,function(){var e,t=y(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var n=y(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?m(e):t}(this,e)});function c(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),v(m(t=l.call(this,e)),"storeInputReference",(function(e){null!==e&&(t.input=e);var n=t.props.inputProps.ref;n&&("function"==typeof n?n(e):"object"===d(n)&&Object.prototype.hasOwnProperty.call(n,"current")&&(n.current=e))})),v(m(t),"storeItemsContainerReference",(function(e){null!==e&&(t.itemsContainer=e)})),v(m(t),"onHighlightedItemChange",(function(e){t.highlightedItem=e})),v(m(t),"getItemId",(function(e,n){if(null===n)return null;var r=t.props.id,o=null===e?"":"section-".concat(e);return"react-autowhatever-".concat(r,"-").concat(o,"-item-").concat(n)})),v(m(t),"onFocus",(function(e){var n=t.props.inputProps;t.setState({isInputFocused:!0}),n.onFocus&&n.onFocus(e)})),v(m(t),"onBlur",(function(e){var n=t.props.inputProps;t.setState({isInputFocused:!1}),n.onBlur&&n.onBlur(e)})),v(m(t),"onKeyDown",(function(e){var n,r,o=t.props,i=o.inputProps,u=o.highlightedSectionIndex,s=o.highlightedItemIndex,a=e.keyCode;switch(a){case 40:case 38:var l=40===a?"next":"prev",c=(n=t.sectionIterator[l]([u,s]),r=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,o=!1,i=void 0;try{for(var u,s=e[Symbol.iterator]();!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}}(n,r)||function(e,t){if(e){if("string"==typeof e)return p(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(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(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.")}()),f=c[0],g=c[1];i.onKeyDown(e,{newHighlightedSectionIndex:f,newHighlightedItemIndex:g});break;default:i.onKeyDown(e,{highlightedSectionIndex:u,highlightedItemIndex:s})}})),t.highlightedItem=null,t.state={isInputFocused:!1},t.setSectionsItems(e),t.setSectionIterator(e),t.setTheme(e),t}return t=c,(n=[{key:"componentDidMount",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"UNSAFE_componentWillReceiveProps",value:function(e){e.items!==this.props.items&&this.setSectionsItems(e),e.items===this.props.items&&e.multiSection===this.props.multiSection||this.setSectionIterator(e),e.theme!==this.props.theme&&this.setTheme(e)}},{key:"componentDidUpdate",value:function(){this.ensureHighlightedItemIsVisible()}},{key:"setSectionsItems",value:function(e){e.multiSection&&(this.sectionsItems=e.items.map((function(t){return e.getSectionItems(t)})),this.sectionsLengths=this.sectionsItems.map((function(e){return e.length})),this.allSectionsAreEmpty=this.sectionsLengths.every((function(e){return 0===e})))}},{key:"setSectionIterator",value:function(e){this.sectionIterator=(0,i.default)({multiSection:e.multiSection,data:e.multiSection?this.sectionsLengths:e.items.length})}},{key:"setTheme",value:function(e){this.theme=(0,u.default)(e.theme)}},{key:"renderSections",value:function(){var e=this;if(this.allSectionsAreEmpty)return null;var t=this.theme,n=this.props,o=n.id,i=n.items,u=n.renderItem,l=n.renderItemData,c=n.renderSectionTitle,f=n.highlightedSectionIndex,g=n.highlightedItemIndex,p=n.itemProps;return i.map((function(n,i){var d="react-autowhatever-".concat(o,"-"),h="".concat(d,"section-").concat(i,"-"),m=0===i;return r.default.createElement("div",t("".concat(h,"container"),"sectionContainer",m&&"sectionContainerFirst"),r.default.createElement(s.default,{section:n,renderSectionTitle:c,theme:t,sectionKeyPrefix:h}),r.default.createElement(a.default,{items:e.sectionsItems[i],itemProps:p,renderItem:u,renderItemData:l,sectionIndex:i,highlightedItemIndex:f===i?g:null,onHighlightedItemChange:e.onHighlightedItemChange,getItemId:e.getItemId,theme:t,keyPrefix:d,ref:e.storeItemsListReference}))}))}},{key:"renderItems",value:function(){var e=this.props.items;if(0===e.length)return null;var t=this.theme,n=this.props,o=n.id,i=n.renderItem,u=n.renderItemData,s=n.highlightedSectionIndex,l=n.highlightedItemIndex,c=n.itemProps;return r.default.createElement(a.default,{items:e,itemProps:c,renderItem:i,renderItemData:u,highlightedItemIndex:null===s?l:null,onHighlightedItemChange:this.onHighlightedItemChange,getItemId:this.getItemId,theme:t,keyPrefix:"react-autowhatever-".concat(o,"-")})}},{key:"ensureHighlightedItemIsVisible",value:function(){var e=this.highlightedItem;if(e){var t=this.itemsContainer,n=e.offsetParent===t?e.offsetTop:e.offsetTop-t.offsetTop,r=t.scrollTop;n<r?r=n:n+e.offsetHeight>r+t.offsetHeight&&(r=n+e.offsetHeight-t.offsetHeight),r!==t.scrollTop&&(t.scrollTop=r)}}},{key:"render",value:function(){var e=this.theme,t=this.props,n=t.id,o=t.multiSection,i=t.renderInputComponent,u=t.renderItemsContainer,s=t.highlightedSectionIndex,a=t.highlightedItemIndex,l=this.state.isInputFocused,c=o?this.renderSections():this.renderItems(),f=null!==c,p=this.getItemId(s,a),d="react-autowhatever-".concat(n),h=g({role:"combobox","aria-haspopup":"listbox","aria-owns":d,"aria-expanded":f},e("react-autowhatever-".concat(n,"-container"),"container",f&&"containerOpen"),{},this.props.containerProps),m=i(g({type:"text",value:"",autoComplete:"off","aria-autocomplete":"list","aria-controls":d,"aria-activedescendant":p},e("react-autowhatever-".concat(n,"-input"),"input",f&&"inputOpen",l&&"inputFocused"),{},this.props.inputProps,{onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.props.inputProps.onKeyDown&&this.onKeyDown,ref:this.storeInputReference})),y=u({containerProps:g({id:d,role:"listbox"},e("react-autowhatever-".concat(n,"-items-container"),"itemsContainer",f&&"itemsContainerOpen"),{ref:this.storeItemsContainerReference}),children:c});return r.default.createElement("div",h,m,y)}}])&&h(t.prototype,n),c}(r.Component);t.default=w,v(w,"propTypes",{id:o.default.string,multiSection:o.default.bool,renderInputComponent:o.default.func,renderItemsContainer:o.default.func,items:o.default.array.isRequired,renderItem:o.default.func,renderItemData:o.default.object,renderSectionTitle:o.default.func,getSectionItems:o.default.func,containerProps:o.default.object,inputProps:o.default.object,itemProps:o.default.oneOfType([o.default.object,o.default.func]),highlightedSectionIndex:o.default.number,highlightedItemIndex:o.default.number,theme:o.default.oneOfType([o.default.object,o.default.array])}),v(w,"defaultProps",{id:"1",multiSection:!1,renderInputComponent:function(e){return r.default.createElement("input",e)},renderItemsContainer:function(e){var t=e.containerProps,n=e.children;return r.default.createElement("div",t,n)},renderItem:function(){throw new Error("`renderItem` must be provided")},renderItemData:S,renderSectionTitle:function(){throw new Error("`renderSectionTitle` must be provided")},getSectionItems:function(){throw new Error("`getSectionItems` must be provided")},containerProps:S,inputProps:S,itemProps:S,highlightedSectionIndex:null,highlightedItemIndex:null,theme:{container:"react-autowhatever__container",containerOpen:"react-autowhatever__container--open",input:"react-autowhatever__input",inputOpen:"react-autowhatever__input--open",inputFocused:"react-autowhatever__input--focused",itemsContainer:"react-autowhatever__items-container",itemsContainerOpen:"react-autowhatever__items-container--open",itemsList:"react-autowhatever__items-list",item:"react-autowhatever__item",itemFirst:"react-autowhatever__item--first",itemHighlighted:"react-autowhatever__item--highlighted",sectionContainer:"react-autowhatever__section-container",sectionContainerFirst:"react-autowhatever__section-container--first",sectionTitle:"react-autowhatever__section-title"}})},57824:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(32735)),o=u(n(60216)),i=u(n(30745));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}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 l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l.apply(this,arguments)}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(s,e);var t,n,o,u=(o=s,function(){var e,t=p(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?g(e):t}(this,e)});function s(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return h(g(e=u.call.apply(u,[this].concat(n))),"storeItemReference",(function(t){null!==t&&(e.item=t)})),h(g(e),"onMouseEnter",(function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseEnter(t,{sectionIndex:r,itemIndex:o})})),h(g(e),"onMouseLeave",(function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseLeave(t,{sectionIndex:r,itemIndex:o})})),h(g(e),"onMouseDown",(function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onMouseDown(t,{sectionIndex:r,itemIndex:o})})),h(g(e),"onClick",(function(t){var n=e.props,r=n.sectionIndex,o=n.itemIndex;e.props.onClick(t,{sectionIndex:r,itemIndex:o})})),e}return t=s,n=[{key:"shouldComponentUpdate",value:function(e){return(0,i.default)(e,this.props,["renderItemData"])}},{key:"render",value:function(){var e=this.props,t=e.isHighlighted,n=e.item,o=e.renderItem,i=e.renderItemData,u=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,["isHighlighted","item","renderItem","renderItemData"]);return delete u.sectionIndex,delete u.itemIndex,"function"==typeof u.onMouseEnter&&(u.onMouseEnter=this.onMouseEnter),"function"==typeof u.onMouseLeave&&(u.onMouseLeave=this.onMouseLeave),"function"==typeof u.onMouseDown&&(u.onMouseDown=this.onMouseDown),"function"==typeof u.onClick&&(u.onClick=this.onClick),r.default.createElement("li",l({role:"option"},u,{ref:this.storeItemReference}),o(n,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){h(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({isHighlighted:t},i)))}}],n&&f(t.prototype,n),s}(r.Component);t.default=m,h(m,"propTypes",{sectionIndex:o.default.number,isHighlighted:o.default.bool.isRequired,itemIndex:o.default.number.isRequired,item:o.default.any.isRequired,renderItem:o.default.func.isRequired,renderItemData:o.default.object.isRequired,onMouseEnter:o.default.func,onMouseLeave:o.default.func,onMouseDown:o.default.func,onClick:o.default.func})},57331:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==l(e)&&"function"!=typeof e)return{default:e};var t=a();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(32735)),o=s(n(60216)),i=s(n(57824)),u=s(n(30745));function s(e){return e&&e.__esModule?e:{default:e}}function a(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return a=function(){return e},e}function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},c.apply(this,arguments)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}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 p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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}}),t&&h(e,t)}(a,e);var t,n,o,s=(o=a,function(){var e,t=d(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var n=d(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==l(t)&&"function"!=typeof t?p(e):t}(this,e)});function a(){var e;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return m(p(e=s.call.apply(s,[this].concat(n))),"storeHighlightedItemReference",(function(t){e.props.onHighlightedItemChange(null===t?null:t.item)})),e}return t=a,n=[{key:"shouldComponentUpdate",value:function(e){return(0,u.default)(e,this.props,["itemProps"])}},{key:"render",value:function(){var e=this,t=this.props,n=t.items,o=t.itemProps,u=t.renderItem,s=t.renderItemData,a=t.sectionIndex,l=t.highlightedItemIndex,g=t.getItemId,p=t.theme,d=t.keyPrefix,h=null===a?d:"".concat(d,"section-").concat(a,"-"),y="function"==typeof o;return r.default.createElement("ul",c({role:"listbox"},p("".concat(h,"items-list"),"itemsList")),n.map((function(t,n){var d=0===n,b=n===l,v="".concat(h,"item-").concat(n),S=y?o({sectionIndex:a,itemIndex:n}):o,w=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:g(a,n),"aria-selected":b},p(v,"item",d&&"itemFirst",b&&"itemHighlighted"),{},S);return b&&(w.ref=e.storeHighlightedItemReference),r.default.createElement(i.default,c({},w,{sectionIndex:a,isHighlighted:b,itemIndex:n,item:t,renderItem:u,renderItemData:s}))})))}}],n&&g(t.prototype,n),a}(r.Component);t.default=y,m(y,"propTypes",{items:o.default.array.isRequired,itemProps:o.default.oneOfType([o.default.object,o.default.func]),renderItem:o.default.func.isRequired,renderItemData:o.default.object.isRequired,sectionIndex:o.default.number,highlightedItemIndex:o.default.number,onHighlightedItemChange:o.default.func.isRequired,getItemId:o.default.func.isRequired,theme:o.default.func.isRequired,keyPrefix:o.default.string.isRequired}),m(y,"defaultProps",{sectionIndex:null})},16054:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}(n(32735)),o=u(n(60216)),i=u(n(30745));function u(e){return e&&e.__esModule?e:{default:e}}function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}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 l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}var g,p,d,h=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(s,e);var t,n,o,u=(o=s,function(){var e,t=c(o);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),u.apply(this,arguments)}return t=s,(n=[{key:"shouldComponentUpdate",value:function(e){return(0,i.default)(e,this.props)}},{key:"render",value:function(){var e=this.props,t=e.section,n=e.renderSectionTitle,o=e.theme,i=e.sectionKeyPrefix,u=n(t);return u?r.default.createElement("div",o("".concat(i,"title"),"sectionTitle"),u):null}}])&&l(t.prototype,n),s}(r.Component);t.default=h,g=h,p="propTypes",d={section:o.default.any.isRequired,renderSectionTitle:o.default.func.isRequired,theme:o.default.func.isRequired,sectionKeyPrefix:o.default.string.isRequired},p in g?Object.defineProperty(g,p,{value:d,enumerable:!0,configurable:!0,writable:!0}):g[p]=d},30745:function(e,t){"use strict";function n(e){return n="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},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(e===t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!0;var u,s,a={};for(u=0,s=r.length;u<s;u++)a[r[u]]=!0;for(u=0,s=o.length;u<s;u++){var l=o[u],c=e[l],f=t[l];if(c!==f){if(!a[l]||null===c||null===f||"object"!==n(c)||"object"!==n(f))return!0;var g=Object.keys(c),p=Object.keys(f);if(g.length!==p.length)return!0;for(var d=0,h=g.length;d<h;d++){var m=g[d];if(c[m]!==f[m])return!0}}}return!1}},8952:function(e,t,n){"use strict";e.exports=n(51541).default},42662:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToAutowhateverTheme=t.defaultTheme=void 0,t.defaultTheme={container:"react-autosuggest__container",containerOpen:"react-autosuggest__container--open",input:"react-autosuggest__input",inputOpen:"react-autosuggest__input--open",inputFocused:"react-autosuggest__input--focused",suggestionsContainer:"react-autosuggest__suggestions-container",suggestionsContainerOpen:"react-autosuggest__suggestions-container--open",suggestionsList:"react-autosuggest__suggestions-list",suggestion:"react-autosuggest__suggestion",suggestionFirst:"react-autosuggest__suggestion--first",suggestionHighlighted:"react-autosuggest__suggestion--highlighted",sectionContainer:"react-autosuggest__section-container",sectionContainerFirst:"react-autosuggest__section-container--first",sectionTitle:"react-autosuggest__section-title"},t.mapToAutowhateverTheme=function(e){var t={};for(var n in e)switch(n){case"suggestionsContainer":t.itemsContainer=e[n];break;case"suggestionsContainerOpen":t.itemsContainerOpen=e[n];break;case"suggestion":t.item=e[n];break;case"suggestionFirst":t.itemFirst=e[n];break;case"suggestionHighlighted":t.itemHighlighted=e[n];break;case"suggestionsList":t.itemsList=e[n];break;default:t[n]=e[n]}return t}},97818:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var o,i=(o=n(91565))&&o.__esModule?o:{default:o},u=function(e){return e};t.default=function(e){var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var u,s=e[Symbol.iterator]();!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(Array.isArray(e)&&2===e.length?e:[e,null],2),n=t[0],o=t[1];return function(e){for(var t=arguments.length,s=Array(t>1?t-1:0),a=1;a<t;a++)s[a-1]=arguments[a];var l=s.map((function(e){return n[e]})).filter(u);return"string"==typeof l[0]||"function"==typeof o?{key:e,className:o?o.apply(void 0,r(l)):l.join(" ")}:{key:e,style:i.default.apply(void 0,[{}].concat(r(l)))}}},e.exports=t.default},91565:function(e){"use strict";var t=Object.prototype.propertyIsEnumerable;function n(e){var n=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(e))),n.filter((function(n){return t.call(e,n)}))}e.exports=Object.assign||function(e,t){for(var r,o,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){r=arguments[u],o=n(Object(r));for(var s=0;s<o.length;s++)i[o[s]]=r[o[s]]}return i}},91661:function(e){"use strict";var t=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var u,s=e[Symbol.iterator]();!(r=(u=s.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};e.exports=function(e){var n=e.data,r=e.multiSection;function o(e){var o=t(e,2),i=o[0],u=o[1];return r?null===u||u===n[i]-1?null===(i=function(e){for(null===e?e=0:e++;e<n.length&&0===n[e];)e++;return e===n.length?null:e}(i))?[null,null]:[i,0]:[i,u+1]:0===n||u===n-1?[null,null]:null===u?[null,0]:[null,u+1]}return{next:o,prev:function(e){var o=t(e,2),i=o[0],u=o[1];return r?null===u||0===u?null===(i=function(e){for(null===e?e=n.length-1:e--;e>=0&&0===n[e];)e--;return-1===e?null:e}(i))?[null,null]:[i,n[i]-1]:[i,u-1]:0===n||0===u?[null,null]:null===u?[null,n-1]:[null,u-1]},isLast:function(e){return null===o(e)[1]}}}},19897:function(e){"use strict";e.exports=function(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=e.length;if(t.length!==n)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}},76198:function(e,t,n){"use strict";n.d(t,{O9:function(){return s},_8:function(){return i},yd:function(){return u}});class r{constructor(e){const{length:t,separator:n,dictionaries:r,style:o,seed:i}=e;this.dictionaries=r,this.separator=n,this.length=t,this.style=o,this.seed=i}generate(){if(!this.dictionaries)throw new Error('Cannot find any dictionary. Please provide at least one, or leave the "dictionary" field empty in the config object');if(this.length<=0)throw new Error("Invalid length provided");if(this.length>this.dictionaries.length)throw new Error(`The length cannot be bigger than the number of dictionaries.\nLength provided: ${this.length}. Number of dictionaries provided: ${this.dictionaries.length}`);return this.dictionaries.slice(0,this.length).reduce(((e,t)=>{let n=t[Math.floor((this.seed?(r=this.seed,(e=>{e=1831565813+(e|=0)|0;let t=Math.imul(e^e>>>15,1|e);return t=t+Math.imul(t^t>>>7,61|t)^t,((t^t>>>14)>>>0)/4294967296})(r)):Math.random())*t.length)]||"";var r;if("lowerCase"===this.style)n=n.toLowerCase();else if("capital"===this.style){const[e,...t]=n.split("");n=e.toUpperCase()+t.join("")}else"upperCase"===this.style&&(n=n.toUpperCase());return e?`${e}${this.separator}${n}`:`${n}`}),"")}}const o={separator:"_",dictionaries:[]},i=e=>{const t=[...e&&e.dictionaries||o.dictionaries],n={...o,...e,length:e&&e.length||t.length,dictionaries:t};if(!e||!e.dictionaries||!e.dictionaries.length)throw new Error('A "dictionaries" array must be provided. This is a breaking change introduced starting from Unique Name Generator v4. Read more about the breaking change here: https://github.com/andreasonny83/unique-names-generator#migration-guide');return new r(n).generate()};var u=["aardvark","aardwolf","albatross","alligator","alpaca","amphibian","anaconda","angelfish","anglerfish","ant","anteater","antelope","antlion","ape","aphid","armadillo","asp","baboon","badger","bandicoot","barnacle","barracuda","basilisk","bass","bat","bear","beaver","bedbug","bee","beetle","bird","bison","blackbird","boa","boar","bobcat","bobolink","bonobo","booby","bovid","bug","butterfly","buzzard","camel","canid","canidae","capybara","cardinal","caribou","carp","cat","caterpillar","catfish","catshark","cattle","centipede","cephalopod","chameleon","cheetah","chickadee","chicken","chimpanzee","chinchilla","chipmunk","cicada","clam","clownfish","cobra","cockroach","cod","condor","constrictor","coral","cougar","cow","coyote","crab","crane","crawdad","crayfish","cricket","crocodile","crow","cuckoo","damselfly","deer","dingo","dinosaur","dog","dolphin","donkey","dormouse","dove","dragon","dragonfly","duck","eagle","earthworm","earwig","echidna","eel","egret","elephant","elk","emu","ermine","falcon","felidae","ferret","finch","firefly","fish","flamingo","flea","fly","flyingfish","fowl","fox","frog","galliform","gamefowl","gayal","gazelle","gecko","gerbil","gibbon","giraffe","goat","goldfish","goose","gopher","gorilla","grasshopper","grouse","guan","guanaco","guineafowl","gull","guppy","haddock","halibut","hamster","hare","harrier","hawk","hedgehog","heron","herring","hippopotamus","hookworm","hornet","horse","hoverfly","hummingbird","hyena","iguana","impala","jackal","jaguar","jay","jellyfish","junglefowl","kangaroo","kingfisher","kite","kiwi","koala","koi","krill","ladybug","lamprey","landfowl","lark","leech","lemming","lemur","leopard","leopon","limpet","lion","lizard","llama","lobster","locust","loon","louse","lungfish","lynx","macaw","mackerel","magpie","mammal","manatee","mandrill","marlin","marmoset","marmot","marsupial","marten","mastodon","meadowlark","meerkat","mink","minnow","mite","mockingbird","mole","mollusk","mongoose","monkey","moose","mosquito","moth","mouse","mule","muskox","narwhal","newt","nightingale","ocelot","octopus","opossum","orangutan","orca","ostrich","otter","owl","ox","panda","panther","parakeet","parrot","parrotfish","partridge","peacock","peafowl","pelican","penguin","perch","pheasant","pig","pigeon","pike","pinniped","piranha","planarian","platypus","pony","porcupine","porpoise","possum","prawn","primate","ptarmigan","puffin","puma","python","quail","quelea","quokka","rabbit","raccoon","rat","rattlesnake","raven","reindeer","reptile","rhinoceros","roadrunner","rodent","rook","rooster","roundworm","sailfish","salamander","salmon","sawfish","scallop","scorpion","seahorse","shark","sheep","shrew","shrimp","silkworm","silverfish","skink","skunk","sloth","slug","smelt","snail","snake","snipe","sole","sparrow","spider","spoonbill","squid","squirrel","starfish","stingray","stoat","stork","sturgeon","swallow","swan","swift","swordfish","swordtail","tahr","takin","tapir","tarantula","tarsier","termite","tern","thrush","tick","tiger","tiglon","toad","tortoise","toucan","trout","tuna","turkey","turtle","tyrannosaurus","unicorn","urial","vicuna","viper","vole","vulture","wallaby","walrus","warbler","wasp","weasel","whale","whippet","whitefish","wildcat","wildebeest","wildfowl","wolf","wolverine","wombat","woodpecker","worm","wren","xerinae","yak","zebra"],s=["amaranth","amber","amethyst","apricot","aqua","aquamarine","azure","beige","black","blue","blush","bronze","brown","chocolate","coffee","copper","coral","crimson","cyan","emerald","fuchsia","gold","gray","green","harlequin","indigo","ivory","jade","lavender","lime","magenta","maroon","moccasin","olive","orange","peach","pink","plum","purple","red","rose","salmon","sapphire","scarlet","silver","tan","teal","tomato","turquoise","violet","white","yellow"]},448:function(e){function t(){return e.exports=t=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[209],{59054:function(e,t,r){"use strict";var n;r.d(t,{f:function(){return n}}),function(e){e.Share="share",e.MasterObject="masterobject"}(n||(n={}))},93421:function(e,t,r){"use strict";r.d(t,{wc:function(){return y},ND:function(){return h},W2:function(){return o}});var n=r(62699),i=r.n(n),o={dragItem:"GYPuI",svgContainer:"olYDa",dragText:"O53FV"};function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var h=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=l(t),function(e,t){if(t&&("object"==c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(t,r||[],l(e).constructor):t.apply(e,r))}(this,t,[e])}return 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)}(t,e),r=t,(n=[{key:"name",get:function(){return"DraggableItemComponent"}},{key:"template",get:function(){return i()}},{key:"className",get:function(){return"".concat(o.dragItem," p-3")}},{key:"viewOptions",value:function(){return Object.assign({styles:o},this.options)}}])&&a(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(r(31647).Q.wA),y={delay:150,cursorAt:{left:-20,top:10},refreshPositions:!0}},61519:function(e,t,r){"use strict";r.r(t),r.d(t,{SearchView:function(){return te}});var n=r(43823),i=r(21161),o=r(21679),c=r(57857),a=r(99249),s=r(31647),u=r(11543),l=r(59054),f=r(47022),h=r(33303),y=r(70763),p=r(57098),d=r(21251),v=r(33800),b=r(51174),g=r(48404),m=r(64649),w=r(19226),S=r(95061),O=r(13809),C=r(80867),P=r(29457),j=r(96605),k=r.n(j);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 R(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,V(n.key),n)}}function V(e){var t=function(e){if("object"!=E(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=E(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==E(t)?t:t+""}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function M(e,t){return M=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},M(e,t)}var D=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=T(t),function(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)}(e,_()?Reflect.construct(t,r||[],T(e).constructor):t.apply(e,r))}(this,t,[e])}return 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)}(t,e),r=t,(n=[{key:"name",get:function(){return"SearchResultsComponent"}},{key:"template",get:function(){return k()}},{key:"lang",get:function(){return"search.searchResults"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{results:{replaceElement:!0,el:".results-region",partialLoading:P.LP.VideoList}}}},{key:"onBeforeRender",value:function(){return!!this.collection}},{key:"onRender",value:function(){var e=new C.Y({collection:this.collection,videosWithMetadata:this.options.videosWithMetadata,application:p.OV.SEARCH,videoItemComponentType:O.UC.Search,collectionIdentifier:null,config:this.options.config,emptyStateType:P.ub.Search,emptyStateOptions:{heading:c.T.getPhrase(this.lang,"emptyStateHeading",{query:this.options.query}),description:c.T.getPhrase(this.lang,"emptyStateDescription")},collectionViewChannel:this.options.collectionViewChannel,customerHasExchange:this.options.customerHasExchange,currentUser:this.options.currentUser,playerApiUrl:this.options.playerApiUrl,createViewKey:this.options.createViewKey,hasCursors:this.options.hasCursors,showEmptyState:!0,libraries:this.options.libraries,products:this.options.products});this.showChildView("results",e)}}])&&R(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(s.Q.wA),I=r(8614),x=r(15709),q=r.n(x);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){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,H(n.key),n)}}function H(e){var t=function(e){if("object"!=A(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=A(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==A(t)?t:t+""}function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(N=function(){return!!e})()}function Q(e){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Q(e)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}var B=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=Q(t),function(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)}(e,N()?Reflect.construct(t,r||[],Q(e).constructor):t.apply(e,r))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"SearchHeaderComponent"}},{key:"template",get:function(){return q()}},{key:"lang",get:function(){return"search.searchHeader"}},{key:"className",get:function(){return"bg-white border-bottom p-3"}},{key:"regions",value:function(){return{filters:{el:".filters-region",replaceElement:!0}}}},{key:"renderFilters",value:function(){var e=new I.b5({collection:this.collection,channelName:this.options.channelName});this.showChildView("filters",e)}},{key:"onRender",value:function(){this.renderFilters()}}])&&F(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(s.Q.wA),W=r(21769),K=r(44937),L=r(5344),z=r(28434),G=r.n(z);function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}function X(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Y(n.key),n)}}function Y(e){var t=function(e){if("object"!=J(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=J(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==J(t)?t:t+""}function Z(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Z=function(){return!!e})()}function $(e){return $=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},$(e)}function ee(e,t){return ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ee(e,t)}var te=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=$(t),function(e,t){if(t&&("object"==J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Z()?Reflect.construct(t,r||[],$(e).constructor):t.apply(e,r))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)}(t,e),r=t,O=[{key:"initialize",value:function(){this.initializeQuery(),this.bindListeners(),this.contextualSearchService=o.u.getInstance(u.D.ContextualSearch,this),this.searchDataService=o.u.getInstance(u.Z.Search,this),this.videoDataService=o.u.getInstance(v.O.Video,this),this.ratingsDataService=o.u.getInstance(v.O.Ratings,this),this.playerDataService=o.u.getInstance(v.O.Player,this),this.videoMixinService=o.u.getInstance(v.K.VideoMixin,this),this.collectionIdentifier=new h.J(Object.assign({collectionPrefix:d.M.SEARCH_VIDEOS},this.options.queryParams)),this.createViewKey=this.createViewKey.bind(this)}},{key:"initializeQuery",value:function(){this.queryModel=this.getSearchModel()}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.RATINGS,"".concat(d.M.RATINGS,":sync"),this.render),this.listenTo(p.Vk.RESTRICTED_VIDEO,"".concat(d.M.RESTRICTED_OBJECTS,":").concat(d.M.SEARCH_VIDEOS,":invalidate"),this.updateRestrictedVideos),this.listenTo(this.channelName,p.Vy.Filters.FILTER_CHANGED,i.debounce(this.onFilterChange,100)),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata),this.listenTo(W.I.TagFilter,"change:relevant:tags",this.updateSearchResults)}},{key:"name",get:function(){return"SearchView"}},{key:"title",get:function(){return c.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"search.search"}},{key:"template",get:function(){return G()}},{key:"className",get:function(){return"bg-white rounded"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{header:{replaceElement:!0,el:".header-region"},results:{replaceElement:!0,el:".results-region"},pagination:{el:".pagination-region",replaceElement:!0}}}},{key:"getSearchModel",value:function(){return a.r.get("search",{ctor:K.AE})}},{key:"fetchSearchData",value:function(){this.ratings=this.ratingsDataService.getAllRatings(),this.ratings&&!this.filterCollection&&this.initializeFilterCollection()}},{key:"initializeFilterCollection",value:function(){this.filterCollection=L.qr.getFilterCollection(this.sources,this.ratings),this.setQueryParams()}},{key:"setQueryParams",value:function(){L.yf.setQueryParams(Object.assign(Object.assign({},this.options.queryParams),this.getContextParams()),this.queryModel,this.filterCollection)}},{key:"getContextParams",value:function(){if(!this.queryModel.get("query"))return n.Radio.channel(p.jr.CONTEXTUAL_SEARCH).trigger("reset:search:context"),{};var e,t,r,i=this.contextualSearchService.getSearchContext();return i&&i.get("filterParam")?(e={},t=i.get("filterParam"),r=i.get("filterValue"),(t=Y(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e):{}}},{key:"createViewKey",value:function(e,t){this.playerDataService.createViewKey(e,l.f.MasterObject,t)}},{key:"onFilterChange",value:function(){s.Q.C$.trigger({application:p.OV.SEARCH,action:p.eX.Search.HOME,params:L.yf.getRouteQueryParams(this.queryModel,this.filterCollection,this.sources)})}},{key:"setVideosWithMetadata",value:function(){this.resultCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new y.t(this.resultCollection.map((function(e){return(0,b.Z)({id:e.get("id"),typeId:e.get("typeId")})}))))}},{key:"updateSearchResults",value:function(){var e=this;this.resultCollection=null,this.renderResults(),this.queryString=L.yf.getQueryString(this.queryModel,this.filterCollection,this.sources,this.collectionIdentifier.cursor);var t=function(){return s.Q.C$.trigger({application:p.OV.SEARCH,action:p.eX.Search.HOME,params:L.yf.getRouteQueryParams(e.queryModel,e.filterCollection,e.sources)})};this.queryString?this.searchDataService.searchVideos(this.queryString,this.collectionIdentifier,t):t()}},{key:"renderHeader",value:function(){var e=new B({collection:this.filterCollection,channelName:this.channelName});this.showChildView("header",e)}},{key:"renderResults",value:function(){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new D({collection:this.resultCollection,videosWithMetadata:this.videosWithMetadata,config:this.config,collectionViewChannel:this.channelName,customerHasExchange:this.exchanges.any(),currentUser:this.currentUser,playerApiUrl:this.config.get("playerApiUrl"),createViewKey:this.createViewKey,hasCursors:!!e,libraries:this.sources,query:this.queryModel.get("query"),products:this.products});this.showChildView("results",t)}},{key:"renderPagination",value:function(){if(this.resultCollection&&this.resultCollection.length){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new f.Q({cursors:e,appLink:{application:p.OV.SEARCH,action:p.eX.Search.HOME,params:L.yf.getRouteQueryParams(this.queryModel,this.filterCollection,this.sources)}});this.showChildView("pagination",t)}}},{key:"fetchResults",value:function(){var e=this;if(this.filterCollection){this.queryString=L.yf.getQueryString(this.queryModel,this.filterCollection,this.sources,this.collectionIdentifier.cursor);var t=L.yf.getDynamicFilterQueryString(this.queryModel,this.filterCollection);if(this.dynamicFiltersFetched||this.searchDataService.getDynamicFilters(t,(function(t){e.dynamicFiltersFetched||(e.filterCollection.add(t.toJSON(),{merge:!0}),e.dynamicFiltersFetched=!0,e.render())})),!this.resultCollection){var r=function(t){e.resultCollection=t,e.setVideosWithMetadata(),e.render()};this.queryString?this.searchDataService.searchVideos(this.queryString,this.collectionIdentifier,r):r(new y.t([]))}}}},{key:"fetchVideoWithMetadata",value:function(e,t){var r=this;this.videoDataService.getUnionVideo(e,t,(function(t){var n=r.videosWithMetadata.get(e);n&&(n.set(t.toJSON()),n.set({dataFetched:!0}))}))}},{key:"updateRestrictedVideos",value:function(){var e=this;this.videoMixinService.getAndMixinVideoCollectionRestrictions(this.resultCollection,this.collectionIdentifier,(function(){return e.render()}))}},{key:"requiredResources",get:function(){return{config:g.p.config,sources:S.T.libraries,exchanges:S.T.exchanges,currentUser:w.K.currentUser,products:m.s.products}}},{key:"onBeforeRender",value:function(){return this.fetchSearchData(),this.fetchResults(),!0}},{key:"onRender",value:function(){this.renderHeader(),this.renderResults(),this.renderPagination()}},{key:"onBeforeDestroy",value:function(){this.queryModel.clear()}}],O&&X(r.prototype,O),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,O}(s.Q.G7)},13809:function(e,t,r){"use strict";r.d(t,{UC:function(){return n.U}});var n=r(58688);r(19969),r(14898)},62699:function(e,t,r){var n=r(31197);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){e.propertyIsEnumerable;var o,c=e.lambda,a=e.escapeExpression;return'<span class="'+a(c(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.svgContainer:o,t))+' me-2">'+(null!=(o=c(null!=(o=null!=t?t.options:t)?o.svg:o,t))?o:"")+'</span>\n<span class="'+a(c(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.dragText:o,t))+'">'+a(c(null!=(o=null!=t?t.options:t)?o.text:o,t))+"</span>"},useData:!0})},96605:function(e,t,r){var n=r(31197);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return'<div class="results-region"></div>'},useData:!0})},15709:function(e,t,r){var n=r(31197);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return e.propertyIsEnumerable,"<h3>"+e.escapeExpression((r.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"header",{name:"lang",hash:{},data:i}))+'</h3>\n<div class="filters-region"></div>'},useData:!0})},28434:function(e,t,r){var n=r(31197);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){return'<div class="header-region"></div>\n<div class="results-region"></div>\n<div class="pagination-region"></div>'},useData:!0})}}]);