@clickview/library-editor 1.2.3 → 1.3.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/dist/bundles.json +3 -3
  2. package/dist/css/{library-editor-app-73ef35d93e.css → library-editor-app-30cd08bfae.css} +2 -2
  3. package/dist/en.json +1 -1
  4. package/dist/scripts/{0-a04c141c12.chunk.js → 0-d20750cdec.chunk.js} +1 -1
  5. package/dist/scripts/{1-23b519a110.chunk.js → 1-28a327acf3.chunk.js} +1 -1
  6. package/dist/scripts/{10-d8f5f78834.chunk.js → 10-b830a40f72.chunk.js} +1 -1
  7. package/dist/scripts/{11-efbe8b672b.chunk.js → 11-02eba260f6.chunk.js} +1 -1
  8. package/dist/scripts/{12-09e692a1ca.chunk.js → 12-8791a92594.chunk.js} +1 -1
  9. package/dist/scripts/{13-6108b571ad.chunk.js → 13-665738fbb1.chunk.js} +1 -1
  10. package/dist/scripts/{14-73b1ec9318.chunk.js → 14-1e2cd6ac41.chunk.js} +1 -1
  11. package/dist/scripts/{15-970afc369e.chunk.js → 15-0dc89981e2.chunk.js} +1 -1
  12. package/dist/scripts/{16-2f7fe116ed.chunk.js → 16-4a1c634dda.chunk.js} +1 -1
  13. package/dist/scripts/{17-486ceeb3d6.chunk.js → 17-3c94d08d78.chunk.js} +1 -1
  14. package/dist/scripts/{18-778c2a6d36.chunk.js → 18-3fadb1f394.chunk.js} +1 -1
  15. package/dist/scripts/{19-f031e7d3e1.chunk.js → 19-8e572002ab.chunk.js} +1 -1
  16. package/dist/scripts/{2-d90f461b10.chunk.js → 2-7a78d29f44.chunk.js} +1 -1
  17. package/dist/scripts/{22-c4a4f1342b.chunk.js → 22-d2e056e746.chunk.js} +1 -1
  18. package/dist/scripts/{23-34b277cf65.chunk.js → 23-f8a294ec40.chunk.js} +1 -1
  19. package/dist/scripts/{24-630bf76785.chunk.js → 24-2bcd00effe.chunk.js} +1 -1
  20. package/dist/scripts/{25-d8e03a19d5.chunk.js → 25-c4aaeab127.chunk.js} +1 -1
  21. package/dist/scripts/{26-6178a4f9fd.chunk.js → 26-9a7dd55620.chunk.js} +1 -1
  22. package/dist/scripts/{27-63d665b25a.chunk.js → 27-7e018cd6b5.chunk.js} +1 -1
  23. package/dist/scripts/{28-87624b3c12.chunk.js → 28-b1c31de615.chunk.js} +1 -1
  24. package/dist/scripts/{29-7b8bdfb4c4.chunk.js → 29-2beecb7b1b.chunk.js} +1 -1
  25. package/dist/scripts/{3-25dad7ab81.chunk.js → 3-eb941619ce.chunk.js} +1 -1
  26. package/dist/scripts/{30-335cf6b1f1.chunk.js → 30-e056eceff1.chunk.js} +1 -1
  27. package/dist/scripts/{31-9c0129c803.chunk.js → 31-f5fb9024bf.chunk.js} +1 -1
  28. package/dist/scripts/{32-62fb145d68.chunk.js → 32-3a253b3136.chunk.js} +1 -1
  29. package/dist/scripts/{33-ad260f3d21.chunk.js → 33-48b0479da2.chunk.js} +1 -1
  30. package/dist/scripts/{34-028961de4c.chunk.js → 34-3d5a50c31b.chunk.js} +1 -1
  31. package/dist/scripts/{35-64b86ab14c.chunk.js → 35-0d7358dba8.chunk.js} +1 -1
  32. package/dist/scripts/{36-7726ed4132.chunk.js → 36-d6d7b848e2.chunk.js} +1 -1
  33. package/dist/scripts/{37-0bdc2a39f4.chunk.js → 37-d39100a6e1.chunk.js} +1 -1
  34. package/dist/scripts/{38-a7c6f59b64.chunk.js → 38-35d9648dc7.chunk.js} +1 -1
  35. package/dist/scripts/{39-03993048d5.chunk.js → 39-06dd548dc5.chunk.js} +1 -1
  36. package/dist/scripts/{4-e3e8c6d627.chunk.js → 4-2a82a84056.chunk.js} +1 -1
  37. package/dist/scripts/{40-498db688bd.chunk.js → 40-792c2cdf70.chunk.js} +1 -1
  38. package/dist/scripts/{41-4bf152664b.chunk.js → 41-b943713472.chunk.js} +1 -1
  39. package/dist/scripts/{42-b9b278fee1.chunk.js → 42-f49212bb91.chunk.js} +1 -1
  40. package/dist/scripts/{43-06d8609966.chunk.js → 43-fb162a1122.chunk.js} +1 -1
  41. package/dist/scripts/{44-12b32dfce6.chunk.js → 44-b3b4565828.chunk.js} +1 -1
  42. package/dist/scripts/{45-1ecab6e598.chunk.js → 45-fed967dc8d.chunk.js} +1 -1
  43. package/dist/scripts/{46-ece50b0081.chunk.js → 46-372fa93c13.chunk.js} +1 -1
  44. package/dist/scripts/{47-973dbdac7d.chunk.js → 47-3af23cc886.chunk.js} +1 -1
  45. package/dist/scripts/{48-9b56ec0c97.chunk.js → 48-f0403bcb83.chunk.js} +1 -1
  46. package/dist/scripts/{49-46f355dda9.chunk.js → 49-13b2893542.chunk.js} +1 -1
  47. package/dist/scripts/{5-fc474557a4.chunk.js → 5-0fa94bdf69.chunk.js} +1 -1
  48. package/dist/scripts/{50-b6cc3e6c4b.chunk.js → 50-f2d6010fd8.chunk.js} +1 -1
  49. package/dist/scripts/{51-1c042b3688.chunk.js → 51-ec94176992.chunk.js} +1 -1
  50. package/dist/scripts/{52-efcad929b6.chunk.js → 52-f541d887ed.chunk.js} +1 -1
  51. package/dist/scripts/{53-41e8b7b5c4.chunk.js → 53-5de0b434bf.chunk.js} +1 -1
  52. package/dist/scripts/{54-34075a1c51.chunk.js → 54-e397b03055.chunk.js} +1 -1
  53. package/dist/scripts/{55-471f25aa42.chunk.js → 55-a5aa7796a9.chunk.js} +1 -1
  54. package/dist/scripts/{56-4c51f8fc50.chunk.js → 56-de18389621.chunk.js} +1 -1
  55. package/dist/scripts/{57-8db6279ba8.chunk.js → 57-ea4f07ceff.chunk.js} +1 -1
  56. package/dist/scripts/{58-7ab7f6a745.chunk.js → 58-be172a6ca4.chunk.js} +1 -1
  57. package/dist/scripts/{59-48b9aeb6f9.chunk.js → 59-4bf5baafed.chunk.js} +1 -1
  58. package/dist/scripts/{6-6c8e5e807c.chunk.js → 6-c0744fc9f6.chunk.js} +1 -1
  59. package/dist/scripts/{60-b3fb98008e.chunk.js → 60-03e44d916c.chunk.js} +1 -1
  60. package/dist/scripts/{61-af2677403b.chunk.js → 61-f5f8c3a7f9.chunk.js} +1 -1
  61. package/dist/scripts/{62-ab17eba7fc.chunk.js → 62-78089903fa.chunk.js} +1 -1
  62. package/dist/scripts/{63-3a179c9a68.chunk.js → 63-ea5265b3ba.chunk.js} +1 -1
  63. package/dist/scripts/{64-893a5fa090.chunk.js → 64-1460024bea.chunk.js} +1 -1
  64. package/dist/scripts/{65-989698e62c.chunk.js → 65-81c6f0a1d0.chunk.js} +1 -1
  65. package/dist/scripts/{66-8e040e8e2c.chunk.js → 66-469cc41ce6.chunk.js} +1 -1
  66. package/dist/scripts/{67-8d4c1755b3.chunk.js → 67-d83860b6f9.chunk.js} +1 -1
  67. package/dist/scripts/{68-4758797eac.chunk.js → 68-bf1905261e.chunk.js} +1 -1
  68. package/dist/scripts/{69-7651a31422.chunk.js → 69-01456dee21.chunk.js} +1 -1
  69. package/dist/scripts/{7-34191693a9.chunk.js → 7-8ae226ffea.chunk.js} +1 -1
  70. package/dist/scripts/{70-03db30df80.chunk.js → 70-e79d42e859.chunk.js} +1 -1
  71. package/dist/scripts/{71-b329500003.chunk.js → 71-8bee00418c.chunk.js} +1 -1
  72. package/dist/scripts/{72-00a27d46c9.chunk.js → 72-c9c79df587.chunk.js} +1 -1
  73. package/dist/scripts/{73-0657019519.chunk.js → 73-172b46004e.chunk.js} +1 -1
  74. package/dist/scripts/{74-7b6e9c0cfd.chunk.js → 74-3a572e4113.chunk.js} +1 -1
  75. package/dist/scripts/{8-360c937c9a.chunk.js → 8-320ab9271f.chunk.js} +1 -1
  76. package/dist/scripts/{9-4ec9ded562.chunk.js → 9-eb320e3ae9.chunk.js} +1 -1
  77. package/dist/scripts/bundle-d80b4b3ce7.min.js +10 -0
  78. package/dist/scripts/polyfills-afb66ec8cc.min.js +1 -0
  79. package/package.json +2 -2
  80. package/dist/scripts/bundle-c686e401da.min.js +0 -10
  81. package/dist/scripts/polyfills-c68217e80d.min.js +0 -1
@@ -1 +1 @@
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?Object.setPrototypeOf.bind():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.bind():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?Object.setPrototypeOf.bind():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.bind():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 C}));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 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 k(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 L(e,t){return(L=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=j(e);if(t){var o=j(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"===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 j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(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()}}])&&k(t.prototype,n),o&&k(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],{1045: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?Object.setPrototypeOf.bind():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.bind():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)},1059: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?Object.setPrototypeOf.bind():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.bind():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)},1354: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})},1355:function(e,t,n){e.exports={header:"_1tdTv"}},1457:function(e,t,n){"use strict";n.r(t),n.d(t,"AddToLibraryView",(function(){return C}));var r=n(1),o=n(2),i=n(5),a=n(265),l=n(1064),s=n(305),u=n(9),c=n(62),f=n(1045),d=n(12),p=n(0),h=n(3),y=n(147),b=n(1125),m=n(1354),g=n.n(m),v=n(1355),w=n.n(v);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 k(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 L(e,t){return(L=Object.setPrototypeOf?Object.setPrototypeOf.bind():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=j(e);if(t){var o=j(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"===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 j(e){return(j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var C=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L(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()}}])&&k(t.prototype,n),o&&k(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],{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?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function s(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 l(this,n)}}function l(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.bind():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)}(l,t);var e,n,r,i=s(l);function l(){return a(this,l),i.apply(this,arguments)}return e=l,(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}),l}(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 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 l(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?Object.setPrototypeOf.bind():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"===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 h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():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)}(s,t);var e,n,r,i=b(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=i.call(this,{collectionPrefix:"".concat(a.f.RECENT_VIDEOS,":collection"),cursor:t.cursor,sort:t.sort})).setAdditionalData(t),e}return e=s,(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(l(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}),s}(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?Object.setPrototypeOf.bind():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=P(t);if(e){var o=P(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 P(t){return(P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var S=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)}(s,t);var e,n,r,i=O(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=i.call(this,{collectionPrefix:"".concat(a.f.RECENT_SUBJECTS,":collection"),sort:t.sort})).setAdditionalData(t),e}return e=s,(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}),s}(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?Object.setPrototypeOf.bind():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.bind():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 S})),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||{},s=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||s).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||s).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),s=n(42),l=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 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 S(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?Object.setPrototypeOf.bind():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"===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 C(t){return(C=Object.setPrototypeOf?Object.getPrototypeOf.bind():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:l.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(","):""};s.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"))}}}])&&S(e.prototype,n),i&&S(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],{1045: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?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function s(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 l(this,n)}}function l(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.bind():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)}(l,t);var e,n,r,i=s(l);function l(){return a(this,l),i.apply(this,arguments)}return e=l,(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}),l}(r.a.Model)},1101:function(t,e,n){"use strict";var r=n(204),o=n(1),i=n(202),a=n(0),u=n(146),c=n(307);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 l(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?Object.setPrototypeOf.bind():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"===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 h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():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)}(s,t);var e,n,r,i=b(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=i.call(this,{collectionPrefix:"".concat(a.f.RECENT_VIDEOS,":collection"),cursor:t.cursor,sort:t.sort})).setAdditionalData(t),e}return e=s,(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(l(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}),s}(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?Object.setPrototypeOf.bind():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=P(t);if(e){var o=P(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 P(t){return(P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var S=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)}(s,t);var e,n,r,i=O(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=i.call(this,{collectionPrefix:"".concat(a.f.RECENT_SUBJECTS,":collection"),sort:t.sort})).setAdditionalData(t),e}return e=s,(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}),s}(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?Object.setPrototypeOf.bind():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.bind():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 S})),n.d(e,"a",(function(){return T}))},1351: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||{},s=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||s).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||s).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})},1352:function(t,e,n){t.exports={image:"_2AV9T"}},1455: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),s=n(42),l=n(305),f=n(1101),p=n(145),y=n(0),b=n(1045),d=n(12),h=n(307),g=n(265),v=n(146),m=n(1351),j=n.n(m),O=n(1352),w=n.n(O);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 S(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?Object.setPrototypeOf.bind():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"===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 C(t){return(C=Object.setPrototypeOf?Object.getPrototypeOf.bind():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:l.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(","):""};s.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"))}}}])&&S(e.prototype,n),i&&S(e,i),Object.defineProperty(e,"prototype",{writable:!1}),O}(i.a.View)}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[45],{1070:function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var r=n(2),o=n(37),i=n(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 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 s(t,e){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function u(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 l(this,n)}}function l(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.bind():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&&s(t,e)}(l,t);var e,n,o,a=u(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=a.call(this,i.a.getPhrase(p,"title"))).supportUrl=t,e}return e=l,(n=[{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(){r.a.LocationUtils.Reload()}}])&&c(e.prototype,n),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.a)},1107:function(t,e,n){"use strict";n(311);var r=n(2),o=n(37),i=n(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 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 s(t,e){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function u(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 l(this,n)}}function l(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.bind():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&&s(t,e)}(l,t);var e,n,o,a=u(l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,i.a.getPhrase(p,"title"))}return e=l,(n=[{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(){r.a.LocationUtils.Reload()}}])&&c(e.prototype,n),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.a);function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(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 b(t,e){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function h(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=v(t);if(e){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(t,e){if(e&&("object"===g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var O=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&&b(t,e)}(c,t);var e,n,o,a=h(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,(n=[{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(){r.a.LocationUtils.Reload()}}])&&d(e.prototype,n),o&&d(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 w(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){return(k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function T(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=_(t);if(e){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}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 _(t){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var S=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&&k(t,e)}(c,t);var e,n,o,a=T(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,(n=[{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(){r.a.LocationUtils.Reload()}}])&&w(e.prototype,n),o&&w(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a);n(1070);n.d(e,"a",(function(){return y})),n.d(e,"c",(function(){return O})),n.d(e,"b",(function(){return S})),n.d(e,"a",(function(){return y}))},1380:function(t,e,n){t.exports={progress:"bJ21G",remaining:"_1T3fH",info:"_3m6CX",migrationContainer:"MVm9U",migrationSyncContainer:"KH7rf",syncServer:"_2-0ob",syncVideo:"_2Rh0f",migrationSyncAnimation:"oXD93",syncCloud:"_3B9BP"}},1381:function(t,e,n){var r=n(10);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression;return'<div class="p-3 pl-5 pr-5">\r\n <div class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.migrationSyncContainer:i,e))+' pt-2 pb-4">\r\n <img src="/images/server.png" class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.syncServer:i,e))+'">\r\n <img src="/images/video.png" class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.syncVideo:i,e))+'">\r\n <img src="/images/cloud.png" class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.syncCloud:i,e))+'">\r\n </div>\r\n\r\n <h4 class="adding-text">'+c(a(null!=(i=null!=e?e.options:e)?i.addingText:i,e))+'</h4>\r\n <div class="progress-bar-region"></div>\r\n</div>\r\n\r\n<span class="d-block text-center pb-3 '+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.info:i,e))+'">'+c((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"keepWindowOpen",{name:"lang",hash:{},data:o}))+"</span>"},useData:!0})},1464:function(t,e,n){"use strict";n.r(e),n.d(e,"MigrationProgressView",(function(){return O}));var r=n(2),o=n(30),i=n(5),a=n(1380),c=n.n(a),s=n(1381),u=n.n(s),l=n(1107),f=n(1121),p=n(0),y=n(3);function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(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 b(t,e){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function h(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=v(t);if(e){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(t,e){if(e&&("object"===g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var O=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&&b(t,e)}(g,t);var e,n,a,s=h(g);function g(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g),s.call(this,t)}return e=g,(n=[{key:"initialize",value:function(){this.viewModel=o.a.get("migration:progress",{percentage:0}),this.migrationVideoDataService=i.a.getInstance(p.g.MigrationVideo,this),this.bindMigrationDataListeners()}},{key:"name",get:function(){return"MigrationProgressView"}},{key:"title",get:function(){return y.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.migrationProgress"}},{key:"template",get:function(){return u.a}},{key:"className",get:function(){return"".concat(c.a.migrationContainer," p-3 bg-white ").concat(c.a.progress)}},{key:"elements",get:function(){return{addingText:".adding-text"}}},{key:"regions",value:function(){return{progressBar:{replaceElement:!0,el:".progress-bar-region"}}}},{key:"bindMigrationDataListeners",value:function(){this.listenTo(p.e.MIGRATION,"".concat(p.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(p.e.MIGRATION,"".concat(p.f.FINALISATION,":").concat(this.options.finalisationTaskId,":error"),this.onError)}},{key:"poll",value:function(){var t=this;this.migrationVideoDataService.getFinalisationTask(this.options.finalisationTaskId,(function(e){if(t.finalisationTask=e,t.setPercentage(),t.viewModel.get("percentage")>=100){i.a.getInstance(p.g.Library).clearLibrariesCache(),i.a.releaseInstance(p.g.Library),t.migrationVideoDataService.clearCacheAndGetCustomerMetadata();var n={};return t.options.firstTime&&(n.initialMigration=!0),void r.a.AppLinkHelper.trigger({application:p.b.MIGRATION_WIZARD,action:p.a.MigrationWizard.VIDEOS_ADDED,args:[t.options.finalisationTaskId],params:n})}setTimeout((function(){return t.poll()}),5e3),t.isRendered()?(t.renderProgressBar(),t.getUI("addingText").text(t.getAddingText())):t.render()}))}},{key:"setPercentage",value:function(){if(this.finalisationTask){var t=this.finalisationTask.get("successfullyProcessed")+this.finalisationTask.get("failedToProcess"),e=this.finalisationTask.get("numberOfVideos");this.finalisationTask.get("videosWithWarning")&&0===e?this.viewModel.set("percentage",100):this.viewModel.set("percentage",Math.round(t/e*100))}}},{key:"onError",value:function(){r.a.ErrorHelper.throw(new l.c)}},{key:"renderProgressBar",value:function(){this.showChildView("progressBar",new f.f({model:this.viewModel,backgroundClass:"bg-info"}))}},{key:"onBeforeRender",value:function(){return this.pollingStarted||(this.poll(),this.pollingStarted=!0),this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),!!this.finalisationTask&&!!this.customerMetadata}},{key:"getAddingText",value:function(){var t=this.finalisationTask.get("successfullyProcessed")+this.finalisationTask.get("failedToProcess");return y.a.getPhrase(this.lang,"addingVideos",{numberMigrated:t||1,numberSelected:this.finalisationTask.get("numberOfVideos")+this.finalisationTask.get("videosWithWarning")})}},{key:"viewOptions",value:function(){if(this.finalisationTask){var t=this.finalisationTask.get("successfullyProcessed")+this.finalisationTask.get("failedToProcess");return{styles:c.a,numberMigrated:t||1,numberSelected:this.finalisationTask.get("numberOfVideos")+this.finalisationTask.get("videosWithWarning"),addingText:this.getAddingText()}}}},{key:"onRender",value:function(){this.renderProgressBar()}}])&&d(e.prototype,n),a&&d(e,a),Object.defineProperty(e,"prototype",{writable:!1}),g}(r.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[45],{1072:function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var r=n(2),o=n(37),i=n(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 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 s(t,e){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function u(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 l(this,n)}}function l(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.bind():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&&s(t,e)}(l,t);var e,n,o,a=u(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=a.call(this,i.a.getPhrase(p,"title"))).supportUrl=t,e}return e=l,(n=[{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(){r.a.LocationUtils.Reload()}}])&&c(e.prototype,n),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.a)},1109:function(t,e,n){"use strict";n(311);var r=n(2),o=n(37),i=n(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 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 s(t,e){return(s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function u(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 l(this,n)}}function l(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.bind():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&&s(t,e)}(l,t);var e,n,o,a=u(l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,i.a.getPhrase(p,"title"))}return e=l,(n=[{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(){r.a.LocationUtils.Reload()}}])&&c(e.prototype,n),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.a);function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(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 b(t,e){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function h(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=v(t);if(e){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(t,e){if(e&&("object"===g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var O=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&&b(t,e)}(c,t);var e,n,o,a=h(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,(n=[{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(){r.a.LocationUtils.Reload()}}])&&d(e.prototype,n),o&&d(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 w(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){return(k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function T(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=_(t);if(e){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}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 _(t){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var S=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&&k(t,e)}(c,t);var e,n,o,a=T(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,(n=[{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(){r.a.LocationUtils.Reload()}}])&&w(e.prototype,n),o&&w(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a);n(1072);n.d(e,"a",(function(){return y})),n.d(e,"c",(function(){return O})),n.d(e,"b",(function(){return S})),n.d(e,"a",(function(){return y}))},1382:function(t,e,n){t.exports={progress:"bJ21G",remaining:"_1T3fH",info:"_3m6CX",migrationContainer:"MVm9U",migrationSyncContainer:"KH7rf",syncServer:"_2-0ob",syncVideo:"_2Rh0f",migrationSyncAnimation:"oXD93",syncCloud:"_3B9BP"}},1383:function(t,e,n){var r=n(10);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression;return'<div class="p-3 pl-5 pr-5">\r\n <div class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.migrationSyncContainer:i,e))+' pt-2 pb-4">\r\n <img src="/images/server.png" class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.syncServer:i,e))+'">\r\n <img src="/images/video.png" class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.syncVideo:i,e))+'">\r\n <img src="/images/cloud.png" class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.syncCloud:i,e))+'">\r\n </div>\r\n\r\n <h4 class="adding-text">'+c(a(null!=(i=null!=e?e.options:e)?i.addingText:i,e))+'</h4>\r\n <div class="progress-bar-region"></div>\r\n</div>\r\n\r\n<span class="d-block text-center pb-3 '+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.info:i,e))+'">'+c((n.lang||e&&e.lang||t.hooks.helperMissing).call(null!=e?e:t.nullContext||{},"keepWindowOpen",{name:"lang",hash:{},data:o}))+"</span>"},useData:!0})},1466:function(t,e,n){"use strict";n.r(e),n.d(e,"MigrationProgressView",(function(){return O}));var r=n(2),o=n(30),i=n(5),a=n(1382),c=n.n(a),s=n(1383),u=n.n(s),l=n(1109),f=n(1123),p=n(0),y=n(3);function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(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 b(t,e){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function h(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=v(t);if(e){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(t,e){if(e&&("object"===g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var O=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&&b(t,e)}(g,t);var e,n,a,s=h(g);function g(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g),s.call(this,t)}return e=g,(n=[{key:"initialize",value:function(){this.viewModel=o.a.get("migration:progress",{percentage:0}),this.migrationVideoDataService=i.a.getInstance(p.g.MigrationVideo,this),this.bindMigrationDataListeners()}},{key:"name",get:function(){return"MigrationProgressView"}},{key:"title",get:function(){return y.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.migrationProgress"}},{key:"template",get:function(){return u.a}},{key:"className",get:function(){return"".concat(c.a.migrationContainer," p-3 bg-white ").concat(c.a.progress)}},{key:"elements",get:function(){return{addingText:".adding-text"}}},{key:"regions",value:function(){return{progressBar:{replaceElement:!0,el:".progress-bar-region"}}}},{key:"bindMigrationDataListeners",value:function(){this.listenTo(p.e.MIGRATION,"".concat(p.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(p.e.MIGRATION,"".concat(p.f.FINALISATION,":").concat(this.options.finalisationTaskId,":error"),this.onError)}},{key:"poll",value:function(){var t=this;this.migrationVideoDataService.getFinalisationTask(this.options.finalisationTaskId,(function(e){if(t.finalisationTask=e,t.setPercentage(),t.viewModel.get("percentage")>=100){i.a.getInstance(p.g.Library).clearLibrariesCache(),i.a.releaseInstance(p.g.Library),t.migrationVideoDataService.clearCacheAndGetCustomerMetadata();var n={};return t.options.firstTime&&(n.initialMigration=!0),void r.a.AppLinkHelper.trigger({application:p.b.MIGRATION_WIZARD,action:p.a.MigrationWizard.VIDEOS_ADDED,args:[t.options.finalisationTaskId],params:n})}setTimeout((function(){return t.poll()}),5e3),t.isRendered()?(t.renderProgressBar(),t.getUI("addingText").text(t.getAddingText())):t.render()}))}},{key:"setPercentage",value:function(){if(this.finalisationTask){var t=this.finalisationTask.get("successfullyProcessed")+this.finalisationTask.get("failedToProcess"),e=this.finalisationTask.get("numberOfVideos");this.finalisationTask.get("videosWithWarning")&&0===e?this.viewModel.set("percentage",100):this.viewModel.set("percentage",Math.round(t/e*100))}}},{key:"onError",value:function(){r.a.ErrorHelper.throw(new l.c)}},{key:"renderProgressBar",value:function(){this.showChildView("progressBar",new f.f({model:this.viewModel,backgroundClass:"bg-info"}))}},{key:"onBeforeRender",value:function(){return this.pollingStarted||(this.poll(),this.pollingStarted=!0),this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),!!this.finalisationTask&&!!this.customerMetadata}},{key:"getAddingText",value:function(){var t=this.finalisationTask.get("successfullyProcessed")+this.finalisationTask.get("failedToProcess");return y.a.getPhrase(this.lang,"addingVideos",{numberMigrated:t||1,numberSelected:this.finalisationTask.get("numberOfVideos")+this.finalisationTask.get("videosWithWarning")})}},{key:"viewOptions",value:function(){if(this.finalisationTask){var t=this.finalisationTask.get("successfullyProcessed")+this.finalisationTask.get("failedToProcess");return{styles:c.a,numberMigrated:t||1,numberSelected:this.finalisationTask.get("numberOfVideos")+this.finalisationTask.get("videosWithWarning"),addingText:this.getAddingText()}}}},{key:"onRender",value:function(){this.renderProgressBar()}}])&&d(e.prototype,n),a&&d(e,a),Object.defineProperty(e,"prototype",{writable:!1}),g}(r.a.View)}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[46],{1070:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(2),o=n(37),i=n(3);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 c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function l(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 s(this,n)}}function s(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p="migrationWizard.smartMigrationApiCall",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&&u(e,t)}(s,e);var t,n,o,a=l(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this,i.a.getPhrase(p,"title"))).supportUrl=e,t}return t=s,(n=[{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(){r.a.LocationUtils.Reload()}}])&&c(t.prototype,n),o&&c(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.a)},1107:function(e,t,n){"use strict";n(311);var r=n(2),o=n(37),i=n(3);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 c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function l(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 s(this,n)}}function s(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p="migrationWizard.backupProgress",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&&u(e,t)}(s,e);var t,n,o,a=l(s);function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,i.a.getPhrase(p,"title"))}return t=s,(n=[{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(){r.a.LocationUtils.Reload()}}])&&c(t.prototype,n),o&&c(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.a);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 b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(c,e);var t,n,o,a=g(c);function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationProgressError","title"))}return t=c,(n=[{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(){r.a.LocationUtils.Reload()}}])&&b(t.prototype,n),o&&b(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a);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 P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t){return(S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}function j(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(c,e);var t,n,o,a=k(c);function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationFinalisation","title"))}return t=c,(n=[{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(){r.a.LocationUtils.Reload()}}])&&P(t.prototype,n),o&&P(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a);n(1070);n.d(t,"a",(function(){return y})),n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return R})),n.d(t,"a",(function(){return y}))},1401:function(e,t,n){e.exports={container:"_2SvL3",header:"_2KEEa",footer:"wCMJb"}},1402: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((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"videosSelected",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.selected:i},data:o}))+"\r\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;return" "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"noVideosSelected",{name:"lang",hash:{},data:o}))+"\r\n"},5:function(e,t,n,r,o){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,c=e.escapeExpression,u=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing;return'<div class="p-3 w-100 '+c(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.header:i,t))+'">\r\n <span class="d-inline-block">'+c((n.lang||t&&t.lang||l).call(u,"addVideos",{name:"lang",hash:{},data:o}))+'</span>\r\n</div>\r\n<div class="p-3 w-100">\r\n <h6 class="mt-1 mb-1">\r\n'+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.selected:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:"")+' </h6>\r\n <div class="selected-video-list-region"></div>\r\n</div>\r\n<div class="py-2 px-3 w-100 '+c(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.footer:i,t))+'">\r\n <div class="row">\r\n <div class="col-4">\r\n <button class="applink-back btn btn-secondary '+c(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.button:i,t))+'">\r\n '+c((n.lang||t&&t.lang||l).call(u,"back",{name:"lang",hash:{},data:o}))+'\r\n </button>\r\n </div>\r\n <div class="col-2 offset-6 text-right spinner-region">\r\n <button class="applink-next btn btn-primary '+c(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.button:i,t))+'" '+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.nextDisabled:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+">\r\n "+c((n.lang||t&&t.lang||l).call(u,"addTitles",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.selected:i},data:o}))+"\r\n </button>\r\n </div>\r\n </div>\r\n</div>"},useData:!0})},1466:function(e,t,n){"use strict";n.r(t),n.d(t,"SelectedVideosView",(function(){return x}));var r=n(6),o=n(2),i=n(5),a=n(265),c=n(3),u=n(0),l=n(12),s=n(1121),f=n(326),p=n(1131),y=n(1107),d=n(53),b=n(58),h=n(1401),g=n.n(h),m=n(1402),v=n.n(m);function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t,n){return t&&P(e.prototype,t),n&&P(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}function j(e,t){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var o=E(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return R(this,n)}}function R(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var V=function(e){k(n,e);var t=_(n);function n(){return O(this,n),t.apply(this,arguments)}return S(n,[{key:"name",get:function(){return"SelectedVideoComponentCollection"}},{key:"childView",get:function(){return s.i}}]),n}(o.a.ComponentCollection),x=function(e){k(n,e);var t=_(n);function n(e){return O(this,n),t.call(this,e)}return S(n,[{key:"initialize",value:function(){this.selectedVideoService=i.a.getInstance(u.x.SelectedVideo,this),this.migrationVideoDataService=i.a.getInstance(u.g.MigrationVideo,this),this.videoDataService=i.a.getInstance(u.g.Video,this),this.listenTo(this.channelName,"add",this.onClickAdd)}},{key:"name",get:function(){return"SelectedVideosView"}},{key:"title",get:function(){return c.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.selectedVideos"}},{key:"template",get:function(){return v.a}},{key:"className",get:function(){return"row mt-2 container-region ".concat(g.a.container)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{selectedVideoListRegion:{replaceElement:!0,el:".selected-video-list-region"},spinner:".spinner-region"}}},{key:"appLinks",get:function(){return{".applink-back":{application:u.b.MIGRATION_WIZARD,action:u.a.MigrationWizard.HOME,params:{folder:this.options.previousFolderChord}}}}},{key:"onClickAdd",value:function(){var e=this;this.listenTo(u.e.MIGRATION,"".concat(u.f.CUSTOMER_VIDEOS,":finalise:error"),this.onError),r.Radio.channel(this.channelName).trigger(a.b.ShowSpinner);var t={};b.a.isInitialMigration(this.customerMetaData)&&(t.initialMigration=!0),this.migrationVideoDataService.updateCustomerMigrationOption(d.c.Smart,(function(){e.migrationVideoDataService.finaliseCustomerVideos(e.groupedVideos,!1,(function(n){e.selectedVideoService.removeAllSelectedVideos(),e.migrationVideoDataService.clearVideoCache(),e.videoDataService.clearVideoCache(),o.a.AppLinkHelper.trigger({application:u.b.MIGRATION_WIZARD,action:u.a.MigrationWizard.PROGRESS,args:[n.id],params:t})}))}))}},{key:"onError",value:function(){o.a.ErrorHelper.throw(new y.b)}},{key:"getGroupedVideos",value:function(){var e=this.selectedVideoService.getSelectedVideos();this.groupedVideos=new o.a.Collection(p.a.getSelectedVideosCollection(e).sortBy("folderChord"))}},{key:"renderSelectedVideoList",value:function(){this.showChildView("selectedVideoListRegion",new V({collection:this.groupedVideos}))}},{key:"renderSpinner",value:function(){var e=this.selectedVideoService.getNumberSelected(),t=new a.a({buttonText:c.a.getPhrase(this.lang,"buttonText",{smartCount:e}),extraButtonClass:"btn-primary",model:new o.a.Model({disabled:0===e}),spinnerOptions:{size:l.s.Small,type:l.t.Light,extraClasses:"mx-auto"},saveEvent:"add",channelName:this.channelName});this.showChildView("spinner",t)}},{key:"viewOptions",value:function(){var e=this.selectedVideoService.getNumberSelected();return{styles:g.a,selected:e,multipleSelected:e>1,nextDisabled:0===e}}},{key:"requiredResources",get:function(){return{customerMetaData:f.b.customerMetaData}}},{key:"onRender",value:function(){this.getGroupedVideos(),this.renderSelectedVideoList(),this.renderSpinner()}}]),n}(o.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[46],{1072:function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(2),o=n(37),i=n(3);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 c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function l(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 s(this,n)}}function s(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p="migrationWizard.smartMigrationApiCall",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&&u(e,t)}(s,e);var t,n,o,a=l(s);function s(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=a.call(this,i.a.getPhrase(p,"title"))).supportUrl=e,t}return t=s,(n=[{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(){r.a.LocationUtils.Reload()}}])&&c(t.prototype,n),o&&c(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.a)},1109:function(e,t,n){"use strict";n(311);var r=n(2),o=n(37),i=n(3);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 c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function l(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 s(this,n)}}function s(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p="migrationWizard.backupProgress",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&&u(e,t)}(s,e);var t,n,o,a=l(s);function s(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,i.a.getPhrase(p,"title"))}return t=s,(n=[{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(){r.a.LocationUtils.Reload()}}])&&c(t.prototype,n),o&&c(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.a);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 b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(c,e);var t,n,o,a=g(c);function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationProgressError","title"))}return t=c,(n=[{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(){r.a.LocationUtils.Reload()}}])&&b(t.prototype,n),o&&b(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a);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 P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t){return(S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}function j(e,t){if(t&&("object"===O(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var R=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S(e,t)}(c,e);var t,n,o,a=k(c);function c(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationFinalisation","title"))}return t=c,(n=[{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(){r.a.LocationUtils.Reload()}}])&&P(t.prototype,n),o&&P(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a);n(1072);n.d(t,"a",(function(){return y})),n.d(t,"c",(function(){return w})),n.d(t,"b",(function(){return R})),n.d(t,"a",(function(){return y}))},1403:function(e,t,n){e.exports={container:"_2SvL3",header:"_2KEEa",footer:"wCMJb"}},1404: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((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"videosSelected",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.selected:i},data:o}))+"\r\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;return" "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"noVideosSelected",{name:"lang",hash:{},data:o}))+"\r\n"},5:function(e,t,n,r,o){return"disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,c=e.escapeExpression,u=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing;return'<div class="p-3 w-100 '+c(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.header:i,t))+'">\r\n <span class="d-inline-block">'+c((n.lang||t&&t.lang||l).call(u,"addVideos",{name:"lang",hash:{},data:o}))+'</span>\r\n</div>\r\n<div class="p-3 w-100">\r\n <h6 class="mt-1 mb-1">\r\n'+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.selected:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:"")+' </h6>\r\n <div class="selected-video-list-region"></div>\r\n</div>\r\n<div class="py-2 px-3 w-100 '+c(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.footer:i,t))+'">\r\n <div class="row">\r\n <div class="col-4">\r\n <button class="applink-back btn btn-secondary '+c(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.button:i,t))+'">\r\n '+c((n.lang||t&&t.lang||l).call(u,"back",{name:"lang",hash:{},data:o}))+'\r\n </button>\r\n </div>\r\n <div class="col-2 offset-6 text-right spinner-region">\r\n <button class="applink-next btn btn-primary '+c(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.button:i,t))+'" '+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.nextDisabled:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+">\r\n "+c((n.lang||t&&t.lang||l).call(u,"addTitles",{name:"lang",hash:{smartCount:null!=(i=null!=t?t.options:t)?i.selected:i},data:o}))+"\r\n </button>\r\n </div>\r\n </div>\r\n</div>"},useData:!0})},1468:function(e,t,n){"use strict";n.r(t),n.d(t,"SelectedVideosView",(function(){return x}));var r=n(6),o=n(2),i=n(5),a=n(265),c=n(3),u=n(0),l=n(12),s=n(1123),f=n(326),p=n(1133),y=n(1109),d=n(53),b=n(58),h=n(1403),g=n.n(h),m=n(1404),v=n.n(m);function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function S(e,t,n){return t&&P(e.prototype,t),n&&P(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}function j(e,t){return(j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=E(e);if(t){var o=E(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return R(this,n)}}function R(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function E(e){return(E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var V=function(e){k(n,e);var t=_(n);function n(){return O(this,n),t.apply(this,arguments)}return S(n,[{key:"name",get:function(){return"SelectedVideoComponentCollection"}},{key:"childView",get:function(){return s.i}}]),n}(o.a.ComponentCollection),x=function(e){k(n,e);var t=_(n);function n(e){return O(this,n),t.call(this,e)}return S(n,[{key:"initialize",value:function(){this.selectedVideoService=i.a.getInstance(u.x.SelectedVideo,this),this.migrationVideoDataService=i.a.getInstance(u.g.MigrationVideo,this),this.videoDataService=i.a.getInstance(u.g.Video,this),this.listenTo(this.channelName,"add",this.onClickAdd)}},{key:"name",get:function(){return"SelectedVideosView"}},{key:"title",get:function(){return c.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.selectedVideos"}},{key:"template",get:function(){return v.a}},{key:"className",get:function(){return"row mt-2 container-region ".concat(g.a.container)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{selectedVideoListRegion:{replaceElement:!0,el:".selected-video-list-region"},spinner:".spinner-region"}}},{key:"appLinks",get:function(){return{".applink-back":{application:u.b.MIGRATION_WIZARD,action:u.a.MigrationWizard.HOME,params:{folder:this.options.previousFolderChord}}}}},{key:"onClickAdd",value:function(){var e=this;this.listenTo(u.e.MIGRATION,"".concat(u.f.CUSTOMER_VIDEOS,":finalise:error"),this.onError),r.Radio.channel(this.channelName).trigger(a.b.ShowSpinner);var t={};b.a.isInitialMigration(this.customerMetaData)&&(t.initialMigration=!0),this.migrationVideoDataService.updateCustomerMigrationOption(d.c.Smart,(function(){e.migrationVideoDataService.finaliseCustomerVideos(e.groupedVideos,!1,(function(n){e.selectedVideoService.removeAllSelectedVideos(),e.migrationVideoDataService.clearVideoCache(),e.videoDataService.clearVideoCache(),o.a.AppLinkHelper.trigger({application:u.b.MIGRATION_WIZARD,action:u.a.MigrationWizard.PROGRESS,args:[n.id],params:t})}))}))}},{key:"onError",value:function(){o.a.ErrorHelper.throw(new y.b)}},{key:"getGroupedVideos",value:function(){var e=this.selectedVideoService.getSelectedVideos();this.groupedVideos=new o.a.Collection(p.a.getSelectedVideosCollection(e).sortBy("folderChord"))}},{key:"renderSelectedVideoList",value:function(){this.showChildView("selectedVideoListRegion",new V({collection:this.groupedVideos}))}},{key:"renderSpinner",value:function(){var e=this.selectedVideoService.getNumberSelected(),t=new a.a({buttonText:c.a.getPhrase(this.lang,"buttonText",{smartCount:e}),extraButtonClass:"btn-primary",model:new o.a.Model({disabled:0===e}),spinnerOptions:{size:l.s.Small,type:l.t.Light,extraClasses:"mx-auto"},saveEvent:"add",channelName:this.channelName});this.showChildView("spinner",t)}},{key:"viewOptions",value:function(){var e=this.selectedVideoService.getNumberSelected();return{styles:g.a,selected:e,multipleSelected:e>1,nextDisabled:0===e}}},{key:"requiredResources",get:function(){return{customerMetaData:f.b.customerMetaData}}},{key:"onRender",value:function(){this.getGroupedVideos(),this.renderSelectedVideoList(),this.renderSpinner()}}]),n}(o.a.View)}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[47],{1070:function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var r=n(2),o=n(37),i=n(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 l(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?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function u(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"===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.bind():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&&c(t,e)}(s,t);var e,n,o,a=u(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,(n=[{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(){r.a.LocationUtils.Reload()}}])&&l(e.prototype,n),o&&l(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.a)},1107:function(t,e,n){"use strict";n(311);var r=n(2),o=n(37),i=n(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 l(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?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function u(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"===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.bind():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&&c(t,e)}(s,t);var e,n,o,a=u(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,(n=[{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(){r.a.LocationUtils.Reload()}}])&&l(e.prototype,n),o&&l(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.a);function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(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 b(t,e){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function h(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=v(t);if(e){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(t,e){if(e&&("object"===g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var O=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&&b(t,e)}(l,t);var e,n,o,a=h(l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,i.a.getPhrase("migrationWizard.migrationProgressError","title"))}return e=l,(n=[{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(){r.a.LocationUtils.Reload()}}])&&d(e.prototype,n),o&&d(e,o),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.a);function w(t){return(w="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 S(t,e){return(S=Object.setPrototypeOf?Object.setPrototypeOf.bind():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 n,r=j(t);if(e){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}function _(t,e){if(e&&("object"===w(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 j(t){return(j=Object.setPrototypeOf?Object.getPrototypeOf.bind():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&&S(t,e)}(l,t);var e,n,o,a=k(l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,i.a.getPhrase("migrationWizard.migrationFinalisation","title"))}return e=l,(n=[{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(){r.a.LocationUtils.Reload()}}])&&P(e.prototype,n),o&&P(e,o),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.a);n(1070);n.d(e,"a",(function(){return y})),n.d(e,"c",(function(){return O})),n.d(e,"b",(function(){return R})),n.d(e,"a",(function(){return y}))},1378:function(t,e,n){t.exports={start:"GpK3N",subtitle:"_2tQJA",options:"BxsJX",optionHeader:"_2OS3h",optionText:"_1sNAq",image:"xsCzA",infoMessage:"_3jOln",migrationBanner:"n_A_A",migrationBadge:"plIse",migrationContainer:"_33xeg"}},1379:function(t,e,n){var r=n(10);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){t.propertyIsEnumerable;var i,a=null!=e?e:t.nullContext||{},l=t.hooks.helperMissing,c=t.escapeExpression,u=t.lambda;return'<div class="m-4">\r\n <h4>'+c((n.lang||e&&e.lang||l).call(a,"heading",{name:"lang",hash:{},data:o}))+'</h4>\r\n <div class="text-left mt-3">\r\n <p class="'+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.subtitle:i,e))+' text-center">'+c((n.lang||e&&e.lang||l).call(a,"question",{name:"lang",hash:{},data:o}))+'</p>\r\n\r\n <img src="/images/migrate.png" class="'+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.image:i,e))+' w-50 d-block p-2">\r\n\r\n <p class="'+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.options:i,e))+' mt-3">'+c((n.lang||e&&e.lang||l).call(a,"options",{name:"lang",hash:{},data:o}))+'</p>\r\n\r\n <div class="mb-2">\r\n <input type="radio" class="d-inline-block align-top mt-1" id="smart" value="1" name="options">\r\n <label for="smart" class="mb-1 '+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.optionHeader:i,e))+'">'+c((n.lang||e&&e.lang||l).call(a,"smartOption",{name:"lang",hash:{},data:o}))+' <span class="badge '+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.migrationBadge:i,e))+' ml-2">'+c((n.lang||e&&e.lang||l).call(a,"recommended",{name:"lang",hash:{},data:o}))+'</span></label>\r\n <span class="d-block '+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.optionText:i,e))+'">'+c((n.lang||e&&e.lang||l).call(a,"smartOptionInfo",{name:"lang",hash:{},data:o}))+'</span>\r\n </div>\r\n <div class="mb-2">\r\n <input type="radio" class="d-inline-block align-top mt-1" id="all" value="3" name="options">\r\n <label for="all" class="mb-1 '+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.optionHeader:i,e))+'">'+c((n.lang||e&&e.lang||l).call(a,"allVideosOption",{name:"lang",hash:{},data:o}))+'</label>\r\n <span class="d-block '+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.optionText:i,e))+'">'+c((n.lang||e&&e.lang||l).call(a,"allVideosOptionInfo",{name:"lang",hash:{},data:o}))+'</span>\r\n </div>\r\n <div class="mb-2">\r\n <input type="radio" class="d-inline-block align-top mt-1" id="fresh" value="2" name="options">\r\n <label for="fresh" class="mb-1 '+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.optionHeader:i,e))+'">'+c((n.lang||e&&e.lang||l).call(a,"startFreshOption",{name:"lang",hash:{},data:o}))+'</label>\r\n <span class="d-block '+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.optionText:i,e))+'">'+c((n.lang||e&&e.lang||l).call(a,"startFreshOptionInfo",{name:"lang",hash:{},data:o}))+"</span>\r\n </div>\r\n <div>\r\n "+(null!=(i=(n.lang||e&&e.lang||l).call(a,"support",{name:"lang",hash:{supportUrl:null!=(i=null!=e?e.options:e)?i.supportUrl:i,className:"info-link"},data:o}))?i:"")+'\r\n </div>\r\n </div>\r\n\r\n <div class="save-region"></div>\r\n <div class="smart-select-waiting-message" style="display: none;">\r\n <p class="mt-2">'+c((n.lang||e&&e.lang||l).call(a,"waiting",{name:"lang",hash:{},data:o}))+'</p>\r\n <p class="mt-2 smart-count"></p>\r\n </div>\r\n</div>\r\n<div class="'+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.migrationBanner:i,e))+" p-3 text-white "+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.infoMessage:i,e))+'">\r\n '+c((n.lang||e&&e.lang||l).call(a,"note",{name:"lang",hash:{},data:o}))+"\r\n</div>"},useData:!0})},1463:function(t,e,n){"use strict";n.r(e),n.d(e,"StartView",(function(){return T}));var r=n(6),o=n(3),i=n(2),a=n(5),l=n(30),c=n(310),u=n(308),s=n(144),f=n(305),p=n(265),y=n(201),g=n(0),d=n(12),b=n(53),h=n(91),m=n(1107),v=n(1070),O=n(1378),w=n.n(O),P=n(1379),S=n.n(P);function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function j(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 R(t,e){return(R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function E(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 M(this,n)}}function M(t,e){if(e&&("object"===k(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.bind():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&&R(t,e)}(k,t);var e,n,O,P=E(k);function k(){return _(this,k),P.apply(this,arguments)}return e=k,(n=[{key:"initialize",value:function(){this.migrationVideoDataService=a.a.getInstance(g.g.MigrationVideo,this),this.selectedVideoService=a.a.getInstance(g.x.SelectedVideo,this),this.initViewModel(),this.listenTo(this.channelName,"continue",this.onClickContinue),this.listenTo(g.e.MIGRATION,"".concat(g.f.CUSTOMER_SMART_VIDEOS,":error"),this.onSmartMigrationError)}},{key:"name",get:function(){return"StartView"}},{key:"title",get:function(){return o.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.start"}},{key:"className",get:function(){return"".concat(w.a.migrationContainer," text-center bg-white ").concat(w.a.start)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return S.a}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"input[name=options]":"option"}}},{key:"behaviors",get:function(){return[{behaviorClass:f.f,bindViewModel:!0}]}},{key:"elements",get:function(){return{continue:".continue",waitingMessage:".smart-select-waiting-message",smartCount:".smart-count"}}},{key:"initViewModel",value:function(){this.viewModel=l.a.get("".concat(this.name,":viewmodel"),{option:b.c.Smart},{ctor:h.e})}},{key:"viewOptions",value:function(){var t,e;return{styles:w.a,supportUrl:c.a.getArticle(null===(t=this.config)||void 0===t?void 0:t.get("supportSiteUrl"),u.a.MigrationOptions,null===(e=this.currentUser)||void 0===e?void 0:e.get("countryCode"))}}},{key:"onClickContinue",value:function(){switch(this.listenTo(g.e.MIGRATION,"".concat(g.f.CUSTOMER_VIDEOS,":finalise:all:error"),this.onFinaliseError),r.Radio.channel(this.channelName).trigger(p.b.ShowSpinner),+this.viewModel.get("option")){case b.c.Smart:this.startSmartMigrationPaginated();break;case b.c.Full:this.startFullMigration();break;case b.c.Scratch:this.startScratchMigration()}}},{key:"startScratchMigration",value:function(){var t=this;this.migrationVideoDataService.updateCustomerMigrationOption(b.c.Scratch,(function(){t.migrationVideoDataService.clearCacheAndGetCustomerMetadata((function(){i.a.AppLinkHelper.trigger({application:g.b.LIBRARY_EDITOR,action:g.a.LibraryEditor.HOME})}))}))}},{key:"startFullMigration",value:function(){var t=this;this.migrationVideoDataService.updateCustomerMigrationOption(b.c.Full,(function(){t.migrationVideoDataService.finaliseAllVideos((function(e){t.migrationVideoDataService.getCustomerMetadata((function(t){t.set("finalisationTask",e.toJSON()),i.a.AppLinkHelper.trigger({application:g.b.MIGRATION_WIZARD,action:g.a.MigrationWizard.PROGRESS,args:[e.get("id")],params:{initialMigration:!0}})}))}))}))}},{key:"startSmartMigrationPaginated",value:function(){var t=this,e=window.setTimeout((function(){var e=t.getUI("waitingMessage");e&&e.show()}),2e3);this.selectedVideoService.removeAllSelectedVideos(),this.migrationVideoDataService.clearCacheAndgetCustomerSmartSelect((function(e){var n="<strong>".concat(o.a.getPhrase(t.lang,"progress",{count:e}),"</strong>");t.getUI("smartCount").html(n)}),(function(n){window.clearTimeout(e),t.selectedVideoService.addSmartSelectedVideos(n),i.a.AppLinkHelper.trigger({application:g.b.MIGRATION_WIZARD,action:g.a.MigrationWizard.SMART})}))}},{key:"onSmartMigrationError",value:function(){i.a.ErrorHelper.throw(new v.a(this.config.get("supportSiteUrl")))}},{key:"onFinaliseError",value:function(){i.a.ErrorHelper.throw(new m.b)}},{key:"requiredResources",get:function(){return{config:y.b.config,currentUser:s.b.currentUser}}},{key:"renderSaveButton",value:function(){var t=new p.a({saveEvent:"continue",channelName:this.channelName,buttonText:o.a.getPhrase(this.lang,"continue"),extraButtonClass:"btn-lg btn-primary mt-3",spinnerOptions:{size:d.s.Medium,type:d.t.Light,extraClasses:"mx-auto"}});this.showChildView("save",t)}},{key:"onRender",value:function(){this.renderSaveButton()}}])&&j(e.prototype,n),O&&j(e,O),Object.defineProperty(e,"prototype",{writable:!1}),k}(i.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[47],{1072:function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var r=n(2),o=n(37),i=n(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 l(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?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function u(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"===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.bind():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&&c(t,e)}(s,t);var e,n,o,a=u(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,(n=[{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(){r.a.LocationUtils.Reload()}}])&&l(e.prototype,n),o&&l(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.a)},1109:function(t,e,n){"use strict";n(311);var r=n(2),o=n(37),i=n(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 l(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?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function u(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"===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.bind():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&&c(t,e)}(s,t);var e,n,o,a=u(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,(n=[{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(){r.a.LocationUtils.Reload()}}])&&l(e.prototype,n),o&&l(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.a);function g(t){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(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 b(t,e){return(b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function h(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=v(t);if(e){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(t,e){if(e&&("object"===g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var O=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&&b(t,e)}(l,t);var e,n,o,a=h(l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,i.a.getPhrase("migrationWizard.migrationProgressError","title"))}return e=l,(n=[{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(){r.a.LocationUtils.Reload()}}])&&d(e.prototype,n),o&&d(e,o),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.a);function w(t){return(w="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 S(t,e){return(S=Object.setPrototypeOf?Object.setPrototypeOf.bind():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 n,r=j(t);if(e){var o=j(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _(this,n)}}function _(t,e){if(e&&("object"===w(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 j(t){return(j=Object.setPrototypeOf?Object.getPrototypeOf.bind():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&&S(t,e)}(l,t);var e,n,o,a=k(l);function l(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,l),a.call(this,i.a.getPhrase("migrationWizard.migrationFinalisation","title"))}return e=l,(n=[{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(){r.a.LocationUtils.Reload()}}])&&P(e.prototype,n),o&&P(e,o),Object.defineProperty(e,"prototype",{writable:!1}),l}(o.a);n(1072);n.d(e,"a",(function(){return y})),n.d(e,"c",(function(){return O})),n.d(e,"b",(function(){return R})),n.d(e,"a",(function(){return y}))},1380:function(t,e,n){t.exports={start:"GpK3N",subtitle:"_2tQJA",options:"BxsJX",optionHeader:"_2OS3h",optionText:"_1sNAq",image:"xsCzA",infoMessage:"_3jOln",migrationBanner:"n_A_A",migrationBadge:"plIse",migrationContainer:"_33xeg"}},1381:function(t,e,n){var r=n(10);t.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,r,o){t.propertyIsEnumerable;var i,a=null!=e?e:t.nullContext||{},l=t.hooks.helperMissing,c=t.escapeExpression,u=t.lambda;return'<div class="m-4">\r\n <h4>'+c((n.lang||e&&e.lang||l).call(a,"heading",{name:"lang",hash:{},data:o}))+'</h4>\r\n <div class="text-left mt-3">\r\n <p class="'+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.subtitle:i,e))+' text-center">'+c((n.lang||e&&e.lang||l).call(a,"question",{name:"lang",hash:{},data:o}))+'</p>\r\n\r\n <img src="/images/migrate.png" class="'+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.image:i,e))+' w-50 d-block p-2">\r\n\r\n <p class="'+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.options:i,e))+' mt-3">'+c((n.lang||e&&e.lang||l).call(a,"options",{name:"lang",hash:{},data:o}))+'</p>\r\n\r\n <div class="mb-2">\r\n <input type="radio" class="d-inline-block align-top mt-1" id="smart" value="1" name="options">\r\n <label for="smart" class="mb-1 '+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.optionHeader:i,e))+'">'+c((n.lang||e&&e.lang||l).call(a,"smartOption",{name:"lang",hash:{},data:o}))+' <span class="badge '+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.migrationBadge:i,e))+' ml-2">'+c((n.lang||e&&e.lang||l).call(a,"recommended",{name:"lang",hash:{},data:o}))+'</span></label>\r\n <span class="d-block '+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.optionText:i,e))+'">'+c((n.lang||e&&e.lang||l).call(a,"smartOptionInfo",{name:"lang",hash:{},data:o}))+'</span>\r\n </div>\r\n <div class="mb-2">\r\n <input type="radio" class="d-inline-block align-top mt-1" id="all" value="3" name="options">\r\n <label for="all" class="mb-1 '+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.optionHeader:i,e))+'">'+c((n.lang||e&&e.lang||l).call(a,"allVideosOption",{name:"lang",hash:{},data:o}))+'</label>\r\n <span class="d-block '+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.optionText:i,e))+'">'+c((n.lang||e&&e.lang||l).call(a,"allVideosOptionInfo",{name:"lang",hash:{},data:o}))+'</span>\r\n </div>\r\n <div class="mb-2">\r\n <input type="radio" class="d-inline-block align-top mt-1" id="fresh" value="2" name="options">\r\n <label for="fresh" class="mb-1 '+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.optionHeader:i,e))+'">'+c((n.lang||e&&e.lang||l).call(a,"startFreshOption",{name:"lang",hash:{},data:o}))+'</label>\r\n <span class="d-block '+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.optionText:i,e))+'">'+c((n.lang||e&&e.lang||l).call(a,"startFreshOptionInfo",{name:"lang",hash:{},data:o}))+"</span>\r\n </div>\r\n <div>\r\n "+(null!=(i=(n.lang||e&&e.lang||l).call(a,"support",{name:"lang",hash:{supportUrl:null!=(i=null!=e?e.options:e)?i.supportUrl:i,className:"info-link"},data:o}))?i:"")+'\r\n </div>\r\n </div>\r\n\r\n <div class="save-region"></div>\r\n <div class="smart-select-waiting-message" style="display: none;">\r\n <p class="mt-2">'+c((n.lang||e&&e.lang||l).call(a,"waiting",{name:"lang",hash:{},data:o}))+'</p>\r\n <p class="mt-2 smart-count"></p>\r\n </div>\r\n</div>\r\n<div class="'+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.migrationBanner:i,e))+" p-3 text-white "+c(u(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.infoMessage:i,e))+'">\r\n '+c((n.lang||e&&e.lang||l).call(a,"note",{name:"lang",hash:{},data:o}))+"\r\n</div>"},useData:!0})},1465:function(t,e,n){"use strict";n.r(e),n.d(e,"StartView",(function(){return T}));var r=n(6),o=n(3),i=n(2),a=n(5),l=n(30),c=n(310),u=n(308),s=n(145),f=n(305),p=n(265),y=n(201),g=n(0),d=n(12),b=n(53),h=n(91),m=n(1109),v=n(1072),O=n(1380),w=n.n(O),P=n(1381),S=n.n(P);function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function j(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 R(t,e){return(R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function E(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 M(this,n)}}function M(t,e){if(e&&("object"===k(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.bind():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&&R(t,e)}(k,t);var e,n,O,P=E(k);function k(){return _(this,k),P.apply(this,arguments)}return e=k,(n=[{key:"initialize",value:function(){this.migrationVideoDataService=a.a.getInstance(g.g.MigrationVideo,this),this.selectedVideoService=a.a.getInstance(g.x.SelectedVideo,this),this.initViewModel(),this.listenTo(this.channelName,"continue",this.onClickContinue),this.listenTo(g.e.MIGRATION,"".concat(g.f.CUSTOMER_SMART_VIDEOS,":error"),this.onSmartMigrationError)}},{key:"name",get:function(){return"StartView"}},{key:"title",get:function(){return o.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.start"}},{key:"className",get:function(){return"".concat(w.a.migrationContainer," text-center bg-white ").concat(w.a.start)}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"template",get:function(){return S.a}},{key:"regions",value:function(){return{save:{el:".save-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"input[name=options]":"option"}}},{key:"behaviors",get:function(){return[{behaviorClass:f.f,bindViewModel:!0}]}},{key:"elements",get:function(){return{continue:".continue",waitingMessage:".smart-select-waiting-message",smartCount:".smart-count"}}},{key:"initViewModel",value:function(){this.viewModel=l.a.get("".concat(this.name,":viewmodel"),{option:b.c.Smart},{ctor:h.e})}},{key:"viewOptions",value:function(){var t,e;return{styles:w.a,supportUrl:c.a.getArticle(null===(t=this.config)||void 0===t?void 0:t.get("supportSiteUrl"),u.a.MigrationOptions,null===(e=this.currentUser)||void 0===e?void 0:e.get("countryCode"))}}},{key:"onClickContinue",value:function(){switch(this.listenTo(g.e.MIGRATION,"".concat(g.f.CUSTOMER_VIDEOS,":finalise:all:error"),this.onFinaliseError),r.Radio.channel(this.channelName).trigger(p.b.ShowSpinner),+this.viewModel.get("option")){case b.c.Smart:this.startSmartMigrationPaginated();break;case b.c.Full:this.startFullMigration();break;case b.c.Scratch:this.startScratchMigration()}}},{key:"startScratchMigration",value:function(){var t=this;this.migrationVideoDataService.updateCustomerMigrationOption(b.c.Scratch,(function(){t.migrationVideoDataService.clearCacheAndGetCustomerMetadata((function(){i.a.AppLinkHelper.trigger({application:g.b.LIBRARY_EDITOR,action:g.a.LibraryEditor.HOME})}))}))}},{key:"startFullMigration",value:function(){var t=this;this.migrationVideoDataService.updateCustomerMigrationOption(b.c.Full,(function(){t.migrationVideoDataService.finaliseAllVideos((function(e){t.migrationVideoDataService.getCustomerMetadata((function(t){t.set("finalisationTask",e.toJSON()),i.a.AppLinkHelper.trigger({application:g.b.MIGRATION_WIZARD,action:g.a.MigrationWizard.PROGRESS,args:[e.get("id")],params:{initialMigration:!0}})}))}))}))}},{key:"startSmartMigrationPaginated",value:function(){var t=this,e=window.setTimeout((function(){var e=t.getUI("waitingMessage");e&&e.show()}),2e3);this.selectedVideoService.removeAllSelectedVideos(),this.migrationVideoDataService.clearCacheAndgetCustomerSmartSelect((function(e){var n="<strong>".concat(o.a.getPhrase(t.lang,"progress",{count:e}),"</strong>");t.getUI("smartCount").html(n)}),(function(n){window.clearTimeout(e),t.selectedVideoService.addSmartSelectedVideos(n),i.a.AppLinkHelper.trigger({application:g.b.MIGRATION_WIZARD,action:g.a.MigrationWizard.SMART})}))}},{key:"onSmartMigrationError",value:function(){i.a.ErrorHelper.throw(new v.a(this.config.get("supportSiteUrl")))}},{key:"onFinaliseError",value:function(){i.a.ErrorHelper.throw(new m.b)}},{key:"requiredResources",get:function(){return{config:y.b.config,currentUser:s.b.currentUser}}},{key:"renderSaveButton",value:function(){var t=new p.a({saveEvent:"continue",channelName:this.channelName,buttonText:o.a.getPhrase(this.lang,"continue"),extraButtonClass:"btn-lg btn-primary mt-3",spinnerOptions:{size:d.s.Medium,type:d.t.Light,extraClasses:"mx-auto"}});this.showChildView("save",t)}},{key:"onRender",value:function(){this.renderSaveButton()}}])&&j(e.prototype,n),O&&j(e,O),Object.defineProperty(e,"prototype",{writable:!1}),k}(i.a.View)}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[48],{1043:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));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 u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function l(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 s(this,n)}}function s(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=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&&c(e,t)}(s,e);var t,n,r,i=l(s);function s(){return a(this,s),i.apply(this,arguments)}return t=s,(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}}])&&u(t.prototype,n),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.a.Model)},1192:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(3),i=n(53);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u="migrationWizard.utils",c={getReportOptions:function(){var e;return a(e={},i.d.Migrated,{id:"migrated",type:"homemigrator.le.migration.migrated.report",labelText:o.a.getPhrase(u,"migratedOption")}),a(e,i.d.Remaining,{id:"remaining",type:"homemigrator.le.migration.videos.remaining.report",labelText:o.a.getPhrase(u,"remainingOption")}),a(e,i.d.Errored,{id:"errored",type:"homemigrator.le.migration.error.report",labelText:o.a.getPhrase(u,"erroredOption")}),a(e,i.d.ContentMatched,{id:"content-matched",type:"homemigrator.le.migration.content.matched.report",labelText:o.a.getPhrase(u,"linkedOption")}),e},processValidReportOptions:function(e){var t=this.getReportOptions(),n={};return r.each(r.keys(t),(function(o){r.contains(e,t[o].type)&&(n[o]=t[o])})),n},filterSelectedOptions:function(e){return r.filter(r.keys(e),(function(t){return e[t].selected})).map((function(t){return e[t].id}))},getSelectedOptionsText:function(e){var t=this.getReportOptions();return r.filter(r.keys(t),(function(n){return r.contains(e,t[n].id)})).map((function(e){return t[e].labelText}))}}},1420:function(e,t,n){e.exports={image:"_2A7jn"}},1421:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return" <li>"+e.escapeExpression(e.lambda(t,t))+"</li>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,u=e.escapeExpression,c=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing;return'<div class="pb-3 text-center">\r\n <img src="'+u(a(null!=(i=null!=t?t.options:t)?i.imageUrl:i,t))+'" class="'+u(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.image:i,t))+'" />\r\n</div>\r\n<p class="m-0">'+u((n.lang||t&&t.lang||l).call(c,"reportInfo1",{name:"lang",hash:{},data:o}))+"</p>\r\n<ul>\r\n"+(null!=(i=n.each.call(c,null!=(i=null!=t?t.options:t)?i.reportOptions:i,{name:"each",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</ul>\r\n<p class="mt-2">'+(null!=(i=(n.lang||t&&t.lang||l).call(c,"reportInfo2",{name:"lang",hash:{email:null!=(i=null!=t?t.options:t)?i.email:i},data:o}))?i:"")+"</p>\r\n"},useData:!0})},1469:function(e,t,n){"use strict";n.r(t),n.d(t,"GenerateCsvReportView",(function(){return j}));var r=n(6),o=n(2),i=n(5),a=n(3),u=n(305),c=n(12),l=n(0),s=n(144),f=n(1043),p=n(265),y=n(1192),h=n(1420),b=n.n(h),d=n(1421),m=n.n(d);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(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?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=P(e);if(t){var o=P(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k(this,n)}}function k(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf.bind():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)}(d,e);var t,n,o,h=w(d);function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),h.call(this,e)}return t=d,(n=[{key:"initialize",value:function(){this.migrationVideoDataService=i.a.getInstance(l.g.MigrationVideo,this),this.bindListeners()}},{key:"name",get:function(){return"GenerateCsvReportView"}},{key:"title",get:function(){return a.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.generateCsvReport"}},{key:"channelName",get:function(){return c.k.generateUniqueChannelName(this)}},{key:"template",get:function(){return m.a}},{key:"behaviors",get:function(){return[{behaviorClass:u.e,title:a.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new f.a,saveEvent:"generate:csv",channelName:this.channelName,buttonText:a.a.getPhrase(this.lang,"generateReport"),extraButtonClass:"btn-primary",spinnerOptions:{size:c.s.Small,type:c.t.Light,extraClasses:"mx-auto"}}}]}},{key:"requiredResources",get:function(){return{currentUser:s.b.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"generate:csv",this.onClickGenerateCsv)}},{key:"onClickGenerateCsv",value:function(){var e=this;r.Radio.channel(this.channelName).trigger(p.b.ShowSpinner),this.migrationVideoDataService.generateMigrationReportCsv(this.options.options,(function(){return e.triggerMethod("hide")}))}},{key:"viewOptions",value:function(){return{styles:b.a,reportOptions:y.a.getSelectedOptionsText(this.options.options),imageUrl:l.l.Shared.GenerateCsv,email:this.currentUser.get("email")}}},{key:"onBeforeRender",value:function(){this.spinnerModel.set(p.c.Disabled,!1)}}])&&v(t.prototype,n),o&&v(t,o),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[48],{1045:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));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 u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return(c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function l(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 s(this,n)}}function s(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.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=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&&c(e,t)}(s,e);var t,n,r,i=l(s);function s(){return a(this,s),i.apply(this,arguments)}return t=s,(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}}])&&u(t.prototype,n),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(r.a.Model)},1194:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(3),i=n(53);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u="migrationWizard.utils",c={getReportOptions:function(){var e;return a(e={},i.d.Migrated,{id:"migrated",type:"homemigrator.le.migration.migrated.report",labelText:o.a.getPhrase(u,"migratedOption")}),a(e,i.d.Remaining,{id:"remaining",type:"homemigrator.le.migration.videos.remaining.report",labelText:o.a.getPhrase(u,"remainingOption")}),a(e,i.d.Errored,{id:"errored",type:"homemigrator.le.migration.error.report",labelText:o.a.getPhrase(u,"erroredOption")}),a(e,i.d.ContentMatched,{id:"content-matched",type:"homemigrator.le.migration.content.matched.report",labelText:o.a.getPhrase(u,"linkedOption")}),e},processValidReportOptions:function(e){var t=this.getReportOptions(),n={};return r.each(r.keys(t),(function(o){r.contains(e,t[o].type)&&(n[o]=t[o])})),n},filterSelectedOptions:function(e){return r.filter(r.keys(e),(function(t){return e[t].selected})).map((function(t){return e[t].id}))},getSelectedOptionsText:function(e){var t=this.getReportOptions();return r.filter(r.keys(t),(function(n){return r.contains(e,t[n].id)})).map((function(e){return t[e].labelText}))}}},1422:function(e,t,n){e.exports={image:"_2A7jn"}},1423:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return" <li>"+e.escapeExpression(e.lambda(t,t))+"</li>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,u=e.escapeExpression,c=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing;return'<div class="pb-3 text-center">\r\n <img src="'+u(a(null!=(i=null!=t?t.options:t)?i.imageUrl:i,t))+'" class="'+u(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.image:i,t))+'" />\r\n</div>\r\n<p class="m-0">'+u((n.lang||t&&t.lang||l).call(c,"reportInfo1",{name:"lang",hash:{},data:o}))+"</p>\r\n<ul>\r\n"+(null!=(i=n.each.call(c,null!=(i=null!=t?t.options:t)?i.reportOptions:i,{name:"each",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</ul>\r\n<p class="mt-2">'+(null!=(i=(n.lang||t&&t.lang||l).call(c,"reportInfo2",{name:"lang",hash:{email:null!=(i=null!=t?t.options:t)?i.email:i},data:o}))?i:"")+"</p>\r\n"},useData:!0})},1471:function(e,t,n){"use strict";n.r(t),n.d(t,"GenerateCsvReportView",(function(){return j}));var r=n(6),o=n(2),i=n(5),a=n(3),u=n(305),c=n(12),l=n(0),s=n(145),f=n(1045),p=n(265),y=n(1194),h=n(1422),b=n.n(h),d=n(1423),m=n.n(d);function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(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?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=P(e);if(t){var o=P(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return k(this,n)}}function k(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf.bind():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)}(d,e);var t,n,o,h=w(d);function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),h.call(this,e)}return t=d,(n=[{key:"initialize",value:function(){this.migrationVideoDataService=i.a.getInstance(l.g.MigrationVideo,this),this.bindListeners()}},{key:"name",get:function(){return"GenerateCsvReportView"}},{key:"title",get:function(){return a.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.generateCsvReport"}},{key:"channelName",get:function(){return c.k.generateUniqueChannelName(this)}},{key:"template",get:function(){return m.a}},{key:"behaviors",get:function(){return[{behaviorClass:u.e,title:a.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new f.a,saveEvent:"generate:csv",channelName:this.channelName,buttonText:a.a.getPhrase(this.lang,"generateReport"),extraButtonClass:"btn-primary",spinnerOptions:{size:c.s.Small,type:c.t.Light,extraClasses:"mx-auto"}}}]}},{key:"requiredResources",get:function(){return{currentUser:s.b.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"generate:csv",this.onClickGenerateCsv)}},{key:"onClickGenerateCsv",value:function(){var e=this;r.Radio.channel(this.channelName).trigger(p.b.ShowSpinner),this.migrationVideoDataService.generateMigrationReportCsv(this.options.options,(function(){return e.triggerMethod("hide")}))}},{key:"viewOptions",value:function(){return{styles:b.a,reportOptions:y.a.getSelectedOptionsText(this.options.options),imageUrl:l.l.Shared.GenerateCsv,email:this.currentUser.get("email")}}},{key:"onBeforeRender",value:function(){this.spinnerModel.set(p.c.Disabled,!1)}}])&&v(t.prototype,n),o&&v(t,o),Object.defineProperty(t,"prototype",{writable:!1}),d}(o.a.View)}}]);