@clickview/library-editor 1.1.45 → 1.1.46-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +3 -3
- package/dist/css/{library-editor-app-9c24416a39.css → library-editor-app-d4e455dc19.css} +1 -1
- package/dist/scripts/{0-298010e33a.chunk.js → 0-39b4264c40.chunk.js} +1 -1
- package/dist/scripts/{1-6e8dcc5ca2.chunk.js → 1-c2f2ee50e1.chunk.js} +1 -1
- package/dist/scripts/{10-a4ab5eff50.chunk.js → 10-74b6a07baa.chunk.js} +1 -1
- package/dist/scripts/{11-2356f4df85.chunk.js → 11-f9ca151e61.chunk.js} +1 -1
- package/dist/scripts/{12-c76d68628d.chunk.js → 12-a961dabbb5.chunk.js} +1 -1
- package/dist/scripts/{13-ffdf6d7db4.chunk.js → 13-31b759d4dc.chunk.js} +1 -1
- package/dist/scripts/{14-377ed1af74.chunk.js → 14-28ab8d5025.chunk.js} +1 -1
- package/dist/scripts/{15-7de7fc2b35.chunk.js → 15-e326770074.chunk.js} +1 -1
- package/dist/scripts/{16-382f0c41cf.chunk.js → 16-33bc415c72.chunk.js} +1 -1
- package/dist/scripts/{17-1eb8479302.chunk.js → 17-4d85362caa.chunk.js} +1 -1
- package/dist/scripts/{2-717e5953ab.chunk.js → 2-6334a56d75.chunk.js} +1 -1
- package/dist/scripts/{20-fa33bbf746.chunk.js → 20-be33eea416.chunk.js} +1 -1
- package/dist/scripts/{21-dadfbacfbc.chunk.js → 21-d07eac93af.chunk.js} +1 -1
- package/dist/scripts/{22-d381139a29.chunk.js → 22-f61848d852.chunk.js} +1 -1
- package/dist/scripts/{23-7922bfa9d3.chunk.js → 23-883535facb.chunk.js} +1 -1
- package/dist/scripts/{24-7406b564f6.chunk.js → 24-28d1ee1ddb.chunk.js} +1 -1
- package/dist/scripts/{25-d7396e955d.chunk.js → 25-36f6c0f04c.chunk.js} +1 -1
- package/dist/scripts/{26-c1fc20583b.chunk.js → 26-41d73fb1cc.chunk.js} +1 -1
- package/dist/scripts/{27-31485d4b2a.chunk.js → 27-9faadbc5ad.chunk.js} +1 -1
- package/dist/scripts/{28-e85da77e0f.chunk.js → 28-1abda5ddcd.chunk.js} +1 -1
- package/dist/scripts/{29-d980d0cbb5.chunk.js → 29-e1b5688929.chunk.js} +1 -1
- package/dist/scripts/{3-aa8256fe40.chunk.js → 3-c468e5f805.chunk.js} +1 -1
- package/dist/scripts/{30-ad62e78d54.chunk.js → 30-4331611384.chunk.js} +1 -1
- package/dist/scripts/{31-4a94075827.chunk.js → 31-f594f549df.chunk.js} +1 -1
- package/dist/scripts/{32-042cda92ae.chunk.js → 32-b5a8e7c2a3.chunk.js} +1 -1
- package/dist/scripts/{33-36ddd95595.chunk.js → 33-b88d856ab0.chunk.js} +1 -1
- package/dist/scripts/{34-7d112464d3.chunk.js → 34-7fcaaeddea.chunk.js} +1 -1
- package/dist/scripts/{35-e850443dff.chunk.js → 35-e210da4f12.chunk.js} +1 -1
- package/dist/scripts/{36-a480ba6fea.chunk.js → 36-524bf056e4.chunk.js} +1 -1
- package/dist/scripts/{37-3314327a46.chunk.js → 37-0336031536.chunk.js} +1 -1
- package/dist/scripts/{38-a18528bd5a.chunk.js → 38-1aa8ca825c.chunk.js} +1 -1
- package/dist/scripts/{39-a4d5bf70ed.chunk.js → 39-faf8a59822.chunk.js} +1 -1
- package/dist/scripts/{4-9915802afa.chunk.js → 4-4c62127fb2.chunk.js} +1 -1
- package/dist/scripts/{40-264a3768ac.chunk.js → 40-9b473a87c2.chunk.js} +1 -1
- package/dist/scripts/{41-5ed5f9712e.chunk.js → 41-20fe91435b.chunk.js} +1 -1
- package/dist/scripts/{42-6b99047385.chunk.js → 42-143ac3914b.chunk.js} +1 -1
- package/dist/scripts/{43-f0a2833261.chunk.js → 43-ce726c3839.chunk.js} +1 -1
- package/dist/scripts/{44-66950d4440.chunk.js → 44-fc7c025c5f.chunk.js} +1 -1
- package/dist/scripts/{45-6dd66a0ec6.chunk.js → 45-1e84cd6639.chunk.js} +1 -1
- package/dist/scripts/{46-1188acdeb9.chunk.js → 46-26b40a870e.chunk.js} +1 -1
- package/dist/scripts/{47-2964488de7.chunk.js → 47-f03e03252c.chunk.js} +1 -1
- package/dist/scripts/{48-48a409c875.chunk.js → 48-c9a61fd1e3.chunk.js} +1 -1
- package/dist/scripts/{49-a76be85054.chunk.js → 49-2879e96eed.chunk.js} +1 -1
- package/dist/scripts/{5-5341544820.chunk.js → 5-5d2e1c890e.chunk.js} +1 -1
- package/dist/scripts/{50-06212d1dc8.chunk.js → 50-b76b6c7d52.chunk.js} +1 -1
- package/dist/scripts/{51-af622cc279.chunk.js → 51-c252822f95.chunk.js} +1 -1
- package/dist/scripts/{52-c988320a6f.chunk.js → 52-ecde4fecf3.chunk.js} +1 -1
- package/dist/scripts/{53-1514119651.chunk.js → 53-3ab3b83088.chunk.js} +1 -1
- package/dist/scripts/{54-f489df5eda.chunk.js → 54-0e921db390.chunk.js} +1 -1
- package/dist/scripts/{55-2360f690da.chunk.js → 55-bd9dc838cd.chunk.js} +1 -1
- package/dist/scripts/{56-d6e13d4afb.chunk.js → 56-6528a68474.chunk.js} +1 -1
- package/dist/scripts/{57-fb4f8ce1ab.chunk.js → 57-3477d4f9b5.chunk.js} +1 -1
- package/dist/scripts/{58-21714dd15f.chunk.js → 58-2c62df5dbd.chunk.js} +1 -1
- package/dist/scripts/{59-9b9c8c0f2d.chunk.js → 59-13ade58ba1.chunk.js} +1 -1
- package/dist/scripts/{6-a39d1f4585.chunk.js → 6-1fdfa2191a.chunk.js} +1 -1
- package/dist/scripts/{60-86a780fb81.chunk.js → 60-f36c57ef33.chunk.js} +1 -1
- package/dist/scripts/{61-897e3aacfb.chunk.js → 61-24acf3201f.chunk.js} +1 -1
- package/dist/scripts/{62-2aa55f08d5.chunk.js → 62-d869eccf9a.chunk.js} +1 -1
- package/dist/scripts/{63-65744e61fe.chunk.js → 63-d35e9ced47.chunk.js} +1 -1
- package/dist/scripts/{64-6ee45d0114.chunk.js → 64-dfc3cd19ee.chunk.js} +1 -1
- package/dist/scripts/{65-179891d951.chunk.js → 65-b66a158393.chunk.js} +1 -1
- package/dist/scripts/{66-b1de02727e.chunk.js → 66-89b577d70f.chunk.js} +1 -1
- package/dist/scripts/{67-fc341ce660.chunk.js → 67-83b2b3ad1a.chunk.js} +1 -1
- package/dist/scripts/{68-c6ef8701a2.chunk.js → 68-452e0327d9.chunk.js} +1 -1
- package/dist/scripts/{69-4af679bc4c.chunk.js → 69-0491a8faf5.chunk.js} +1 -1
- package/dist/scripts/{7-c387d70c9b.chunk.js → 7-13b4886b73.chunk.js} +1 -1
- package/dist/scripts/{70-64d4bc3567.chunk.js → 70-62aff2ab4e.chunk.js} +1 -1
- package/dist/scripts/{71-cf362223a9.chunk.js → 71-91b4d4dfcb.chunk.js} +1 -1
- package/dist/scripts/{72-3f71367bdd.chunk.js → 72-4d851db609.chunk.js} +1 -1
- package/dist/scripts/{8-ed9e11c370.chunk.js → 8-55ea9736c8.chunk.js} +1 -1
- package/dist/scripts/{9-82e97cb80a.chunk.js → 9-175ec73a5d.chunk.js} +1 -1
- package/dist/scripts/bundle-804e733ae8.min.js +10 -0
- package/dist/scripts/polyfills-e2b8375767.min.js +1 -0
- package/package.json +2 -2
- package/typings/libs/trackjs.d.ts +3 -0
- package/dist/scripts/bundle-d78cc0ce15.min.js +0 -10
- package/dist/scripts/polyfills-b0f2bc073f.min.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[30],{1092:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var o=n(1),i=n(2),r=n(1093),a=n.n(r),l=n(1094),s=n.n(l);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(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 p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(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=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}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}}),t&&p(e,t)}(l,e);var t,n,i,r=h(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),r.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"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 s.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),l}(i.a.Component)},1093:function(e,t,n){e.exports={link:"_5idZs",active:"_3Ty4M"}},1094:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i,r,a){var l;e.propertyIsEnumerable;return null!=(l=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}))?l:""},2:function(e,t,n,o,i,r,a){e.propertyIsEnumerable;var l,s=e.lambda,c=e.escapeExpression;return' <a class="'+c(s(null!=(l=null!=(l=null!=a[1]?a[1].options:a[1])?l.styles:l)?l.link:l,t))+" p-2 "+c(s(null!=t?t.link:t,t))+" "+(null!=(l=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}))?l:"")+'">'+c(s(null!=t?t.name:t,t))+"</a>\r\n"},3:function(e,t,n,o,i,r,a){var l;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(l=null!=(l=null!=a[1]?a[1].options:a[1])?l.styles:l)?l.active:l,t))+" border-bottom border-primary text-primary"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i,r,a){var l;e.propertyIsEnumerable;return null!=(l=n.each.call(null!=t?t:e.nullContext||{},null!=(l=null!=t?t.options:t)?l.tabs:l,{name:"each",hash:{},fn:e.program(1,i,0,r,a),inverse:e.noop,data:i}))?l:""},useData:!0,useDepths:!0})},1114:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var o=n(6),i=n(2),r=n(17),a=n(1115),l=n.n(a),s=n(1116),c=n.n(s),u=n(0),p=n(1092);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return(d=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=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return y(this,n)}}function y(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(s,e);var t,n,i,a=m(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"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:l.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 p.a({tabs:this.options.tabs,activeTab:this.options.activeTab}))}}])&&f(t.prototype,n),i&&f(t,i),s}(i.a.Component)},1115:function(e,t,n){e.exports={svgContainer:"_27gR6"}},1116: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,l=e.escapeExpression;return'<div class="row">\r\n <h4>\r\n <a class="d-inline-flex align-items-center '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.link:r,t))+" "+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.backTab:r)?r.link:r,t))+'">\r\n <span class="'+l(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 "+l(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})},1120:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(6),i=n(2),r=n(30),a=n(17),l=n(301),s=n(13),c=n(1046),u=n(195),p=n(1143),h=n.n(p);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 m(e,t){return(m=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=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=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}}),t&&m(e,t)}(f,e);var t,n,i,p=y(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),p.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.options.playerViewModelKey&&this.listenToPlayerViewModel(),this.initViewModel(),this.options.editing&&this.syncTime()}},{key:"name",get:function(){return"ChapterFormComponent"}},{key:"lang",get:function(){return"libraryEditor.chapterForm"}},{key:"tagName",get:function(){return"form"}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"template",get:function(){return h.a}},{key:"className",get:function(){return this.options.creating?"py-3":"border-top p-2"}},{key:"behaviors",get:function(){return[{behaviorClass:l.a,bindViewModel:!0},{behaviorClass:l.f,bindViewModel:!0}]}},{key:"events",value:function(){return{submit:"onSubmit","change .chapter-name":"validateName","keyup .chapter-name":"validateName","change .time-input":"onTimeInputUpdate","click .time-input":"onTimeInputUpdate","keyup .time-input":"onTimeInputUpdate","click .cancel":"destroyView"}}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}},"[name=hours]":{observe:"hours",setOptions:{validate:!0}},"[name=minutes]":{observe:"minutes",setOptions:{validate:!0}},"[name=seconds]":{observe:"seconds",setOptions:{validate:!0}}}}},{key:"initViewModel",value:function(){this.viewModel=r.a.get(this.viewModelName,this.model.toJSON())}},{key:"listenToPlayerViewModel",value:function(){var e=r.a.get(this.options.playerViewModelKey);this.listenTo(e,"change:currenttime",this.updateTime)}},{key:"updateTime",value:function(e){this.webPlayerTime=e.get("currenttime"),this.syncTime()}},{key:"syncTime",value:function(){var e=this.viewModel.get("startTime")||this.webPlayerTime;this.viewModel.set({hours:s.x.getHoursComponent(e),minutes:s.x.getMinutesComponent(e),seconds:s.x.getSecondsComponent(e)})}},{key:"getNewTime",value:function(){return this.enabled()?s.x.parseTime(this.viewModel.pick("hours","minutes","seconds")):0}},{key:"enabled",value:function(){return this.options.creating||0!==this.model.collection.indexOf(this.model)}},{key:"maxTimes",value:function(){var e=s.x.millisecondsToSeconds(this.options.duration),t=s.x.getHoursComponent(e),n=t>0?59:s.x.getMinutesComponent(e);return{maxHr:t,maxMin:n,maxSec:n>0?59:s.x.getSecondsComponent(e)}}},{key:"onTimeInputUpdate",value:function(){o.Radio.channel(this.options.channelName).trigger(u.LibraryEditorActions.UpdateChapterTime,this.getNewTime()),this.validateStartTime()}},{key:"destroyView",value:function(){o.Radio.channel(this.options.channelName).trigger(u.LibraryEditorActions.CancelChapterEdit),this.destroy()}},{key:"onSubmit",value:function(e){if(e.preventDefault(),!this.validate())return!1;var t={id:this.viewModel.get("id"),name:this.viewModel.get("name"),startTime:this.getNewTime()},n=o.Radio.channel(this.options.channelName),i=u.LibraryEditorActions.CreateChapter;this.options.editing&&(i=u.LibraryEditorActions.UpdateChapter),n.trigger(i,t),this.stopListening(this.viewModel),r.a.clear(this.viewModelName)}},{key:"validate",value:function(){this.viewModel.validate();var e=this.validateStartTime(),t=this.validateName();return this.viewModel.isValid()&&e&&t}},{key:"validateStartTime",value:function(){var e=this,t=o.Validation.callbacks,n=t.valid,i=t.invalid,r=this.model.collection||this.options.collection,a=this.getNewTime(),l=c.a.isValidChapterTime(this.model,a,this.options.duration,r),s=[],u=["seconds","minutes","hours"];return a<0?s=u:l&&(s.push("seconds"),a>59&&s.push("minutes"),a>3540&&s.push("hours")),u.forEach((function(t){return n(e,t,null)})),s.forEach((function(t){return i(e,t,l,null)})),!l}},{key:"validateName",value:function(e){if(!e||13!==e.keyCode){var t=o.Validation.callbacks,n=t.valid,i=t.invalid,r=this.model.collection||this.options.collection,a=c.a.isValidChapterName(this.model,this.viewModel.get("name"),r);return a?i(this,"name",a,null):n(this,"name",null),!a}}},{key:"viewOptions",value:function(){var e=this.maxTimes(),t=e.maxHr,n=e.maxMin,o=0===e.maxSec,i=0===n,r=0===t;return Object.assign(Object.assign({},this.options),{enabled:this.enabled(),timeId:"".concat(this.cid,"-time"),chapterId:"".concat(this.cid,"-chapter-name"),plusSvg:a.a.getSvg(a.b.Plus),secDisabled:o,minDisabled:i,hrDisabled:r})}}])&&d(t.prototype,n),i&&d(t,i),f}(i.a.Component)},1143: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.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-6 form-group">\r\n <label class="d-block" for="'+l(a(null!=(r=null!=t?t.options:t)?r.timeId:r,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"startTimeLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n <input\r\n class="form-control d-inline-block col-3 time-input hour-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"hoursPlaceholder",{name:"lang",hash:{},data:i}))+'"\r\n name="hours"\r\n autocomplete="off"\r\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.hrDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'> <b>:</b>\r\n <input\r\n class="form-control d-inline-block col-3 time-input minute-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"minutesPlaceholder",{name:"lang",hash:{},data:i}))+'"\r\n name="minutes"\r\n autocomplete="off"\r\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.minDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'> <b>:</b>\r\n <input\r\n class="form-control d-inline-block col-3 time-input second-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"secondsPlaceholder",{name:"lang",hash:{},data:i}))+'"\r\n name="seconds"\r\n id="'+l(a(null!=(r=null!=t?t.options:t)?r.timeId:r,t))+'"\r\n autocomplete="off"\r\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.secDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},2:function(e,t,n,o,i){return"disabled"},4:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return' <button type="submit" class="btn btn-primary btn-sm ml-2">\r\n <span class="d-inline-block align-middle svg-container">'+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.plusSvg:r,t))?r:"")+'</span>\r\n <span class="align-middle">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"add",{name:"lang",hash:{},data:i}))+"</span>\r\n </button>\r\n"},6:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return' <button type="submit" class="btn btn-primary btn-sm ml-2">'+l((n.lang||t&&t.lang||a).call(r,"save",{name:"lang",hash:{},data:i}))+'</button>\r\n <button type="button" class="btn btn-secondary btn-sm cancel ml-2">'+l((n.lang||t&&t.lang||a).call(r,"cancel",{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=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<div class="row">\r\n <div class="col-6 form-group">\r\n <label for="'+l(a(null!=(r=null!=t?t.options:t)?r.chapterId:r,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"nameLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n <input type="text" class="form-control chapter-name" name="name" id="'+l(a(null!=(r=null!=t?t.options:t)?r.chapterId:r,t))+'" placeholder="'+l((n.lang||t&&t.lang||c).call(s,"namePlaceholder",{name:"lang",hash:{},data:i}))+'" autofocus autocomplete="off">\r\n <div class="form-feedback"></div>\r\n </div>\r\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.enabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\r\n\r\n<div class="row">\r\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.creating:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+"\r\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.editing:r,{name:"if",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},useData:!0})},1144: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 e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.loading:r,t))},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-2 text-right">\r\n <a class="action edit-chapter my-2 svg-container '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block text-muted"\r\n title="'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"edit",{name:"lang",hash:{},data:i}))+'">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.editSvg:r,t))?r:"")+"</a>\r\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.allowDelete:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+" </div>\r\n"},4:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression;return' <a class="action delete-chapter my-2 svg-container '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block text-muted"\r\n title="'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"delete",{name:"lang",hash:{},data:i}))+'">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.deleteSvg:r,t))?r:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,l=null!=t?t:e.nullContext||{},s=e.lambda,c=e.escapeExpression;return'<div class="row mx-0 border-top chapter-item '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.loading:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickable-seek col-1">\r\n <p class="m-0 py-2">'+c(s(null!=(r=null!=t?t.options:t)?r.index:r,t))+'</p>\r\n </div>\r\n <div class="clickable-seek col-6">\r\n <p class="m-0 py-2">'+c("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(l,{name:"name",hash:{},data:i}):a)+'</p>\r\n </div>\r\n <div class="clickable-seek col-3 text-right">\r\n <p class="m-0 py-2">'+c(s(null!=(r=null!=t?t.options:t)?r.time:r,t))+"</p>\r\n </div>\r\n"+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.showActions:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\r\n<div class="edit-form-region"></div>\r\n'},useData:!0})},1145:function(e,t,n){e.exports={darkBackground:"_2jtQl",loading:"_152ia",svgContainer:"xdD5o",chapterItem:"_3G38c"}},1146: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=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return"<h5>"+l((n.lang||t&&t.lang||a).call(r,"chapters",{name:"lang",hash:{},data:i}))+'</h5>\r\n<div class="row mt-3 m-0 border-bottom">\r\n <div class="col-1">\r\n <label>#</label>\r\n </div>\r\n <div class="col-6">\r\n <label>'+l((n.lang||t&&t.lang||a).call(r,"nameLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n </div>\r\n <div class="col-3 text-right">\r\n <label>'+l((n.lang||t&&t.lang||a).call(r,"startLabel",{name:"lang",hash:{},data:i}))+'</>\r\n </div>\r\n</div>\r\n<div class="chapter-list-region"></div>'},useData:!0})},1155:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(2),i=n(262),r=n(13),a=n(3),l=n(302),s=n(195),c=n(1156),u=n.n(c),p=n(1157),h=n.n(p);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 m(e,t){return(m=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=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=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}}),t&&m(e,t)}(f,e);var t,n,c,p=y(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),p.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.spinnerModel=new o.a.Model({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,s.LibraryEditorActions.MergeChapters,this.onClickMergeChapters)}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return u.a}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(i.c.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==l.a.New&&this.model.get("status")!==l.a.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:a.a.getPhrase(this.lang,"mergeChapters"),subtitles:a.a.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:a.a.getPhrase(this.lang,"enabledCustomSubtitles")},t=new i.a({buttonText:e[this.options.type],extraButtonClass:"btn-primary ".concat(h.a.btn),model:this.spinnerModel,spinnerOptions:{size:r.s.Small,type:r.t.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:s.LibraryEditorActions.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:a.a.getPhrase(this.lang,"chaptersHeading"),line1:a.a.getPhrase(this.lang,"chaptersInfo1"),line2:a.a.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:a.a.getPhrase(this.lang,"subtitlesHeading"),line1:a.a.getPhrase(this.lang,"subtitlesInfo1"),line2:a.a.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:a.a.getPhrase(this.lang,"cvSubtitlesHeading"),line1:a.a.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:a.a.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&a.a.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(i.c.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===l.a.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}}])&&d(t.prototype,n),c&&d(t,c),f}(o.a.Component)},1156: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 null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.progress:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:""},2:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return' <span class="m-3 text-muted">'+a(e.lambda(null!=(r=null!=t?t.options:t)?r.progress:r,t))+'</span>\r\n <p class="pt-2">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:i}))+"</p>\r\n"},4: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.failed:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:""},5:function(e,t,n,o,i){e.propertyIsEnumerable;return'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:i}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression;return"<h4>"+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.heading:r,t))+"</h4>\r\n<p>"+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line1:r,t))+"</p>\r\n<p>"+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line2:r,t))+'</p>\r\n<div class="btn-region"></div>\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.processing:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?r:"")},useData:!0})},1157:function(e,t,n){e.exports={btn:"_59zg9"}},1190:function(e,t,n){"use strict";var o=n(2),i=n(6),r=n(17),a=n(140),l=n(13),s=n(1120),c=n(195),u=n(1144),p=n.n(u),h=n(1145),f=n.n(h);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 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 y(e,t){return(y=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=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e){return(v=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}}),t&&y(e,t)}(h,e);var t,n,o,u=b(h);function h(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),u.call(this,e)}return t=h,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"ChapterItemComponent"}},{key:"lang",get:function(){return"libraryEditor.chapterItem"}},{key:"instanceChannelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return p.a}},{key:"className",get:function(){return"chapter ".concat(f.a.chapterItem)}},{key:"behaviors",get:function(){return[{behaviorClass:a.a,selector:".action"}]}},{key:"regions",value:function(){return{editForm:{replaceElement:!1,el:".edit-form-region"}}}},{key:"elements",get:function(){return{chapterItem:".chapter-item",editChapter:".edit-chapter",deleteChapter:".delete-chapter"}}},{key:"events",value:function(){return{"click @ui.editChapter":"onEditChapter","click @ui.deleteChapter":"onDeleteChapter","click .clickable-seek":"onClick"}}},{key:"bindListeners",value:function(){this.listenTo(this.instanceChannelName,c.LibraryEditorActions.CancelChapterEdit,this.onCancelEdit),this.listenTo(this.instanceChannelName,c.LibraryEditorActions.UpdateChapter,this.onUpdateChapter),this.listenTo(this.instanceChannelName,c.LibraryEditorActions.UpdateChapterTime,this.onUpdateChapterTime),this.listenTo(this.model,"change:showEditor",this.onShowEditorChange),this.listenTo(this.model,"change:loading",this.onLoadingChange);var e=this.model.collection.first();this.model!==e?this.listenTo(this.model.collection,"sort",this.render):this.listenTo(this.model.collection,"add remove sort",this.render)}},{key:"onClick",value:function(){var e=i.Radio.channel(this.options.channelName);this.model.get("isPhysicalChapter")?e.trigger(c.LibraryEditorActions.SeekToChapter,this.model.get("index")):e.trigger(c.LibraryEditorActions.UpdateChapterTime,this.model.get("startTime"))}},{key:"onLoadingChange",value:function(){var e=this.model.get("loading")?"disable":"enable";this.getUI("editChapter").tooltip(e),this.getUI("deleteChapter").tooltip(e),this.model.set("showEditor",!1,{silent:!0}),this.render()}},{key:"onShowEditorChange",value:function(){this.model.get("loading")||(this.model.get("showEditor")?this.showEditView():this.hideEditView())}},{key:"showEditView",value:function(){this.renderEditForm(),this.getUI("chapterItem").addClass(f.a.darkBackground)}},{key:"hideEditView",value:function(){this.model.set("showEditor",!1,{silent:!0}),this.getUI("chapterItem").removeClass(f.a.darkBackground),this.detachChildView("editForm")}},{key:"onCancelEdit",value:function(){this.hideEditView()}},{key:"onDeleteChapter",value:function(){this.model.get("loading")||i.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.DeleteChapter,this.model)}},{key:"onUpdateChapter",value:function(e){i.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.UpdateChapter,e),this.render()}},{key:"onUpdateChapterTime",value:function(e){i.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.UpdateChapterTime,e)}},{key:"onEditChapter",value:function(){i.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.ToggleEdit,this.model)}},{key:"canDelete",value:function(e){var t=this.model.collection.length;return 1===e&&1===t||!(1===e&&t>1)}},{key:"viewOptions",value:function(){var e=this.model.collection.indexOf(this.model)+1,t=l.x.trimToMinutes(l.x.secondsToHoursFormatted(this.model.get("startTime")));return Object.assign(Object.assign({},this.options),{styles:f.a,time:t,index:e,loading:this.model.get("loading"),allowDelete:this.canDelete(e),editSvg:r.a.getSvg(r.b.Edit),deleteSvg:r.a.getSvg(r.b.Delete)})}},{key:"renderEditForm",value:function(){this.showChildView("editForm",new s.a({model:this.model,editing:!0,channelName:this.instanceChannelName,duration:this.options.duration}))}},{key:"onBeforeDetach",value:function(){$(".tooltip").remove()}}])&&m(t.prototype,n),o&&m(t,o),h}(o.a.Component);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 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 E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(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=S(e);if(t){var i=S(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return T(this,n)}}function T(e,t){return!t||"object"!==C(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(r,e);var t,n,o,i=O(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.bindEditorListeners()}},{key:"name",get:function(){return"ChapterComponentCollection"}},{key:"className",get:function(){return"chapters"}},{key:"childView",get:function(){return k}},{key:"bindEditorListeners",value:function(){this.options.editable&&this.listenTo(this.options.channelName,c.LibraryEditorActions.ToggleEdit,this.toggleEditForm)}},{key:"toggleEditForm",value:function(e){this.collection.each((function(t){return t!==e&&t.set("showEditor",!1)})),e.set("showEditor",!e.get("showEditor"))}},{key:"childViewOptions",get:function(){return{showActions:this.options.showActions,duration:this.options.duration,channelName:this.options.channelName}}}])&&w(t.prototype,n),o&&w(t,o),r}(o.a.ComponentCollection),P=n(1146),R=n.n(P);function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(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 N(e,t){return(N=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=D(e);if(t){var i=D(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return L(this,n)}}function L(e,t){return!t||"object"!==_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function D(e){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return V}));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}}),t&&N(e,t)}(r,e);var t,n,o,i=j(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:"name",get:function(){return"ChaptersComponent"}},{key:"template",get:function(){return R.a}},{key:"lang",get:function(){return"libraryEditor.chapters"}},{key:"className",get:function(){return"chapters ".concat(!this.options.editable&&"py-3 border-top")}},{key:"regions",value:function(){return{chapterList:{replaceElement:!0,el:".chapter-list-region"}}}},{key:"viewOptions",value:function(){return{showHeader:this.options.showHeader}}},{key:"onRender",value:function(){this.showChildView("chapterList",new x({collection:this.collection,duration:this.options.duration,channelName:this.options.channelName,showActions:this.options.showActions,editable:this.options.editable}))}}])&&I(t.prototype,n),o&&I(t,o),r}(o.a.Component)},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'<div class="tab-region w-100"></div>\r\n<div class="row">\r\n <div class="col-6 pt-3">\r\n <div class="webplayer-region"></div>\r\n <div class="add-chapter-region"></div>\r\n </div>\r\n <div class="col-6 mb-2 pt-3">\r\n <div class="chapter-list-region"></div>\r\n </div>\r\n</div>'},useData:!0})},1428:function(e,t,n){"use strict";n.r(t),n.d(t,"EditChaptersView",(function(){return D}));var o=n(1),i=n(2),r=n(5),a=n(3),l=n(119),s=n(364),c=n(187),u=n(13),p=n(0),h=n(196),f=n(9),d=n(4),m=n(42),y=n(1189),b=n(314),g=n(1114),v=n(1155),k=n(1120),C=n(1190),w=n(201),E=n(195),O=n(1041),T=n(1283),S=n.n(T),x=n(302),P=n(141);function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(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=L(e);if(t){var i=L(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return j(this,n)}}function j(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var D=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&I(e,t)}(j,e);var t,n,T,R=N(j);function j(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,j),R.call(this,e)}return t=j,(n=[{key:"initialize",value:function(){this.bindListeners(),this.initializeDataServices(),u.v.initBackButton()}},{key:"name",get:function(){return"EditVideoChaptersView"}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editChapters"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white p-3"}},{key:"template",get:function(){return S.a}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:f.h.EditVideoTabs},webplayer:{replaceElement:!0,el:".webplayer-region",partialLoading:f.h.WebPlayer},addChapter:{replaceElement:!0,el:".add-chapter-region",partialLoading:f.h.EditVideoChaptersForm},chapterList:{replaceElement:!0,el:".chapter-list-region",partialLoading:f.h.EditVideoChapterList}}}},{key:"bindListeners",value:function(){this.listenTo(p.e.VIDEO,"".concat(p.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.e.VIDEO,"".concat(p.f.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(p.e.VIDEO,"".concat(p.f.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.e.CHAPTER,"".concat(p.f.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError),this.listenTo(this.channelName,E.LibraryEditorActions.CreateChapter,this.onCreateChapter),this.listenTo(this.channelName,E.LibraryEditorActions.UpdateChapter,this.onUpdateChapter),this.listenTo(this.channelName,E.LibraryEditorActions.DeleteChapter,this.onDeleteChapter),this.listenTo(this.channelName,E.LibraryEditorActions.UpdateChapterTime,this.onTimeInputUpdate),this.listenTo(this.channelName,E.LibraryEditorActions.SeekToChapter,this.onSeekToChapter),this.listenTo(this.channelName,E.LibraryEditorActions.MergeChapters,this.onMergeChapters)}},{key:"initializeDataServices",value:function(){this.videoDataService=r.a.getInstance(p.g.Video,this),this.chapterDataService=r.a.getInstance(p.g.Chapter,this)}},{key:"onVideoDataError",value:function(e){switch(e.type){case l.a.NotFound:i.a.ErrorHelper.throw(new w.l);break;case l.a.Forbidden:i.a.ErrorHelper.throw(new w.f)}}},{key:"onConcatenateDataError",value:function(e){e.type===l.a.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"onCreateChapter",value:function(e){0===this.chapters.length&&0!==e.startTime&&this.createChapter({name:a.a.getPhrase(this.lang,"intro"),startTime:0}),this.createChapter(e)}},{key:"createChapter",value:function(e){var t=this,n=new c.a(e);this.chapters.add(n),n.set("loading",!0),this.chapterDataService.createChapter(this.model.get("id"),e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.renderChapterForm(),t.logAction(e,d.UserAction.Create)}))}},{key:"onUpdateChapter",value:function(e){var t=this,n=this.chapters.find((function(t){return t.get("id")===e.id}));n.set("loading",!0);var o=b.a.updatedChaptersAlert(this.model.get("name"));this.chapterDataService.updateChapter(n.id,e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.logAction(e,d.UserAction.Edit)}),o)}},{key:"onDeleteChapter",value:function(e){var t=this;e.set("loading",!0),this.chapterDataService.deleteChapter(e.id,(function(){t.logAction(e,d.UserAction.Delete),t.chapters.remove(e)}))}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"onTimeInputUpdate",value:function(e){e>=0&&e<=u.x.millisecondsToSeconds(this.model.get("duration"))&&this.player.seekTo(e)}},{key:"logAction",value:function(e,t){var n=Object.assign({videoId:this.model.get("id")},e.pick("id","name","startTime"));m.a.logUserAction(n,{actionType:t,entity:d.EntityType.Chapter,location:d.LocationContext.EditVideoChapters})}},{key:"onSeekToChapter",value:function(e){e<0||this.player.seekToChapter(e)}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[x.a.SingleFile,x.a.ConcatenationFailed];o.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==x.a.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.render()}))}},{key:"renderChapterList",value:function(){this.showChildView("chapterList",new C.a({collection:this.chapters,duration:this.model.get("duration"),channelName:this.channelName,showActions:!this.hasPhysicalChapters.get("value"),editable:!this.hasPhysicalChapters.get("value"),showHeader:!0}))}},{key:"renderChapterForm",value:function(){this.showChildView("addChapter",new k.a({model:new c.a,collection:this.chapters,creating:!0,duration:this.model.get("duration"),channelName:this.channelName,playerViewModelKey:"".concat(p.y.NAME,"-").concat(this.model.get("id"))}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("addChapter",new v.a({type:"chapters",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderEditComponents",value:function(){if(this.hasPhysicalChapters.get("value"))return this.renderConcatenationRequest(),void this.mapPhysicalChapters();this.renderChapterForm(),this.renderChapterList()}},{key:"renderTabs",value:function(){this.showChildView("tabs",new g.a({tabs:u.v.getEditVideoTabs(this.options.videoId),activeTab:".edit-chapters-applink",goBackTab:u.v.getBackButton(this.options.videoId)}))}},{key:"renderWebPlayer",value:function(){this.player=new y.a({model:this.model,webPlayerUrl:this.config.get("webPlayerUrl"),captureAnalytics:!1,currentUser:this.currentUser}),this.showChildView("webplayer",this.player)}},{key:"mapPhysicalChapters",value:function(){var e=this;this.renderPartialLoading("chapterList"),this.player.query("getChapters",(function(t){e.chapters=new s.a(O.a.mapPhysicalChapters(t)),e.renderChapterList()}))}},{key:"redirectToVideoDetails",value:function(){i.a.AppLinkHelper.trigger({application:p.b.LIBRARY_EDITOR,action:p.a.LibraryEditor.VIDEO_DETAILS,args:[this.model.get("id")]},{replace:!0})}},{key:"fetchData",value:function(){var e=this;if(this.model=this.videoDataService.getVideo(this.options.videoId),this.model){if(!u.j.canEditVideo(this.model))return void this.redirectToVideoDetails();this.chapters=this.model.chapters}this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"requiredResources",get:function(){return{config:h.b.config,currentUser:P.b.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"onRender",value:function(){this.renderTabs(),this.renderWebPlayer(),this.renderEditComponents(),this.startPollingConcatenation()}}])&&_(t.prototype,n),T&&_(t,T),j}(i.a.View)}}]);
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[30],{1084:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var o=n(1),i=n(2),r=n(1085),a=n.n(r),l=n(1086),s=n.n(l);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(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 p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(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=d(e);if(t){var i=d(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==c(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}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}}),t&&p(e,t)}(l,e);var t,n,i,r=h(l);function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),r.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"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 s.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),l}(i.a.Component)},1085:function(e,t,n){e.exports={link:"_5idZs",active:"_3Ty4M"}},1086:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,i,r,a){var l;e.propertyIsEnumerable;return null!=(l=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}))?l:""},2:function(e,t,n,o,i,r,a){e.propertyIsEnumerable;var l,s=e.lambda,c=e.escapeExpression;return' <a class="'+c(s(null!=(l=null!=(l=null!=a[1]?a[1].options:a[1])?l.styles:l)?l.link:l,t))+" p-2 "+c(s(null!=t?t.link:t,t))+" "+(null!=(l=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}))?l:"")+'">'+c(s(null!=t?t.name:t,t))+"</a>\r\n"},3:function(e,t,n,o,i,r,a){var l;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(l=null!=(l=null!=a[1]?a[1].options:a[1])?l.styles:l)?l.active:l,t))+" border-bottom border-primary text-primary"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i,r,a){var l;e.propertyIsEnumerable;return null!=(l=n.each.call(null!=t?t:e.nullContext||{},null!=(l=null!=t?t.options:t)?l.tabs:l,{name:"each",hash:{},fn:e.program(1,i,0,r,a),inverse:e.noop,data:i}))?l:""},useData:!0,useDepths:!0})},1106:function(e,t,n){"use strict";n.d(t,"a",(function(){return g}));var o=n(6),i=n(2),r=n(17),a=n(1107),l=n.n(a),s=n(1108),c=n.n(s),u=n(0),p=n(1084);function h(e){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function d(e,t){return(d=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=b(e);if(t){var i=b(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return y(this,n)}}function y(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function b(e){return(b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(s,e);var t,n,i,a=m(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"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:l.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 p.a({tabs:this.options.tabs,activeTab:this.options.activeTab}))}}])&&f(t.prototype,n),i&&f(t,i),s}(i.a.Component)},1107:function(e,t,n){e.exports={svgContainer:"_27gR6"}},1108: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,l=e.escapeExpression;return'<div class="row">\r\n <h4>\r\n <a class="d-inline-flex align-items-center '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.link:r,t))+" "+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.backTab:r)?r.link:r,t))+'">\r\n <span class="'+l(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 "+l(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})},1112:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(6),i=n(2),r=n(30),a=n(17),l=n(302),s=n(13),c=n(1038),u=n(196),p=n(1135),h=n.n(p);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 m(e,t){return(m=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=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=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}}),t&&m(e,t)}(f,e);var t,n,i,p=y(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),p.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.options.playerViewModelKey&&this.listenToPlayerViewModel(),this.initViewModel(),this.options.editing&&this.syncTime()}},{key:"name",get:function(){return"ChapterFormComponent"}},{key:"lang",get:function(){return"libraryEditor.chapterForm"}},{key:"tagName",get:function(){return"form"}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"template",get:function(){return h.a}},{key:"className",get:function(){return this.options.creating?"py-3":"border-top p-2"}},{key:"behaviors",get:function(){return[{behaviorClass:l.a,bindViewModel:!0},{behaviorClass:l.f,bindViewModel:!0}]}},{key:"events",value:function(){return{submit:"onSubmit","change .chapter-name":"validateName","keyup .chapter-name":"validateName","change .time-input":"onTimeInputUpdate","click .time-input":"onTimeInputUpdate","keyup .time-input":"onTimeInputUpdate","click .cancel":"destroyView"}}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}},"[name=hours]":{observe:"hours",setOptions:{validate:!0}},"[name=minutes]":{observe:"minutes",setOptions:{validate:!0}},"[name=seconds]":{observe:"seconds",setOptions:{validate:!0}}}}},{key:"initViewModel",value:function(){this.viewModel=r.a.get(this.viewModelName,this.model.toJSON())}},{key:"listenToPlayerViewModel",value:function(){var e=r.a.get(this.options.playerViewModelKey);this.listenTo(e,"change:currenttime",this.updateTime)}},{key:"updateTime",value:function(e){this.webPlayerTime=e.get("currenttime"),this.syncTime()}},{key:"syncTime",value:function(){var e=this.viewModel.get("startTime")||this.webPlayerTime;this.viewModel.set({hours:s.x.getHoursComponent(e),minutes:s.x.getMinutesComponent(e),seconds:s.x.getSecondsComponent(e)})}},{key:"getNewTime",value:function(){return this.enabled()?s.x.parseTime(this.viewModel.pick("hours","minutes","seconds")):0}},{key:"enabled",value:function(){return this.options.creating||0!==this.model.collection.indexOf(this.model)}},{key:"maxTimes",value:function(){var e=s.x.millisecondsToSeconds(this.options.duration),t=s.x.getHoursComponent(e),n=t>0?59:s.x.getMinutesComponent(e);return{maxHr:t,maxMin:n,maxSec:n>0?59:s.x.getSecondsComponent(e)}}},{key:"onTimeInputUpdate",value:function(){o.Radio.channel(this.options.channelName).trigger(u.LibraryEditorActions.UpdateChapterTime,this.getNewTime()),this.validateStartTime()}},{key:"destroyView",value:function(){o.Radio.channel(this.options.channelName).trigger(u.LibraryEditorActions.CancelChapterEdit),this.destroy()}},{key:"onSubmit",value:function(e){if(e.preventDefault(),!this.validate())return!1;var t={id:this.viewModel.get("id"),name:this.viewModel.get("name"),startTime:this.getNewTime()},n=o.Radio.channel(this.options.channelName),i=u.LibraryEditorActions.CreateChapter;this.options.editing&&(i=u.LibraryEditorActions.UpdateChapter),n.trigger(i,t),this.stopListening(this.viewModel),r.a.clear(this.viewModelName)}},{key:"validate",value:function(){this.viewModel.validate();var e=this.validateStartTime(),t=this.validateName();return this.viewModel.isValid()&&e&&t}},{key:"validateStartTime",value:function(){var e=this,t=o.Validation.callbacks,n=t.valid,i=t.invalid,r=this.model.collection||this.options.collection,a=this.getNewTime(),l=c.a.isValidChapterTime(this.model,a,this.options.duration,r),s=[],u=["seconds","minutes","hours"];return a<0?s=u:l&&(s.push("seconds"),a>59&&s.push("minutes"),a>3540&&s.push("hours")),u.forEach((function(t){return n(e,t,null)})),s.forEach((function(t){return i(e,t,l,null)})),!l}},{key:"validateName",value:function(e){if(!e||13!==e.keyCode){var t=o.Validation.callbacks,n=t.valid,i=t.invalid,r=this.model.collection||this.options.collection,a=c.a.isValidChapterName(this.model,this.viewModel.get("name"),r);return a?i(this,"name",a,null):n(this,"name",null),!a}}},{key:"viewOptions",value:function(){var e=this.maxTimes(),t=e.maxHr,n=e.maxMin,o=0===e.maxSec,i=0===n,r=0===t;return Object.assign(Object.assign({},this.options),{enabled:this.enabled(),timeId:"".concat(this.cid,"-time"),chapterId:"".concat(this.cid,"-chapter-name"),plusSvg:a.a.getSvg(a.b.Plus),secDisabled:o,minDisabled:i,hrDisabled:r})}}])&&d(t.prototype,n),i&&d(t,i),f}(i.a.Component)},1135: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.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return' <div class="col-6 form-group">\r\n <label class="d-block" for="'+l(a(null!=(r=null!=t?t.options:t)?r.timeId:r,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"startTimeLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n <input\r\n class="form-control d-inline-block col-3 time-input hour-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"hoursPlaceholder",{name:"lang",hash:{},data:i}))+'"\r\n name="hours"\r\n autocomplete="off"\r\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.hrDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'> <b>:</b>\r\n <input\r\n class="form-control d-inline-block col-3 time-input minute-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"minutesPlaceholder",{name:"lang",hash:{},data:i}))+'"\r\n name="minutes"\r\n autocomplete="off"\r\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.minDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'> <b>:</b>\r\n <input\r\n class="form-control d-inline-block col-3 time-input second-input"\r\n type="number"\r\n placeholder="'+l((n.lang||t&&t.lang||c).call(s,"secondsPlaceholder",{name:"lang",hash:{},data:i}))+'"\r\n name="seconds"\r\n id="'+l(a(null!=(r=null!=t?t.options:t)?r.timeId:r,t))+'"\r\n autocomplete="off"\r\n '+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.secDisabled:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:"")+'>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},2:function(e,t,n,o,i){return"disabled"},4:function(e,t,n,o,i){var r;e.propertyIsEnumerable;return' <button type="submit" class="btn btn-primary btn-sm ml-2">\r\n <span class="d-inline-block align-middle svg-container">'+(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.plusSvg:r,t))?r:"")+'</span>\r\n <span class="align-middle">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"add",{name:"lang",hash:{},data:i}))+"</span>\r\n </button>\r\n"},6:function(e,t,n,o,i){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return' <button type="submit" class="btn btn-primary btn-sm ml-2">'+l((n.lang||t&&t.lang||a).call(r,"save",{name:"lang",hash:{},data:i}))+'</button>\r\n <button type="button" class="btn btn-secondary btn-sm cancel ml-2">'+l((n.lang||t&&t.lang||a).call(r,"cancel",{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=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'<div class="row">\r\n <div class="col-6 form-group">\r\n <label for="'+l(a(null!=(r=null!=t?t.options:t)?r.chapterId:r,t))+'">'+l((n.lang||t&&t.lang||c).call(s,"nameLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n <input type="text" class="form-control chapter-name" name="name" id="'+l(a(null!=(r=null!=t?t.options:t)?r.chapterId:r,t))+'" placeholder="'+l((n.lang||t&&t.lang||c).call(s,"namePlaceholder",{name:"lang",hash:{},data:i}))+'" autofocus autocomplete="off">\r\n <div class="form-feedback"></div>\r\n </div>\r\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.enabled:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\r\n\r\n<div class="row">\r\n'+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.creating:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+"\r\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.editing:r,{name:"if",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))?r:"")+"</div>"},useData:!0})},1136: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 e.escapeExpression(e.lambda(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.loading:r,t))},3:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{};return' <div class="col-2 text-right">\r\n <a class="action edit-chapter my-2 svg-container '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block text-muted"\r\n title="'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(s,"edit",{name:"lang",hash:{},data:i}))+'">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.editSvg:r,t))?r:"")+"</a>\r\n"+(null!=(r=n.if.call(s,null!=(r=null!=t?t.options:t)?r.allowDelete:r,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?r:"")+" </div>\r\n"},4:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression;return' <a class="action delete-chapter my-2 svg-container '+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.svgContainer:r,t))+' d-inline-block text-muted"\r\n title="'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"delete",{name:"lang",hash:{},data:i}))+'">'+(null!=(r=a(null!=(r=null!=t?t.options:t)?r.deleteSvg:r,t))?r:"")+"</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a,l=null!=t?t:e.nullContext||{},s=e.lambda,c=e.escapeExpression;return'<div class="row mx-0 border-top chapter-item '+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.loading:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?r:"")+'">\r\n <div class="clickable-seek col-1">\r\n <p class="m-0 py-2">'+c(s(null!=(r=null!=t?t.options:t)?r.index:r,t))+'</p>\r\n </div>\r\n <div class="clickable-seek col-6">\r\n <p class="m-0 py-2">'+c("function"==typeof(a=null!=(a=n.name||(null!=t?t.name:t))?a:e.hooks.helperMissing)?a.call(l,{name:"name",hash:{},data:i}):a)+'</p>\r\n </div>\r\n <div class="clickable-seek col-3 text-right">\r\n <p class="m-0 py-2">'+c(s(null!=(r=null!=t?t.options:t)?r.time:r,t))+"</p>\r\n </div>\r\n"+(null!=(r=n.if.call(l,null!=(r=null!=t?t.options:t)?r.showActions:r,{name:"if",hash:{},fn:e.program(3,i,0),inverse:e.noop,data:i}))?r:"")+'</div>\r\n<div class="edit-form-region"></div>\r\n'},useData:!0})},1137:function(e,t,n){e.exports={darkBackground:"_2jtQl",loading:"_152ia",svgContainer:"xdD5o",chapterItem:"_3G38c"}},1138: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=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,l=e.escapeExpression;return"<h5>"+l((n.lang||t&&t.lang||a).call(r,"chapters",{name:"lang",hash:{},data:i}))+'</h5>\r\n<div class="row mt-3 m-0 border-bottom">\r\n <div class="col-1">\r\n <label>#</label>\r\n </div>\r\n <div class="col-6">\r\n <label>'+l((n.lang||t&&t.lang||a).call(r,"nameLabel",{name:"lang",hash:{},data:i}))+'</label>\r\n </div>\r\n <div class="col-3 text-right">\r\n <label>'+l((n.lang||t&&t.lang||a).call(r,"startLabel",{name:"lang",hash:{},data:i}))+'</>\r\n </div>\r\n</div>\r\n<div class="chapter-list-region"></div>'},useData:!0})},1147:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(2),i=n(263),r=n(13),a=n(3),l=n(303),s=n(196),c=n(1148),u=n.n(c),p=n(1149),h=n.n(p);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 m(e,t){return(m=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=g(e);if(t){var i=g(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){return(g=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}}),t&&m(e,t)}(f,e);var t,n,c,p=y(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),p.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.spinnerModel=new o.a.Model({showSpinner:this.isProcessing()}),this.listenTo(this.options.channelName,s.LibraryEditorActions.MergeChapters,this.onClickMergeChapters)}},{key:"name",get:function(){return"ConcatenateRequestComponent"}},{key:"template",get:function(){return u.a}},{key:"lang",get:function(){return"libraryEditor.concatenateRequest"}},{key:"className",get:function(){return"mt-3"}},{key:"regions",value:function(){return{button:{el:".btn-region",replaceElement:!0}}}},{key:"onClickMergeChapters",value:function(){this.spinnerModel.set(i.c.ShowSpinner,!0),this.render()}},{key:"isProcessing",value:function(){return!(!this.model||!this.model.get("status")||this.model.get("status")!==l.a.New&&this.model.get("status")!==l.a.Concatenating)}},{key:"renderButton",value:function(){var e={chapters:a.a.getPhrase(this.lang,"mergeChapters"),subtitles:a.a.getPhrase(this.lang,"mergeChapters"),clickViewSubtitles:a.a.getPhrase(this.lang,"enabledCustomSubtitles")},t=new i.a({buttonText:e[this.options.type],extraButtonClass:"btn-primary ".concat(h.a.btn),model:this.spinnerModel,spinnerOptions:{size:r.s.Small,type:r.t.Light,extraClasses:"mx-auto"},channelName:this.options.channelName,saveEvent:s.LibraryEditorActions.MergeChapters});this.showChildView("button",t)}},{key:"viewOptions",value:function(){var e={chapters:{heading:a.a.getPhrase(this.lang,"chaptersHeading"),line1:a.a.getPhrase(this.lang,"chaptersInfo1"),line2:a.a.getPhrase(this.lang,"chaptersInfo2")},subtitles:{heading:a.a.getPhrase(this.lang,"subtitlesHeading"),line1:a.a.getPhrase(this.lang,"subtitlesInfo1"),line2:a.a.getPhrase(this.lang,"subtitlesInfo2")},clickViewSubtitles:{heading:a.a.getPhrase(this.lang,"cvSubtitlesHeading"),line1:a.a.getPhrase(this.lang,"cvSubtitlesInfo1"),line2:a.a.getPhrase(this.lang,"cvSubtitlesInfo2")}};return{progress:this.model&&this.model.get("progress")&&a.a.getPhrase(this.lang,"progress",{progress:this.model.get("progress")}),componentOptions:e[this.options.type],processing:this.spinnerModel.get(i.c.ShowSpinner),failed:this.model&&this.model.get("status")&&this.model.get("status")===l.a.ConcatenationFailed}}},{key:"onRender",value:function(){this.renderButton()}}])&&d(t.prototype,n),c&&d(t,c),f}(o.a.Component)},1148: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 null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.progress:r,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?r:""},2:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.escapeExpression;return' <span class="m-3 text-muted">'+a(e.lambda(null!=(r=null!=t?t.options:t)?r.progress:r,t))+'</span>\r\n <p class="pt-2">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"processing",{name:"lang",hash:{},data:i}))+"</p>\r\n"},4: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.failed:r,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?r:""},5:function(e,t,n,o,i){e.propertyIsEnumerable;return'<p class="pt-2 text-danger">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"failed",{name:"lang",hash:{},data:i}))+"</p>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,i){e.propertyIsEnumerable;var r,a=e.lambda,l=e.escapeExpression;return"<h4>"+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.heading:r,t))+"</h4>\r\n<p>"+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line1:r,t))+"</p>\r\n<p>"+l(a(null!=(r=null!=(r=null!=t?t.options:t)?r.componentOptions:r)?r.line2:r,t))+'</p>\r\n<div class="btn-region"></div>\r\n'+(null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.processing:r,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(4,i,0),data:i}))?r:"")},useData:!0})},1149:function(e,t,n){e.exports={btn:"_59zg9"}},1182:function(e,t,n){"use strict";var o=n(2),i=n(6),r=n(17),a=n(142),l=n(13),s=n(1112),c=n(196),u=n(1136),p=n.n(u),h=n(1137),f=n.n(h);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 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 y(e,t){return(y=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=v(e);if(t){var i=v(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return g(this,n)}}function g(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e){return(v=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}}),t&&y(e,t)}(h,e);var t,n,o,u=b(h);function h(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,h),u.call(this,e)}return t=h,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"name",get:function(){return"ChapterItemComponent"}},{key:"lang",get:function(){return"libraryEditor.chapterItem"}},{key:"instanceChannelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return p.a}},{key:"className",get:function(){return"chapter ".concat(f.a.chapterItem)}},{key:"behaviors",get:function(){return[{behaviorClass:a.a,selector:".action"}]}},{key:"regions",value:function(){return{editForm:{replaceElement:!1,el:".edit-form-region"}}}},{key:"elements",get:function(){return{chapterItem:".chapter-item",editChapter:".edit-chapter",deleteChapter:".delete-chapter"}}},{key:"events",value:function(){return{"click @ui.editChapter":"onEditChapter","click @ui.deleteChapter":"onDeleteChapter","click .clickable-seek":"onClick"}}},{key:"bindListeners",value:function(){this.listenTo(this.instanceChannelName,c.LibraryEditorActions.CancelChapterEdit,this.onCancelEdit),this.listenTo(this.instanceChannelName,c.LibraryEditorActions.UpdateChapter,this.onUpdateChapter),this.listenTo(this.instanceChannelName,c.LibraryEditorActions.UpdateChapterTime,this.onUpdateChapterTime),this.listenTo(this.model,"change:showEditor",this.onShowEditorChange),this.listenTo(this.model,"change:loading",this.onLoadingChange);var e=this.model.collection.first();this.model!==e?this.listenTo(this.model.collection,"sort",this.render):this.listenTo(this.model.collection,"add remove sort",this.render)}},{key:"onClick",value:function(){var e=i.Radio.channel(this.options.channelName);this.model.get("isPhysicalChapter")?e.trigger(c.LibraryEditorActions.SeekToChapter,this.model.get("index")):e.trigger(c.LibraryEditorActions.UpdateChapterTime,this.model.get("startTime"))}},{key:"onLoadingChange",value:function(){var e=this.model.get("loading")?"disable":"enable";this.getUI("editChapter").tooltip(e),this.getUI("deleteChapter").tooltip(e),this.model.set("showEditor",!1,{silent:!0}),this.render()}},{key:"onShowEditorChange",value:function(){this.model.get("loading")||(this.model.get("showEditor")?this.showEditView():this.hideEditView())}},{key:"showEditView",value:function(){this.renderEditForm(),this.getUI("chapterItem").addClass(f.a.darkBackground)}},{key:"hideEditView",value:function(){this.model.set("showEditor",!1,{silent:!0}),this.getUI("chapterItem").removeClass(f.a.darkBackground),this.detachChildView("editForm")}},{key:"onCancelEdit",value:function(){this.hideEditView()}},{key:"onDeleteChapter",value:function(){this.model.get("loading")||i.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.DeleteChapter,this.model)}},{key:"onUpdateChapter",value:function(e){i.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.UpdateChapter,e),this.render()}},{key:"onUpdateChapterTime",value:function(e){i.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.UpdateChapterTime,e)}},{key:"onEditChapter",value:function(){i.Radio.channel(this.options.channelName).trigger(c.LibraryEditorActions.ToggleEdit,this.model)}},{key:"canDelete",value:function(e){var t=this.model.collection.length;return 1===e&&1===t||!(1===e&&t>1)}},{key:"viewOptions",value:function(){var e=this.model.collection.indexOf(this.model)+1,t=l.x.trimToMinutes(l.x.secondsToHoursFormatted(this.model.get("startTime")));return Object.assign(Object.assign({},this.options),{styles:f.a,time:t,index:e,loading:this.model.get("loading"),allowDelete:this.canDelete(e),editSvg:r.a.getSvg(r.b.Edit),deleteSvg:r.a.getSvg(r.b.Delete)})}},{key:"renderEditForm",value:function(){this.showChildView("editForm",new s.a({model:this.model,editing:!0,channelName:this.instanceChannelName,duration:this.options.duration}))}},{key:"onBeforeDetach",value:function(){$(".tooltip").remove()}}])&&m(t.prototype,n),o&&m(t,o),h}(o.a.Component);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 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 E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(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=S(e);if(t){var i=S(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return T(this,n)}}function T(e,t){return!t||"object"!==C(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var x=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&E(e,t)}(r,e);var t,n,o,i=O(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.bindEditorListeners()}},{key:"name",get:function(){return"ChapterComponentCollection"}},{key:"className",get:function(){return"chapters"}},{key:"childView",get:function(){return k}},{key:"bindEditorListeners",value:function(){this.options.editable&&this.listenTo(this.options.channelName,c.LibraryEditorActions.ToggleEdit,this.toggleEditForm)}},{key:"toggleEditForm",value:function(e){this.collection.each((function(t){return t!==e&&t.set("showEditor",!1)})),e.set("showEditor",!e.get("showEditor"))}},{key:"childViewOptions",get:function(){return{showActions:this.options.showActions,duration:this.options.duration,channelName:this.options.channelName}}}])&&w(t.prototype,n),o&&w(t,o),r}(o.a.ComponentCollection),P=n(1138),R=n.n(P);function _(e){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(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 N(e,t){return(N=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=D(e);if(t){var i=D(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return L(this,n)}}function L(e,t){return!t||"object"!==_(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function D(e){return(D=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return V}));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}}),t&&N(e,t)}(r,e);var t,n,o,i=j(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:"name",get:function(){return"ChaptersComponent"}},{key:"template",get:function(){return R.a}},{key:"lang",get:function(){return"libraryEditor.chapters"}},{key:"className",get:function(){return"chapters ".concat(!this.options.editable&&"py-3 border-top")}},{key:"regions",value:function(){return{chapterList:{replaceElement:!0,el:".chapter-list-region"}}}},{key:"viewOptions",value:function(){return{showHeader:this.options.showHeader}}},{key:"onRender",value:function(){this.showChildView("chapterList",new x({collection:this.collection,duration:this.options.duration,channelName:this.options.channelName,showActions:this.options.showActions,editable:this.options.editable}))}}])&&I(t.prototype,n),o&&I(t,o),r}(o.a.Component)},1275: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 w-100"></div>\r\n<div class="row">\r\n <div class="col-6 pt-3">\r\n <div class="webplayer-region"></div>\r\n <div class="add-chapter-region"></div>\r\n </div>\r\n <div class="col-6 mb-2 pt-3">\r\n <div class="chapter-list-region"></div>\r\n </div>\r\n</div>'},useData:!0})},1420:function(e,t,n){"use strict";n.r(t),n.d(t,"EditChaptersView",(function(){return D}));var o=n(1),i=n(2),r=n(5),a=n(3),l=n(121),s=n(367),c=n(188),u=n(13),p=n(0),h=n(197),f=n(9),d=n(4),m=n(42),y=n(1181),b=n(315),g=n(1106),v=n(1147),k=n(1112),C=n(1182),w=n(202),E=n(196),O=n(1033),T=n(1275),S=n.n(T),x=n(303),P=n(143);function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function N(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=L(e);if(t){var i=L(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return j(this,n)}}function j(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var D=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&I(e,t)}(j,e);var t,n,T,R=N(j);function j(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,j),R.call(this,e)}return t=j,(n=[{key:"initialize",value:function(){this.bindListeners(),this.initializeDataServices(),u.v.initBackButton()}},{key:"name",get:function(){return"EditVideoChaptersView"}},{key:"title",get:function(){return!!this.model&&this.model.get("name")}},{key:"lang",get:function(){return"libraryEditor.editChapters"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white p-3"}},{key:"template",get:function(){return S.a}},{key:"regions",value:function(){return{tabs:{el:".tab-region",partialLoading:f.h.EditVideoTabs},webplayer:{replaceElement:!0,el:".webplayer-region",partialLoading:f.h.WebPlayer},addChapter:{replaceElement:!0,el:".add-chapter-region",partialLoading:f.h.EditVideoChaptersForm},chapterList:{replaceElement:!0,el:".chapter-list-region",partialLoading:f.h.EditVideoChapterList}}}},{key:"bindListeners",value:function(){this.listenTo(p.e.VIDEO,"".concat(p.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.e.VIDEO,"".concat(p.f.VIDEOS,":").concat(this.options.videoId,":error"),this.onVideoDataError),this.listenTo(p.e.VIDEO,"".concat(p.f.VIDEO_HAS_PHYSICAL_CHAPTERS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.e.CHAPTER,"".concat(p.f.CONCATENATE_STATUS,":").concat(this.options.videoId,":error"),this.onConcatenateDataError),this.listenTo(this.channelName,E.LibraryEditorActions.CreateChapter,this.onCreateChapter),this.listenTo(this.channelName,E.LibraryEditorActions.UpdateChapter,this.onUpdateChapter),this.listenTo(this.channelName,E.LibraryEditorActions.DeleteChapter,this.onDeleteChapter),this.listenTo(this.channelName,E.LibraryEditorActions.UpdateChapterTime,this.onTimeInputUpdate),this.listenTo(this.channelName,E.LibraryEditorActions.SeekToChapter,this.onSeekToChapter),this.listenTo(this.channelName,E.LibraryEditorActions.MergeChapters,this.onMergeChapters)}},{key:"initializeDataServices",value:function(){this.videoDataService=r.a.getInstance(p.g.Video,this),this.chapterDataService=r.a.getInstance(p.g.Chapter,this)}},{key:"onVideoDataError",value:function(e){switch(e.type){case l.a.NotFound:i.a.ErrorHelper.throw(new w.l);break;case l.a.Forbidden:i.a.ErrorHelper.throw(new w.f)}}},{key:"onConcatenateDataError",value:function(e){e.type===l.a.NotFound&&(this.concatenateRequestNotFound=!0,this.render())}},{key:"onCreateChapter",value:function(e){0===this.chapters.length&&0!==e.startTime&&this.createChapter({name:a.a.getPhrase(this.lang,"intro"),startTime:0}),this.createChapter(e)}},{key:"createChapter",value:function(e){var t=this,n=new c.a(e);this.chapters.add(n),n.set("loading",!0),this.chapterDataService.createChapter(this.model.get("id"),e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.renderChapterForm(),t.logAction(e,d.UserAction.Create)}))}},{key:"onUpdateChapter",value:function(e){var t=this,n=this.chapters.find((function(t){return t.get("id")===e.id}));n.set("loading",!0);var o=b.a.updatedChaptersAlert(this.model.get("name"));this.chapterDataService.updateChapter(n.id,e.name,e.startTime,(function(e){n.set(e.toJSON(),{silent:!0}),n.set("loading",!1),t.chapters.sort(),t.logAction(e,d.UserAction.Edit)}),o)}},{key:"onDeleteChapter",value:function(e){var t=this;e.set("loading",!0),this.chapterDataService.deleteChapter(e.id,(function(){t.logAction(e,d.UserAction.Delete),t.chapters.remove(e)}))}},{key:"onMergeChapters",value:function(){var e=this;this.chapterDataService.addConcatenateRequest(this.options.videoId,(function(){e.pollConcatenation()}))}},{key:"onTimeInputUpdate",value:function(e){e>=0&&e<=u.x.millisecondsToSeconds(this.model.get("duration"))&&this.player.seekTo(e)}},{key:"logAction",value:function(e,t){var n=Object.assign({videoId:this.model.get("id")},e.pick("id","name","startTime"));m.a.logUserAction(n,{actionType:t,entity:d.EntityType.Chapter,location:d.LocationContext.EditVideoChapters})}},{key:"onSeekToChapter",value:function(e){e<0||this.player.seekToChapter(e)}},{key:"startPollingConcatenation",value:function(){if(this.concatenateRequest){var e=[x.a.SingleFile,x.a.ConcatenationFailed];o.contains(e,this.concatenateRequest.get("status"))||this.pollConcatenation()}}},{key:"pollConcatenation",value:function(){var e=this;this.isDestroyed()||this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){if(e.concatenateRequest=t,e.concatenateRequest.get("status")!==x.a.SingleFile)return setTimeout((function(){return e.pollConcatenation()}),5e3),void e.renderConcatenationRequest();e.videoDataService.clearPhysicialChaptersCache(),e.render()}))}},{key:"renderChapterList",value:function(){this.showChildView("chapterList",new C.a({collection:this.chapters,duration:this.model.get("duration"),channelName:this.channelName,showActions:!this.hasPhysicalChapters.get("value"),editable:!this.hasPhysicalChapters.get("value"),showHeader:!0}))}},{key:"renderChapterForm",value:function(){this.showChildView("addChapter",new k.a({model:new c.a,collection:this.chapters,creating:!0,duration:this.model.get("duration"),channelName:this.channelName,playerViewModelKey:"".concat(p.y.NAME,"-").concat(this.model.get("id"))}))}},{key:"renderConcatenationRequest",value:function(){this.isRendered()&&this.showChildView("addChapter",new v.a({type:"chapters",channelName:this.channelName,model:this.concatenateRequest}))}},{key:"renderEditComponents",value:function(){if(this.hasPhysicalChapters.get("value"))return this.renderConcatenationRequest(),void this.mapPhysicalChapters();this.renderChapterForm(),this.renderChapterList()}},{key:"renderTabs",value:function(){this.showChildView("tabs",new g.a({tabs:u.v.getEditVideoTabs(this.options.videoId),activeTab:".edit-chapters-applink",goBackTab:u.v.getBackButton(this.options.videoId)}))}},{key:"renderWebPlayer",value:function(){this.player=new y.a({model:this.model,webPlayerUrl:this.config.get("webPlayerUrl"),captureAnalytics:!1,currentUser:this.currentUser}),this.showChildView("webplayer",this.player)}},{key:"mapPhysicalChapters",value:function(){var e=this;this.renderPartialLoading("chapterList"),this.player.query("getChapters",(function(t){e.chapters=new s.a(O.a.mapPhysicalChapters(t)),e.renderChapterList()}))}},{key:"redirectToVideoDetails",value:function(){i.a.AppLinkHelper.trigger({application:p.b.LIBRARY_EDITOR,action:p.a.LibraryEditor.VIDEO_DETAILS,args:[this.model.get("id")]},{replace:!0})}},{key:"fetchData",value:function(){var e=this;if(this.model=this.videoDataService.getVideo(this.options.videoId),this.model){if(!u.j.canEditVideo(this.model))return void this.redirectToVideoDetails();this.chapters=this.model.chapters}this.hasPhysicalChapters=this.videoDataService.hasPhysicalChapters(this.options.videoId),this.hasPhysicalChapters&&this.hasPhysicalChapters.get("value")&&!this.getConcatenateRequestSent&&(this.chapterDataService.getConcatenateRequest(this.options.videoId,(function(t){e.concatenateRequest=t,e.render()})),this.getConcatenateRequestSent=!0)}},{key:"shouldRender",value:function(){return!(!this.model||!this.hasPhysicalChapters||this.hasPhysicalChapters.get("value")&&!this.concatenateRequest&&!this.concatenateRequestNotFound)}},{key:"requiredResources",get:function(){return{config:h.b.config,currentUser:P.b.currentUser}}},{key:"onBeforeRender",value:function(){return this.fetchData(),this.shouldRender()}},{key:"onRender",value:function(){this.renderTabs(),this.renderWebPlayer(),this.renderEditComponents(),this.startPollingConcatenation()}}])&&_(t.prototype,n),T&&_(t,T),j}(i.a.View)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[31],{1044:function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var o=n(1),r=n(2),i=n(308);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){var e=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(t){return!1}}();return function(){var n,o=p(t);if(e){var r=p(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return u(this,n)}}function u(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(u,t);var e,n,r,a=c(u);function u(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,t)}return e=u,(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 t={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(t,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.alignment,n=void 0===e?"left":e,o=t.extraClasses,r="dropdown-menu-".concat(n);return o&&(r="".concat(r," ").concat(o)),r}},{key:"centerSelectedItem",value:function(){var t=this.$el.find(".active");if(t.length){var e=this.$el.scrollTop()+t.position().top,n=.5*this.$el.height()+.5*t.height();this.$el.scrollTop(e-n)}}}])&&l(e.prototype,n),r&&l(e,r),u}(r.a.ComponentCollection)},1104:function(t,e,n){"use strict";var o=n(2),r=n(17),i=n(86),a=n(4),l=n(42),s=n(1044),c=n(0),u=n(3),p=n(1107),f=n.n(p);function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(t){var e=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(t){return!1}}();return function(){var n,o=m(t);if(e){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return b(this,n)}}function b(t,e){return!e||"object"!==y(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(p,t);var e,n,r,i=g(p);function p(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),i.call(this,t)}return e=p,(n=[{key:"name",get:function(){return"FolderActionsDropdownComponent"}},{key:"template",get:function(){return f.a}},{key:"lang",get:function(){return"libraryEditor.folderActionsDropdown"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{items:{el:".items-region",replaceElement:!0}}}},{key:"getFolderActions",value:function(){return[{title:u.a.getPhrase(this.lang,"addSubfolder"),analyticsOptions:l.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Create,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.NEW_SUB_FOLDER,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"rename"),analyticsOptions:l.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Rename,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.RENAME_FOLDER,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"move"),analyticsOptions:l.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Move,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.MOVE_FOLDER,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"editImages"),analyticsOptions:l.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.EditAssoc,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start,descriptor:a.AssocDescriptor.Image}),appLink:{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.EDIT_FOLDER_IMAGES,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"generatePdf"),analyticsOptions:l.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Create,entity:a.EntityType.PDF,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.GENERATE_PDF,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"remove"),analyticsOptions:l.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Delete,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),classes:"text-danger",appLink:{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.DELETE_FOLDER,args:[this.model.get("id")]}}]}},{key:"onRender",value:function(){this.showChildView("items",new s.a({analyticsHelper:l.a,displayOptions:{alignment:"right"},channelName:this.channelName,collection:new o.a.Collection(this.getFolderActions()),childOptions:{isDisabled:function(){return this.model.get("disabled")}}}))}}])&&d(e.prototype,n),r&&d(e,r),p}(o.a.Component),w=n(1108),O=n.n(w),k=n(1109),E=n.n(k);function R(t){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function L(t,e){return(L=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function C(t){var e=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(t){return!1}}();return function(){var n,o=S(t);if(e){var r=S(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return P(this,n)}}function P(t,e){return!e||"object"!==R(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",(function(){return T}));var T=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&L(t,e)}(l,t);var e,n,o,a=C(l);function l(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,t)}return e=l,(n=[{key:"name",get:function(){return"VideoCollectionActionsComponent"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){if(this.model instanceof i.a)return"position-absolute ".concat(this.options.overrideClasses?"":E.a.dropdownContainer," ").concat(this.options.extraClasses," ")}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle",dropdownItem:".dropdown-item"}}},{key:"events",value:function(){return{"click @ui.dropdownToggle":"onClickDropdownToggle","click @ui.dropdownItem":"onClickDropdownItem"}}},{key:"template",get:function(){return O.a}},{key:"regions",value:function(){return{items:{replaceElement:!0,el:".items-region"}}}},{key:"onClickDropdownToggle",value:function(){this.model instanceof i.a&&this.showChildView("items",new v({model:this.model,analyticsOptions:this.options.analyticsOptions}))}},{key:"onClickDropdownItem",value:function(t){t.stopPropagation(),t.preventDefault(),this.getUI("dropdownToggle").dropdown("toggle")}},{key:"viewOptions",value:function(){return{hasActions:this.model instanceof i.a,dropdownClass:"".concat(E.a.dropdownButton," ").concat(this.options.buttonClass),svg:r.a.getSvg(r.b.More)}}}])&&_(e.prototype,n),o&&_(e,o),l}(o.a.Component)},1107:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){return'<div class="items-region"></div>'},useData:!0})},1108:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.lambda;return'<span data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+t.escapeExpression(a(null!=(i=null!=e?e.options:e)?i.dropdownClass:i,e))+' d-inline-block ui-dropdown-toggle">\r\n '+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'\r\n</span>\r\n<div class="items-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){var i;t.propertyIsEnumerable;return null!=(i=n.if.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.hasActions:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:""},useData:!0})},1109:function(t,e,n){t.exports={dropdownContainer:"_2F3Cz",dropdownButton:"_2TdId"}},1130:function(t,e,n){"use strict";n.d(e,"a",(function(){return w}));var o=n(2),r=n(17),i=n(4),a=n(42),l=n(1044),s=n(0),c=n(3),u=n(1131),p=n.n(u),f=n(1132),y=n.n(f);function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function g(t,e){return(g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function b(t){var e=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(t){return!1}}();return function(){var n,o=v(t);if(e){var r=v(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return m(this,n)}}function m(t,e){return!e||"object"!==d(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}(d,t);var e,n,u,f=b(d);function d(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),f.call(this,t)}return e=d,(n=[{key:"name",get:function(){return"LibraryActionsComponent"}},{key:"template",get:function(){return p.a}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.libraryActions"}},{key:"className",get:function(){return"position-absolute ".concat(y.a.dropdownContainer," ").concat(this.options.extraClasses," ")}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle",dropdownItem:".dropdown-item"}}},{key:"events",value:function(){return{"click @ui.dropdownToggle":"onClickDropdownToggle","click @ui.dropdownItem":"onClickDropdownItem"}}},{key:"regions",value:function(){return{dropdownItems:{replaceElement:!0,el:".items-region"}}}},{key:"onClickDropdownToggle",value:function(){this.showChildView("dropdownItems",new l.a({analyticsHelper:a.a,displayOptions:{alignment:"right"},channelName:this.channelName,collection:new o.a.Collection([{title:c.a.getPhrase(this.lang,"addFolder"),analyticsOptions:a.a.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Create,entity:i.EntityType.Folder,workflowPhase:i.WorkflowPhase.Start}),appLink:{application:s.b.LIBRARY_EDITOR,action:s.a.Shared.NEW_FOLDER,args:[this.model.get("id")]}},{title:c.a.getPhrase(this.lang,"rename"),analyticsOptions:a.a.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Rename,entity:i.EntityType.Library,workflowPhase:i.WorkflowPhase.Start}),appLink:{application:s.b.LIBRARY_EDITOR,action:s.a.LibraryEditor.RENAME_LIBRARY,args:[this.model.get("id")]}},{title:c.a.getPhrase(this.lang,"remove"),analyticsOptions:a.a.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Delete,entity:i.EntityType.Library,workflowPhase:i.WorkflowPhase.Start}),appLink:{application:s.b.LIBRARY_EDITOR,action:s.a.LibraryEditor.DELETE_LIBRARY,args:[this.model.get("id")]},classes:"text-danger"}])}))}},{key:"onClickDropdownItem",value:function(t){t.stopPropagation(),t.preventDefault(),this.getUI("dropdownToggle").dropdown("toggle")}},{key:"viewOptions",value:function(){return{dropdownClass:"".concat(y.a.dropdownButton," ").concat(this.options.buttonClass),svg:r.a.getSvg(r.b.More)}}}])&&h(e.prototype,n),u&&h(e,u),d}(o.a.Component)},1131:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.lambda;return'<span data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+t.escapeExpression(a(null!=(i=null!=e?e.options:e)?i.dropdownClass:i,e))+' d-inline-block ui-dropdown-toggle">\r\n '+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'\r\n</span>\r\n<div class="items-region"></div>'},useData:!0})},1132:function(t,e,n){t.exports={dropdownContainer:"_293SV",dropdownButton:"_23YxG"}},1312:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.lambda,l=t.escapeExpression;return'<div class="'+l(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.addLibraryContainer:i,e))+'">\r\n <button class="applink-new-library btn btn-outline-secondary '+l(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.addLibrary:i,e))+'">\r\n <span class="'+l(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.plus:i,e))+' d-inline-block position-absolute">\r\n '+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.plusSvg:i,e))?i:"")+"\r\n </span>\r\n "+l((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"newLibrary",{name:"lang",hash:{},data:r}))+"\r\n </button>\r\n</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){var i;t.propertyIsEnumerable;return'<div class="logo-region"></div>\r\n<div class="folder-tree-region"></div>\r\n'+(null!=(i=n.if.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.canCreateLibraries:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")},useData:!0})},1313:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){var i;t.propertyIsEnumerable;return t.escapeExpression(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.disabled:i,e))},3:function(t,e,n,o,r){var i;t.propertyIsEnumerable;return t.escapeExpression(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.selected:i,e))},5:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.lambda;return' <span class="'+t.escapeExpression(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.caret:i,e))+' d-inline-block position-absolute">\r\n '+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.caretSvg:i,e))?i:"")+"\r\n </span>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a,l=t.lambda,s=t.escapeExpression,c=null!=e?e:t.nullContext||{};return'<div class="position-relative border-bottom '+s(l(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.library:i,e))+" "+(null!=(i=n.if.call(c,null!=(i=null!=e?e.options:e)?i.disabled:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")+'">\r\n <a class="position-relative library-event '+s(l(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.libraryAnchor:i,e))+" "+(null!=(i=n.if.call(c,null!=(i=null!=e?e.options:e)?i.open:i,{name:"if",hash:{},fn:t.program(3,r,0),inverse:t.noop,data:r}))?i:"")+' ui-anchor no-hover-text-underline">\r\n'+(null!=(i=n.if.call(c,null!=(i=null!=e?e.options:e)?i.hasFolders:i,{name:"if",hash:{},fn:t.program(5,r,0),inverse:t.noop,data:r}))?i:"")+' <span class="'+s(l(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.text:i,e))+' ui-text">'+s("function"==typeof(a=null!=(a=n.name||(null!=e?e.name:e))?a:t.hooks.helperMissing)?a.call(c,{name:"name",hash:{},data:r}):a)+'</span>\r\n </a>\r\n <div class="actions-region"></div>\r\n</div>\r\n<div class="folders-region"></div>'},useData:!0})},1314:function(t,e,n){t.exports={addLibrary:"_1O42p",addLibraryContainer:"_1HX0v",plus:"_3aHT2"}},1315:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a,l=t.escapeExpression;return'<img src="'+l("function"==typeof(a=null!=(a=n.url||(null!=e?e.url:e))?a:t.hooks.helperMissing)?a.call(null!=e?e:t.nullContext||{},{name:"url",hash:{},data:r}):a)+'" class="'+l(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.image:i,e))+'"/>\r\n'},3:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.lambda,l=t.escapeExpression;return'<a class="d-inline-flex align-items-center no-decoration '+l(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.addCrest:i,e))+'" href="'+l(a(null!=(i=null!=e?e.options:e)?i.uploadLogoUrl:i,e))+'" target="_blank">\r\n '+l((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"crest",{name:"lang",hash:{},data:r}))+"\r\n</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){var i;t.propertyIsEnumerable;return null!=(i=n.if.call(null!=e?e:t.nullContext||{},null!=e?e.url:e,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.program(3,r,0),data:r}))?i:""},useData:!0})},1316:function(t,e,n){t.exports={image:"Cz1y1",addCrest:"_2PAV_"}},1474:function(t,e,n){"use strict";n.r(e);var o=n(2),r=n(17),i=n(66),a=n(0),l=n(143),s=n(1312),c=n.n(s),u=n(5),p=n(1066),f=n(1104),y=n(1313),d=n.n(y),h=n(1130),g=n(1195),b=n.n(g),m=n(13),v=n(30),w=n(1097),O=n(4);function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function R(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function _(t,e,n){return e&&R(t.prototype,e),n&&R(t,n),t}function L(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&C(t,e)}function C(t,e){return(C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function P(t){var e=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(t){return!1}}();return function(){var n,o=T(t);if(e){var r=T(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return S(this,n)}}function S(t,e){return!e||"object"!==k(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function T(t){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var I=function(t){L(n,t);var e=P(n);function n(t){return E(this,n),e.call(this,t)}return _(n,[{key:"initialize",value:function(){var t=this.options.forceOpen||this.options.libraryId&&this.model.get("id").toString()===this.options.libraryId.toString();this.viewModel=v.a.get("".concat("library:left:nav",":").concat(this.model.get("id"))),this.viewModel.set("open",t),this.viewModel.set("disabled",!1),this.listenTo(this.model,"change:name",this.render),this.options.hasMultipleLibraries&&this.listenTo(this,"open:sub:folders",this.onOpenSubFolders),this.videoDragDropService=u.a.getInstance(a.x.VideoDragDrop,this)}},{key:"name",get:function(){return"LeftNavLibraryComponent"}},{key:"template",get:function(){return d.a}},{key:"className",get:function(){return b.a.libraryContainer}},{key:"behaviors",get:function(){var t=[a.w.FOLDER_DRAG_DROP];return this.options.hasMultipleLibraries&&t.push(a.w.VIDEO_DRAG_DROP),[{behaviorClass:w.a,ui:"anchor",channelNames:t,analyticsOptions:{location:O.LocationContext.LeftNav}}]}},{key:"regions",value:function(){return{folders:{el:".folders-region",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".ui-anchor":{application:a.b.LIBRARY_EDITOR,action:a.a.LibraryEditor.LIBRARY,args:[this.model.get("id")]}}}},{key:"events",value:function(){return{"click .library-event":"onClick"}}},{key:"elements",get:function(){return{anchor:".ui-anchor",text:".ui-text"}}},{key:"onClick",value:function(t){this.viewModel.get("open")&&(t.stopImmediatePropagation(),t.preventDefault(),this.viewModel.set("open",!this.viewModel.get("open")),this.render())}},{key:"onOpenSubFolders",value:function(){if(this.videoDragDropService.getDisabledLibraryIds().includes(this.model.get("id")))return this.viewModel.set("disabled",!0),void this.render();this.viewModel.set("open",!0),this.render()}},{key:"hasFolders",value:function(){return!!m.f.getFirstType(this.model.children,"category")}},{key:"analyticsOptions",get:function(){return{location:O.LocationContext.LeftNav}}},{key:"viewOptions",value:function(){return{styles:b.a,caretSvg:r.a.getSvg(r.b.Caret),open:this.viewModel.get("open"),hasFolders:this.hasFolders(),disabled:this.viewModel.get("disabled")}}},{key:"onRender",value:function(){this.showChildView("actions",new h.a({model:this.model,extraClasses:"rounded-circle mr-1 ".concat(b.a.actions),buttonClass:"text-muted",analyticsOptions:this.analyticsOptions})),this.model.children&&this.model.children.length&&this.viewModel.get("open")&&this.showChildView("folders",new p.a({appLink:{action:a.a.LibraryEditor.FOLDER,application:a.b.LIBRARY_EDITOR},linkArgs:function(t){return[t.get("id")]},collection:this.model.children,channelName:"".concat(this.cid),childrenProperty:"children",actions:f.a,folderTreeId:this.options.folderTreeId,analyticsOptions:this.analyticsOptions}))}}]),n}(o.a.Component),D=function(t){L(n,t);var e=P(n);function n(t){return E(this,n),e.call(this,t)}return _(n,[{key:"name",get:function(){return"LeftNavLibrariesComponent"}},{key:"childView",get:function(){return I}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,libraryId:this.options.libraryId,folderTreeId:this.options.folderTreeId,forceOpen:this.options.forceOpen,hasMultipleLibraries:this.collection.length>1}}}]),n}(o.a.ComponentCollection),x=n(1314),A=n.n(x),j=n(14),N=n(141),B=n(196),F=n(9),M=n(94),U=n(59),V=n(42),Y=n(1315),W=n.n(Y),G=n(1316),H=n.n(G);function z(t){return(z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function J(t,e){return(J=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function q(t){var e=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(t){return!1}}();return function(){var n,o=K(t);if(e){var r=K(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return X(this,n)}}function X(t,e){return!e||"object"!==z(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function K(t){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Q=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&J(t,e)}(i,t);var e,n,o,r=q(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,t)}return e=i,(n=[{key:"name",get:function(){return"CustomerLogoComponent"}},{key:"template",get:function(){return W.a}},{key:"lang",get:function(){return"libraryEditor.customerLogo"}},{key:"className",get:function(){return"text-center p-3 position-relative"}},{key:"events",value:function(){return t={},e="click .".concat(H.a.addCrest),n="onClickAddLogo",e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"onClickAddLogo",value:function(){var t={location:O.LocationContext.LeftNav,actionType:O.UserAction.Create,entity:O.EntityType.Logo};V.a.logUserAction({},t)}},{key:"viewOptions",value:function(){return{styles:H.a,uploadLogoUrl:U.a.urlBuilder(U.a.safeUrlConcat(this.options.onlineUrl,a.t.UPLOAD_LOGO),{loginPrompt:!1})}}}])&&$(e.prototype,n),o&&$(e,o),i}(o.a.Component);function Z(t){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tt(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function et(t,e){return(et=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function nt(t){var e=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(t){return!1}}();return function(){var n,o=rt(t);if(e){var r=rt(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return ot(this,n)}}function ot(t,e){return!e||"object"!==Z(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function rt(t){return(rt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"LeftNavigationView",(function(){return it}));var it=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&et(t,e)}(p,t);var e,n,o,s=nt(p);function p(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),s.call(this,t)}return e=p,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=u.a.getInstance(j.a.Settings,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:library",this.onSelectLibrary),this.listenTo(a.e.LIBRARY,"cache:cleared",this.fetchData),this.listenTo(a.w.FOLDER_DRAG_DROP,"re:render:left:nav",this.render),this.listenTo(a.e.SETTINGS,"".concat(a.f.SETTINGS,":sync"),this.render)}},{key:"name",get:function(){return"LeftNavigationView"}},{key:"title",get:function(){return!1}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.leftNavigation"}},{key:"className",get:function(){return"bg-white pb-3"}},{key:"template",get:function(){return c.a}},{key:"regions",value:function(){return{logo:{el:".logo-region",replaceElement:!1},folderTree:{el:".folder-tree-region",replaceElement:!1,partialLoading:F.h.LeftNav}}}},{key:"events",value:function(){return{"click .new-folder":"newFolder"}}},{key:"appLinks",get:function(){return{".applink-new-library":{application:a.b.LIBRARY_EDITOR,action:a.a.LibraryEditor.NEW_LIBRARY}}}},{key:"fetchData",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),i.a.MaxCustomLibraries)}},{key:"onSelectLibrary",value:function(t){this.collection.each((function(e){v.a.get("".concat("library:left:nav",":").concat(e.id)).set("open",e.id.toString()===t)})),this.render()}},{key:"renderLogo",value:function(){this.showChildView("logo",new Q({model:this.currentUser.get("customerLogo"),customerId:this.currentUser.get("customerId"),onlineUrl:this.config.get("onlineUrl")}))}},{key:"renderLeftNav",value:function(){var t=new D({collection:this.collection,channelName:this.channelName,libraryId:this.options.libraryId,folderTreeId:M.a.LIBRARY_EDITOR,forceOpen:1===this.collection.length});this.showChildView("folderTree",t)}},{key:"requiredResources",get:function(){return{currentUser:N.b.currentUser,config:B.b.config,collection:l.b.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.maxCustomLibraries}},{key:"viewOptions",value:function(){if(this.collection)return{styles:A.a,plusSvg:r.a.getSvg(r.b.Plus),canCreateLibraries:!!this.maxCustomLibraries&&this.maxCustomLibraries.get("value")>this.collection.length}}},{key:"onRender",value:function(){this.renderLogo(),this.renderLeftNav()}}])&&tt(e.prototype,n),o&&tt(e,o),p}(o.a.View)}}]);
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[31],{1036:function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var o=n(1),r=n(2),i=n(309);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function c(t){var e=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(t){return!1}}();return function(){var n,o=p(t);if(e){var r=p(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return u(this,n)}}function u(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function p(t){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var f=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)}(u,t);var e,n,r,a=c(u);function u(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,t)}return e=u,(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 t={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(t,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.alignment,n=void 0===e?"left":e,o=t.extraClasses,r="dropdown-menu-".concat(n);return o&&(r="".concat(r," ").concat(o)),r}},{key:"centerSelectedItem",value:function(){var t=this.$el.find(".active");if(t.length){var e=this.$el.scrollTop()+t.position().top,n=.5*this.$el.height()+.5*t.height();this.$el.scrollTop(e-n)}}}])&&l(e.prototype,n),r&&l(e,r),u}(r.a.ComponentCollection)},1096:function(t,e,n){"use strict";var o=n(2),r=n(17),i=n(87),a=n(4),l=n(42),s=n(1036),c=n(0),u=n(3),p=n(1099),f=n.n(p);function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function g(t){var e=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(t){return!1}}();return function(){var n,o=m(t);if(e){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return b(this,n)}}function b(t,e){return!e||"object"!==y(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var v=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(p,t);var e,n,r,i=g(p);function p(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),i.call(this,t)}return e=p,(n=[{key:"name",get:function(){return"FolderActionsDropdownComponent"}},{key:"template",get:function(){return f.a}},{key:"lang",get:function(){return"libraryEditor.folderActionsDropdown"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{items:{el:".items-region",replaceElement:!0}}}},{key:"getFolderActions",value:function(){return[{title:u.a.getPhrase(this.lang,"addSubfolder"),analyticsOptions:l.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Create,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.NEW_SUB_FOLDER,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"rename"),analyticsOptions:l.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Rename,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.RENAME_FOLDER,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"move"),analyticsOptions:l.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Move,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.MOVE_FOLDER,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"editImages"),analyticsOptions:l.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.EditAssoc,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start,descriptor:a.AssocDescriptor.Image}),appLink:{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.EDIT_FOLDER_IMAGES,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"generatePdf"),analyticsOptions:l.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Create,entity:a.EntityType.PDF,workflowPhase:a.WorkflowPhase.Start}),appLink:{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.GENERATE_PDF,args:[this.model.get("id")]}},{title:u.a.getPhrase(this.lang,"remove"),analyticsOptions:l.a.mergeOptions(this.options.analyticsOptions,{actionType:a.UserAction.Delete,entity:a.EntityType.Folder,workflowPhase:a.WorkflowPhase.Start}),classes:"text-danger",appLink:{application:c.b.LIBRARY_EDITOR,action:c.a.LibraryEditor.DELETE_FOLDER,args:[this.model.get("id")]}}]}},{key:"onRender",value:function(){this.showChildView("items",new s.a({analyticsHelper:l.a,displayOptions:{alignment:"right"},channelName:this.channelName,collection:new o.a.Collection(this.getFolderActions()),childOptions:{isDisabled:function(){return this.model.get("disabled")}}}))}}])&&d(e.prototype,n),r&&d(e,r),p}(o.a.Component),w=n(1100),O=n.n(w),k=n(1101),E=n.n(k);function R(t){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function L(t,e){return(L=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function C(t){var e=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(t){return!1}}();return function(){var n,o=S(t);if(e){var r=S(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return P(this,n)}}function P(t,e){return!e||"object"!==R(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",(function(){return T}));var T=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&L(t,e)}(l,t);var e,n,o,a=C(l);function l(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,t)}return e=l,(n=[{key:"name",get:function(){return"VideoCollectionActionsComponent"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){if(this.model instanceof i.a)return"position-absolute ".concat(this.options.overrideClasses?"":E.a.dropdownContainer," ").concat(this.options.extraClasses," ")}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle",dropdownItem:".dropdown-item"}}},{key:"events",value:function(){return{"click @ui.dropdownToggle":"onClickDropdownToggle","click @ui.dropdownItem":"onClickDropdownItem"}}},{key:"template",get:function(){return O.a}},{key:"regions",value:function(){return{items:{replaceElement:!0,el:".items-region"}}}},{key:"onClickDropdownToggle",value:function(){this.model instanceof i.a&&this.showChildView("items",new v({model:this.model,analyticsOptions:this.options.analyticsOptions}))}},{key:"onClickDropdownItem",value:function(t){t.stopPropagation(),t.preventDefault(),this.getUI("dropdownToggle").dropdown("toggle")}},{key:"viewOptions",value:function(){return{hasActions:this.model instanceof i.a,dropdownClass:"".concat(E.a.dropdownButton," ").concat(this.options.buttonClass),svg:r.a.getSvg(r.b.More)}}}])&&_(e.prototype,n),o&&_(e,o),l}(o.a.Component)},1099:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){return'<div class="items-region"></div>'},useData:!0})},1100:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.lambda;return'<span data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+t.escapeExpression(a(null!=(i=null!=e?e.options:e)?i.dropdownClass:i,e))+' d-inline-block ui-dropdown-toggle">\r\n '+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'\r\n</span>\r\n<div class="items-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){var i;t.propertyIsEnumerable;return null!=(i=n.if.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.hasActions:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:""},useData:!0})},1101:function(t,e,n){t.exports={dropdownContainer:"_2F3Cz",dropdownButton:"_2TdId"}},1122:function(t,e,n){"use strict";n.d(e,"a",(function(){return w}));var o=n(2),r=n(17),i=n(4),a=n(42),l=n(1036),s=n(0),c=n(3),u=n(1123),p=n.n(u),f=n(1124),y=n.n(f);function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function g(t,e){return(g=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function b(t){var e=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(t){return!1}}();return function(){var n,o=v(t);if(e){var r=v(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return m(this,n)}}function m(t,e){return!e||"object"!==d(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&g(t,e)}(d,t);var e,n,u,f=b(d);function d(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,d),f.call(this,t)}return e=d,(n=[{key:"name",get:function(){return"LibraryActionsComponent"}},{key:"template",get:function(){return p.a}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.libraryActions"}},{key:"className",get:function(){return"position-absolute ".concat(y.a.dropdownContainer," ").concat(this.options.extraClasses," ")}},{key:"elements",get:function(){return{dropdownToggle:".ui-dropdown-toggle",dropdownItem:".dropdown-item"}}},{key:"events",value:function(){return{"click @ui.dropdownToggle":"onClickDropdownToggle","click @ui.dropdownItem":"onClickDropdownItem"}}},{key:"regions",value:function(){return{dropdownItems:{replaceElement:!0,el:".items-region"}}}},{key:"onClickDropdownToggle",value:function(){this.showChildView("dropdownItems",new l.a({analyticsHelper:a.a,displayOptions:{alignment:"right"},channelName:this.channelName,collection:new o.a.Collection([{title:c.a.getPhrase(this.lang,"addFolder"),analyticsOptions:a.a.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Create,entity:i.EntityType.Folder,workflowPhase:i.WorkflowPhase.Start}),appLink:{application:s.b.LIBRARY_EDITOR,action:s.a.Shared.NEW_FOLDER,args:[this.model.get("id")]}},{title:c.a.getPhrase(this.lang,"rename"),analyticsOptions:a.a.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Rename,entity:i.EntityType.Library,workflowPhase:i.WorkflowPhase.Start}),appLink:{application:s.b.LIBRARY_EDITOR,action:s.a.LibraryEditor.RENAME_LIBRARY,args:[this.model.get("id")]}},{title:c.a.getPhrase(this.lang,"remove"),analyticsOptions:a.a.mergeOptions(this.options.analyticsOptions,{actionType:i.UserAction.Delete,entity:i.EntityType.Library,workflowPhase:i.WorkflowPhase.Start}),appLink:{application:s.b.LIBRARY_EDITOR,action:s.a.LibraryEditor.DELETE_LIBRARY,args:[this.model.get("id")]},classes:"text-danger"}])}))}},{key:"onClickDropdownItem",value:function(t){t.stopPropagation(),t.preventDefault(),this.getUI("dropdownToggle").dropdown("toggle")}},{key:"viewOptions",value:function(){return{dropdownClass:"".concat(y.a.dropdownButton," ").concat(this.options.buttonClass),svg:r.a.getSvg(r.b.More)}}}])&&h(e.prototype,n),u&&h(e,u),d}(o.a.Component)},1123:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.lambda;return'<span data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+t.escapeExpression(a(null!=(i=null!=e?e.options:e)?i.dropdownClass:i,e))+' d-inline-block ui-dropdown-toggle">\r\n '+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'\r\n</span>\r\n<div class="items-region"></div>'},useData:!0})},1124:function(t,e,n){t.exports={dropdownContainer:"_293SV",dropdownButton:"_23YxG"}},1304:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.lambda,l=t.escapeExpression;return'<div class="'+l(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.addLibraryContainer:i,e))+'">\r\n <button class="applink-new-library btn btn-outline-secondary '+l(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.addLibrary:i,e))+'">\r\n <span class="'+l(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.plus:i,e))+' d-inline-block position-absolute">\r\n '+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.plusSvg:i,e))?i:"")+"\r\n </span>\r\n "+l((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"newLibrary",{name:"lang",hash:{},data:r}))+"\r\n </button>\r\n</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){var i;t.propertyIsEnumerable;return'<div class="logo-region"></div>\r\n<div class="folder-tree-region"></div>\r\n'+(null!=(i=n.if.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.canCreateLibraries:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")},useData:!0})},1305:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){var i;t.propertyIsEnumerable;return t.escapeExpression(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.disabled:i,e))},3:function(t,e,n,o,r){var i;t.propertyIsEnumerable;return t.escapeExpression(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.selected:i,e))},5:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.lambda;return' <span class="'+t.escapeExpression(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.caret:i,e))+' d-inline-block position-absolute">\r\n '+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.caretSvg:i,e))?i:"")+"\r\n </span>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a,l=t.lambda,s=t.escapeExpression,c=null!=e?e:t.nullContext||{};return'<div class="position-relative border-bottom '+s(l(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.library:i,e))+" "+(null!=(i=n.if.call(c,null!=(i=null!=e?e.options:e)?i.disabled:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")+'">\r\n <a class="position-relative library-event '+s(l(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.libraryAnchor:i,e))+" "+(null!=(i=n.if.call(c,null!=(i=null!=e?e.options:e)?i.open:i,{name:"if",hash:{},fn:t.program(3,r,0),inverse:t.noop,data:r}))?i:"")+' ui-anchor no-hover-text-underline">\r\n'+(null!=(i=n.if.call(c,null!=(i=null!=e?e.options:e)?i.hasFolders:i,{name:"if",hash:{},fn:t.program(5,r,0),inverse:t.noop,data:r}))?i:"")+' <span class="'+s(l(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.text:i,e))+' ui-text">'+s("function"==typeof(a=null!=(a=n.name||(null!=e?e.name:e))?a:t.hooks.helperMissing)?a.call(c,{name:"name",hash:{},data:r}):a)+'</span>\r\n </a>\r\n <div class="actions-region"></div>\r\n</div>\r\n<div class="folders-region"></div>'},useData:!0})},1306:function(t,e,n){t.exports={addLibrary:"_1O42p",addLibraryContainer:"_1HX0v",plus:"_3aHT2"}},1307:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a,l=t.escapeExpression;return'<img src="'+l("function"==typeof(a=null!=(a=n.url||(null!=e?e.url:e))?a:t.hooks.helperMissing)?a.call(null!=e?e:t.nullContext||{},{name:"url",hash:{},data:r}):a)+'" class="'+l(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.image:i,e))+'"/>\r\n'},3:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.lambda,l=t.escapeExpression;return'<a class="d-inline-flex align-items-center no-decoration '+l(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.addCrest:i,e))+'" href="'+l(a(null!=(i=null!=e?e.options:e)?i.uploadLogoUrl:i,e))+'" target="_blank">\r\n '+l((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"crest",{name:"lang",hash:{},data:r}))+"\r\n</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){var i;t.propertyIsEnumerable;return null!=(i=n.if.call(null!=e?e:t.nullContext||{},null!=e?e.url:e,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.program(3,r,0),data:r}))?i:""},useData:!0})},1308:function(t,e,n){t.exports={image:"Cz1y1",addCrest:"_2PAV_"}},1466:function(t,e,n){"use strict";n.r(e);var o=n(2),r=n(17),i=n(67),a=n(0),l=n(145),s=n(1304),c=n.n(s),u=n(5),p=n(1058),f=n(1096),y=n(1305),d=n.n(y),h=n(1122),g=n(1187),b=n.n(g),m=n(13),v=n(30),w=n(1089),O=n(4);function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function E(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function R(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function _(t,e,n){return e&&R(t.prototype,e),n&&R(t,n),t}function L(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&C(t,e)}function C(t,e){return(C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function P(t){var e=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(t){return!1}}();return function(){var n,o=T(t);if(e){var r=T(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return S(this,n)}}function S(t,e){return!e||"object"!==k(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function T(t){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var I=function(t){L(n,t);var e=P(n);function n(t){return E(this,n),e.call(this,t)}return _(n,[{key:"initialize",value:function(){var t=this.options.forceOpen||this.options.libraryId&&this.model.get("id").toString()===this.options.libraryId.toString();this.viewModel=v.a.get("".concat("library:left:nav",":").concat(this.model.get("id"))),this.viewModel.set("open",t),this.viewModel.set("disabled",!1),this.listenTo(this.model,"change:name",this.render),this.options.hasMultipleLibraries&&this.listenTo(this,"open:sub:folders",this.onOpenSubFolders),this.videoDragDropService=u.a.getInstance(a.x.VideoDragDrop,this)}},{key:"name",get:function(){return"LeftNavLibraryComponent"}},{key:"template",get:function(){return d.a}},{key:"className",get:function(){return b.a.libraryContainer}},{key:"behaviors",get:function(){var t=[a.w.FOLDER_DRAG_DROP];return this.options.hasMultipleLibraries&&t.push(a.w.VIDEO_DRAG_DROP),[{behaviorClass:w.a,ui:"anchor",channelNames:t,analyticsOptions:{location:O.LocationContext.LeftNav}}]}},{key:"regions",value:function(){return{folders:{el:".folders-region",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".ui-anchor":{application:a.b.LIBRARY_EDITOR,action:a.a.LibraryEditor.LIBRARY,args:[this.model.get("id")]}}}},{key:"events",value:function(){return{"click .library-event":"onClick"}}},{key:"elements",get:function(){return{anchor:".ui-anchor",text:".ui-text"}}},{key:"onClick",value:function(t){this.viewModel.get("open")&&(t.stopImmediatePropagation(),t.preventDefault(),this.viewModel.set("open",!this.viewModel.get("open")),this.render())}},{key:"onOpenSubFolders",value:function(){if(this.videoDragDropService.getDisabledLibraryIds().includes(this.model.get("id")))return this.viewModel.set("disabled",!0),void this.render();this.viewModel.set("open",!0),this.render()}},{key:"hasFolders",value:function(){return!!m.f.getFirstType(this.model.children,"category")}},{key:"analyticsOptions",get:function(){return{location:O.LocationContext.LeftNav}}},{key:"viewOptions",value:function(){return{styles:b.a,caretSvg:r.a.getSvg(r.b.Caret),open:this.viewModel.get("open"),hasFolders:this.hasFolders(),disabled:this.viewModel.get("disabled")}}},{key:"onRender",value:function(){this.showChildView("actions",new h.a({model:this.model,extraClasses:"rounded-circle mr-1 ".concat(b.a.actions),buttonClass:"text-muted",analyticsOptions:this.analyticsOptions})),this.model.children&&this.model.children.length&&this.viewModel.get("open")&&this.showChildView("folders",new p.a({appLink:{action:a.a.LibraryEditor.FOLDER,application:a.b.LIBRARY_EDITOR},linkArgs:function(t){return[t.get("id")]},collection:this.model.children,channelName:"".concat(this.cid),childrenProperty:"children",actions:f.a,folderTreeId:this.options.folderTreeId,analyticsOptions:this.analyticsOptions}))}}]),n}(o.a.Component),D=function(t){L(n,t);var e=P(n);function n(t){return E(this,n),e.call(this,t)}return _(n,[{key:"name",get:function(){return"LeftNavLibrariesComponent"}},{key:"childView",get:function(){return I}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,libraryId:this.options.libraryId,folderTreeId:this.options.folderTreeId,forceOpen:this.options.forceOpen,hasMultipleLibraries:this.collection.length>1}}}]),n}(o.a.ComponentCollection),x=n(1306),A=n.n(x),j=n(14),N=n(143),B=n(197),F=n(9),M=n(95),U=n(59),V=n(42),Y=n(1307),W=n.n(Y),G=n(1308),H=n.n(G);function z(t){return(z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function J(t,e){return(J=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function q(t){var e=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(t){return!1}}();return function(){var n,o=K(t);if(e){var r=K(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return X(this,n)}}function X(t,e){return!e||"object"!==z(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function K(t){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Q=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&J(t,e)}(i,t);var e,n,o,r=q(i);function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),r.call(this,t)}return e=i,(n=[{key:"name",get:function(){return"CustomerLogoComponent"}},{key:"template",get:function(){return W.a}},{key:"lang",get:function(){return"libraryEditor.customerLogo"}},{key:"className",get:function(){return"text-center p-3 position-relative"}},{key:"events",value:function(){return t={},e="click .".concat(H.a.addCrest),n="onClickAddLogo",e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}},{key:"onClickAddLogo",value:function(){var t={location:O.LocationContext.LeftNav,actionType:O.UserAction.Create,entity:O.EntityType.Logo};V.a.logUserAction({},t)}},{key:"viewOptions",value:function(){return{styles:H.a,uploadLogoUrl:U.a.urlBuilder(U.a.safeUrlConcat(this.options.onlineUrl,a.t.UPLOAD_LOGO),{loginPrompt:!1})}}}])&&$(e.prototype,n),o&&$(e,o),i}(o.a.Component);function Z(t){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tt(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function et(t,e){return(et=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function nt(t){var e=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(t){return!1}}();return function(){var n,o=rt(t);if(e){var r=rt(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return ot(this,n)}}function ot(t,e){return!e||"object"!==Z(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function rt(t){return(rt=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"LeftNavigationView",(function(){return it}));var it=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&et(t,e)}(p,t);var e,n,o,s=nt(p);function p(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,p),s.call(this,t)}return e=p,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=u.a.getInstance(j.a.Settings,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:library",this.onSelectLibrary),this.listenTo(a.e.LIBRARY,"cache:cleared",this.fetchData),this.listenTo(a.w.FOLDER_DRAG_DROP,"re:render:left:nav",this.render),this.listenTo(a.e.SETTINGS,"".concat(a.f.SETTINGS,":sync"),this.render)}},{key:"name",get:function(){return"LeftNavigationView"}},{key:"title",get:function(){return!1}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.leftNavigation"}},{key:"className",get:function(){return"bg-white pb-3"}},{key:"template",get:function(){return c.a}},{key:"regions",value:function(){return{logo:{el:".logo-region",replaceElement:!1},folderTree:{el:".folder-tree-region",replaceElement:!1,partialLoading:F.h.LeftNav}}}},{key:"events",value:function(){return{"click .new-folder":"newFolder"}}},{key:"appLinks",get:function(){return{".applink-new-library":{application:a.b.LIBRARY_EDITOR,action:a.a.LibraryEditor.NEW_LIBRARY}}}},{key:"fetchData",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),i.a.MaxCustomLibraries)}},{key:"onSelectLibrary",value:function(t){this.collection.each((function(e){v.a.get("".concat("library:left:nav",":").concat(e.id)).set("open",e.id.toString()===t)})),this.render()}},{key:"renderLogo",value:function(){this.showChildView("logo",new Q({model:this.currentUser.get("customerLogo"),customerId:this.currentUser.get("customerId"),onlineUrl:this.config.get("onlineUrl")}))}},{key:"renderLeftNav",value:function(){var t=new D({collection:this.collection,channelName:this.channelName,libraryId:this.options.libraryId,folderTreeId:M.a.LIBRARY_EDITOR,forceOpen:1===this.collection.length});this.showChildView("folderTree",t)}},{key:"requiredResources",get:function(){return{currentUser:N.b.currentUser,config:B.b.config,collection:l.b.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.maxCustomLibraries}},{key:"viewOptions",value:function(){if(this.collection)return{styles:A.a,plusSvg:r.a.getSvg(r.b.Plus),canCreateLibraries:!!this.maxCustomLibraries&&this.maxCustomLibraries.get("value")>this.collection.length}}},{key:"onRender",value:function(){this.renderLogo(),this.renderLeftNav()}}])&&tt(e.prototype,n),o&&tt(e,o),p}(o.a.View)}}]);
|