@clickview/library-editor 1.44.0 → 1.44.1-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{2482-library-editor-9683109615.chunk.css → 2482-library-editor-6893a774e7.chunk.css} +1 -1
  3. package/dist/css/{3087-library-editor-32398cd1ad.chunk.css → 3087-library-editor-e17193216d.chunk.css} +1 -1
  4. package/dist/css/{343-library-editor-c4402b71ea.chunk.css → 343-library-editor-9c019e516a.chunk.css} +1 -1
  5. package/dist/css/{3551-library-editor-875234ea74.chunk.css → 3551-library-editor-37e6a3ecdc.chunk.css} +2 -2
  6. package/dist/css/{9290-library-editor-8cd863992c.chunk.css → 3567-library-editor-e9cac790d6.chunk.css} +0 -1
  7. package/dist/css/4251-library-editor-5368f03ffe.chunk.css +16 -0
  8. package/dist/css/{6352-library-editor-a033138bd8.chunk.css → 6352-library-editor-c99ed407da.chunk.css} +1 -1
  9. package/dist/css/{8572-library-editor-af134cb76e.chunk.css → 6582-library-editor-cc54ebedbf.chunk.css} +4 -4
  10. package/dist/css/library-editor-app-d3089f7dab.css +62 -0
  11. package/dist/languages/en.json +1 -1
  12. package/dist/scripts/101-59428084bf.chunk.js +1 -0
  13. package/dist/scripts/1010-d5c811879c.chunk.js +1 -0
  14. package/dist/scripts/1086-2682e6d3f7.chunk.js +1 -0
  15. package/dist/scripts/112-24c19e2cde.chunk.js +1 -0
  16. package/dist/scripts/1216-f3e3f911fa.chunk.js +1 -0
  17. package/dist/scripts/1269-a34a1de36d.chunk.js +1 -0
  18. package/dist/scripts/1409-e77c8982bb.chunk.js +1 -0
  19. package/dist/scripts/1479-9cdc81c093.chunk.js +1 -0
  20. package/dist/scripts/1601-807fe6b883.chunk.js +2 -0
  21. package/dist/scripts/1703-a4165b29f0.chunk.js +1 -0
  22. package/dist/scripts/1832-64d40684a4.chunk.js +1 -0
  23. package/dist/scripts/1876-a62d35b891.chunk.js +1 -0
  24. package/dist/scripts/2417-f6194f2c0e.chunk.js +1 -0
  25. package/dist/scripts/243-845572fbbb.chunk.js +1 -0
  26. package/dist/scripts/2482-955e4b3615.chunk.js +1 -0
  27. package/dist/scripts/259-e4075e42de.chunk.js +1 -0
  28. package/dist/scripts/2601-3c14f9bb49.chunk.js +1 -0
  29. package/dist/scripts/2644-d371f7f2cf.chunk.js +1 -0
  30. package/dist/scripts/2692-438539ccbe.chunk.js +1 -0
  31. package/dist/scripts/{2802-600d2b3485.chunk.js → 2802-31b24a8131.chunk.js} +1 -1
  32. package/dist/scripts/2803-3cee0dd7a5.chunk.js +1 -0
  33. package/dist/scripts/2888-55edc16fd6.chunk.js +1 -0
  34. package/dist/scripts/299-902bf9f064.chunk.js +1 -0
  35. package/dist/scripts/2998-24191bc8ab.chunk.js +1 -0
  36. package/dist/scripts/3087-f85ee9511e.chunk.js +1 -0
  37. package/dist/scripts/3400-95d7a3a0d6.chunk.js +1 -0
  38. package/dist/scripts/343-faf27d393e.chunk.js +1 -0
  39. package/dist/scripts/35-059b230132.chunk.js +1 -0
  40. package/dist/scripts/3551-688a81325d.chunk.js +1 -0
  41. package/dist/scripts/3567-16a25cea63.chunk.js +1 -0
  42. package/dist/scripts/{3578-92cbcc9f66.chunk.js → 3578-c16c72054d.chunk.js} +2 -2
  43. package/dist/scripts/3639-02abbd0b71.chunk.js +1 -0
  44. package/dist/scripts/3746-65a75d633b.chunk.js +1 -0
  45. package/dist/scripts/376-f1479ce5b5.chunk.js +1 -0
  46. package/dist/scripts/3763-c5de5a36a1.chunk.js +1 -0
  47. package/dist/scripts/3778-4766cd8b18.chunk.js +1 -0
  48. package/dist/scripts/3969-06f3eacbc6.chunk.js +1 -0
  49. package/dist/scripts/4064-0862db0614.chunk.js +1 -0
  50. package/dist/scripts/4201-6311ac5cac.chunk.js +1 -0
  51. package/dist/scripts/4245-05262bc3f2.chunk.js +1 -0
  52. package/dist/scripts/4251-e98ba61023.chunk.js +2 -0
  53. package/dist/scripts/4523-ca8248823d.chunk.js +1 -0
  54. package/dist/scripts/4591-9e342f97bc.chunk.js +1 -0
  55. package/dist/scripts/4860-955b4bf901.chunk.js +1 -0
  56. package/dist/scripts/5046-d96f9b8a40.chunk.js +1 -0
  57. package/dist/scripts/514-927a43219d.chunk.js +1 -0
  58. package/dist/scripts/{5173-1b1806ceaa.chunk.js → 5173-ae0218ce2b.chunk.js} +1 -1
  59. package/dist/scripts/5286-cd51d38877.chunk.js +1 -0
  60. package/dist/scripts/5412-95152820bb.chunk.js +1 -0
  61. package/dist/scripts/5418-f31f79952c.chunk.js +1 -0
  62. package/dist/scripts/5424-f53a7d8068.chunk.js +1 -0
  63. package/dist/scripts/546-dbcd00e8a9.chunk.js +1 -0
  64. package/dist/scripts/5524-3ecfd1675f.chunk.js +1 -0
  65. package/dist/scripts/5707-7a54774b60.chunk.js +1 -0
  66. package/dist/scripts/5747-459f8afa94.chunk.js +1 -0
  67. package/dist/scripts/5891-1f84bfeb5a.chunk.js +1 -0
  68. package/dist/scripts/6093-7e5c1af050.chunk.js +1 -0
  69. package/dist/scripts/61-f0adffe8c6.chunk.js +2 -0
  70. package/dist/scripts/6352-eb6154a3ef.chunk.js +1 -0
  71. package/dist/scripts/{6427-5d16b4c64a.chunk.js → 6427-373276a90b.chunk.js} +1 -1
  72. package/dist/scripts/6582-079caf502c.chunk.js +2 -0
  73. package/dist/scripts/6721-b31c7b97e8.chunk.js +1 -0
  74. package/dist/scripts/6732-5bf9ec4e56.chunk.js +1 -0
  75. package/dist/scripts/6774-3cad51b5b7.chunk.js +1 -0
  76. package/dist/scripts/6788-6e4efcfd00.chunk.js +1 -0
  77. package/dist/scripts/{6963-8de06d6ea2.chunk.js → 6963-9742b1ac30.chunk.js} +1 -1
  78. package/dist/scripts/7002-580c3dac24.chunk.js +1 -0
  79. package/dist/scripts/7053-62aabdd574.chunk.js +1 -0
  80. package/dist/scripts/7071-5ff3233cde.chunk.js +1 -0
  81. package/dist/scripts/708-5773723b46.chunk.js +1 -0
  82. package/dist/scripts/{7190-62556429f8.chunk.js → 7190-d26b5ef34d.chunk.js} +1 -1
  83. package/dist/scripts/7295-fd794a2a3c.chunk.js +1 -0
  84. package/dist/scripts/7376-baac126511.chunk.js +1 -0
  85. package/dist/scripts/7408-40f786ee81.chunk.js +1 -0
  86. package/dist/scripts/8113-b8b033a0fb.chunk.js +1 -0
  87. package/dist/scripts/8213-ef3077d565.chunk.js +1 -0
  88. package/dist/scripts/8362-e82bef3e07.chunk.js +1 -0
  89. package/dist/scripts/8542-727d658bd8.chunk.js +1 -0
  90. package/dist/scripts/8726-edded1064e.chunk.js +1 -0
  91. package/dist/scripts/8727-273095d854.chunk.js +1 -0
  92. package/dist/scripts/8762-4ee15995c8.chunk.js +1 -0
  93. package/dist/scripts/8906-3bde92a78d.chunk.js +1 -0
  94. package/dist/scripts/9024-5c547f0a73.chunk.js +1 -0
  95. package/dist/scripts/9357-c5c5984ec8.chunk.js +1 -0
  96. package/dist/scripts/9383-aee1eea017.chunk.js +1 -0
  97. package/dist/scripts/9695-a04e508364.chunk.js +1 -0
  98. package/dist/scripts/9927-a667775ac4.chunk.js +1 -0
  99. package/dist/scripts/bundle-305812659d.min.js +2 -0
  100. package/dist/scripts/bundle-305812659d.min.js.LICENSE.txt +1 -0
  101. package/package.json +1 -1
  102. package/dist/css/library-editor-app-0f996b4d1d.css +0 -62
  103. package/dist/scripts/101-b1dbc86a90.chunk.js +0 -1
  104. package/dist/scripts/1010-b04f5455e5.chunk.js +0 -1
  105. package/dist/scripts/1086-18354eee73.chunk.js +0 -1
  106. package/dist/scripts/112-6a9fb5a3b4.chunk.js +0 -1
  107. package/dist/scripts/1216-3a338cf937.chunk.js +0 -1
  108. package/dist/scripts/1269-ebb70ecc87.chunk.js +0 -1
  109. package/dist/scripts/1409-7e3844a2c1.chunk.js +0 -1
  110. package/dist/scripts/1601-5e4723da8a.chunk.js +0 -2
  111. package/dist/scripts/1703-a0ce73193e.chunk.js +0 -1
  112. package/dist/scripts/1832-6237ec0650.chunk.js +0 -1
  113. package/dist/scripts/1876-bd3b0a577a.chunk.js +0 -1
  114. package/dist/scripts/2417-facbb43a54.chunk.js +0 -1
  115. package/dist/scripts/243-065eeeb636.chunk.js +0 -1
  116. package/dist/scripts/2482-2e771aa32e.chunk.js +0 -1
  117. package/dist/scripts/259-3fa2437542.chunk.js +0 -1
  118. package/dist/scripts/2601-bce7a0176e.chunk.js +0 -1
  119. package/dist/scripts/2644-c4c2859dbf.chunk.js +0 -1
  120. package/dist/scripts/2692-72f0ddadb4.chunk.js +0 -1
  121. package/dist/scripts/2803-d7f348b7f5.chunk.js +0 -1
  122. package/dist/scripts/2888-808acc2fef.chunk.js +0 -1
  123. package/dist/scripts/299-eaa1354f0c.chunk.js +0 -1
  124. package/dist/scripts/2998-a78cff549d.chunk.js +0 -1
  125. package/dist/scripts/3087-acee4b4e17.chunk.js +0 -1
  126. package/dist/scripts/3400-2e845c4564.chunk.js +0 -1
  127. package/dist/scripts/343-7a796e6a56.chunk.js +0 -1
  128. package/dist/scripts/35-d9c25d5624.chunk.js +0 -1
  129. package/dist/scripts/3551-ad54980e13.chunk.js +0 -1
  130. package/dist/scripts/3639-bf6b264ec9.chunk.js +0 -1
  131. package/dist/scripts/3746-a3ca46cf28.chunk.js +0 -1
  132. package/dist/scripts/376-15ce0b43dd.chunk.js +0 -1
  133. package/dist/scripts/3763-408ce1508a.chunk.js +0 -1
  134. package/dist/scripts/3778-f55494fe5a.chunk.js +0 -1
  135. package/dist/scripts/3969-92dd3b164a.chunk.js +0 -1
  136. package/dist/scripts/4201-30387c4a99.chunk.js +0 -1
  137. package/dist/scripts/4245-d1ded0584f.chunk.js +0 -1
  138. package/dist/scripts/4523-1ccb20cd86.chunk.js +0 -1
  139. package/dist/scripts/4591-e149bc74c4.chunk.js +0 -1
  140. package/dist/scripts/4860-0d9f4a4d0b.chunk.js +0 -1
  141. package/dist/scripts/5046-7a4e1b7df0.chunk.js +0 -1
  142. package/dist/scripts/514-c6a928c7c4.chunk.js +0 -1
  143. package/dist/scripts/5286-472885bf9c.chunk.js +0 -1
  144. package/dist/scripts/5412-c8877fa040.chunk.js +0 -1
  145. package/dist/scripts/5418-c3e6433e3e.chunk.js +0 -1
  146. package/dist/scripts/5424-66a285070b.chunk.js +0 -1
  147. package/dist/scripts/546-dd9117fa94.chunk.js +0 -1
  148. package/dist/scripts/5524-e3ae3829ab.chunk.js +0 -1
  149. package/dist/scripts/5707-aa2a8aed09.chunk.js +0 -1
  150. package/dist/scripts/5747-3c7f3e0bb1.chunk.js +0 -1
  151. package/dist/scripts/5891-e5d8930469.chunk.js +0 -1
  152. package/dist/scripts/6093-defd3e7edf.chunk.js +0 -1
  153. package/dist/scripts/61-e24004149c.chunk.js +0 -2
  154. package/dist/scripts/6352-ed9a44d7bf.chunk.js +0 -1
  155. package/dist/scripts/6721-e479e42307.chunk.js +0 -1
  156. package/dist/scripts/6732-33c1578a4a.chunk.js +0 -1
  157. package/dist/scripts/6774-5ec2037d61.chunk.js +0 -1
  158. package/dist/scripts/6788-fabfcf71cf.chunk.js +0 -1
  159. package/dist/scripts/7002-df13e9f6c5.chunk.js +0 -1
  160. package/dist/scripts/7053-8aa0d915f9.chunk.js +0 -1
  161. package/dist/scripts/7071-a6d0bdadd1.chunk.js +0 -1
  162. package/dist/scripts/708-80efe251de.chunk.js +0 -1
  163. package/dist/scripts/7295-8a525c7426.chunk.js +0 -1
  164. package/dist/scripts/7376-2a91178587.chunk.js +0 -1
  165. package/dist/scripts/7408-50b66e1a5a.chunk.js +0 -1
  166. package/dist/scripts/8113-133ecdfe0c.chunk.js +0 -1
  167. package/dist/scripts/8213-400f1712b3.chunk.js +0 -1
  168. package/dist/scripts/8362-b11e7dbcbd.chunk.js +0 -1
  169. package/dist/scripts/8542-48fd3a46e3.chunk.js +0 -1
  170. package/dist/scripts/8572-df35f37677.chunk.js +0 -2
  171. package/dist/scripts/8726-8f24d59af7.chunk.js +0 -1
  172. package/dist/scripts/8727-16694cfdf0.chunk.js +0 -1
  173. package/dist/scripts/8762-ded7396830.chunk.js +0 -1
  174. package/dist/scripts/8906-327640bf39.chunk.js +0 -1
  175. package/dist/scripts/9290-9ccb931dbe.chunk.js +0 -1
  176. package/dist/scripts/9357-35c3761c84.chunk.js +0 -1
  177. package/dist/scripts/9383-941f88b031.chunk.js +0 -1
  178. package/dist/scripts/9695-0cf4f10b51.chunk.js +0 -1
  179. package/dist/scripts/9770-f9c6709b6e.chunk.js +0 -1
  180. package/dist/scripts/9927-8e56991c93.chunk.js +0 -1
  181. package/dist/scripts/bundle-03f36c0a76.min.js +0 -2
  182. /package/dist/scripts/{1601-5e4723da8a.chunk.js.LICENSE.txt → 1601-807fe6b883.chunk.js.LICENSE.txt} +0 -0
  183. /package/dist/scripts/{2802-600d2b3485.chunk.js.LICENSE.txt → 2802-31b24a8131.chunk.js.LICENSE.txt} +0 -0
  184. /package/dist/scripts/{3578-92cbcc9f66.chunk.js.LICENSE.txt → 3578-c16c72054d.chunk.js.LICENSE.txt} +0 -0
  185. /package/dist/scripts/{61-e24004149c.chunk.js.LICENSE.txt → 4251-e98ba61023.chunk.js.LICENSE.txt} +0 -0
  186. /package/dist/scripts/{8572-df35f37677.chunk.js.LICENSE.txt → 61-f0adffe8c6.chunk.js.LICENSE.txt} +0 -0
  187. /package/dist/scripts/{bundle-03f36c0a76.min.js.LICENSE.txt → 6582-079caf502c.chunk.js.LICENSE.txt} +0 -0
@@ -1 +0,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 w}});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,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}function b(e,t,n){return t=m(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,y()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var w=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),b(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&&g(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()}}])&&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 J}});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,t){if("object"!=N(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=N(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==N(t)?t:t+""}function I(e,t,n){return t=V(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,x()?Reflect.construct(t,n||[],V(e).constructor):t.apply(e,n))}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(x=function(){return!!e})()}function V(e){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},V(e)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(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),I(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&&D(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),M=n(40622),R=n(53854),L=n(75535),A=n(95061),U=n(57785),Q=n(44665),Z=n.n(Q);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 K(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,F(o.key),o)}}function F(e){var t=function(e,t){if("object"!=z(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=z(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==z(t)?t:t+""}function G(e,t,n){return t=H(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,Y()?Reflect.construct(t,n||[],H(e).constructor):t.apply(e,n))}function Y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Y=function(){return!!e})()}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function X(e,t){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},X(e,t)}var J=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=G(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&&X(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 Z()}},{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,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 L.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.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(M.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(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",{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),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 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(U.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:A.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&&K(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 P}});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,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=l(o))return o;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,t){if("object"!=S(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=S(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==S(t)?t:t+""}function C(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,T()?Reflect.construct(t,n||[],j(e).constructor):t.apply(e,n))}function T(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(T=function(){return!!e})()}function j(e){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},j(e)}function N(e,t){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},N(e,t)}var P=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),C(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&&N(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 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2417],{98001:function(t,e,n){"use strict";n.d(e,{u:function(){return O}});var r=n(48088),o=n(39479),i=n(11306),a=n(57857),c=n(31647),u=n(63791),l=n(57098),s=n(93569),f=n(93421),p=n(40622),y="bimhO";function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function b(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,h(r.key),r)}}function h(t){var e=function(t,e){if("object"!=d(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==d(e)?e:e+""}function g(t,e,n){return e=m(e),function(t,e){if(e&&("object"===d(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,v()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(v=function(){return!!t})()}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function w(t,e){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},w(t,e)}var O=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),g(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&w(t,e)}(e,t),n=e,(d=[{key:"initialize",value:function(){this.options.model||c.Q.Ry.throw(new i.H("DraggableVideoBehavior must be passed a Video model")),this.listenTo(l.jr.VIDEO_DRAG_DROP,"drag:style:".concat(this.options.model.id),this.styleDragStart),this.listenTo(l.jr.VIDEO_DRAG_DROP,"drag:stop",this.styleDragStop)}},{key:"lang",get:function(){return"libraryEditor.behaviors"}},{key:"helper",value:function(){var t=this.getVideoModels();return new f.ND({text:t.length>1?a.T.getPhrase(this.lang,"videos",{videoCount:t.length}):t[0].get("name"),svg:u.Nj.getSvg(u.vn.Play)}).render().el}},{key:"getSelector",value:function(){return this.view.getUI(this.options.selector)}},{key:"styleDragStart",value:function(){this.getSelector().addClass(y)}},{key:"styleDragStop",value:function(){this.getSelector().removeClass(y)}},{key:"start",value:function(){var t=this.getVideoModels(),e=r.Radio.channel(l.jr.VIDEO_DRAG_DROP);e.trigger("drag:start",t,this.options.collectionIdentifier),o.each(t,(function(t){return e.trigger("drag:style:".concat(t.id))}))}},{key:"stop",value:function(){r.Radio.channel(l.jr.VIDEO_DRAG_DROP).trigger("drag:stop")}},{key:"getVideoModels",value:function(){var t=this,e=s.S0.GetSelectedModels({key:this.options.collectionIdentifier.toString(),type:p.De.VIDEO_LIST,collection:this.view.model.collection});return o.any(e,(function(e){return e.id===t.view.model.id}))||(e=[this.view.model]),e.length?e:[this.view.model]}},{key:"getClassMappings",value:function(){return{"ui-draggable":f.W2.draggable,"ui-draggable-disabled":f.W2.disabled,"ui-draggable-handle":f.W2.handle,"ui-draggable-dragging":f.W2.dragging}}},{key:"onRender",value:function(){var t=this.getSelector(),e={helper:o.bind(this.helper,this),start:o.bind(this.start,this),stop:o.bind(this.stop,this)};e.classes=this.getClassMappings(),t.draggable(o.extend({},f.wc,e))}},{key:"onBeforeDestroy",value:function(){var t=this.getSelector();t.draggable("instance")&&t.draggable("destroy")}}])&&b(n.prototype,d),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,d}(c.Q.cg)},93421:function(t,e,n){"use strict";n.d(e,{wc:function(){return d},ND:function(){return y},W2:function(){return i}});var r=n(62699),o=n.n(r),i={dragItem:"GYPuI",svgContainer:"olYDa",dragText:"O53FV"};function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function u(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}function l(t,e,n){return e=f(e),function(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,s()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(s=function(){return!!t})()}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}var y=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,(r=[{key:"name",get:function(){return"DraggableItemComponent"}},{key:"template",get:function(){return o()}},{key:"className",get:function(){return"".concat(i.dragItem," p-3")}},{key:"viewOptions",value:function(){return Object.assign({styles:i},this.options)}}])&&c(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(n(31647).Q.wA),d={delay:150,cursorAt:{left:-20,top:10},refreshPositions:!0}},43953:function(t,e,n){"use strict";n.d(e,{J:function(){return m}});var r=n(57857),o=n(31647),i=n(52076),a=n(70065),c=n(63791),u=n(71641),l=n(57098),s=n(8050),f=n.n(s);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,d(r.key),r)}}function d(t){var e=function(t,e){if("object"!=p(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==p(e)?e:e+""}function b(t,e,n){return e=g(e),function(t,e){if(e&&("object"===p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,h()?Reflect.construct(e,n||[],g(t).constructor):e.apply(t,n))}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(h=function(){return!!t})()}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var m=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),b(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}(e,t),n=e,(s=[{key:"name",get:function(){return"LibraryActionsComponent"}},{key:"template",get:function(){return f()}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.libraryActions"}},{key:"className",get:function(){return"position-absolute ".concat("Qgopl"," ").concat(this.options.extraClasses," ")}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle"}}},{key:"regions",value:function(){return{dropdownItems:{replaceElement:!0,el:".items-region"}}}},{key:"getDropdownItems",value:function(){return[{title:r.T.getPhrase(this.lang,"addFolder"),analyticsOptions:i.k.mergeOptions(this.options.analyticsOptions,{actionType:a.Vw.Create,entity:a.py.Folder,workflowPhase:a.eu.Start}),appLink:{application:l.OV.LIBRARY_EDITOR,action:l.eX.Shared.NEW_FOLDER,args:[this.model.get("id")]}},{title:r.T.getPhrase(this.lang,"rename"),analyticsOptions:i.k.mergeOptions(this.options.analyticsOptions,{actionType:a.Vw.Rename,entity:a.py.Library,workflowPhase:a.eu.Start}),appLink:{application:l.OV.LIBRARY_EDITOR,action:l.eX.LibraryEditor.RENAME_LIBRARY,args:[this.model.get("id")]}},{title:r.T.getPhrase(this.lang,"libraryRequestSettings"),analyticsOptions:i.k.mergeOptions(this.options.analyticsOptions,{actionType:a.Vw.SetAccess,entity:a.py.Library,workflowPhase:a.eu.Start}),appLink:{application:l.OV.LIBRARY_REQUESTS,action:l.eX.LibraryRequests.LIBRARY_REQUEST_SETTINGS,args:[this.model.get("id")]}},{title:r.T.getPhrase(this.lang,"remove"),analyticsOptions:i.k.mergeOptions(this.options.analyticsOptions,{actionType:a.Vw.Delete,entity:a.py.Library,workflowPhase:a.eu.Start}),appLink:{application:l.OV.LIBRARY_EDITOR,action:l.eX.LibraryEditor.DELETE_LIBRARY,args:[this.model.get("id")]},classes:"text-danger"}]}},{key:"viewOptions",value:function(){return{dropdownClass:"".concat("AAIc2"," ").concat(this.options.buttonClass),svg:c.Nj.getSvg(c.vn.More)}}},{key:"onRender",value:function(){var t;(null===(t=this.model)||void 0===t?void 0:t.get("id"))&&(this.showChildView("dropdownItems",new u.w({analyticsHelper:i.k,displayOptions:{alignment:"end"},channelName:this.channelName,collection:new o.Q.FE(this.getDropdownItems())})),this.getUI("dropdownToggle").dropdown())}}])&&y(n.prototype,s),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,s}(o.Q.wA)},55175:function(t,e,n){"use strict";n.r(e),n.d(e,{LibraryView:function(){return V}});var r=n(39479),o=n(21679),i=n(57857),a=n(31647),c=n(70065),u=n(80758),l=n(77502),s=n(63791),f=n(57098),p=n(29457),y=n(3059),d=n(48404),b=n(43953),h=n(87002);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function v(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,m(r.key),r)}}function m(t){var e=function(t,e){if("object"!=g(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==g(e)?e:e+""}function w(t,e,n){return e=S(e),function(t,e){if(e&&("object"===g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,O()?Reflect.construct(e,n||[],S(t).constructor):e.apply(t,n))}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(O=function(){return!!t})()}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function j(t,e){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},j(t,e)}var k=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),w(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&j(t,e)}(e,t),n=e,(r=[{key:"name",get:function(){return"LibraryFolderListComponent"}},{key:"className",get:function(){return"row"}},{key:"childView",get:function(){return h.Y}},{key:"childViewOptions",get:function(){return this.options.childOptions}}])&&v(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(a.Q.$W),P=n(32849),_=n.n(P),E={actions:"_12j8"};function R(t){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R(t)}function T(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,D(r.key),r)}}function D(t){var e=function(t,e){if("object"!=R(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==R(e)?e:e+""}function I(t,e,n){return e=L(e),function(t,e){if(e&&("object"===R(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,C()?Reflect.construct(e,n||[],L(t).constructor):e.apply(t,n))}function C(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(C=function(){return!!t})()}function L(t){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},L(t)}function x(t,e){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},x(t,e)}var V=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),I(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&x(t,e)}(e,t),n=e,(a=[{key:"initialize",value:function(){var t=this;this.libraryDataService=o.u.getInstance(f.Or.Library,this),this.listenTo(f.Vk.LIBRARY,"clear:library:folder:cache",(function(){t.folders=null,t.render()}))}},{key:"name",get:function(){return"LibraryView"}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.library"}},{key:"template",get:function(){return _()}},{key:"behaviors",get:function(){var t=this;return[{behaviorClass:u.o,region:"folders",type:p.ub.Library,shouldRender:function(){return t.model&&!t.model.children.length},componentOptions:{libraryId:this.options.libraryId,moreSvg:s.Nj.getSvg(s.vn.More),heading:i.T.getPhrase(this.lang,"emptyStateHeading"),description:i.T.getPhrase(this.lang,"emptyStateInfo",{moreSvg:'<span class="d-inline-block svg-container align-top">\n '.concat(s.Nj.getSvg(s.vn.More),"</span>")})},emptyStateComponents:f.aW}]}},{key:"regions",value:function(){return{upgradesBanner:{el:".upgrades-banner-region",replaceElement:!0},folders:{el:".folders-region",replaceElement:!0,partialLoading:p.LP.LibraryFolders},actions:{el:".actions-region",replaceElement:!0}}}},{key:"renderFolders",value:function(){this.showChildView("folders",new k({collection:this.folders,childOptions:{location:"library"}}))}},{key:"renderActions",value:function(){this.showChildView("actions",new b.J({model:this.model,extraClasses:"".concat(E.actions," rounded-circle me-2 mt-2"),analyticsOptions:{location:c.LZ.Banner}}))}},{key:"requiredResources",get:function(){return{config:d.p.config}}},{key:"bindScrollListener",value:function(){var t=this;if(!this.scrollBound){this.scrollBound=!0;var e=$(window),n=r.debounce((function(){if(e.scrollTop()+e.height()>t.$el.offset().top+t.$el.height()&&t.currentIdentifier){var n=t.libraryDataService.getFoldersCursors(t.currentIdentifier);n&&n.next&&t.libraryDataService.getFolders(t.getNewCollectionIdentifier(n.next),(function(e){t.folders.add(e.toJSON())}))}}),333);e.scroll(n),window.setTimeout(n,100)}}},{key:"getNewCollectionIdentifier",value:function(t){return this.currentIdentifier=new y.KX(this.model.categoryTree.get("id"),l.E.AtoZ,t)}},{key:"onBeforeRender",value:function(){var t=this;if(this.model)return this.folders||this.libraryDataService.getFolders(this.getNewCollectionIdentifier(),(function(e){t.folders=e,t.render()})),!!this.model&&!!this.folders;this.libraryDataService.getLibraries((function(e){t.model=e.get(t.options.libraryId),t.listenTo(t.model,"change:name",t.render),t.render()}))}},{key:"viewOptions",value:function(){return{styles:E}}},{key:"onRender",value:function(){this.renderFolders(),this.renderActions(),this.bindScrollListener()}}])&&T(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a}(a.Q.G7)},71641:function(t,e,n){"use strict";n.d(e,{w:function(){return y}});var r=n(39479),o=n(31647),i=n(55142);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,u(r.key),r)}}function u(t){var e=function(t,e){if("object"!=a(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}function l(t,e,n){return e=f(e),function(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,s()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(s=function(){return!!t})()}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}var y=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),l(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&p(t,e)}(e,t),n=e,o=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.N}},{key:"childViewOptions",get:function(){var t={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return r.extend(t,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.alignment,n=void 0===e?"left":e,r=t.extraClasses,o="dropdown-menu-".concat(n);return r&&(o="".concat(o," ").concat(r)),o}},{key:"centerSelectedItem",value:function(){var t=this.$el.find(".active");if(t.length){var e=this.$el.scrollTop()+t.position().top,n=.5*this.$el.height()+.5*t.height();this.$el.scrollTop(e-n)}}}],o&&c(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.$W)},62699:function(t,e,n){var r=n(32227);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression;return'<span class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.svgContainer:i,e))+' me-2">'+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'</span>\n<span class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.dragText:i,e))+'">'+c(a(null!=(i=null!=e?e.options:e)?i.text:i,e))+"</span>"},useData:!0})},8050:function(t,e,n){var r=n(32227);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){t.propertyIsEnumerable;var i,a=t.lambda;return'<span data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+t.escapeExpression(a(null!=(i=null!=e?e.options:e)?i.dropdownClass:i,e))+' d-inline-block ui-dropdown-toggle">\n '+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'\n</span>\n<div class="items-region"></div>'},useData:!0})},32849:function(t,e,n){var r=n(32227);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){t.propertyIsEnumerable;var i,a,c=t.escapeExpression;return'<div class="upgrades-banner-region"></div>\n<div class="bg-white px-3 pt-3 pb-2 position-relative rounded '+c(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.library:i,e))+'">\n <h1 class="h3">'+c("function"==typeof(a=null!=(a=n.name||(null!=e?e.name:e))?a:t.hooks.helperMissing)?a.call(null!=e?e:t.nullContext||{},{name:"name",hash:{},data:o}):a)+'</h1>\n <div class="folders-region"></div>\n <div class="actions-region"></div>\n</div>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[243],{24828:function(e,t,n){"use strict";n.d(t,{o:function(){return r}});var r=["bg-pink","bg-orange"].concat(["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"])},22231:function(e,t,n){"use strict";function r(e,t){return t[e.charCodeAt(0)%t.length]}n.d(t,{x:function(){return r}})},50243:function(e,t,n){"use strict";n.r(t),n.d(t,{EditFolderImagesView:function(){return ee}});var r=n(48088),o=n(39479),i=n(21679),a=n(99249),l=n(31647),u=n(52076),c=n(70065),s=n(10101),p=n(58025),f=n(88172),h=n(57098),m=n(29457),d=n(67670),y=n(18375),g=n(48404),b=n(93569),v=n(57857),w=n(24828),I=n(22231),k=n(86983),C=n.n(k),T={removeImage:"daDCA",imageElement:"U_0tb",banner:"J28Xw",thumbnail:"OoZ6O",imageContainer:"RWdbM"};function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function 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,E(r.key),r)}}function E(e){var t=function(e,t){if("object"!=_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_(t)?t:t+""}function j(e,t,n){return t=S(t),function(e,t){if(t&&("object"===_(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||[],S(e).constructor):t.apply(e,n))}function B(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(B=function(){return!!e})()}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}function P(e,t){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},P(e,t)}var R=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),j(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,(o=[{key:"initialize",value:function(){this.viewModel=a.r.get("edit:folder:images")}},{key:"name",get:function(){return"EditImageComponent"}},{key:"template",get:function(){return C()}},{key:"lang",get:function(){return"libraryEditor.editImage"}},{key:"className",get:function(){return this.options.imageType===m.__.Thumbnails?"".concat(T.thumbnail," mb-2"):"".concat(T.banner," mt-2")}},{key:"events",value:function(){return e={},n="onClickRemoveImage",(t=E(t="click .".concat(T.removeImage)))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.YR,channelName:this.options.channelName,buttonSelector:".btn-outline-dark",imageType:this.options.imageType,saveImage:function(t,n){n?(e.viewModel.set({dataUrl:t,type:e.options.imageType}),l.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.EDIT_FOLDER_IMAGES,args:[e.options.folderId]})):r.Radio.channel(e.options.channelName).trigger("select:image",t,e.options.imageType)}}]}},{key:"onClickRemoveImage",value:function(){r.Radio.channel(this.options.channelName).trigger("show:dialog",this.options.imageType)}},{key:"getImageUrl",value:function(){var e=this.options.imageType===m.__.Banners?"createBannerUrl":"createFolderThumbnailUrl";return b.jw[e](this.options.originalImage)}},{key:"getImageTypeText",value:function(){switch(this.options.imageType){case m.__.Banners:return v.T.getPhrase(this.lang,"banner");case m.__.Thumbnails:return v.T.getPhrase(this.lang,"thumbnail")}}},{key:"viewOptions",value:function(){return{styles:T,imageUrl:this.getImageUrl(),backgroundColor:(0,I.x)(this.options.folderName,w.o),hasImage:this.options.originalImage&&this.options.originalImage.get("id"),imageTypeText:this.getImageTypeText(),dimensions:h.yE[this.options.imageType],recommendedDimensions:h.nq[this.options.imageType]}}}])&&O(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(l.Q.wA),x=n(80322),U=n.n(x);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 M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,N(r.key),r)}}function N(e){var t=function(e,t){if("object"!=D(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=D(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==D(t)?t:t+""}function V(e,t,n){return t=L(t),function(e,t){if(t&&("object"===D(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,A()?Reflect.construct(t,n||[],L(e).constructor):t.apply(e,n))}function A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(A=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 W,Z=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),V(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),n=t,(r=[{key:"name",get:function(){return"EditImagesWrapperComponent"}},{key:"template",get:function(){return U()}},{key:"regions",value:function(){return{banner:{el:".banner-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"renderBanner",value:function(){this.showChildView("banner",new R({channelName:this.options.bannerChannel,imageCdnUrl:this.options.imageCdnUrl,imageType:m.__.Banners,folderName:this.options.folderName,originalImage:this.options.bannerImage,folderId:this.options.folderId}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new R({channelName:this.options.thumbnailChannel,imageCdnUrl:this.options.imageCdnUrl,imageType:m.__.Thumbnails,folderName:this.options.folderName,originalImage:this.options.thumbnailImage,folderId:this.options.folderId}))}},{key:"onRender",value:function(){this.renderBanner(),this.renderThumbnail()}}])&&M(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(l.Q.wA),H=n(42687),Y=n.n(H),z="EOVMO";function Q(e){return Q="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},Q(e)}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,G(r.key),r)}}function G(e){var t=function(e,t){if("object"!=Q(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=Q(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Q(t)?t:t+""}function X(e,t,n){return t=J(t),function(e,t){if(t&&("object"===Q(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,n||[],J(e).constructor):t.apply(e,n))}function $(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return($=function(){return!!e})()}function J(e){return J=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},J(e)}function K(e,t){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},K(e,t)}!function(e){e[e.Upload=0]="Upload",e[e.Crop=1]="Crop"}(W||(W={}));var ee=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),X(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&&K(e,t)}(t,e),n=t,(v=[{key:"initialize",value:function(){this.popupContentState=W.Upload,this.viewModel=a.r.get("edit:folder:images"),this.viewModel.get("dataUrl")&&(this.selectedImageType=this.viewModel.get("type"),this.newImageEl=new Image,this.newImageEl.src=this.viewModel.get("dataUrl"),this.spinnerModel.set(f.ZV.Disabled,!1),this.popupContentState=W.Crop),this.libraryDataService=i.u.getInstance(h.Or.Library,this),this.imageUploadDataService=i.u.getInstance(h.Or.ImageUpload,this),this.bindListeners()}},{key:"name",get:function(){return"EditFolderImagesView"}},{key:"title",get:function(){return"Edit Folder Images"}},{key:"template",get:function(){return Y()}},{key:"channelName",get:function(){return b.N0.generateUniqueChannelName(this)}},{key:"regions",value:function(){return{content:{el:".content-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .back-btn":"onClickBackButton","shown.bs.modal":"renderCropper"}}},{key:"elements",get:function(){return{backBtn:".back-btn",cancelBtn:".cancel-btn"}}},{key:"behaviors",get:function(){return[{title:"Edit folder images",behaviorClass:s.Yw,size:"modal-lg",buttons:[{text:"Back",className:"btn btn-outline-dark back-btn ".concat(z)}],spinnerButtonOptions:{model:this.spinnerModel=new d.v((e={},t=f.ZV.Hidden,!0,(t=G(t))in e?Object.defineProperty(e,t,{value:true,enumerable:!0,configurable:!0,writable:!0}):e[t]=true,e)),channelName:this.channelName,buttonText:"Continue",onClick:this.onClickCrop,extraButtonClass:"btn-dark"},cancelButtonOptions:{className:"btn btn-dark cancel-btn",text:"Close"}}];var e,t}},{key:"requiredResources",get:function(){return{config:g.p.config}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(h.Vk.LIBRARY,"".concat(h.M_.FOLDER,":").concat(this.options.folderId,":sync"),this.render);var t="".concat(this.channelName,":").concat(m.__.Banners),n="".concat(this.channelName,":").concat(m.__.Thumbnails);this.listenTo(t,"select:image",(function(t){return e.onSelectImage(t,m.__.Banners)})),this.listenTo(n,"select:image",(function(t){return e.onSelectImage(t,m.__.Thumbnails)})),this.listenTo(t,"show:dialog",(function(){return e.onShowDialog(m.__.Banners)})),this.listenTo(n,"show:dialog",(function(){return e.onShowDialog(m.__.Thumbnails)})),this.listenTo(t,"image:error",(function(){return e.triggerMethod("hide")})),this.listenTo(n,"image:error",(function(){return e.triggerMethod("hide")})),this.listenTo(this.channelName,p.Y.ImageCropped,this.onImageCropped)}},{key:"onClickBackButton",value:function(){this.popupContentState!==W.Upload&&(this.popupContentState=W.Upload,this.selectedImageType=null,this.newImageEl=null,this.spinnerModel.set(f.ZV.Disabled,!0),this.renderContent())}},{key:"onClickCrop",value:function(){r.Radio.channel(this.channelName).trigger(p.Y.CropImage).trigger(f.I3.ShowSpinner)}},{key:"onSelectImage",value:function(e,t){this.selectedImageType=t,this.newImageEl=new Image,this.newImageEl.src=e,this.popupContentState=W.Crop,this.spinnerModel.set(f.ZV.Disabled,!1),this.renderCropper()}},{key:"onImageCropped",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,this.selectedImageType,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this,n={libraryId:this.libraryId,folderId:this.options.folderId,currentImageId:this.getCurrentImageId(),imageModel:e},r=this.selectedImageType===m.__.Banners?c.py.Banner:c.py.Thumbnail,o=this.selectedImageType===m.__.Banners?"addOrUpdateBanner":"addOrUpdateThumbnail";this.libraryDataService[o](n,(function(e){u.k.logUserAction({libraryId:t.libraryId,folderId:t.options.folderId,id:e.get("id")},{actionType:c.Vw.Upload,entity:r,workflowPhase:c.eu.Complete,location:c.LZ.Popup}),t.onFinish()}))}},{key:"onShowDialog",value:function(e){var t=this,n=new b.Mr({title:"Remove image?",text:"Are you sure you want to remove this image?",buttons:[{text:"Remove",className:"btn btn-danger",success:!0},{text:"Cancel",className:"btn btn-link",close:!0}],channelName:this.options.channelName});setTimeout((function(){return n.render().done((function(){return t.removeImage(e)}))}),200),this.triggerMethod("hide")}},{key:"removeImage",value:function(e){var t=this,n=e===m.__.Banners?"deleteBanner":"deleteThumbnail",r=e===m.__.Banners?this.currentBanner:this.currentThumbnail,o={libraryId:this.libraryId,folderId:this.model.get("id"),imageId:r.get("id")},i=e===m.__.Banners?c.py.Banner:c.py.Thumbnail;this.libraryDataService[n](o,(function(){u.k.logUserAction({libraryId:t.libraryId,folderId:t.model.get("id"),id:r.get("id")},{actionType:c.Vw.Delete,entity:i,workflowPhase:c.eu.Complete,location:c.LZ.Popup}),e===m.__.Banners&&(t.currentBanner=null),e===m.__.Thumbnails&&(t.currentThumbnail=null),t.onFinish()}))}},{key:"onFinish",value:function(){this.viewModel.clear(),l.Q.C$.trigger({application:h.OV.LIBRARY_EDITOR,action:h.eX.LibraryEditor.EDIT_FOLDER_IMAGES,args:[this.options.folderId]})}},{key:"getCurrentImageId",value:function(){return this.selectedImageType===m.__.Banners&&this.currentBanner?this.currentBanner.get("id"):this.selectedImageType===m.__.Thumbnails&&this.currentThumbnail?this.currentThumbnail.get("id"):void 0}},{key:"getCropRegionWidth",value:function(){return this.$el.find(".modal-body").width()}},{key:"getImageModel",value:function(){return new y.E({dataUrl:this.newImageEl.src,width:this.newImageEl.width,height:this.newImageEl.height})}},{key:"renderContent",value:function(){this.popupContentState===W.Upload&&(this.getUI("backBtn").addClass(z),this.getUI("cancelBtn").removeClass(z),r.Radio.channel(this.channelName).trigger(f.I3.HideButton),this.showChildView("content",new Z({imageCdnUrl:this.config.get("imageCdnUrl"),folderName:this.model.get("name"),bannerImage:this.currentBanner,thumbnailImage:this.currentThumbnail,bannerChannel:"".concat(this.channelName,":").concat(m.__.Banners),thumbnailChannel:"".concat(this.channelName,":").concat(m.__.Thumbnails),folderId:this.options.folderId})))}},{key:"renderCropper",value:function(){this.popupContentState===W.Crop&&(this.getUI("backBtn").removeClass(z),this.getUI("cancelBtn").addClass(z),r.Radio.channel(this.channelName).trigger(f.I3.ShowButton),this.showChildView("content",new p.a({model:this.getImageModel(),channelName:this.channelName,imageType:this.selectedImageType,minWidth:h.yE[this.selectedImageType].width,minHeight:h.yE[this.selectedImageType].height,getCropRegionWidth:o.bind(this.getCropRegionWidth,this)})))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.libraryId,spinnerEl:b.Kp.getSpinner({size:b.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onBeforeRender",value:function(){var e=this;this.model&&this.libraryId||(this.model=this.libraryDataService.getFolder(this.options.folderId),this.libraryDataService.getLibraries((function(t){return e.libraryId=t.first().id})))}},{key:"onRender",value:function(){this.model&&this.libraryId&&(this.currentBanner=this.model.get("banner"),this.currentThumbnail=this.model.get("thumbnail"),this.renderContent())}},{key:"onBeforeDestroy",value:function(){this.viewModel.clear()}}])&&q(n.prototype,v),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,v}(l.Q.G7)},58025:function(e,t,n){"use strict";n.d(t,{Y:function(){return r},a:function(){return g}});var r,o=n(48088),i=n(51934),a=n.n(i),l=n(31647),u=n(91465),c=n.n(u);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 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,f(r.key),r)}}function f(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=s(r))return r;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=d(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,m()?Reflect.construct(t,n||[],d(e).constructor):t.apply(e,n))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function d(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));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),h(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&&y(e,t)}(t,e),n=t,(i=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,r.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return c()}},{key:"className",get:function(){return"text-center"}},{key:"elements",get:function(){return{image:".img"}}},{key:"getMinCropBoxWidth",value:function(){return this.options.minWidth*this.getViewportToImageRatio()}},{key:"getMinCropBoxHeight",value:function(){return this.options.minHeight*this.getViewportToImageRatio()}},{key:"getViewportToImageRatio",value:function(){return this.options.getCropRegionWidth()/this.model.get("width")}},{key:"crop",value:function(){var e=this.cropper.getCroppedCanvas().toDataURL(this.getImageMimeType());o.Radio.channel(this.options.channelName).trigger(r.ImageCropped,e)}},{key:"getImageMimeType",value:function(){var e=this.model.get("dataUrl").match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(e)return e[1]}},{key:"renderCropper",value:function(){this.getMinCropBoxWidth();var e=this.getUI("image").get(0);this.cropper=new(a())(e,{viewMode:1,aspectRatio:this.options.minWidth/this.options.minHeight,minCropBoxWidth:this.getMinCropBoxWidth(),minCropBoxHeight:this.getMinCropBoxHeight(),autoCropArea:1})}},{key:"onRender",value:function(){this.renderCropper()}},{key:"onBeforeDestroy",value:function(){this.cropper.destroy()}}])&&p(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(l.Q.wA)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return h}});var r=n(31647),o=n(88172);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,u(r.key),r)}}function u(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==i(t)?t:t+""}function c(e,t,n){return t=p(t),function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,s()?Reflect.construct(t,n||[],p(e).constructor):t.apply(e,n))}function s(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(s=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(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(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),c(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({},o.ZV.Disabled,!0),o.ZV.Hidden,!1)}}])&&l(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},86983:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable," "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"minimumRecommended",{name:"lang",hash:{height:null!=(i=null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i)?i.height:i,width:null!=(i=null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i)?i.width:i},data:o}))+"\n"},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable," "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"minimumActual",{name:"lang",hash:{height:null!=(i=null!=(i=null!=t?t.options:t)?i.dimensions:i)?i.height:i,width:null!=(i=null!=(i=null!=t?t.options:t)?i.dimensions:i)?i.width:i},data:o}))+"\n"},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return'<button class="'+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.removeImage:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"remove",{name:"lang",hash:{},data:o}))+" "+l(a(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,u=e.escapeExpression,c=e.lambda;return'<h6 class="mb-0">'+u((n.lang||t&&t.lang||l).call(a,"edit",{name:"lang",hash:{},data:o}))+" "+u(c(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+'</h6>\n<div class="text-secondary mb-1">\n <em>\n'+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:"")+' </em>\n</div>\n<div class="my-1 '+u(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageContainer:i,t))+'">\n <div class="'+u(c(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageElement:i,t))+" "+u(c(null!=(i=null!=t?t.options:t)?i.backgroundColor:i,t))+'" style="background-image: url(\''+u(c(null!=(i=null!=t?t.options:t)?i.imageUrl:i,t))+'\')"></div>\n</div>\n<button class="btn btn-outline-dark my-1">'+u((n.lang||t&&t.lang||l).call(a,"upload",{name:"lang",hash:{},data:o}))+" "+u(c(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+"</button>\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasImage:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},80322:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="thumbnail-region"></div>\n<div class="dropdown-divider"></div>\n<div class="banner-region"></div>'},useData:!0})},42687:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return'<div class="content-region"></div>\n'},3:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},91465:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,'<img src="'+e.escapeExpression("function"==typeof(i=null!=(i=n.dataUrl||(null!=t?t.dataUrl:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"dataUrl",hash:{},data:o}):i)+'" class="img img-fluid" />'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2482],{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={}))},61519:function(e,t,r){"use strict";r.r(t),r.d(t,{SearchView:function(){return ie}});var n=r(48088),i=r(39479),o=r(21679),a=r(57857),c=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),g=r(33800),v=r(51174),b=r(48404),m=r(64649),S=r(19226),w=r(95061),C=r(13809),O=r(80867),k=r(29457),P=r(96605),E=r.n(P);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 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,t){if("object"!=j(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==j(t)?t:t+""}function M(e,t,r){return t=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,_()?Reflect.construct(t,r||[],T(e).constructor):t.apply(e,r))}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 D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}var I=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),M(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&&D(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"SearchResultsComponent"}},{key:"template",get:function(){return E()}},{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:k.LP.VideoList}}}},{key:"onBeforeRender",value:function(){return!!this.collection}},{key:"onRender",value:function(){var e=new O.Y({collection:this.collection,videosWithMetadata:this.options.videosWithMetadata,application:p.OV.SEARCH,videoItemComponentType:C.UC.Search,collectionIdentifier:null,config:this.options.config,emptyStateType:k.ub.Search,emptyStateOptions:{heading:a.T.getPhrase(this.lang,"emptyStateHeading",{query:this.options.query}),description:a.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),q=r(8614),x=r(15709),A=r.n(x);function F(e){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},F(e)}function H(e,t){for(var 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,N(n.key),n)}}function N(e){var t=function(e,t){if("object"!=F(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.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 Q(e,t,r){return t=W(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,U()?Reflect.construct(t,r||[],W(e).constructor):t.apply(e,r))}function U(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(U=function(){return!!e})()}function W(e){return W=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},W(e)}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}var K=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),Q(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&&B(e,t)}(t,e),r=t,(n=[{key:"name",get:function(){return"SearchHeaderComponent"}},{key:"template",get:function(){return A()}},{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 q.b5({collection:this.collection,channelName:this.options.channelName});this.showChildView("filters",e)}},{key:"onRender",value:function(){this.renderFilters()}}])&&H(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(s.Q.wA),L=r(21769),z=r(44937),G=r(5344),J=r(28434),X=r.n(J);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 $(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,t){if("object"!=Z(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.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 ee(e,t,r){return t=re(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,te()?Reflect.construct(t,r||[],re(e).constructor):t.apply(e,r))}function te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(te=function(){return!!e})()}function re(e){return re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},re(e)}function ne(e,t){return ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ne(e,t)}var ie=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),ee(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&&ne(e,t)}(t,e),r=t,(C=[{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(g.O.Video,this),this.ratingsDataService=o.u.getInstance(g.O.Ratings,this),this.playerDataService=o.u.getInstance(g.O.Player,this),this.videoMixinService=o.u.getInstance(g.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(L.I.TagFilter,"change:relevant:tags",this.updateSearchResults)}},{key:"name",get:function(){return"SearchView"}},{key:"title",get:function(){return a.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"search.search"}},{key:"template",get:function(){return X()}},{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 c.r.get("search",{ctor:z.AE})}},{key:"fetchSearchData",value:function(){this.ratings=this.ratingsDataService.getAllRatings(),this.ratings&&!this.filterCollection&&this.initializeFilterCollection()}},{key:"initializeFilterCollection",value:function(){this.filterCollection=G.qr.getFilterCollection(this.sources,this.ratings),this.setQueryParams()}},{key:"setQueryParams",value:function(){G.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:G.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,v.Z)({id:e.get("id"),typeId:e.get("typeId")})}))))}},{key:"updateSearchResults",value:function(){var e=this;this.resultCollection=null,this.renderResults(),this.queryString=G.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:G.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 K({collection:this.filterCollection,channelName:this.channelName});this.showChildView("header",e)}},{key:"renderResults",value:function(){var e=this.videoDataService.getVideoCollectionCursors(this.collectionIdentifier),t=new I({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:G.yf.getRouteQueryParams(this.queryModel,this.filterCollection,this.sources)}});this.showChildView("pagination",t)}}},{key:"fetchResults",value:function(){var e=this;if(this.filterCollection){this.queryString=G.yf.getQueryString(this.queryModel,this.filterCollection,this.sources,this.collectionIdentifier.cursor);var t=G.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:b.p.config,sources:w.T.libraries,exchanges:w.T.exchanges,currentUser:S.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()}}])&&$(r.prototype,C),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,C}(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)},96605:function(e,t,r){var n=r(32227);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(32227);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(32227);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})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[259],{86257:function(e,t,n){"use strict";var r;n.d(t,{L:function(){return r}}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(r||(r={}))},21974:function(e,t,n){"use strict";n.d(t,{u:function(){return s}});var r=n(57857),o=n(75459),i=n(86257),a=n(63791);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function l(e,t,n){var r;return r=function(e,t){if("object"!=u(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==u(r)?r:r+"")in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c="shared.shared-utils",s={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e,t){switch(e.type){case o.r.HostedLibrary:case o.r.CustomLibrary:return e.name;case o.r.Exchange:return r.T.getPhrase(c,"exchange");case o.r.Workspace:return r.T.getPhrase(c,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case o.r.HostedLibrary:case o.r.CustomLibrary:return"bg-info";case o.r.Exchange:return"bg-green";case o.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t=l(l(l(l(l(l(l({},i.L.Pdf,a.vn.FilePDF),i.L.Image,a.vn.FileImg),i.L.PowerPoint,a.vn.FilePowerpoint),i.L.Document,a.vn.FileWord),i.L.Excel,a.vn.FileExcel),i.L.Zip,a.vn.FileZip),i.L.File,a.vn.File)[e];return t||(t=a.vn.Folder),t},mapTypeToClass:function(e){switch(e){case i.L.Pdf:return"icon-red";case i.L.Image:return"icon-purple";case i.L.Document:return"icon-blue";case i.L.Excel:return"icon-green";case i.L.PowerPoint:return"icon-orange";case i.L.Zip:return"icon-teal";case i.L.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case i.L.Pdf:return r.T.getPhrase(c,"pdf");case i.L.Image:return r.T.getPhrase(c,"image");case i.L.Document:return r.T.getPhrase(c,"document");case i.L.Excel:return r.T.getPhrase(c,"spreadsheet");case i.L.PowerPoint:return r.T.getPhrase(c,"presentation");case i.L.Zip:return r.T.getPhrase(c,"zipArchive");case i.L.File:return r.T.getPhrase(c,"file");default:return""}}}},68708:function(e,t,n){"use strict";n.d(t,{c:function(){return N}});var r=n(31647),o=n(48088),i=n(57857),a=n(52076),u=n(70065),l=n(63791),c=n(57098),s=n(93569),p=n(76431),f=n.n(p),y={container:"vvTSf"};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 m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b(r.key),r)}}function b(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function h(e,t,n){return t=g(t),function(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,v()?Reflect.construct(t,n||[],g(e).constructor):t.apply(e,n))}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}var k=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),h(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&&w(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"LinkItemComponent"}},{key:"template",get:function(){return f()}},{key:"className",get:function(){return"".concat(y.container," rounded p-2 mb-2 d-flex align-items-center")}},{key:"lang",get:function(){return"libraryEditor.editLinks"}},{key:"attributes",get:function(){return{title:this.model.get("name")}}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.EDIT_LINK,args:[this.options.videoId,this.model.get("id")]}}}},{key:"onClickEdit",value:function(){var e=a.k.mergeOptions(this.options.analyticsOptions,{actionType:u.Vw.Edit,entity:u.py.Resource,workflowPhase:u.eu.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};a.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){var e=this;new s.Mr({title:i.T.getPhrase(this.lang,"removeHeading"),text:i.T.getPhrase(this.lang,"removeConfirm",{name:s.m$.escapeExpression(this.model.get("name"))}),buttons:[{text:i.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:i.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:s.N0.generateUniqueChannelName(this)}).render().done((function(){o.Radio.channel(e.options.channelName).trigger("delete:link",e.model.get("id"))}))}},{key:"viewOptions",value:function(){return{styles:y,editable:this.options.editable,linkSvg:l.Nj.getSvg(l.vn.Link),editSvg:l.Nj.getSvg(l.vn.Edit),trashSvg:l.Nj.getSvg(l.vn.Delete)}}}])&&m(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA),O=n(52929),P=n.n(O);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 S(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,x(r.key),r)}}function j(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function x(e){var t=function(e,t){if("object"!=T(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==T(t)?t:t+""}function C(e,t,n){return t=L(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,_()?Reflect.construct(t,n||[],L(e).constructor):t.apply(e,n))}function _(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_=function(){return!!e})()}function L(e){return L=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},L(e)}function I(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&&R(e,t)}function R(e,t){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},R(e,t)}var N=function(e){function t(e){return S(this,t),C(this,t,[e])}return I(t,e),j(t,[{key:"name",get:function(){return"VideoLinksComponent"}},{key:"template",get:function(){return P()}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{links:{el:".links-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return this.options}},{key:"onRender",value:function(){this.showChildView("links",new D({collection:this.options.customCollection||this.model.get("links"),channelName:this.options.channelName,analyticsOptions:this.options.analyticsOptions,editable:this.options.editable,videoId:this.options.videoId,headingText:this.options.headingText,emptyStateText:this.options.emptyStateText}))}}])}(r.Q.wA),D=function(e){function t(e){return S(this,t),C(this,t,[e])}return I(t,e),j(t,[{key:"name",get:function(){return"LinkItemComponentCollection"}},{key:"childViewOptions",get:function(){return this.options}},{key:"childView",get:function(){return k}}])}(r.Q.$W)},77605:function(e,t,n){"use strict";n.d(t,{c:function(){return V},h:function(){return F}});var r=n(48088),o=n(57857),i=n(31647),a=n(53808),u=n(52076),l=n(70065),c=n(63791),s=n(21974),p=n(95117),f=n.n(p);function y(e){return y="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},y(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,m(r.key),r)}}function m(e){var t=function(e,t){if("object"!=y(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function b(e,t,n){return t=v(t),function(e,t){if(t&&("object"===y(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,h()?Reflect.construct(t,n||[],v(e).constructor):t.apply(e,n))}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(h=function(){return!!e})()}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var w=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),b(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&&g(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"ResourceItemComponent"}},{key:"template",get:function(){return f()}},{key:"className",get:function(){return"".concat("CdlNn"," rounded p-2 mb-2")}},{key:"events",value:function(){return{"click .delete":"onClickDelete","click .edit":"onClickEdit"}}},{key:"appLinks",get:function(){return{".edit":this.options.getEditAppLink(this.model.get("id"))}}},{key:"onClickEdit",value:function(){var e=u.k.mergeOptions(this.options.analyticsOptions,{actionType:l.Vw.Edit,entity:l.py.Resource,workflowPhase:l.eu.Start}),t={id:this.model.get("id"),parentId:+this.options.videoId};u.k.logUserAction(t,e)}},{key:"onClickDelete",value:function(){a.q.isFunction(this.options.onClickDelete)&&this.options.onClickDelete(this.model)}},{key:"viewOptions",value:function(){var e=this.model.get("metadata"),t=e?e.type:"";return{editable:this.options.editable,extension:s.u.mapTypeToExtension(t),svg:c.Nj.getSvg(s.u.mapTypeToSvg(t)),iconClass:s.u.mapTypeToClass(t),resourceType:s.u.mapTypeToName(t),editSvg:c.Nj.getSvg(c.vn.Edit),trashSvg:c.Nj.getSvg(c.vn.Delete)}}}])&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Q.wA),k=n(41934),O=n(25094),P=n(54758),T=n(99114),S=n.n(T);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 j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,_(r.key),r)}}function C(e,t,n){return t&&x(e.prototype,t),n&&x(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e){var t=function(e,t){if("object"!=E(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.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 L(e,t,n){return t=R(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,I()?Reflect.construct(t,n||[],R(e).constructor):t.apply(e,n))}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}function N(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}var F=function(e){function t(e){return j(this,t),L(this,t,[e])}return N(t,e),C(t,[{key:"name",get:function(){return"VideoResourcesComponentCollection"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"childView",get:function(){return w}},{key:"childViewOptions",get:function(){var e=this;return{editable:this.options.editable,videoId:this.options.videoId,analyticsOptions:this.options.analyticsOptions,onClickDelete:function(t){return e.onClickDelete(t)},getEditAppLink:function(t){return{application:O.OV.LIBRARY_EDITOR,action:k.e.LibraryEditor.EDIT_RESOURCE,args:[e.options.videoId,t]}}}}},{key:"onClickDelete",value:function(e){var t=this;new P.M({title:o.T.getPhrase(this.lang,"removeHeading"),text:o.T.getPhrase(this.lang,"removeBody",{resourceName:e.get("name")}),buttons:[{text:o.T.getPhrase(this.lang,"remove"),className:"btn btn-danger",success:!0},{text:o.T.getPhrase(this.lang,"cancel"),className:"btn btn-outline-dark",close:!0}],channelName:"".concat(this.name).concat(this.cid)}).render().done((function(){r.Radio.channel(t.options.channelName).trigger("delete:resource",e.get("id"))}))}}])}(i.Q.$W),V=function(e){function t(e){return j(this,t),L(this,t,[e])}return N(t,e),C(t,[{key:"name",get:function(){return"VideoResourcesComponent"}},{key:"template",get:function(){return S()}},{key:"lang",get:function(){return"libraryEditor.videoResources"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return this.options.customCollection?"":"py-3 border-top"}},{key:"regions",value:function(){return{resources:{replaceElement:!0,el:".resource-list-region"}}}},{key:"renderResources",value:function(){var e=new F({collection:this.options.customCollection||this.model.resources,editable:this.options.editable||!1,videoId:this.options.videoId||this.model.get("id"),channelName:this.options.parentChannelName||this.channelName});this.showChildView("resources",e)}},{key:"viewOptions",value:function(){return{resourcesHeadingText:this.options.headerText||o.T.getPhrase(this.lang,"heading"),emptyStateText:this.options.emptyStateText}}},{key:"onRender",value:function(){this.renderResources()}}])}(i.Q.wA)},95117:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda;return'<a class="float-end svg-container cursor-pointer text-secondary delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+'</a>\n<a class="float-end svg-container cursor-pointer text-secondary edit">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,u=e.lambda,l=e.escapeExpression,c=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,p="function";return'<span title="'+l(u(null!=(i=null!=t?t.options:t)?i.resourceType:i,t))+'" class="d-inline-block align-middle me-2 svg-container '+l(u(null!=(i=null!=t?t.options:t)?i.iconClass:i,t))+'">'+(null!=(i=u(null!=(i=null!=t?t.options:t)?i.svg:i,t))?i:"")+'</span>\n<a href="'+l(typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:s)===p?a.call(c,{name:"url",hash:{},data:o}):a)+"?name="+l(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:s)===p?a.call(c,{name:"name",hash:{},data:o}):a)+'" class="align-middle">\n '+l(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:s)===p?a.call(c,{name:"name",hash:{},data:o}):a)+"\n</a>\n"+(null!=(i=n.if.call(c,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},76431:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda;return' <a class="ms-auto me-1 svg-container cursor-pointer text-secondary edit">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.editSvg:i,t))?i:"")+'</a>\n <a class="svg-container cursor-pointer text-secondary delete">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.trashSvg:i,t))?i:"")+"</a>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a,u=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,c="function",s=e.escapeExpression;return'<span class="svg-container text-info me-2">'+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.linkSvg:i,t))?i:"")+'</span>\n<a class="w-75 text-truncate" href="'+s(typeof(a=null!=(a=n.url||(null!=t?t.url:t))?a:l)===c?a.call(u,{name:"url",hash:{},data:o}):a)+'" target="_blank">'+s(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)===c?a.call(u,{name:"name",hash:{},data:o}):a)+"</a>\n"+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.editable:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},52929:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.headingText:i,t))+"</h5>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\n<div class="links-region"></div>'},useData:!0})},99114:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.emptyStateText:i,t))+"</p>"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.resourcesHeadingText:i,t))+"</h5>\n"+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.emptyStateText:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'\n<div class="resource-list-region"></div>'},useData:!0})}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[2601],{21053:function(e,t,n){"use strict";n.d(t,{W:function(){return g}});var o=n(48088),i=n(57857),r=n(31647),a=n(57085),s=n(35630),l=n(57098),u=n(43791),c=n.n(u),d={svgContainer:"mtegw"};function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,p(o.key),o)}}function p(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=h(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function v(e,t,n){return t=m(t),function(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,y()?Reflect.construct(t,n||[],m(e).constructor):t.apply(e,n))}function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(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),v(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&&b(e,t)}(t,e),n=t,(r=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0},breadcrumbs:{el:".breadcrumbs-region",replaceElement:!0}}}},{key:"lang",get:function(){return"libraryEditor.editVideoTabs"}},{key:"template",get:function(){return c()}},{key:"viewOptions",value:function(){return{styles:d}}},{key:"onSave",value:function(){o.Radio.channel(l.OV.LIBRARY_EDITOR).trigger(l.eX.LibraryEditor.SAVE_VIDEO)}},{key:"getLocationBreadcrumb",value:function(){switch(this.options.context){case"edit":return{name:i.T.getPhrase(this.lang,"videoDetails")};case"chapters":return{name:i.T.getPhrase(this.lang,"chapters")};case"resources":return{name:i.T.getPhrase(this.lang,"resources")}}}},{key:"onRender",value:function(){this.showChildView("tabs",new s.n({tabs:this.options.tabs,activeTab:this.options.activeTab})),this.showChildView("breadcrumbs",new a.n({folder:this.options.folder,libraries:this.options.libraries,video:this.model,customBreadcrumbs:[this.getLocationBreadcrumb()],enableLastItemAppLink:!1}))}}])&&f(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.wA)},74250:function(e,t,n){"use strict";n.d(t,{z:function(){return w}});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 h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function f(e,t,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,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=h(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==h(t)?t:t+""}function y(e,t,n){return t=b(t),function(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,m()?Reflect.construct(t,n||[],b(e).constructor):t.apply(e,n))}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}var w=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),y(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&&g(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(f(f({},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()}}])&&p(n.prototype,u),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,u}(r.Q.wA)},44391:function(e,t,n){"use strict";n.d(t,{K:function(){return E}});var o=n(11306),i=n(31647),r=n(48088),a=n(57098),s=n(26457),l=n(15564),u=n.n(l);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 d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,h(o.key),o)}}function h(e){var t=function(e,t){if("object"!=c(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function f(e,t,n){return t=v(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,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 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(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),f(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&&y(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"TagItemComponent"}},{key:"tagName",get:function(){return this.options.behavior===s.Dm.Link?"a":"span"}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?"":" d-inline-flex"),t="".concat(this.isSaving()?" saving":""),n="".concat(this.options.behavior===s.Dm.Disabled?" ".concat("dE3WC"):""),o="".concat(this.options.behavior===s.Dm.Filter?" cursor-pointer":"");return"rounded-pill tag py-1 px-2 flex-shrink-0 ".concat(o).concat(e).concat(t).concat(n)}},{key:"template",get:function(){return u()}},{key:"elements",get:function(){return{close:".btn-close"}}},{key:"appLinks",get:function(){return this.options.behavior!==s.Dm.Link?{}:{"[this]":{application:a.OV.SEARCH,action:a.eX.Search.HOME,params:{tag:this.model.get("name")}}}}},{key:"defaults",get:function(){return{behavior:s.Dm.Link,orientation:s.zM.Flex}}},{key:"events",value:function(){return this.options.removeEvent?{"click @ui.close":"onRemoveTag"}:{click:"onClickTag"}}},{key:"initialize",value:function(){this.options.behavior===s.Dm.Edit&&this.listenTo(this.model,"change",this.render)}},{key:"isSaving",value:function(){if(this.options.behavior!==s.Dm.Filter){var e=this.model.pick("id","name","remove"),t=e.id,n=e.name;return!!e.remove||!t||!n}}},{key:"onRemoveTag",value:function(e){if(e.stopPropagation(),!this.isSaving())return this.model.set("remove",!0),r.Radio.channel(this.options.channelName).trigger(this.options.removeEvent,this.model),!1}},{key:"onClickTag",value:function(){this.options.behavior!==s.Dm.Filter||this.options.removeEvent||r.Radio.channel(this.options.channelName).trigger(this.options.clickEvent,this.model)}},{key:"viewOptions",value:function(){return{removable:this.options.removeEvent}}},{key:"onRender",value:function(){this.resetClassName()}}])&&d(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(i.Q.wA);function b(e){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},b(e)}function g(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,w(o.key),o)}}function w(e){var t=function(e,t){if("object"!=b(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=b(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(t)?t:t+""}function k(e,t,n){return t=T(t),function(e,t){if(t&&("object"===b(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,n||[],T(e).constructor):t.apply(e,n))}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}var E=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),k(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&&O(e,t)}(t,e),n=t,(r=[{key:"initialize",value:function(){this.options.behavior!==s.Dm.Edit||this.options.removeEvent||i.Q.Ry.throw(new o.H("removeEvent is required to edit tags."))}},{key:"name",get:function(){return"TagComponentCollection"}},{key:"defaults",get:function(){return{orientation:s.zM.Flex}}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.zM.Vertical?"d-flex align-items-start flex-column":"d-flex flex-wrap gap-1");return"tags ".concat(e)}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent,clickEvent:this.options.clickEvent}}},{key:"childView",get:function(){return m}}])&&g(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(i.Q.$W)},18974:function(e,t,n){"use strict";n.r(t),n.d(t,{EditVideoView:function(){return ut}});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),h=n(52076),f=n(70065),p=n(8371),v=n(13156),y=n(29625),m=n(57098),b=n(29457),g=n(68619),w=n(64404),k=n(19226),S=n(93569),T=n(45837),O=n(24184),E=n(72998),C=n(95168),P=n(44106),j=n.n(P),N=n(99844),D=n(72891),x=n.n(D);function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function _(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,t){if("object"!=M(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=M(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==M(t)?t:t+""}function R(e,t,n){return t=B(t),function(e,t){if(t&&("object"===M(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,I()?Reflect.construct(t,n||[],B(e).constructor):t.apply(e,n))}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function B(e){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},B(e)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}var A=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),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),n=t,(i=[{key:"initialize",value:function(){var e=this;this.listenTo(this.model,"change",(function(){return e.options.viewModel.validate()}))}},{key:"template",get:function(){return x()}},{key:"name",get:function(){return"ExtraInfoItemComponent"}},{key:"regions",value:function(){return{textArea:{el:".text-area-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=value]":{observe:"value",setOptions:{validate:!0}}}}},{key:"onRender",value:function(){this.showChildView("textArea",new N.F({name:"value",class:"form-control",placeholder:this.model.get("placeholder"),id:"admin-notes"})),this.stickit(),o.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),o.Validation.unbind(this)}}])&&_(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(d.Q.wA);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 F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,J(o.key),o)}}function Q(e,t,n){return t&&z(e.prototype,t),n&&z(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function J(e){var t=function(e,t){if("object"!=L(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=L(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==L(t)?t:t+""}function Z(e,t,n){return t=K(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,H()?Reflect.construct(t,n||[],K(e).constructor):t.apply(e,n))}function H(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(H=function(){return!!e})()}function K(e){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},K(e)}function G(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}function W(e,t){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},W(e,t)}var Y=function(e){function t(e){return F(this,t),Z(this,t,[e])}return G(t,e),Q(t,[{key:"name",get:function(){return"ExtraInfoComponentCollection"}},{key:"childView",get:function(){return A}},{key:"childViewOptions",get:function(){return{viewModel:this.options.viewModel}}}])}(d.Q.$W),q=function(e){function t(e){return F(this,t),Z(this,t,[e])}return G(t,e),Q(t,[{key:"name",get:function(){return"ExtraInfoComponent"}},{key:"template",get:function(){return j()}},{key:"className",get:function(){return"border-top pt-3"}},{key:"regions",value:function(){return{fields:{el:".fields-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("fields",new Y({collection:this.model.fields,viewModel:this.model}))}}])}(d.Q.wA),X=n(88483),$=n(2772),ee=n(10101),te=n(86272),ne=n.n(te);function oe(e){return oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},oe(e)}function ie(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,re(o.key),o)}}function re(e){var t=function(e,t){if("object"!=oe(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=oe(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==oe(t)?t:t+""}function ae(e,t,n){return t=le(t),function(e,t){if(t&&("object"===oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,se()?Reflect.construct(t,n||[],le(e).constructor):t.apply(e,n))}function se(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(se=function(){return!!e})()}function le(e){return le=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},le(e)}function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}var ce=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),ae(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&&ue(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){this.viewModel=c.r.get("image:storage")}},{key:"name",get:function(){return"EditThumbnailComponent"}},{key:"lang",get:function(){return"libraryEditor.editThumbnail"}},{key:"template",get:function(){return ne()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:ee.YR,channelName:this.options.channelName,buttonSelector:".upload-thumbnail",imageType:b.__.Thumbnails,appLink:{application:m.OV.LIBRARY_EDITOR,action:m.eX.LibraryEditor.UPLOAD_THUMBNAIL,args:[this.options.model.id]},saveImage:function(t){return e.viewModel.set({dataUrl:t})}}]}},{key:"defaults",get:function(){return{editable:!0}}},{key:"regions",value:function(){return{thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"viewOptions",value:function(){return{editable:this.options.editable,dimensions:m.nq[b.__.Thumbnails]}}},{key:"onRender",value:function(){this.showChildView("thumbnail",new $.Z({model:this.model,thumbnailOptions:{size:X.h2.Medium}}))}}])&&ie(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),de=n(74250),he=n(17391),fe=n(36022),pe=n(3974),ve=n(44391),ye=n(26457),me=n(30992),be=n.n(me);function ge(e){return ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(e)}function we(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,ke(o.key),o)}}function ke(e){var t=function(e,t){if("object"!=ge(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=ge(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ge(t)?t:t+""}function Se(e,t,n){return t=Oe(t),function(e,t){if(t&&("object"===ge(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Te()?Reflect.construct(t,n||[],Oe(e).constructor):t.apply(e,n))}function Te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Te=function(){return!!e})()}function Oe(e){return Oe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Oe(e)}function Ee(e,t){return Ee=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ee(e,t)}var Ce=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),Se(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),n=t,(o=[{key:"name",get:function(){return"TagsComponent"}},{key:"template",get:function(){return be()}},{key:"lang",get:function(){return"libraryEditor.tags"}},{key:"defaults",get:function(){return{headerText:u.T.getPhrase(this.lang,"heading"),orientation:ye.zM.Flex}}},{key:"regions",value:function(){return{tagList:{el:".tag-list-region",replaceElement:!0},tagSelector:{el:".tag-selector-region",replaceElement:!0}}}},{key:"initialize",value:function(){this.options.behavior!==ye.Dm.Edit||this.options.parentId||d.Q.Ry.throw(new s.H("parentId is required to edit tags."))}},{key:"getTypeaheadConfigs",value:function(){var e=pe.M.getTypeaheadConfig(),t=pe.M.getBloodhoundConfig(),n={newType:m.n8.TagsRaw},o={newType:m.n8.TagsRaw,footerTemplate:he.J.getConfirmSelectionTemplate()};return[{name:m.n8.TagsRaw,typeaheadConfig:e,bloodhoundConfig:t,options:{hideEmptyResults:!0}},{name:"add-new",typeaheadConfig:e,bloodhoundConfig:t,options:n},{name:"empty-suggestion",typeaheadConfig:e,bloodhoundConfig:t,options:o}]}},{key:"viewOptions",value:function(){var e;return this.showEmptyStateText()&&(e=this.options.emptyStateText),{headerText:this.options.headerText,editable:this.options.behavior===ye.Dm.Edit,emptyStateText:e}}},{key:"showEmptyStateText",value:function(){return this.options.behavior!==ye.Dm.Edit&&!this.collection.length&&!!this.options.emptyStateText}},{key:"renderTagSelector",value:function(){this.options.behavior===ye.Dm.Edit&&this.showChildView("tagSelector",new fe.M({model:this.model,parentChannelName:this.options.channelName,inputId:"tag-select",selectEvent:"add:tag",typeaheadConfigs:this.getTypeaheadConfigs(),placeholderText:u.T.getPhrase(this.lang,"placeholder"),callbacks:{onRender:he.J.selectFirstResult,onBlur:he.J.clearInputOnBlur},typeaheadOptions:{hint:!1},actionOptions:{clearOnSelect:!0},autofocus:this.options.autofocus}))}},{key:"renderTagList",value:function(){this.showEmptyStateText()||this.showChildView("tagList",new ve.K({collection:this.collection,channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent}))}},{key:"onRender",value:function(){this.renderTagSelector(),this.renderTagList()}}])&&we(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Pe=n(58259),je=n.n(Pe);function Ne(e){return Ne="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},Ne(e)}function De(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,xe(o.key),o)}}function xe(e){var t=function(e,t){if("object"!=Ne(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=Ne(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ne(t)?t:t+""}function Me(e,t,n){return t=Ve(t),function(e,t){if(t&&("object"===Ne(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||[],Ve(e).constructor):t.apply(e,n))}function _e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(_e=function(){return!!e})()}function Ve(e){return Ve=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ve(e)}function Re(e,t){return Re=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Re(e,t)}var Ie=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),Me(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&&Re(e,t)}(t,e),n=t,(o=[{key:"name",get:function(){return"CollapseButtonComponent"}},{key:"className",get:function(){return"d-inline-block cursor-pointer expand-details info-link mb-3"}},{key:"lang",get:function(){return"libraryEditor.collapseButton"}},{key:"template",get:function(){return je()}},{key:"events",value:function(){return{click:"onClick"}}},{key:"onClick",value:function(){this.options.onClick()}},{key:"viewOptions",value:function(){return{showMorePhrase:this.options.collapse?"showMore":"showLess"}}}])&&De(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Be=n(23468),Ue=n.n(Be),Ae={suggestEdit:"AgfOM"};function Le(e){return Le="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},Le(e)}function Fe(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,ze(o.key),o)}}function ze(e){var t=function(e,t){if("object"!=Le(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=Le(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Le(t)?t:t+""}function Qe(e,t,n){return t=Ze(t),function(e,t){if(t&&("object"===Le(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,Je()?Reflect.construct(t,n||[],Ze(e).constructor):t.apply(e,n))}function Je(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Je=function(){return!!e})()}function Ze(e){return Ze=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ze(e)}function He(e,t){return He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},He(e,t)}var Ke=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),Qe(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&&He(e,t)}(t,e),n=t,(o=[{key:"initialize",value:function(){var e=this;this.listenTo(this.options.channelName,"update:tags",(function(){return e.renderCustomerTags(!0)})),this.initializeCollapse()}},{key:"name",get:function(){return"EditVideoDetailsComponent"}},{key:"className",get:function(){return"edit-video-detail py-3"}},{key:"lang",get:function(){return"libraryEditor.editVideoDetails"}},{key:"template",get:function(){return Ue()}},{key:"appLinks",get:function(){return{".suggest-edit":{application:m.OV.LIBRARY_EDITOR,action:m.eX.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.id]}}}},{key:"events",value:function(){return{"click .expand-details":"onClickExpandDetails"}}},{key:"elements",get:function(){return{expandable:".collapse-area"}}},{key:"regions",value:function(){return{topSave:{el:".top-save-region",replaceElement:!0},bottomSave:{el:".bottom-save-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0},basicInfo:{el:".basic-info-region",replaceElement:!0},collapseButton:{el:".collapse-button-region",replaceElement:!0},additionalInfo:{el:".additional-details-region",replaceElement:!0},productionInfo:{el:".production-info-region",replaceElement:!0},fields:{el:".fields-region",replaceElement:!0},clickViewTags:{el:".cv-tags-region",replaceElement:!1},customerTags:{el:".customer-tags-region",replaceElement:!0}}}},{key:"initializeCollapse",value:function(){var e,t,n,o,i,r;this.collapse=!(this.model.get("broadcastDate")||(null===(e=this.model.channel)||void 0===e?void 0:e.get("id"))||this.model.get("productionYear")||(null===(t=this.model.productionCompanies)||void 0===t?void 0:t.any((function(e){return e.get("id")})))||(null===(n=this.model.distributors)||void 0===n?void 0:n.any((function(e){return e.get("id")})))||(null===(o=this.model.producers)||void 0===o?void 0:o.any((function(e){return e.get("id")})))||(null===(i=this.model.directors)||void 0===i?void 0:i.any((function(e){return e.get("id")})))||(null===(r=this.model.fields)||void 0===r?void 0:r.any((function(e){return e.get("id")>0}))))}},{key:"onClickCollapse",value:function(){this.collapse=!this.collapse,this.renderCollapseButton(),this.collapse?this.getUI("expandable").hide():this.getUI("expandable").show()}},{key:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new de.z({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-end"})),this.showChildView("bottomSave",new de.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,ratings:this.options.ratings,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new ce({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderCollapseButton",value:function(){this.showChildView("collapseButton",new Ie({onClick:this.onClickCollapse.bind(this),collapse:this.collapse}))}},{key:"renderAdditionalInfo",value:function(){this.options.currentUser.get("instanceRegion")!==p.b.US&&this.showChildView("additionalInfo",new O.a({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderProductionInfo",value:function(){this.showChildView("productionInfo",new C.O({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderFields",value:function(){this.options.currentUser.get("instanceRegion")!==p.b.US&&this.showChildView("fields",new q({model:this.model,channelName:this.options.channelName}))}},{key:"renderClickViewTags",value:function(){if(!this.options.editable){var e=S.BK.filterObjectsByOwnerType(this.model.tags,T.N.ClickView,this.options.currentUser.get("customerId"));this.showChildView("clickViewTags",new Ce({parentId:this.model.get("id"),collection:e,orientation:ye.zM.Flex,behavior:ye.Dm.Disabled,channelName:this.options.channelName,headerText:u.T.getPhrase(this.lang,"clickviewTags"),emptyStateText:u.T.getPhrase(this.lang,"clickviewTagsEmpty")}))}}},{key:"renderCustomerTags",value:function(e){var t=S.BK.filterObjectsByOwnerType(this.model.tags,T.N.Customer,this.options.currentUser.get("customerId"));this.showChildView("customerTags",new Ce({parentId:this.model.get("id"),collection:t,channelName:this.options.channelName,behavior:ye.Dm.Edit,headerText:this.options.editable?u.T.getPhrase(this.lang,"tags"):u.T.getPhrase(this.lang,"customerTags"),removeEvent:"remove:tag",autofocus:!!e}))}},{key:"renderTags",value:function(){this.renderClickViewTags(),this.renderCustomerTags()}},{key:"viewOptions",value:function(){return{styles:Ae,editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:S.M2.isExchangeVideo(this.model),collapse:this.collapse}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail(),this.renderTags(),this.renderCollapseButton(),this.renderAdditionalInfo(),this.renderProductionInfo(),this.renderFields()}}])&&Fe(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(d.Q.wA),Ge=n(21053),We=n(40622),Ye=n(53854),qe=n(75535),Xe=n(95061),$e=n(57785),et=n(55230),tt=n.n(et);function nt(e){return nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nt(e)}function ot(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,it(o.key),o)}}function it(e){var t=function(e,t){if("object"!=nt(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!=nt(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==nt(t)?t:t+""}function rt(e,t,n){return t=st(t),function(e,t){if(t&&("object"===nt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,at()?Reflect.construct(t,n||[],st(e).constructor):t.apply(e,n))}function at(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(at=function(){return!!e})()}function st(e){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},st(e)}function lt(e,t){return lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},lt(e,t)}var ut=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=rt(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&&lt(e,t)}(t,e),n=t,T=[{key:"name",get:function(){return"EditVideoView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editVideo"}},{key:"className",get:function(){return"bg-white p-3 rounded"}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"template",get:function(){return tt()}},{key:"regions",value:function(){return{tabs:{el:".tab-region",replaceElement:!0,partialLoading:b.LP.EditVideoTabs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:b.LP.EditVideoDetails}}}},{key:"initialize",value:function(){this.navLock=l.u.getInstance(m.K9.NavLock,this),this.initDataListeners(),S.Si.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=l.u.getInstance(m.Or.Video,this),this.tagDataService=l.u.getInstance(m.Or.Tags,this),this.seriesDataService=l.u.getInstance(m.Or.Series,this),this.ratingsDataService=l.u.getInstance(m.Or.Ratings,this),this.fieldsDataService=l.u.getInstance(m.Or.Fields,this),this.alertService=l.u.getInstance(m.K9.Alerts,this),this.personDataService=l.u.getInstance(m.Or.Person,this),this.companyDataService=l.u.getInstance(m.Or.Company,this)}},{key:"initDataListeners",value:function(){this.listenTo(r.G.SHELL,d.Q.Vy.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(m.Vk.VIDEO,"videos:".concat(this.options.videoId,":sync"),this.render),this.listenTo(m.Vk.VIDEO,"videos:".concat(this.options.videoId,":error"),this.onError),this.listenTo(m.Vk.RATINGS,"".concat(m.M_.RATINGS,":sync"),this.render),this.listenTo(m.Vk.VIDEO,"".concat(m.M_.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),this.onThumbnailUpdated),this.listenTo(this.channelName,"select:rating",i.partial(this.onTypeaheadSelection,i,"rating")),this.listenTo(this.channelName,"select:channel",i.partial(this.onTypeaheadSelection,i,"channel")),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.channelName,"add:distributors",this.onSelectDistributor),this.listenTo(this.channelName,"add:productionCompanies",this.onSelectProductionCompany),this.listenTo(this.channelName,"add:directors",this.onSelectDirector),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:tag",this.onAddTag),this.listenTo(this.channelName,"remove:distributors",this.onRemoveDistributor),this.listenTo(this.channelName,"remove:productionCompanies",this.onRemoveProductionCompany),this.listenTo(this.channelName,"remove:directors",this.onRemoveDirector),this.listenTo(this.channelName,"remove:producers",this.onRemoveProducer),this.listenTo(this.channelName,"remove:tag",this.onRemoveTag),this.listenTo(this.channelName,We.NT.Save,this.onSave),this.listenTo(this.channelName,We.NT.Undo,this.onUndo),this.listenTo(this.channelName,We.NT.DetectInput,this.onTypeaheadInput),this.listenTo(this.channelName,"image:load",this.onBeforeThumbnailUpload)}},{key:"onError",value:function(e){switch(e.type){case a.h.NotFound:d.Q.Ry.throw(new qe.l);break;case a.h.Forbidden:d.Q.Ry.throw(new Ye.a)}}},{key:"onTypeaheadSelection",value:function(e,t,n){if(n){var o=this.viewModel.get(t),r=o.filter({name:e.name});i.each(r,(function(e){return o.remove(e)})),o.add(e)}else this.viewModel.set(t,e);this.onModelChange(e,{manualUpdate:!0})}},{key:"onTypeaheadInput",value:function(e,t,n){e.get("name")||(n&&n.isCollection?this.viewModel.get(t).remove(e.get("id"),{silent:!0}):this.viewModel.get(t).clear({silent:!0}),this.onModelChange(null,{manualUpdate:!0}),"series"===t&&(this.validateSeries(),o.Radio.channel(this.channelName).trigger("clear:series")))}},{key:"onSelectSeries",value:function(e){var t=this;e.id?this.seriesDataService.getSeries(e.id,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection(e.toJSON(),"series")})):e.name&&this.seriesDataService.createSeries(e.name,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection({id:e.id},"series")}))}},{key:"onSelectSeason",value:function(e){var t=this;if(i.isNull(e))return this.viewModel.get("season").clear({silent:!0}),this.viewModel.set("episodeNumber",null),S.yV.deselectAll(this.viewModel.get("series.seasons")),void this.onModelChange(null,{manualUpdate:!0});if(e.id)return this.viewModel.set("season",e),S.yV.setSelected(e.id,this.viewModel.get("series.seasons")),void this.onModelChange(e,{manualUpdate:!0});if(e.number){var n=this.viewModel.get("series.id");this.seriesDataService.createSeason(e,n,(function(e){t.viewModel.set("season",e.toJSON()),!t.viewModel.get("series.seasons")&&t.viewModel.get("series").set("seasons",new y.i),t.viewModel.get("series.seasons").add(e.toJSON()),S.yV.setSelected(e.id,t.viewModel.get("series.seasons")),t.onModelChange(e.toJSON(),{manualUpdate:!0}),t.render()}))}}},{key:"onSelectDistributor",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"distributors",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"distributors",!0)}))}},{key:"onSelectProductionCompany",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"productionCompanies",!0):e.name&&this.companyDataService.createCompany(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"productionCompanies",!0)}))}},{key:"onSelectDirector",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"directors",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"directors",!0)}))}},{key:"onSelectProducer",value:function(e){var t=this;e.id?this.onTypeaheadSelection(e,"producers",!0):e.name&&this.personDataService.createPerson(e.name,(function(e){t.onTypeaheadSelection(e.toJSON(),"producers",!0)}))}},{key:"onRemoveDistributor",value:function(e){this.removeFromCollection(e,"distributors")}},{key:"onRemoveProductionCompany",value:function(e){this.removeFromCollection(e,"productionCompanies")}},{key:"onRemoveDirector",value:function(e){this.removeFromCollection(e,"directors")}},{key:"onRemoveProducer",value:function(e){this.removeFromCollection(e,"producers")}},{key:"removeFromCollection",value:function(e,t){e&&e.id&&t&&(this.viewModel.get(t).remove(e.id),this.onModelChange(null,{manualUpdate:!0}))}},{key:"onAddTag",value:function(e){var t=this;if(e&&e.name){var n=e.name.trim().toLowerCase();if(n&&!S.yV.findModelByName(n,this.viewModel.tags)){var i=new g.V({name:n});this.viewModel.tags.add(i),this.tagDataService.createTag(n,this.model.get("id"),(function(e){i.set(e.toJSON()),o.Radio.channel(t.channelName).trigger("update:tags")}))}}}},{key:"onRemoveTag",value:function(e){var t=this;e instanceof g.V&&e.id&&this.tagDataService.dissociateTag(e.id,this.model.get("id"),(function(){t.viewModel.tags.remove(e),o.Radio.channel(t.channelName).trigger("update:tags"),t.logDissocAction(t.model.get("id"),e,f.py.Tag)}))}},{key:"saveFields",value:function(e,t){var n=this,o=0;e.updatedVideo=i.extend({},e.updatedVideo||{});var r=function(){++o===e.dataChanges.fields.length&&t(e)};i.each(e.dataChanges.fields,(function(e){if(e.id&&!e.value)return n.viewModel.fields.remove(n.viewModel.fields.findWhere({id:e.id})),void n.fieldsDataService.deleteField(e.id,r);!e.id||e.id>0?n.fieldsDataService.updateField(e,r):n.fieldsDataService.addField(n.options.videoId,e,(function(t){n.viewModel.fields.findWhere({id:e.id}).set("id",t.id),r()}))}))}},{key:"bulkDissoc",value:function(e,t){this.videoDataService.bulkDissoc(this.model.id,e.pendingDissocs,(function(){t(e)}))}},{key:"saveVideo",value:function(e,t){var n=this,o=i.omit(e.dataChanges,"fields");if(i.isEmpty(o))t(e);else{var r=i.omit(e.dataChanges,"fields");this.videoDataService.updateVideo(this.model.get("id"),this.folder.get("id"),r,(function(o){(e.dataChanges.series&&e.dataChanges.series.id||e.dataChanges.episodeNumber||e.dataChanges.season)&&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(We.NT.DisableSave),this.logEditAction(e.dataChanges,f.eu.Save);var t=v.J.updatedVideoAlert(this.viewModel.get("name"));this.alertService.success(t||"Video was successfully updated")()}}},{key:"onSave",value:function(){if(this.viewModel.validate(),!1===this.viewModel.isValid())return this.updateSaveButton(We.NT.CancelSave),!1;this.validateSeries();var e=$e.xC.getChanges(this.model,this.viewModel),t=$e.xC.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!i.keys(t).length)return this.updateSaveButton(We.NT.CancelSave),!1;var n=new d.Q.dM;return e&&e.fields&&n.useAsync(i.bind(this.saveFields,this)),t&&i.keys(t).length&&n.useAsync(i.bind(this.bulkDissoc,this)),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 S.Mr({title:u.T.getPhrase(this.lang,"undoTitle"),text:u.T.getPhrase(this.lang,"undoBody",{videoName: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({},f.eu.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),$e.xC.updateModelState(this.model,this.viewModel,e),c.r.clear(this.viewModelName),this.getViewModel(),this.renderContent(),this.renderTabs()}},{key:"onNavigateAway",value:function(){this.revertState()}},{key:"revertState",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).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:"onBeforeThumbnailUpload",value:function(){this.navLock.isLocked()&&(this.navLock.unlock(),c.r.get("upload:thumbnail:options").set("lockNav",!0))}},{key:"onModelChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.stickitChange||t.manualUpdate)if(this.viewModel.validate(),!1!==this.viewModel.isValid()){if(!$e.xC.getChanges(this.model,this.viewModel)&&!i.keys($e.xC.getRemovedObjectIds(this.model,this.viewModel)).length)return this.unlockNav(),void this.updateSaveButton(We.NT.DisableSave);this.lockNav(),this.updateSaveButton(We.NT.EnableSave)}else this.updateSaveButton(We.NT.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=o.Radio.channel(this.channelName),n=We.NT.EnableSave,i=We.NT.DisableSave,r=We.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:"onThumbnailUpdated",value:function(){var e=this;this.videoDataService.clearCacheAndGetVideo(this.options.videoId,(function(t){e.model=t,e.viewModel.set("thumbnail",e.model.thumbnail.toJSON())}))}},{key:"logEditAction",value:function(e,t){var n=Object.assign({id:this.model.get("id")},e);h.k.logUserAction(n,{actionType:f.Vw.Edit,entity:f.py.Video,location:f.LZ.EditVideoDetails,workflowPhase:t})}},{key:"logDissocAction",value:function(e,t,n){var o=Object.assign({videoId:e},t.pick("id","name"));h.k.logUserAction(o,{actionType:f.Vw.Dissociate,entity:n,location:f.LZ.EditVideoDetails})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.model.fields&&this.model.fields.length||this.model.set("fields",(0,$e.aj)()),this.viewModel=c.r.get(this.viewModelName,this.model.toJSON(),{ctor:w.n}),this.editable&&(this.viewModel.addValidation($e.rr),this.viewModel.addValidation($e.tD));var e=this.currentUser.get("instanceRegion")!==p.b.US;e&&this.viewModel.addValidation($e.oJ),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange),this.listenTo(this.viewModel,"change:dateBroadcast",i.partial(this.onModelChange,i,{manualUpdate:!0})),this.viewModel.fields&&e&&(this.viewModel.fields&&this.viewModel.fields.each((function(e){return e.addValidation($e.Zg)})),this.listenTo(this.viewModel.fields,"change",this.onModelChange))}},{key:"validateSeries",value:function(){this.viewModel.get("series.id")||(this.viewModel.unset("season"),this.viewModel.set("episodeNumber",null))}},{key:"fetchData",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId),this.ratings=this.ratingsDataService.getAllRatings(),this.model&&(this.editable=S.BK.canEditVideo(this.model),this.folder=this.model.categories.first(),this.ratings&&(this.viewModel instanceof w.n||this.getViewModel()))}},{key:"requiredResources",get:function(){return{currentUser:k.K.currentUser,libraries:Xe.T.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.ratings&&!!this.viewModel}},{key:"renderContent",value:function(){var e=$e.xC.getChanges(this.model,this.viewModel)||i.keys($e.xC.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new Ke({model:this.viewModel,ratings:this.ratings,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser}))}},{key:"renderTabs",value:function(){this.showChildView("tabs",new Ge.W({model:this.viewModel,tabs:S.Si.getEditVideoTabs(this.options.videoId,this.editable),activeTab:".edit-video-applink",context:"edit",folder:this.folder,libraries:this.libraries}))}},{key:"onRender",value:function(){this.renderTabs(),this.renderContent()}}],T&&ot(n.prototype,T),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,T}(d.Q.G7)},86272:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return e.propertyIsEnumerable,"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+"</h5>\n"},3:function(e,t,n,o,i){return"my-2"},5:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return' <div class="text-secondary mt-3 mb-1"><em>'+l((n.lang||t&&t.lang||s).call(a,"recommendedSize",{name:"lang",hash:{height:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.height:r,width:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.width:r},data:i}))+'</em></div>\n <button class="upload-thumbnail btn btn-outline-dark mb-3 w-100">'+l((n.lang||t&&t.lang||s).call(a,"upload",{name:"lang",hash:{},data:i}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="thumbnail-region"></div>\n<div class="'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'">\n'+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},useData:!0})},43791:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<h1 class="h3">\n '+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'\n</h2>\n<div class="breadcrumbs-region"></div>\n<div class="tabs-region ps-2"></div>'},useData:!0})},23468:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return"mb-4"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,' <p class="mb-2 py-1 px-2 alert alert-info '+e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.suggestEdit:r,t))+'">\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.isExchange:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.program(6,i,0),data:i}))?r:"")+" </p>\n"},4:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEditExchange",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},6:function(e,t,n,o,i){var r;return e.propertyIsEnumerable," "+(null!=(r=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"suggestEdit",{name:"lang",hash:{classNames:null!=(r=null!=t?t.options:t)?r.suggestEditClasses:r},data:i}))?r:"")+"\n"},8:function(e,t,n,o,i){return"none"},10:function(e,t,n,o,i){return"block"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return'<div class="row">\n <div class="left-pane col-4">\n <div class="thumbnail-region"></div>\n <div class="cv-tags-region '+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'"></div>\n <div class="customer-tags-region"></div>\n </div>\n <div class="right-pane col-8">\n'+(null!=(r=n.unless.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"unless",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+' <div class="top-save-region"></div>\n <div class="basic-info-region mb-4"></div> \n <div class="collapse-button-region"></div>\n <div class="collapse-area" style="display: '+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.collapse:r,{name:"if",hash:{},fn:e.program(8,i,0),inverse:e.program(10,i,0),data:i}))?r:"")+';">\n <div class="additional-details-region"></div> \n <div class="production-info-region mb-4"></div> \n <div class="fields-region mb-4"></div>\n </div>\n <div class="bottom-save-region"></div>\n </div>\n</div>'},useData:!0})},58259:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.showMorePhrase:r,{name:"lang",hash:{},data:i}))},useData:!0})},99724:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-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})},15564:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return'<span class="btn-close cursor-pointer" role="button" aria-label="Close"></span>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,u="function",c=e.escapeExpression;return'<span class="clamp-1" title="'+c(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)===u?a.call(s,{name:"name",hash:{},data:i}):a)+'">'+c(typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)===u?a.call(s,{name:"name",hash:{},data:i}):a)+"</span>\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.removable:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")},useData:!0})},30992:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\n"},3:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>\n"},5:function(e,t,n,o,i){return'<div class="tag-selector-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{};return(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.headerText:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.emptyStateText:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+(null!=(r=n.if.call(a,null!=(r=null!=t?t.options:t)?r.editable:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:"")+'<div class="tag-list-region"></div>'},useData:!0})},55230:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="tab-region"></div>\n<div class="edit-content-region"></div>\n<div class="dialog-region"></div>'},useData:!0})},44106:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<h5 class="mb-0">Extra Information</h5>\n<div class="text-secondary mb-3">This information is only visible to administrators and will not be searchable</div>\n<div class="fields-region"></div>'},useData:!0})},72891:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;return e.propertyIsEnumerable,'<div class="form-group">\n <label for="edit-description">'+e.escapeExpression("function"==typeof(r=null!=(r=n.name||(null!=t?t.name:t))?r:e.hooks.helperMissing)?r.call(null!=t?t:e.nullContext||{},{name:"name",hash:{},data:i}):r)+'</label>\n <div class="text-area-region"></div>\n <div class="form-feedback"></div>\n</div>'},useData:!0})}}]);