@clickview/library-editor 1.1.57 → 1.2.0-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 (88) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/en.json +1 -1
  3. package/dist/scripts/{0-7a0a00671e.chunk.js → 0-3146283f04.chunk.js} +1 -1
  4. package/dist/scripts/1-8f308c9df2.chunk.js +1 -0
  5. package/dist/scripts/{10-9adc2cda45.chunk.js → 10-1f8e4712fb.chunk.js} +1 -1
  6. package/dist/scripts/{11-ff467086e1.chunk.js → 11-efbe8b672b.chunk.js} +1 -1
  7. package/dist/scripts/{12-24c4543472.chunk.js → 12-9a649bd1e8.chunk.js} +1 -1
  8. package/dist/scripts/{13-10636e2af5.chunk.js → 13-d003ff9e41.chunk.js} +1 -1
  9. package/dist/scripts/{14-9b1ecd3e9e.chunk.js → 14-79273eff4c.chunk.js} +1 -1
  10. package/dist/scripts/{15-e4ef6f64cf.chunk.js → 15-1a0756e067.chunk.js} +1 -1
  11. package/dist/scripts/{16-ea4e41f570.chunk.js → 16-bbf0f01fe8.chunk.js} +1 -1
  12. package/dist/scripts/{17-9353ded8cd.chunk.js → 17-3056f1e460.chunk.js} +1 -1
  13. package/dist/scripts/{18-fb56568492.chunk.js → 18-4c5983938e.chunk.js} +1 -1
  14. package/dist/scripts/{19-85a94ac004.chunk.js → 19-f6bd3a3d49.chunk.js} +1 -1
  15. package/dist/scripts/{2-6e60c5cd87.chunk.js → 2-d90f461b10.chunk.js} +1 -1
  16. package/dist/scripts/{22-a4903ff45c.chunk.js → 22-f0e56683c3.chunk.js} +1 -1
  17. package/dist/scripts/{23-b47ac20bca.chunk.js → 23-cdce4174d1.chunk.js} +1 -1
  18. package/dist/scripts/{24-f431e57e2a.chunk.js → 24-afd2aa2bfc.chunk.js} +1 -1
  19. package/dist/scripts/25-b8aeb90fea.chunk.js +1 -0
  20. package/dist/scripts/{26-4931172ebc.chunk.js → 26-08a7f60500.chunk.js} +1 -1
  21. package/dist/scripts/{27-adae09a46f.chunk.js → 27-4fdfe99ba0.chunk.js} +1 -1
  22. package/dist/scripts/{28-696a0da105.chunk.js → 28-bb3ced1465.chunk.js} +1 -1
  23. package/dist/scripts/29-ef11dca9b5.chunk.js +1 -0
  24. package/dist/scripts/3-f02b82314e.chunk.js +1 -0
  25. package/dist/scripts/{30-92d387d3d9.chunk.js → 30-41819d54db.chunk.js} +1 -1
  26. package/dist/scripts/{31-7e545aa0de.chunk.js → 31-adedea4916.chunk.js} +1 -1
  27. package/dist/scripts/{32-7328345fae.chunk.js → 32-92b6dc1186.chunk.js} +1 -1
  28. package/dist/scripts/33-dda4dfbdee.chunk.js +1 -0
  29. package/dist/scripts/34-0f61f7fc7d.chunk.js +1 -0
  30. package/dist/scripts/35-df3c6c90f7.chunk.js +1 -0
  31. package/dist/scripts/{36-c347fda103.chunk.js → 36-97a61b13fd.chunk.js} +1 -1
  32. package/dist/scripts/{37-74139562b8.chunk.js → 37-5f0b4c4b24.chunk.js} +1 -1
  33. package/dist/scripts/{38-f300998fdd.chunk.js → 38-1806441e62.chunk.js} +1 -1
  34. package/dist/scripts/{39-b3dc9c44a0.chunk.js → 39-cb06876d63.chunk.js} +1 -1
  35. package/dist/scripts/{4-a6f41aa1cf.chunk.js → 4-3556f5cd86.chunk.js} +1 -1
  36. package/dist/scripts/{40-3e0329bded.chunk.js → 40-dedc900f03.chunk.js} +1 -1
  37. package/dist/scripts/{41-14984944f5.chunk.js → 41-2a772649ef.chunk.js} +1 -1
  38. package/dist/scripts/{42-a83543523b.chunk.js → 42-edd884c6e1.chunk.js} +1 -1
  39. package/dist/scripts/{43-1dd75e9a7c.chunk.js → 43-7cb12bb043.chunk.js} +1 -1
  40. package/dist/scripts/{44-b009aed5ee.chunk.js → 44-6e38e6c3da.chunk.js} +1 -1
  41. package/dist/scripts/{45-8784f71efb.chunk.js → 45-7696788c78.chunk.js} +1 -1
  42. package/dist/scripts/{46-84948e5396.chunk.js → 46-6fae0cec47.chunk.js} +1 -1
  43. package/dist/scripts/{47-e8ee683c6b.chunk.js → 47-c5e053926b.chunk.js} +1 -1
  44. package/dist/scripts/{48-f7d6b635d4.chunk.js → 48-c62f428014.chunk.js} +1 -1
  45. package/dist/scripts/{49-85880607e1.chunk.js → 49-0221ac925c.chunk.js} +1 -1
  46. package/dist/scripts/{5-441004c068.chunk.js → 5-f2fad668b9.chunk.js} +1 -1
  47. package/dist/scripts/{50-7119810c07.chunk.js → 50-6c9cd76347.chunk.js} +1 -1
  48. package/dist/scripts/{51-4073403c2a.chunk.js → 51-4c4cb2a786.chunk.js} +1 -1
  49. package/dist/scripts/{52-83ac3c5f59.chunk.js → 52-1a2a4d664f.chunk.js} +1 -1
  50. package/dist/scripts/{53-44b9074b42.chunk.js → 53-4420fdb2ff.chunk.js} +1 -1
  51. package/dist/scripts/{54-f87b2698de.chunk.js → 54-7ad2a43bae.chunk.js} +1 -1
  52. package/dist/scripts/{55-02e36c66d8.chunk.js → 55-6bdc1394e8.chunk.js} +1 -1
  53. package/dist/scripts/{56-7e9d94a656.chunk.js → 56-0e7f151d8f.chunk.js} +1 -1
  54. package/dist/scripts/{57-4ad9ab266e.chunk.js → 57-e02ec7e3aa.chunk.js} +1 -1
  55. package/dist/scripts/{58-6ebe979a17.chunk.js → 58-23f2f08ffa.chunk.js} +1 -1
  56. package/dist/scripts/{59-09ad6d94e9.chunk.js → 59-73f62422ee.chunk.js} +1 -1
  57. package/dist/scripts/{6-f1f3ea7cec.chunk.js → 6-41fbd1d098.chunk.js} +1 -1
  58. package/dist/scripts/{60-d4f9eaf20d.chunk.js → 60-02ac1d0885.chunk.js} +1 -1
  59. package/dist/scripts/{61-45cfc05bd5.chunk.js → 61-11806e7f0f.chunk.js} +1 -1
  60. package/dist/scripts/{62-4242c25552.chunk.js → 62-36cd4edbe1.chunk.js} +1 -1
  61. package/dist/scripts/{63-779b927a04.chunk.js → 63-221a784003.chunk.js} +1 -1
  62. package/dist/scripts/{64-29f65ce8e5.chunk.js → 64-de212ef1ff.chunk.js} +1 -1
  63. package/dist/scripts/{65-0e5cd44c96.chunk.js → 65-2a3fe2cf9f.chunk.js} +1 -1
  64. package/dist/scripts/{66-782fe6a351.chunk.js → 66-3d86df4f03.chunk.js} +1 -1
  65. package/dist/scripts/{67-c749606e6f.chunk.js → 67-4044e5776b.chunk.js} +1 -1
  66. package/dist/scripts/{68-9ef5b70dc6.chunk.js → 68-d9ac81db0f.chunk.js} +1 -1
  67. package/dist/scripts/{69-ea32cbf274.chunk.js → 69-4523125605.chunk.js} +1 -1
  68. package/dist/scripts/{7-00dd3cbb22.chunk.js → 7-7d08599cb1.chunk.js} +1 -1
  69. package/dist/scripts/{70-876856aed0.chunk.js → 70-cac4a9fb87.chunk.js} +1 -1
  70. package/dist/scripts/{71-89a356a899.chunk.js → 71-59ded4dd7b.chunk.js} +1 -1
  71. package/dist/scripts/{72-6e08024788.chunk.js → 72-8329bfea82.chunk.js} +1 -1
  72. package/dist/scripts/{73-7cc4cc7383.chunk.js → 73-dfe0e3c96a.chunk.js} +1 -1
  73. package/dist/scripts/{74-8ffb258210.chunk.js → 74-1aee6ab328.chunk.js} +1 -1
  74. package/dist/scripts/{8-878942d96f.chunk.js → 8-b20f6d3c66.chunk.js} +1 -1
  75. package/dist/scripts/9-4baf495c07.chunk.js +1 -0
  76. package/dist/scripts/bundle-2b257bc7e1.min.js +10 -0
  77. package/dist/scripts/polyfills-c68217e80d.min.js +1 -0
  78. package/package.json +2 -2
  79. package/dist/scripts/1-709b927521.chunk.js +0 -1
  80. package/dist/scripts/25-560da8ad7f.chunk.js +0 -1
  81. package/dist/scripts/29-c2c961a586.chunk.js +0 -1
  82. package/dist/scripts/3-aa6f0c5b23.chunk.js +0 -1
  83. package/dist/scripts/33-128143c106.chunk.js +0 -1
  84. package/dist/scripts/34-c915802337.chunk.js +0 -1
  85. package/dist/scripts/35-a166f1b8e3.chunk.js +0 -1
  86. package/dist/scripts/9-da8328e091.chunk.js +0 -1
  87. package/dist/scripts/bundle-e3d4c2e087.min.js +0 -10
  88. package/dist/scripts/polyfills-4de7102781.min.js +0 -1
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[28],{1073:function(e,t,n){"use strict";var o=n(2),i=n(19),r=n(6),a=n(0),s=n(306),l=n(1139),c=n.n(l),u=n(1140),f=n.n(u);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})(e)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(l,e);var t,n,o,i=v(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"TagItemComponent"}},{key:"tagName",get:function(){return this.options.behavior===s.b.Link?"a":"span"}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.c.Vertical?"":" d-inline-flex"),t="".concat(this.isSaving()?" saving":""),n="".concat(this.options.behavior===s.b.Disabled?" ".concat(f.a.disabled):""),o="".concat(this.options.behavior===s.b.Filter?" cursor-pointer":"");return"badge-pill tag py-1 px-2 my-1 mr-1".concat(o).concat(e).concat(t).concat(n)}},{key:"template",get:function(){return c.a}},{key:"elements",get:function(){return{close:".close"}}},{key:"appLinks",get:function(){return this.options.behavior!==s.b.Link?{}:{"[this]":{application:a.b.SEARCH,action:a.a.Search.HOME,params:{tag:this.model.get("name")}}}}},{key:"defaults",get:function(){return{behavior:s.b.Link,orientation:s.c.Flex}}},{key:"events",value:function(){return this.options.removeEvent?{"click @ui.close":"onRemoveTag"}:{click:"onClickTag"}}},{key:"initialize",value:function(){this.options.behavior===s.b.Edit&&this.listenTo(this.model,"change",this.render)}},{key:"isSaving",value:function(){if(this.options.behavior!==s.b.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.b.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()}}])&&h(t.prototype,n),o&&h(t,o),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.a.Component);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=O(e);if(t){var i=O(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return E(this,n)}}function E(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return T}));var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(l,e);var t,n,r,a=S(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,(n=[{key:"initialize",value:function(){this.options.behavior!==s.b.Edit||this.options.removeEvent||o.a.ErrorHelper.throw(new i.a("removeEvent is required to edit tags."))}},{key:"name",get:function(){return"TagComponentCollection"}},{key:"defaults",get:function(){return{orientation:s.c.Flex}}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.c.Vertical?" d-flex align-items-start flex-column":"");return"tags".concat(e)}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent,clickEvent:this.options.clickEvent}}},{key:"childView",get:function(){return b}}])&&w(t.prototype,n),r&&w(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.a.ComponentCollection)},1095:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(1),i=n(2),r=n(1096),a=n.n(r),s=n(1097),l=n.n(s);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(s,e);var t,n,i,r=d(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),r.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"TabsView"}},{key:"className",get:function(){var e="bg-white py-2 border-bottom";return this.options.className&&(e+=" ".concat(this.options.className)),e}},{key:"template",get:function(){return l.a}},{key:"appLinks",get:function(){var e={};return this.options.tabs.forEach((function(t){return e[t.link.selector]=t.link.appLink})),e}},{key:"viewOptions",value:function(){var e=this.options.tabs.map((function(e){return Object.assign(Object.assign({},e),{link:e.link.selector.replace(".","")})}));return{styles:a.a,tabs:e}}},{key:"setActiveTab",value:function(){var e=this,t=!1;if(this.options.tabs.forEach((function(n){n.active=!1,n.link.selector===e.options.activeTab&&(n.active=!0,t=!0)})),!t){var n=o.first(this.options.tabs);n&&(n.active=!0)}}},{key:"onBeforeRender",value:function(){this.setActiveTab()}}])&&u(t.prototype,n),i&&u(t,i),Object.defineProperty(t,"prototype",{writable:!1}),s}(i.a.Component)},1096:function(e,t,n){e.exports={link:"_5idZs",active:"_3Ty4M"}},1097:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return null!=(s=n.unless.call(null!=t?t:e.nullContext||{},null!=t?t.hide:t,{name:"unless",hash:{},fn:e.program(2,i,0,r,a),inverse:e.noop,data:i}))?s:""},2:function(e,t,n,o,i,r,a){e.propertyIsEnumerable;var s,l=e.lambda,c=e.escapeExpression;return' <a class="'+c(l(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.link:s,t))+" p-2 "+c(l(null!=t?t.link:t,t))+" "+(null!=(s=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.active:t,{name:"if",hash:{},fn:e.program(3,i,0,r,a),inverse:e.noop,data:i}))?s:"")+'">'+c(l(null!=t?t.name:t,t))+"</a>\r\n"},3:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.active:s,t))+" border-bottom border-primary text-primary"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return null!=(s=n.each.call(null!=t?t:e.nullContext||{},null!=(s=null!=t?t.options:t)?s.tabs:s,{name:"each",hash:{},fn:e.program(1,i,0,r,a),inverse:e.noop,data:i}))?s:""},useData:!0,useDepths:!0})},1115:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var o=n(6),i=n(2),r=n(16),a=n(1116),s=n.n(a),l=n(1117),c=n.n(l),u=n(0),f=n(1095);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})(e)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(l,e);var t,n,i,a=v(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0}}}},{key:"template",get:function(){return c.a}},{key:"appLinks",get:function(){var e,t,n,o=this.options.goBackTab.link;return e={},t=o.selector,n=o.appLink,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"viewOptions",value:function(){var e=Object.assign(Object.assign({},this.options.goBackTab),{link:this.options.goBackTab.link.selector.replace(".","")});return{styles:s.a,backTab:e,backArrow:r.a.getSvg(r.b.ArrowLeft)}}},{key:"onSave",value:function(){o.Radio.channel(u.b.LIBRARY_EDITOR).trigger(u.a.LibraryEditor.SAVE_VIDEO)}},{key:"onRender",value:function(){this.showChildView("tabs",new f.a({tabs:this.options.tabs,activeTab:this.options.activeTab}))}}])&&h(t.prototype,n),i&&h(t,i),Object.defineProperty(t,"prototype",{writable:!1}),l}(i.a.Component)},1116:function(e,t,n){e.exports={svgContainer:"_27gR6"}},1117:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression;return'<div class="row">\r\n <h4>\r\n <a class="d-inline-flex align-items-center '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.link:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.backTab:r)?r.link:r,t))+'">\r\n <span class="'+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block mx-2">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.backArrow:r,t))?r:"")+"</span>\r\n "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.backTab:r)?r.name:r,t))+'\r\n </a>\r\n </h4>\r\n</div>\r\n<div class="tabs-region pl-2"></div>'},useData:!0})},1139:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return'<span class="close cursor-pointer" aria-hidden="true">&times;</span>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,c=e.escapeExpression;return'<span class="clamp-1" title="'+c("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)?a.call(s,{name:"name",hash:{},data:i}):a)+'">'+c("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)?a.call(s,{name:"name",hash:{},data:i}):a)+"</span>\r\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})},1140:function(e,t,n){e.exports={disabled:"_3Vziu"}},1281:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return'<div class="form-group">\r\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>\r\n <div class="text-area-region"></div>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})},1282:function(e,t,n){var o=n(10);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>\r\n<div class="text-muted mb-3">This information is only visible to admins and will not be searchable</div>\r\n<div class="fields-region"></div>'},useData:!0})},1283:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\r\n"},3:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>\r\n"},5:function(e,t,n,o,i){return'<div class="tag-selector-region"></div>\r\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})},1284:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-muted mx-2 undo '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.undo:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"undo",{name:"lang",hash:{},data:i}))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return(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})},1285:function(e,t,n){e.exports={saveButton:"_2FsA6",undo:"v6msX"}},1286:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;return"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+"</h5>\r\n"},3:function(e,t,n,o,i){return"my-2"},5:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return' <div class="text-muted mt-3 mb-1"><em>'+l((n.lang||t&&t.lang||s).call(a,"recommendedSize",{name:"lang",hash:{height:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.height:r,width:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.width:r},data:i}))+'</em></div>\r\n <button class="upload-thumbnail btn btn-light mb-3 w-100">'+l((n.lang||t&&t.lang||s).call(a,"upload",{name:"lang",hash:{},data:i}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=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>\r\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:"")+'">\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})},1287:function(e,t,n){var o=n(10);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;e.propertyIsEnumerable;return' <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))+'">\r\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>\r\n"},4:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return" "+(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:"")+"\r\n"},6:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return" "+(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:"")+"\r\n"},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">\r\n <div class="left-pane col-4">\r\n <div class="thumbnail-region"></div>\r\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>\r\n <div class="customer-tags-region"></div>\r\n </div>\r\n <div class="right-pane col-8">\r\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>\r\n <div class="basic-info-region mb-4"></div> \r\n <div class="additional-details-region mb-4"></div> \r\n <div class="production-info-region mb-4"></div> \r\n <div class="fields-region mb-4"></div>\r\n <div class="bottom-save-region"></div>\r\n </div>\r\n</div>'},useData:!0})},1288:function(e,t,n){e.exports={suggestEdit:"_1X4l5"}},1289:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="tab-region"></div>\r\n<div class="edit-content-region"></div>\r\n<div class="dialog-region"></div>'},useData:!0})},1473:function(e,t,n){"use strict";n.r(t);var o=n(1),i=n(6),r=n(2),a=n(19),s=n(30),l=n(3),c=n(15),u=n(5),f=n(121),d=n(0),h=n(320),p=n(144),v=n(13),y=n(103),m=n(237),b=n(318),g=n(9),w=n(4),k=n(42),S=n(200),E=n(146),O=n(1049),T=n(1202),C=n(1207),P=n(1205),j=n(1204),R=n(1281),x=n.n(R);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})(e)}function D(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=I(e);if(t){var i=I(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return V(this,n)}}function V(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)}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}(a,e);var t,n,o,r=M(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){var e=this;this.listenTo(this.model,"change",(function(){return e.options.viewModel.validate()}))}},{key:"template",get:function(){return x.a}},{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 j.a({name:"value",class:"form-control",placeholder:this.model.get("placeholder"),id:"admin-notes"})),this.stickit(),i.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),i.Validation.unbind(this)}}])&&D(t.prototype,n),o&&D(t,o),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.a.Component),B=n(1282),A=n.n(B);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})(e)}function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function z(e,t,n){return t&&J(e.prototype,t),n&&J(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function H(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=q(e);if(t){var i=q(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return W(this,n)}}function W(e,t){if(t&&("object"===U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var X=function(e){H(n,e);var t=Y(n);function n(e){return F(this,n),t.call(this,e)}return z(n,[{key:"name",get:function(){return"ExtraInfoComponentCollection"}},{key:"childView",get:function(){return L}},{key:"childViewOptions",get:function(){return{viewModel:this.options.viewModel}}}]),n}(r.a.ComponentCollection),K=function(e){H(n,e);var t=Y(n);function n(e){return F(this,n),t.call(this,e)}return z(n,[{key:"name",get:function(){return"ExtraInfoComponent"}},{key:"template",get:function(){return A.a}},{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 X({collection:this.model.fields,viewModel:this.model}))}}]),n}(r.a.Component),Z=n(266),Q=n(99),$=n(314),ee=n(1109),te=n(1073),ne=n(306),oe=n(1283),ie=n.n(oe);function re(e){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ae(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 se(e,t){return(se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=ue(e);if(t){var i=ue(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return ce(this,n)}}function ce(e,t){if(t&&("object"===re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ue(e){return(ue=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&se(e,t)}(s,e);var t,n,o,i=le(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),i.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"TagsComponent"}},{key:"template",get:function(){return ie.a}},{key:"lang",get:function(){return"libraryEditor.tags"}},{key:"defaults",get:function(){return{headerText:l.a.getPhrase(this.lang,"heading"),orientation:ne.c.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!==ne.b.Edit||this.options.parentId||r.a.ErrorHelper.throw(new a.a("parentId is required to edit tags."))}},{key:"getTypeaheadConfigs",value:function(){var e=$.a.getTypeaheadConfig(),t=$.a.getBloodhoundConfig(),n={newType:d.v.TagsRaw},o={newType:d.v.TagsRaw,footerTemplate:Q.a.getConfirmSelectionTemplate()};return[{name:d.v.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===ne.b.Edit,emptyStateText:e}}},{key:"showEmptyStateText",value:function(){return this.options.behavior!==ne.b.Edit&&!this.collection.length&&!!this.options.emptyStateText}},{key:"renderTagSelector",value:function(){this.options.behavior===ne.b.Edit&&this.showChildView("tagSelector",new ee.a({model:this.model,parentChannelName:this.options.channelName,inputId:"tag-select",selectEvent:"add:tag",typeaheadConfigs:this.getTypeaheadConfigs(),placeholderText:l.a.getPhrase(this.lang,"placeholder"),callbacks:{onRender:Q.a.selectFirstResult,onBlur:Q.a.clearInputOnBlur},typeaheadOptions:{hint:!1},actionOptions:{clearOnSelect:!0},autofocus:this.options.autofocus}))}},{key:"renderTagList",value:function(){this.showEmptyStateText()||this.showChildView("tagList",new te.a({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()}}])&&ae(t.prototype,n),o&&ae(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.a.Component),de=n(265),he=n(1284),pe=n.n(he),ve=n(1285),ye=n.n(ve);function me(e){return(me="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 be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ge(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 we(e,t){return(we=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ke(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ee(e);if(t){var i=Ee(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Se(this,n)}}function Se(e,t){if(t&&("object"===me(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ee(e){return(Ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Oe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&we(e,t)}(s,e);var t,n,o,a=ke(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return pe.a}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return i.Radio.channel(this.options.channelName)}},{key:"getSaveChannelName",value:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .undo":"onUndo"}}},{key:"initialize",value:function(){var e;this.model||(this.model=new r.a.Model((be(e={},de.c.ShowSpinner,this.options.showSpinner),be(e,de.c.Disabled,this.options.isDisabled),e)));var t=this.options.channelName;this.listenTo(t,S.LibraryEditorActions.DisableSave,this.onDisableSave),this.listenTo(t,S.LibraryEditorActions.EnableSave,this.onEnableSave),this.listenTo(t,S.LibraryEditorActions.CancelSave,this.onCancelSave);var n=i.Radio.channel(this.getSaveChannelName());this.listenTo(n,S.LibraryEditorActions.Save,this.onSave),this.options.allowUndo&&(this.options.hasChanges&&this.model.set("showUndo",!0),this.listenTo(this.model,"change:showUndo",this.render))}},{key:"onCancelSave",value:function(){this.model.set(de.c.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(de.c.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(de.c.ShowSpinner)&&this.model.set(de.c.ShowSpinner,!1,{silent:!0}),this.model.set(de.c.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(S.LibraryEditorActions.Undo)}},{key:"onSave",value:function(){this.model.set(de.c.ShowSpinner,!0),this.getParentChannel().trigger(S.LibraryEditorActions.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:ye.a}}},{key:"renderSaveButton",value:function(){var e=new de.a({saveEvent:S.LibraryEditorActions.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:l.a.getPhrase(this.lang,"save"),extraButtonClass:"btn-primary ".concat(ye.a.saveButton),spinnerOptions:{size:v.s.Small,type:v.t.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}])&&ge(t.prototype,n),o&&ge(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.a.Component),Te=n(203),Ce=n(205),Pe=n(305),je=n(1286),Re=n.n(je);function xe(e){return(xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(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 De(e,t){return(De=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ve(e);if(t){var i=Ve(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Me(this,n)}}function Me(e,t){if(t&&("object"===xe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ve(e){return(Ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ie=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&De(e,t)}(r,e);var t,n,o,i=_e(r);function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),i.call(this,e)}return t=r,(n=[{key:"initialize",value:function(){this.viewModel=s.a.get("image:storage")}},{key:"name",get:function(){return"EditThumbnailComponent"}},{key:"lang",get:function(){return"libraryEditor.editThumbnail"}},{key:"template",get:function(){return Re.a}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:Pe.b,channelName:this.options.channelName,buttonSelector:".upload-thumbnail",imageType:g.f.Thumbnails,appLink:{application:d.b.LIBRARY_EDITOR,action:d.a.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:d.m[g.f.Thumbnails]}}},{key:"onRender",value:function(){this.showChildView("thumbnail",new Te.a({model:this.model,thumbnailOptions:{size:Ce.a.Medium}}))}}])&&Ne(t.prototype,n),o&&Ne(t,o),Object.defineProperty(t,"prototype",{writable:!1}),r}(r.a.Component),Le=n(1287),Be=n.n(Le),Ae=n(1288),Ue=n.n(Ae);function Fe(e){return(Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Je(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ze(e,t){return(ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function He(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ye(e);if(t){var i=Ye(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Ge(this,n)}}function Ge(e,t){if(t&&("object"===Fe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ye(e){return(Ye=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var We=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ze(e,t)}(r,e);var t,n,o,i=He(r);function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),i.call(this,e)}return t=r,(n=[{key:"initialize",value:function(){var e=this;this.listenTo(this.options.channelName,"update:tags",(function(){return e.renderCustomerTags(!0)}))}},{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 Be.a}},{key:"appLinks",get:function(){return{".suggest-edit":{application:d.b.LIBRARY_EDITOR,action:d.a.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.id]}}}},{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},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:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new Oe({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-right"})),this.showChildView("bottomSave",new Oe({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-right"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new T.a({model:this.model,ratings:this.options.ratings,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable,showPublisherVideoDetails:this.options.showPublisherVideoDetails}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new Ie({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderAdditionalInfo",value:function(){this.showChildView("additionalInfo",new P.a({model:this.model,channelName:this.options.channelName,libraries:this.options.libraries,hostedLibraries:this.options.hostedLibraries,editable:this.options.editable}))}},{key:"renderProductionInfo",value:function(){this.showChildView("productionInfo",new C.a({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderFields",value:function(){this.showChildView("fields",new K({model:this.model,channelName:this.options.channelName}))}},{key:"renderClickViewTags",value:function(){if(!this.options.editable){var e=v.j.filterObjectsByOwnerType(this.model.tags,Z.a.ClickView,this.options.currentUser.get("customerId"));this.showChildView("clickViewTags",new fe({parentId:this.model.get("id"),collection:e,orientation:ne.c.Flex,behavior:ne.b.Disabled,channelName:this.options.channelName,headerText:l.a.getPhrase(this.lang,"clickviewTags"),emptyStateText:l.a.getPhrase(this.lang,"clickviewTagsEmpty")}))}}},{key:"renderCustomerTags",value:function(e){var t=v.j.filterObjectsByOwnerType(this.model.tags,Z.a.Customer,this.options.currentUser.get("customerId"));this.showChildView("customerTags",new fe({parentId:this.model.get("id"),collection:t,channelName:this.options.channelName,behavior:ne.b.Edit,headerText:l.a.getPhrase(this.lang,"customerTags"),removeEvent:"remove:tag",autofocus:!!e}))}},{key:"renderTags",value:function(){this.renderClickViewTags(),this.renderCustomerTags()}},{key:"viewOptions",value:function(){return{styles:Ue.a,editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:v.y.isExchangeVideo(this.model)}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail(),this.renderAdditionalInfo(),this.renderProductionInfo(),this.renderFields(),this.renderTags()}}])&&Je(t.prototype,n),o&&Je(t,o),Object.defineProperty(t,"prototype",{writable:!1}),r}(r.a.Component),qe=n(1115),Xe=n(315),Ke=n(316),Ze=n(1289),Qe=n.n(Ze);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)}function et(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 tt(e,t){return(tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=it(e);if(t){var i=it(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return ot(this,n)}}function ot(e,t){if(t&&("object"===$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function it(e){return(it=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"EditVideoView",(function(){return rt}));var rt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tt(e,t)}(P,e);var t,n,T,C=nt(P);function P(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,P),(t=C.call(this,e)).editable=!1,t}return t=P,(n=[{key:"name",get:function(){return"EditVideoView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editVideo"}},{key:"className",get:function(){return"bg-white p-3"}},{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 Qe.a}},{key:"regions",value:function(){return{tabs:{el:".tab-region",replaceElement:!0,partialLoading:g.h.EditVideoTabs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:g.h.EditVideoDetails}}}},{key:"initialize",value:function(){this.navLock=u.a.getInstance(d.x.NavLock,this),this.initDataListeners(),v.v.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=u.a.getInstance(d.g.Video,this),this.tagDataService=u.a.getInstance(d.g.Tags,this),this.libraryDataService=u.a.getInstance(d.g.Library,this),this.seriesDataService=u.a.getInstance(d.g.Series,this),this.ratingsDataService=u.a.getInstance(d.g.Ratings,this),this.migrationVideoDataService=u.a.getInstance(d.g.MigrationVideo,this),this.fieldsDataService=u.a.getInstance(d.g.Fields,this),this.alertService=u.a.getInstance(d.x.Alerts,this),this.personDataService=u.a.getInstance(d.g.Person,this),this.companyDataService=u.a.getInstance(d.g.Company,this)}},{key:"initDataListeners",value:function(){this.listenTo(c.a.SHELL,r.a.EventNames.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(d.e.VIDEO,"videos:".concat(this.options.videoId,":sync"),this.render),this.listenTo(d.e.VIDEO,"videos:".concat(this.options.videoId,":error"),this.onError),this.listenTo(d.e.RATINGS,"".concat(d.f.RATINGS,":sync"),this.render),this.listenTo(d.e.VIDEO,"".concat(d.f.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),this.onThumbnailUpdated),this.listenTo(d.e.LIBRARY,"hosted:libraries:sync",this.render),this.listenTo(this.channelName,"select:rating",o.partial(this.onTypeaheadSelection,o,"rating")),this.listenTo(this.channelName,"select:channel",o.partial(this.onTypeaheadSelection,o,"channel")),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.channelName,"add:distributors",this.onSelectDistributor),this.listenTo(this.channelName,"add:productionCompanies",this.onSelectProductionCompany),this.listenTo(this.channelName,"add:directors",this.onSelectDirector),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:tag",this.onAddTag),this.listenTo(this.channelName,"remove:distributors",this.onRemoveDistributor),this.listenTo(this.channelName,"remove:productionCompanies",this.onRemoveProductionCompany),this.listenTo(this.channelName,"remove:directors",this.onRemoveDirector),this.listenTo(this.channelName,"remove:producers",this.onRemoveProducer),this.listenTo(this.channelName,"remove:tag",this.onRemoveTag),this.listenTo(this.channelName,S.LibraryEditorActions.Save,this.onSave),this.listenTo(this.channelName,S.LibraryEditorActions.Undo,this.onUndo),this.listenTo(this.channelName,S.LibraryEditorActions.DetectInput,this.onTypeaheadInput),this.listenTo(this.channelName,"image:load",this.onBeforeThumbnailUpload)}},{key:"onError",value:function(e){switch(e.type){case f.a.NotFound:r.a.ErrorHelper.throw(new Ke.a);break;case f.a.Forbidden:r.a.ErrorHelper.throw(new Xe.a)}}},{key:"onTypeaheadSelection",value:function(e,t,n){if(n){var i=this.viewModel.get(t),r=i.filter({name:e.name});o.each(r,(function(e){return i.remove(e)})),i.add(e)}else this.viewModel.set(t,e);this.onModelChange(e,{manualUpdate:!0})}},{key:"onTypeaheadInput",value:function(e,t,n){e.get("name")||(n&&n.isCollection?this.viewModel.get(t).remove(e.get("id"),{silent:!0}):this.viewModel.get(t).clear({silent:!0}),this.onModelChange(null,{manualUpdate:!0}),"series"===t&&(this.validateSeries(),i.Radio.channel(this.channelName).trigger("clear:series")))}},{key:"onSelectSeries",value:function(e){var t=this;e.id?this.seriesDataService.getSeries(e.id,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection(e.toJSON(),"series")})):e.name&&this.seriesDataService.createSeries(e.name,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection({id:e.id},"series")}))}},{key:"onSelectSeason",value:function(e){var t=this;if(o.isNull(e))return this.viewModel.get("season").clear({silent:!0}),this.viewModel.set("episodeNumber",null),v.c.deselectAll(this.viewModel.get("series.seasons")),void this.onModelChange(null,{manualUpdate:!0});if(e.id)return this.viewModel.set("season",e),v.c.setSelected(e.id,this.viewModel.get("series.seasons")),void this.onModelChange(e,{manualUpdate:!0});if(e.number){var n=this.viewModel.get("series.id");this.seriesDataService.createSeason(e,n,(function(e){t.viewModel.set("season",e.toJSON()),!t.viewModel.get("series.seasons")&&t.viewModel.get("series").set("seasons",new h.a),t.viewModel.get("series.seasons").add(e.toJSON()),v.c.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&&!v.c.findModelByName(n,this.viewModel.tags)){var o=new m.a({name:n});this.viewModel.tags.add(o),this.tagDataService.createTag(n,this.model.get("id"),(function(e){o.set(e.toJSON()),i.Radio.channel(t.channelName).trigger("update:tags")}))}}}},{key:"onRemoveTag",value:function(e){var t=this;e instanceof m.a&&e.id&&this.tagDataService.dissociateTag(e.id,this.model.get("id"),(function(){t.viewModel.tags.remove(e),i.Radio.channel(t.channelName).trigger("update:tags"),t.logDissocAction(t.model.get("id"),e,w.EntityType.Tag)}))}},{key:"saveFields",value:function(e,t){var n=this,i=0;e.updatedVideo=o.extend({},e.updatedVideo||{});var r=function(){++i===e.dataChanges.fields.length&&t(e)};o.each(e.dataChanges.fields,(function(e){if(e.id&&!e.value)return n.viewModel.fields.remove(n.viewModel.fields.findWhere({id:e.id})),void n.fieldsDataService.deleteField(e.id,r);!e.id||e.id>0?n.fieldsDataService.updateField(e,r):n.fieldsDataService.addField(n.options.videoId,e,(function(t){n.viewModel.fields.findWhere({id:e.id}).set("id",t.id),r()}))}))}},{key:"bulkDissoc",value:function(e,t){this.videoDataService.bulkDissoc(this.model.id,e.pendingDissocs,(function(){t(e)}))}},{key:"saveVideo",value:function(e,t){var n=this,i=o.omit(e.dataChanges,"fields");if(o.isEmpty(i))t(e);else{var r=o.omit(e.dataChanges,"fields");this.videoDataService.updateVideo(this.model.get("id"),this.folder.get("id"),r,(function(i){(e.dataChanges.series&&e.dataChanges.series.id||e.dataChanges.episodeNumber||e.dataChanges.season)&&n.videoDataService.clearVideoCache(),e.updatedVideo=o.extend({},e.updatedVideo||{},i),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(S.LibraryEditorActions.DisableSave),this.logEditAction(e.dataChanges,w.WorkflowPhase.Save);var t=b.a.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(S.LibraryEditorActions.CancelSave),!1;this.validateSeries();var e=O.a.getChanges(this.model,this.viewModel),t=O.a.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!o.keys(t).length)return this.updateSaveButton(S.LibraryEditorActions.CancelSave),!1;var n=new r.a.Middleware;return e&&e.fields&&n.use(o.bind(this.saveFields,this)),t&&o.keys(t).length&&n.use(o.bind(this.bulkDissoc,this)),this.editable&&n.use(o.bind(this.saveVideo,this)),n.use(o.bind(this.afterSave,this)),n.go({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new v.d({title:l.a.getPhrase(this.lang,"undoTitle"),text:l.a.getPhrase(this.lang,"undoBody",{videoName:this.model.get("name")}),buttons:[{text:l.a.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:l.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}]}).render().done((function(){e.logEditAction({},w.WorkflowPhase.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),O.a.updateModelState(this.model,this.viewModel,e),s.a.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]:{},t=e.undo;this.stopListening(this.viewModel),s.a.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),t&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:l.a.getPhrase(this.lang,"navLockHeading"),text:l.a.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{key:"onBeforeThumbnailUpload",value:function(){this.navLock.isLocked()&&(this.navLock.unlock(),s.a.get("upload:thumbnail:options").set("lockNav",!0))}},{key:"onModelChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.stickitChange||t.manualUpdate)if(this.viewModel.validate(),!1!==this.viewModel.isValid()){var n=O.a.getChanges(this.model,this.viewModel)||o.keys(O.a.getRemovedObjectIds(this.model,this.viewModel)).length;if(!n)return this.unlockNav(),void this.updateSaveButton(S.LibraryEditorActions.DisableSave);this.lockNav(),this.updateSaveButton(S.LibraryEditorActions.EnableSave)}else this.updateSaveButton(S.LibraryEditorActions.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=i.Radio.channel(this.channelName),n=S.LibraryEditorActions.EnableSave,o=S.LibraryEditorActions.DisableSave,s=S.LibraryEditorActions.CancelSave;switch(e){case n:return void t.trigger(n);case o:return void t.trigger(o);case s:return void t.trigger(s)}r.a.ErrorHelper.throw(new a.a("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);k.a.logUserAction(n,{actionType:w.UserAction.Edit,entity:w.EntityType.Video,location:w.LocationContext.EditVideoDetails,workflowPhase:t})}},{key:"logDissocAction",value:function(e,t,n){var o=Object.assign({videoId:e},t.pick("id","name"));k.a.logUserAction(o,{actionType:w.UserAction.Dissociate,entity:n,location:w.LocationContext.EditVideoDetails})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.model.fields&&this.model.fields.length||this.model.set("fields",Object(O.d)()),this.viewModel=s.a.get(this.viewModelName,this.model.toJSON(),{ctor:y.a}),this.editable&&(this.viewModel.addValidation(O.k),this.viewModel.addValidation(O.e)),this.viewModel.addValidation(O.b),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange),this.listenTo(this.viewModel,"change:dateBroadcast",o.partial(this.onModelChange,o,{manualUpdate:!0})),this.viewModel.fields&&(this.viewModel.fields&&this.viewModel.fields.each((function(e){return e.addValidation(O.c)})),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(){var e=this;this.model=this.videoDataService.getVideo(this.options.videoId),this.ratings=this.ratingsDataService.getAllRatings(),this.hostedLibraries=this.libraryDataService.getHostedLibraries(),this.migrationVideoDataService.getCustomerVideoByMasterId(this.options.videoId,(function(t){var n=!!e.publisherVideo;e.publisherVideo=t,n&&e.isRendered()&&e.renderContent()})),this.model&&(this.editable=v.j.canEditVideo(this.model),this.folder=this.model.categories.first(),this.ratings&&this.hostedLibraries&&(this.viewModel instanceof y.a||this.getViewModel()))}},{key:"requiredResources",get:function(){return{libraries:E.b.libraries,currentUser:p.b.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.ratings&&!!this.viewModel}},{key:"renderContent",value:function(){var e=O.a.getChanges(this.model,this.viewModel)||o.keys(O.a.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new We({model:this.viewModel,ratings:this.ratings,libraries:this.libraries,hostedLibraries:this.hostedLibraries,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser,showPublisherVideoDetails:!!this.publisherVideo}))}},{key:"renderTabs",value:function(){this.showChildView("tabs",new qe.a({tabs:v.v.getEditVideoTabs(this.options.videoId,{hideChaptersTab:!this.editable}),activeTab:".edit-video-applink",goBackTab:v.v.getBackButton(this.options.videoId)}))}},{key:"onRender",value:function(){this.renderTabs(),this.renderContent()}}])&&et(t.prototype,n),T&&et(t,T),Object.defineProperty(t,"prototype",{writable:!1}),P}(r.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[28],{1074:function(e,t,n){"use strict";var o=n(2),i=n(19),r=n(6),a=n(0),s=n(306),l=n(1140),c=n.n(l),u=n(1141),f=n.n(u);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})(e)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(l,e);var t,n,o,i=v(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"TagItemComponent"}},{key:"tagName",get:function(){return this.options.behavior===s.b.Link?"a":"span"}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.c.Vertical?"":" d-inline-flex"),t="".concat(this.isSaving()?" saving":""),n="".concat(this.options.behavior===s.b.Disabled?" ".concat(f.a.disabled):""),o="".concat(this.options.behavior===s.b.Filter?" cursor-pointer":"");return"badge-pill tag py-1 px-2 my-1 mr-1".concat(o).concat(e).concat(t).concat(n)}},{key:"template",get:function(){return c.a}},{key:"elements",get:function(){return{close:".close"}}},{key:"appLinks",get:function(){return this.options.behavior!==s.b.Link?{}:{"[this]":{application:a.b.SEARCH,action:a.a.Search.HOME,params:{tag:this.model.get("name")}}}}},{key:"defaults",get:function(){return{behavior:s.b.Link,orientation:s.c.Flex}}},{key:"events",value:function(){return this.options.removeEvent?{"click @ui.close":"onRemoveTag"}:{click:"onClickTag"}}},{key:"initialize",value:function(){this.options.behavior===s.b.Edit&&this.listenTo(this.model,"change",this.render)}},{key:"isSaving",value:function(){if(this.options.behavior!==s.b.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.b.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()}}])&&h(t.prototype,n),o&&h(t,o),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.a.Component);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function w(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=O(e);if(t){var i=O(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return E(this,n)}}function E(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function O(e){return(O=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return T}));var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(l,e);var t,n,r,a=S(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,(n=[{key:"initialize",value:function(){this.options.behavior!==s.b.Edit||this.options.removeEvent||o.a.ErrorHelper.throw(new i.a("removeEvent is required to edit tags."))}},{key:"name",get:function(){return"TagComponentCollection"}},{key:"defaults",get:function(){return{orientation:s.c.Flex}}},{key:"className",get:function(){var e="".concat(this.options.orientation===s.c.Vertical?" d-flex align-items-start flex-column":"");return"tags".concat(e)}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,behavior:this.options.behavior,orientation:this.options.orientation,removeEvent:this.options.removeEvent,clickEvent:this.options.clickEvent}}},{key:"childView",get:function(){return b}}])&&w(t.prototype,n),r&&w(t,r),Object.defineProperty(t,"prototype",{writable:!1}),l}(o.a.ComponentCollection)},1096:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(1),i=n(2),r=n(1097),a=n.n(r),s=n(1098),l=n.n(s);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=p(e);if(t){var i=p(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(s,e);var t,n,i,r=d(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),r.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"TabsView"}},{key:"className",get:function(){var e="bg-white py-2 border-bottom";return this.options.className&&(e+=" ".concat(this.options.className)),e}},{key:"template",get:function(){return l.a}},{key:"appLinks",get:function(){var e={};return this.options.tabs.forEach((function(t){return e[t.link.selector]=t.link.appLink})),e}},{key:"viewOptions",value:function(){var e=this.options.tabs.map((function(e){return Object.assign(Object.assign({},e),{link:e.link.selector.replace(".","")})}));return{styles:a.a,tabs:e}}},{key:"setActiveTab",value:function(){var e=this,t=!1;if(this.options.tabs.forEach((function(n){n.active=!1,n.link.selector===e.options.activeTab&&(n.active=!0,t=!0)})),!t){var n=o.first(this.options.tabs);n&&(n.active=!0)}}},{key:"onBeforeRender",value:function(){this.setActiveTab()}}])&&u(t.prototype,n),i&&u(t,i),Object.defineProperty(t,"prototype",{writable:!1}),s}(i.a.Component)},1097:function(e,t,n){e.exports={link:"_5idZs",active:"_3Ty4M"}},1098:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return null!=(s=n.unless.call(null!=t?t:e.nullContext||{},null!=t?t.hide:t,{name:"unless",hash:{},fn:e.program(2,i,0,r,a),inverse:e.noop,data:i}))?s:""},2:function(e,t,n,o,i,r,a){e.propertyIsEnumerable;var s,l=e.lambda,c=e.escapeExpression;return' <a class="'+c(l(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.link:s,t))+" p-2 "+c(l(null!=t?t.link:t,t))+" "+(null!=(s=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.active:t,{name:"if",hash:{},fn:e.program(3,i,0,r,a),inverse:e.noop,data:i}))?s:"")+'">'+c(l(null!=t?t.name:t,t))+"</a>\r\n"},3:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(s=null!=(s=null!=a[1]?a[1].options:a[1])?s.styles:s)?s.active:s,t))+" border-bottom border-primary text-primary"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i,r,a){var s;e.propertyIsEnumerable;return null!=(s=n.each.call(null!=t?t:e.nullContext||{},null!=(s=null!=t?t.options:t)?s.tabs:s,{name:"each",hash:{},fn:e.program(1,i,0,r,a),inverse:e.noop,data:i}))?s:""},useData:!0,useDepths:!0})},1116:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var o=n(6),i=n(2),r=n(16),a=n(1117),s=n.n(a),l=n(1118),c=n.n(l),u=n(0),f=n(1096);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})(e)}function h(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var i=m(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return y(this,n)}}function y(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(l,e);var t,n,i,a=v(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"EditVideoTabsComponent"}},{key:"className",get:function(){return"bg-white"}},{key:"regions",value:function(){return{tabs:{el:".tabs-region",replaceElement:!0}}}},{key:"template",get:function(){return c.a}},{key:"appLinks",get:function(){var e,t,n,o=this.options.goBackTab.link;return e={},t=o.selector,n=o.appLink,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},{key:"viewOptions",value:function(){var e=Object.assign(Object.assign({},this.options.goBackTab),{link:this.options.goBackTab.link.selector.replace(".","")});return{styles:s.a,backTab:e,backArrow:r.a.getSvg(r.b.ArrowLeft)}}},{key:"onSave",value:function(){o.Radio.channel(u.b.LIBRARY_EDITOR).trigger(u.a.LibraryEditor.SAVE_VIDEO)}},{key:"onRender",value:function(){this.showChildView("tabs",new f.a({tabs:this.options.tabs,activeTab:this.options.activeTab}))}}])&&h(t.prototype,n),i&&h(t,i),Object.defineProperty(t,"prototype",{writable:!1}),l}(i.a.Component)},1117:function(e,t,n){e.exports={svgContainer:"_27gR6"}},1118:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,s=e.escapeExpression;return'<div class="row">\r\n <h4>\r\n <a class="d-inline-flex align-items-center '+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.link:r,t))+" "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.backTab:r)?r.link:r,t))+'">\r\n <span class="'+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block mx-2">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.backArrow:r,t))?r:"")+"</span>\r\n "+s(a(null!=(r=null!=(r=null!=t?t.options:t)?r.backTab:r)?r.name:r,t))+'\r\n </a>\r\n </h4>\r\n</div>\r\n<div class="tabs-region pl-2"></div>'},useData:!0})},1140:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){return'<span class="close cursor-pointer" aria-hidden="true">&times;</span>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,s=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,c=e.escapeExpression;return'<span class="clamp-1" title="'+c("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)?a.call(s,{name:"name",hash:{},data:i}):a)+'">'+c("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:l)?a.call(s,{name:"name",hash:{},data:i}):a)+"</span>\r\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})},1141:function(e,t,n){e.exports={disabled:"_3Vziu"}},1282:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return'<div class="form-group">\r\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>\r\n <div class="text-area-region"></div>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})},1283:function(e,t,n){var o=n(10);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>\r\n<div class="text-muted mb-3">This information is only visible to admins and will not be searchable</div>\r\n<div class="fields-region"></div>'},useData:!0})},1284:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return"<h5>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.headerText:r,t))+"</h5>\r\n"},3:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return"<p>"+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.emptyStateText:r,t))+"</p>\r\n"},5:function(e,t,n,o,i){return'<div class="tag-selector-region"></div>\r\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})},1285:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return'<span class="text-muted mx-2 undo '+a(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.undo:r,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"undo",{name:"lang",hash:{},data:i}))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return(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})},1286:function(e,t,n){e.exports={saveButton:"_2FsA6",undo:"v6msX"}},1287:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i){e.propertyIsEnumerable;return"<h5>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"label",{name:"lang",hash:{},data:i}))+"</h5>\r\n"},3:function(e,t,n,o,i){return"my-2"},5:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return' <div class="text-muted mt-3 mb-1"><em>'+l((n.lang||t&&t.lang||s).call(a,"recommendedSize",{name:"lang",hash:{height:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.height:r,width:null!=(r=null!=(r=null!=t?t.options:t)?r.dimensions:r)?r.width:r},data:i}))+'</em></div>\r\n <button class="upload-thumbnail btn btn-light mb-3 w-100">'+l((n.lang||t&&t.lang||s).call(a,"upload",{name:"lang",hash:{},data:i}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=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>\r\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:"")+'">\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})},1288:function(e,t,n){var o=n(10);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;e.propertyIsEnumerable;return' <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))+'">\r\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>\r\n"},4:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return" "+(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:"")+"\r\n"},6:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return" "+(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:"")+"\r\n"},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">\r\n <div class="left-pane col-4">\r\n <div class="thumbnail-region"></div>\r\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>\r\n <div class="customer-tags-region"></div>\r\n </div>\r\n <div class="right-pane col-8">\r\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>\r\n <div class="basic-info-region mb-4"></div> \r\n <div class="additional-details-region mb-4"></div> \r\n <div class="production-info-region mb-4"></div> \r\n <div class="fields-region mb-4"></div>\r\n <div class="bottom-save-region"></div>\r\n </div>\r\n</div>'},useData:!0})},1289:function(e,t,n){e.exports={suggestEdit:"_1X4l5"}},1290:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){return'<div class="tab-region"></div>\r\n<div class="edit-content-region"></div>\r\n<div class="dialog-region"></div>'},useData:!0})},1474:function(e,t,n){"use strict";n.r(t);var o=n(1),i=n(6),r=n(2),a=n(19),s=n(30),l=n(3),c=n(15),u=n(5),f=n(121),d=n(0),h=n(320),p=n(144),v=n(12),y=n(103),m=n(237),b=n(318),g=n(9),w=n(4),k=n(42),S=n(200),E=n(146),O=n(1050),T=n(1203),C=n(1208),P=n(1206),j=n(1205),R=n(1282),x=n.n(R);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})(e)}function D(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=I(e);if(t){var i=I(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return V(this,n)}}function V(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)}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var L=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}(a,e);var t,n,o,r=M(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),r.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){var e=this;this.listenTo(this.model,"change",(function(){return e.options.viewModel.validate()}))}},{key:"template",get:function(){return x.a}},{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 j.a({name:"value",class:"form-control",placeholder:this.model.get("placeholder"),id:"admin-notes"})),this.stickit(),i.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),i.Validation.unbind(this)}}])&&D(t.prototype,n),o&&D(t,o),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.a.Component),B=n(1283),A=n.n(B);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})(e)}function F(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function J(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function z(e,t,n){return t&&J(e.prototype,t),n&&J(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function H(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}function G(e,t){return(G=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=q(e);if(t){var i=q(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return W(this,n)}}function W(e,t){if(t&&("object"===U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var X=function(e){H(n,e);var t=Y(n);function n(e){return F(this,n),t.call(this,e)}return z(n,[{key:"name",get:function(){return"ExtraInfoComponentCollection"}},{key:"childView",get:function(){return L}},{key:"childViewOptions",get:function(){return{viewModel:this.options.viewModel}}}]),n}(r.a.ComponentCollection),K=function(e){H(n,e);var t=Y(n);function n(e){return F(this,n),t.call(this,e)}return z(n,[{key:"name",get:function(){return"ExtraInfoComponent"}},{key:"template",get:function(){return A.a}},{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 X({collection:this.model.fields,viewModel:this.model}))}}]),n}(r.a.Component),Z=n(266),Q=n(99),$=n(314),ee=n(1110),te=n(1074),ne=n(306),oe=n(1284),ie=n.n(oe);function re(e){return(re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ae(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 se(e,t){return(se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=ue(e);if(t){var i=ue(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return ce(this,n)}}function ce(e,t){if(t&&("object"===re(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ue(e){return(ue=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&se(e,t)}(s,e);var t,n,o,i=le(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),i.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"TagsComponent"}},{key:"template",get:function(){return ie.a}},{key:"lang",get:function(){return"libraryEditor.tags"}},{key:"defaults",get:function(){return{headerText:l.a.getPhrase(this.lang,"heading"),orientation:ne.c.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!==ne.b.Edit||this.options.parentId||r.a.ErrorHelper.throw(new a.a("parentId is required to edit tags."))}},{key:"getTypeaheadConfigs",value:function(){var e=$.a.getTypeaheadConfig(),t=$.a.getBloodhoundConfig(),n={newType:d.v.TagsRaw},o={newType:d.v.TagsRaw,footerTemplate:Q.a.getConfirmSelectionTemplate()};return[{name:d.v.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===ne.b.Edit,emptyStateText:e}}},{key:"showEmptyStateText",value:function(){return this.options.behavior!==ne.b.Edit&&!this.collection.length&&!!this.options.emptyStateText}},{key:"renderTagSelector",value:function(){this.options.behavior===ne.b.Edit&&this.showChildView("tagSelector",new ee.a({model:this.model,parentChannelName:this.options.channelName,inputId:"tag-select",selectEvent:"add:tag",typeaheadConfigs:this.getTypeaheadConfigs(),placeholderText:l.a.getPhrase(this.lang,"placeholder"),callbacks:{onRender:Q.a.selectFirstResult,onBlur:Q.a.clearInputOnBlur},typeaheadOptions:{hint:!1},actionOptions:{clearOnSelect:!0},autofocus:this.options.autofocus}))}},{key:"renderTagList",value:function(){this.showEmptyStateText()||this.showChildView("tagList",new te.a({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()}}])&&ae(t.prototype,n),o&&ae(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.a.Component),de=n(265),he=n(1285),pe=n.n(he),ve=n(1286),ye=n.n(ve);function me(e){return(me="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 be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ge(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 we(e,t){return(we=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ke(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ee(e);if(t){var i=Ee(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Se(this,n)}}function Se(e,t){if(t&&("object"===me(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ee(e){return(Ee=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Oe=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&we(e,t)}(s,e);var t,n,o,a=ke(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"SaveComponent"}},{key:"template",get:function(){return pe.a}},{key:"className",get:function(){return"save-component ".concat(this.options.extraClasses)}},{key:"lang",get:function(){return"libraryEditor.save"}},{key:"getParentChannel",value:function(){return i.Radio.channel(this.options.channelName)}},{key:"getSaveChannelName",value:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .undo":"onUndo"}}},{key:"initialize",value:function(){var e;this.model||(this.model=new r.a.Model((be(e={},de.c.ShowSpinner,this.options.showSpinner),be(e,de.c.Disabled,this.options.isDisabled),e)));var t=this.options.channelName;this.listenTo(t,S.LibraryEditorActions.DisableSave,this.onDisableSave),this.listenTo(t,S.LibraryEditorActions.EnableSave,this.onEnableSave),this.listenTo(t,S.LibraryEditorActions.CancelSave,this.onCancelSave);var n=i.Radio.channel(this.getSaveChannelName());this.listenTo(n,S.LibraryEditorActions.Save,this.onSave),this.options.allowUndo&&(this.options.hasChanges&&this.model.set("showUndo",!0),this.listenTo(this.model,"change:showUndo",this.render))}},{key:"onCancelSave",value:function(){this.model.set(de.c.ShowSpinner,!1)}},{key:"onEnableSave",value:function(){this.model.set(de.c.Disabled,!1),this.options.allowUndo&&this.model.set("showUndo",!0)}},{key:"onDisableSave",value:function(){this.model.get(de.c.ShowSpinner)&&this.model.set(de.c.ShowSpinner,!1,{silent:!0}),this.model.set(de.c.Disabled,!0),this.options.allowUndo&&this.model.set("showUndo",!1)}},{key:"onUndo",value:function(e){e.stopPropagation(),this.getParentChannel().trigger(S.LibraryEditorActions.Undo)}},{key:"onSave",value:function(){this.model.set(de.c.ShowSpinner,!0),this.getParentChannel().trigger(S.LibraryEditorActions.Save)}},{key:"viewOptions",value:function(){return{allowUndo:this.options.allowUndo&&this.model.get("showUndo"),styles:ye.a}}},{key:"renderSaveButton",value:function(){var e=new de.a({saveEvent:S.LibraryEditorActions.Save,channelName:this.getSaveChannelName(),model:this.model,buttonText:l.a.getPhrase(this.lang,"save"),extraButtonClass:"btn-primary ".concat(ye.a.saveButton),spinnerOptions:{size:v.s.Small,type:v.t.Light,extraClasses:"mx-auto"}});this.showChildView("save",e)}},{key:"onRender",value:function(){this.renderSaveButton()}}])&&ge(t.prototype,n),o&&ge(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.a.Component),Te=n(203),Ce=n(205),Pe=n(305),je=n(1287),Re=n.n(je);function xe(e){return(xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ne(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 De(e,t){return(De=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function _e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ve(e);if(t){var i=Ve(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Me(this,n)}}function Me(e,t){if(t&&("object"===xe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ve(e){return(Ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ie=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&De(e,t)}(r,e);var t,n,o,i=_e(r);function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),i.call(this,e)}return t=r,(n=[{key:"initialize",value:function(){this.viewModel=s.a.get("image:storage")}},{key:"name",get:function(){return"EditThumbnailComponent"}},{key:"lang",get:function(){return"libraryEditor.editThumbnail"}},{key:"template",get:function(){return Re.a}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:Pe.b,channelName:this.options.channelName,buttonSelector:".upload-thumbnail",imageType:g.f.Thumbnails,appLink:{application:d.b.LIBRARY_EDITOR,action:d.a.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:d.m[g.f.Thumbnails]}}},{key:"onRender",value:function(){this.showChildView("thumbnail",new Te.a({model:this.model,thumbnailOptions:{size:Ce.a.Medium}}))}}])&&Ne(t.prototype,n),o&&Ne(t,o),Object.defineProperty(t,"prototype",{writable:!1}),r}(r.a.Component),Le=n(1288),Be=n.n(Le),Ae=n(1289),Ue=n.n(Ae);function Fe(e){return(Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Je(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ze(e,t){return(ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function He(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ye(e);if(t){var i=Ye(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return Ge(this,n)}}function Ge(e,t){if(t&&("object"===Fe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ye(e){return(Ye=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var We=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ze(e,t)}(r,e);var t,n,o,i=He(r);function r(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),i.call(this,e)}return t=r,(n=[{key:"initialize",value:function(){var e=this;this.listenTo(this.options.channelName,"update:tags",(function(){return e.renderCustomerTags(!0)}))}},{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 Be.a}},{key:"appLinks",get:function(){return{".suggest-edit":{application:d.b.LIBRARY_EDITOR,action:d.a.LibraryEditor.SUGGEST_AN_EDIT,args:[this.model.id]}}}},{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},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:"renderSave",value:function(){this.options.editable&&this.showChildView("topSave",new Oe({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-right"})),this.showChildView("bottomSave",new Oe({channelName:this.options.channelName,allowUndo:!0,isDisabled:this.options.isSaveDisabled,hasChanges:this.options.hasChanges,extraClasses:"float-right"}))}},{key:"renderBasicInfo",value:function(){this.showChildView("basicInfo",new T.a({model:this.model,ratings:this.options.ratings,channelName:this.options.channelName,editable:this.options.editable,showingSaveButton:this.options.editable,showPublisherVideoDetails:this.options.showPublisherVideoDetails}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new Ie({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderAdditionalInfo",value:function(){this.showChildView("additionalInfo",new P.a({model:this.model,channelName:this.options.channelName,libraries:this.options.libraries,hostedLibraries:this.options.hostedLibraries,editable:this.options.editable}))}},{key:"renderProductionInfo",value:function(){this.showChildView("productionInfo",new C.a({model:this.model,channelName:this.options.channelName,editable:this.options.editable}))}},{key:"renderFields",value:function(){this.showChildView("fields",new K({model:this.model,channelName:this.options.channelName}))}},{key:"renderClickViewTags",value:function(){if(!this.options.editable){var e=v.j.filterObjectsByOwnerType(this.model.tags,Z.a.ClickView,this.options.currentUser.get("customerId"));this.showChildView("clickViewTags",new fe({parentId:this.model.get("id"),collection:e,orientation:ne.c.Flex,behavior:ne.b.Disabled,channelName:this.options.channelName,headerText:l.a.getPhrase(this.lang,"clickviewTags"),emptyStateText:l.a.getPhrase(this.lang,"clickviewTagsEmpty")}))}}},{key:"renderCustomerTags",value:function(e){var t=v.j.filterObjectsByOwnerType(this.model.tags,Z.a.Customer,this.options.currentUser.get("customerId"));this.showChildView("customerTags",new fe({parentId:this.model.get("id"),collection:t,channelName:this.options.channelName,behavior:ne.b.Edit,headerText:l.a.getPhrase(this.lang,"customerTags"),removeEvent:"remove:tag",autofocus:!!e}))}},{key:"renderTags",value:function(){this.renderClickViewTags(),this.renderCustomerTags()}},{key:"viewOptions",value:function(){return{styles:Ue.a,editable:this.options.editable,suggestEditClasses:"info-link text-underline suggest-edit",isExchange:v.y.isExchangeVideo(this.model)}}},{key:"onRender",value:function(){this.renderSave(),this.renderBasicInfo(),this.renderThumbnail(),this.renderAdditionalInfo(),this.renderProductionInfo(),this.renderFields(),this.renderTags()}}])&&Je(t.prototype,n),o&&Je(t,o),Object.defineProperty(t,"prototype",{writable:!1}),r}(r.a.Component),qe=n(1116),Xe=n(315),Ke=n(316),Ze=n(1290),Qe=n.n(Ze);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)}function et(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 tt(e,t){return(tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function nt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=it(e);if(t){var i=it(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return ot(this,n)}}function ot(e,t){if(t&&("object"===$e(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function it(e){return(it=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"EditVideoView",(function(){return rt}));var rt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tt(e,t)}(P,e);var t,n,T,C=nt(P);function P(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,P),(t=C.call(this,e)).editable=!1,t}return t=P,(n=[{key:"name",get:function(){return"EditVideoView"}},{key:"title",get:function(){return this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editVideo"}},{key:"className",get:function(){return"bg-white p-3"}},{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 Qe.a}},{key:"regions",value:function(){return{tabs:{el:".tab-region",replaceElement:!0,partialLoading:g.h.EditVideoTabs},content:{el:".edit-content-region",replaceElement:!0,partialLoading:g.h.EditVideoDetails}}}},{key:"initialize",value:function(){this.navLock=u.a.getInstance(d.x.NavLock,this),this.initDataListeners(),v.v.initBackButton(),this.initServices()}},{key:"initServices",value:function(){this.videoDataService=u.a.getInstance(d.g.Video,this),this.tagDataService=u.a.getInstance(d.g.Tags,this),this.libraryDataService=u.a.getInstance(d.g.Library,this),this.seriesDataService=u.a.getInstance(d.g.Series,this),this.ratingsDataService=u.a.getInstance(d.g.Ratings,this),this.migrationVideoDataService=u.a.getInstance(d.g.MigrationVideo,this),this.fieldsDataService=u.a.getInstance(d.g.Fields,this),this.alertService=u.a.getInstance(d.x.Alerts,this),this.personDataService=u.a.getInstance(d.g.Person,this),this.companyDataService=u.a.getInstance(d.g.Company,this)}},{key:"initDataListeners",value:function(){this.listenTo(c.a.SHELL,r.a.EventNames.NAV_UNLOCKED_BY_USER,this.onNavigateAway),this.listenTo(d.e.VIDEO,"videos:".concat(this.options.videoId,":sync"),this.render),this.listenTo(d.e.VIDEO,"videos:".concat(this.options.videoId,":error"),this.onError),this.listenTo(d.e.RATINGS,"".concat(d.f.RATINGS,":sync"),this.render),this.listenTo(d.e.VIDEO,"".concat(d.f.UPDATE_VIDEO_THUMBNAIL,":").concat(this.options.videoId,":sync"),this.onThumbnailUpdated),this.listenTo(d.e.LIBRARY,"hosted:libraries:sync",this.render),this.listenTo(this.channelName,"select:rating",o.partial(this.onTypeaheadSelection,o,"rating")),this.listenTo(this.channelName,"select:channel",o.partial(this.onTypeaheadSelection,o,"channel")),this.listenTo(this.channelName,"select:series",this.onSelectSeries),this.listenTo(this.channelName,"add:season",this.onSelectSeason),this.listenTo(this.channelName,"add:distributors",this.onSelectDistributor),this.listenTo(this.channelName,"add:productionCompanies",this.onSelectProductionCompany),this.listenTo(this.channelName,"add:directors",this.onSelectDirector),this.listenTo(this.channelName,"add:producers",this.onSelectProducer),this.listenTo(this.channelName,"add:tag",this.onAddTag),this.listenTo(this.channelName,"remove:distributors",this.onRemoveDistributor),this.listenTo(this.channelName,"remove:productionCompanies",this.onRemoveProductionCompany),this.listenTo(this.channelName,"remove:directors",this.onRemoveDirector),this.listenTo(this.channelName,"remove:producers",this.onRemoveProducer),this.listenTo(this.channelName,"remove:tag",this.onRemoveTag),this.listenTo(this.channelName,S.LibraryEditorActions.Save,this.onSave),this.listenTo(this.channelName,S.LibraryEditorActions.Undo,this.onUndo),this.listenTo(this.channelName,S.LibraryEditorActions.DetectInput,this.onTypeaheadInput),this.listenTo(this.channelName,"image:load",this.onBeforeThumbnailUpload)}},{key:"onError",value:function(e){switch(e.type){case f.a.NotFound:r.a.ErrorHelper.throw(new Ke.a);break;case f.a.Forbidden:r.a.ErrorHelper.throw(new Xe.a)}}},{key:"onTypeaheadSelection",value:function(e,t,n){if(n){var i=this.viewModel.get(t),r=i.filter({name:e.name});o.each(r,(function(e){return i.remove(e)})),i.add(e)}else this.viewModel.set(t,e);this.onModelChange(e,{manualUpdate:!0})}},{key:"onTypeaheadInput",value:function(e,t,n){e.get("name")||(n&&n.isCollection?this.viewModel.get(t).remove(e.get("id"),{silent:!0}):this.viewModel.get(t).clear({silent:!0}),this.onModelChange(null,{manualUpdate:!0}),"series"===t&&(this.validateSeries(),i.Radio.channel(this.channelName).trigger("clear:series")))}},{key:"onSelectSeries",value:function(e){var t=this;e.id?this.seriesDataService.getSeries(e.id,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection(e.toJSON(),"series")})):e.name&&this.seriesDataService.createSeries(e.name,(function(e){t.viewModel.unset("season"),t.viewModel.set("episodeNumber",null),t.onTypeaheadSelection({id:e.id},"series")}))}},{key:"onSelectSeason",value:function(e){var t=this;if(o.isNull(e))return this.viewModel.get("season").clear({silent:!0}),this.viewModel.set("episodeNumber",null),v.c.deselectAll(this.viewModel.get("series.seasons")),void this.onModelChange(null,{manualUpdate:!0});if(e.id)return this.viewModel.set("season",e),v.c.setSelected(e.id,this.viewModel.get("series.seasons")),void this.onModelChange(e,{manualUpdate:!0});if(e.number){var n=this.viewModel.get("series.id");this.seriesDataService.createSeason(e,n,(function(e){t.viewModel.set("season",e.toJSON()),!t.viewModel.get("series.seasons")&&t.viewModel.get("series").set("seasons",new h.a),t.viewModel.get("series.seasons").add(e.toJSON()),v.c.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&&!v.c.findModelByName(n,this.viewModel.tags)){var o=new m.a({name:n});this.viewModel.tags.add(o),this.tagDataService.createTag(n,this.model.get("id"),(function(e){o.set(e.toJSON()),i.Radio.channel(t.channelName).trigger("update:tags")}))}}}},{key:"onRemoveTag",value:function(e){var t=this;e instanceof m.a&&e.id&&this.tagDataService.dissociateTag(e.id,this.model.get("id"),(function(){t.viewModel.tags.remove(e),i.Radio.channel(t.channelName).trigger("update:tags"),t.logDissocAction(t.model.get("id"),e,w.EntityType.Tag)}))}},{key:"saveFields",value:function(e,t){var n=this,i=0;e.updatedVideo=o.extend({},e.updatedVideo||{});var r=function(){++i===e.dataChanges.fields.length&&t(e)};o.each(e.dataChanges.fields,(function(e){if(e.id&&!e.value)return n.viewModel.fields.remove(n.viewModel.fields.findWhere({id:e.id})),void n.fieldsDataService.deleteField(e.id,r);!e.id||e.id>0?n.fieldsDataService.updateField(e,r):n.fieldsDataService.addField(n.options.videoId,e,(function(t){n.viewModel.fields.findWhere({id:e.id}).set("id",t.id),r()}))}))}},{key:"bulkDissoc",value:function(e,t){this.videoDataService.bulkDissoc(this.model.id,e.pendingDissocs,(function(){t(e)}))}},{key:"saveVideo",value:function(e,t){var n=this,i=o.omit(e.dataChanges,"fields");if(o.isEmpty(i))t(e);else{var r=o.omit(e.dataChanges,"fields");this.videoDataService.updateVideo(this.model.get("id"),this.folder.get("id"),r,(function(i){(e.dataChanges.series&&e.dataChanges.series.id||e.dataChanges.episodeNumber||e.dataChanges.season)&&n.videoDataService.clearVideoCache(),e.updatedVideo=o.extend({},e.updatedVideo||{},i),t(e)}))}}},{key:"afterSave",value:function(e){if(this.viewModel){e.updatedVideo&&this.updateState(e.updatedVideo),this.unlockNav(),this.updateSaveButton(S.LibraryEditorActions.DisableSave),this.logEditAction(e.dataChanges,w.WorkflowPhase.Save);var t=b.a.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(S.LibraryEditorActions.CancelSave),!1;this.validateSeries();var e=O.a.getChanges(this.model,this.viewModel),t=O.a.getRemovedObjectIds(this.model,this.viewModel);if(!e&&!o.keys(t).length)return this.updateSaveButton(S.LibraryEditorActions.CancelSave),!1;var n=new r.a.Middleware;return e&&e.fields&&n.use(o.bind(this.saveFields,this)),t&&o.keys(t).length&&n.use(o.bind(this.bulkDissoc,this)),this.editable&&n.use(o.bind(this.saveVideo,this)),n.use(o.bind(this.afterSave,this)),n.go({dataChanges:e,pendingDissocs:t},null),!1}},{key:"onUndo",value:function(){var e=this;new v.d({title:l.a.getPhrase(this.lang,"undoTitle"),text:l.a.getPhrase(this.lang,"undoBody",{videoName:this.model.get("name")}),buttons:[{text:l.a.getPhrase(this.lang,"undo"),className:"btn btn-danger",success:!0},{text:l.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}]}).render().done((function(){e.logEditAction({},w.WorkflowPhase.Discard),e.revertState({undo:!0}),e.render()}))}},{key:"updateState",value:function(e){this.stopListening(this.viewModel),O.a.updateModelState(this.model,this.viewModel,e),s.a.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]:{},t=e.undo;this.stopListening(this.viewModel),s.a.clear(this.viewModelName),delete this.viewModel,this.unlockNav(),t&&this.getViewModel()}},{key:"lockNav",value:function(){this.navLock.lock({title:l.a.getPhrase(this.lang,"navLockHeading"),text:l.a.getPhrase(this.lang,"navLockBody")})}},{key:"unlockNav",value:function(){this.navLock.unlock()}},{key:"onBeforeThumbnailUpload",value:function(){this.navLock.isLocked()&&(this.navLock.unlock(),s.a.get("upload:thumbnail:options").set("lockNav",!0))}},{key:"onModelChange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t.stickitChange||t.manualUpdate)if(this.viewModel.validate(),!1!==this.viewModel.isValid()){var n=O.a.getChanges(this.model,this.viewModel)||o.keys(O.a.getRemovedObjectIds(this.model,this.viewModel)).length;if(!n)return this.unlockNav(),void this.updateSaveButton(S.LibraryEditorActions.DisableSave);this.lockNav(),this.updateSaveButton(S.LibraryEditorActions.EnableSave)}else this.updateSaveButton(S.LibraryEditorActions.DisableSave)}},{key:"updateSaveButton",value:function(e){var t=i.Radio.channel(this.channelName),n=S.LibraryEditorActions.EnableSave,o=S.LibraryEditorActions.DisableSave,s=S.LibraryEditorActions.CancelSave;switch(e){case n:return void t.trigger(n);case o:return void t.trigger(o);case s:return void t.trigger(s)}r.a.ErrorHelper.throw(new a.a("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);k.a.logUserAction(n,{actionType:w.UserAction.Edit,entity:w.EntityType.Video,location:w.LocationContext.EditVideoDetails,workflowPhase:t})}},{key:"logDissocAction",value:function(e,t,n){var o=Object.assign({videoId:e},t.pick("id","name"));k.a.logUserAction(o,{actionType:w.UserAction.Dissociate,entity:n,location:w.LocationContext.EditVideoDetails})}},{key:"onValidation",value:function(e){this.viewModel.set("disabled",!e)}},{key:"getViewModel",value:function(){this.model.fields&&this.model.fields.length||this.model.set("fields",Object(O.d)()),this.viewModel=s.a.get(this.viewModelName,this.model.toJSON(),{ctor:y.a}),this.editable&&(this.viewModel.addValidation(O.k),this.viewModel.addValidation(O.e)),this.viewModel.addValidation(O.b),this.listenTo(this.viewModel,"validated",this.onValidation),this.listenTo(this.viewModel,"change",this.onModelChange),this.listenTo(this.viewModel,"change:dateBroadcast",o.partial(this.onModelChange,o,{manualUpdate:!0})),this.viewModel.fields&&(this.viewModel.fields&&this.viewModel.fields.each((function(e){return e.addValidation(O.c)})),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(){var e=this;this.model=this.videoDataService.getVideo(this.options.videoId),this.ratings=this.ratingsDataService.getAllRatings(),this.hostedLibraries=this.libraryDataService.getHostedLibraries(),this.migrationVideoDataService.getCustomerVideoByMasterId(this.options.videoId,(function(t){var n=!!e.publisherVideo;e.publisherVideo=t,n&&e.isRendered()&&e.renderContent()})),this.model&&(this.editable=v.j.canEditVideo(this.model),this.folder=this.model.categories.first(),this.ratings&&this.hostedLibraries&&(this.viewModel instanceof y.a||this.getViewModel()))}},{key:"requiredResources",get:function(){return{libraries:E.b.libraries,currentUser:p.b.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.model&&!!this.ratings&&!!this.viewModel}},{key:"renderContent",value:function(){var e=O.a.getChanges(this.model,this.viewModel)||o.keys(O.a.getRemovedObjectIds(this.model,this.viewModel)).length;this.showChildView("content",new We({model:this.viewModel,ratings:this.ratings,libraries:this.libraries,hostedLibraries:this.hostedLibraries,channelName:this.channelName,isSaveDisabled:!e,hasChanges:!!e,editable:this.editable,currentUser:this.currentUser,showPublisherVideoDetails:!!this.publisherVideo}))}},{key:"renderTabs",value:function(){this.showChildView("tabs",new qe.a({tabs:v.v.getEditVideoTabs(this.options.videoId,{hideChaptersTab:!this.editable}),activeTab:".edit-video-applink",goBackTab:v.v.getBackButton(this.options.videoId)}))}},{key:"onRender",value:function(){this.renderTabs(),this.renderContent()}}])&&et(t.prototype,n),T&&et(t,T),Object.defineProperty(t,"prototype",{writable:!1}),P}(r.a.View)}}]);
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[29],{1044:function(e,t,n){"use strict";var o,r;n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return r})),function(e){e[e.Base=0]="Base",e[e.AwaitingReview=1]="AwaitingReview",e[e.PastReleases=2]="PastReleases",e[e.VideoAccess=3]="VideoAccess",e[e.ProcessingVideo=4]="ProcessingVideo",e[e.Draggable=5]="Draggable",e[e.Search=6]="Search"}(o||(o={})),function(e){e.Checkbox="checkbox",e.Thumbnail="thumbnail",e.Metadata="metadata",e.VideoActions="videoActions",e.VideoInfo="videoInfo"}(r||(r={}))},1073:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return w}));var o,r,i=n(2),l=n(12),a=n(3),s=n(1137),u=n.n(s),c=n(1138),p=n.n(c);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})(e)}function d(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Small="sm",e.Large="lg"}(r||(r={}));var b=(v(o={},r.Small,3),v(o,r.Large,5),o),w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(s,e);var t,n,o,i=y(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=i.call(this,e)).showingMore=!1,t}return t=s,(n=[{key:"name",get:function(){return"VideoDescriptionComponent"}},{key:"template",get:function(){return u.a}},{key:"lang",get:function(){return"shared.videoDescription"}},{key:"defaults",get:function(){return{size:"sm"}}},{key:"elements",get:function(){return{description:".description",ellipsis:this.options.allowExpand?".".concat(p.a.showMoreEllipsis):".".concat(p.a.singleEllipsis)}}},{key:"events",value:function(){return v({},"click .".concat(p.a.showMoreEllipsis),"onClickShowMore")}},{key:"onClickShowMore",value:function(e){e.preventDefault(),this.showingMore?this.showLessDescription():this.showMoreDescription()}},{key:"getDescription",value:function(){return this.options.linkify?l.w.linkifyText(this.model.get("description")):this.options.highlighter?l.w.wordsHighlighter(l.w.escapeExpression(this.model.get("description")),this.model.get("_matchedWords")):void 0}},{key:"getDescriptionElements",value:function(){return{descriptionTextEl:this.getUI("description"),ellipsisEl:this.getUI("ellipsis")}}},{key:"showMoreDescription",value:function(){var e=this.getDescriptionElements(),t=e.descriptionTextEl,n=e.ellipsisEl;t.removeClass(p.a.truncateLarge).addClass(p.a.open),n.text(a.a.getPhrase(this.lang,"showLess")),this.showingMore=!0}},{key:"showLessDescription",value:function(){var e,t=this.getDescriptionElements(),n=t.descriptionTextEl,o=t.ellipsisEl;this.options.size===r.Small&&(e="truncateSmall"),this.options.size===r.Large&&(e="truncateLarge"),n.addClass(p.a[e]),o.text(this.options.allowExpand?"... ".concat(a.a.getPhrase(this.lang,"showMore")):"...").removeClass(p.a.hideEllipsis).addClass(p.a.showEllipsis),this.showingMore=!1}},{key:"truncateDescription",value:function(){if(this.options.truncate){var e=this.getDescriptionElements().descriptionTextEl,t=b[this.options.size];e.height()<=21*t||this.showLessDescription()}}},{key:"viewOptions",value:function(){return{styles:p.a,truncate:this.options.truncate,expandable:this.options.allowExpand,description:this.getDescription()}}},{key:"onAttach",value:function(){this.truncateDescription()}}])&&d(t.prototype,n),o&&d(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(i.a.Component)},1089:function(e,t,n){"use strict";n.d(t,"a",(function(){return C}));var o=n(1),r=n(6),i=n(2),l=n(4),a=n(42),s=n(205),u=n(203),c=n(305),p=n(12),f=n(0),d=n(1194),h=n(1139),y=n.n(h);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=k(e);if(t){var r=k(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function k(e){return(k=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(g,e);var t,n,i,h=b(g);function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),h.call(this,e)}return t=g,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"VideoPreviewComponent"}},{key:"template",get:function(){return y.a}},{key:"instanceChannelName",get:function(){return p.k.generateUniqueChannelName(this)}},{key:"defaults",get:function(){return{captureAnalytics:!0}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.c,selector:".lazy-img",callback:function(){r.Radio.channel(e.instanceChannelName).trigger("show:play:icon")},minBrowserSupportVersion:f.p}]}},{key:"regions",value:function(){return{player:{el:".video-player-region",replaceElement:!1},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"events",value:function(){return{click:"onClick"}}},{key:"bindListeners",value:function(){this.options.channelName&&this.listenTo(this.options.channelName,"update:chapter:time",this.onUpdateWebplayer)}},{key:"onUpdateWebplayer",value:function(e){if(!this.player)return this.listenToOnce(this.options.channelName,"webplayer:loaded",o.bind(this.seekToChapter,this,e)),void this.renderVideoPreview();this.seekToChapter(e)}},{key:"seekToChapter",value:function(e){this.player.seekTo(e)}},{key:"onClick",value:function(){this.player||this.renderVideoPreview()}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new u.a({model:this.model,thumbnailOptions:{size:s.a.Medium},playIcon:!0,lazyload:!0,channelName:this.instanceChannelName}))}},{key:"renderVideoPreview",value:function(){this.player=new d.a({model:this.model,webPlayerUrl:this.options.webPlayerUrl,parentChannelName:this.options.channelName,autoplay:!0,analyticsOptions:a.a.mergeOptions(this.options.analyticsOptions,{entity:l.EntityType.Video}),captureAnalytics:this.options.captureAnalytics,currentUser:this.options.currentUser}),this.showChildView("player",this.player)}},{key:"onRender",value:function(){this.renderThumbnail()}}])&&m(t.prototype,n),i&&m(t,i),Object.defineProperty(t,"prototype",{writable:!1}),g}(i.a.Component)},1137:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return' <div class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.descriptionWrapper:i,t))+'">\r\n <p class="description '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.expandable:i,{name:"if",hash:{},fn:e.program(2,r,0),inverse:e.program(4,r,0),data:r}))?i:"")+"</p>\r\n </div>\r\n"},2:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.showMoreEllipsis:i,t))+" "+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">... '+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"showMore",{name:"lang",hash:{},data:r}))+"</span>"},4:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.singleEllipsis:i,t))+" "+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">...</span>'},6:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda;return' <p class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.truncate:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(6,r,0),data:r}))?i:""},useData:!0})},1138:function(e,t,n){e.exports={columnNames:"_1a1Re",descriptionWrapper:"_2MZC5",description:"_3U9j9",ellipsis:"_1YjUg",singleEllipsis:"_3SNtn",showMoreEllipsis:"xy3i9",showEllipsis:"_1_L9t",hideEllipsis:"TCdgP",open:"_18ojI",truncateSmall:"nLuVF",truncateLarge:"sEELY"}},1139:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="video-player-region cursor-pointer responsize-img">\r\n <div class="thumbnail-region"></div>\r\n</div>'},useData:!0})},1408:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){return'<div class="videos-region"></div>'},useData:!0})},1409:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;return'<p class="text-uppercase text-muted">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"description",{name:"lang",hash:{},data:r}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.description:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'<div class="description-region"></div>\r\n<div class="webplayer-region col-5 pl-0"></div>'},useData:!0})},1410:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;return" <span>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"series",{name:"lang",hash:{series:null!=t?t.series:t},data:r}))+"</span>\r\n"},3:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return" "+(null!=(i=n.if.call(l,null!=t?t.series:t,{name:"if",hash:{},fn:e.program(4,r,0),inverse:e.noop,data:r}))?i:"")+"\r\n <span>"+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"folder",{name:"lang",hash:{folder:null!=t?t.category:t},data:r}))+"</span>\r\n"},4:function(e,t,n,o,r){return'<span class="mx-1">|</span>'},6:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return' <span class="badge p-1 tool-tip '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.rating:i,t))+" "+a(l(null!=(i=null!=t?t.options:t)?i.ratingColorClass:i,t))+'" title="'+a(l(null!=(i=null!=t?t.rating:t)?i.name:i,t))+'">'+a(l(null!=(i=null!=t?t.rating:t)?i.code:i,t))+"</span>\r\n"},8:function(e,t,n,o,r){var i;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},t,{name:"if",hash:{},fn:e.program(9,r,0),inverse:e.noop,data:r}))?i:""},9:function(e,t,n,o,r){return' <div class="text-danger">'+e.escapeExpression(e.lambda(t,t))+"</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,a=null!=t?t:e.nullContext||{};return'<div>\r\n <a class="h6">'+e.escapeExpression("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:e.hooks.helperMissing)?l.call(a,{name:"name",hash:{},data:r}):l)+"</a>\r\n</div>\r\n<div>\r\n"+(null!=(i=n.if.call(a,null!=t?t.series:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+(null!=(i=n.if.call(a,null!=t?t.category:t,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+"</div>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.rating:t)?i.code:i,{name:"if",hash:{},fn:e.program(6,r,0),inverse:e.noop,data:r}))?i:"")+(null!=(i=n.each.call(a,null!=(i=null!=t?t.options:t)?i.errorStrings:i,{name:"each",hash:{},fn:e.program(8,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},1411:function(e,t,n){e.exports={rating:"_3IJcl"}},1412:function(e,t,n){e.exports={svgContainer:"_-0ibU",selectedButton:"_28zhr",showPreview:"_2r4VF"}},1413:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return' <button class="btn btn-success use-online-copy '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectedButton:i,t))+'"><span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.svgContainer:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.checkSvg:i,t))?i:"")+"</span>"+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"resolve",{name:"lang",hash:{},data:r}))+"</button>\r\n"},3:function(e,t,n,o,r){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <button class="btn btn-link dismiss">'+a((n.lang||t&&t.lang||l).call(i,"dismiss",{name:"lang",hash:{},data:r}))+'</button>\r\n <button class="btn btn-outline-secondary use-online-copy">'+a((n.lang||t&&t.lang||l).call(i,"resolve",{name:"lang",hash:{},data:r}))+"</button>\r\n"},5:function(e,t,n,o,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"hide",{name:"lang",hash:{},data:r}))},7:function(e,t,n,o,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"show",{name:"lang",hash:{},data:r}))},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.lambda,s=e.escapeExpression;return"<div>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.selected:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:"")+'</div>\r\n<div class="mt-4 cursor-pointer video-item-show-preview text-right '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.showPreview:i,t))+'">\r\n <span class="svg-container d-inline-block">'+(null!=(i=a(null!=(i=null!=t?t.options:t)?i.previewSvg:i,t))?i:"")+"</span>\r\n "+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.previewDisplayed:i,{name:"if",hash:{},fn:e.program(5,r,0),inverse:e.program(7,r,0),data:r}))?i:"")+" "+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"preview",{name:"lang",hash:{},data:r}))+"\r\n</div>"},useData:!0})},1414:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){return" cursor-pointer"},3:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.escapeExpression,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing;return'<div class="'+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.doNotAdd:i,t))+' text-center">\r\n <p class="mb-0 mt-3">'+(null!=(i=(n.lang||t&&t.lang||s).call(a,"willNotBeAdded",{name:"lang",hash:{videoName:null!=t?t.name:t},data:r}))?i:"")+'</p>\r\n <p class="m-0">'+l((n.lang||t&&t.lang||s).call(a,"willBeRemoved",{name:"lang",hash:{},data:r}))+'</p>\r\n <button class="btn btn-link undo">'+l((n.lang||t&&t.lang||s).call(a,"undo",{name:"lang",hash:{},data:r}))+"</button>\r\n</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression,s=null!=t?t:e.nullContext||{};return'<div class="d-flex justify-content-between align-items-stretch p-3 drag-item '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.videoItem:i,t))+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.isClickable:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'">\r\n <div class="thumbnail-region d-inline-block '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.thumbnailContainer:i,t))+'"></div>\r\n <div class="metadata-region d-inline-block px-3 '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.metaContainer:i,t))+'"></div>\r\n <div class="video-actions-region d-inline-block '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.actionsContainer:i,t))+'"></div>\r\n</div>\r\n<div class="video-info-region '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.previewContainer:i,t))+'"></div>\r\n'+(null!=(i=n.if.call(s,null!=(i=null!=t?t.options:t)?i.doNotAdd:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},1415:function(e,t,n){e.exports={component:"_13khy",thumbnailContainer:"_gEcp",metaContainer:"zuMb1",actionsContainer:"_1ppp8",videoItem:"_2Ru6c",doNotAdd:"_8l6WV"}},1416:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return'<span class="border-right d-inline-block align-middle pr-3">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"videosAdded",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.count:i},data:r}))+"</span>\r\n"},3:function(e,t,n,o,r){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.countPhrase:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'<span class="d-inline-block align-middle"><button class="btn btn-link clear-all"'+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.submitDisabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+">"+s((n.lang||t&&t.lang||a).call(l,"reset",{name:"lang",hash:{},data:r}))+'</button></span>\r\n<button class="btn btn-primary align-middle ml-2 submit" '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.submitDisabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+">"+s((n.lang||t&&t.lang||a).call(l,"submit",{name:"lang",hash:{},data:r}))+"</button>"},useData:!0})},1417:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l,a=e.escapeExpression,s=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<div class="m-auto text-warning '+a(e.lambda(null!=(i=null!=t?t.styles:t)?i.svgContainer:i,t))+'">'+(null!=(i="function"==typeof(l=null!=(l=n.warningSvg||(null!=t?t.warningSvg:t))?l:u)?l.call(s,{name:"warningSvg",hash:{},data:r}):l)?i:"")+"</div>\r\n<p>\r\n <div>"+(null!=(i="function"==typeof(l=null!=(l=n.onlineCopyCountText||(null!=t?t.onlineCopyCountText:t))?l:u)?l.call(s,{name:"onlineCopyCountText",hash:{},data:r}):l)?i:"")+' will be migrated to your Library Editor ignoring all warnings.</div>\r\n <span class="text-danger">\r\n '+a("function"==typeof(l=null!=(l=n.warningText||(null!=t?t.warningText:t))?l:u)?l.call(s,{name:"warningText",hash:{},data:r}):l)+"\r\n </span>\r\n</p> \r\n"},3:function(e,t,n,o,r){var i,l;e.propertyIsEnumerable;return"<p>"+(null!=(i="function"==typeof(l=null!=(l=n.doNotAddCountText||(null!=t?t.doNotAddCountText:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"doNotAddCountText",hash:{},data:r}):l)?i:"")+" will be removed from this list and will not be added to your library.</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(l,null!=t?t.onlineCopyCount:t,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+(null!=(i=n.if.call(l,null!=t?t.doNotAddCount:t,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")},useData:!0})},1418:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return' <h2 class="h3">'+s((n.lang||t&&t.lang||a).call(l,"couldNotBeMigrated",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.items:i},data:r}))+'</h2>\r\n <p class="mb-1">'+s((n.lang||t&&t.lang||a).call(l,"ensureValidity",{name:"lang",hash:{},data:r}))+'</p>\r\n <p class="mb-2"><a href="'+s(e.lambda(null!=(i=null!=t?t.options:t)?i.supportArticle:i,t))+'" target="_blank" class="text-info">'+s((n.lang||t&&t.lang||a).call(l,"moreInfo",{name:"lang",hash:{},data:r}))+'</a></p>\r\n <button class="approve-all btn btn-success d-inline-block mr-2" type="button">'+s((n.lang||t&&t.lang||a).call(l,"resolve",{name:"lang",hash:{},data:r}))+'</button>\r\n <button class="do-not-add btn btn-link d-inline-block" type="button">'+s((n.lang||t&&t.lang||a).call(l,"dismiss",{name:"lang",hash:{},data:r}))+"</button>\r\n"},3:function(e,t,n,o,r){return""},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<div class="tab-region '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.tabsContainer:i,t))+' border-bottom"></div>\r\n<div class="p-3 border-bottom '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.headingContainer:i,t))+'">\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.items:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:"")+'</div>\r\n<div class="videos-region '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.videoContainer:i,t))+'"></div>\r\n<div class="footer-region"></div>\r\n'},useData:!0})},1419:function(e,t,n){e.exports={migrationErrorView:"_1Jo6e",videoContainer:"_7tGnj",svgContainer:"csNIF",headingContainer:"_30NNv",tabsContainer:"_10__f"}},1471:function(e,t,n){"use strict";n.r(t);var o=n(1),r=n(2),i=n(5),l=n(30),a=n(3),s=n(16),u=n(309),c=n(4),p=n(42),f=n(201),d=n(0),h=n(9),y=n(12),g=n(305),m=n(1408),v=n(203),b=n(1044),w=n(103),k=n(1409),C=n(1073),E=n(1089);function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function S(e,t){return(S=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=_(e);if(t){var r=_(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return M(this,n)}}function M(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j,R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(i,e);var t,n,o,r=P(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"ErroredVideoPreviewComponent"}},{key:"className",get:function(){return"p-3 border-top"}},{key:"template",get:function(){return k}},{key:"lang",get:function(){return"migrationWizard.erroredVideoPreview"}},{key:"regions",value:function(){return{description:{el:".description-region",replaceElement:!0},webplayer:{el:".webplayer-region"}}}},{key:"onRender",value:function(){this.showChildView("webplayer",new E.a({webPlayerUrl:this.options.webplayerUrl,model:new w.a({duration:1e3*this.model.get("duration"),thumbnail:{url:"".concat(this.options.imageCdnUrl,"v1/thumbnails/trackingcode/").concat(this.model.get("trackingCode"))},trackingCode:this.model.get("trackingCode")}),captureAnalytics:!1,currentUser:this.options.currentUser})),this.model.get("description")&&this.showChildView("description",new C.a({model:this.model,linkify:!0,size:C.b.Large,truncate:!0,allowExpand:!0}))}}])&&x(t.prototype,n),o&&x(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component),V=n(1410),D=n(1411),T=n(53);function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var I="migrationWizard.utils",A=function(){return a.a.getPhrase(I,"videoFileCorrupt")},U=function(){return a.a.getPhrase(I,"videoFileInformationMissing")},L=function(){return a.a.getPhrase(I,"resouceFileMissing")},B=(N(j={},T.f.BinaryRemoved,(function(){return""})),N(j,T.f.LocalFileNotFound,(function(){return a.a.getPhrase(I,"videoFileMissing")})),N(j,T.f.DbEmptyChapter,A),N(j,T.f.DbChapterChecksumNotFound,A),N(j,T.f.DbChapterDurationNotFound,U),N(j,T.f.DbChapterFileSizeNotFound,U),N(j,T.f.DbChapterChecksumNotMatch,U),N(j,T.f.DbChapterDurationNotMatch,U),N(j,T.f.DbChapterFileSizeNotMatch,U),N(j,T.f.SubtitleUploadFailure,(function(){return a.a.getPhrase(I,"subtitleFileMissing")})),N(j,T.f.ResourceUploadFailure,L),N(j,T.f.ResourceFileNotFound,L),N(j,T.f.ResourceFileInvalid,L),N(j,T.f.DbResourceChecksumNotFound,L),N(j,T.f.DbResourceExtensionNotFound,L),N(j,T.f.DbResourceFileSizeNotFound,L),N(j,T.f.DbResourceChecksumNotMatch,L),N(j,T.f.DbResourceFileSizeNotMatch,L),N(j,T.f.CoverImageUploadFailure,(function(){return a.a.getPhrase(I,"thumbnailMissing")})),j),z=function(e){return o.unique(o.map(e,(function(e){return B[e]()})))},F=n(1049);function W(e){return(W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,o.key,o)}}function H(e,t){return(H=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Z(e);if(t){var r=Z(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Y(this,n)}}function Y(e,t){if(t&&("object"===W(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Z(e){return(Z=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var K=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&H(e,t)}(i,e);var t,n,o,r=J(i);function i(){return q(this,i),r.apply(this,arguments)}return t=i,(n=[{key:"name",get:function(){return"ErroredVideoMetadataComponent"}},{key:"template",get:function(){return V}},{key:"lang",get:function(){return"migrationWizard.erroredVideoMetadata"}},{key:"viewOptions",value:function(){return{styles:D,errorStrings:z(this.model.get("clientValidationResults")),ratingColorClass:this.model.get("rating")&&F.h.mapRatingToClass(this.model.get("rating").value)}}}])&&G(t.prototype,n),o&&G(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component),Q="use-online-copy",X="do-not-add",$="migration:errored:videos:preview",ee="migration:errored:videos:selected",te=n(1412),ne=n(1413);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})(e)}function re(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ie(e,t){return(ie=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=se(e);if(t){var r=se(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return ae(this,n)}}function ae(e,t){if(t&&("object"===oe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}(i,e);var t,n,o,r=le(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,e)}return t=i,(n=[{key:"initialize",value:function(){this.viewModel=l.a.get(ee),this.previewViewModel=l.a.get($),this.listenTo(this.viewModel,"change:".concat(this.model.get("id")),this.render)}},{key:"name",get:function(){return"ErroredVideoActionsComponent"}},{key:"template",get:function(){return ne}},{key:"lang",get:function(){return"migrationWizard.erroredVideoActions"}},{key:"className",get:function(){return"text-right"}},{key:"events",value:function(){return{"click .use-online-copy":"onClickSelect","click .dismiss":"onClickDismiss"}}},{key:"isSelected",value:function(){return this.viewModel.get(this.model.get("id"))===Q}},{key:"onClickSelect",value:function(e){e.stopPropagation(),this.previewViewModel.get(this.model.get("id"))&&this.previewViewModel.clear(),this.isSelected()?this.viewModel.unset(this.model.get("id")):this.viewModel.set(this.model.get("id"),Q)}},{key:"onClickDismiss",value:function(e){e.stopPropagation(),this.previewViewModel.get(this.model.get("id"))&&this.previewViewModel.clear(),this.viewModel.set(this.model.get("id"),X)}},{key:"viewOptions",value:function(){return{styles:te,selected:this.isSelected(),checkSvg:s.a.getSvg(s.b.Check),previewSvg:s.a.getSvg(s.b.Preview)}}}])&&re(t.prototype,n),o&&re(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component),ce=n(1414),pe=n(1415);function fe(e){return(fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function he(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 ye(e,t){return(ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=ve(e);if(t){var r=ve(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return me(this,n)}}function me(e,t){if(t&&("object"===fe(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ve(e){return(ve=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var be=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ye(e,t)}(i,e);var t,n,o,r=ge(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,e)}return t=i,(n=[{key:"initialize",value:function(){this.viewModel=l.a.get(ee),this.previewViewModel=l.a.get($),this.listenTo(this.viewModel,"change:".concat(this.model.get("id")),this.render),this.listenTo(this.previewViewModel,"change:".concat(this.model.get("id")),this.render),this.listenTo(this.channelName,"thumbnail:load",this.onThumbnailLoad)}},{key:"name",get:function(){return"ErroredVideoItemComponent"}},{key:"template",get:function(){return ce}},{key:"lang",get:function(){return"migrationWizard.erroredVideoItem"}},{key:"channelName",get:function(){return y.k.generateUniqueChannelName(this)}},{key:"className",get:function(){return"border-bottom ".concat(pe.component)}},{key:"regions",value:function(){var e;return de(e={},b.a.Thumbnail,".thumbnail-region"),de(e,b.a.Metadata,".metadata-region"),de(e,b.a.VideoActions,".video-actions-region"),de(e,b.a.VideoInfo,".video-info-region"),e}},{key:"events",value:function(){return{"click .drag-item":"onClick","click .undo":"onClickUndo"}}},{key:"onThumbnailLoad",value:function(){this.thumbnailLoaded=!0}},{key:"onClick",value:function(){this.previewViewModel.get(this.model.get("id"))?this.previewViewModel.unset(this.model.get("id")):(this.previewViewModel.clear(),this.previewViewModel.set(this.model.get("id"),!0))}},{key:"onClickUndo",value:function(){this.viewModel.unset(this.model.get("id"))}},{key:"shouldLazyLoadThumbnail",value:function(){return!!y.h.isLazyLoadSupported(d.p)&&!this.thumbnailLoaded}},{key:"renderThumbnail",value:function(){var e=new v.a({model:new w.a({duration:1e3*this.model.get("duration"),thumbnail:{url:"".concat(this.options.imageCdnUrl,"v1/thumbnails/trackingcode/").concat(this.model.get("trackingCode"))}}),lazyload:this.shouldLazyLoadThumbnail(),channelName:this.channelName});this.showChildView(b.a.Thumbnail,e)}},{key:"renderMetadata",value:function(){var e=new K({model:this.model});this.showChildView(b.a.Metadata,e)}},{key:"renderActions",value:function(){var e=new ue({model:this.model});this.showChildView(b.a.VideoActions,e)}},{key:"renderPreview",value:function(){if(this.previewViewModel.get(this.model.get("id"))){var e=new R({model:this.model,webplayerUrl:this.options.webplayerUrl,imageCdnUrl:this.options.imageCdnUrl,currentUser:this.options.currentUser});this.showChildView(b.a.VideoInfo,e)}}},{key:"viewOptions",value:function(){return{styles:pe,doNotAdd:this.viewModel.get(this.model.get("id"))===X}}},{key:"onRender",value:function(){this.renderThumbnail(),this.renderMetadata(),this.renderActions(),this.renderPreview()}}])&&he(t.prototype,n),o&&he(t,o),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component);function we(e){return(we="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 ke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ce(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 Ee(e,t,n){return t&&Ce(e.prototype,t),n&&Ce(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Oe(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&&xe(e,t)}function xe(e,t){return(xe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Se(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Me(e);if(t){var r=Me(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Pe(this,n)}}function Pe(e,t){if(t&&("object"===we(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Me(e){return(Me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _e=function(e){Oe(n,e);var t=Se(n);function n(e){return ke(this,n),t.call(this,e)}return Ee(n,[{key:"name",get:function(){return"ErroredVideoItemComponentCollection"}},{key:"childView",get:function(){return be}},{key:"childViewOptions",get:function(){return this.options}}]),n}(r.a.ComponentCollection),je=function(e){Oe(n,e);var t=Se(n);function n(e){return ke(this,n),t.call(this,e)}return Ee(n,[{key:"name",get:function(){return"ErroredVideoListComponent"}},{key:"template",get:function(){return m}},{key:"behaviors",get:function(){return[{behaviorClass:g.c,selector:".lazy-img",minBrowserSupportVersion:d.p}]}},{key:"regions",value:function(){return{videos:{el:".videos-region",replaceElement:!0}}}},{key:"onRender",value:function(){this.showChildView("videos",new _e(this.options))}}]),n}(r.a.Component),Re=n(1416),Ve=n(6);function De(e){return(De="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 Te(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 Ne(e,t){return(Ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ie(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=Ue(e);if(t){var r=Ue(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return Ae(this,n)}}function Ae(e,t){if(t&&("object"===De(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Ue(e){return(Ue=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Le=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ne(e,t)}(a,e);var t,n,r,i=Ie(a);function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,e)}return t=a,(n=[{key:"initialize",value:function(){this.viewModel=l.a.get(ee),this.listenTo(this.viewModel,"change",this.render)}},{key:"name",get:function(){return"ErroredVideoFooterComponent"}},{key:"template",get:function(){return Re}},{key:"lang",get:function(){return"migrationWizard.erroredVideoFooter"}},{key:"className",get:function(){return"border-top px-3 py-2 text-right"}},{key:"events",value:function(){return{"click .clear-all":"onClickClearAll","click .submit":"onClickSubmit"}}},{key:"onClickClearAll",value:function(){this.viewModel.clear()}},{key:"onClickSubmit",value:function(){Ve.Radio.channel(this.options.channelName).trigger(this.options.submitEvent)}},{key:"canSubmit",value:function(){return this.viewModel.keys().length>0}},{key:"countWillBeAdded",value:function(){var e=this;return o.filter(this.viewModel.keys(),(function(t){return e.viewModel.get(t)===Q})).length}},{key:"viewOptions",value:function(){return{count:this.countWillBeAdded(),submitDisabled:!this.canSubmit()}}}])&&Te(t.prototype,n),r&&Te(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.a.Component),Be=n(1130),ze=n(1121),Fe=n(1417),We=n(1418),qe=n(1419),Ge=n(144),He=n(308),Je=n(310);function Ye(e){return(Ye="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 Ze(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ke(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 Qe(e,t){return(Qe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Xe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=et(e);if(t){var r=et(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return $e(this,n)}}function $e(e,t){if(t&&("object"===Ye(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function et(e){return(et=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"MigrationErrorView",(function(){return tt}));var tt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Qe(e,t)}(v,e);var t,n,g,m=Xe(v);function v(){return Ze(this,v),m.apply(this,arguments)}return t=v,(n=[{key:"initialize",value:function(){this.migrationVideoDataService=i.a.getInstance(d.g.MigrationVideo,this),this.navLockService=i.a.getInstance(d.x.NavLock,this),this.viewModel=l.a.get(ee),this.previewViewModel=l.a.get($),this.listenTo(d.e.MIGRATION,"manual:review:videos:sync",this.render),this.listenTo(this.channelName,"submit",this.onSubmit),this.listenTo(this.viewModel,"change",this.onChangeSelected),this.page=1}},{key:"name",get:function(){return"MigrationErrorView"}},{key:"title",get:function(){return a.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.migrationError"}},{key:"channelName",get:function(){return y.k.generateUniqueChannelName(this)}},{key:"elements",get:function(){return{videos:".videos-region"}}},{key:"regions",value:function(){return{tabs:{el:".tab-region",replaceElement:!0},videos:{el:".videos-region",partialLoading:h.h.VideoList},footer:{el:".footer-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:u.a,region:"videos",type:h.c.ManualReviewVideos,emptyStateComponents:d.h}]}},{key:"template",get:function(){return We}},{key:"className",get:function(){return"bg-white w-100 ".concat(qe.migrationErrorView)}},{key:"events",value:function(){return{"click .approve-all":"onClickApproveAll","click .do-not-add":"onClickDoNotAdd"}}},{key:"onClickApproveAll",value:function(){var e={};this.collection.each((function(t){e[t.get("id")]=Q})),this.viewModel.set(e)}},{key:"onClickDoNotAdd",value:function(){this.previewViewModel.clear();var e={};this.collection.each((function(t){e[t.get("id")]=X})),this.viewModel.set(e)}},{key:"onChangeSelected",value:function(){this.viewModel.keys().length?this.navLockService.lock({title:a.a.getPhrase(this.lang,"navLockTitle"),text:a.a.getPhrase(this.lang,"navLockBody")}):this.navLockService.unlock()}},{key:"getDialog",value:function(e,t){return new y.d({title:a.a.getPhrase(this.lang,"dialogHeading"),text:Fe({onlineCopyCount:e,onlineCopyCountText:a.a.getPhrase(this.lang,"videos",{smartCount:e}),warningText:a.a.getPhrase(this.lang,"warningText",{smartCount:e}),doNotAddCount:t,doNotAddCountText:a.a.getPhrase(this.lang,"videos",{smartCount:t}),styles:qe,warningSvg:s.a.getSvg(s.b.Warning)}),buttons:[{text:a.a.getPhrase(this.lang,"submit"),className:"btn btn-primary",success:!0}]})}},{key:"getSelectedVideos",value:function(){var e=this,t=this.collection.filter((function(t){return e.viewModel.get(t.get("id"))===Q})),n=o.groupBy(t,(function(e){return e.get("category")})),i=o.map(o.keys(n),(function(e){return{folderChord:e,videoIds:o.map(n[e],(function(e){return e.get("id")}))}}));return new r.a.Collection(i)}},{key:"onSubmit",value:function(){var e=this,t=[],n=[];o.each(this.viewModel.keys(),(function(o){var r=e.viewModel.get(o);r===X&&t.push(+o),r===Q&&n.push(+o)}));var i=this.getDialog(n.length,t.length),l=!1,a=!1,s=0,u=function(){l&&a&&(n.length?(e.viewModel.clear({silent:!0}),e.navLockService.unlock(),r.a.AppLinkHelper.trigger({application:d.b.MIGRATION_WIZARD,action:d.a.MigrationWizard.PROGRESS,args:[s]})):(e.viewModel.clear(),e.migrationVideoDataService.clearCacheAndGetCustomerMetadata(),e.migrationVideoDataService.getManualReviewVideos(),delete e.collectionSubset))};i.render().done((function(){e.logMigrationActions(n,t),t.length?e.migrationVideoDataService.updateMigrationStatus(t,Be.a.HasNotBeenMigrated,(function(){l=!0,u()})):l=!0,n.length?e.migrationVideoDataService.finaliseCustomerVideos(e.getSelectedVideos(),!0,(function(e){a=!0,s=e.get("id"),u()})):a=!0}))}},{key:"logMigrationActions",value:function(e,t){var n=this;if(e.length){var r=o.map(e,(function(t){return n.processLogData(t,e)}));this.logData(c.UserAction.ResolveWarning,r)}if(t.length){var i=o.map(t,(function(e){return n.processLogData(e,t)}));this.logData(c.UserAction.DismissWarning,i)}}},{key:"logData",value:function(e,t){var n={location:c.LocationContext.MigrationWarnings,entity:c.EntityType.Video},o=t.length===this.collection.length;p.a.logUserAction(t,p.a.mergeOptions(n,{actionType:e,descriptor:o?c.OperationDescriptor.All:c.OperationDescriptor.Single}))}},{key:"processLogData",value:function(e,t){var n=this.collection.get(e).pick("name","trackingCode");return{id:e,name:n.name,trackingCode:n.trackingCode,actionCount:t.length,warningCount:this.collection.length}}},{key:"requiredResources",get:function(){return{config:f.b.config,currentUser:Ge.b.currentUser}}},{key:"unBindScroll",value:function(){this.getUI("videos").off("scroll")}},{key:"bindScroll",value:function(){this.scrollBound||(this.getUI("videos").on("scroll",o.bind(this.onScroll,this)),this.scrollBound=!0)}},{key:"onScroll",value:function(){var e=this.getUI("videos"),t=e.children().height()-e.height()/2;e.scrollTop()+e.height()<t||25*this.page>this.collection.length||(this.collectionSubset.add(o.first(this.collection.rest(25*this.page),25)),this.page++)}},{key:"viewOptions",value:function(){var e,t;return{styles:qe,supportArticle:Je.a.getArticle(null===(e=this.config)||void 0===e?void 0:e.get("supportSiteUrl"),He.a.ManuelReview,null===(t=this.currentUser)||void 0===t?void 0:t.get("countryCode")),items:this.collection&&this.collection.length}}},{key:"onBeforeRender",value:function(){return this.collection=this.migrationVideoDataService.getManualReviewVideos(),this.collection&&!this.collectionSubset&&(this.collectionSubset=new r.a.Collection(this.collection.first(25))),!!this.collection}},{key:"onRender",value:function(){this.showChildView("tabs",new ze.h({selected:"migration-errors"})),this.showChildView("videos",new je({collection:this.collectionSubset,imageCdnUrl:this.config.get("imageCdnUrl"),webplayerUrl:this.config.get("webPlayerUrl"),currentUser:this.currentUser})),this.showChildView("footer",new Le({channelName:this.channelName,submitEvent:"submit"})),this.bindScroll()}},{key:"onBeforeDestroy",value:function(){this.unBindScroll()}},{key:"onDestroy",value:function(){l.a.clear($),l.a.clear(ee)}}])&&Ke(t.prototype,n),g&&Ke(t,g),Object.defineProperty(t,"prototype",{writable:!1}),v}(r.a.View)}}]);
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[3],{1048:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(2),o=n(16),i=n(12),l=n(0),s=n(1223),a=n(1224),u=n.n(a);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})(e)}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var m=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(c,e);var t,n,r,a=y(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,(n=[{key:"defaults",get:function(){return{styleUppercase:!0}}},{key:"name",get:function(){return"VideoItemSeriesComponent"}},{key:"template",get:function(){return u.a}},{key:"appLinks",get:function(){return this.options.seriesUrl?{}:{".series-applink":{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.SERIES,args:[this.model.series.get("id")]}}}},{key:"padNumber",value:function(e){if(!e)return null;var t=e.toString(),n=2;if(t.length>=n)return t;for(n-=t.length;n>0;)t="0"+t,n--;return t}},{key:"getSeriesName",value:function(){var e=i.w.escapeExpression(this.model.get("description"));return this.options.highlight?i.w.wordsHighlighter(e,this.model.get("_matchedWords")):e}},{key:"viewOptions",value:function(){return{styles:s,seasonNumber:this.padNumber(this.model.season&&this.model.season.get("number")),episodeNumber:this.padNumber(this.model.get("episodeNumber")),seriesName:this.getSeriesName(),seriesUrl:this.options.seriesUrl,externalSvg:o.a.getSvg(o.b.NewWindow),styleUppercase:this.options.styleUppercase}}},{key:"onBeforeRender",value:function(){return this.model.series&&!!this.model.series.get("id")}}])&&p(t.prototype,n),r&&p(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Component)},1057:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(1),o=n(2),i=n(312);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})(e)}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===l(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(c,e);var t,n,o,l=u(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),l.call(this,e)}return t=c,(n=[{key:"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.a}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return r.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,r=e.extraClasses,o="dropdown-menu-".concat(n);return r&&(o="".concat(o," ").concat(r)),o}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}])&&s(t.prototype,n),o&&s(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a.ComponentCollection)},1073:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return w}));var r,o,i=n(2),l=n(12),s=n(3),a=n(1137),u=n.n(a),c=n(1138),p=n.n(c);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})(e)}function y(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 h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b(e);if(t){var o=b(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){if(t&&("object"===f(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(e){e.Small="sm",e.Large="lg"}(o||(o={}));var g=(v(r={},o.Small,3),v(r,o.Large,5),r),w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(a,e);var t,n,r,i=d(a);function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).showingMore=!1,t}return t=a,(n=[{key:"name",get:function(){return"VideoDescriptionComponent"}},{key:"template",get:function(){return u.a}},{key:"lang",get:function(){return"shared.videoDescription"}},{key:"defaults",get:function(){return{size:"sm"}}},{key:"elements",get:function(){return{description:".description",ellipsis:this.options.allowExpand?".".concat(p.a.showMoreEllipsis):".".concat(p.a.singleEllipsis)}}},{key:"events",value:function(){return v({},"click .".concat(p.a.showMoreEllipsis),"onClickShowMore")}},{key:"onClickShowMore",value:function(e){e.preventDefault(),this.showingMore?this.showLessDescription():this.showMoreDescription()}},{key:"getDescription",value:function(){return this.options.linkify?l.w.linkifyText(this.model.get("description")):this.options.highlighter?l.w.wordsHighlighter(l.w.escapeExpression(this.model.get("description")),this.model.get("_matchedWords")):void 0}},{key:"getDescriptionElements",value:function(){return{descriptionTextEl:this.getUI("description"),ellipsisEl:this.getUI("ellipsis")}}},{key:"showMoreDescription",value:function(){var e=this.getDescriptionElements(),t=e.descriptionTextEl,n=e.ellipsisEl;t.removeClass(p.a.truncateLarge).addClass(p.a.open),n.text(s.a.getPhrase(this.lang,"showLess")),this.showingMore=!0}},{key:"showLessDescription",value:function(){var e,t=this.getDescriptionElements(),n=t.descriptionTextEl,r=t.ellipsisEl;this.options.size===o.Small&&(e="truncateSmall"),this.options.size===o.Large&&(e="truncateLarge"),n.addClass(p.a[e]),r.text(this.options.allowExpand?"... ".concat(s.a.getPhrase(this.lang,"showMore")):"...").removeClass(p.a.hideEllipsis).addClass(p.a.showEllipsis),this.showingMore=!1}},{key:"truncateDescription",value:function(){if(this.options.truncate){var e=this.getDescriptionElements().descriptionTextEl,t=g[this.options.size];e.height()<=21*t||this.showLessDescription()}}},{key:"viewOptions",value:function(){return{styles:p.a,truncate:this.options.truncate,expandable:this.options.allowExpand,description:this.getDescription()}}},{key:"onAttach",value:function(){this.truncateDescription()}}])&&y(t.prototype,n),r&&y(t,r),Object.defineProperty(t,"prototype",{writable:!1}),a}(i.a.Component)},1089:function(e,t,n){"use strict";n.d(t,"a",(function(){return k}));var r=n(1),o=n(6),i=n(2),l=n(4),s=n(42),a=n(205),u=n(203),c=n(305),p=n(12),f=n(0),y=n(1194),h=n(1139),d=n.n(h);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})(e)}function b(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 v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var o=E(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(m,e);var t,n,i,h=g(m);function m(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,m),h.call(this,e)}return t=m,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"VideoPreviewComponent"}},{key:"template",get:function(){return d.a}},{key:"instanceChannelName",get:function(){return p.k.generateUniqueChannelName(this)}},{key:"defaults",get:function(){return{captureAnalytics:!0}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.c,selector:".lazy-img",callback:function(){o.Radio.channel(e.instanceChannelName).trigger("show:play:icon")},minBrowserSupportVersion:f.p}]}},{key:"regions",value:function(){return{player:{el:".video-player-region",replaceElement:!1},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"events",value:function(){return{click:"onClick"}}},{key:"bindListeners",value:function(){this.options.channelName&&this.listenTo(this.options.channelName,"update:chapter:time",this.onUpdateWebplayer)}},{key:"onUpdateWebplayer",value:function(e){if(!this.player)return this.listenToOnce(this.options.channelName,"webplayer:loaded",r.bind(this.seekToChapter,this,e)),void this.renderVideoPreview();this.seekToChapter(e)}},{key:"seekToChapter",value:function(e){this.player.seekTo(e)}},{key:"onClick",value:function(){this.player||this.renderVideoPreview()}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new u.a({model:this.model,thumbnailOptions:{size:a.a.Medium},playIcon:!0,lazyload:!0,channelName:this.instanceChannelName}))}},{key:"renderVideoPreview",value:function(){this.player=new y.a({model:this.model,webPlayerUrl:this.options.webPlayerUrl,parentChannelName:this.options.channelName,autoplay:!0,analyticsOptions:s.a.mergeOptions(this.options.analyticsOptions,{entity:l.EntityType.Video}),captureAnalytics:this.options.captureAnalytics,currentUser:this.options.currentUser}),this.showChildView("player",this.player)}},{key:"onRender",value:function(){this.renderThumbnail()}}])&&b(t.prototype,n),i&&b(t,i),Object.defineProperty(t,"prototype",{writable:!1}),m}(i.a.Component)},1137:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return' <div class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.descriptionWrapper:i,t))+'">\r\n <p class="description '+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.expandable:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.program(4,o,0),data:o}))?i:"")+"</p>\r\n </div>\r\n"},2:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.showMoreEllipsis:i,t))+" "+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">... '+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"showMore",{name:"lang",hash:{},data:o}))+"</span>"},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,s=e.escapeExpression;return(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+'<span class="'+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.singleEllipsis:i,t))+" "+s(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.hideEllipsis:i,t))+'">...</span>'},6:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda;return' <p class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.description:i,t))+'">'+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.description:i,t))?i:"")+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.truncate:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(6,o,0),data:o}))?i:""},useData:!0})},1138:function(e,t,n){e.exports={columnNames:"_1a1Re",descriptionWrapper:"_2MZC5",description:"_3U9j9",ellipsis:"_1YjUg",singleEllipsis:"_3SNtn",showMoreEllipsis:"xy3i9",showEllipsis:"_1_L9t",hideEllipsis:"TCdgP",open:"_18ojI",truncateSmall:"nLuVF",truncateLarge:"sEELY"}},1139:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="video-player-region cursor-pointer responsize-img">\r\n <div class="thumbnail-region"></div>\r\n</div>'},useData:!0})},1223:function(e,t,n){e.exports={svgContainer:"_1CUEt",series:"oZx-K"}},1224:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.series:i,t))},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'href="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.seriesUrl:i,t))+'" target="_blank"'},5:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.seasonNumber:i,{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o}))?i:"")+" E"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.episodeNumber:i,t))+"\r\n"},6:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return"&nbsp;S"+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.seasonNumber:i,t))+" &bull;"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return'<a class="series-applink text-muted '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.styleUppercase:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'" '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.seriesUrl:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+">\r\n "+(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.seriesName:i,t))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.episodeNumber:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+"</a>"},useData:!0})}}]);