@clickview/library-editor 1.1.57 → 1.2.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +2 -2
- package/dist/en.json +1 -1
- package/dist/scripts/{0-7a0a00671e.chunk.js → 0-3146283f04.chunk.js} +1 -1
- package/dist/scripts/1-8f308c9df2.chunk.js +1 -0
- package/dist/scripts/{10-9adc2cda45.chunk.js → 10-1f8e4712fb.chunk.js} +1 -1
- package/dist/scripts/{11-ff467086e1.chunk.js → 11-efbe8b672b.chunk.js} +1 -1
- package/dist/scripts/{12-24c4543472.chunk.js → 12-9a649bd1e8.chunk.js} +1 -1
- package/dist/scripts/{13-10636e2af5.chunk.js → 13-d003ff9e41.chunk.js} +1 -1
- package/dist/scripts/{14-9b1ecd3e9e.chunk.js → 14-79273eff4c.chunk.js} +1 -1
- package/dist/scripts/{15-e4ef6f64cf.chunk.js → 15-1a0756e067.chunk.js} +1 -1
- package/dist/scripts/{16-ea4e41f570.chunk.js → 16-bbf0f01fe8.chunk.js} +1 -1
- package/dist/scripts/{17-9353ded8cd.chunk.js → 17-3056f1e460.chunk.js} +1 -1
- package/dist/scripts/{18-fb56568492.chunk.js → 18-4c5983938e.chunk.js} +1 -1
- package/dist/scripts/{19-85a94ac004.chunk.js → 19-f6bd3a3d49.chunk.js} +1 -1
- package/dist/scripts/{2-6e60c5cd87.chunk.js → 2-d90f461b10.chunk.js} +1 -1
- package/dist/scripts/{22-a4903ff45c.chunk.js → 22-f0e56683c3.chunk.js} +1 -1
- package/dist/scripts/{23-b47ac20bca.chunk.js → 23-cdce4174d1.chunk.js} +1 -1
- package/dist/scripts/{24-f431e57e2a.chunk.js → 24-afd2aa2bfc.chunk.js} +1 -1
- package/dist/scripts/25-b8aeb90fea.chunk.js +1 -0
- package/dist/scripts/{26-4931172ebc.chunk.js → 26-08a7f60500.chunk.js} +1 -1
- package/dist/scripts/{27-adae09a46f.chunk.js → 27-4fdfe99ba0.chunk.js} +1 -1
- package/dist/scripts/{28-696a0da105.chunk.js → 28-bb3ced1465.chunk.js} +1 -1
- package/dist/scripts/29-ef11dca9b5.chunk.js +1 -0
- package/dist/scripts/3-f02b82314e.chunk.js +1 -0
- package/dist/scripts/{30-92d387d3d9.chunk.js → 30-41819d54db.chunk.js} +1 -1
- package/dist/scripts/{31-7e545aa0de.chunk.js → 31-adedea4916.chunk.js} +1 -1
- package/dist/scripts/{32-7328345fae.chunk.js → 32-92b6dc1186.chunk.js} +1 -1
- package/dist/scripts/33-dda4dfbdee.chunk.js +1 -0
- package/dist/scripts/34-0f61f7fc7d.chunk.js +1 -0
- package/dist/scripts/35-df3c6c90f7.chunk.js +1 -0
- package/dist/scripts/{36-c347fda103.chunk.js → 36-97a61b13fd.chunk.js} +1 -1
- package/dist/scripts/{37-74139562b8.chunk.js → 37-5f0b4c4b24.chunk.js} +1 -1
- package/dist/scripts/{38-f300998fdd.chunk.js → 38-1806441e62.chunk.js} +1 -1
- package/dist/scripts/{39-b3dc9c44a0.chunk.js → 39-cb06876d63.chunk.js} +1 -1
- package/dist/scripts/{4-a6f41aa1cf.chunk.js → 4-3556f5cd86.chunk.js} +1 -1
- package/dist/scripts/{40-3e0329bded.chunk.js → 40-dedc900f03.chunk.js} +1 -1
- package/dist/scripts/{41-14984944f5.chunk.js → 41-2a772649ef.chunk.js} +1 -1
- package/dist/scripts/{42-a83543523b.chunk.js → 42-edd884c6e1.chunk.js} +1 -1
- package/dist/scripts/{43-1dd75e9a7c.chunk.js → 43-7cb12bb043.chunk.js} +1 -1
- package/dist/scripts/{44-b009aed5ee.chunk.js → 44-6e38e6c3da.chunk.js} +1 -1
- package/dist/scripts/{45-8784f71efb.chunk.js → 45-7696788c78.chunk.js} +1 -1
- package/dist/scripts/{46-84948e5396.chunk.js → 46-6fae0cec47.chunk.js} +1 -1
- package/dist/scripts/{47-e8ee683c6b.chunk.js → 47-c5e053926b.chunk.js} +1 -1
- package/dist/scripts/{48-f7d6b635d4.chunk.js → 48-c62f428014.chunk.js} +1 -1
- package/dist/scripts/{49-85880607e1.chunk.js → 49-0221ac925c.chunk.js} +1 -1
- package/dist/scripts/{5-441004c068.chunk.js → 5-f2fad668b9.chunk.js} +1 -1
- package/dist/scripts/{50-7119810c07.chunk.js → 50-6c9cd76347.chunk.js} +1 -1
- package/dist/scripts/{51-4073403c2a.chunk.js → 51-4c4cb2a786.chunk.js} +1 -1
- package/dist/scripts/{52-83ac3c5f59.chunk.js → 52-1a2a4d664f.chunk.js} +1 -1
- package/dist/scripts/{53-44b9074b42.chunk.js → 53-4420fdb2ff.chunk.js} +1 -1
- package/dist/scripts/{54-f87b2698de.chunk.js → 54-7ad2a43bae.chunk.js} +1 -1
- package/dist/scripts/{55-02e36c66d8.chunk.js → 55-6bdc1394e8.chunk.js} +1 -1
- package/dist/scripts/{56-7e9d94a656.chunk.js → 56-0e7f151d8f.chunk.js} +1 -1
- package/dist/scripts/{57-4ad9ab266e.chunk.js → 57-e02ec7e3aa.chunk.js} +1 -1
- package/dist/scripts/{58-6ebe979a17.chunk.js → 58-23f2f08ffa.chunk.js} +1 -1
- package/dist/scripts/{59-09ad6d94e9.chunk.js → 59-73f62422ee.chunk.js} +1 -1
- package/dist/scripts/{6-f1f3ea7cec.chunk.js → 6-41fbd1d098.chunk.js} +1 -1
- package/dist/scripts/{60-d4f9eaf20d.chunk.js → 60-02ac1d0885.chunk.js} +1 -1
- package/dist/scripts/{61-45cfc05bd5.chunk.js → 61-11806e7f0f.chunk.js} +1 -1
- package/dist/scripts/{62-4242c25552.chunk.js → 62-36cd4edbe1.chunk.js} +1 -1
- package/dist/scripts/{63-779b927a04.chunk.js → 63-221a784003.chunk.js} +1 -1
- package/dist/scripts/{64-29f65ce8e5.chunk.js → 64-de212ef1ff.chunk.js} +1 -1
- package/dist/scripts/{65-0e5cd44c96.chunk.js → 65-2a3fe2cf9f.chunk.js} +1 -1
- package/dist/scripts/{66-782fe6a351.chunk.js → 66-3d86df4f03.chunk.js} +1 -1
- package/dist/scripts/{67-c749606e6f.chunk.js → 67-4044e5776b.chunk.js} +1 -1
- package/dist/scripts/{68-9ef5b70dc6.chunk.js → 68-d9ac81db0f.chunk.js} +1 -1
- package/dist/scripts/{69-ea32cbf274.chunk.js → 69-4523125605.chunk.js} +1 -1
- package/dist/scripts/{7-00dd3cbb22.chunk.js → 7-7d08599cb1.chunk.js} +1 -1
- package/dist/scripts/{70-876856aed0.chunk.js → 70-cac4a9fb87.chunk.js} +1 -1
- package/dist/scripts/{71-89a356a899.chunk.js → 71-59ded4dd7b.chunk.js} +1 -1
- package/dist/scripts/{72-6e08024788.chunk.js → 72-8329bfea82.chunk.js} +1 -1
- package/dist/scripts/{73-7cc4cc7383.chunk.js → 73-dfe0e3c96a.chunk.js} +1 -1
- package/dist/scripts/{74-8ffb258210.chunk.js → 74-1aee6ab328.chunk.js} +1 -1
- package/dist/scripts/{8-878942d96f.chunk.js → 8-b20f6d3c66.chunk.js} +1 -1
- package/dist/scripts/9-4baf495c07.chunk.js +1 -0
- package/dist/scripts/bundle-2b257bc7e1.min.js +10 -0
- package/dist/scripts/polyfills-c68217e80d.min.js +1 -0
- package/package.json +2 -2
- package/dist/scripts/1-709b927521.chunk.js +0 -1
- package/dist/scripts/25-560da8ad7f.chunk.js +0 -1
- package/dist/scripts/29-c2c961a586.chunk.js +0 -1
- package/dist/scripts/3-aa6f0c5b23.chunk.js +0 -1
- package/dist/scripts/33-128143c106.chunk.js +0 -1
- package/dist/scripts/34-c915802337.chunk.js +0 -1
- package/dist/scripts/35-a166f1b8e3.chunk.js +0 -1
- package/dist/scripts/9-da8328e091.chunk.js +0 -1
- package/dist/scripts/bundle-e3d4c2e087.min.js +0 -10
- package/dist/scripts/polyfills-4de7102781.min.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[4],{
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[4],{1311:function(e,n,t){var r=t(10);e.exports=(r.default||r).template({1:function(e,n,t,r,a){e.propertyIsEnumerable;var i=null!=n?n:e.nullContext||{},o=e.hooks.helperMissing,l=e.escapeExpression;return"<p>"+l((t.lang||n&&n.lang||o).call(i,"infoHeading",{name:"lang",hash:{},data:a}))+"</p>\r\n<p>"+l((t.lang||n&&n.lang||o).call(i,"meaningSubheading",{name:"lang",hash:{},data:a}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning1",{name:"lang",hash:{},data:a}))+"</li>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning2",{name:"lang",hash:{},data:a}))+"</li>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning3",{name:"lang",hash:{},data:a}))+"</li>\r\n</ul>\r\n"},3:function(e,n,t,r,a){e.propertyIsEnumerable;var i=null!=n?n:e.nullContext||{},o=e.hooks.helperMissing,l=e.escapeExpression;return"<p>"+l((t.lang||n&&n.lang||o).call(i,"disclaimer",{name:"lang",hash:{},data:a}))+"</p>\r\n<p>"+l((t.lang||n&&n.lang||o).call(i,"featureSubheading",{name:"lang",hash:{},data:a}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"feature1",{name:"lang",hash:{},data:a}))+"</li> \r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"feature2",{name:"lang",hash:{},data:a}))+"</li>\r\n</ul>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var i;e.propertyIsEnumerable;return null!=(i=t.if.call(null!=n?n:e.nullContext||{},null!=(i=null!=n?n.options:n)?i.noPublisher:i,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a}))?i:""},useData:!0})},1444:function(e,n,t){"use strict";t.r(n),t.d(n,"PublishLibraryView",(function(){return _}));var r=t(6),a=t(5),i=t(2),o=t(305),l=t(0),u=t(265),c=t(12),s=t(3),f=t(146),h=t(324),p=t(326),g=t(58),b=t(1311),y=t.n(b);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,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function v(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,n){return(w=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function k(e){var n=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 t,r=P(e);if(n){var a=P(this).constructor;t=Reflect.construct(r,arguments,a)}else t=r.apply(this,arguments);return S(this,t)}}function S(e,n){if(n&&("object"===d(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&w(e,n)}(S,e);var n,t,b,d=k(S);function S(){return m(this,S),d.apply(this,arguments)}return n=S,(t=[{key:"initialize",value:function(){this.libraryDataService=a.a.getInstance(l.g.Library,this),this.migrationVideoDataService=a.a.getInstance(l.g.MigrationVideo,this),this.videoDataService=a.a.getInstance(l.g.Video,this)}},{key:"name",get:function(){return"PublishLibraryView"}},{key:"title",get:function(){return s.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.publishLibrary"}},{key:"template",get:function(){return y.a}},{key:"channelName",get:function(){return c.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:s.a.getPhrase(this.lang,"heading"),behaviorClass:o.e,spinnerButtonOptions:{channelName:this.channelName,buttonText:s.a.getPhrase(this.lang,"continue"),onClick:function(){return e.onClickContinue()}}}]}},{key:"onClickContinue",value:function(){var e=this;r.Radio.channel(this.channelName).trigger(u.b.ShowSpinner);var n=0,t=function(){++n===e.libraries.length&&(e.triggerMethod("hide"),e.videoDataService.clearVideoCache(),r.Radio.channel(h.a.LIBRARY_STATUS).trigger("status:changed"))};g.a.noPublisher(this.customerMetadata)?this.libraries.each((function(n){e.libraryDataService.publishLibrary(n.get("id"),t)})):this.migrationVideoDataService.publishLibraries((function(){i.a.AppLinkHelper.trigger({application:l.b.MIGRATION_WIZARD,action:l.a.MigrationWizard.PUBLISH_LIBRARY_PROGRESS})}))}},{key:"requiredResources",get:function(){return{libraries:f.b.libraries,customerMetadata:p.b.customerMetaData}}},{key:"viewOptions",value:function(){return{noPublisher:g.a.noPublisher(this.customerMetadata)}}}])&&v(n.prototype,t),b&&v(n,b),Object.defineProperty(n,"prototype",{writable:!1}),S}(i.a.View)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[40],{1069:function(t,e,r){"use strict";r.d(e,"a",(function(){return y}));var n=r(2),o=r(37),i=r(3);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 c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(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 r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p="migrationWizard.smartMigrationApiCall",y=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(s,t);var e,r,o,a=l(s);function s(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.call(this,i.a.getPhrase(p,"title"))).supportUrl=t,e}return e=s,(r=[{key:"name",get:function(){return"SmartMigrationApiCallError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase(p,"heading"),text:"<p>".concat(i.a.getPhrase(p,"errorNotice")," \n <strong>").concat(i.a.getPhrase(p,"reloadPage"),"</strong></p>\n <p>").concat(i.a.getPhrase(p,"helpGuide",{supportUrl:this.supportUrl,linkClasses:"text-info"}),"</p>"),buttons:[{text:i.a.getPhrase(p,"reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&c(e.prototype,r),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.a)},1106:function(t,e,r){"use strict";r(311);var n=r(2),o=r(37),i=r(3);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 c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(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 r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p="migrationWizard.backupProgress",y=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(s,t);var e,r,o,a=l(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,i.a.getPhrase(p,"title"))}return e=s,(r=[{key:"name",get:function(){return"BackupProgressError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase(p,"heading"),text:i.a.getPhrase(p,"body"),buttons:[{text:i.a.getPhrase(p,"reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&c(e.prototype,r),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.a);function b(t){return(b="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 g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(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 r,n=v(t);if(e){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m(this,r)}}function m(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(c,t);var e,r,o,a=d(c);function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationProgressError","title"))}return e=c,(r=[{key:"name",get:function(){return"MigrationProgressError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase("migrationWizard.migrationProgressError","heading"),text:i.a.getPhrase("migrationWizard.migrationProgressError","body"),buttons:[{text:i.a.getPhrase("migrationWizard.migrationProgressError","reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&g(e.prototype,r),o&&g(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a);function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function O(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _(t,e){return(_=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function k(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 r,n=R(t);if(e){var o=R(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return j(this,r)}}function j(t,e){if(e&&("object"===P(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var E=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(c,t);var e,r,o,a=k(c);function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationFinalisation","title"))}return e=c,(r=[{key:"name",get:function(){return"MigrationFinalisationError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase("migrationWizard.migrationFinalisation","heading"),text:i.a.getPhrase("migrationWizard.migrationFinalisation","body"),buttons:[{text:i.a.getPhrase("migrationWizard.migrationFinalisation","reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&O(e.prototype,r),o&&O(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a);r(1069);r.d(e,"a",(function(){return y})),r.d(e,"c",(function(){return w})),r.d(e,"b",(function(){return E})),r.d(e,"a",(function(){return y}))},1128:function(t,e,r){"use strict";r.d(e,"a",(function(){return b}));var n=r(2),o=r(1189),i=r.n(o),a=r(1190),c=r.n(a);function u(t){return(u="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 r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(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 r,n=y(t);if(e){var o=y(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var b=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(a,t);var e,r,n,o=f(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t)}return e=a,(r=[{key:"initialize",value:function(){this.listenTo(this.model,"change:percentage",this.update)}},{key:"name",get:function(){return"ProgressCircleComponent"}},{key:"template",get:function(){return c.a}},{key:"lang",get:function(){return"migrationWizard.progressCircle"}},{key:"elements",get:function(){return{circle:".progress-circle",text:".progress-circle-text"}}},{key:"viewOptions",value:function(){return{styles:i.a,text:this.options.text,class:this.options.class,percentage:this.options.percentage}}},{key:"onRender",value:function(){this.update()}},{key:"update",value:function(){var t=this.model.get("percentage")||0,e=this.getUI("circle").get(0),r=2*e.r.baseVal.value*Math.PI;e.style.strokeDasharray="".concat(r," ").concat(r),e.style.strokeDashoffset=r;var n=r-t/100*r;e.style.strokeDashoffset=n;var o=this.getUI("text");o&&o.text("".concat(t,"%"))}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(n.a.Component)},1189:function(t,e,r){t.exports={circle:"_3iX0l",extraText:"_1nYnx",progressCircleContainer:"_2l1Al",progressCircle:"_1RbA5"}},1190:function(t,e,r){var n=r(10);t.exports=(n.default||n).template({1:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression;return' <span class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.extraText:i,e))+'">'+c(a(null!=(i=null!=e?e.options:e)?i.text:i,e))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression,u=null!=e?e:t.nullContext||{};return'<div class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.circle:i,e))+" "+c(a(null!=(i=null!=e?e.options:e)?i.class:i,e))+'">\r\n <span>\r\n <span class="progress-circle-text">'+c((r.lang||e&&e.lang||t.hooks.helperMissing).call(u,"progress",{name:"lang",hash:{percentage:null!=(i=null!=e?e.options:e)?i.percentage:i},data:o}))+"</span>\r\n"+(null!=(i=r.if.call(u,null!=(i=null!=e?e.options:e)?i.text:i,{name:"if",hash:{},fn:t.program(1,o,0),inverse:t.noop,data:o}))?i:"")+' </span>\r\n\r\n <svg class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.progressCircleContainer:i,e))+'">\r\n <circle class="progress-circle '+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.progressCircle:i,e))+'" transform=\'rotate(270 160 0)\' stroke-width="28" fill="transparent" r="150">\r\n </svg>\r\n</div>'},useData:!0})},1373:function(t,e,r){t.exports={backupProgress:"_15jUh",info:"_1NjZL",progress:"fp9FZ",migrationBackupContainer:"_28z_5"}},1374:function(t,e,r){var n=r(10);t.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=null!=e?e:t.nullContext||{},c=t.hooks.helperMissing,u=t.escapeExpression;return'<h4 class="pb-4">'+u((r.lang||e&&e.lang||c).call(a,"heading",{name:"lang",hash:{},data:o}))+'</h4>\r\n<div class="progress-circle-region"></div>\r\n<p class="'+u(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.info:i,e))+' pt-4">\r\n '+(null!=(i=(r.lang||e&&e.lang||c).call(a,"info",{name:"lang",hash:{},data:o}))?i:"")+"\r\n</p>"},useData:!0})},1460:function(t,e,r){"use strict";r.r(e),r.d(e,"PublisherBackupProgressView",(function(){return P}));var n=r(2),o=r(5),i=r(30),a=r(1373),c=r.n(a),u=r(1374),l=r.n(u),s=r(1106),f=r(0),p=r(3),y=r(1128);function b(t){return(b="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 g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function m(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 r,n=w(t);if(e){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}function v(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var P=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(b,t);var e,r,a,u=m(b);function b(){return g(this,b),u.apply(this,arguments)}return e=b,(r=[{key:"initialize",value:function(){this.viewModel=i.a.get("backup:progress",{percentage:0}),this.migrationVideoDataService=o.a.getInstance(f.g.MigrationVideo,this),this.bindMigrationDataListeners()}},{key:"name",get:function(){return"PublisherBackupProgressView"}},{key:"title",get:function(){return p.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.publisherBackupProgress"}},{key:"className",get:function(){return"container text-center p-5 bg-white ".concat(c.a.migrationBackupContainer," ").concat(c.a.backupProgress)}},{key:"template",get:function(){return l.a}},{key:"regions",value:function(){return{progressCircle:{replaceElement:!0,el:".progress-circle-region"}}}},{key:"bindMigrationDataListeners",value:function(){this.listenTo(f.e.MIGRATION,"".concat(f.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(f.e.MIGRATION,"".concat(f.f.CUSTOMER_VIDEO,":count:error"),this.onError)}},{key:"onError",value:function(){n.a.ErrorHelper.throw(new s.a)}},{key:"poll",value:function(){var t=this;this.migrationVideoDataService.getCustomerVideoCount((function(e){t.isDestroyed()||(t.videoCount=e,t.setPercentage(),t.viewModel.get("percentage")>=100?t.migrationVideoDataService.clearCacheAndGetCustomerMetadata((function(){n.a.AppLinkHelper.trigger({application:f.b.MIGRATION_WIZARD,action:f.a.MigrationWizard.BACKUP_COMPLETE})})):(setTimeout((function(){return t.poll()}),5e3),t.render()))}))}},{key:"setPercentage",value:function(){if(this.videoCount){var t=100*this.videoCount.get("progressPercentage");t>100&&(t=100),this.viewModel.set({percentage:Math.round(t)})}}},{key:"renderProgressCircle",value:function(){this.showChildView("progressCircle",new y.a({model:this.viewModel,text:p.a.getPhrase(this.lang,"hasBeenBackedUp"),class:c.a.progress}))}},{key:"onBeforeRender",value:function(){return this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),!!this.customerMetadata}},{key:"viewOptions",value:function(){return{styles:c.a,timeRemaining:"30 minutes"}}},{key:"onRender",value:function(){this.pollingStarted||(this.poll(),this.pollingStarted=!0),this.renderProgressCircle()}}])&&h(e.prototype,r),a&&h(e,a),Object.defineProperty(e,"prototype",{writable:!1}),b}(n.a.View)}}]);
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[40],{1070:function(t,e,r){"use strict";r.d(e,"a",(function(){return y}));var n=r(2),o=r(37),i=r(3);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 c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(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 r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p="migrationWizard.smartMigrationApiCall",y=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(s,t);var e,r,o,a=l(s);function s(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.call(this,i.a.getPhrase(p,"title"))).supportUrl=t,e}return e=s,(r=[{key:"name",get:function(){return"SmartMigrationApiCallError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase(p,"heading"),text:"<p>".concat(i.a.getPhrase(p,"errorNotice")," \n <strong>").concat(i.a.getPhrase(p,"reloadPage"),"</strong></p>\n <p>").concat(i.a.getPhrase(p,"helpGuide",{supportUrl:this.supportUrl,linkClasses:"text-info"}),"</p>"),buttons:[{text:i.a.getPhrase(p,"reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&c(e.prototype,r),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.a)},1107:function(t,e,r){"use strict";r(311);var n=r(2),o=r(37),i=r(3);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 c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(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 r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p="migrationWizard.backupProgress",y=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(s,t);var e,r,o,a=l(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,i.a.getPhrase(p,"title"))}return e=s,(r=[{key:"name",get:function(){return"BackupProgressError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase(p,"heading"),text:i.a.getPhrase(p,"body"),buttons:[{text:i.a.getPhrase(p,"reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&c(e.prototype,r),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.a);function b(t){return(b="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 g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(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 r,n=v(t);if(e){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m(this,r)}}function m(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(c,t);var e,r,o,a=d(c);function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationProgressError","title"))}return e=c,(r=[{key:"name",get:function(){return"MigrationProgressError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase("migrationWizard.migrationProgressError","heading"),text:i.a.getPhrase("migrationWizard.migrationProgressError","body"),buttons:[{text:i.a.getPhrase("migrationWizard.migrationProgressError","reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&g(e.prototype,r),o&&g(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a);function P(t){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function O(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _(t,e){return(_=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function k(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 r,n=R(t);if(e){var o=R(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return j(this,r)}}function j(t,e){if(e&&("object"===P(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var E=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(c,t);var e,r,o,a=k(c);function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationFinalisation","title"))}return e=c,(r=[{key:"name",get:function(){return"MigrationFinalisationError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase("migrationWizard.migrationFinalisation","heading"),text:i.a.getPhrase("migrationWizard.migrationFinalisation","body"),buttons:[{text:i.a.getPhrase("migrationWizard.migrationFinalisation","reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&O(e.prototype,r),o&&O(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a);r(1070);r.d(e,"a",(function(){return y})),r.d(e,"c",(function(){return w})),r.d(e,"b",(function(){return E})),r.d(e,"a",(function(){return y}))},1129:function(t,e,r){"use strict";r.d(e,"a",(function(){return b}));var n=r(2),o=r(1190),i=r.n(o),a=r(1191),c=r.n(a);function u(t){return(u="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 r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(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 r,n=y(t);if(e){var o=y(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var b=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(a,t);var e,r,n,o=f(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t)}return e=a,(r=[{key:"initialize",value:function(){this.listenTo(this.model,"change:percentage",this.update)}},{key:"name",get:function(){return"ProgressCircleComponent"}},{key:"template",get:function(){return c.a}},{key:"lang",get:function(){return"migrationWizard.progressCircle"}},{key:"elements",get:function(){return{circle:".progress-circle",text:".progress-circle-text"}}},{key:"viewOptions",value:function(){return{styles:i.a,text:this.options.text,class:this.options.class,percentage:this.options.percentage}}},{key:"onRender",value:function(){this.update()}},{key:"update",value:function(){var t=this.model.get("percentage")||0,e=this.getUI("circle").get(0),r=2*e.r.baseVal.value*Math.PI;e.style.strokeDasharray="".concat(r," ").concat(r),e.style.strokeDashoffset=r;var n=r-t/100*r;e.style.strokeDashoffset=n;var o=this.getUI("text");o&&o.text("".concat(t,"%"))}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(n.a.Component)},1190:function(t,e,r){t.exports={circle:"_3iX0l",extraText:"_1nYnx",progressCircleContainer:"_2l1Al",progressCircle:"_1RbA5"}},1191:function(t,e,r){var n=r(10);t.exports=(n.default||n).template({1:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression;return' <span class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.extraText:i,e))+'">'+c(a(null!=(i=null!=e?e.options:e)?i.text:i,e))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression,u=null!=e?e:t.nullContext||{};return'<div class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.circle:i,e))+" "+c(a(null!=(i=null!=e?e.options:e)?i.class:i,e))+'">\r\n <span>\r\n <span class="progress-circle-text">'+c((r.lang||e&&e.lang||t.hooks.helperMissing).call(u,"progress",{name:"lang",hash:{percentage:null!=(i=null!=e?e.options:e)?i.percentage:i},data:o}))+"</span>\r\n"+(null!=(i=r.if.call(u,null!=(i=null!=e?e.options:e)?i.text:i,{name:"if",hash:{},fn:t.program(1,o,0),inverse:t.noop,data:o}))?i:"")+' </span>\r\n\r\n <svg class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.progressCircleContainer:i,e))+'">\r\n <circle class="progress-circle '+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.progressCircle:i,e))+'" transform=\'rotate(270 160 0)\' stroke-width="28" fill="transparent" r="150">\r\n </svg>\r\n</div>'},useData:!0})},1374:function(t,e,r){t.exports={backupProgress:"_15jUh",info:"_1NjZL",progress:"fp9FZ",migrationBackupContainer:"_28z_5"}},1375:function(t,e,r){var n=r(10);t.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=null!=e?e:t.nullContext||{},c=t.hooks.helperMissing,u=t.escapeExpression;return'<h4 class="pb-4">'+u((r.lang||e&&e.lang||c).call(a,"heading",{name:"lang",hash:{},data:o}))+'</h4>\r\n<div class="progress-circle-region"></div>\r\n<p class="'+u(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.info:i,e))+' pt-4">\r\n '+(null!=(i=(r.lang||e&&e.lang||c).call(a,"info",{name:"lang",hash:{},data:o}))?i:"")+"\r\n</p>"},useData:!0})},1461:function(t,e,r){"use strict";r.r(e),r.d(e,"PublisherBackupProgressView",(function(){return P}));var n=r(2),o=r(5),i=r(30),a=r(1374),c=r.n(a),u=r(1375),l=r.n(u),s=r(1107),f=r(0),p=r(3),y=r(1129);function b(t){return(b="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 g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function m(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 r,n=w(t);if(e){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}function v(t,e){if(e&&("object"===b(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var P=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(b,t);var e,r,a,u=m(b);function b(){return g(this,b),u.apply(this,arguments)}return e=b,(r=[{key:"initialize",value:function(){this.viewModel=i.a.get("backup:progress",{percentage:0}),this.migrationVideoDataService=o.a.getInstance(f.g.MigrationVideo,this),this.bindMigrationDataListeners()}},{key:"name",get:function(){return"PublisherBackupProgressView"}},{key:"title",get:function(){return p.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.publisherBackupProgress"}},{key:"className",get:function(){return"container text-center p-5 bg-white ".concat(c.a.migrationBackupContainer," ").concat(c.a.backupProgress)}},{key:"template",get:function(){return l.a}},{key:"regions",value:function(){return{progressCircle:{replaceElement:!0,el:".progress-circle-region"}}}},{key:"bindMigrationDataListeners",value:function(){this.listenTo(f.e.MIGRATION,"".concat(f.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(f.e.MIGRATION,"".concat(f.f.CUSTOMER_VIDEO,":count:error"),this.onError)}},{key:"onError",value:function(){n.a.ErrorHelper.throw(new s.a)}},{key:"poll",value:function(){var t=this;this.migrationVideoDataService.getCustomerVideoCount((function(e){t.isDestroyed()||(t.videoCount=e,t.setPercentage(),t.viewModel.get("percentage")>=100?t.migrationVideoDataService.clearCacheAndGetCustomerMetadata((function(){n.a.AppLinkHelper.trigger({application:f.b.MIGRATION_WIZARD,action:f.a.MigrationWizard.BACKUP_COMPLETE})})):(setTimeout((function(){return t.poll()}),5e3),t.render()))}))}},{key:"setPercentage",value:function(){if(this.videoCount){var t=100*this.videoCount.get("progressPercentage");t>100&&(t=100),this.viewModel.set({percentage:Math.round(t)})}}},{key:"renderProgressCircle",value:function(){this.showChildView("progressCircle",new y.a({model:this.viewModel,text:p.a.getPhrase(this.lang,"hasBeenBackedUp"),class:c.a.progress}))}},{key:"onBeforeRender",value:function(){return this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),!!this.customerMetadata}},{key:"viewOptions",value:function(){return{styles:c.a,timeRemaining:"30 minutes"}}},{key:"onRender",value:function(){this.pollingStarted||(this.poll(),this.pollingStarted=!0),this.renderProgressCircle()}}])&&h(e.prototype,r),a&&h(e,a),Object.defineProperty(e,"prototype",{writable:!1}),b}(n.a.View)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[41],{1319:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<div class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibraryContainer:i,t))+'">\r\n <button class="applink-new-library btn btn-outline-secondary '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibrary:i,t))+'">\r\n <span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.plus:i,t))+' d-inline-block position-absolute">\r\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.plusSvg:i,t))?i:"")+"\r\n </span>\r\n "+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"newLibrary",{name:"lang",hash:{},data:o}))+"\r\n </button>\r\n</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<div class="logo-region"></div>\r\n<div class="folder-tree-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateLibraries:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1320:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selected:i,t))},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda;return' <span class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.caret:i,t))+' d-inline-block position-absolute">\r\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.caretSvg:i,t))?i:"")+"\r\n </span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l,a=e.lambda,s=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<div class="position-relative border-bottom '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.library:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">\r\n <a class="position-relative library-event '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.libraryAnchor:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.open:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+' ui-anchor no-hover-text-underline">\r\n'+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.hasFolders:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+' <span class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.text:i,t))+' ui-text">'+s("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:e.hooks.helperMissing)?l.call(u,{name:"name",hash:{},data:o}):l)+'</span>\r\n </a>\r\n <div class="actions-region"></div>\r\n</div>\r\n<div class="folders-region"></div>'},useData:!0})},1321:function(e,t,n){e.exports={addLibrary:"_1O42p",addLibraryContainer:"_1HX0v",plus:"_3aHT2"}},1322:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l,a=e.escapeExpression;return'<img src="'+a("function"==typeof(l=null!=(l=n.url||(null!=t?t.url:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"url",hash:{},data:o}):l)+'" class="'+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.image:i,t))+'"/>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<a class="d-inline-flex align-items-center no-decoration '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addCrest:i,t))+'" href="'+a(l(null!=(i=null!=t?t.options:t)?i.uploadLogoUrl:i,t))+'" target="_blank">\r\n '+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"crest",{name:"lang",hash:{},data:o}))+"\r\n</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.url:t,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1323:function(e,t,n){e.exports={image:"Cz1y1",addCrest:"_2PAV_"}},1481:function(e,t,n){"use strict";n.r(t);var r=n(2),o=n(16),i=n(68),l=n(0),a=n(146),s=n(1319),u=n.n(s),c=n(5),f=n(1100),p=n(1121),y=n(1320),d=n.n(y),h=n(1198),b=n(1200),v=n.n(b),m=n(13),g=n(30),w=n(1101),k=n(4);function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var D=function(e){C(n,e);var t=x(n);function n(e){return L(this,n),t.call(this,e)}return R(n,[{key:"initialize",value:function(){var e=this.options.forceOpen||this.options.libraryId&&this.model.get("id").toString()===this.options.libraryId.toString();this.viewModel=g.a.get("".concat("library:left:nav",":").concat(this.model.get("id"))),this.viewModel.set("open",e),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=c.a.getInstance(l.x.VideoDragDrop,this)}},{key:"name",get:function(){return"LeftNavLibraryComponent"}},{key:"template",get:function(){return d.a}},{key:"className",get:function(){return v.a.libraryContainer}},{key:"behaviors",get:function(){var e=[l.w.FOLDER_DRAG_DROP];return this.options.hasMultipleLibraries&&e.push(l.w.VIDEO_DRAG_DROP),[{behaviorClass:w.a,ui:"anchor",channelNames:e,analyticsOptions:{location:k.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:l.b.LIBRARY_EDITOR,action:l.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(e){this.viewModel.get("open")&&(e.stopImmediatePropagation(),e.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:k.LocationContext.LeftNav}}},{key:"viewOptions",value:function(){return{styles:v.a,caretSvg:o.a.getSvg(o.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(v.a.actions),buttonClass:"text-muted",analyticsOptions:this.analyticsOptions})),this.model.children&&this.model.children.length&&this.viewModel.get("open")&&this.showChildView("folders",new f.a({appLink:{action:l.a.LibraryEditor.FOLDER,application:l.b.LIBRARY_EDITOR},linkArgs:function(e){return[e.get("id")]},collection:this.model.children,channelName:"".concat(this.cid),childrenProperty:"children",actions:p.a,folderTreeId:this.options.folderTreeId,analyticsOptions:this.analyticsOptions}))}}]),n}(r.a.Component),P=function(e){C(n,e);var t=x(n);function n(e){return L(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"LeftNavLibrariesComponent"}},{key:"childView",get:function(){return D}},{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}(r.a.ComponentCollection),T=n(1321),j=n.n(T),N=n(14),M=n(144),A=n(201),B=n(9),U=n(95),V=n(57),F=n(42),Y=n(1322),G=n.n(Y),z=n(1323),H=n.n(z);function J(e){return(J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q(e);if(t){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return K(this,n)}}function K(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(i,e);var t,n,r,o=X(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"CustomerLogoComponent"}},{key:"template",get:function(){return G.a}},{key:"lang",get:function(){return"libraryEditor.customerLogo"}},{key:"className",get:function(){return"text-center p-3 position-relative"}},{key:"events",value:function(){return e={},t="click .".concat(H.a.addCrest),n="onClickAddLogo",t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"onClickAddLogo",value:function(){var e={location:k.LocationContext.LeftNav,actionType:k.UserAction.Create,entity:k.EntityType.Logo};F.a.logUserAction({},e)}},{key:"viewOptions",value:function(){return{styles:H.a,uploadLogoUrl:V.a.urlBuilder(V.a.safeUrlConcat(this.options.onlineUrl,l.t.UPLOAD_LOGO),{loginPrompt:!1})}}}])&&q(t.prototype,n),r&&q(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component);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 ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=oe(e);if(t){var o=oe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return re(this,n)}}function re(e,t){if(t&&("object"===$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"LeftNavigationView",(function(){return ie}));var ie=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&te(e,t)}(f,e);var t,n,r,s=ne(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),s.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=c.a.getInstance(N.a.Settings,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:library",this.onSelectLibrary),this.listenTo(l.e.LIBRARY,"cache:cleared",this.fetchData),this.listenTo(l.w.FOLDER_DRAG_DROP,"re:render:left:nav",this.render),this.listenTo(l.e.SETTINGS,"".concat(l.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 u.a}},{key:"regions",value:function(){return{logo:{el:".logo-region",replaceElement:!1},folderTree:{el:".folder-tree-region",replaceElement:!1,partialLoading:B.h.LeftNav}}}},{key:"events",value:function(){return{"click .new-folder":"newFolder"}}},{key:"appLinks",get:function(){return{".applink-new-library":{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.NEW_LIBRARY}}}},{key:"fetchData",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),i.a.MaxCustomLibraries)}},{key:"onSelectLibrary",value:function(e){this.collection.each((function(t){g.a.get("".concat("library:left:nav",":").concat(t.id)).set("open",t.id.toString()===e)})),this.render()}},{key:"renderLogo",value:function(){this.showChildView("logo",new Z({model:this.currentUser.get("customerLogo"),customerId:this.currentUser.get("customerId"),onlineUrl:this.config.get("onlineUrl")}))}},{key:"renderLeftNav",value:function(){var e=new P({collection:this.collection,channelName:this.channelName,libraryId:this.options.libraryId,folderTreeId:U.a.LIBRARY_EDITOR,forceOpen:1===this.collection.length});this.showChildView("folderTree",e)}},{key:"requiredResources",get:function(){return{currentUser:M.b.currentUser,config:A.b.config,collection:a.b.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.maxCustomLibraries}},{key:"viewOptions",value:function(){if(this.collection)return{styles:j.a,plusSvg:o.a.getSvg(o.b.Plus),canCreateLibraries:!!this.maxCustomLibraries&&this.maxCustomLibraries.get("value")>this.collection.length}}},{key:"onRender",value:function(){this.renderLogo(),this.renderLeftNav()}}])&&ee(t.prototype,n),r&&ee(t,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(r.a.View)}}]);
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[41],{1320:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<div class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibraryContainer:i,t))+'">\r\n <button class="applink-new-library btn btn-outline-secondary '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibrary:i,t))+'">\r\n <span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.plus:i,t))+' d-inline-block position-absolute">\r\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.plusSvg:i,t))?i:"")+"\r\n </span>\r\n "+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"newLibrary",{name:"lang",hash:{},data:o}))+"\r\n </button>\r\n</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<div class="logo-region"></div>\r\n<div class="folder-tree-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateLibraries:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1321:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selected:i,t))},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda;return' <span class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.caret:i,t))+' d-inline-block position-absolute">\r\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.caretSvg:i,t))?i:"")+"\r\n </span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l,a=e.lambda,s=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<div class="position-relative border-bottom '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.library:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">\r\n <a class="position-relative library-event '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.libraryAnchor:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.open:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+' ui-anchor no-hover-text-underline">\r\n'+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.hasFolders:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+' <span class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.text:i,t))+' ui-text">'+s("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:e.hooks.helperMissing)?l.call(u,{name:"name",hash:{},data:o}):l)+'</span>\r\n </a>\r\n <div class="actions-region"></div>\r\n</div>\r\n<div class="folders-region"></div>'},useData:!0})},1322:function(e,t,n){e.exports={addLibrary:"_1O42p",addLibraryContainer:"_1HX0v",plus:"_3aHT2"}},1323:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l,a=e.escapeExpression;return'<img src="'+a("function"==typeof(l=null!=(l=n.url||(null!=t?t.url:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"url",hash:{},data:o}):l)+'" class="'+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.image:i,t))+'"/>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<a class="d-inline-flex align-items-center no-decoration '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addCrest:i,t))+'" href="'+a(l(null!=(i=null!=t?t.options:t)?i.uploadLogoUrl:i,t))+'" target="_blank">\r\n '+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"crest",{name:"lang",hash:{},data:o}))+"\r\n</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.url:t,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1324:function(e,t,n){e.exports={image:"Cz1y1",addCrest:"_2PAV_"}},1482:function(e,t,n){"use strict";n.r(t);var r=n(2),o=n(16),i=n(68),l=n(0),a=n(146),s=n(1320),u=n.n(s),c=n(5),f=n(1101),p=n(1122),y=n(1321),d=n.n(y),h=n(1199),b=n(1201),v=n.n(b),m=n(12),g=n(30),w=n(1102),k=n(4);function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function R(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var D=function(e){C(n,e);var t=x(n);function n(e){return L(this,n),t.call(this,e)}return R(n,[{key:"initialize",value:function(){var e=this.options.forceOpen||this.options.libraryId&&this.model.get("id").toString()===this.options.libraryId.toString();this.viewModel=g.a.get("".concat("library:left:nav",":").concat(this.model.get("id"))),this.viewModel.set("open",e),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=c.a.getInstance(l.x.VideoDragDrop,this)}},{key:"name",get:function(){return"LeftNavLibraryComponent"}},{key:"template",get:function(){return d.a}},{key:"className",get:function(){return v.a.libraryContainer}},{key:"behaviors",get:function(){var e=[l.w.FOLDER_DRAG_DROP];return this.options.hasMultipleLibraries&&e.push(l.w.VIDEO_DRAG_DROP),[{behaviorClass:w.a,ui:"anchor",channelNames:e,analyticsOptions:{location:k.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:l.b.LIBRARY_EDITOR,action:l.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(e){this.viewModel.get("open")&&(e.stopImmediatePropagation(),e.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:k.LocationContext.LeftNav}}},{key:"viewOptions",value:function(){return{styles:v.a,caretSvg:o.a.getSvg(o.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(v.a.actions),buttonClass:"text-muted",analyticsOptions:this.analyticsOptions})),this.model.children&&this.model.children.length&&this.viewModel.get("open")&&this.showChildView("folders",new f.a({appLink:{action:l.a.LibraryEditor.FOLDER,application:l.b.LIBRARY_EDITOR},linkArgs:function(e){return[e.get("id")]},collection:this.model.children,channelName:"".concat(this.cid),childrenProperty:"children",actions:p.a,folderTreeId:this.options.folderTreeId,analyticsOptions:this.analyticsOptions}))}}]),n}(r.a.Component),P=function(e){C(n,e);var t=x(n);function n(e){return L(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"LeftNavLibrariesComponent"}},{key:"childView",get:function(){return D}},{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}(r.a.ComponentCollection),T=n(1322),j=n.n(T),N=n(14),M=n(144),A=n(201),B=n(9),U=n(95),V=n(57),F=n(42),Y=n(1323),G=n.n(Y),z=n(1324),H=n.n(z);function J(e){return(J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q(e);if(t){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return K(this,n)}}function K(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(i,e);var t,n,r,o=X(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"CustomerLogoComponent"}},{key:"template",get:function(){return G.a}},{key:"lang",get:function(){return"libraryEditor.customerLogo"}},{key:"className",get:function(){return"text-center p-3 position-relative"}},{key:"events",value:function(){return e={},t="click .".concat(H.a.addCrest),n="onClickAddLogo",t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"onClickAddLogo",value:function(){var e={location:k.LocationContext.LeftNav,actionType:k.UserAction.Create,entity:k.EntityType.Logo};F.a.logUserAction({},e)}},{key:"viewOptions",value:function(){return{styles:H.a,uploadLogoUrl:V.a.urlBuilder(V.a.safeUrlConcat(this.options.onlineUrl,l.t.UPLOAD_LOGO),{loginPrompt:!1})}}}])&&q(t.prototype,n),r&&q(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component);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 ee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=oe(e);if(t){var o=oe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return re(this,n)}}function re(e,t){if(t&&("object"===$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"LeftNavigationView",(function(){return ie}));var ie=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&te(e,t)}(f,e);var t,n,r,s=ne(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),s.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=c.a.getInstance(N.a.Settings,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:library",this.onSelectLibrary),this.listenTo(l.e.LIBRARY,"cache:cleared",this.fetchData),this.listenTo(l.w.FOLDER_DRAG_DROP,"re:render:left:nav",this.render),this.listenTo(l.e.SETTINGS,"".concat(l.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 u.a}},{key:"regions",value:function(){return{logo:{el:".logo-region",replaceElement:!1},folderTree:{el:".folder-tree-region",replaceElement:!1,partialLoading:B.h.LeftNav}}}},{key:"events",value:function(){return{"click .new-folder":"newFolder"}}},{key:"appLinks",get:function(){return{".applink-new-library":{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.NEW_LIBRARY}}}},{key:"fetchData",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),i.a.MaxCustomLibraries)}},{key:"onSelectLibrary",value:function(e){this.collection.each((function(t){g.a.get("".concat("library:left:nav",":").concat(t.id)).set("open",t.id.toString()===e)})),this.render()}},{key:"renderLogo",value:function(){this.showChildView("logo",new Z({model:this.currentUser.get("customerLogo"),customerId:this.currentUser.get("customerId"),onlineUrl:this.config.get("onlineUrl")}))}},{key:"renderLeftNav",value:function(){var e=new P({collection:this.collection,channelName:this.channelName,libraryId:this.options.libraryId,folderTreeId:U.a.LIBRARY_EDITOR,forceOpen:1===this.collection.length});this.showChildView("folderTree",e)}},{key:"requiredResources",get:function(){return{currentUser:M.b.currentUser,config:A.b.config,collection:a.b.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.maxCustomLibraries}},{key:"viewOptions",value:function(){if(this.collection)return{styles:j.a,plusSvg:o.a.getSvg(o.b.Plus),canCreateLibraries:!!this.maxCustomLibraries&&this.maxCustomLibraries.get("value")>this.collection.length}}},{key:"onRender",value:function(){this.renderLogo(),this.renderLeftNav()}}])&&ee(t.prototype,n),r&&ee(t,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(r.a.View)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[42],{1421:function(e,t,n){e.exports={smart:"_1dRs0",leftNav:"_3dpUO"}},1422:function(e,t,n){e.exports={item:"_13Gu_",text:"_2mbEb",folderTree:"_2NhVk",node:"_1dMK1",selected:"_1AACi"}},1423:function(e,t,n){var i=n(10);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return'<div class="selected-banner-region"></div>\r\n<div class="search-region"></div>\r\n<div class="banner-region"></div>\r\n<div class="col-4 '+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.leftNav:o,t))+'">\r\n <div class="left-nav-region"></div>\r\n</div>\r\n<div class="col">\r\n <div class="header-region"></div>\r\n <div class="video-list-region"></div>\r\n</div>\r\n<div class="footer-region"></div>'},useData:!0})},1424:function(e,t,n){var i=n(10);e.exports=(i.default||i).template({1:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return' <a class="applink-goback '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.back:o,t))+'">\r\n <span class="align-middle d-inline-block '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.backSvgContainer:o,t))+'">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.backSvg:o,t))?o:"")+"</span>\r\n </a>\r\n"},3:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return" "+(null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"resultsFor",{name:"lang",hash:{searchTerm:null!=(o=null!=t?t.options:t)?o.searchTerm:o,smartCount:null!=(o=null!=t?t.options:t)?o.results:o},data:r}))?o:"")+"\r\n"},5:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return" "+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.name:o,t))+"\r\n"},7:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<div class="col-4 text-right py-2 '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.subheader:o,t))+'">\r\n <div class="cursor-pointer toggle-migrated h-100 d-flex align-items-center justify-content-end">\r\n <span class="'+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.svg:o,t))+' mr-1">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.svg:o,t))?o:"")+"</span>\r\n <span>"+(null!=(o=n.if.call(l,null!=(o=null!=t?t.options:t)?o.hidden:o,{name:"if",hash:{},fn:e.program(8,r,0),inverse:e.program(10,r,0),data:r}))?o:"")+" "+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"migrated",{name:"lang",hash:{},data:r}))+"</span>\r\n </div>\r\n</div>\r\n"},8:function(e,t,n,i,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"show",{name:"lang",hash:{},data:r}))},10:function(e,t,n,i,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"hide",{name:"lang",hash:{},data:r}))},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{};return'<div class="col-8">\r\n'+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.goBack:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:"")+' <h4 class="'+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.header:o,t))+' py-2">\r\n'+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.searchTerm:o,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.program(5,r,0),data:r}))?o:"")+" </h4>\r\n</div>\r\n\r\n"+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.showMigrationToggle:o,{name:"if",hash:{},fn:e.program(7,r,0),inverse:e.noop,data:r}))?o:"")},useData:!0})},1483:function(e,t,n){"use strict";n.r(t);var i=n(2),r=n(3),o=n(51),a=n(93),s=n(1421),l=n.n(s),c=n(1422),u=n.n(c),d=n(1423),h=n.n(d),f=n(9),g=n(1100),p=n(1130),v=n(1),y=n(6),m=n(5),b=n(16),S=n(338),w=n(1424),k=n.n(w),M=n(53),I=n(120),T=n(0);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 O(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function R(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,i=V(e);if(t){var r=V(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return A(this,n)}}function A(e,t){if(t&&("object"===C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(o,e);var t,n,i,r=R(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,e)}return t=o,(n=[{key:"initialize",value:function(){this.localOptionsService=m.a.getInstance(T.x.LocalOptions,this),this.migrationVideoDataService=m.a.getInstance(T.g.MigrationVideo,this);var e=this.localOptionsService.getOption(M.b.MigratedHidden);v.isUndefined(e)?(this.setMigrationHiddenOption(!1),this.migratedHidden=!1):this.migratedHidden=e}},{key:"name",get:function(){return"CurrentSectionHeaderView"}},{key:"title",get:function(){return!1}},{key:"lang",get:function(){return"migrationWizard.currentSectionHeader"}},{key:"className",get:function(){return"row px-2 ".concat(S.currentHeader)}},{key:"template",get:function(){return k.a}},{key:"elements",get:function(){return{toggleMigrated:".toggle-migrated"}}},{key:"events",value:function(){return{"click @ui.toggleMigrated":"toggleMigrated"}}},{key:"viewOptions",value:function(){return{styles:S,name:this.options.searchTerm||this.model&&this.model.get("name"),hidden:this.migratedHidden,svg:b.a.getSvg(this.migratedHidden?b.b.VisibleOn:b.b.VisibleOff),goBack:this.options.searchTerm,showMigrationToggle:!this.options.initialMigration,backSvg:b.a.getSvg("arrow-left",{prefix:"fas"}),searchTerm:this.options.searchTerm,results:10}}},{key:"appLinks",get:function(){return{".applink-goback":{application:I.a.MIGRATION_WIZARD,action:this.options.initialMigration?T.a.MigrationWizard.SMART:T.a.MigrationWizard.HOME}}}},{key:"onBeforeRender",value:function(){var e=this;return!(!this.model&&!this.options.searchTerm&&(this.migrationVideoDataService.getSelected((function(t){t&&(e.model=t,e.triggerToggle(),e.render())})),!this.model))}},{key:"toggleMigrated",value:function(){this.migratedHidden=!this.migratedHidden,this.setMigrationHiddenOption(this.migratedHidden),this.triggerToggle(),this.render()}},{key:"triggerToggle",value:function(){y.Radio.channel(I.b.MIGRATION).trigger(T.i.MigrationWizard.TOGGLE_MIGRATED,this.migratedHidden)}},{key:"setMigrationHiddenOption",value:function(e){this.localOptionsService.setOption(M.b.MigratedHidden,e)}}])&&O(t.prototype,n),i&&O(t,i),Object.defineProperty(t,"prototype",{writable:!1}),o}(i.a.View);function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var P={getSelectedInFolder:function(e,t){var n,i=x(p.a.getSelectedVideosCollection(e).toArray());try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.get("category")===t)return r.get("count")}}catch(e){i.e(e)}finally{i.f()}return 0},findFolder:function(e,t){var n;if(e)return e.forEach((function(e){if(e.get("categoryGuid")===t)n=e;else{var i=P.findFolder(e.get("children"),t);i&&(n=i)}})),n}},L=n(58),B=n(91),D=n(30),j=n(201),H=n(1120),G=n(13),W=n(95),F=n(200),z=n(144);function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function q(e,t){return(q=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,i=K(e);if(t){var r=K(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return $(this,n)}}function $(e,t){if(t&&("object"===U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"SmartMigrationView",(function(){return Y}));var Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q(e,t)}(d,e);var t,n,s,c=J(d);function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),c.call(this,e)}return t=d,(n=[{key:"initialize",value:function(){this.viewModel=D.a.get(this.viewModelName,{bannerShown:!0},{ctor:B.e,storage:{type:a.c.LocalStorage,persistProps:["bannerShown"]}}),this.bindListeners(),this.initializeServices()}},{key:"name",get:function(){return"SmartMigrationView"}},{key:"title",get:function(){return r.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.smartMigration"}},{key:"viewModelName",get:function(){return"".concat(this.name,":viewmodel")}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"template",get:function(){return h.a}},{key:"className",get:function(){return"row no-gutters w-100 ".concat(l.a.smart)}},{key:"regions",value:function(){return{selectedBanner:{replaceElement:!0,el:".selected-banner-region"},search:{replaceElement:!0,el:".search-region",partialLoading:f.h.PublisherArchiveSearchBar},banner:{replaceElement:!0,el:".banner-region"},leftNav:{replaceElement:!0,el:".left-nav-region",partialLoading:f.h.PublisherArchiveLeftNav},header:{replaceElement:!0,el:".header-region",partialLoading:f.h.PublisherArchiveSectionHeader},videoList:{replaceElement:!0,el:".video-list-region",partialLoading:f.h.PublisherArchiveVideoList},footer:{replaceElement:!0,el:".footer-region",partialLoading:f.h.PublisherArchiveStatusBar}}}},{key:"initializeServices",value:function(){this.folderCacheService=m.a.getInstance(T.x.FolderCache,this),this.selectedVideoService=m.a.getInstance(T.x.SelectedVideo,this),this.migrationVideoDataService=m.a.getInstance(T.g.MigrationVideo,this),this.alertService=m.a.getInstance(T.x.Alerts)}},{key:"bindListeners",value:function(){this.listenTo(T.e.MIGRATION,T.i.MigrationWizard.SELECTED_CHANGED,this.setSelectedVideos),this.listenTo(T.e.MIGRATION,"manual:review:video:count:sync",this.render),this.listenTo(T.e.MIGRATION,"".concat(T.f.CUSTOMER_VIDEO,":count:sync"),this.render),this.listenTo(T.e.MIGRATION,"".concat(T.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(T.b.MIGRATION_WIZARD,T.i.MigrationWizard.CLOSE_BANNER,this.closeSelectionBanner),this.listenTo(this.channelName,"add:selected",this.addSelected),this.listenTo(this.channelName,"remove:selected",this.removeSelected),this.listenTo(this.viewModel,"change:selectedVideoCount",this.renderStatusBar)}},{key:"fetchVideos",value:function(){var e=this;!this.videos&&this.options.folderChord&&this.migrationVideoDataService.getCustomerVideos(this.options.folderChord,(function(t){e.videos||(e.videos=p.a.toggleMigrated(t,!0),e.setSelectedVideos(),e.isRendering||e.render())}))}},{key:"fetchFolders",value:function(){var e=this;this.folders||this.migrationVideoDataService.getCustomerFolders((function(t){if(!e.folders){if(e.folders=t,e.options.folderChord){var n=e.folderCacheService.getFolderByChord(e.options.folderChord,t);G.f.setSelected(W.a.MIGRATION_WIZARD,n,e.folders),e.selectedFolder=G.f.getSelected(W.a.MIGRATION_WIZARD,t)}else{var r=e.folders.first();if(r)return void i.a.AppLinkHelper.trigger({application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.HOME,params:{folder:r.get("chord")}},{replace:!0})}e.isRendering||e.render()}}))}},{key:"setFolderText",value:function(e,t){var n=this,i=e.get("chord"),r=e.get("name"),o=this.folderCacheService.getFolderCache(),a=this.options.folderChord;if(a){var s,l=P.getSelectedInFolder(t,r);if(i===a){var c=this.migrationVideoDataService.getCustomerVideos(i);if(!this.selectedFolder)return;c&&(o[a]=c.length),s=o[a]}o[i]&&(s=o[i]),l&&s?e.set("text","".concat(r," (").concat(l,"/").concat(s,")")):e.set("text",r),e.children.forEach((function(e){return n.setFolderText(e,t)}))}else e.set("text",r)}},{key:"closeSelectionBanner",value:function(){var e=this.getRegion("selectedBanner");e&&(this.viewModel.set("bannerShown",!1),e.destroy())}},{key:"setSelectedVideos",value:function(){var e=this,t=this.selectedVideoService.getSelectedVideoIds();this.videos&&this.videos.forEach((function(n){return p.a.setChecked(n,t,e.isInitialMigration())})),t&&this.viewModel.set("selectedVideoCount",t.length)}},{key:"addSelected",value:function(e,t){this.selectedVideoService.addSelectedVideos(e,t)}},{key:"removeSelected",value:function(e,t){this.selectedVideoService.removeSelectedVideos(e,t)}},{key:"isInitialMigration",value:function(){return L.a.isInitialMigration(this.customerMetadata)}},{key:"onClickBack",value:function(){var e=this;new G.d({title:r.a.getPhrase(this.lang,"backHeading"),text:r.a.getPhrase(this.lang,"backBody"),buttons:[{text:r.a.getPhrase(this.lang,"discard"),className:"btn btn-danger",success:!0},{text:r.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}]}).render().done((function(){e.selectedVideoService.removeAllSelectedVideos(),e.viewModel.set("alertShown",!1),i.a.AppLinkHelper.trigger({application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.START_MIGRATION})}))}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".".concat(l.a.leftNav)),t=e.find(".".concat(u.a.selected));if(t.length&&!(t.offset().top-e.offset().top+t.height()<e.height())){var n=e.scrollTop()+(t.offset().top-e.offset().top),i=.5*e.height()+.5*t.height();e.scrollTop(n-i)}}},{key:"renderEmptyMessage",value:function(){this.showChildView("videoList",new H.b({text:"No folder selected"}))}},{key:"renderSelectedBanner",value:function(){if(this.isInitialMigration()&&!this.viewModel.get("alertShown")){this.viewModel.set("alertShown",!0);var e={heading:r.a.getPhrase(this.lang,"smartSelected"),message:r.a.getPhrase(this.lang,"last3Years"),type:o.a.Success};this.alertService.createAlert(e)}}},{key:"renderLeftNav",value:function(){var e=this,t=new g.a({styles:u.a,appLink:{action:T.a.MigrationWizard.HOME,application:T.b.MIGRATION_WIZARD},linkParams:function(e){return{folder:e.get("chord")}},collection:this.folders,channelName:"".concat(this.cid),childrenProperty:"children",textProperty:"name",extraClass:"p-0",folderTreeId:W.a.MIGRATION_WIZARD});this.showChildView("leftNav",t),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){e.centerSelectedItem()}))}))}},{key:"renderSearchBar",value:function(){this.showChildView("search",new H.h({selected:this.errorCount.get("count")?"publisher-archive":"none"}))}},{key:"renderStatusBar",value:function(){var e=this;if(this.videoCount){var t={application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.SELECTED,args:[this.options.folderChord]},n=this.videoCount.get("successCount"),i=this.selectedVideoService.getNumberSelected(),o=new H.k({nextAppLink:t,showSelected:!0,nextDisabled:0===i,showBackButton:this.isInitialMigration(),text:this.isInitialMigration()?r.a.getPhrase(this.lang,"next"):r.a.getPhrase(this.lang,"addToLibrary"),numberSelected:i,numberAvailable:n,onClickBack:function(){return e.onClickBack()}});this.showChildView("footer",o)}}},{key:"renderVideoList",value:function(){var e=this.options,t=e.folderChord,n=e.searchTerm;if(this.videos||!t&&!n)if(this.selectedFolder){this.showChildView("videoList",new H.l({model:this.selectedFolder,initialMigration:this.isInitialMigration(),folderChord:t,searchTerm:n,collection:this.videos,channelName:this.channelName,supportSiteUrl:this.config.get("supportSiteUrl")}));var i=n||t;G.a.GetViewModel(i,F.CheckboxTypes.MIGRATION_VIDEO_LIST).trigger("change")}else this.renderEmptyMessage();else this.renderPartialLoading("videoList")}},{key:"renderCurrentSection",value:function(){this.showChildView("header",new _({searchTerm:this.options.searchTerm,initialMigration:this.isInitialMigration()}))}},{key:"renderBanner",value:function(){this.isInitialMigration()&&this.showChildView("banner",new H.a({config:this.config,currentUser:this.currentUser}))}},{key:"requiredResources",get:function(){return{config:j.b.config,currentUser:z.b.currentUser}}},{key:"onBeforeRender",value:function(){this.isRendering=!0,this.fetchVideos(),this.fetchFolders(),this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),this.errorCount=this.migrationVideoDataService.getManualReviewVideoCount(),this.videoCount=this.migrationVideoDataService.getCustomerVideoCountCached();var e=!!(this.customerMetadata&&this.folders&&this.videoCount&&this.errorCount);return e||(this.isRendering=!1),e}},{key:"viewOptions",value:function(){return{styles:l.a}}},{key:"onRender",value:function(){if(this.renderSelectedBanner(),this.renderLeftNav(),this.renderSearchBar(),this.renderStatusBar(),this.renderBanner(),!this.videos)return this.renderPartialLoading("header"),this.renderPartialLoading("videoList"),void(this.isRendering=!1);this.options.folderChord||this.options.searchTerm?(this.renderVideoList(),this.renderCurrentSection()):this.renderEmptyMessage(),this.isRendering=!1}}])&&Z(t.prototype,n),s&&Z(t,s),Object.defineProperty(t,"prototype",{writable:!1}),d}(i.a.View)}}]);
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[42],{1422:function(e,t,n){e.exports={smart:"_1dRs0",leftNav:"_3dpUO"}},1423:function(e,t,n){e.exports={item:"_13Gu_",text:"_2mbEb",folderTree:"_2NhVk",node:"_1dMK1",selected:"_1AACi"}},1424:function(e,t,n){var i=n(10);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return'<div class="selected-banner-region"></div>\r\n<div class="search-region"></div>\r\n<div class="banner-region"></div>\r\n<div class="col-4 '+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.leftNav:o,t))+'">\r\n <div class="left-nav-region"></div>\r\n</div>\r\n<div class="col">\r\n <div class="header-region"></div>\r\n <div class="video-list-region"></div>\r\n</div>\r\n<div class="footer-region"></div>'},useData:!0})},1425:function(e,t,n){var i=n(10);e.exports=(i.default||i).template({1:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return' <a class="applink-goback '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.back:o,t))+'">\r\n <span class="align-middle d-inline-block '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.backSvgContainer:o,t))+'">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.backSvg:o,t))?o:"")+"</span>\r\n </a>\r\n"},3:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return" "+(null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"resultsFor",{name:"lang",hash:{searchTerm:null!=(o=null!=t?t.options:t)?o.searchTerm:o,smartCount:null!=(o=null!=t?t.options:t)?o.results:o},data:r}))?o:"")+"\r\n"},5:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return" "+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.name:o,t))+"\r\n"},7:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<div class="col-4 text-right py-2 '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.subheader:o,t))+'">\r\n <div class="cursor-pointer toggle-migrated h-100 d-flex align-items-center justify-content-end">\r\n <span class="'+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.svg:o,t))+' mr-1">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.svg:o,t))?o:"")+"</span>\r\n <span>"+(null!=(o=n.if.call(l,null!=(o=null!=t?t.options:t)?o.hidden:o,{name:"if",hash:{},fn:e.program(8,r,0),inverse:e.program(10,r,0),data:r}))?o:"")+" "+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"migrated",{name:"lang",hash:{},data:r}))+"</span>\r\n </div>\r\n</div>\r\n"},8:function(e,t,n,i,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"show",{name:"lang",hash:{},data:r}))},10:function(e,t,n,i,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"hide",{name:"lang",hash:{},data:r}))},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{};return'<div class="col-8">\r\n'+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.goBack:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:"")+' <h4 class="'+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.header:o,t))+' py-2">\r\n'+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.searchTerm:o,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.program(5,r,0),data:r}))?o:"")+" </h4>\r\n</div>\r\n\r\n"+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.showMigrationToggle:o,{name:"if",hash:{},fn:e.program(7,r,0),inverse:e.noop,data:r}))?o:"")},useData:!0})},1484:function(e,t,n){"use strict";n.r(t);var i=n(2),r=n(3),o=n(51),a=n(93),s=n(1422),l=n.n(s),c=n(1423),u=n.n(c),d=n(1424),h=n.n(d),f=n(9),g=n(1101),p=n(1131),v=n(1),y=n(6),m=n(5),b=n(16),S=n(338),w=n(1425),k=n.n(w),M=n(53),I=n(120),T=n(0);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 O(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function R(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,i=V(e);if(t){var r=V(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return A(this,n)}}function A(e,t){if(t&&("object"===C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(o,e);var t,n,i,r=R(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,e)}return t=o,(n=[{key:"initialize",value:function(){this.localOptionsService=m.a.getInstance(T.x.LocalOptions,this),this.migrationVideoDataService=m.a.getInstance(T.g.MigrationVideo,this);var e=this.localOptionsService.getOption(M.b.MigratedHidden);v.isUndefined(e)?(this.setMigrationHiddenOption(!1),this.migratedHidden=!1):this.migratedHidden=e}},{key:"name",get:function(){return"CurrentSectionHeaderView"}},{key:"title",get:function(){return!1}},{key:"lang",get:function(){return"migrationWizard.currentSectionHeader"}},{key:"className",get:function(){return"row px-2 ".concat(S.currentHeader)}},{key:"template",get:function(){return k.a}},{key:"elements",get:function(){return{toggleMigrated:".toggle-migrated"}}},{key:"events",value:function(){return{"click @ui.toggleMigrated":"toggleMigrated"}}},{key:"viewOptions",value:function(){return{styles:S,name:this.options.searchTerm||this.model&&this.model.get("name"),hidden:this.migratedHidden,svg:b.a.getSvg(this.migratedHidden?b.b.VisibleOn:b.b.VisibleOff),goBack:this.options.searchTerm,showMigrationToggle:!this.options.initialMigration,backSvg:b.a.getSvg("arrow-left",{prefix:"fas"}),searchTerm:this.options.searchTerm,results:10}}},{key:"appLinks",get:function(){return{".applink-goback":{application:I.a.MIGRATION_WIZARD,action:this.options.initialMigration?T.a.MigrationWizard.SMART:T.a.MigrationWizard.HOME}}}},{key:"onBeforeRender",value:function(){var e=this;return!(!this.model&&!this.options.searchTerm&&(this.migrationVideoDataService.getSelected((function(t){t&&(e.model=t,e.triggerToggle(),e.render())})),!this.model))}},{key:"toggleMigrated",value:function(){this.migratedHidden=!this.migratedHidden,this.setMigrationHiddenOption(this.migratedHidden),this.triggerToggle(),this.render()}},{key:"triggerToggle",value:function(){y.Radio.channel(I.b.MIGRATION).trigger(T.i.MigrationWizard.TOGGLE_MIGRATED,this.migratedHidden)}},{key:"setMigrationHiddenOption",value:function(e){this.localOptionsService.setOption(M.b.MigratedHidden,e)}}])&&O(t.prototype,n),i&&O(t,i),Object.defineProperty(t,"prototype",{writable:!1}),o}(i.a.View);function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var P={getSelectedInFolder:function(e,t){var n,i=x(p.a.getSelectedVideosCollection(e).toArray());try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.get("category")===t)return r.get("count")}}catch(e){i.e(e)}finally{i.f()}return 0},findFolder:function(e,t){var n;if(e)return e.forEach((function(e){if(e.get("categoryGuid")===t)n=e;else{var i=P.findFolder(e.get("children"),t);i&&(n=i)}})),n}},L=n(58),B=n(91),D=n(30),j=n(201),H=n(1121),G=n(12),W=n(95),F=n(200),z=n(144);function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function q(e,t){return(q=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,i=K(e);if(t){var r=K(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return $(this,n)}}function $(e,t){if(t&&("object"===U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"SmartMigrationView",(function(){return Y}));var Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q(e,t)}(d,e);var t,n,s,c=J(d);function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),c.call(this,e)}return t=d,(n=[{key:"initialize",value:function(){this.viewModel=D.a.get(this.viewModelName,{bannerShown:!0},{ctor:B.e,storage:{type:a.c.LocalStorage,persistProps:["bannerShown"]}}),this.bindListeners(),this.initializeServices()}},{key:"name",get:function(){return"SmartMigrationView"}},{key:"title",get:function(){return r.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.smartMigration"}},{key:"viewModelName",get:function(){return"".concat(this.name,":viewmodel")}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"template",get:function(){return h.a}},{key:"className",get:function(){return"row no-gutters w-100 ".concat(l.a.smart)}},{key:"regions",value:function(){return{selectedBanner:{replaceElement:!0,el:".selected-banner-region"},search:{replaceElement:!0,el:".search-region",partialLoading:f.h.PublisherArchiveSearchBar},banner:{replaceElement:!0,el:".banner-region"},leftNav:{replaceElement:!0,el:".left-nav-region",partialLoading:f.h.PublisherArchiveLeftNav},header:{replaceElement:!0,el:".header-region",partialLoading:f.h.PublisherArchiveSectionHeader},videoList:{replaceElement:!0,el:".video-list-region",partialLoading:f.h.PublisherArchiveVideoList},footer:{replaceElement:!0,el:".footer-region",partialLoading:f.h.PublisherArchiveStatusBar}}}},{key:"initializeServices",value:function(){this.folderCacheService=m.a.getInstance(T.x.FolderCache,this),this.selectedVideoService=m.a.getInstance(T.x.SelectedVideo,this),this.migrationVideoDataService=m.a.getInstance(T.g.MigrationVideo,this),this.alertService=m.a.getInstance(T.x.Alerts)}},{key:"bindListeners",value:function(){this.listenTo(T.e.MIGRATION,T.i.MigrationWizard.SELECTED_CHANGED,this.setSelectedVideos),this.listenTo(T.e.MIGRATION,"manual:review:video:count:sync",this.render),this.listenTo(T.e.MIGRATION,"".concat(T.f.CUSTOMER_VIDEO,":count:sync"),this.render),this.listenTo(T.e.MIGRATION,"".concat(T.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(T.b.MIGRATION_WIZARD,T.i.MigrationWizard.CLOSE_BANNER,this.closeSelectionBanner),this.listenTo(this.channelName,"add:selected",this.addSelected),this.listenTo(this.channelName,"remove:selected",this.removeSelected),this.listenTo(this.viewModel,"change:selectedVideoCount",this.renderStatusBar)}},{key:"fetchVideos",value:function(){var e=this;!this.videos&&this.options.folderChord&&this.migrationVideoDataService.getCustomerVideos(this.options.folderChord,(function(t){e.videos||(e.videos=p.a.toggleMigrated(t,!0),e.setSelectedVideos(),e.isRendering||e.render())}))}},{key:"fetchFolders",value:function(){var e=this;this.folders||this.migrationVideoDataService.getCustomerFolders((function(t){if(!e.folders){if(e.folders=t,e.options.folderChord){var n=e.folderCacheService.getFolderByChord(e.options.folderChord,t);G.f.setSelected(W.a.MIGRATION_WIZARD,n,e.folders),e.selectedFolder=G.f.getSelected(W.a.MIGRATION_WIZARD,t)}else{var r=e.folders.first();if(r)return void i.a.AppLinkHelper.trigger({application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.HOME,params:{folder:r.get("chord")}},{replace:!0})}e.isRendering||e.render()}}))}},{key:"setFolderText",value:function(e,t){var n=this,i=e.get("chord"),r=e.get("name"),o=this.folderCacheService.getFolderCache(),a=this.options.folderChord;if(a){var s,l=P.getSelectedInFolder(t,r);if(i===a){var c=this.migrationVideoDataService.getCustomerVideos(i);if(!this.selectedFolder)return;c&&(o[a]=c.length),s=o[a]}o[i]&&(s=o[i]),l&&s?e.set("text","".concat(r," (").concat(l,"/").concat(s,")")):e.set("text",r),e.children.forEach((function(e){return n.setFolderText(e,t)}))}else e.set("text",r)}},{key:"closeSelectionBanner",value:function(){var e=this.getRegion("selectedBanner");e&&(this.viewModel.set("bannerShown",!1),e.destroy())}},{key:"setSelectedVideos",value:function(){var e=this,t=this.selectedVideoService.getSelectedVideoIds();this.videos&&this.videos.forEach((function(n){return p.a.setChecked(n,t,e.isInitialMigration())})),t&&this.viewModel.set("selectedVideoCount",t.length)}},{key:"addSelected",value:function(e,t){this.selectedVideoService.addSelectedVideos(e,t)}},{key:"removeSelected",value:function(e,t){this.selectedVideoService.removeSelectedVideos(e,t)}},{key:"isInitialMigration",value:function(){return L.a.isInitialMigration(this.customerMetadata)}},{key:"onClickBack",value:function(){var e=this;new G.d({title:r.a.getPhrase(this.lang,"backHeading"),text:r.a.getPhrase(this.lang,"backBody"),buttons:[{text:r.a.getPhrase(this.lang,"discard"),className:"btn btn-danger",success:!0},{text:r.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}]}).render().done((function(){e.selectedVideoService.removeAllSelectedVideos(),e.viewModel.set("alertShown",!1),i.a.AppLinkHelper.trigger({application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.START_MIGRATION})}))}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".".concat(l.a.leftNav)),t=e.find(".".concat(u.a.selected));if(t.length&&!(t.offset().top-e.offset().top+t.height()<e.height())){var n=e.scrollTop()+(t.offset().top-e.offset().top),i=.5*e.height()+.5*t.height();e.scrollTop(n-i)}}},{key:"renderEmptyMessage",value:function(){this.showChildView("videoList",new H.b({text:"No folder selected"}))}},{key:"renderSelectedBanner",value:function(){if(this.isInitialMigration()&&!this.viewModel.get("alertShown")){this.viewModel.set("alertShown",!0);var e={heading:r.a.getPhrase(this.lang,"smartSelected"),message:r.a.getPhrase(this.lang,"last3Years"),type:o.a.Success};this.alertService.createAlert(e)}}},{key:"renderLeftNav",value:function(){var e=this,t=new g.a({styles:u.a,appLink:{action:T.a.MigrationWizard.HOME,application:T.b.MIGRATION_WIZARD},linkParams:function(e){return{folder:e.get("chord")}},collection:this.folders,channelName:"".concat(this.cid),childrenProperty:"children",textProperty:"name",extraClass:"p-0",folderTreeId:W.a.MIGRATION_WIZARD});this.showChildView("leftNav",t),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){e.centerSelectedItem()}))}))}},{key:"renderSearchBar",value:function(){this.showChildView("search",new H.h({selected:this.errorCount.get("count")?"publisher-archive":"none"}))}},{key:"renderStatusBar",value:function(){var e=this;if(this.videoCount){var t={application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.SELECTED,args:[this.options.folderChord]},n=this.videoCount.get("successCount"),i=this.selectedVideoService.getNumberSelected(),o=new H.k({nextAppLink:t,showSelected:!0,nextDisabled:0===i,showBackButton:this.isInitialMigration(),text:this.isInitialMigration()?r.a.getPhrase(this.lang,"next"):r.a.getPhrase(this.lang,"addToLibrary"),numberSelected:i,numberAvailable:n,onClickBack:function(){return e.onClickBack()}});this.showChildView("footer",o)}}},{key:"renderVideoList",value:function(){var e=this.options,t=e.folderChord,n=e.searchTerm;if(this.videos||!t&&!n)if(this.selectedFolder){this.showChildView("videoList",new H.l({model:this.selectedFolder,initialMigration:this.isInitialMigration(),folderChord:t,searchTerm:n,collection:this.videos,channelName:this.channelName,supportSiteUrl:this.config.get("supportSiteUrl")}));var i=n||t;G.a.GetViewModel(i,F.CheckboxTypes.MIGRATION_VIDEO_LIST).trigger("change")}else this.renderEmptyMessage();else this.renderPartialLoading("videoList")}},{key:"renderCurrentSection",value:function(){this.showChildView("header",new _({searchTerm:this.options.searchTerm,initialMigration:this.isInitialMigration()}))}},{key:"renderBanner",value:function(){this.isInitialMigration()&&this.showChildView("banner",new H.a({config:this.config,currentUser:this.currentUser}))}},{key:"requiredResources",get:function(){return{config:j.b.config,currentUser:z.b.currentUser}}},{key:"onBeforeRender",value:function(){this.isRendering=!0,this.fetchVideos(),this.fetchFolders(),this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),this.errorCount=this.migrationVideoDataService.getManualReviewVideoCount(),this.videoCount=this.migrationVideoDataService.getCustomerVideoCountCached();var e=!!(this.customerMetadata&&this.folders&&this.videoCount&&this.errorCount);return e||(this.isRendering=!1),e}},{key:"viewOptions",value:function(){return{styles:l.a}}},{key:"onRender",value:function(){if(this.renderSelectedBanner(),this.renderLeftNav(),this.renderSearchBar(),this.renderStatusBar(),this.renderBanner(),!this.videos)return this.renderPartialLoading("header"),this.renderPartialLoading("videoList"),void(this.isRendering=!1);this.options.folderChord||this.options.searchTerm?(this.renderVideoList(),this.renderCurrentSection()):this.renderEmptyMessage(),this.isRendering=!1}}])&&Z(t.prototype,n),s&&Z(t,s),Object.defineProperty(t,"prototype",{writable:!1}),d}(i.a.View)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[43],{1042:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),o=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf: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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(c,e);var t,n,r,i=u(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&l(t.prototype,n),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Model)},1056:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(1),o=n(2),i=n(312);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(c,e);var t,n,o,a=u(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,(n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.a}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return r.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,r=e.extraClasses,o="dropdown-menu-".concat(n);return r&&(o="".concat(o," ").concat(r)),o}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}])&&l(t.prototype,n),o&&l(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a.ComponentCollection)},1351:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.foundLibraries:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasAvailableLibraries:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.showNoFolderText:i,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?i:"")},2:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return' <div class="alert alert-info" role="alert">\r\n <p class="m-0">'+(null!=(i=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"foundLibraries",{name:"lang",hash:{libraries:null!=(i=null!=t?t.options:t)?i.foundLibraries:i},data:o}))?i:"")+"</p>\r\n </div>\r\n"},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return' <span class="d-block pb-2">'+s((n.lang||t&&t.lang||l).call(a,"selectFolder",{name:"lang",hash:{},data:o}))+"</span>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasMultipleLibraries:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+' <div class="mt-1 mb-2 library-dropdown-region"></div>\r\n\r\n <span class="'+s(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.header:i,t))+' folder-name">'+s((n.lang||t&&t.lang||l).call(a,"folder",{name:"lang",hash:{},data:o}))+'</span>\r\n <div class="'+s(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.folderSelector:i,t))+' mt-1 folder-selector-region"></div>\r\n'},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.escapeExpression;return' <span class="'+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.header:i,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"library",{name:"lang",hash:{},data:o}))+"</span>\r\n"},7:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing;return" <p>"+e.escapeExpression((n.lang||t&&t.lang||l).call(a,"noFolders1",{name:"lang",hash:{},data:o}))+"</p>\r\n <p>"+(null!=(i=(n.lang||t&&t.lang||l).call(a,"noFolders2",{name:"lang",hash:{},data:o}))?i:"")+"</p>\r\n"},9:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(9,o,0),data:o}))?i:""},useData:!0})},1352:function(e,t,n){e.exports={header:"_1tdTv"}},1454:function(e,t,n){"use strict";n.r(t),n.d(t,"AddToLibraryView",(function(){return j}));var r=n(1),o=n(2),i=n(5),a=n(265),l=n(1061),s=n(305),u=n(9),c=n(62),f=n(1042),d=n(13),p=n(0),h=n(3),y=n(146),b=n(1122),m=n(1351),g=n.n(m),v=n(1352),w=n.n(v);function k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C(e);if(t){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T(this,n)}}function T(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(v,e);var t,n,o,m=S(v);function v(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),m.call(this,e)}return t=v,(n=[{key:"initialize",value:function(){this.videoDataService=i.a.getInstance(p.g.Video,this),this.bindListeners()}},{key:"name",get:function(){return"AddToLibraryView"}},{key:"title",get:function(){return h.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.addToLibrary"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"appLinks",get:function(){return{".library-editor-applink":{application:p.b.LIBRARY_EDITOR,action:p.a.LibraryEditor.HOME}}}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"libraryTreeKey",get:function(){return"libraryselect:".concat(this.cid)}},{key:"channelName",get:function(){return d.k.generateUniqueChannelName(this)}},{key:"template",get:function(){return g.a}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.e,title:h.a.getPhrase(this.lang,"submitTooltip"),size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new f.a,buttonText:h.a.getPhrase(this.lang,"addBtn"),tooltip:function(){return e.getSubmitBtnTooltipOptions()},onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{libraryDropdown:".library-dropdown-region",folderSelector:".folder-selector-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"elements",get:function(){return{folderName:".folder-name"}}},{key:"bindListeners",value:function(){this.listenTo("".concat(this.channelName,":library"),"library:selected",this.onLibrarySelected),this.listenTo("".concat(this.channelName,":folder"),"folder:selected",this.onFolderSelected),this.listenTo(p.e.VIDEO,"".concat(p.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.e.VIDEO,"get:video:categories:libraries:".concat(this.options.videoId,":sync"),this.render)}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.spinnerModel.set(a.c.ShowSpinner,!0),this.addToLibrary()}},{key:"onLibrarySelected",value:function(e){this.spinnerModel.set(a.c.Disabled,!0),d.f.setSelected(this.libraryTreeKey,e.get("id"),this.customLibraries),this.renderFolderSelector()}},{key:"onFolderSelected",value:function(e){this.spinnerModel.set(a.c.Disabled,!1),d.f.setSelected(this.folderTreeKey,e,this.customLibraries)}},{key:"getVideosCustomLibraryNames",value:function(){if(!this.dataFetched())return null;var e=this.getVideoCustomLibraries();if(!e.length)return null;var t=r.map(e,(function(e){return"<strong>".concat(d.w.escapeExpression(e),"</strong>")}));if(1===t.length)return t[0];var n=h.a.getPhrase(this.lang,"and");return"".concat(t.slice(0,-1).join(", ")," ").concat(n," ").concat(t.slice(-1))}},{key:"addToLibrary",value:function(){var e,t,n=this,o=d.f.getSelected(this.folderTreeKey,this.customLibraries),i=o.get("id"),a=d.f.getSelected(this.libraryTreeKey,this.customLibraries).get("id"),l=this.model.libraries.filter((function(e){return e.get("type")===c.a.HostedLibrary})),s=this.model.categories;s&&s.last()&&(e=s.last().get("id")),l&&l.length&&(t=r.last(l).get("id"));var f={masterObjectId:this.options.videoId,masterObjectType:u.g.Video,metadata:{sourceLibraryId:t,sourceCategoryId:e,destinationLibraryId:a,destinationCategoryId:i}};this.videoDataService.addVideoToCustomLibrary(f,this.model,o,(function(){n.triggerMethod("hide")}))}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.spinnerModel.get(a.c.Disabled)&&this.hasAvailableLibraries())return{title:h.a.getPhrase(this.lang,"heading")}}},{key:"getAvailableCustomLibraries",value:function(){if(!this.dataFetched())return null;var e=this.customLibraries.clone();e.remove(this.model.libraries.filter((function(e){return e.get("type")===c.a.CustomLibrary})));var t=e.filter((function(e){return 0===e.children.length}));return e.remove(t),e}},{key:"hasAvailableLibraries",value:function(){if(!this.customLibraries)return!1;var e=this.getAvailableCustomLibraries();return e&&e.length>0}},{key:"hasFolders",value:function(){return!!this.customLibraries&&!!this.customLibraries.find((function(e){return!!e.get("children").length}))}},{key:"getVideoCustomLibraries",value:function(){if(!this.model||!this.model.libraries||!this.model.libraries.length)return null;var e=this.model.libraries.filter((function(e){return e.get("type")===c.a.CustomLibrary}));return r.map(e,(function(e){return e.get("name")}))}},{key:"dataFetched",value:function(){return!!this.model}},{key:"renderLibraryDropdown",value:function(){if(this.customLibraries.length<=1)this.renderFolderSelector();else{var e=d.f.getSelected(this.libraryTreeKey,this.customLibraries),t=this.getUI("folderName");this.$(t).hide(),this.showChildView("libraryDropdown",new b.a({currentLibraryId:e?e.get("id"):null,collection:this.getAvailableCustomLibraries(),channelName:"".concat(this.channelName,":library")}))}}},{key:"renderFolderSelector",value:function(){var e=this.getAvailableCustomLibraries();1===e.length&&d.f.setSelected(this.libraryTreeKey,e.first().get("id"),e);var t=d.f.getSelected(this.libraryTreeKey,e),n=t.get("children")&&!!t.get("children").length,r=this.getUI("folderName");t&&n&&this.$(r).show(),this.showChildView("folderSelector",new l.a({collection:t.children,channelName:"".concat(this.channelName,":folder"),folderTreeKey:this.folderTreeKey}))}},{key:"requiredResources",get:function(){return{customLibraries:y.b.libraries}}},{key:"onBeforeRender",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId)}},{key:"viewOptions",value:function(){var e;return{styles:w.a,foundLibraries:this.getVideosCustomLibraryNames(),hasAvailableLibraries:this.hasAvailableLibraries(),hasMultipleLibraries:(null===(e=this.customLibraries)||void 0===e?void 0:e.length)>1,dataFetched:this.dataFetched(),spinnerEl:d.r.getSpinner({size:d.s.Large,extraClasses:"mx-auto"}),showNoFolderText:!this.hasFolders()}}},{key:"onRender",value:function(){this.dataFetched()&&this.hasAvailableLibraries()&&this.renderLibraryDropdown()}}])&&L(t.prototype,n),o&&L(t,o),Object.defineProperty(t,"prototype",{writable:!1}),v}(o.a.View)}}]);
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[43],{1043:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),o=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf: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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(c,e);var t,n,r,i=u(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&l(t.prototype,n),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Model)},1057:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(1),o=n(2),i=n(312);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(c,e);var t,n,o,a=u(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,(n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.a}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return r.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,r=e.extraClasses,o="dropdown-menu-".concat(n);return r&&(o="".concat(o," ").concat(r)),o}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}])&&l(t.prototype,n),o&&l(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a.ComponentCollection)},1352:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.foundLibraries:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasAvailableLibraries:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.showNoFolderText:i,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?i:"")},2:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return' <div class="alert alert-info" role="alert">\r\n <p class="m-0">'+(null!=(i=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"foundLibraries",{name:"lang",hash:{libraries:null!=(i=null!=t?t.options:t)?i.foundLibraries:i},data:o}))?i:"")+"</p>\r\n </div>\r\n"},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return' <span class="d-block pb-2">'+s((n.lang||t&&t.lang||l).call(a,"selectFolder",{name:"lang",hash:{},data:o}))+"</span>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasMultipleLibraries:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+' <div class="mt-1 mb-2 library-dropdown-region"></div>\r\n\r\n <span class="'+s(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.header:i,t))+' folder-name">'+s((n.lang||t&&t.lang||l).call(a,"folder",{name:"lang",hash:{},data:o}))+'</span>\r\n <div class="'+s(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.folderSelector:i,t))+' mt-1 folder-selector-region"></div>\r\n'},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.escapeExpression;return' <span class="'+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.header:i,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"library",{name:"lang",hash:{},data:o}))+"</span>\r\n"},7:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing;return" <p>"+e.escapeExpression((n.lang||t&&t.lang||l).call(a,"noFolders1",{name:"lang",hash:{},data:o}))+"</p>\r\n <p>"+(null!=(i=(n.lang||t&&t.lang||l).call(a,"noFolders2",{name:"lang",hash:{},data:o}))?i:"")+"</p>\r\n"},9:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(9,o,0),data:o}))?i:""},useData:!0})},1353:function(e,t,n){e.exports={header:"_1tdTv"}},1455:function(e,t,n){"use strict";n.r(t),n.d(t,"AddToLibraryView",(function(){return j}));var r=n(1),o=n(2),i=n(5),a=n(265),l=n(1062),s=n(305),u=n(9),c=n(62),f=n(1043),d=n(12),p=n(0),h=n(3),y=n(146),b=n(1123),m=n(1352),g=n.n(m),v=n(1353),w=n.n(v);function k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function L(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C(e);if(t){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T(this,n)}}function T(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(v,e);var t,n,o,m=S(v);function v(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),m.call(this,e)}return t=v,(n=[{key:"initialize",value:function(){this.videoDataService=i.a.getInstance(p.g.Video,this),this.bindListeners()}},{key:"name",get:function(){return"AddToLibraryView"}},{key:"title",get:function(){return h.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.addToLibrary"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"appLinks",get:function(){return{".library-editor-applink":{application:p.b.LIBRARY_EDITOR,action:p.a.LibraryEditor.HOME}}}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"libraryTreeKey",get:function(){return"libraryselect:".concat(this.cid)}},{key:"channelName",get:function(){return d.k.generateUniqueChannelName(this)}},{key:"template",get:function(){return g.a}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.e,title:h.a.getPhrase(this.lang,"submitTooltip"),size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new f.a,buttonText:h.a.getPhrase(this.lang,"addBtn"),tooltip:function(){return e.getSubmitBtnTooltipOptions()},onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{libraryDropdown:".library-dropdown-region",folderSelector:".folder-selector-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"elements",get:function(){return{folderName:".folder-name"}}},{key:"bindListeners",value:function(){this.listenTo("".concat(this.channelName,":library"),"library:selected",this.onLibrarySelected),this.listenTo("".concat(this.channelName,":folder"),"folder:selected",this.onFolderSelected),this.listenTo(p.e.VIDEO,"".concat(p.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.e.VIDEO,"get:video:categories:libraries:".concat(this.options.videoId,":sync"),this.render)}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.spinnerModel.set(a.c.ShowSpinner,!0),this.addToLibrary()}},{key:"onLibrarySelected",value:function(e){this.spinnerModel.set(a.c.Disabled,!0),d.f.setSelected(this.libraryTreeKey,e.get("id"),this.customLibraries),this.renderFolderSelector()}},{key:"onFolderSelected",value:function(e){this.spinnerModel.set(a.c.Disabled,!1),d.f.setSelected(this.folderTreeKey,e,this.customLibraries)}},{key:"getVideosCustomLibraryNames",value:function(){if(!this.dataFetched())return null;var e=this.getVideoCustomLibraries();if(!e.length)return null;var t=r.map(e,(function(e){return"<strong>".concat(d.w.escapeExpression(e),"</strong>")}));if(1===t.length)return t[0];var n=h.a.getPhrase(this.lang,"and");return"".concat(t.slice(0,-1).join(", ")," ").concat(n," ").concat(t.slice(-1))}},{key:"addToLibrary",value:function(){var e,t,n=this,o=d.f.getSelected(this.folderTreeKey,this.customLibraries),i=o.get("id"),a=d.f.getSelected(this.libraryTreeKey,this.customLibraries).get("id"),l=this.model.libraries.filter((function(e){return e.get("type")===c.a.HostedLibrary})),s=this.model.categories;s&&s.last()&&(e=s.last().get("id")),l&&l.length&&(t=r.last(l).get("id"));var f={masterObjectId:this.options.videoId,masterObjectType:u.g.Video,metadata:{sourceLibraryId:t,sourceCategoryId:e,destinationLibraryId:a,destinationCategoryId:i}};this.videoDataService.addVideoToCustomLibrary(f,this.model,o,(function(){n.triggerMethod("hide")}))}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.spinnerModel.get(a.c.Disabled)&&this.hasAvailableLibraries())return{title:h.a.getPhrase(this.lang,"heading")}}},{key:"getAvailableCustomLibraries",value:function(){if(!this.dataFetched())return null;var e=this.customLibraries.clone();e.remove(this.model.libraries.filter((function(e){return e.get("type")===c.a.CustomLibrary})));var t=e.filter((function(e){return 0===e.children.length}));return e.remove(t),e}},{key:"hasAvailableLibraries",value:function(){if(!this.customLibraries)return!1;var e=this.getAvailableCustomLibraries();return e&&e.length>0}},{key:"hasFolders",value:function(){return!!this.customLibraries&&!!this.customLibraries.find((function(e){return!!e.get("children").length}))}},{key:"getVideoCustomLibraries",value:function(){if(!this.model||!this.model.libraries||!this.model.libraries.length)return null;var e=this.model.libraries.filter((function(e){return e.get("type")===c.a.CustomLibrary}));return r.map(e,(function(e){return e.get("name")}))}},{key:"dataFetched",value:function(){return!!this.model}},{key:"renderLibraryDropdown",value:function(){if(this.customLibraries.length<=1)this.renderFolderSelector();else{var e=d.f.getSelected(this.libraryTreeKey,this.customLibraries),t=this.getUI("folderName");this.$(t).hide(),this.showChildView("libraryDropdown",new b.a({currentLibraryId:e?e.get("id"):null,collection:this.getAvailableCustomLibraries(),channelName:"".concat(this.channelName,":library")}))}}},{key:"renderFolderSelector",value:function(){var e=this.getAvailableCustomLibraries();1===e.length&&d.f.setSelected(this.libraryTreeKey,e.first().get("id"),e);var t=d.f.getSelected(this.libraryTreeKey,e),n=t.get("children")&&!!t.get("children").length,r=this.getUI("folderName");t&&n&&this.$(r).show(),this.showChildView("folderSelector",new l.a({collection:t.children,channelName:"".concat(this.channelName,":folder"),folderTreeKey:this.folderTreeKey}))}},{key:"requiredResources",get:function(){return{customLibraries:y.b.libraries}}},{key:"onBeforeRender",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId)}},{key:"viewOptions",value:function(){var e;return{styles:w.a,foundLibraries:this.getVideosCustomLibraryNames(),hasAvailableLibraries:this.hasAvailableLibraries(),hasMultipleLibraries:(null===(e=this.customLibraries)||void 0===e?void 0:e.length)>1,dataFetched:this.dataFetched(),spinnerEl:d.r.getSpinner({size:d.s.Large,extraClasses:"mx-auto"}),showNoFolderText:!this.hasFolders()}}},{key:"onRender",value:function(){this.dataFetched()&&this.hasAvailableLibraries()&&this.renderLibraryDropdown()}}])&&L(t.prototype,n),o&&L(t,o),Object.defineProperty(t,"prototype",{writable:!1}),v}(o.a.View)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[44],{1042:function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var r=n(2),o=n(265);function i(t){return(i="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 a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(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,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(s,t);var e,n,r,i=l(s);function s(){return a(this,s),i.apply(this,arguments)}return e=s,(n=[{key:"defaults",value:function(){return t={},e=o.c.Disabled,n=!0,e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}}])&&u(e.prototype,n),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),s}(r.a.Model)},1098:function(t,e,n){"use strict";var r=n(204),o=n(1),i=n(202),a=n(0),u=n(145),c=n(307);function l(t){return(l="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 s(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t,e){return(y=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,r=h(t);if(e){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var g=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(l,t);var e,n,r,i=b(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=i.call(this,{collectionPrefix:"".concat(a.f.RECENT_VIDEOS,":collection"),cursor:t.cursor,sort:t.sort})).setAdditionalData(t),e}return e=l,(n=[{key:"setAdditionalData",value:function(t){var e=t.libraryIds,n=t.dateQueryString,r=t.subjects;e&&(this.libraryIds=e),r&&(o.isArray(r)&&r.length&&(this.subjects=r),o.isArray(r)||(this.subjects=[r]));var i=o.findWhere(c.g,{queryString:n})||c.e;this.dateOption=new u.b(i)}},{key:"toString",value:function(){var t=this.subjects&&this.subjects.length&&this.subjects.map((function(t){return escape(t.get("name"))}))||[];return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].concat(s(t),[this.cursor]).filter(Boolean).join(":")}},{key:"toParams",value:function(){var t={};return this.libraryIds&&(t.libraryIds=this.libraryIds),this.dateOption&&(t.from=this.dateOption.get("from"),t.to=this.dateOption.get("to")),this.subjects&&(t.subjectIds=o.flatten(this.subjects.map((function(t){return t.get("subjectIds")})))),this.cursor&&(t.cursor=this.cursor),t}}])&&p(e.prototype,n),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),l}(i.a);function v(t){return(v="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 m(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function j(t,e){return(j=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function O(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,r=S(t);if(e){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(t,e){if(e&&("object"===v(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var P=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&j(t,e)}(l,t);var e,n,r,i=O(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=i.call(this,{collectionPrefix:"".concat(a.f.RECENT_SUBJECTS,":collection"),sort:t.sort})).setAdditionalData(t),e}return e=l,(n=[{key:"setAdditionalData",value:function(t){var e=t.libraryIds,n=t.dateQueryString;e&&(this.libraryIds=e);var r=o.findWhere(c.g,{queryString:n})||c.e;this.dateOption=new u.b(r)}},{key:"toString",value:function(){return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].filter(Boolean).join(":")}},{key:"toParams",value:function(){var t={};return this.libraryIds&&(t.libraryIds=this.libraryIds),this.dateOption&&(t.from=this.dateOption.get("from"),t.to=this.dateOption.get("to")),t}}])&&m(e.prototype,n),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),l}(i.a);function I(t){return(I="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 r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function k(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C(t,e){return(C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function R(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,r=x(t);if(e){var o=x(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}function E(t,e){if(e&&("object"===I(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function x(t){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&C(t,e)}(i,t);var e,n,r,o=R(i);function i(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return k(this,i),o.call(this,{collectionPrefix:a.f.LIBRARY_FOLDERS,id:t,sort:e,cursor:n})}return e=i,n&&_(e.prototype,n),r&&_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(i.a);n.d(e,"d",(function(){return r.a})),n.d(e,"b",(function(){return g})),n.d(e,"c",(function(){return P})),n.d(e,"a",(function(){return T}))},1348:function(t,e,n){var r=n(10);t.exports=(r.default||r).template({1:function(t,e,n,r,o){var i;t.propertyIsEnumerable;return(null!=(i=t.lambda(null!=(i=null!=e?e.options:e)?i.spinnerEl:i,e))?i:"")+"\r\n"},3:function(t,e,n,r,o){t.propertyIsEnumerable;var i,a=t.lambda,u=t.escapeExpression,c=null!=e?e:t.nullContext||{},l=t.hooks.helperMissing;return'<div class="pb-3 text-center">\r\n <img src="'+u(a(null!=(i=null!=e?e.options:e)?i.imageUrl:i,e))+'" class="'+u(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.image:i,e))+'" />\r\n</div>\r\n<p class="m-0">\r\n '+(null!=(i=(n.lang||e&&e.lang||l).call(c,"body1",{name:"lang",hash:{},data:o}))?i:"")+"\r\n "+(null!=(i=n.if.call(c,null!=(i=null!=e?e.options:e)?i.libraryText:i,{name:"if",hash:{},fn:t.program(4,o,0),inverse:t.noop,data:o}))?i:"")+"\r\n "+(null!=(i=n.if.call(c,null!=(i=null!=e?e.options:e)?i.subject:i,{name:"if",hash:{},fn:t.program(6,o,0),inverse:t.noop,data:o}))?i:"")+"\r\n "+(null!=(i=(n.lang||e&&e.lang||l).call(c,"body4",{name:"lang",hash:{email:null!=(i=null!=e?e.options:e)?i.email:i,to:null!=(i=null!=e?e.options:e)?i.to:i,from:null!=(i=null!=e?e.options:e)?i.from:i},data:o}))?i:"")+"\r\n</p>\r\n"},4:function(t,e,n,r,o){var i;t.propertyIsEnumerable;return null!=(i=(n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"body2",{name:"lang",hash:{libraryText:null!=(i=null!=e?e.options:e)?i.libraryText:i},data:o}))?i:""},6:function(t,e,n,r,o){var i;t.propertyIsEnumerable;return null!=(i=(n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"body3",{name:"lang",hash:{subject:null!=(i=null!=e?e.options:e)?i.subject:i},data:o}))?i:""},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){var i;t.propertyIsEnumerable;return null!=(i=n.unless.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.dataFetched:i,{name:"unless",hash:{},fn:t.program(1,o,0),inverse:t.program(3,o,0),data:o}))?i:""},useData:!0})},1349:function(t,e,n){t.exports={image:"_2AV9T"}},1452:function(t,e,n){"use strict";n.r(e),n.d(e,"GeneratePastReleasesPdfView",(function(){return R}));var r=n(1),o=n(29),i=n(2),a=n(5),u=n(3),c=n(4),l=n(42),s=n(305),f=n(1098),p=n(144),y=n(0),b=n(1042),d=n(13),h=n(307),g=n(265),v=n(145),m=n(1348),j=n.n(m),O=n(1349),w=n.n(O);function S(t){return(S="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 P(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function I(t,e){return(I=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _(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,r=C(t);if(e){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k(this,n)}}function k(t,e){if(e&&("object"===S(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function C(t){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var R=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&I(t,e)}(O,t);var e,n,i,m=_(O);function O(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,O),m.call(this,t)}return e=O,(n=[{key:"initialize",value:function(){this.libraryDataService=a.a.getInstance(y.g.Library,this),this.contentUpdatesDataService=a.a.getInstance(y.g.ContentUpdates,this),this.exportDataService=a.a.getInstance(y.g.Export,this)}},{key:"name",get:function(){return"GeneratePastReleasesPdfView"}},{key:"title",get:function(){return u.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.generatePastReleasesPdf"}},{key:"template",get:function(){return j.a}},{key:"channelName",get:function(){return d.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var t=this;return[{behaviorClass:s.e,title:u.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new b.a,channelName:this.channelName,buttonText:u.a.getPhrase(this.lang,"generateBtn"),onClick:function(){return t.onClickGeneratePdf()}}}]}},{key:"onLibrariesSync",value:function(t){var e=this;this.libraries=t,this.selectedLibraryIds=h.f.getLibraryIds(this.options.librariesQueryString,t),this.subjectCollectionIdentifier=new f.c({dateQueryString:this.options.dateQueryString,libraryIds:this.selectedLibraryIds}),this.contentUpdatesDataService.getRecentVideoSubjects(this.subjectCollectionIdentifier,(function(n){return e.onSubjectsSync(t,n)}))}},{key:"onSubjectsSync",value:function(t,e){var n=h.f.getSubjectOptions(e).map((function(t){return new v.b(t)})),o={dateQueryString:this.options.dateQueryString,libraryIds:this.selectedLibraryIds};if(!this.options.subjectQueryString)return this.videoCollectionIdentifier=new f.b(o),void this.spinnerModel.set(g.c.Disabled,!1);var i=this.getSubjectIds();this.videoCollectionIdentifier=new f.b(r.extend(o,{subjects:n.filter((function(t){return!!r.intersection(i,t.get("subjectIds")).length}))})),this.spinnerModel.set(g.c.Disabled,!1)}},{key:"getSubjectIds",value:function(){if(this.options.subjectQueryString)return this.options.subjectQueryString.split("-")[1].split(",")}},{key:"getLibrariesText",value:function(){var t=this;if(this.libraries.length!==this.selectedLibraryIds.length){var e=this.libraries.filter((function(e){return r.contains(t.selectedLibraryIds,e.id.toString())})),n=e.map((function(t){return"<strong>".concat(d.w.escapeExpression(t.get("name")),"</strong>")}));return e.length<=2?n.join(" ".concat(u.a.getPhrase(this.lang,"and")," ")):r.first(n,n.length-1).join(", ")+" ".concat(u.a.getPhrase(this.lang,"and")," ").concat(r.last(n))}}},{key:"getFormattedDate",value:function(t){if(t)return o(t).format("DD MMMM YYYY")}},{key:"getFormattedSubjects",value:function(){if(this.videoCollectionIdentifier.subjects){var t=this.videoCollectionIdentifier.subjects.map((function(t){return t.get("name")}));return 1===t.length?t[0]:t.slice(0,-1).join(", ")+" ".concat(u.a.getPhrase(this.lang,"and")," ")+t.slice(-1)}}},{key:"onClickGeneratePdf",value:function(){this.spinnerModel.set(g.c.ShowSpinner,!0),this.fetchVideosAndGeneratePdf()}},{key:"fetchVideosAndGeneratePdf",value:function(){var t=this;this.contentUpdatesDataService.getRecentVideosAllPages(this.videoCollectionIdentifier,(function(e){e&&e.length?t.generatePdf(e.map((function(t){return t.id.toString()}))):t.triggerMethod("hide")}))}},{key:"generatePdf",value:function(t){var e=this,n=this.videoCollectionIdentifier.subjects?this.getFormattedSubjects():u.a.getPhrase(this.lang,"latestReleases"),r=o(this.videoCollectionIdentifier.dateOption.get("from")).format("MMMM YYYY"),i=o(this.videoCollectionIdentifier.dateOption.get("to")).format("MMMM YYYY"),a=r===i?u.a.getPhrase(this.lang,"fromContentUpdate",{from:r}):u.a.getPhrase(this.lang,"fromToContentUpdates",{from:r,to:i});this.exportDataService.generateCustomListPdf(n,a,t,this.currentUser,(function(){return e.triggerMethod("hide")})),this.logAction(t.length)}},{key:"logAction",value:function(t){var e={location:c.LocationContext.Popup,actionType:c.UserAction.Create,entity:c.EntityType.PDF,workflowPhase:c.WorkflowPhase.Complete},n={videoCount:t,libraries:this.selectedLibraryIds.join(","),releaseDate:this.videoCollectionIdentifier.dateOption.get("name"),subjects:this.options.subjectQueryString?this.videoCollectionIdentifier.subjects.map((function(t){return t.get("name")})).join(","):""};l.a.logUserAction(n,e)}},{key:"requiredResources",get:function(){return{currentUser:p.b.currentUser}}},{key:"onBeforeRender",value:function(){var t=this;this.libraries||this.libraryDataService.getHostedLibraries((function(e){return t.onLibrariesSync(e)}))}},{key:"viewOptions",value:function(){return{styles:w.a,dataFetched:!!this.libraries,spinnerEl:d.r.getSpinner({size:d.s.Large,extraClasses:"mx-auto"}),email:this.currentUser.get("email"),imageUrl:y.l.Shared.GeneratePdf,libraryText:this.getLibrariesText(),subject:this.getFormattedSubjects(),from:this.videoCollectionIdentifier&&this.getFormattedDate(this.videoCollectionIdentifier.dateOption.get("from")),to:this.videoCollectionIdentifier&&this.getFormattedDate(this.videoCollectionIdentifier.dateOption.get("to"))}}}])&&P(e.prototype,n),i&&P(e,i),Object.defineProperty(e,"prototype",{writable:!1}),O}(i.a.View)}}]);
|
|
1
|
+
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[44],{1043:function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var r=n(2),o=n(265);function i(t){return(i="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 a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(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,r=f(t);if(e){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return s(this,n)}}function s(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&c(t,e)}(s,t);var e,n,r,i=l(s);function s(){return a(this,s),i.apply(this,arguments)}return e=s,(n=[{key:"defaults",value:function(){return t={},e=o.c.Disabled,n=!0,e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t;var t,e,n}}])&&u(e.prototype,n),r&&u(e,r),Object.defineProperty(e,"prototype",{writable:!1}),s}(r.a.Model)},1099:function(t,e,n){"use strict";var r=n(204),o=n(1),i=n(202),a=n(0),u=n(145),c=n(307);function l(t){return(l="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 s(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function p(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function y(t,e){return(y=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,r=h(t);if(e){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return d(this,n)}}function d(t,e){if(e&&("object"===l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var g=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(l,t);var e,n,r,i=b(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=i.call(this,{collectionPrefix:"".concat(a.f.RECENT_VIDEOS,":collection"),cursor:t.cursor,sort:t.sort})).setAdditionalData(t),e}return e=l,(n=[{key:"setAdditionalData",value:function(t){var e=t.libraryIds,n=t.dateQueryString,r=t.subjects;e&&(this.libraryIds=e),r&&(o.isArray(r)&&r.length&&(this.subjects=r),o.isArray(r)||(this.subjects=[r]));var i=o.findWhere(c.g,{queryString:n})||c.e;this.dateOption=new u.b(i)}},{key:"toString",value:function(){var t=this.subjects&&this.subjects.length&&this.subjects.map((function(t){return escape(t.get("name"))}))||[];return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].concat(s(t),[this.cursor]).filter(Boolean).join(":")}},{key:"toParams",value:function(){var t={};return this.libraryIds&&(t.libraryIds=this.libraryIds),this.dateOption&&(t.from=this.dateOption.get("from"),t.to=this.dateOption.get("to")),this.subjects&&(t.subjectIds=o.flatten(this.subjects.map((function(t){return t.get("subjectIds")})))),this.cursor&&(t.cursor=this.cursor),t}}])&&p(e.prototype,n),r&&p(e,r),Object.defineProperty(e,"prototype",{writable:!1}),l}(i.a);function v(t){return(v="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 m(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function j(t,e){return(j=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function O(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,r=S(t);if(e){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return w(this,n)}}function w(t,e){if(e&&("object"===v(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function S(t){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var P=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&j(t,e)}(l,t);var e,n,r,i=O(l);function l(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),(e=i.call(this,{collectionPrefix:"".concat(a.f.RECENT_SUBJECTS,":collection"),sort:t.sort})).setAdditionalData(t),e}return e=l,(n=[{key:"setAdditionalData",value:function(t){var e=t.libraryIds,n=t.dateQueryString;e&&(this.libraryIds=e);var r=o.findWhere(c.g,{queryString:n})||c.e;this.dateOption=new u.b(r)}},{key:"toString",value:function(){return[this.collectionPrefix,this.libraryIds,this.dateOption.get("from"),this.dateOption.get("to")].filter(Boolean).join(":")}},{key:"toParams",value:function(){var t={};return this.libraryIds&&(t.libraryIds=this.libraryIds),this.dateOption&&(t.from=this.dateOption.get("from"),t.to=this.dateOption.get("to")),t}}])&&m(e.prototype,n),r&&m(e,r),Object.defineProperty(e,"prototype",{writable:!1}),l}(i.a);function I(t){return(I="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 r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function k(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function C(t,e){return(C=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function R(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,r=x(t);if(e){var o=x(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return E(this,n)}}function E(t,e){if(e&&("object"===I(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function x(t){return(x=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&C(t,e)}(i,t);var e,n,r,o=R(i);function i(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return k(this,i),o.call(this,{collectionPrefix:a.f.LIBRARY_FOLDERS,id:t,sort:e,cursor:n})}return e=i,n&&_(e.prototype,n),r&&_(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}(i.a);n.d(e,"d",(function(){return r.a})),n.d(e,"b",(function(){return g})),n.d(e,"c",(function(){return P})),n.d(e,"a",(function(){return T}))},1349:function(t,e,n){var r=n(10);t.exports=(r.default||r).template({1:function(t,e,n,r,o){var i;t.propertyIsEnumerable;return(null!=(i=t.lambda(null!=(i=null!=e?e.options:e)?i.spinnerEl:i,e))?i:"")+"\r\n"},3:function(t,e,n,r,o){t.propertyIsEnumerable;var i,a=t.lambda,u=t.escapeExpression,c=null!=e?e:t.nullContext||{},l=t.hooks.helperMissing;return'<div class="pb-3 text-center">\r\n <img src="'+u(a(null!=(i=null!=e?e.options:e)?i.imageUrl:i,e))+'" class="'+u(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.image:i,e))+'" />\r\n</div>\r\n<p class="m-0">\r\n '+(null!=(i=(n.lang||e&&e.lang||l).call(c,"body1",{name:"lang",hash:{},data:o}))?i:"")+"\r\n "+(null!=(i=n.if.call(c,null!=(i=null!=e?e.options:e)?i.libraryText:i,{name:"if",hash:{},fn:t.program(4,o,0),inverse:t.noop,data:o}))?i:"")+"\r\n "+(null!=(i=n.if.call(c,null!=(i=null!=e?e.options:e)?i.subject:i,{name:"if",hash:{},fn:t.program(6,o,0),inverse:t.noop,data:o}))?i:"")+"\r\n "+(null!=(i=(n.lang||e&&e.lang||l).call(c,"body4",{name:"lang",hash:{email:null!=(i=null!=e?e.options:e)?i.email:i,to:null!=(i=null!=e?e.options:e)?i.to:i,from:null!=(i=null!=e?e.options:e)?i.from:i},data:o}))?i:"")+"\r\n</p>\r\n"},4:function(t,e,n,r,o){var i;t.propertyIsEnumerable;return null!=(i=(n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"body2",{name:"lang",hash:{libraryText:null!=(i=null!=e?e.options:e)?i.libraryText:i},data:o}))?i:""},6:function(t,e,n,r,o){var i;t.propertyIsEnumerable;return null!=(i=(n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"body3",{name:"lang",hash:{subject:null!=(i=null!=e?e.options:e)?i.subject:i},data:o}))?i:""},compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){var i;t.propertyIsEnumerable;return null!=(i=n.unless.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.dataFetched:i,{name:"unless",hash:{},fn:t.program(1,o,0),inverse:t.program(3,o,0),data:o}))?i:""},useData:!0})},1350:function(t,e,n){t.exports={image:"_2AV9T"}},1453:function(t,e,n){"use strict";n.r(e),n.d(e,"GeneratePastReleasesPdfView",(function(){return R}));var r=n(1),o=n(29),i=n(2),a=n(5),u=n(3),c=n(4),l=n(42),s=n(305),f=n(1099),p=n(144),y=n(0),b=n(1043),d=n(12),h=n(307),g=n(265),v=n(145),m=n(1349),j=n.n(m),O=n(1350),w=n.n(O);function S(t){return(S="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 P(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function I(t,e){return(I=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _(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,r=C(t);if(e){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k(this,n)}}function k(t,e){if(e&&("object"===S(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function C(t){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var R=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&I(t,e)}(O,t);var e,n,i,m=_(O);function O(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,O),m.call(this,t)}return e=O,(n=[{key:"initialize",value:function(){this.libraryDataService=a.a.getInstance(y.g.Library,this),this.contentUpdatesDataService=a.a.getInstance(y.g.ContentUpdates,this),this.exportDataService=a.a.getInstance(y.g.Export,this)}},{key:"name",get:function(){return"GeneratePastReleasesPdfView"}},{key:"title",get:function(){return u.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.generatePastReleasesPdf"}},{key:"template",get:function(){return j.a}},{key:"channelName",get:function(){return d.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var t=this;return[{behaviorClass:s.e,title:u.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new b.a,channelName:this.channelName,buttonText:u.a.getPhrase(this.lang,"generateBtn"),onClick:function(){return t.onClickGeneratePdf()}}}]}},{key:"onLibrariesSync",value:function(t){var e=this;this.libraries=t,this.selectedLibraryIds=h.f.getLibraryIds(this.options.librariesQueryString,t),this.subjectCollectionIdentifier=new f.c({dateQueryString:this.options.dateQueryString,libraryIds:this.selectedLibraryIds}),this.contentUpdatesDataService.getRecentVideoSubjects(this.subjectCollectionIdentifier,(function(n){return e.onSubjectsSync(t,n)}))}},{key:"onSubjectsSync",value:function(t,e){var n=h.f.getSubjectOptions(e).map((function(t){return new v.b(t)})),o={dateQueryString:this.options.dateQueryString,libraryIds:this.selectedLibraryIds};if(!this.options.subjectQueryString)return this.videoCollectionIdentifier=new f.b(o),void this.spinnerModel.set(g.c.Disabled,!1);var i=this.getSubjectIds();this.videoCollectionIdentifier=new f.b(r.extend(o,{subjects:n.filter((function(t){return!!r.intersection(i,t.get("subjectIds")).length}))})),this.spinnerModel.set(g.c.Disabled,!1)}},{key:"getSubjectIds",value:function(){if(this.options.subjectQueryString)return this.options.subjectQueryString.split("-")[1].split(",")}},{key:"getLibrariesText",value:function(){var t=this;if(this.libraries.length!==this.selectedLibraryIds.length){var e=this.libraries.filter((function(e){return r.contains(t.selectedLibraryIds,e.id.toString())})),n=e.map((function(t){return"<strong>".concat(d.w.escapeExpression(t.get("name")),"</strong>")}));return e.length<=2?n.join(" ".concat(u.a.getPhrase(this.lang,"and")," ")):r.first(n,n.length-1).join(", ")+" ".concat(u.a.getPhrase(this.lang,"and")," ").concat(r.last(n))}}},{key:"getFormattedDate",value:function(t){if(t)return o(t).format("DD MMMM YYYY")}},{key:"getFormattedSubjects",value:function(){if(this.videoCollectionIdentifier.subjects){var t=this.videoCollectionIdentifier.subjects.map((function(t){return t.get("name")}));return 1===t.length?t[0]:t.slice(0,-1).join(", ")+" ".concat(u.a.getPhrase(this.lang,"and")," ")+t.slice(-1)}}},{key:"onClickGeneratePdf",value:function(){this.spinnerModel.set(g.c.ShowSpinner,!0),this.fetchVideosAndGeneratePdf()}},{key:"fetchVideosAndGeneratePdf",value:function(){var t=this;this.contentUpdatesDataService.getRecentVideosAllPages(this.videoCollectionIdentifier,(function(e){e&&e.length?t.generatePdf(e.map((function(t){return t.id.toString()}))):t.triggerMethod("hide")}))}},{key:"generatePdf",value:function(t){var e=this,n=this.videoCollectionIdentifier.subjects?this.getFormattedSubjects():u.a.getPhrase(this.lang,"latestReleases"),r=o(this.videoCollectionIdentifier.dateOption.get("from")).format("MMMM YYYY"),i=o(this.videoCollectionIdentifier.dateOption.get("to")).format("MMMM YYYY"),a=r===i?u.a.getPhrase(this.lang,"fromContentUpdate",{from:r}):u.a.getPhrase(this.lang,"fromToContentUpdates",{from:r,to:i});this.exportDataService.generateCustomListPdf(n,a,t,this.currentUser,(function(){return e.triggerMethod("hide")})),this.logAction(t.length)}},{key:"logAction",value:function(t){var e={location:c.LocationContext.Popup,actionType:c.UserAction.Create,entity:c.EntityType.PDF,workflowPhase:c.WorkflowPhase.Complete},n={videoCount:t,libraries:this.selectedLibraryIds.join(","),releaseDate:this.videoCollectionIdentifier.dateOption.get("name"),subjects:this.options.subjectQueryString?this.videoCollectionIdentifier.subjects.map((function(t){return t.get("name")})).join(","):""};l.a.logUserAction(n,e)}},{key:"requiredResources",get:function(){return{currentUser:p.b.currentUser}}},{key:"onBeforeRender",value:function(){var t=this;this.libraries||this.libraryDataService.getHostedLibraries((function(e){return t.onLibrariesSync(e)}))}},{key:"viewOptions",value:function(){return{styles:w.a,dataFetched:!!this.libraries,spinnerEl:d.r.getSpinner({size:d.s.Large,extraClasses:"mx-auto"}),email:this.currentUser.get("email"),imageUrl:y.l.Shared.GeneratePdf,libraryText:this.getLibrariesText(),subject:this.getFormattedSubjects(),from:this.videoCollectionIdentifier&&this.getFormattedDate(this.videoCollectionIdentifier.dateOption.get("from")),to:this.videoCollectionIdentifier&&this.getFormattedDate(this.videoCollectionIdentifier.dateOption.get("to"))}}}])&&P(e.prototype,n),i&&P(e,i),Object.defineProperty(e,"prototype",{writable:!1}),O}(i.a.View)}}]);
|