@clickview/library-editor 1.1.25-rc.2 → 1.1.25-rc.4

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 (159) hide show
  1. package/dist/css/25.chunk.css +2 -0
  2. package/dist/en.json +1 -1
  3. package/dist/libs/analytics/src/interfaces/AnalyticsTypes.d.ts +1 -0
  4. package/dist/libs/shared/src/enums/WidgetContents.d.ts +3 -1
  5. package/dist/libs/shared/src/interfaces/models/Clip.d.ts +2 -1
  6. package/dist/libs/shared/src/interfaces/models/Interactive.d.ts +4 -0
  7. package/dist/projects/library-editor/src/app.d.ts +2 -0
  8. package/dist/projects/library-editor/src/apps/library-editor/views/video-details/VideoDetailsView.d.ts +2 -0
  9. package/dist/projects/library-editor/src/shared/components/screenrights-disclaimer/ScreenrightsDisclaimerComponent.d.ts +18 -0
  10. package/dist/scripts/{0-a4a2b6c3bd.chunk.js → 0-1c2bb7e28a.chunk.js} +1 -1
  11. package/dist/scripts/0-1dbc79e4e7.chunk.js +1 -0
  12. package/dist/scripts/{1-7fbeb68bb8.chunk.js → 1-6051b28de6.chunk.js} +1 -1
  13. package/dist/scripts/1-b85c11fc30.chunk.js +1 -0
  14. package/dist/scripts/{10-4a5f3c9702.chunk.js → 10-923c4b075a.chunk.js} +1 -1
  15. package/dist/scripts/10-e2fea45a6c.chunk.js +1 -0
  16. package/dist/scripts/{11-1c9df40232.chunk.js → 11-3dec7d2c7e.chunk.js} +1 -1
  17. package/dist/scripts/11-74bc3f2d9f.chunk.js +11 -0
  18. package/dist/scripts/{12-1f38b67e32.chunk.js → 12-07999b80e0.chunk.js} +1 -1
  19. package/dist/scripts/12-24bd360be0.chunk.js +1 -0
  20. package/dist/scripts/{13-86cbeb77cb.chunk.js → 13-081c0e5887.chunk.js} +1 -1
  21. package/dist/scripts/13-958a8fd026.chunk.js +1 -0
  22. package/dist/scripts/14-16f84b2721.chunk.js +1 -0
  23. package/dist/scripts/{14-9cf0887b65.chunk.js → 14-45cd4dc6ef.chunk.js} +1 -1
  24. package/dist/scripts/{15-6515f3f172.chunk.js → 15-12fa4c3471.chunk.js} +1 -1
  25. package/dist/scripts/15-8c96c3288e.chunk.js +1 -0
  26. package/dist/scripts/{16-ab912b4a8c.chunk.js → 16-670c43d26f.chunk.js} +1 -1
  27. package/dist/scripts/16-7bcffb06e7.chunk.js +1 -0
  28. package/dist/scripts/{17-ecfedb0bf1.chunk.js → 17-140fec014b.chunk.js} +1 -1
  29. package/dist/scripts/17-b5e44e8b17.chunk.js +1 -0
  30. package/dist/scripts/{2-c2310c1339.chunk.js → 2-0c5fba8b60.chunk.js} +1 -1
  31. package/dist/scripts/2-7cc9176e8a.chunk.js +1 -0
  32. package/dist/scripts/{20-af0a5a2512.chunk.js → 20-4d88ede0e0.chunk.js} +1 -1
  33. package/dist/scripts/20-732a7a549d.chunk.js +1 -0
  34. package/dist/scripts/{21-59ed31ffc5.chunk.js → 21-0b84d33cef.chunk.js} +1 -1
  35. package/dist/scripts/21-ee85b6d208.chunk.js +1 -0
  36. package/dist/scripts/{22-347456c689.chunk.js → 22-3b2207c8f6.chunk.js} +1 -1
  37. package/dist/scripts/22-6e6ed9f607.chunk.js +1 -0
  38. package/dist/scripts/{23-ebd9557286.chunk.js → 23-1af21bf234.chunk.js} +1 -1
  39. package/dist/scripts/23-94f9fe4222.chunk.js +1 -0
  40. package/dist/scripts/{24-e16d0547e9.chunk.js → 24-74ab289589.chunk.js} +1 -1
  41. package/dist/scripts/24-7aa9b43511.chunk.js +1 -0
  42. package/dist/scripts/{25-92f6215cb3.chunk.js → 25-5a38ce3533.chunk.js} +1 -1
  43. package/dist/scripts/25-76d9011eea.chunk.js +1 -0
  44. package/dist/scripts/{26-8a977a08e5.chunk.js → 26-d166e3c313.chunk.js} +1 -1
  45. package/dist/scripts/26-ea028a6276.chunk.js +1 -0
  46. package/dist/scripts/{27-85df941a2d.chunk.js → 27-2109d41afa.chunk.js} +1 -1
  47. package/dist/scripts/27-c1241fcd84.chunk.js +1 -0
  48. package/dist/scripts/{28-f80c699fd6.chunk.js → 28-5c540e74cc.chunk.js} +1 -1
  49. package/dist/scripts/28-e490147f6b.chunk.js +1 -0
  50. package/dist/scripts/{29-fc294d0849.chunk.js → 29-2da59b1589.chunk.js} +1 -1
  51. package/dist/scripts/29-69389908f8.chunk.js +1 -0
  52. package/dist/scripts/{3-6349335935.chunk.js → 3-6e67dd4b74.chunk.js} +1 -1
  53. package/dist/scripts/3-81b501ac1e.chunk.js +1 -0
  54. package/dist/scripts/{30-614613e387.chunk.js → 30-9d32d88d76.chunk.js} +1 -1
  55. package/dist/scripts/30-fa390c35f6.chunk.js +1 -0
  56. package/dist/scripts/{31-9b9810e4b9.chunk.js → 31-ce31250e42.chunk.js} +1 -1
  57. package/dist/scripts/31-f15802825c.chunk.js +1 -0
  58. package/dist/scripts/{32-ea2d20688f.chunk.js → 32-1ad8193581.chunk.js} +1 -1
  59. package/dist/scripts/32-4173874dbe.chunk.js +1 -0
  60. package/dist/scripts/{33-48146a93d0.chunk.js → 33-20ac0ab4a1.chunk.js} +1 -1
  61. package/dist/scripts/33-350334db4c.chunk.js +1 -0
  62. package/dist/scripts/{34-de371c7472.chunk.js → 34-c4f0495750.chunk.js} +1 -1
  63. package/dist/scripts/34-f6eea83a09.chunk.js +1 -0
  64. package/dist/scripts/{35-ab09598a5e.chunk.js → 35-17b30890a5.chunk.js} +1 -1
  65. package/dist/scripts/35-9c3899dfbd.chunk.js +1 -0
  66. package/dist/scripts/{36-a721ef081a.chunk.js → 36-2ec95df618.chunk.js} +1 -1
  67. package/dist/scripts/36-b5ad543fba.chunk.js +1 -0
  68. package/dist/scripts/{37-bc8245a60f.chunk.js → 37-3f3a603b60.chunk.js} +1 -1
  69. package/dist/scripts/37-6fa4b8fc60.chunk.js +1 -0
  70. package/dist/scripts/{38-0bbac3f327.chunk.js → 38-6fc346f964.chunk.js} +1 -1
  71. package/dist/scripts/38-7ffe535b0d.chunk.js +1 -0
  72. package/dist/scripts/{39-9795f31fd0.chunk.js → 39-13d6669c3f.chunk.js} +1 -1
  73. package/dist/scripts/39-71c4bb46b2.chunk.js +1 -0
  74. package/dist/scripts/{4-cb2a8dd5c5.chunk.js → 4-435484d217.chunk.js} +1 -1
  75. package/dist/scripts/4-85ba8523ad.chunk.js +1 -0
  76. package/dist/scripts/{40-fbd60b155a.chunk.js → 40-a691a401ff.chunk.js} +1 -1
  77. package/dist/scripts/40-f1d72b1049.chunk.js +1 -0
  78. package/dist/scripts/{41-76b58a8008.chunk.js → 41-0368ba16dc.chunk.js} +1 -1
  79. package/dist/scripts/41-85fcb15184.chunk.js +1 -0
  80. package/dist/scripts/{42-b11b8c5c55.chunk.js → 42-3ef41f40f5.chunk.js} +1 -1
  81. package/dist/scripts/42-61a626d7f4.chunk.js +1 -0
  82. package/dist/scripts/{43-09ce311680.chunk.js → 43-2fe5b1c9cc.chunk.js} +1 -1
  83. package/dist/scripts/43-49f13dab14.chunk.js +1 -0
  84. package/dist/scripts/{44-cd7d2a83da.chunk.js → 44-0703eb0ad8.chunk.js} +1 -1
  85. package/dist/scripts/44-ee6a740a16.chunk.js +1 -0
  86. package/dist/scripts/{45-73ba6fa3cf.chunk.js → 45-806dd5b78c.chunk.js} +1 -1
  87. package/dist/scripts/45-e4a92a40fd.chunk.js +1 -0
  88. package/dist/scripts/{46-4111e431b3.chunk.js → 46-4aa05464fe.chunk.js} +1 -1
  89. package/dist/scripts/46-cccef3e874.chunk.js +1 -0
  90. package/dist/scripts/{47-9c0dff1aba.chunk.js → 47-1e3d829757.chunk.js} +1 -1
  91. package/dist/scripts/47-c61fa52c53.chunk.js +1 -0
  92. package/dist/scripts/{48-383d86be74.chunk.js → 48-877e9e02b8.chunk.js} +1 -1
  93. package/dist/scripts/48-e05ab3ecac.chunk.js +1 -0
  94. package/dist/scripts/49-4a6c119f58.chunk.js +1 -0
  95. package/dist/scripts/{49-0022ee9cb4.chunk.js → 49-f9151c7e06.chunk.js} +1 -1
  96. package/dist/scripts/5-1ba89c4774.chunk.js +1 -0
  97. package/dist/scripts/{5-30bdab1fb6.chunk.js → 5-515b264fbc.chunk.js} +1 -1
  98. package/dist/scripts/{50-5344223128.chunk.js → 50-0741587a02.chunk.js} +1 -1
  99. package/dist/scripts/50-3924907655.chunk.js +1 -0
  100. package/dist/scripts/{51-cdc41ed2aa.chunk.js → 51-a5f1309ada.chunk.js} +1 -1
  101. package/dist/scripts/51-ea33746146.chunk.js +1 -0
  102. package/dist/scripts/{52-6be7674ae7.chunk.js → 52-50230b48c8.chunk.js} +1 -1
  103. package/dist/scripts/52-bc48f1f9e8.chunk.js +1 -0
  104. package/dist/scripts/{53-2e0636fd3d.chunk.js → 53-0e253f9f3e.chunk.js} +1 -1
  105. package/dist/scripts/53-36007500cf.chunk.js +1 -0
  106. package/dist/scripts/{54-e04b2608dc.chunk.js → 54-7cdbdcebf9.chunk.js} +1 -1
  107. package/dist/scripts/54-d1bc70c7b5.chunk.js +1 -0
  108. package/dist/scripts/{55-528e7df3ee.chunk.js → 55-3c60601030.chunk.js} +1 -1
  109. package/dist/scripts/55-e29d6a6ba9.chunk.js +1 -0
  110. package/dist/scripts/{56-6ad0985763.chunk.js → 56-36d54fa08f.chunk.js} +1 -1
  111. package/dist/scripts/56-370078d597.chunk.js +1 -0
  112. package/dist/scripts/{57-3816402932.chunk.js → 57-a4f4d6fe41.chunk.js} +1 -1
  113. package/dist/scripts/57-c1faec8b32.chunk.js +1 -0
  114. package/dist/scripts/{58-b6e8c901b9.chunk.js → 58-17706ccb46.chunk.js} +1 -1
  115. package/dist/scripts/58-a0fe201826.chunk.js +1 -0
  116. package/dist/scripts/{59-09beaa76ca.chunk.js → 59-0a7bdc86b0.chunk.js} +1 -1
  117. package/dist/scripts/59-4f2fcb6412.chunk.js +1 -0
  118. package/dist/scripts/{6-de4014bef6.chunk.js → 6-51a379e066.chunk.js} +1 -1
  119. package/dist/scripts/6-b3d36065dc.chunk.js +1 -0
  120. package/dist/scripts/{60-1632b0f38f.chunk.js → 60-0d8896555f.chunk.js} +1 -1
  121. package/dist/scripts/60-c57f161f18.chunk.js +1 -0
  122. package/dist/scripts/{61-2a01ca4079.chunk.js → 61-5d6e59d408.chunk.js} +1 -1
  123. package/dist/scripts/61-7d81d27c31.chunk.js +1 -0
  124. package/dist/scripts/{62-a5d84c95f6.chunk.js → 62-758f5e505b.chunk.js} +1 -1
  125. package/dist/scripts/62-f5fd35fdc0.chunk.js +1 -0
  126. package/dist/scripts/{63-dd8ef946d1.chunk.js → 63-6700b4d00a.chunk.js} +1 -1
  127. package/dist/scripts/63-c88b9860e9.chunk.js +1 -0
  128. package/dist/scripts/{64-51a86e8b9d.chunk.js → 64-9c88ee6161.chunk.js} +1 -1
  129. package/dist/scripts/64-e177d4c971.chunk.js +1 -0
  130. package/dist/scripts/{65-8d0cc95f45.chunk.js → 65-93567fe088.chunk.js} +1 -1
  131. package/dist/scripts/65-f750573f69.chunk.js +1 -0
  132. package/dist/scripts/{66-a2799a0335.chunk.js → 66-c84a3a3c3f.chunk.js} +1 -1
  133. package/dist/scripts/66-f6d213b33c.chunk.js +1 -0
  134. package/dist/scripts/{67-4d5ad4433e.chunk.js → 67-97c694c3d5.chunk.js} +1 -1
  135. package/dist/scripts/67-c5af18680c.chunk.js +1 -0
  136. package/dist/scripts/{68-3ad046babc.chunk.js → 68-7b1d5e8e75.chunk.js} +1 -1
  137. package/dist/scripts/68-eb8700aeb1.chunk.js +1 -0
  138. package/dist/scripts/{69-473acc7355.chunk.js → 69-3d2063cd0f.chunk.js} +1 -1
  139. package/dist/scripts/69-b0ea71d7c5.chunk.js +1 -0
  140. package/dist/scripts/{7-ec813915e4.chunk.js → 7-3151397d74.chunk.js} +1 -1
  141. package/dist/scripts/7-aac8c84ccb.chunk.js +1 -0
  142. package/dist/scripts/{70-e4621c1b09.chunk.js → 70-27e9e5792a.chunk.js} +1 -1
  143. package/dist/scripts/70-39dc936989.chunk.js +1 -0
  144. package/dist/scripts/{71-66838d7dc9.chunk.js → 71-8e3682a7d7.chunk.js} +1 -1
  145. package/dist/scripts/71-a80858069c.chunk.js +1 -0
  146. package/dist/scripts/{72-7a394ea64f.chunk.js → 72-550438db4e.chunk.js} +1 -1
  147. package/dist/scripts/72-65364adff1.chunk.js +1 -0
  148. package/dist/scripts/8-d46f48d03c.chunk.js +1 -0
  149. package/dist/scripts/{8-9afbbfa151.chunk.js → 8-e5d19252c8.chunk.js} +1 -1
  150. package/dist/scripts/9-4589726554.chunk.js +1 -0
  151. package/dist/scripts/{9-dbc4581d0f.chunk.js → 9-df99ba6ce1.chunk.js} +1 -1
  152. package/dist/scripts/bundle-1b984e2fd9.min.js +8 -0
  153. package/dist/scripts/bundle-d5b23160b1.min.js +8 -0
  154. package/dist/scripts/bundles.json +2 -2
  155. package/dist/scripts/polyfills-9b0be1bd72.min.js +1 -0
  156. package/dist/scripts/polyfills-cd3d0a9f6d.min.js +1 -0
  157. package/package.json +2 -2
  158. package/dist/scripts/bundle-4319e3c712.min.js +0 -8
  159. package/dist/scripts/polyfills-166a090fdf.min.js +0 -1
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[0],{1034:function(t,e,n){t.exports={dragItem:"_2TIZ7",svgContainer:"_3JzEU",dragText:"_1Kdwj"}},1035:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda,a=t.escapeExpression;return'<span class="'+a(s(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.svgContainer:i,e))+' mr-2">'+(null!=(i=s(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'</span>\r\n<span class="'+a(s(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.dragText:i,e))+'">'+a(s(null!=(i=null!=e?e.options:e)?i.text:i,e))+"</span>"},useData:!0})},1049:function(t,e,n){"use strict";var o=n(1034),r=n.n(o),i=n(1035),s=n.n(i);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function c(t,e){return(c=Object.setPrototypeOf||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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=f(t);if(e){var r=f(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return p(this,n)}}function p(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(a,t);var e,n,o,i=u(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,t)}return e=a,(n=[{key:"viewOptions",value:function(){return Object.assign({styles:r.a},this.options)}},{key:"name",get:function(){return"DraggableItemComponent"}},{key:"template",get:function(){return s.a}},{key:"className",get:function(){return"".concat(r.a.dragItem," p-3")}}])&&l(e.prototype,n),o&&l(e,o),a}(n(2).a.Component),d={delay:150,cursorAt:{left:-20,top:10},refreshPositions:!0};n.d(e,"c",(function(){return r.a})),n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return d}))},1060:function(t,e,n){"use strict";var o=n(1),r=n(2),i=n(6),s=n(15),a=n(4),l=n(13),c=n(0),u=n(1091),p=n(1094),f=n(1224),h=n.n(f);function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=m(t);if(e){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(t,e){return!e||"object"!==d(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var k=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(g,t);var e,n,f,d=v(g);function g(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g),d.call(this,t)}return e=g,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:name",this.render);var t=this.getChildren();t&&this.listenTo(t,"add remove",this.render),this.listenTo(this,"open:sub:folders",this.onOpenSubFolders)}},{key:"events",value:function(){return{"click .ui-node":"onClick"}}},{key:"regions",value:function(){return{children:{el:"ul",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"hasChildren",value:function(){var t=this.getChildren();return!!t&&!!t.length}},{key:"getChildren",value:function(){return this.options.childrenProperty?this.model.get(this.options.childrenProperty):null}},{key:"getText",value:function(){return this.options.textProperty?this.model.get(this.options.textProperty):this.model.get("name")}},{key:"isSelected",value:function(){return l.f.isSelected(this.options.folderTreeId,this.model.get("id"))}},{key:"isParent",value:function(){return l.f.isParent(this.options.folderTreeId,this.model.get("id"))}},{key:"isDisabled",value:function(){return this.options.disabledIds&&this.options.disabledIds[this.model.get("id").toString()]}},{key:"getAnchorClass",value:function(){var t="position-relative ".concat(this.options.styles.node);return this.isSelected()?t+=" text-white font-weight-bold":this.isDisabled()?t+=" text-muted":t+=" text-dark",t}},{key:"getAppLink",value:function(){if(!this.options.appLink)return{};var t=this.options.linkArgs,e=this.options.linkParams;return{application:this.options.appLink.application,action:this.options.appLink.action,args:o.isFunction(t)?t(this.model):null,params:o.isFunction(e)?e(this.model):null}}},{key:"onClick",value:function(t){t.stopPropagation();var e=this.getRegion("children"),n=i.Radio.channel(this.options.channelName);if(this.isDisabled()||(this.$el.addClass(this.options.styles.selected),this.getUI("text").addClass("text-white font-weight-bold")),this.options.isSelector&&n.trigger("folder:selected",this.model,this.isDisabled()),this.isDisabled()||this.isSelected()&&this.isCurrentPath()){if(t.stopImmediatePropagation(),t.preventDefault(),!this.hasChildren())return void(this.options.isSelector&&n.trigger("re:render:selector"));var o=!e.hasView();return o?this.openChildren():this.closeChildren(),void(this.options.isSelector&&o&&n.trigger("re:render:selector"))}this.hasChildren()&&(this.openChildren(),this.options.isSelector&&i.Radio.channel(this.options.channelName).trigger("re:render:selector"))}},{key:"isCurrentPath",value:function(){var t=r.a.AppLinkHelper.getCurrentAppLink(),e=this.getAppLink();return!o.keys(e).length||t.application===e.application&&t.action===e.action}},{key:"closeChildren",value:function(){var t=this.getRegion("children");this.$el.addClass(this.options.styles.collapsed),this.$el.removeClass(this.options.styles.parent),t.empty()}},{key:"openChildren",value:function(){this.$el.removeClass(this.options.styles.collapsed),this.renderChildren()}},{key:"onOpenSubFolders",value:function(t){this.renderedSubChildren||this.renderChildren(t)}},{key:"renderChildren",value:function(t){var e=this.getChildren();if(e&&e.length){var n={styles:this.options.styles,channelName:this.options.channelName,appLink:this.options.appLink,linkArgs:this.options.linkArgs,linkParams:this.options.linkParams,childrenProperty:this.options.childrenProperty,textProperty:this.options.textProperty,actions:this.options.actions,folderTreeId:this.options.folderTreeId,analyticsOptions:this.options.analyticsOptions,extraClass:this.options.extraClass,isSelector:this.options.isSelector,disabledIds:this.options.disabledIds};n.extraClasses=t,n.collection=e,this.showChildView("children",new D(n)),this.renderedSubChildren=!0}}},{key:"viewOptions",value:function(){var t="".concat(this.options.styles.item," ").concat(this.options.styles.customItem||"");return this.isDisabled()&&this.renderedSubChildren&&(t+=" ".concat(this.options.styles.disabledActive)),{children:this.getChildren(),itemClass:t,anchorClass:this.getAnchorClass(),caretClass:this.options.styles.caret,showCaret:this.hasChildren(),svg:s.a.getSvg(s.b.Caret),extraClasses:this.options.extraClasses,textStyle:this.options.styles.text,text:this.getText()}}},{key:"onRender",value:function(){this.resetClassName(),this.options.actions&&this.showChildView("actions",new this.options.actions({model:this.model,extraClasses:"rounded-circle mr-1 ".concat(this.options.styles.actions),buttonClass:"text-muted",analyticsOptions:this.options.analyticsOptions})),(this.isSelected()||this.isParent())&&this.renderChildren()}},{key:"name",get:function(){return"LeftNavNodeComponent"}},{key:"elements",get:function(){return{anchor:".ui-node",text:".ui-text"}}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var t="position-relative";return this.isSelected()&&(t+=" ".concat(this.options.styles.selected)),this.isParent()&&(t+=" ".concat(this.options.styles.parent)),t}},{key:"behaviors",get:function(){return this.options.isSelector?[]:[{behaviorClass:u.a,ui:"anchor",channelNames:[c.w.VIDEO_DRAG_DROP,c.w.FOLDER_DRAG_DROP],analyticsOptions:{location:a.k.LeftNav}},{behaviorClass:p.a}]}},{key:"appLinks",get:function(){return this.options.appLink?{"@ui.anchor":this.getAppLink()}:{}}},{key:"template",get:function(){return h.a}}])&&y(e.prototype,n),f&&y(e,f),g}(r.a.Component),w=n(1188),C=n.n(w);function O(t){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function S(t,e){return(S=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function P(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=R(t);if(e){var r=R(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return x(this,n)}}function x(t,e){return!e||"object"!==O(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",(function(){return D}));var D=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&S(t,e)}(s,t);var e,n,r,i=P(s);function s(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),t.styles=o.extend({},C.a,t.styles),i.call(this,t)}return e=s,(n=[{key:"name",get:function(){return"LeftNavComponent"}},{key:"tagName",get:function(){return"ul"}},{key:"childView",get:function(){return k}},{key:"className",get:function(){var t="".concat(this.options.styles.folderTree," position-relative");return this.options.extraClass?"".concat(t," ").concat(this.options.extraClass):t}},{key:"viewComparator",get:function(){return function(t){var e;return null===(e=t.get("name"))||void 0===e?void 0:e.toLowerCase()}}},{key:"childViewOptions",get:function(){return{styles:this.options.styles,channelName:this.options.channelName,appLink:this.options.appLink,linkArgs:this.options.linkArgs,linkParams:this.options.linkParams,childrenProperty:this.options.childrenProperty,textProperty:this.options.textProperty,actions:this.options.actions,extraClass:this.options.extraClass,folderTreeId:this.options.folderTreeId,analyticsOptions:this.options.analyticsOptions,isSelector:this.options.isSelector,disabledIds:this.options.disabledIds}}}])&&_(e.prototype,n),r&&_(e,r),s}(r.a.ComponentCollection)},1091:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var o=n(1),r=n(6),i=n(2),s=n(145);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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=h(t);if(e){var r=h(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return f(this,n)}}function f(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(f,t);var e,n,i,a=p(f);function f(){return l(this,f),a.apply(this,arguments)}return e=f,(n=[{key:"getDroppableElement",value:function(){return this.options.ui?this.view.getUI(this.options.ui):this.$el}},{key:"drop",value:function(){var t=this;o.each(this.options.channelNames,(function(e){r.Radio.channel(e).trigger("drag:drop",t.view.model,t.options.analyticsOptions)}))}},{key:"accept",value:function(){var t=this,e=!1;return o.each(this.options.channelNames,(function(n){!0===r.Radio.channel(n).request("accept",t.view.model)&&(e=!0)})),e}},{key:"over",value:function(){var t=this;this.isHoveringOver=!0,window.setTimeout((function(){t.isHoveringOver&&t.view.trigger("open:sub:folders",s.active)}),500)}},{key:"out",value:function(){this.isHoveringOver=!1}},{key:"onRender",value:function(){var t={tolerance:"pointer",drop:o.bind(this.drop,this),accept:o.bind(this.accept,this),over:o.bind(this.over,this),out:o.bind(this.out,this)};t.classes={"ui-droppable":s.droppable,"ui-droppable-active":s.active,"ui-droppable-hover":s.hover},this.getDroppableElement().droppable(t)}},{key:"onBeforeDestroy",value:function(){this.getDroppableElement().droppable("instance")&&this.getDroppableElement().droppable("destroy")}}])&&c(e.prototype,n),i&&c(e,i),f}(i.a.Behavior)},1094:function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var o=n(1),r=n(6),i=n(2),s=n(15),a=n(0),l=n(1049),c=n(1100),u=n.n(c);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 f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=v(t);if(e){var r=v(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return b(this,n)}}function b(t,e){return!e||"object"!==p(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var 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}}),e&&d(t,e)}(p,t);var e,n,i,c=y(p);function p(){return f(this,p),c.apply(this,arguments)}return e=p,(n=[{key:"getClassMappings",value:function(){return{"ui-draggable":l.c.draggable,"ui-draggable-handle":l.c.handle,"ui-draggable-disabled":l.c.disabled,"ui-draggable-dragging":l.c.dragging}}},{key:"helper",value:function(){return new l.b({text:this.view.model.get("name"),svg:s.a.getSvg(s.b.Folder)}).render().el}},{key:"start",value:function(){r.Radio.channel(a.w.FOLDER_DRAG_DROP).trigger("drag:start",this.view.model),this.view.$el.addClass(u.a.draggingFolder)}},{key:"stop",value:function(){r.Radio.channel(a.w.FOLDER_DRAG_DROP).trigger("drag:stop"),this.view.$el.removeClass(u.a.draggingFolder)}},{key:"onRender",value:function(){var t={helper:o.bind(this.helper,this),start:o.bind(this.start,this),stop:o.bind(this.stop,this)};t.classes=this.getClassMappings(),this.view.$el.draggable(o.extend({},l.a,t))}},{key:"onBeforeDestroy",value:function(){this.view.$el.draggable("instance")&&this.view.$el.draggable("destroy")}}])&&h(e.prototype,n),i&&h(e,i),p}(i.a.Behavior)},1100:function(t,e,n){t.exports={dragging:"_2wBn3",draggingFolder:"_1r3AS"}},1188:function(t,e,n){t.exports={folderTree:"_1inFA",text:"_2ovSq",caret:"_2pwp9",library:"_2WHiz",selected:"_200l0",parent:"_205QS",disabledActive:"_25EPE",disabled:"_387cT",collapsed:"_1-_q7",actions:"_3Il7t",node:"_23bpP",libraryContainer:"EuNKs",item:"ahYSz"}},1224:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda;return' <span class="'+t.escapeExpression(s(null!=(i=null!=e?e.options:e)?i.caretClass:i,e))+' d-inline-block position-absolute">\r\n '+(null!=(i=s(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+"\r\n </span>\r\n"},3:function(t,e,n,o,r){return"<ul></ul>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda,a=t.escapeExpression,l=null!=e?e:t.nullContext||{};return'<div class="position-relative '+a(s(null!=(i=null!=e?e.options:e)?i.itemClass:i,e))+'">\r\n <a class="'+a(s(null!=(i=null!=e?e.options:e)?i.anchorClass:i,e))+' d-block ui-node">\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=e?e.options:e)?i.showCaret:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")+' <span class="'+a(s(null!=(i=null!=e?e.options:e)?i.textStyle:i,e))+" ui-text "+a(s(null!=(i=null!=e?e.options:e)?i.extraClasses:i,e))+'">'+a(s(null!=(i=null!=e?e.options:e)?i.text:i,e))+'</span>\r\n </a>\r\n <div class="actions-region"></div>\r\n</div>\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=(i=null!=e?e.options:e)?i.children:i)?i.length:i,{name:"if",hash:{},fn:t.program(3,r,0),inverse:t.noop,data:r}))?i:"")},useData:!0})}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[0],{1036:function(t,e,n){t.exports={dragItem:"_2TIZ7",svgContainer:"_3JzEU",dragText:"_1Kdwj"}},1037:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda,a=t.escapeExpression;return'<span class="'+a(s(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.svgContainer:i,e))+' mr-2">'+(null!=(i=s(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'</span>\r\n<span class="'+a(s(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.dragText:i,e))+'">'+a(s(null!=(i=null!=e?e.options:e)?i.text:i,e))+"</span>"},useData:!0})},1051:function(t,e,n){"use strict";var o=n(1036),r=n.n(o),i=n(1037),s=n.n(i);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function c(t,e){return(c=Object.setPrototypeOf||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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=f(t);if(e){var r=f(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return p(this,n)}}function p(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(a,t);var e,n,o,i=u(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,t)}return e=a,(n=[{key:"viewOptions",value:function(){return Object.assign({styles:r.a},this.options)}},{key:"name",get:function(){return"DraggableItemComponent"}},{key:"template",get:function(){return s.a}},{key:"className",get:function(){return"".concat(r.a.dragItem," p-3")}}])&&l(e.prototype,n),o&&l(e,o),a}(n(2).a.Component),d={delay:150,cursorAt:{left:-20,top:10},refreshPositions:!0};n.d(e,"c",(function(){return r.a})),n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return d}))},1062:function(t,e,n){"use strict";var o=n(1),r=n(2),i=n(6),s=n(15),a=n(4),l=n(13),c=n(0),u=n(1093),p=n(1096),f=n(1226),h=n.n(f);function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=m(t);if(e){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(t,e){return!e||"object"!==d(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var k=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(g,t);var e,n,f,d=v(g);function g(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g),d.call(this,t)}return e=g,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:name",this.render);var t=this.getChildren();t&&this.listenTo(t,"add remove",this.render),this.listenTo(this,"open:sub:folders",this.onOpenSubFolders)}},{key:"events",value:function(){return{"click .ui-node":"onClick"}}},{key:"regions",value:function(){return{children:{el:"ul",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"hasChildren",value:function(){var t=this.getChildren();return!!t&&!!t.length}},{key:"getChildren",value:function(){return this.options.childrenProperty?this.model.get(this.options.childrenProperty):null}},{key:"getText",value:function(){return this.options.textProperty?this.model.get(this.options.textProperty):this.model.get("name")}},{key:"isSelected",value:function(){return l.f.isSelected(this.options.folderTreeId,this.model.get("id"))}},{key:"isParent",value:function(){return l.f.isParent(this.options.folderTreeId,this.model.get("id"))}},{key:"isDisabled",value:function(){return this.options.disabledIds&&this.options.disabledIds[this.model.get("id").toString()]}},{key:"getAnchorClass",value:function(){var t="position-relative ".concat(this.options.styles.node);return this.isSelected()?t+=" text-white font-weight-bold":this.isDisabled()?t+=" text-muted":t+=" text-dark",t}},{key:"getAppLink",value:function(){if(!this.options.appLink)return{};var t=this.options.linkArgs,e=this.options.linkParams;return{application:this.options.appLink.application,action:this.options.appLink.action,args:o.isFunction(t)?t(this.model):null,params:o.isFunction(e)?e(this.model):null}}},{key:"onClick",value:function(t){t.stopPropagation();var e=this.getRegion("children"),n=i.Radio.channel(this.options.channelName);if(this.isDisabled()||(this.$el.addClass(this.options.styles.selected),this.getUI("text").addClass("text-white font-weight-bold")),this.options.isSelector&&n.trigger("folder:selected",this.model,this.isDisabled()),this.isDisabled()||this.isSelected()&&this.isCurrentPath()){if(t.stopImmediatePropagation(),t.preventDefault(),!this.hasChildren())return void(this.options.isSelector&&n.trigger("re:render:selector"));var o=!e.hasView();return o?this.openChildren():this.closeChildren(),void(this.options.isSelector&&o&&n.trigger("re:render:selector"))}this.hasChildren()&&(this.openChildren(),this.options.isSelector&&i.Radio.channel(this.options.channelName).trigger("re:render:selector"))}},{key:"isCurrentPath",value:function(){var t=r.a.AppLinkHelper.getCurrentAppLink(),e=this.getAppLink();return!o.keys(e).length||t.application===e.application&&t.action===e.action}},{key:"closeChildren",value:function(){var t=this.getRegion("children");this.$el.addClass(this.options.styles.collapsed),this.$el.removeClass(this.options.styles.parent),t.empty()}},{key:"openChildren",value:function(){this.$el.removeClass(this.options.styles.collapsed),this.renderChildren()}},{key:"onOpenSubFolders",value:function(t){this.renderedSubChildren||this.renderChildren(t)}},{key:"renderChildren",value:function(t){var e=this.getChildren();if(e&&e.length){var n={styles:this.options.styles,channelName:this.options.channelName,appLink:this.options.appLink,linkArgs:this.options.linkArgs,linkParams:this.options.linkParams,childrenProperty:this.options.childrenProperty,textProperty:this.options.textProperty,actions:this.options.actions,folderTreeId:this.options.folderTreeId,analyticsOptions:this.options.analyticsOptions,extraClass:this.options.extraClass,isSelector:this.options.isSelector,disabledIds:this.options.disabledIds};n.extraClasses=t,n.collection=e,this.showChildView("children",new D(n)),this.renderedSubChildren=!0}}},{key:"viewOptions",value:function(){var t="".concat(this.options.styles.item," ").concat(this.options.styles.customItem||"");return this.isDisabled()&&this.renderedSubChildren&&(t+=" ".concat(this.options.styles.disabledActive)),{children:this.getChildren(),itemClass:t,anchorClass:this.getAnchorClass(),caretClass:this.options.styles.caret,showCaret:this.hasChildren(),svg:s.a.getSvg(s.b.Caret),extraClasses:this.options.extraClasses,textStyle:this.options.styles.text,text:this.getText()}}},{key:"onRender",value:function(){this.resetClassName(),this.options.actions&&this.showChildView("actions",new this.options.actions({model:this.model,extraClasses:"rounded-circle mr-1 ".concat(this.options.styles.actions),buttonClass:"text-muted",analyticsOptions:this.options.analyticsOptions})),(this.isSelected()||this.isParent())&&this.renderChildren()}},{key:"name",get:function(){return"LeftNavNodeComponent"}},{key:"elements",get:function(){return{anchor:".ui-node",text:".ui-text"}}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var t="position-relative";return this.isSelected()&&(t+=" ".concat(this.options.styles.selected)),this.isParent()&&(t+=" ".concat(this.options.styles.parent)),t}},{key:"behaviors",get:function(){return this.options.isSelector?[]:[{behaviorClass:u.a,ui:"anchor",channelNames:[c.w.VIDEO_DRAG_DROP,c.w.FOLDER_DRAG_DROP],analyticsOptions:{location:a.k.LeftNav}},{behaviorClass:p.a}]}},{key:"appLinks",get:function(){return this.options.appLink?{"@ui.anchor":this.getAppLink()}:{}}},{key:"template",get:function(){return h.a}}])&&y(e.prototype,n),f&&y(e,f),g}(r.a.Component),w=n(1190),C=n.n(w);function O(t){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function S(t,e){return(S=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function P(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=R(t);if(e){var r=R(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return x(this,n)}}function x(t,e){return!e||"object"!==O(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",(function(){return D}));var D=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&S(t,e)}(s,t);var e,n,r,i=P(s);function s(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),t.styles=o.extend({},C.a,t.styles),i.call(this,t)}return e=s,(n=[{key:"name",get:function(){return"LeftNavComponent"}},{key:"tagName",get:function(){return"ul"}},{key:"childView",get:function(){return k}},{key:"className",get:function(){var t="".concat(this.options.styles.folderTree," position-relative");return this.options.extraClass?"".concat(t," ").concat(this.options.extraClass):t}},{key:"viewComparator",get:function(){return function(t){var e;return null===(e=t.get("name"))||void 0===e?void 0:e.toLowerCase()}}},{key:"childViewOptions",get:function(){return{styles:this.options.styles,channelName:this.options.channelName,appLink:this.options.appLink,linkArgs:this.options.linkArgs,linkParams:this.options.linkParams,childrenProperty:this.options.childrenProperty,textProperty:this.options.textProperty,actions:this.options.actions,extraClass:this.options.extraClass,folderTreeId:this.options.folderTreeId,analyticsOptions:this.options.analyticsOptions,isSelector:this.options.isSelector,disabledIds:this.options.disabledIds}}}])&&_(e.prototype,n),r&&_(e,r),s}(r.a.ComponentCollection)},1093:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var o=n(1),r=n(6),i=n(2),s=n(145);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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=h(t);if(e){var r=h(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return f(this,n)}}function f(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(f,t);var e,n,i,a=p(f);function f(){return l(this,f),a.apply(this,arguments)}return e=f,(n=[{key:"getDroppableElement",value:function(){return this.options.ui?this.view.getUI(this.options.ui):this.$el}},{key:"drop",value:function(){var t=this;o.each(this.options.channelNames,(function(e){r.Radio.channel(e).trigger("drag:drop",t.view.model,t.options.analyticsOptions)}))}},{key:"accept",value:function(){var t=this,e=!1;return o.each(this.options.channelNames,(function(n){!0===r.Radio.channel(n).request("accept",t.view.model)&&(e=!0)})),e}},{key:"over",value:function(){var t=this;this.isHoveringOver=!0,window.setTimeout((function(){t.isHoveringOver&&t.view.trigger("open:sub:folders",s.active)}),500)}},{key:"out",value:function(){this.isHoveringOver=!1}},{key:"onRender",value:function(){var t={tolerance:"pointer",drop:o.bind(this.drop,this),accept:o.bind(this.accept,this),over:o.bind(this.over,this),out:o.bind(this.out,this)};t.classes={"ui-droppable":s.droppable,"ui-droppable-active":s.active,"ui-droppable-hover":s.hover},this.getDroppableElement().droppable(t)}},{key:"onBeforeDestroy",value:function(){this.getDroppableElement().droppable("instance")&&this.getDroppableElement().droppable("destroy")}}])&&c(e.prototype,n),i&&c(e,i),f}(i.a.Behavior)},1096:function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var o=n(1),r=n(6),i=n(2),s=n(15),a=n(0),l=n(1051),c=n(1102),u=n.n(c);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 f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=v(t);if(e){var r=v(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return b(this,n)}}function b(t,e){return!e||"object"!==p(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var 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}}),e&&d(t,e)}(p,t);var e,n,i,c=y(p);function p(){return f(this,p),c.apply(this,arguments)}return e=p,(n=[{key:"getClassMappings",value:function(){return{"ui-draggable":l.c.draggable,"ui-draggable-handle":l.c.handle,"ui-draggable-disabled":l.c.disabled,"ui-draggable-dragging":l.c.dragging}}},{key:"helper",value:function(){return new l.b({text:this.view.model.get("name"),svg:s.a.getSvg(s.b.Folder)}).render().el}},{key:"start",value:function(){r.Radio.channel(a.w.FOLDER_DRAG_DROP).trigger("drag:start",this.view.model),this.view.$el.addClass(u.a.draggingFolder)}},{key:"stop",value:function(){r.Radio.channel(a.w.FOLDER_DRAG_DROP).trigger("drag:stop"),this.view.$el.removeClass(u.a.draggingFolder)}},{key:"onRender",value:function(){var t={helper:o.bind(this.helper,this),start:o.bind(this.start,this),stop:o.bind(this.stop,this)};t.classes=this.getClassMappings(),this.view.$el.draggable(o.extend({},l.a,t))}},{key:"onBeforeDestroy",value:function(){this.view.$el.draggable("instance")&&this.view.$el.draggable("destroy")}}])&&h(e.prototype,n),i&&h(e,i),p}(i.a.Behavior)},1102:function(t,e,n){t.exports={dragging:"_2wBn3",draggingFolder:"_1r3AS"}},1190:function(t,e,n){t.exports={folderTree:"_1inFA",text:"_2ovSq",caret:"_2pwp9",library:"_2WHiz",selected:"_200l0",parent:"_205QS",disabledActive:"_25EPE",disabled:"_387cT",collapsed:"_1-_q7",actions:"_3Il7t",node:"_23bpP",libraryContainer:"EuNKs",item:"ahYSz"}},1226:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda;return' <span class="'+t.escapeExpression(s(null!=(i=null!=e?e.options:e)?i.caretClass:i,e))+' d-inline-block position-absolute">\r\n '+(null!=(i=s(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+"\r\n </span>\r\n"},3:function(t,e,n,o,r){return"<ul></ul>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda,a=t.escapeExpression,l=null!=e?e:t.nullContext||{};return'<div class="position-relative '+a(s(null!=(i=null!=e?e.options:e)?i.itemClass:i,e))+'">\r\n <a class="'+a(s(null!=(i=null!=e?e.options:e)?i.anchorClass:i,e))+' d-block ui-node">\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=e?e.options:e)?i.showCaret:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")+' <span class="'+a(s(null!=(i=null!=e?e.options:e)?i.textStyle:i,e))+" ui-text "+a(s(null!=(i=null!=e?e.options:e)?i.extraClasses:i,e))+'">'+a(s(null!=(i=null!=e?e.options:e)?i.text:i,e))+'</span>\r\n </a>\r\n <div class="actions-region"></div>\r\n</div>\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=(i=null!=e?e.options:e)?i.children:i)?i.length:i,{name:"if",hash:{},fn:t.program(3,r,0),inverse:t.noop,data:r}))?i:"")},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[0],{1032:function(t,e,n){t.exports={dragItem:"_2TIZ7",svgContainer:"_3JzEU",dragText:"_1Kdwj"}},1033:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda,a=t.escapeExpression;return'<span class="'+a(s(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.svgContainer:i,e))+' mr-2">'+(null!=(i=s(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'</span>\r\n<span class="'+a(s(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.dragText:i,e))+'">'+a(s(null!=(i=null!=e?e.options:e)?i.text:i,e))+"</span>"},useData:!0})},1047:function(t,e,n){"use strict";var o=n(1032),r=n.n(o),i=n(1033),s=n.n(i);function a(t){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function c(t,e){return(c=Object.setPrototypeOf||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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=f(t);if(e){var r=f(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return p(this,n)}}function p(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var h=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&c(t,e)}(a,t);var e,n,o,i=u(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),i.call(this,t)}return e=a,(n=[{key:"viewOptions",value:function(){return Object.assign({styles:r.a},this.options)}},{key:"name",get:function(){return"DraggableItemComponent"}},{key:"template",get:function(){return s.a}},{key:"className",get:function(){return"".concat(r.a.dragItem," p-3")}}])&&l(e.prototype,n),o&&l(e,o),a}(n(2).a.Component),d={delay:150,cursorAt:{left:-20,top:10},refreshPositions:!0};n.d(e,"c",(function(){return r.a})),n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return d}))},1058:function(t,e,n){"use strict";var o=n(1),r=n(2),i=n(6),s=n(15),a=n(4),l=n(13),c=n(0),u=n(1089),p=n(1092),f=n(1222),h=n.n(f);function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function b(t,e){return(b=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function v(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=m(t);if(e){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(t,e){return!e||"object"!==d(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var k=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&b(t,e)}(g,t);var e,n,f,d=v(g);function g(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,g),d.call(this,t)}return e=g,(n=[{key:"initialize",value:function(){this.listenTo(this.model,"change:name",this.render);var t=this.getChildren();t&&this.listenTo(t,"add remove",this.render),this.listenTo(this,"open:sub:folders",this.onOpenSubFolders)}},{key:"events",value:function(){return{"click .ui-node":"onClick"}}},{key:"regions",value:function(){return{children:{el:"ul",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"hasChildren",value:function(){var t=this.getChildren();return!!t&&!!t.length}},{key:"getChildren",value:function(){return this.options.childrenProperty?this.model.get(this.options.childrenProperty):null}},{key:"getText",value:function(){return this.options.textProperty?this.model.get(this.options.textProperty):this.model.get("name")}},{key:"isSelected",value:function(){return l.f.isSelected(this.options.folderTreeId,this.model.get("id"))}},{key:"isParent",value:function(){return l.f.isParent(this.options.folderTreeId,this.model.get("id"))}},{key:"isDisabled",value:function(){return this.options.disabledIds&&this.options.disabledIds[this.model.get("id").toString()]}},{key:"getAnchorClass",value:function(){var t="position-relative ".concat(this.options.styles.node);return this.isSelected()?t+=" text-white font-weight-bold":this.isDisabled()?t+=" text-muted":t+=" text-dark",t}},{key:"getAppLink",value:function(){if(!this.options.appLink)return{};var t=this.options.linkArgs,e=this.options.linkParams;return{application:this.options.appLink.application,action:this.options.appLink.action,args:o.isFunction(t)?t(this.model):null,params:o.isFunction(e)?e(this.model):null}}},{key:"onClick",value:function(t){t.stopPropagation();var e=this.getRegion("children"),n=i.Radio.channel(this.options.channelName);if(this.isDisabled()||(this.$el.addClass(this.options.styles.selected),this.getUI("text").addClass("text-white font-weight-bold")),this.options.isSelector&&n.trigger("folder:selected",this.model,this.isDisabled()),this.isDisabled()||this.isSelected()&&this.isCurrentPath()){if(t.stopImmediatePropagation(),t.preventDefault(),!this.hasChildren())return void(this.options.isSelector&&n.trigger("re:render:selector"));var o=!e.hasView();return o?this.openChildren():this.closeChildren(),void(this.options.isSelector&&o&&n.trigger("re:render:selector"))}this.hasChildren()&&(this.openChildren(),this.options.isSelector&&i.Radio.channel(this.options.channelName).trigger("re:render:selector"))}},{key:"isCurrentPath",value:function(){var t=r.a.AppLinkHelper.getCurrentAppLink(),e=this.getAppLink();return!o.keys(e).length||t.application===e.application&&t.action===e.action}},{key:"closeChildren",value:function(){var t=this.getRegion("children");this.$el.addClass(this.options.styles.collapsed),this.$el.removeClass(this.options.styles.parent),t.empty()}},{key:"openChildren",value:function(){this.$el.removeClass(this.options.styles.collapsed),this.renderChildren()}},{key:"onOpenSubFolders",value:function(t){this.renderedSubChildren||this.renderChildren(t)}},{key:"renderChildren",value:function(t){var e=this.getChildren();if(e&&e.length){var n={styles:this.options.styles,channelName:this.options.channelName,appLink:this.options.appLink,linkArgs:this.options.linkArgs,linkParams:this.options.linkParams,childrenProperty:this.options.childrenProperty,textProperty:this.options.textProperty,actions:this.options.actions,folderTreeId:this.options.folderTreeId,analyticsOptions:this.options.analyticsOptions,extraClass:this.options.extraClass,isSelector:this.options.isSelector,disabledIds:this.options.disabledIds};n.extraClasses=t,n.collection=e,this.showChildView("children",new D(n)),this.renderedSubChildren=!0}}},{key:"viewOptions",value:function(){var t="".concat(this.options.styles.item," ").concat(this.options.styles.customItem||"");return this.isDisabled()&&this.renderedSubChildren&&(t+=" ".concat(this.options.styles.disabledActive)),{children:this.getChildren(),itemClass:t,anchorClass:this.getAnchorClass(),caretClass:this.options.styles.caret,showCaret:this.hasChildren(),svg:s.a.getSvg(s.b.Caret),extraClasses:this.options.extraClasses,textStyle:this.options.styles.text,text:this.getText()}}},{key:"onRender",value:function(){this.resetClassName(),this.options.actions&&this.showChildView("actions",new this.options.actions({model:this.model,extraClasses:"rounded-circle mr-1 ".concat(this.options.styles.actions),buttonClass:"text-muted",analyticsOptions:this.options.analyticsOptions})),(this.isSelected()||this.isParent())&&this.renderChildren()}},{key:"name",get:function(){return"LeftNavNodeComponent"}},{key:"elements",get:function(){return{anchor:".ui-node",text:".ui-text"}}},{key:"tagName",get:function(){return"li"}},{key:"className",get:function(){var t="position-relative";return this.isSelected()&&(t+=" ".concat(this.options.styles.selected)),this.isParent()&&(t+=" ".concat(this.options.styles.parent)),t}},{key:"behaviors",get:function(){return this.options.isSelector?[]:[{behaviorClass:u.a,ui:"anchor",channelNames:[c.w.VIDEO_DRAG_DROP,c.w.FOLDER_DRAG_DROP],analyticsOptions:{location:a.k.LeftNav}},{behaviorClass:p.a}]}},{key:"appLinks",get:function(){return this.options.appLink?{"@ui.anchor":this.getAppLink()}:{}}},{key:"template",get:function(){return h.a}}])&&y(e.prototype,n),f&&y(e,f),g}(r.a.Component),w=n(1186),C=n.n(w);function O(t){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function _(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function S(t,e){return(S=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function P(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=R(t);if(e){var r=R(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return x(this,n)}}function x(t,e){return!e||"object"!==O(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.d(e,"a",(function(){return D}));var D=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&S(t,e)}(s,t);var e,n,r,i=P(s);function s(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),t.styles=o.extend({},C.a,t.styles),i.call(this,t)}return e=s,(n=[{key:"name",get:function(){return"LeftNavComponent"}},{key:"tagName",get:function(){return"ul"}},{key:"childView",get:function(){return k}},{key:"className",get:function(){var t="".concat(this.options.styles.folderTree," position-relative");return this.options.extraClass?"".concat(t," ").concat(this.options.extraClass):t}},{key:"viewComparator",get:function(){return function(t){var e;return null===(e=t.get("name"))||void 0===e?void 0:e.toLowerCase()}}},{key:"childViewOptions",get:function(){return{styles:this.options.styles,channelName:this.options.channelName,appLink:this.options.appLink,linkArgs:this.options.linkArgs,linkParams:this.options.linkParams,childrenProperty:this.options.childrenProperty,textProperty:this.options.textProperty,actions:this.options.actions,extraClass:this.options.extraClass,folderTreeId:this.options.folderTreeId,analyticsOptions:this.options.analyticsOptions,isSelector:this.options.isSelector,disabledIds:this.options.disabledIds}}}])&&_(e.prototype,n),r&&_(e,r),s}(r.a.ComponentCollection)},1089:function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var o=n(1),r=n(6),i=n(2),s=n(145);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){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function p(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=h(t);if(e){var r=h(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return f(this,n)}}function f(t,e){return!e||"object"!==a(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&u(t,e)}(f,t);var e,n,i,a=p(f);function f(){return l(this,f),a.apply(this,arguments)}return e=f,(n=[{key:"getDroppableElement",value:function(){return this.options.ui?this.view.getUI(this.options.ui):this.$el}},{key:"drop",value:function(){var t=this;o.each(this.options.channelNames,(function(e){r.Radio.channel(e).trigger("drag:drop",t.view.model,t.options.analyticsOptions)}))}},{key:"accept",value:function(){var t=this,e=!1;return o.each(this.options.channelNames,(function(n){!0===r.Radio.channel(n).request("accept",t.view.model)&&(e=!0)})),e}},{key:"over",value:function(){var t=this;this.isHoveringOver=!0,window.setTimeout((function(){t.isHoveringOver&&t.view.trigger("open:sub:folders",s.active)}),500)}},{key:"out",value:function(){this.isHoveringOver=!1}},{key:"onRender",value:function(){var t={tolerance:"pointer",drop:o.bind(this.drop,this),accept:o.bind(this.accept,this),over:o.bind(this.over,this),out:o.bind(this.out,this)};t.classes={"ui-droppable":s.droppable,"ui-droppable-active":s.active,"ui-droppable-hover":s.hover},this.getDroppableElement().droppable(t)}},{key:"onBeforeDestroy",value:function(){this.getDroppableElement().droppable("instance")&&this.getDroppableElement().droppable("destroy")}}])&&c(e.prototype,n),i&&c(e,i),f}(i.a.Behavior)},1092:function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var o=n(1),r=n(6),i=n(2),s=n(15),a=n(0),l=n(1047),c=n(1098),u=n.n(c);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 f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function y(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,o=v(t);if(e){var r=v(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return b(this,n)}}function b(t,e){return!e||"object"!==p(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var 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}}),e&&d(t,e)}(p,t);var e,n,i,c=y(p);function p(){return f(this,p),c.apply(this,arguments)}return e=p,(n=[{key:"getClassMappings",value:function(){return{"ui-draggable":l.c.draggable,"ui-draggable-handle":l.c.handle,"ui-draggable-disabled":l.c.disabled,"ui-draggable-dragging":l.c.dragging}}},{key:"helper",value:function(){return new l.b({text:this.view.model.get("name"),svg:s.a.getSvg(s.b.Folder)}).render().el}},{key:"start",value:function(){r.Radio.channel(a.w.FOLDER_DRAG_DROP).trigger("drag:start",this.view.model),this.view.$el.addClass(u.a.draggingFolder)}},{key:"stop",value:function(){r.Radio.channel(a.w.FOLDER_DRAG_DROP).trigger("drag:stop"),this.view.$el.removeClass(u.a.draggingFolder)}},{key:"onRender",value:function(){var t={helper:o.bind(this.helper,this),start:o.bind(this.start,this),stop:o.bind(this.stop,this)};t.classes=this.getClassMappings(),this.view.$el.draggable(o.extend({},l.a,t))}},{key:"onBeforeDestroy",value:function(){this.view.$el.draggable("instance")&&this.view.$el.draggable("destroy")}}])&&h(e.prototype,n),i&&h(e,i),p}(i.a.Behavior)},1098:function(t,e,n){t.exports={dragging:"_2wBn3",draggingFolder:"_1r3AS"}},1186:function(t,e,n){t.exports={folderTree:"_1inFA",text:"_2ovSq",caret:"_2pwp9",library:"_2WHiz",selected:"_200l0",parent:"_205QS",disabledActive:"_25EPE",disabled:"_387cT",collapsed:"_1-_q7",actions:"_3Il7t",node:"_23bpP",libraryContainer:"EuNKs",item:"ahYSz"}},1222:function(t,e,n){var o=n(10);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda;return' <span class="'+t.escapeExpression(s(null!=(i=null!=e?e.options:e)?i.caretClass:i,e))+' d-inline-block position-absolute">\r\n '+(null!=(i=s(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+"\r\n </span>\r\n"},3:function(t,e,n,o,r){return"<ul></ul>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,s=t.lambda,a=t.escapeExpression,l=null!=e?e:t.nullContext||{};return'<div class="position-relative '+a(s(null!=(i=null!=e?e.options:e)?i.itemClass:i,e))+'">\r\n <a class="'+a(s(null!=(i=null!=e?e.options:e)?i.anchorClass:i,e))+' d-block ui-node">\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=e?e.options:e)?i.showCaret:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")+' <span class="'+a(s(null!=(i=null!=e?e.options:e)?i.textStyle:i,e))+" ui-text "+a(s(null!=(i=null!=e?e.options:e)?i.extraClasses:i,e))+'">'+a(s(null!=(i=null!=e?e.options:e)?i.text:i,e))+'</span>\r\n </a>\r\n <div class="actions-region"></div>\r\n</div>\r\n'+(null!=(i=n.if.call(l,null!=(i=null!=(i=null!=e?e.options:e)?i.children:i)?i.length:i,{name:"if",hash:{},fn:t.program(3,r,0),inverse:t.noop,data:r}))?i:"")},useData:!0})}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[1],{1032:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"k",(function(){return h})),n.d(t,"g",(function(){return v})),n.d(t,"e",(function(){return y})),n.d(t,"j",(function(){return g})),n.d(t,"i",(function(){return b})),n.d(t,"c",(function(){return P})),n.d(t,"b",(function(){return S})),n.d(t,"d",(function(){return k})),n.d(t,"f",(function(){return E})),n.d(t,"h",(function(){return m}));var r=n(2),i=n(1),a=n(19),o=n(29),s=n(3),u="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var n=i.reduce(e,(function(e,n,r){var a=t[r];return n||a?i.isObject(n)&&i.isObject(a)&&!i.isUndefined(n.id)&&n.id===a.id?e:i.isArray(n)?d(n,a).length?e.concat(r):e:i.isEqual(n,a)?e:e.concat(r):e}),[]);if(n.length)return i.object(i.map(n,(function(n){return i.isArray(t[n])?[n,d(e[n],t[n])]:[n,t[n]]})))}}function d(e,t){var n=[];return i.each(t,(function(t){var r=i.findWhere(e,{id:t.id});if(!i.isUndefined(r)||0!==Object.keys(t).length){var a=i.isUndefined(r)?t:l(r,t);a&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(a.id=t.id,n.push(a))))}})),n}var f={getChanges:function(e,t){var n=l(i.omit(e.toJSON(),c),i.omit(t.toJSON(),c));if(n)return i.object(i.map(i.keys(n),(function(e){return[e,f.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(i.isObject(t)&&i.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return i.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new a.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var a=["distributors","producers","directors","productionCompanies"];for(var o in i.each(i.keys(n),(function(e){a.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(i.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[o]&&e.associations[o]){var s=e.get(o);(s instanceof r.a.Model||s instanceof r.a.NestedModel)&&s.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return i.each(i.keys(e.toJSON()),(function(a){if(i.contains(n,a)){var o=e.get(a).map((function(e){return e.id})),s=t.get(a).map((function(e){return e.id})),u=i.filter(o,(function(e){return e&&!i.contains(s,e)}));u.length&&(r[a]=u)}})),r}},h={name:[{required:!0,msg:function(){return s.a.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?s.a.getPhrase(u,"episodeNumberLessThanOne"):e&&e>2147483647?s.a.getPhrase(u,"episodeNumberExceeds"):e%1!=0?s.a.getPhrase(u,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?s.a.getPhrase(u,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":s.a.getPhrase(u,"seasonNoEpisodeNumber")}},p=o().year(),y={productionYear:function(e,t,n){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>p?s.a.getPhrase(u,"validProductionYears",{currentYear:p}):void 0):""}},v={name:[{required:!0,msg:function(){return s.a.getPhrase(u,"resourceNameRequired")}}]},g={suggestion:[{required:!0,msg:function(){return s.a.getPhrase(u,"suggestEditRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return s.a.getPhrase(u,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"suggestEditReasonExceeds")}}]},m={number:function(e,t,n){return e?+e<1?s.a.getPhrase(u,"seasonLessThanOne"):+e>255?s.a.getPhrase(u,"seasonExceeds"):+e%1!=0?s.a.getPhrase(u,"seasonNotWhole"):"":s.a.getPhrase(u,"seasonRequired")}},b={empty:function(){return s.a.getPhrase(u,"suggestEditRatingRequired")},original:function(){return s.a.getPhrase(u,"suggestEditRatingInvalid")}},E={url:[{required:!0,pattern:"url",msg:function(){return s.a.getPhrase(u,"linkUrlRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return s.a.getPhrase(u,"linkNameRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(u,"linkNameExceeds")}}]},P={name:[{maxLength:128,msg:function(){return s.a.getPhrase(u,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return s.a.getPhrase(u,"fieldValueExceeds")}}]},S={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":s.a.getPhrase(u,"fieldsInvalid"):""}};function k(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1033:function(e,t,n){"use strict";var r=n(1039),i=n(1032),a=(n(1037),n(3),n(1040)),o=(n(1042),n(1038)),s=n(82),u={getVideoDownloadUrl:function(e,t){return s.a.safeUrlConcat(s.a.makeHttps(e),"/download?token=".concat(t))}};n.d(t,"a",(function(){return r.a})),n.d(t,"e",(function(){return i.g})),n.d(t,"h",(function(){return i.j})),n.d(t,"g",(function(){return i.i})),n.d(t,"d",(function(){return i.f})),n.d(t,"f",(function(){return i.h})),n.d(t,"c",(function(){return a.a})),n.d(t,"i",(function(){return o.a})),n.d(t,"b",(function(){return u}))},1037:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),i=n(49),a=n(160),o=n(3),s="libraryEditor.utils",u={name:[{required:!0,msg:function(){return o.a.getPhrase(s,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(s,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?i.a.calculateDestinationFolderDepth(e,n,t)>a.a.MAX_FOLDER_DEPTH?o.a.getPhrase(s,"maxFolderDepth",{maxDepth:a.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(s,"selectParentFolder")}}},l=function(e){var t=e.validateName,n=e.validateParent,i=e.folder,a=e.collection;return t&&n?r.extend({},u,c(i,a)):t?u:n?c(i,a):void 0}},1038:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(15),i=n(3),a=n(186),o=n(1050),s=n(8);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var d={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-success";case e<80:return"bg-info";case e<96:return"bg-danger";case e<128:return"bg-pink";case e>=128:return"bg-warning";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case s.h.HostedLibrary:case s.h.CustomLibrary:return e.get("name");case s.h.Exchange:return i.a.getPhrase(l,"exchange");case s.h.Workspace:return i.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case s.h.HostedLibrary:case s.h.CustomLibrary:return"bg-info";case s.h.Exchange:return"bg-success";case s.h.Workspace:default:return"bg-danger"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(u(t={},c.Pdf,r.b.FilePDF),u(t,c.Image,r.b.FileImg),u(t,c.PowerPoint,r.b.FilePowerpoint),u(t,c.Document,r.b.FileWord),u(t,c.Excel,r.b.FileExcel),u(t,c.Zip,r.b.FileZip),u(t,c.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return i.a.getPhrase(l,"pdf");case c.Image:return i.a.getPhrase(l,"image");case c.Document:return i.a.getPhrase(l,"document");case c.Excel:return i.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return i.a.getPhrase(l,"presentation");case c.Zip:return i.a.getPhrase(l,"zipArchive");case c.File:return i.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:d.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case a.e.VideoTitle:t+="VideoTitle";break;case a.e.Description:t+="Description";break;case a.e.Rating:t+="Rating";break;case a.e.SeriesTitle:t+="SeriesTitle";break;case a.e.Season:t+="SeasonNumber";break;case a.e.EpisodeNumber:t+="EpisodeNumber";break;case a.e.BroadcastDate:t+="BroadcastDate";break;case a.e.Channel:t+="Channel";break;case a.e.ProductionYear:t+="ProductionYear";break;case a.e.Distributors:t+="Distributors";break;case a.e.ProductionCompanies:t+="ProductionCompanies";break;case a.e.Directors:t+="Directors";break;case a.e.Producers:t+="Producers";break;case a.e.Other:t+="Other"}return i.a.getPhrase(l,t)}}},1039:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1),i=n(13),a=n(3),o="libraryEditor.utils",s={isValidChapterTime:function(e,t,n,a){if(a){if(!r.isNumber(t))return u.StartTime.Invalid();if(t<0)return u.StartTime.Invalid();if(t>i.w.millisecondsToSeconds(n))return u.StartTime.Exceeds();if(a.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return u.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?u.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?u.Name.Exists():r.isEmpty(t.trim())?u.Name.Invalid():void 0:u.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},u={Name:{Invalid:function(){return a.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return a.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return a.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return a.a.getPhrase(o,"chapterStartTimeExceeds")}}}},1040:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),i="libraryEditor.utils",a={name:[{required:!0,msg:function(){return r.a.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(i,"libraryNameExceeds")}}]}},1042:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(1032),a=r.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return a("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return a("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return a("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?a("episodeNumberLessThanOne"):e&&e>255?a("episodeNumberExceeds"):e&&e%1!=0?a("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?a("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":a("seasonNoEpisodeNumber")},productionYear:function(){return i.e.productionYear.apply(null,arguments)}}},1050:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));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}}),t&&a(e,t)}(n,e);var t=o(n);function n(){return i(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1182:function(e,t,n){"use strict";var r=n(1),i=n(6),a=n(1212),o={PLAY:"cv-player-play",PAUSE:"cv-player-pause",VIDEO_END:"cv-player-ended",VOLUME_CHANGE:"cv-player-volumechange",CHAPTER_CHANGE:"cv-player-chapterchange",TIME_UPDATE:"cv-player-timeupdate",FULLSCREEN_CHANGE:"cv-player-fullscreenchange",CLIP_POINTS_UPDATE:"cv-player-cliptoolupdate",QUALITY_CHANGE:"cv-player-qualitychange",QUERY_CALLBACK:"cv-player-querycallback",SUBTITLES_ENABLED:"cv-player-hassubtitles",SUBTITLES:"cv-player-subtitles",PONG:"cv-player-pong",FULLSCREEN_CLICK:"_cvwp:fsc",DEVICES_BTN_CLICK:"_cvwp:devices:click"},s={PLAY:"cv-player-play",PAUSE:"cv-player-pause",SET_VOLUME:"cv-player-setvolume",NEXT_CHAPTER:"cv-player-nextchapter",PREV_CHAPTER:"cv-player-previouschapter",CHANGE_CHAPTER:"cv-player-changechapter",TOGGLE_CLIPPING:"cv-player-cliptooltoggle",SET_CLIP_POINTS:"cv-player-cliptoolset",CLIP:"cv-player-setclip",CLEAR_CLIP:"cv-player-clearclip",SEEK_TO:"cv-player-seekto",CONTROLS:"cv-player-showcontrols",SUBTITLES:"cv-player-subtitles",SET_QUALITY:"cv-player-setquality",QUERY:"cv-player-query",ADD_LISTENER:"cv-player-addlistener",REMOVE_LISTENER:"cv-player-removelistener",PING:"cv-player-ping",TOGGLE_DEVICES_BTN:"_cv:toggledevicesbtn",SHOW_DEVICES_BTN:"_cv:showdevicesbtn",SHOW_FS_BTN:"_cv:showfsbtn"},u={GET_AVAILABLE_QUALITIES:"getAvailableQualities",GET_CURRENT_QUALITY:"currentQuality",IS_PAUSED:"paused",GET_CURRENT_TIME:"currentTime",GET_CHAPTERS:"getChapters",HAS_METADATA_CHAPTERS:"hasMetadataChapters"},c=n(2),l=n(30),d=n(19),f=n(82),h=n(15),p=n(1027),y=n(0),v=function(e){return e instanceof c.a.Model||e instanceof c.a.Collection||e instanceof i.Model||e instanceof i.Collection?e.toJSON():e},g=n(4),m=n(119),b=n(42);function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function 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||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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C(e);if(t){var i=C(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(l,e);var t,n,i,a=k(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e)).captureInterval=60,t}return t=l,(n=[{key:"initialize",value:function(){this.eventsApi=this.options.eventsApi,this.options.video||c.a.ErrorHelper.throw(new d.a("Video logging requires video to be passed in.")),this.model=this.options.video,this.playbackStatus=this.getNewPlaybackStatus(),this.options.captureInterval&&(this.captureInterval=this.options.captureInterval),this.bindListeners(),this.getChapters()}},{key:"bindListeners",value:function(){this.eventsApi.on(o.TIME_UPDATE,r.bind(this.onPlayerTimeUpdate,this)),this.eventsApi.on(o.VIDEO_END,r.bind(this.onEnd,this)),this.eventsApi.on(o.FULLSCREEN_CHANGE,r.bind(this.onFullScreen,this)),this.eventsApi.on(o.CHAPTER_CHANGE,r.bind(this.onChapterChange,this))}},{key:"unbindListeners",value:function(){this.eventsApi.off(o.TIME_UPDATE),this.eventsApi.off(o.VIDEO_END),this.eventsApi.off(o.FULLSCREEN_CHANGE),this.eventsApi.off(o.CHAPTER_CHANGE)}},{key:"getChapters",value:function(){var e=this;this.queryWebplayer(u.GET_CHAPTERS,(function(t,n){e.setInitialChapter(n),e.setVideoDuration(n)}))}},{key:"queryWebplayer",value:function(e,t){var n=r.uniqueId(this.name),i="".concat(o.QUERY_CALLBACK,"-").concat(n);this.eventsApi.one(i,t),this.eventsApi.trigger(s.QUERY,e,n)}},{key:"onEnd",value:function(){this.setCurrentPosition(this.playbackStatus.totalDuration),this.logVerbose(g.n.Finish),this.resetPlaybackStatus()}},{key:"onFullScreen",value:function(e,t){var n=t?g.n.FullScreenEnter:g.n.FullScreenExit;this.logVerbose(n)}},{key:"onPlayerTimeUpdate",value:function(e,t){var n=this;this.queryWebplayer(u.IS_PAUSED,(function(e,r){n.updateTime(t,r)}))}},{key:"onChapterChange",value:function(e,t){r.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"updateTime",value:function(e,t){var n=Math.floor(e);n&&n!==this.getCurrentPositon()&&(this.setCurrentPosition(n),t||(this.playbackHasStarted()||(this.logVerbose(g.n.Start),this.setPlaybackStarted()),this.incrementWatchTime(),this.getWatchTime()%this.captureInterval==0&&this.logVerbose(g.n.Playback),8===this.getWatchTime()&&this.logStream()))}},{key:"setInitialChapter",value:function(e){var t=r.find(e,(function(e){return!0===e.current}));r.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"setVideoDuration",value:function(e){var t=r.reduce(e,(function(e,t){return e+t.duration}),0);!r.isNaN(t)&&r.isNumber(t)&&(this.playbackStatus.totalDuration=Math.floor(t))}},{key:"setCurrentPosition",value:function(e){this.playbackStatus.position=e}},{key:"getCurrentPositon",value:function(){return this.playbackStatus.position}},{key:"setCurrentChapter",value:function(e){this.playbackStatus.chapter=e}},{key:"setPlaybackStarted",value:function(){this.playbackStatus.hasStarted=!0}},{key:"playbackHasStarted",value:function(){return this.playbackStatus.hasStarted}},{key:"getWatchTime",value:function(){return this.playbackStatus.totalWatched}},{key:"incrementWatchTime",value:function(){this.playbackStatus.totalWatched+=1}},{key:"getNewPlaybackStatus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.duration,n=e.watched;return{position:0,chapter:0,hasStarted:!1,totalWatched:n||0,totalDuration:t||0}}},{key:"resetPlaybackStatus",value:function(){var e={duration:this.playbackStatus.totalDuration,watched:this.playbackStatus.totalWatched};this.playbackStatus=this.getNewPlaybackStatus(e)}},{key:"unbindUnload",value:function(){$(window).off("unload")}},{key:"bindUnload",value:function(){$(window).on("unload",r.bind(this.logUnload,this))}},{key:"logUnload",value:function(){this.playbackHasStarted()&&this.logVerbose(g.n.Terminate)}},{key:"logStream",value:function(){var e=b.a.buildActionContext(this.options.analyticsOptions);m.a.log(g.q.Stream,this.getPlaybackData(),e),m.a.log(g.q.StreamRaw,this.getStreamRawData(),e)}},{key:"logVerbose",value:function(e){}},{key:"getPlaybackData",value:function(){return{model:v(this.model),playbackStatus:r.omit(this.playbackStatus,"hasStarted")}}},{key:"getStreamRawData",value:function(){return{id:v(this.model).id.toString()}}},{key:"onDestroy",value:function(){this.unbindListeners(),this.unbindUnload(),this.logUnload()}},{key:"name",get:function(){return"VideoAnalyticsTracker"}}])&&P(t.prototype,n),i&&P(t,i),l}(c.a.Service),N=n(1213),_=n.n(N),A=n(1214),O=n.n(A);function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(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 D(e,t){return(D=Object.setPrototypeOf||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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=U(e);if(t){var i=U(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x(this,n)}}function x(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return M}));var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}(g,e);var t,n,u,v=L(g);function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),v.call(this,e)}return t=g,(n=[{key:"initialize",value:function(){this.enableIeFs=this.isTop(),this.getViewModel()}},{key:"seekTo",value:function(e){this.eventsApi&&this.eventsApi.trigger(s.SEEK_TO,e)}},{key:"seekToChapter",value:function(e){this.eventsApi&&this.eventsApi.trigger("cv-player-changechapter",e)}},{key:"getViewModel",value:function(){var e=this.model.get("id");e||(e=this.model.get("trackingCode")),this.viewModel=l.a.get("".concat(y.z.NAME,"-").concat(e)),this.viewModel.get("initialized")||this.initViewModel(),this.setUrl()}},{key:"initViewModel",value:function(){var e=this.model.pick("id");e.id||(e=this.model.pick("trackingCode")),e.id||e.trackingCode||c.a.ErrorHelper.throw(new d.a("Must provide either a master id or a tracking code to ".concat(this.name)));var t=r.extend({},this.viewModelDefaults,e,this.viewModel.toJSON(),{initialized:!0});this.viewModel.set(t)}},{key:"initWebPlayerEvents",value:function(){if(this.enableIeFs){var e=this.getUI("iframe");e&&0!==e.length&&e.on("load",this.bindWebPlayerEvents.bind(this))}}},{key:"bindWebPlayerEvents",value:function(){if(!this.iframeReady){var e=this.getUI("iframe").get(0);this.eventsApi=new p.CVEventsApi(e.contentWindow),this.eventsApi.on(o.PONG,this.onPong.bind(this)),this.eventsApi.trigger(s.PING),this.eventsApi.on(o.FULLSCREEN_CLICK,this.onFullscreenChange.bind(this)),this.eventsApi.trigger(s.SHOW_FS_BTN),this.eventsApi.on(o.TIME_UPDATE,this.onTimeUpdate.bind(this)),this.eventsApi.on(o.PLAY,this.onPlay.bind(this)),this.eventsApi.on(o.PAUSE,this.onPause.bind(this)),this.eventsApi.on(o.VIDEO_END,this.onEnded.bind(this)),this.options.showDevicesButton&&(this.eventsApi.on(o.DEVICES_BTN_CLICK,this.showDeviceToggle.bind(this)),this.eventsApi.trigger(s.SHOW_DEVICES_BTN)),this.options.captureAnalytics&&(this.tracker=new T({video:this.model.toJSON(),eventsApi:this.eventsApi,analyticsOptions:this.options.analyticsOptions}))}}},{key:"unbindWebPlayerEvents",value:function(){this.eventsApi&&(this.eventsApi.off(o.FULLSCREEN_CLICK),this.eventsApi.off(o.TIME_UPDATE),this.eventsApi.off(o.PLAY),this.eventsApi.off(o.PAUSE),this.eventsApi.off(o.VIDEO_END),this.eventsApi.off(o.PONG),this.eventsApi.off(o.DEVICES_BTN_CLICK))}},{key:"setUrl",value:function(){var e="".concat(this.viewModel.get("webPlayerHost"),"embed"),t=r.omit(this.viewModel.get("parameters"),["p","vid"])||{};t.a=!!this.viewModel.get("autoplay");var n=this.viewModel.get("id");n&&(t.vid=n);var i=this.viewModel.get("trackingCode");i&&(t.p=i),this.viewModel.get("currenttime")&&(t.t=this.viewModel.get("currenttime"),t.a=!this.viewModel.get("paused"));var o=f.a.urlBuilder(e,t),s=Object(a.signUrl)(o,{timestamp:!0});this.viewModel.set({url:s})}},{key:"isTop",value:function(){return window.top===window}},{key:"onTimeUpdate",value:function(e,t){this.viewModel.set("ready",!0),this.viewModel.set("currenttime",t)}},{key:"onPlay",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!1)}},{key:"onPause",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!0)}},{key:"onEnded",value:function(){this.viewModel.trigger("ended")}},{key:"onPong",value:function(){this.iframeReady=!0,this.viewModel.set("ready",!0),i.Radio.channel(this.channelName).trigger("loaded"),this.options.parentChannelName&&i.Radio.channel(this.options.parentChannelName).trigger("webplayer:loaded")}},{key:"onFullscreenChange",value:function(e,t,n){t?this.requestFs(n):this.cancelFs(n)}},{key:"requestFs",value:function(e){e||$("html").addClass("player-fullscreen")}},{key:"cancelFs",value:function(e){e||$("html").removeClass("player-fullscreen")}},{key:"showDeviceToggle",value:function(e){this.viewModel.trigger("showDevices",!!e)}},{key:"query",value:function(e,t){var n=this;if(this.iframeReady){var i=r.uniqueId("cveventsapi");this.eventsApi.one("".concat(o.QUERY_CALLBACK,"-").concat(i),(function(e,n){t(n)})),this.eventsApi.trigger(s.QUERY,e,i)}else this.listenToOnce(this.channelName,"loaded",(function(){return n.query(e,t)}))}},{key:"viewOptions",value:function(){return r.extend({},{styles:O.a,playSvg:h.a.getSvg(h.b.Play)},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.initWebPlayerEvents()}},{key:"onBeforeDestroy",value:function(){this.unbindWebPlayerEvents(),this.tracker&&this.tracker.destroy()}},{key:"elements",get:function(){return{iframe:"iframe"}}},{key:"name",get:function(){return"WebPlayerView"}},{key:"template",get:function(){return _.a}},{key:"className",get:function(){return"".concat(O.a.webPlayerContainer," embed-responsive embed-responsive-16by9")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"defaults",get:function(){return{captureAnalytics:!0,showDevicesButton:!1}}},{key:"viewModelDefaults",get:function(){return{width:640,height:360,autoplay:!!this.options.autoplay,parameters:{s:!1,bc:!1,bf:!1},webPlayerHost:this.options.webPlayerUrl}}}])&&I(t.prototype,n),u&&I(t,u),g}(c.a.Component)},1213:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var a,o=e.lambda,s=e.escapeExpression;return'<iframe class="'+s(o(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.webPlayer:a,t))+' embed-responsive-item" id="'+s(o(null!=(a=null!=t?t.options:t)?a.id:a,t))+'" allowfullscreen webkitallowfullscreen mozallowfullscreen allow="autoplay; fullscreen" frameborder="0" width="'+s(o(null!=(a=null!=t?t.options:t)?a.width:a,t))+'" height="'+s(o(null!=(a=null!=t?t.options:t)?a.height:a,t))+'" src="'+s(o(null!=(a=null!=t?t.options:t)?a.url:a,t))+'"></iframe>\r\n<div class="'+s(o(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.svgContainer:a,t))+'">'+(null!=(a=o(null!=(a=null!=t?t.options:t)?a.playSvg:a,t))?a:"")+"</div>"},useData:!0})},1214:function(e,t,n){e.exports={webPlayerContainer:"_2S4VF",webPlayer:"_3569L",svgContainer:"_1WsxD"}}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[1],{1030:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"k",(function(){return h})),n.d(t,"g",(function(){return v})),n.d(t,"e",(function(){return y})),n.d(t,"j",(function(){return g})),n.d(t,"i",(function(){return b})),n.d(t,"c",(function(){return P})),n.d(t,"b",(function(){return S})),n.d(t,"d",(function(){return k})),n.d(t,"f",(function(){return E})),n.d(t,"h",(function(){return m}));var r=n(2),i=n(1),a=n(19),o=n(29),s=n(3),u="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var n=i.reduce(e,(function(e,n,r){var a=t[r];return n||a?i.isObject(n)&&i.isObject(a)&&!i.isUndefined(n.id)&&n.id===a.id?e:i.isArray(n)?d(n,a).length?e.concat(r):e:i.isEqual(n,a)?e:e.concat(r):e}),[]);if(n.length)return i.object(i.map(n,(function(n){return i.isArray(t[n])?[n,d(e[n],t[n])]:[n,t[n]]})))}}function d(e,t){var n=[];return i.each(t,(function(t){var r=i.findWhere(e,{id:t.id});if(!i.isUndefined(r)||0!==Object.keys(t).length){var a=i.isUndefined(r)?t:l(r,t);a&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(a.id=t.id,n.push(a))))}})),n}var f={getChanges:function(e,t){var n=l(i.omit(e.toJSON(),c),i.omit(t.toJSON(),c));if(n)return i.object(i.map(i.keys(n),(function(e){return[e,f.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(i.isObject(t)&&i.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return i.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new a.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var a=["distributors","producers","directors","productionCompanies"];for(var o in i.each(i.keys(n),(function(e){a.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(i.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[o]&&e.associations[o]){var s=e.get(o);(s instanceof r.a.Model||s instanceof r.a.NestedModel)&&s.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return i.each(i.keys(e.toJSON()),(function(a){if(i.contains(n,a)){var o=e.get(a).map((function(e){return e.id})),s=t.get(a).map((function(e){return e.id})),u=i.filter(o,(function(e){return e&&!i.contains(s,e)}));u.length&&(r[a]=u)}})),r}},h={name:[{required:!0,msg:function(){return s.a.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?s.a.getPhrase(u,"episodeNumberLessThanOne"):e&&e>2147483647?s.a.getPhrase(u,"episodeNumberExceeds"):e%1!=0?s.a.getPhrase(u,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?s.a.getPhrase(u,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":s.a.getPhrase(u,"seasonNoEpisodeNumber")}},p=o().year(),y={productionYear:function(e,t,n){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>p?s.a.getPhrase(u,"validProductionYears",{currentYear:p}):void 0):""}},v={name:[{required:!0,msg:function(){return s.a.getPhrase(u,"resourceNameRequired")}}]},g={suggestion:[{required:!0,msg:function(){return s.a.getPhrase(u,"suggestEditRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return s.a.getPhrase(u,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"suggestEditReasonExceeds")}}]},m={number:function(e,t,n){return e?+e<1?s.a.getPhrase(u,"seasonLessThanOne"):+e>255?s.a.getPhrase(u,"seasonExceeds"):+e%1!=0?s.a.getPhrase(u,"seasonNotWhole"):"":s.a.getPhrase(u,"seasonRequired")}},b={empty:function(){return s.a.getPhrase(u,"suggestEditRatingRequired")},original:function(){return s.a.getPhrase(u,"suggestEditRatingInvalid")}},E={url:[{required:!0,pattern:"url",msg:function(){return s.a.getPhrase(u,"linkUrlRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return s.a.getPhrase(u,"linkNameRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(u,"linkNameExceeds")}}]},P={name:[{maxLength:128,msg:function(){return s.a.getPhrase(u,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return s.a.getPhrase(u,"fieldValueExceeds")}}]},S={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":s.a.getPhrase(u,"fieldsInvalid"):""}};function k(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1031:function(e,t,n){"use strict";var r=n(1037),i=n(1030),a=(n(1035),n(3),n(1038)),o=(n(1040),n(1036)),s=n(82),u={getVideoDownloadUrl:function(e,t){return s.a.safeUrlConcat(s.a.makeHttps(e),"/download?token=".concat(t))}};n.d(t,"a",(function(){return r.a})),n.d(t,"e",(function(){return i.g})),n.d(t,"h",(function(){return i.j})),n.d(t,"g",(function(){return i.i})),n.d(t,"d",(function(){return i.f})),n.d(t,"f",(function(){return i.h})),n.d(t,"c",(function(){return a.a})),n.d(t,"i",(function(){return o.a})),n.d(t,"b",(function(){return u}))},1035:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),i=n(49),a=n(160),o=n(3),s="libraryEditor.utils",u={name:[{required:!0,msg:function(){return o.a.getPhrase(s,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(s,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?i.a.calculateDestinationFolderDepth(e,n,t)>a.a.MAX_FOLDER_DEPTH?o.a.getPhrase(s,"maxFolderDepth",{maxDepth:a.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(s,"selectParentFolder")}}},l=function(e){var t=e.validateName,n=e.validateParent,i=e.folder,a=e.collection;return t&&n?r.extend({},u,c(i,a)):t?u:n?c(i,a):void 0}},1036:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(15),i=n(3),a=n(186),o=n(1048),s=n(8);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var d={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-success";case e<80:return"bg-info";case e<96:return"bg-danger";case e<128:return"bg-pink";case e>=128:return"bg-warning";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case s.h.HostedLibrary:case s.h.CustomLibrary:return e.get("name");case s.h.Exchange:return i.a.getPhrase(l,"exchange");case s.h.Workspace:return i.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case s.h.HostedLibrary:case s.h.CustomLibrary:return"bg-info";case s.h.Exchange:return"bg-success";case s.h.Workspace:default:return"bg-danger"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(u(t={},c.Pdf,r.b.FilePDF),u(t,c.Image,r.b.FileImg),u(t,c.PowerPoint,r.b.FilePowerpoint),u(t,c.Document,r.b.FileWord),u(t,c.Excel,r.b.FileExcel),u(t,c.Zip,r.b.FileZip),u(t,c.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return i.a.getPhrase(l,"pdf");case c.Image:return i.a.getPhrase(l,"image");case c.Document:return i.a.getPhrase(l,"document");case c.Excel:return i.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return i.a.getPhrase(l,"presentation");case c.Zip:return i.a.getPhrase(l,"zipArchive");case c.File:return i.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:d.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case a.e.VideoTitle:t+="VideoTitle";break;case a.e.Description:t+="Description";break;case a.e.Rating:t+="Rating";break;case a.e.SeriesTitle:t+="SeriesTitle";break;case a.e.Season:t+="SeasonNumber";break;case a.e.EpisodeNumber:t+="EpisodeNumber";break;case a.e.BroadcastDate:t+="BroadcastDate";break;case a.e.Channel:t+="Channel";break;case a.e.ProductionYear:t+="ProductionYear";break;case a.e.Distributors:t+="Distributors";break;case a.e.ProductionCompanies:t+="ProductionCompanies";break;case a.e.Directors:t+="Directors";break;case a.e.Producers:t+="Producers";break;case a.e.Other:t+="Other"}return i.a.getPhrase(l,t)}}},1037:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1),i=n(13),a=n(3),o="libraryEditor.utils",s={isValidChapterTime:function(e,t,n,a){if(a){if(!r.isNumber(t))return u.StartTime.Invalid();if(t<0)return u.StartTime.Invalid();if(t>i.w.millisecondsToSeconds(n))return u.StartTime.Exceeds();if(a.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return u.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?u.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?u.Name.Exists():r.isEmpty(t.trim())?u.Name.Invalid():void 0:u.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},u={Name:{Invalid:function(){return a.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return a.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return a.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return a.a.getPhrase(o,"chapterStartTimeExceeds")}}}},1038:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),i="libraryEditor.utils",a={name:[{required:!0,msg:function(){return r.a.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(i,"libraryNameExceeds")}}]}},1040:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(1030),a=r.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return a("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return a("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return a("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?a("episodeNumberLessThanOne"):e&&e>255?a("episodeNumberExceeds"):e&&e%1!=0?a("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?a("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":a("seasonNoEpisodeNumber")},productionYear:function(){return i.e.productionYear.apply(null,arguments)}}},1048:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));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}}),t&&a(e,t)}(n,e);var t=o(n);function n(){return i(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1180:function(e,t,n){"use strict";var r=n(1),i=n(6),a=n(1210),o={PLAY:"cv-player-play",PAUSE:"cv-player-pause",VIDEO_END:"cv-player-ended",VOLUME_CHANGE:"cv-player-volumechange",CHAPTER_CHANGE:"cv-player-chapterchange",TIME_UPDATE:"cv-player-timeupdate",FULLSCREEN_CHANGE:"cv-player-fullscreenchange",CLIP_POINTS_UPDATE:"cv-player-cliptoolupdate",QUALITY_CHANGE:"cv-player-qualitychange",QUERY_CALLBACK:"cv-player-querycallback",SUBTITLES_ENABLED:"cv-player-hassubtitles",SUBTITLES:"cv-player-subtitles",PONG:"cv-player-pong",FULLSCREEN_CLICK:"_cvwp:fsc",DEVICES_BTN_CLICK:"_cvwp:devices:click"},s={PLAY:"cv-player-play",PAUSE:"cv-player-pause",SET_VOLUME:"cv-player-setvolume",NEXT_CHAPTER:"cv-player-nextchapter",PREV_CHAPTER:"cv-player-previouschapter",CHANGE_CHAPTER:"cv-player-changechapter",TOGGLE_CLIPPING:"cv-player-cliptooltoggle",SET_CLIP_POINTS:"cv-player-cliptoolset",CLIP:"cv-player-setclip",CLEAR_CLIP:"cv-player-clearclip",SEEK_TO:"cv-player-seekto",CONTROLS:"cv-player-showcontrols",SUBTITLES:"cv-player-subtitles",SET_QUALITY:"cv-player-setquality",QUERY:"cv-player-query",ADD_LISTENER:"cv-player-addlistener",REMOVE_LISTENER:"cv-player-removelistener",PING:"cv-player-ping",TOGGLE_DEVICES_BTN:"_cv:toggledevicesbtn",SHOW_DEVICES_BTN:"_cv:showdevicesbtn",SHOW_FS_BTN:"_cv:showfsbtn"},u={GET_AVAILABLE_QUALITIES:"getAvailableQualities",GET_CURRENT_QUALITY:"currentQuality",IS_PAUSED:"paused",GET_CURRENT_TIME:"currentTime",GET_CHAPTERS:"getChapters",HAS_METADATA_CHAPTERS:"hasMetadataChapters"},c=n(2),l=n(30),d=n(19),f=n(82),h=n(15),p=n(1025),y=n(0),v=function(e){return e instanceof c.a.Model||e instanceof c.a.Collection||e instanceof i.Model||e instanceof i.Collection?e.toJSON():e},g=n(4),m=n(119),b=n(42);function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function 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||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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C(e);if(t){var i=C(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(l,e);var t,n,i,a=k(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e)).captureInterval=60,t}return t=l,(n=[{key:"initialize",value:function(){this.eventsApi=this.options.eventsApi,this.options.video||c.a.ErrorHelper.throw(new d.a("Video logging requires video to be passed in.")),this.model=this.options.video,this.playbackStatus=this.getNewPlaybackStatus(),this.options.captureInterval&&(this.captureInterval=this.options.captureInterval),this.bindListeners(),this.getChapters()}},{key:"bindListeners",value:function(){this.eventsApi.on(o.TIME_UPDATE,r.bind(this.onPlayerTimeUpdate,this)),this.eventsApi.on(o.VIDEO_END,r.bind(this.onEnd,this)),this.eventsApi.on(o.FULLSCREEN_CHANGE,r.bind(this.onFullScreen,this)),this.eventsApi.on(o.CHAPTER_CHANGE,r.bind(this.onChapterChange,this))}},{key:"unbindListeners",value:function(){this.eventsApi.off(o.TIME_UPDATE),this.eventsApi.off(o.VIDEO_END),this.eventsApi.off(o.FULLSCREEN_CHANGE),this.eventsApi.off(o.CHAPTER_CHANGE)}},{key:"getChapters",value:function(){var e=this;this.queryWebplayer(u.GET_CHAPTERS,(function(t,n){e.setInitialChapter(n),e.setVideoDuration(n)}))}},{key:"queryWebplayer",value:function(e,t){var n=r.uniqueId(this.name),i="".concat(o.QUERY_CALLBACK,"-").concat(n);this.eventsApi.one(i,t),this.eventsApi.trigger(s.QUERY,e,n)}},{key:"onEnd",value:function(){this.setCurrentPosition(this.playbackStatus.totalDuration),this.logVerbose(g.n.Finish),this.resetPlaybackStatus()}},{key:"onFullScreen",value:function(e,t){var n=t?g.n.FullScreenEnter:g.n.FullScreenExit;this.logVerbose(n)}},{key:"onPlayerTimeUpdate",value:function(e,t){var n=this;this.queryWebplayer(u.IS_PAUSED,(function(e,r){n.updateTime(t,r)}))}},{key:"onChapterChange",value:function(e,t){r.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"updateTime",value:function(e,t){var n=Math.floor(e);n&&n!==this.getCurrentPositon()&&(this.setCurrentPosition(n),t||(this.playbackHasStarted()||(this.logVerbose(g.n.Start),this.setPlaybackStarted()),this.incrementWatchTime(),this.getWatchTime()%this.captureInterval==0&&this.logVerbose(g.n.Playback),8===this.getWatchTime()&&this.logStream()))}},{key:"setInitialChapter",value:function(e){var t=r.find(e,(function(e){return!0===e.current}));r.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"setVideoDuration",value:function(e){var t=r.reduce(e,(function(e,t){return e+t.duration}),0);!r.isNaN(t)&&r.isNumber(t)&&(this.playbackStatus.totalDuration=Math.floor(t))}},{key:"setCurrentPosition",value:function(e){this.playbackStatus.position=e}},{key:"getCurrentPositon",value:function(){return this.playbackStatus.position}},{key:"setCurrentChapter",value:function(e){this.playbackStatus.chapter=e}},{key:"setPlaybackStarted",value:function(){this.playbackStatus.hasStarted=!0}},{key:"playbackHasStarted",value:function(){return this.playbackStatus.hasStarted}},{key:"getWatchTime",value:function(){return this.playbackStatus.totalWatched}},{key:"incrementWatchTime",value:function(){this.playbackStatus.totalWatched+=1}},{key:"getNewPlaybackStatus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.duration,n=e.watched;return{position:0,chapter:0,hasStarted:!1,totalWatched:n||0,totalDuration:t||0}}},{key:"resetPlaybackStatus",value:function(){var e={duration:this.playbackStatus.totalDuration,watched:this.playbackStatus.totalWatched};this.playbackStatus=this.getNewPlaybackStatus(e)}},{key:"unbindUnload",value:function(){$(window).off("unload")}},{key:"bindUnload",value:function(){$(window).on("unload",r.bind(this.logUnload,this))}},{key:"logUnload",value:function(){this.playbackHasStarted()&&this.logVerbose(g.n.Terminate)}},{key:"logStream",value:function(){var e=b.a.buildActionContext(this.options.analyticsOptions);m.a.log(g.q.Stream,this.getPlaybackData(),e),m.a.log(g.q.StreamRaw,this.getStreamRawData(),e)}},{key:"logVerbose",value:function(e){}},{key:"getPlaybackData",value:function(){return{model:v(this.model),playbackStatus:r.omit(this.playbackStatus,"hasStarted")}}},{key:"getStreamRawData",value:function(){return{id:v(this.model).id.toString()}}},{key:"onDestroy",value:function(){this.unbindListeners(),this.unbindUnload(),this.logUnload()}},{key:"name",get:function(){return"VideoAnalyticsTracker"}}])&&P(t.prototype,n),i&&P(t,i),l}(c.a.Service),N=n(1211),_=n.n(N),A=n(1212),O=n.n(A);function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(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 D(e,t){return(D=Object.setPrototypeOf||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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=U(e);if(t){var i=U(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x(this,n)}}function x(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return M}));var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}(g,e);var t,n,u,v=L(g);function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),v.call(this,e)}return t=g,(n=[{key:"initialize",value:function(){this.enableIeFs=this.isTop(),this.getViewModel()}},{key:"seekTo",value:function(e){this.eventsApi&&this.eventsApi.trigger(s.SEEK_TO,e)}},{key:"seekToChapter",value:function(e){this.eventsApi&&this.eventsApi.trigger("cv-player-changechapter",e)}},{key:"getViewModel",value:function(){var e=this.model.get("id");e||(e=this.model.get("trackingCode")),this.viewModel=l.a.get("".concat(y.z.NAME,"-").concat(e)),this.viewModel.get("initialized")||this.initViewModel(),this.setUrl()}},{key:"initViewModel",value:function(){var e=this.model.pick("id");e.id||(e=this.model.pick("trackingCode")),e.id||e.trackingCode||c.a.ErrorHelper.throw(new d.a("Must provide either a master id or a tracking code to ".concat(this.name)));var t=r.extend({},this.viewModelDefaults,e,this.viewModel.toJSON(),{initialized:!0});this.viewModel.set(t)}},{key:"initWebPlayerEvents",value:function(){if(this.enableIeFs){var e=this.getUI("iframe");e&&0!==e.length&&e.on("load",this.bindWebPlayerEvents.bind(this))}}},{key:"bindWebPlayerEvents",value:function(){if(!this.iframeReady){var e=this.getUI("iframe").get(0);this.eventsApi=new p.CVEventsApi(e.contentWindow),this.eventsApi.on(o.PONG,this.onPong.bind(this)),this.eventsApi.trigger(s.PING),this.eventsApi.on(o.FULLSCREEN_CLICK,this.onFullscreenChange.bind(this)),this.eventsApi.trigger(s.SHOW_FS_BTN),this.eventsApi.on(o.TIME_UPDATE,this.onTimeUpdate.bind(this)),this.eventsApi.on(o.PLAY,this.onPlay.bind(this)),this.eventsApi.on(o.PAUSE,this.onPause.bind(this)),this.eventsApi.on(o.VIDEO_END,this.onEnded.bind(this)),this.options.showDevicesButton&&(this.eventsApi.on(o.DEVICES_BTN_CLICK,this.showDeviceToggle.bind(this)),this.eventsApi.trigger(s.SHOW_DEVICES_BTN)),this.options.captureAnalytics&&(this.tracker=new T({video:this.model.toJSON(),eventsApi:this.eventsApi,analyticsOptions:this.options.analyticsOptions}))}}},{key:"unbindWebPlayerEvents",value:function(){this.eventsApi&&(this.eventsApi.off(o.FULLSCREEN_CLICK),this.eventsApi.off(o.TIME_UPDATE),this.eventsApi.off(o.PLAY),this.eventsApi.off(o.PAUSE),this.eventsApi.off(o.VIDEO_END),this.eventsApi.off(o.PONG),this.eventsApi.off(o.DEVICES_BTN_CLICK))}},{key:"setUrl",value:function(){var e="".concat(this.viewModel.get("webPlayerHost"),"embed"),t=r.omit(this.viewModel.get("parameters"),["p","vid"])||{};t.a=!!this.viewModel.get("autoplay");var n=this.viewModel.get("id");n&&(t.vid=n);var i=this.viewModel.get("trackingCode");i&&(t.p=i),this.viewModel.get("currenttime")&&(t.t=this.viewModel.get("currenttime"),t.a=!this.viewModel.get("paused"));var o=f.a.urlBuilder(e,t),s=Object(a.signUrl)(o,{timestamp:!0});this.viewModel.set({url:s})}},{key:"isTop",value:function(){return window.top===window}},{key:"onTimeUpdate",value:function(e,t){this.viewModel.set("ready",!0),this.viewModel.set("currenttime",t)}},{key:"onPlay",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!1)}},{key:"onPause",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!0)}},{key:"onEnded",value:function(){this.viewModel.trigger("ended")}},{key:"onPong",value:function(){this.iframeReady=!0,this.viewModel.set("ready",!0),i.Radio.channel(this.channelName).trigger("loaded"),this.options.parentChannelName&&i.Radio.channel(this.options.parentChannelName).trigger("webplayer:loaded")}},{key:"onFullscreenChange",value:function(e,t,n){t?this.requestFs(n):this.cancelFs(n)}},{key:"requestFs",value:function(e){e||$("html").addClass("player-fullscreen")}},{key:"cancelFs",value:function(e){e||$("html").removeClass("player-fullscreen")}},{key:"showDeviceToggle",value:function(e){this.viewModel.trigger("showDevices",!!e)}},{key:"query",value:function(e,t){var n=this;if(this.iframeReady){var i=r.uniqueId("cveventsapi");this.eventsApi.one("".concat(o.QUERY_CALLBACK,"-").concat(i),(function(e,n){t(n)})),this.eventsApi.trigger(s.QUERY,e,i)}else this.listenToOnce(this.channelName,"loaded",(function(){return n.query(e,t)}))}},{key:"viewOptions",value:function(){return r.extend({},{styles:O.a,playSvg:h.a.getSvg(h.b.Play)},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.initWebPlayerEvents()}},{key:"onBeforeDestroy",value:function(){this.unbindWebPlayerEvents(),this.tracker&&this.tracker.destroy()}},{key:"elements",get:function(){return{iframe:"iframe"}}},{key:"name",get:function(){return"WebPlayerView"}},{key:"template",get:function(){return _.a}},{key:"className",get:function(){return"".concat(O.a.webPlayerContainer," embed-responsive embed-responsive-16by9")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"defaults",get:function(){return{captureAnalytics:!0,showDevicesButton:!1}}},{key:"viewModelDefaults",get:function(){return{width:640,height:360,autoplay:!!this.options.autoplay,parameters:{s:!1,bc:!1,bf:!1},webPlayerHost:this.options.webPlayerUrl}}}])&&I(t.prototype,n),u&&I(t,u),g}(c.a.Component)},1211:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var a,o=e.lambda,s=e.escapeExpression;return'<iframe class="'+s(o(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.webPlayer:a,t))+' embed-responsive-item" id="'+s(o(null!=(a=null!=t?t.options:t)?a.id:a,t))+'" allowfullscreen webkitallowfullscreen mozallowfullscreen allow="autoplay; fullscreen" frameborder="0" width="'+s(o(null!=(a=null!=t?t.options:t)?a.width:a,t))+'" height="'+s(o(null!=(a=null!=t?t.options:t)?a.height:a,t))+'" src="'+s(o(null!=(a=null!=t?t.options:t)?a.url:a,t))+'"></iframe>\r\n<div class="'+s(o(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.svgContainer:a,t))+'">'+(null!=(a=o(null!=(a=null!=t?t.options:t)?a.playSvg:a,t))?a:"")+"</div>"},useData:!0})},1212:function(e,t,n){e.exports={webPlayerContainer:"_2S4VF",webPlayer:"_3569L",svgContainer:"_1WsxD"}}}]);
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[1],{1034:function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"k",(function(){return h})),n.d(t,"g",(function(){return v})),n.d(t,"e",(function(){return y})),n.d(t,"j",(function(){return g})),n.d(t,"i",(function(){return b})),n.d(t,"c",(function(){return P})),n.d(t,"b",(function(){return S})),n.d(t,"d",(function(){return k})),n.d(t,"f",(function(){return E})),n.d(t,"h",(function(){return m}));var r=n(2),i=n(1),a=n(19),o=n(29),s=n(3),u="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var n=i.reduce(e,(function(e,n,r){var a=t[r];return n||a?i.isObject(n)&&i.isObject(a)&&!i.isUndefined(n.id)&&n.id===a.id?e:i.isArray(n)?d(n,a).length?e.concat(r):e:i.isEqual(n,a)?e:e.concat(r):e}),[]);if(n.length)return i.object(i.map(n,(function(n){return i.isArray(t[n])?[n,d(e[n],t[n])]:[n,t[n]]})))}}function d(e,t){var n=[];return i.each(t,(function(t){var r=i.findWhere(e,{id:t.id});if(!i.isUndefined(r)||0!==Object.keys(t).length){var a=i.isUndefined(r)?t:l(r,t);a&&(t.id<0&&!t.value||(!r||t.id<0?n.push(t):(a.id=t.id,n.push(a))))}})),n}var f={getChanges:function(e,t){var n=l(i.omit(e.toJSON(),c),i.omit(t.toJSON(),c));if(n)return i.object(i.map(i.keys(n),(function(e){return[e,f.formatChanges(e,n[e])]})))},formatChanges:function(e,t){if(!t)return null;if(i.isObject(t)&&i.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return i.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":return;default:r.a.ErrorHelper.throw(new a.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,n){var a=["distributors","producers","directors","productionCompanies"];for(var o in i.each(i.keys(n),(function(e){a.includes(e)&&(n[e]=t.get(e).toJSON())})),t.set(i.clone(n),{silent:!0}),e.set(t.toJSON(),{silent:!0}),n){if(!n[o]&&e.associations[o]){var s=e.get(o);(s instanceof r.a.Model||s instanceof r.a.NestedModel)&&s.clear()}}},getRemovedObjectIds:function(e,t){var n=["distributors","productionCompanies","producers","directors"],r={};return i.each(i.keys(e.toJSON()),(function(a){if(i.contains(n,a)){var o=e.get(a).map((function(e){return e.id})),s=t.get(a).map((function(e){return e.id})),u=i.filter(o,(function(e){return e&&!i.contains(s,e)}));u.length&&(r[a]=u)}})),r}},h={name:[{required:!0,msg:function(){return s.a.getPhrase(u,"videoTitleRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(u,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,n){return e&&e<1?s.a.getPhrase(u,"episodeNumberLessThanOne"):e&&e>2147483647?s.a.getPhrase(u,"episodeNumberExceeds"):e%1!=0?s.a.getPhrase(u,"episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?s.a.getPhrase(u,"episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":s.a.getPhrase(u,"seasonNoEpisodeNumber")}},p=o().year(),y={productionYear:function(e,t,n){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>p?s.a.getPhrase(u,"validProductionYears",{currentYear:p}):void 0):""}},v={name:[{required:!0,msg:function(){return s.a.getPhrase(u,"resourceNameRequired")}}]},g={suggestion:[{required:!0,msg:function(){return s.a.getPhrase(u,"suggestEditRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return s.a.getPhrase(u,"suggestEditReasonRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"suggestEditReasonExceeds")}}]},m={number:function(e,t,n){return e?+e<1?s.a.getPhrase(u,"seasonLessThanOne"):+e>255?s.a.getPhrase(u,"seasonExceeds"):+e%1!=0?s.a.getPhrase(u,"seasonNotWhole"):"":s.a.getPhrase(u,"seasonRequired")}},b={empty:function(){return s.a.getPhrase(u,"suggestEditRatingRequired")},original:function(){return s.a.getPhrase(u,"suggestEditRatingInvalid")}},E={url:[{required:!0,pattern:"url",msg:function(){return s.a.getPhrase(u,"linkUrlRequired")}},{maxLength:65535,msg:function(){return s.a.getPhrase(u,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return s.a.getPhrase(u,"linkNameRequired")}},{maxLength:255,msg:function(){return s.a.getPhrase(u,"linkNameExceeds")}}]},P={name:[{maxLength:128,msg:function(){return s.a.getPhrase(u,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return s.a.getPhrase(u,"fieldValueExceeds")}}]},S={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":s.a.getPhrase(u,"fieldsInvalid"):""}};function k(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1035:function(e,t,n){"use strict";var r=n(1041),i=n(1034),a=(n(1039),n(3),n(1042)),o=(n(1044),n(1040)),s=n(82),u={getVideoDownloadUrl:function(e,t){return s.a.safeUrlConcat(s.a.makeHttps(e),"/download?token=".concat(t))}};n.d(t,"a",(function(){return r.a})),n.d(t,"e",(function(){return i.g})),n.d(t,"h",(function(){return i.j})),n.d(t,"g",(function(){return i.i})),n.d(t,"d",(function(){return i.f})),n.d(t,"f",(function(){return i.h})),n.d(t,"c",(function(){return a.a})),n.d(t,"i",(function(){return o.a})),n.d(t,"b",(function(){return u}))},1039:function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(1),i=n(49),a=n(160),o=n(3),s="libraryEditor.utils",u={name:[{required:!0,msg:function(){return o.a.getPhrase(s,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(s,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(n){return n?i.a.calculateDestinationFolderDepth(e,n,t)>a.a.MAX_FOLDER_DEPTH?o.a.getPhrase(s,"maxFolderDepth",{maxDepth:a.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(s,"selectParentFolder")}}},l=function(e){var t=e.validateName,n=e.validateParent,i=e.folder,a=e.collection;return t&&n?r.extend({},u,c(i,a)):t?u:n?c(i,a):void 0}},1040:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(15),i=n(3),a=n(186),o=n(1052),s=n(8);function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var d={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-success";case e<80:return"bg-info";case e<96:return"bg-danger";case e<128:return"bg-pink";case e>=128:return"bg-warning";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case s.h.HostedLibrary:case s.h.CustomLibrary:return e.get("name");case s.h.Exchange:return i.a.getPhrase(l,"exchange");case s.h.Workspace:return i.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case s.h.HostedLibrary:case s.h.CustomLibrary:return"bg-info";case s.h.Exchange:return"bg-success";case s.h.Workspace:default:return"bg-danger"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,n=(u(t={},c.Pdf,r.b.FilePDF),u(t,c.Image,r.b.FileImg),u(t,c.PowerPoint,r.b.FilePowerpoint),u(t,c.Document,r.b.FileWord),u(t,c.Excel,r.b.FileExcel),u(t,c.Zip,r.b.FileZip),u(t,c.File,r.b.File),t)[e];return n||(n=r.b.Folder),r.a.getSvg(n)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return i.a.getPhrase(l,"pdf");case c.Image:return i.a.getPhrase(l,"image");case c.Document:return i.a.getPhrase(l,"document");case c.Excel:return i.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return i.a.getPhrase(l,"presentation");case c.Zip:return i.a.getPhrase(l,"zipArchive");case c.File:return i.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:d.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case a.e.VideoTitle:t+="VideoTitle";break;case a.e.Description:t+="Description";break;case a.e.Rating:t+="Rating";break;case a.e.SeriesTitle:t+="SeriesTitle";break;case a.e.Season:t+="SeasonNumber";break;case a.e.EpisodeNumber:t+="EpisodeNumber";break;case a.e.BroadcastDate:t+="BroadcastDate";break;case a.e.Channel:t+="Channel";break;case a.e.ProductionYear:t+="ProductionYear";break;case a.e.Distributors:t+="Distributors";break;case a.e.ProductionCompanies:t+="ProductionCompanies";break;case a.e.Directors:t+="Directors";break;case a.e.Producers:t+="Producers";break;case a.e.Other:t+="Other"}return i.a.getPhrase(l,t)}}},1041:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(1),i=n(13),a=n(3),o="libraryEditor.utils",s={isValidChapterTime:function(e,t,n,a){if(a){if(!r.isNumber(t))return u.StartTime.Invalid();if(t<0)return u.StartTime.Invalid();if(t>i.w.millisecondsToSeconds(n))return u.StartTime.Exceeds();if(a.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("startTime")===t})))return u.StartTime.Exists()}},isValidChapterName:function(e,t,n){return t?t.length>255?u.Name.MaxLength():n.some((function(n){return!(n.id&&n.id===e.id||n.cid===e.cid)&&n.get("name").trim()===t.trim()}))?u.Name.Exists():r.isEmpty(t.trim())?u.Name.Invalid():void 0:u.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return r.map(e,(function(e,n){var r={name:e.title,startTime:t,index:n,isPhysicalChapter:!0};return t+=e.duration,r}))}},u={Name:{Invalid:function(){return a.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return a.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return a.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return a.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return a.a.getPhrase(o,"chapterStartTimeExceeds")}}}},1042:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),i="libraryEditor.utils",a={name:[{required:!0,msg:function(){return r.a.getPhrase(i,"libraryNameRequired")}},{maxLength:255,msg:function(){return r.a.getPhrase(i,"libraryNameExceeds")}}]}},1044:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(1034),a=r.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return a("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return a("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return a("uploadLibraryRequired")}}],episodeNumber:function(e,t,n){return e&&e<1?a("episodeNumberLessThanOne"):e&&e>255?a("episodeNumberExceeds"):e&&e%1!=0?a("episodeNumberNotWhole"):n.season&&n.season.get("number")>=0&&null===e?a("episodeNumberNoSeason"):""},season:function(e,t,n){return n.season&&n.season.get("number")||e&&e.number||!n.episodeNumber?"":a("seasonNoEpisodeNumber")},productionYear:function(){return i.e.productionYear.apply(null,arguments)}}},1052:function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=u(e);if(t){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return s(this,n)}}function s(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return c}));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}}),t&&a(e,t)}(n,e);var t=o(n);function n(){return i(this,n),t.apply(this,arguments)}return n}(n(2).a.Collection)},1184:function(e,t,n){"use strict";var r=n(1),i=n(6),a=n(1214),o={PLAY:"cv-player-play",PAUSE:"cv-player-pause",VIDEO_END:"cv-player-ended",VOLUME_CHANGE:"cv-player-volumechange",CHAPTER_CHANGE:"cv-player-chapterchange",TIME_UPDATE:"cv-player-timeupdate",FULLSCREEN_CHANGE:"cv-player-fullscreenchange",CLIP_POINTS_UPDATE:"cv-player-cliptoolupdate",QUALITY_CHANGE:"cv-player-qualitychange",QUERY_CALLBACK:"cv-player-querycallback",SUBTITLES_ENABLED:"cv-player-hassubtitles",SUBTITLES:"cv-player-subtitles",PONG:"cv-player-pong",FULLSCREEN_CLICK:"_cvwp:fsc",DEVICES_BTN_CLICK:"_cvwp:devices:click"},s={PLAY:"cv-player-play",PAUSE:"cv-player-pause",SET_VOLUME:"cv-player-setvolume",NEXT_CHAPTER:"cv-player-nextchapter",PREV_CHAPTER:"cv-player-previouschapter",CHANGE_CHAPTER:"cv-player-changechapter",TOGGLE_CLIPPING:"cv-player-cliptooltoggle",SET_CLIP_POINTS:"cv-player-cliptoolset",CLIP:"cv-player-setclip",CLEAR_CLIP:"cv-player-clearclip",SEEK_TO:"cv-player-seekto",CONTROLS:"cv-player-showcontrols",SUBTITLES:"cv-player-subtitles",SET_QUALITY:"cv-player-setquality",QUERY:"cv-player-query",ADD_LISTENER:"cv-player-addlistener",REMOVE_LISTENER:"cv-player-removelistener",PING:"cv-player-ping",TOGGLE_DEVICES_BTN:"_cv:toggledevicesbtn",SHOW_DEVICES_BTN:"_cv:showdevicesbtn",SHOW_FS_BTN:"_cv:showfsbtn"},u={GET_AVAILABLE_QUALITIES:"getAvailableQualities",GET_CURRENT_QUALITY:"currentQuality",IS_PAUSED:"paused",GET_CURRENT_TIME:"currentTime",GET_CHAPTERS:"getChapters",HAS_METADATA_CHAPTERS:"hasMetadataChapters"},c=n(2),l=n(30),d=n(19),f=n(82),h=n(15),p=n(1029),y=n(0),v=function(e){return e instanceof c.a.Model||e instanceof c.a.Collection||e instanceof i.Model||e instanceof i.Collection?e.toJSON():e},g=n(4),m=n(119),b=n(42);function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function 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||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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C(e);if(t){var i=C(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return w(this,n)}}function w(e,t){return!t||"object"!==E(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(l,e);var t,n,i,a=k(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=a.call(this,e)).captureInterval=60,t}return t=l,(n=[{key:"initialize",value:function(){this.eventsApi=this.options.eventsApi,this.options.video||c.a.ErrorHelper.throw(new d.a("Video logging requires video to be passed in.")),this.model=this.options.video,this.playbackStatus=this.getNewPlaybackStatus(),this.options.captureInterval&&(this.captureInterval=this.options.captureInterval),this.bindListeners(),this.getChapters()}},{key:"bindListeners",value:function(){this.eventsApi.on(o.TIME_UPDATE,r.bind(this.onPlayerTimeUpdate,this)),this.eventsApi.on(o.VIDEO_END,r.bind(this.onEnd,this)),this.eventsApi.on(o.FULLSCREEN_CHANGE,r.bind(this.onFullScreen,this)),this.eventsApi.on(o.CHAPTER_CHANGE,r.bind(this.onChapterChange,this))}},{key:"unbindListeners",value:function(){this.eventsApi.off(o.TIME_UPDATE),this.eventsApi.off(o.VIDEO_END),this.eventsApi.off(o.FULLSCREEN_CHANGE),this.eventsApi.off(o.CHAPTER_CHANGE)}},{key:"getChapters",value:function(){var e=this;this.queryWebplayer(u.GET_CHAPTERS,(function(t,n){e.setInitialChapter(n),e.setVideoDuration(n)}))}},{key:"queryWebplayer",value:function(e,t){var n=r.uniqueId(this.name),i="".concat(o.QUERY_CALLBACK,"-").concat(n);this.eventsApi.one(i,t),this.eventsApi.trigger(s.QUERY,e,n)}},{key:"onEnd",value:function(){this.setCurrentPosition(this.playbackStatus.totalDuration),this.logVerbose(g.n.Finish),this.resetPlaybackStatus()}},{key:"onFullScreen",value:function(e,t){var n=t?g.n.FullScreenEnter:g.n.FullScreenExit;this.logVerbose(n)}},{key:"onPlayerTimeUpdate",value:function(e,t){var n=this;this.queryWebplayer(u.IS_PAUSED,(function(e,r){n.updateTime(t,r)}))}},{key:"onChapterChange",value:function(e,t){r.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"updateTime",value:function(e,t){var n=Math.floor(e);n&&n!==this.getCurrentPositon()&&(this.setCurrentPosition(n),t||(this.playbackHasStarted()||(this.logVerbose(g.n.Start),this.setPlaybackStarted()),this.incrementWatchTime(),this.getWatchTime()%this.captureInterval==0&&this.logVerbose(g.n.Playback),8===this.getWatchTime()&&this.logStream()))}},{key:"setInitialChapter",value:function(e){var t=r.find(e,(function(e){return!0===e.current}));r.isObject(t)&&this.setCurrentChapter(t.number)}},{key:"setVideoDuration",value:function(e){var t=r.reduce(e,(function(e,t){return e+t.duration}),0);!r.isNaN(t)&&r.isNumber(t)&&(this.playbackStatus.totalDuration=Math.floor(t))}},{key:"setCurrentPosition",value:function(e){this.playbackStatus.position=e}},{key:"getCurrentPositon",value:function(){return this.playbackStatus.position}},{key:"setCurrentChapter",value:function(e){this.playbackStatus.chapter=e}},{key:"setPlaybackStarted",value:function(){this.playbackStatus.hasStarted=!0}},{key:"playbackHasStarted",value:function(){return this.playbackStatus.hasStarted}},{key:"getWatchTime",value:function(){return this.playbackStatus.totalWatched}},{key:"incrementWatchTime",value:function(){this.playbackStatus.totalWatched+=1}},{key:"getNewPlaybackStatus",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.duration,n=e.watched;return{position:0,chapter:0,hasStarted:!1,totalWatched:n||0,totalDuration:t||0}}},{key:"resetPlaybackStatus",value:function(){var e={duration:this.playbackStatus.totalDuration,watched:this.playbackStatus.totalWatched};this.playbackStatus=this.getNewPlaybackStatus(e)}},{key:"unbindUnload",value:function(){$(window).off("unload")}},{key:"bindUnload",value:function(){$(window).on("unload",r.bind(this.logUnload,this))}},{key:"logUnload",value:function(){this.playbackHasStarted()&&this.logVerbose(g.n.Terminate)}},{key:"logStream",value:function(){var e=b.a.buildActionContext(this.options.analyticsOptions);m.a.log(g.q.Stream,this.getPlaybackData(),e),m.a.log(g.q.StreamRaw,this.getStreamRawData(),e)}},{key:"logVerbose",value:function(e){}},{key:"getPlaybackData",value:function(){return{model:v(this.model),playbackStatus:r.omit(this.playbackStatus,"hasStarted")}}},{key:"getStreamRawData",value:function(){return{id:v(this.model).id.toString()}}},{key:"onDestroy",value:function(){this.unbindListeners(),this.unbindUnload(),this.logUnload()}},{key:"name",get:function(){return"VideoAnalyticsTracker"}}])&&P(t.prototype,n),i&&P(t,i),l}(c.a.Service),N=n(1215),_=n.n(N),A=n(1216),O=n.n(A);function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(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 D(e,t){return(D=Object.setPrototypeOf||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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=U(e);if(t){var i=U(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x(this,n)}}function x(e,t){return!t||"object"!==R(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function U(e){return(U=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return M}));var M=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}(g,e);var t,n,u,v=L(g);function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),v.call(this,e)}return t=g,(n=[{key:"initialize",value:function(){this.enableIeFs=this.isTop(),this.getViewModel()}},{key:"seekTo",value:function(e){this.eventsApi&&this.eventsApi.trigger(s.SEEK_TO,e)}},{key:"seekToChapter",value:function(e){this.eventsApi&&this.eventsApi.trigger("cv-player-changechapter",e)}},{key:"getViewModel",value:function(){var e=this.model.get("id");e||(e=this.model.get("trackingCode")),this.viewModel=l.a.get("".concat(y.z.NAME,"-").concat(e)),this.viewModel.get("initialized")||this.initViewModel(),this.setUrl()}},{key:"initViewModel",value:function(){var e=this.model.pick("id");e.id||(e=this.model.pick("trackingCode")),e.id||e.trackingCode||c.a.ErrorHelper.throw(new d.a("Must provide either a master id or a tracking code to ".concat(this.name)));var t=r.extend({},this.viewModelDefaults,e,this.viewModel.toJSON(),{initialized:!0});this.viewModel.set(t)}},{key:"initWebPlayerEvents",value:function(){if(this.enableIeFs){var e=this.getUI("iframe");e&&0!==e.length&&e.on("load",this.bindWebPlayerEvents.bind(this))}}},{key:"bindWebPlayerEvents",value:function(){if(!this.iframeReady){var e=this.getUI("iframe").get(0);this.eventsApi=new p.CVEventsApi(e.contentWindow),this.eventsApi.on(o.PONG,this.onPong.bind(this)),this.eventsApi.trigger(s.PING),this.eventsApi.on(o.FULLSCREEN_CLICK,this.onFullscreenChange.bind(this)),this.eventsApi.trigger(s.SHOW_FS_BTN),this.eventsApi.on(o.TIME_UPDATE,this.onTimeUpdate.bind(this)),this.eventsApi.on(o.PLAY,this.onPlay.bind(this)),this.eventsApi.on(o.PAUSE,this.onPause.bind(this)),this.eventsApi.on(o.VIDEO_END,this.onEnded.bind(this)),this.options.showDevicesButton&&(this.eventsApi.on(o.DEVICES_BTN_CLICK,this.showDeviceToggle.bind(this)),this.eventsApi.trigger(s.SHOW_DEVICES_BTN)),this.options.captureAnalytics&&(this.tracker=new T({video:this.model.toJSON(),eventsApi:this.eventsApi,analyticsOptions:this.options.analyticsOptions}))}}},{key:"unbindWebPlayerEvents",value:function(){this.eventsApi&&(this.eventsApi.off(o.FULLSCREEN_CLICK),this.eventsApi.off(o.TIME_UPDATE),this.eventsApi.off(o.PLAY),this.eventsApi.off(o.PAUSE),this.eventsApi.off(o.VIDEO_END),this.eventsApi.off(o.PONG),this.eventsApi.off(o.DEVICES_BTN_CLICK))}},{key:"setUrl",value:function(){var e="".concat(this.viewModel.get("webPlayerHost"),"embed"),t=r.omit(this.viewModel.get("parameters"),["p","vid"])||{};t.a=!!this.viewModel.get("autoplay");var n=this.viewModel.get("id");n&&(t.vid=n);var i=this.viewModel.get("trackingCode");i&&(t.p=i),this.viewModel.get("currenttime")&&(t.t=this.viewModel.get("currenttime"),t.a=!this.viewModel.get("paused"));var o=f.a.urlBuilder(e,t),s=Object(a.signUrl)(o,{timestamp:!0});this.viewModel.set({url:s})}},{key:"isTop",value:function(){return window.top===window}},{key:"onTimeUpdate",value:function(e,t){this.viewModel.set("ready",!0),this.viewModel.set("currenttime",t)}},{key:"onPlay",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!1)}},{key:"onPause",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!0)}},{key:"onEnded",value:function(){this.viewModel.trigger("ended")}},{key:"onPong",value:function(){this.iframeReady=!0,this.viewModel.set("ready",!0),i.Radio.channel(this.channelName).trigger("loaded"),this.options.parentChannelName&&i.Radio.channel(this.options.parentChannelName).trigger("webplayer:loaded")}},{key:"onFullscreenChange",value:function(e,t,n){t?this.requestFs(n):this.cancelFs(n)}},{key:"requestFs",value:function(e){e||$("html").addClass("player-fullscreen")}},{key:"cancelFs",value:function(e){e||$("html").removeClass("player-fullscreen")}},{key:"showDeviceToggle",value:function(e){this.viewModel.trigger("showDevices",!!e)}},{key:"query",value:function(e,t){var n=this;if(this.iframeReady){var i=r.uniqueId("cveventsapi");this.eventsApi.one("".concat(o.QUERY_CALLBACK,"-").concat(i),(function(e,n){t(n)})),this.eventsApi.trigger(s.QUERY,e,i)}else this.listenToOnce(this.channelName,"loaded",(function(){return n.query(e,t)}))}},{key:"viewOptions",value:function(){return r.extend({},{styles:O.a,playSvg:h.a.getSvg(h.b.Play)},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.initWebPlayerEvents()}},{key:"onBeforeDestroy",value:function(){this.unbindWebPlayerEvents(),this.tracker&&this.tracker.destroy()}},{key:"elements",get:function(){return{iframe:"iframe"}}},{key:"name",get:function(){return"WebPlayerView"}},{key:"template",get:function(){return _.a}},{key:"className",get:function(){return"".concat(O.a.webPlayerContainer," embed-responsive embed-responsive-16by9")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"defaults",get:function(){return{captureAnalytics:!0,showDevicesButton:!1}}},{key:"viewModelDefaults",get:function(){return{width:640,height:360,autoplay:!!this.options.autoplay,parameters:{s:!1,bc:!1,bf:!1},webPlayerHost:this.options.webPlayerUrl}}}])&&I(t.prototype,n),u&&I(t,u),g}(c.a.Component)},1215:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){e.propertyIsEnumerable;var a,o=e.lambda,s=e.escapeExpression;return'<iframe class="'+s(o(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.webPlayer:a,t))+' embed-responsive-item" id="'+s(o(null!=(a=null!=t?t.options:t)?a.id:a,t))+'" allowfullscreen webkitallowfullscreen mozallowfullscreen allow="autoplay; fullscreen" frameborder="0" width="'+s(o(null!=(a=null!=t?t.options:t)?a.width:a,t))+'" height="'+s(o(null!=(a=null!=t?t.options:t)?a.height:a,t))+'" src="'+s(o(null!=(a=null!=t?t.options:t)?a.url:a,t))+'"></iframe>\r\n<div class="'+s(o(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.svgContainer:a,t))+'">'+(null!=(a=o(null!=(a=null!=t?t.options:t)?a.playSvg:a,t))?a:"")+"</div>"},useData:!0})},1216:function(e,t,n){e.exports={webPlayerContainer:"_2S4VF",webPlayer:"_3569L",svgContainer:"_1WsxD"}}}]);
@@ -1 +1 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[10],{1239:function(e,t,n){e.exports={container:"_2SYyd",embedInput:"ozkKz",textareaContainer:"_1monr",shareInput:"_36Arj",copyBtn:"_2UGxe",embedCopyBtn:"gaJap",footerText:"_3ydjG"}},1240:function(e,t,n){var l=n(10);e.exports=(l.default||l).template({1:function(e,t,n,l,o){var a;e.propertyIsEnumerable;return(null!=(a=e.lambda(null!=(a=null!=t?t.options:t)?a.spinnerEl:a,t))?a:"")+"\r\n"},3:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i,r=e.lambda,s=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'\r\n<div class="'+s(r(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.container:a,t))+'">\r\n <label for="share-input" class="mb-0 h6">'+s((n.lang||t&&t.lang||c).call(u,"shareLink",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="input-group mb-2">\r\n <input type="text" autocomplete="off" class="form-control '+s(r(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.shareInput:a,t))+'" id="share-input" spellcheck="false" readonly="true" value='+s("function"==typeof(i=null!=(i=n.shortUrl||(null!=t?t.shortUrl:t))?i:c)?i.call(u,{name:"shortUrl",hash:{},data:o}):i)+'>\r\n <div class="input-group-append">\r\n <button class="btn bg-white copy '+s(r(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.copyBtn:a,t))+'" type="button" data-clipboard-target="#share-input">'+s((n.lang||t&&t.lang||c).call(u,"copy",{name:"lang",hash:{},data:o}))+"</button>\r\n </div>\r\n </div>\r\n\r\n"+(null!=(a=n.unless.call(u,null!=(a=null!=t?t.options:t)?a.showEmbed:a,{name:"unless",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?a:"")+"\r\n"+(null!=(a=n.if.call(u,null!=(a=null!=t?t.options:t)?a.showEmbed:a,{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o}))?a:"")+"</div>\r\n"},4:function(e,t,n,l,o){e.propertyIsEnumerable;return' <small class="embed-toggle"><a class="text-info cursor-pointer hover-text-underline">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"showOptions",{name:"lang",hash:{},data:o}))+"</a></small>\r\n"},6:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i=null!=t?t:e.nullContext||{},r=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return' <hr class="mt-4">\r\n <label for="link-options-input" class="mb-2 h6">'+s((n.lang||t&&t.lang||r).call(i,"linkOptions",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="custom-control custom-checkbox mb-2">\r\n <input type="checkbox" autocomplete="off" class="custom-control-input public-checkbox" id="public-checkbox" name="public" '+(null!=(a=n.unless.call(i,null!=(a=null!=t?t.options:t)?a.canPublicShare:a,{name:"unless",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?a:"")+'>\r\n <label class="custom-control-label" for="public-checkbox">'+s((n.lang||t&&t.lang||r).call(i,"publicCheckbox",{name:"lang",hash:{},data:o}))+"</label>\r\n "+(null!=(a=n.unless.call(i,null!=(a=null!=t?t.options:t)?a.canPublicShare:a,{name:"unless",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o}))?a:"")+'\r\n </div>\r\n <hr class="mt-4">\r\n <label for="embed-input" class="mb-0 mt-2 h6">'+s((n.lang||t&&t.lang||r).call(i,"embed",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="input-group mb-2 '+s(u(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.textareaContainer:a,t))+'">\r\n <textarea type="text" class="form-control rounded w-100 h-100 '+s(u(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.embedInput:a,t))+'" id="embed-input" spellcheck="false" readonly="true">'+s(u(null!=(a=null!=t?t.options:t)?a.embedString:a,t))+'</textarea>\r\n <div class="input-group-append '+s(u(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.embedCopyBtn:a,t))+' rounded">\r\n <button class="btn bg-white copy '+s(u(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.copyBtn:a,t))+'" type="button" data-clipboard-target="#embed-input">'+s((n.lang||t&&t.lang||r).call(i,"copy",{name:"lang",hash:{},data:o}))+"</button>\r\n </div>\r\n </div>\r\n"+(null!=(a=n.if.call(i,null!=(a=null!=t?t.options:t)?a.videoSizes:a,{name:"if",hash:{},fn:e.program(11,o,0),inverse:e.noop,data:o}))?a:"")+' <div class="custom-control custom-checkbox d-inline-block">\r\n <input type="checkbox" autocomplete="off" class="custom-control-input autoplay-checkbox" id="autoplay-checkbox" name="autoplay">\r\n <label class="custom-control-label" for="autoplay-checkbox">'+s((n.lang||t&&t.lang||r).call(i,"autoplay",{name:"lang",hash:{},data:o}))+"</label>\r\n </div>\r\n"},7:function(e,t,n,l,o){return"disabled"},9:function(e,t,n,l,o){var a;e.propertyIsEnumerable;return'<div class="text-muted">'+e.escapeExpression(e.lambda(null!=(a=null!=t?t.options:t)?a.cannotPublicShareText:a,t))+"</div>"},11:function(e,t,n,l,o){e.propertyIsEnumerable;return' <label for="size-select" class="d-block pt-2 h6">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"playerSize",{name:"lang",hash:{},data:o}))+'</label>\r\n <select class="custom-select w-25 mr-4 size-select" id="#size-select" name="selectedVideoSize"></select>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,l,o){var a;e.propertyIsEnumerable;return null!=(a=n.if.call(null!=t?t:e.nullContext||{},null!=(a=null!=t?t.options:t)?a.showLoader:a,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?a:""},useData:!0})},1241:function(e,t,n){var l=n(10);e.exports=(l.default||l).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i=e.lambda,r=e.escapeExpression;return'<small class="text-left w-100 mb-0 '+r(i(null!=(a=null!=t?t.options:t)?a.footerTextClass:a,t))+'">'+r(i(null!=(a=null!=t?t.options:t)?a.privacyDescription:a,t))+"</small>"},useData:!0})},1242:function(e,t,n){var l=n(10);e.exports=(l.default||l).template({1:function(e,t,n,l,o){return'style="position:absolute; top:0; left:0; width:100%; height:100%;"'},3:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i=e.lambda,r=e.escapeExpression;return'width="'+r(i(null!=(a=null!=t?t.videoSize:t)?a.width:a,t))+'" height="'+r(i(null!=(a=null!=t?t.videoSize:t)?a.height:a,t))+'"'},compiler:[8,">= 4.3.0"],main:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i,r=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,u=e.escapeExpression;return'<iframe frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen '+(null!=(a=n.if.call(r,null!=t?t.isResponsive:t,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?a:"")+' src="'+u("function"==typeof(i=null!=(i=n.baseUrl||(null!=t?t.baseUrl:t))?i:s)?i.call(r,{name:"baseUrl",hash:{},data:o}):i)+"?shareCode="+u("function"==typeof(i=null!=(i=n.shortCode||(null!=t?t.shortCode:t))?i:s)?i.call(r,{name:"shortCode",hash:{},data:o}):i)+"&a="+u("function"==typeof(i=null!=(i=n.autoplay||(null!=t?t.autoplay:t))?i:s)?i.call(r,{name:"autoplay",hash:{},data:o}):i)+'"></iframe>'},useData:!0})},1469:function(e,t,n){"use strict";n.r(t);var l=n(1),o=n(1028),a=n(5),i=n(30),r=n(2),s=n(3),u=n(82),c="shared.shared-utils",p=function(){return[{label:s.a.getPhrase(c,"responsive"),width:"100%",height:"100%"},{label:s.a.getPhrase(c,"small"),width:"640",height:"360"},{label:s.a.getPhrase(c,"medium"),width:"1014",height:"576"},{label:s.a.getPhrase(c,"large"),width:"1280",height:"720"}]},h=n(283),d=n(187),f=n(16),b=n(8),m=n(13),y=n(1239),g=n.n(y),v=n(1240),k=n.n(v),w=n(1241),S=n.n(w),x=n(1242),C=n.n(x),E=n(0);function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function z(e,t,n){return t&&O(e.prototype,t),n&&O(e,n),e}function V(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}function D(e,t){return(D=Object.setPrototypeOf||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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,l=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(l,arguments,o)}else n=l.apply(this,arguments);return M(this,n)}}function M(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"ShareView",(function(){return U}));var R=function(e){V(n,e);var t=_(n);function n(e){return I(this,n),t.call(this,e)}return z(n,[{key:"viewOptions",value:function(){return{footerTextClass:g.a.footerText,privacyDescription:this.options.privacyDescription}}},{key:"name",get:function(){return"ShareFooterComponent"}},{key:"className",get:function(){return"modal-footer bg-light rounded-bottom"}},{key:"template",get:function(){return S.a}}]),n}(r.a.Component),U=function(e){V(n,e);var t=_(n);function n(e){var l;return I(this,n),(l=t.call(this,e)).clipboards=[],l}return z(n,[{key:"initialize",value:function(){this.setUpViewModel(),this.bindListeners(),this.videoDataService=a.a.getInstance(f.a.Video,this)}},{key:"events",value:function(){return{"click @ui.copy":"onClickCopy","click @ui.embedToggle":"onClickEmbed"}}},{key:"regions",value:function(){return{container:{el:".".concat(g.a.container),replaceElement:!1},footer:{el:".modal-footer",replaceElement:!0}}}},{key:"bindListeners",value:function(){this.listenTo(this.viewModel,"change:autoplay change:selectedVideoSize",this.render),this.listenTo(this.viewModel,"change:public",this.onTogglePublic),this.listenTo(E.e.VIDEO,"".concat(E.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render)}},{key:"setUpViewModel",value:function(){this.viewModel=i.a.get("share:".concat(this.options.videoId),this.options)}},{key:"onTogglePublic",value:function(){var e=this,t=this.viewModel.get("public")?b.l.Public:b.l.SchoolOnly;this.videoDataService.getSharedResource(this.videoId,t,(function(n){n.set("privacyId",t),e.onSharedResourceSync(n)}))}},{key:"updateViewModel",value:function(){this.viewModel.set("public",this.model.get("privacyId")===b.l.Public,{silent:!0})}},{key:"onSharedResourceSync",value:function(e){this.model=e,this.updateViewModel(),this.render()}},{key:"fetchData",value:function(){this.video=this.videoDataService.getVideo(this.videoId),this.model||this.videoDataService.getSharedResource(this.videoId,null,l.bind(this.onSharedResourceSync,this))}},{key:"buildEmbedString",value:function(){var e=l.extend({},this.model.toJSON(),this.viewModel.toJSON()),t=this.options.videoSizes[e.selectedVideoSize],n="100%"===t.height&&"100%"===t.width;e.videoSize=t,e.baseUrl=u.a.safeUrlConcat(this.config.get("onlineUrl"),"/share/embed"),e.isResponsive=n;var o=C()(e);return n?'<div style="padding:56.25% 0 0 0; position:relative;">'.concat(o,"</div>"):o}},{key:"onClickEmbed",value:function(){this.viewModel.set("showEmbed",!0),this.render()}},{key:"onClickCopy",value:function(e){this.$(e.currentTarget).text(s.a.getPhrase(this.lang,"copied"))}},{key:"getPrivacyDescription",value:function(e){switch(e){case b.l[b.l.Private]:return s.a.getPhrase(this.lang,"private");case b.l[b.l.SchoolOnly]:return s.a.getPhrase(this.lang,"schoolOnly");case b.l[b.l.Public]:return s.a.getPhrase(this.lang,"public");default:return""}}},{key:"initClipboards",value:function(){var e=this;this.destroyClipboards(),this.getUI("copy").each((function(t,n){e.clipboards.push(new o(n))}))}},{key:"destroyClipboards",value:function(){l.each(this.clipboards,(function(e){return e.destroy()})),this.clipboards=[]}},{key:"getCannotPublicShareText",value:function(){return this.video?m.x.isExchangeVideo(this.video)?s.a.getPhrase(this.lang,"cannotShareExchange"):s.a.getPhrase(this.lang,"cannotShareClickView"):""}},{key:"onBeforeDestroy",value:function(){this.destroyClipboards()}},{key:"renderFooter",value:function(){var e=this.model&&this.getPrivacyDescription(this.model.get("privacy"));this.showChildView("footer",new R({privacyDescription:e}))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:g.a},this.viewModel.toJSON()),{embedString:this.model&&this.buildEmbedString(),spinnerEl:m.q.getSpinner({size:m.r.Large,extraClasses:"mx-auto"}),showLoader:!this.model||!this.video,canPublicShare:this.video&&m.j.canPublicShare(this.video),cannotPublicShareText:this.getCannotPublicShareText()})}},{key:"onBeforeRender",value:function(){this.fetchData()}},{key:"onRender",value:function(){this.initClipboards(),this.renderFooter()}},{key:"name",get:function(){return"ShareView"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return k.a}},{key:"lang",get:function(){return"shared.share"}},{key:"props",get:function(){return["videoId"]}},{key:"elements",get:function(){return{copy:".copy",embedToggle:".embed-toggle"}}},{key:"defaults",get:function(){return{autoplay:!1,selectedVideoSize:0,videoSizes:p()}}},{key:"behaviors",get:function(){return[{behaviorClass:h.f,title:s.a.getPhrase(this.lang,"share"),hideCloseButton:!0},{behaviorClass:h.g,bindViewModel:!0}]}},{key:"bindings",get:function(){var e=this;return{"[name=autoplay]":"autoplay","[name=selectedVideoSize]":{observe:"selectedVideoSize",selectOptions:{collection:function(){return l.map(e.options.videoSizes,(function(e,t){return{label:e.label,value:t}}))}}},"[name=public]":"public"}}},{key:"requiredResources",get:function(){return{config:d.b.config}}}]),n}(r.a.View)}}]);
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[10],{1237:function(e,t,n){e.exports={container:"_2SYyd",embedInput:"ozkKz",textareaContainer:"_1monr",shareInput:"_36Arj",copyBtn:"_2UGxe",embedCopyBtn:"gaJap",footerText:"_3ydjG"}},1238:function(e,t,n){var l=n(10);e.exports=(l.default||l).template({1:function(e,t,n,l,o){var a;e.propertyIsEnumerable;return(null!=(a=e.lambda(null!=(a=null!=t?t.options:t)?a.spinnerEl:a,t))?a:"")+"\r\n"},3:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i,r=e.lambda,s=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'\r\n<div class="'+s(r(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.container:a,t))+'">\r\n <label for="share-input" class="mb-0 h6">'+s((n.lang||t&&t.lang||c).call(u,"shareLink",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="input-group mb-2">\r\n <input type="text" autocomplete="off" class="form-control '+s(r(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.shareInput:a,t))+'" id="share-input" spellcheck="false" readonly="true" value='+s("function"==typeof(i=null!=(i=n.shortUrl||(null!=t?t.shortUrl:t))?i:c)?i.call(u,{name:"shortUrl",hash:{},data:o}):i)+'>\r\n <div class="input-group-append">\r\n <button class="btn bg-white copy '+s(r(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.copyBtn:a,t))+'" type="button" data-clipboard-target="#share-input">'+s((n.lang||t&&t.lang||c).call(u,"copy",{name:"lang",hash:{},data:o}))+"</button>\r\n </div>\r\n </div>\r\n\r\n"+(null!=(a=n.unless.call(u,null!=(a=null!=t?t.options:t)?a.showEmbed:a,{name:"unless",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?a:"")+"\r\n"+(null!=(a=n.if.call(u,null!=(a=null!=t?t.options:t)?a.showEmbed:a,{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o}))?a:"")+"</div>\r\n"},4:function(e,t,n,l,o){e.propertyIsEnumerable;return' <small class="embed-toggle"><a class="text-info cursor-pointer hover-text-underline">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"showOptions",{name:"lang",hash:{},data:o}))+"</a></small>\r\n"},6:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i=null!=t?t:e.nullContext||{},r=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return' <hr class="mt-4">\r\n <label for="link-options-input" class="mb-2 h6">'+s((n.lang||t&&t.lang||r).call(i,"linkOptions",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="custom-control custom-checkbox mb-2">\r\n <input type="checkbox" autocomplete="off" class="custom-control-input public-checkbox" id="public-checkbox" name="public" '+(null!=(a=n.unless.call(i,null!=(a=null!=t?t.options:t)?a.canPublicShare:a,{name:"unless",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?a:"")+'>\r\n <label class="custom-control-label" for="public-checkbox">'+s((n.lang||t&&t.lang||r).call(i,"publicCheckbox",{name:"lang",hash:{},data:o}))+"</label>\r\n "+(null!=(a=n.unless.call(i,null!=(a=null!=t?t.options:t)?a.canPublicShare:a,{name:"unless",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o}))?a:"")+'\r\n </div>\r\n <hr class="mt-4">\r\n <label for="embed-input" class="mb-0 mt-2 h6">'+s((n.lang||t&&t.lang||r).call(i,"embed",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="input-group mb-2 '+s(u(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.textareaContainer:a,t))+'">\r\n <textarea type="text" class="form-control rounded w-100 h-100 '+s(u(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.embedInput:a,t))+'" id="embed-input" spellcheck="false" readonly="true">'+s(u(null!=(a=null!=t?t.options:t)?a.embedString:a,t))+'</textarea>\r\n <div class="input-group-append '+s(u(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.embedCopyBtn:a,t))+' rounded">\r\n <button class="btn bg-white copy '+s(u(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.copyBtn:a,t))+'" type="button" data-clipboard-target="#embed-input">'+s((n.lang||t&&t.lang||r).call(i,"copy",{name:"lang",hash:{},data:o}))+"</button>\r\n </div>\r\n </div>\r\n"+(null!=(a=n.if.call(i,null!=(a=null!=t?t.options:t)?a.videoSizes:a,{name:"if",hash:{},fn:e.program(11,o,0),inverse:e.noop,data:o}))?a:"")+' <div class="custom-control custom-checkbox d-inline-block">\r\n <input type="checkbox" autocomplete="off" class="custom-control-input autoplay-checkbox" id="autoplay-checkbox" name="autoplay">\r\n <label class="custom-control-label" for="autoplay-checkbox">'+s((n.lang||t&&t.lang||r).call(i,"autoplay",{name:"lang",hash:{},data:o}))+"</label>\r\n </div>\r\n"},7:function(e,t,n,l,o){return"disabled"},9:function(e,t,n,l,o){var a;e.propertyIsEnumerable;return'<div class="text-muted">'+e.escapeExpression(e.lambda(null!=(a=null!=t?t.options:t)?a.cannotPublicShareText:a,t))+"</div>"},11:function(e,t,n,l,o){e.propertyIsEnumerable;return' <label for="size-select" class="d-block pt-2 h6">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"playerSize",{name:"lang",hash:{},data:o}))+'</label>\r\n <select class="custom-select w-25 mr-4 size-select" id="#size-select" name="selectedVideoSize"></select>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,l,o){var a;e.propertyIsEnumerable;return null!=(a=n.if.call(null!=t?t:e.nullContext||{},null!=(a=null!=t?t.options:t)?a.showLoader:a,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?a:""},useData:!0})},1239:function(e,t,n){var l=n(10);e.exports=(l.default||l).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i=e.lambda,r=e.escapeExpression;return'<small class="text-left w-100 mb-0 '+r(i(null!=(a=null!=t?t.options:t)?a.footerTextClass:a,t))+'">'+r(i(null!=(a=null!=t?t.options:t)?a.privacyDescription:a,t))+"</small>"},useData:!0})},1240:function(e,t,n){var l=n(10);e.exports=(l.default||l).template({1:function(e,t,n,l,o){return'style="position:absolute; top:0; left:0; width:100%; height:100%;"'},3:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i=e.lambda,r=e.escapeExpression;return'width="'+r(i(null!=(a=null!=t?t.videoSize:t)?a.width:a,t))+'" height="'+r(i(null!=(a=null!=t?t.videoSize:t)?a.height:a,t))+'"'},compiler:[8,">= 4.3.0"],main:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i,r=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,u=e.escapeExpression;return'<iframe frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen '+(null!=(a=n.if.call(r,null!=t?t.isResponsive:t,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?a:"")+' src="'+u("function"==typeof(i=null!=(i=n.baseUrl||(null!=t?t.baseUrl:t))?i:s)?i.call(r,{name:"baseUrl",hash:{},data:o}):i)+"?shareCode="+u("function"==typeof(i=null!=(i=n.shortCode||(null!=t?t.shortCode:t))?i:s)?i.call(r,{name:"shortCode",hash:{},data:o}):i)+"&a="+u("function"==typeof(i=null!=(i=n.autoplay||(null!=t?t.autoplay:t))?i:s)?i.call(r,{name:"autoplay",hash:{},data:o}):i)+'"></iframe>'},useData:!0})},1467:function(e,t,n){"use strict";n.r(t);var l=n(1),o=n(1026),a=n(5),i=n(30),r=n(2),s=n(3),u=n(82),c="shared.shared-utils",p=function(){return[{label:s.a.getPhrase(c,"responsive"),width:"100%",height:"100%"},{label:s.a.getPhrase(c,"small"),width:"640",height:"360"},{label:s.a.getPhrase(c,"medium"),width:"1014",height:"576"},{label:s.a.getPhrase(c,"large"),width:"1280",height:"720"}]},h=n(283),d=n(187),f=n(16),b=n(8),m=n(13),y=n(1237),g=n.n(y),v=n(1238),k=n.n(v),w=n(1239),S=n.n(w),x=n(1240),C=n.n(x),E=n(0);function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function z(e,t,n){return t&&O(e.prototype,t),n&&O(e,n),e}function V(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}function D(e,t){return(D=Object.setPrototypeOf||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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,l=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(l,arguments,o)}else n=l.apply(this,arguments);return M(this,n)}}function M(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"ShareView",(function(){return U}));var R=function(e){V(n,e);var t=_(n);function n(e){return I(this,n),t.call(this,e)}return z(n,[{key:"viewOptions",value:function(){return{footerTextClass:g.a.footerText,privacyDescription:this.options.privacyDescription}}},{key:"name",get:function(){return"ShareFooterComponent"}},{key:"className",get:function(){return"modal-footer bg-light rounded-bottom"}},{key:"template",get:function(){return S.a}}]),n}(r.a.Component),U=function(e){V(n,e);var t=_(n);function n(e){var l;return I(this,n),(l=t.call(this,e)).clipboards=[],l}return z(n,[{key:"initialize",value:function(){this.setUpViewModel(),this.bindListeners(),this.videoDataService=a.a.getInstance(f.a.Video,this)}},{key:"events",value:function(){return{"click @ui.copy":"onClickCopy","click @ui.embedToggle":"onClickEmbed"}}},{key:"regions",value:function(){return{container:{el:".".concat(g.a.container),replaceElement:!1},footer:{el:".modal-footer",replaceElement:!0}}}},{key:"bindListeners",value:function(){this.listenTo(this.viewModel,"change:autoplay change:selectedVideoSize",this.render),this.listenTo(this.viewModel,"change:public",this.onTogglePublic),this.listenTo(E.e.VIDEO,"".concat(E.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render)}},{key:"setUpViewModel",value:function(){this.viewModel=i.a.get("share:".concat(this.options.videoId),this.options)}},{key:"onTogglePublic",value:function(){var e=this,t=this.viewModel.get("public")?b.l.Public:b.l.SchoolOnly;this.videoDataService.getSharedResource(this.videoId,t,(function(n){n.set("privacyId",t),e.onSharedResourceSync(n)}))}},{key:"updateViewModel",value:function(){this.viewModel.set("public",this.model.get("privacyId")===b.l.Public,{silent:!0})}},{key:"onSharedResourceSync",value:function(e){this.model=e,this.updateViewModel(),this.render()}},{key:"fetchData",value:function(){this.video=this.videoDataService.getVideo(this.videoId),this.model||this.videoDataService.getSharedResource(this.videoId,null,l.bind(this.onSharedResourceSync,this))}},{key:"buildEmbedString",value:function(){var e=l.extend({},this.model.toJSON(),this.viewModel.toJSON()),t=this.options.videoSizes[e.selectedVideoSize],n="100%"===t.height&&"100%"===t.width;e.videoSize=t,e.baseUrl=u.a.safeUrlConcat(this.config.get("onlineUrl"),"/share/embed"),e.isResponsive=n;var o=C()(e);return n?'<div style="padding:56.25% 0 0 0; position:relative;">'.concat(o,"</div>"):o}},{key:"onClickEmbed",value:function(){this.viewModel.set("showEmbed",!0),this.render()}},{key:"onClickCopy",value:function(e){this.$(e.currentTarget).text(s.a.getPhrase(this.lang,"copied"))}},{key:"getPrivacyDescription",value:function(e){switch(e){case b.l[b.l.Private]:return s.a.getPhrase(this.lang,"private");case b.l[b.l.SchoolOnly]:return s.a.getPhrase(this.lang,"schoolOnly");case b.l[b.l.Public]:return s.a.getPhrase(this.lang,"public");default:return""}}},{key:"initClipboards",value:function(){var e=this;this.destroyClipboards(),this.getUI("copy").each((function(t,n){e.clipboards.push(new o(n))}))}},{key:"destroyClipboards",value:function(){l.each(this.clipboards,(function(e){return e.destroy()})),this.clipboards=[]}},{key:"getCannotPublicShareText",value:function(){return this.video?m.x.isExchangeVideo(this.video)?s.a.getPhrase(this.lang,"cannotShareExchange"):s.a.getPhrase(this.lang,"cannotShareClickView"):""}},{key:"onBeforeDestroy",value:function(){this.destroyClipboards()}},{key:"renderFooter",value:function(){var e=this.model&&this.getPrivacyDescription(this.model.get("privacy"));this.showChildView("footer",new R({privacyDescription:e}))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:g.a},this.viewModel.toJSON()),{embedString:this.model&&this.buildEmbedString(),spinnerEl:m.q.getSpinner({size:m.r.Large,extraClasses:"mx-auto"}),showLoader:!this.model||!this.video,canPublicShare:this.video&&m.j.canPublicShare(this.video),cannotPublicShareText:this.getCannotPublicShareText()})}},{key:"onBeforeRender",value:function(){this.fetchData()}},{key:"onRender",value:function(){this.initClipboards(),this.renderFooter()}},{key:"name",get:function(){return"ShareView"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return k.a}},{key:"lang",get:function(){return"shared.share"}},{key:"props",get:function(){return["videoId"]}},{key:"elements",get:function(){return{copy:".copy",embedToggle:".embed-toggle"}}},{key:"defaults",get:function(){return{autoplay:!1,selectedVideoSize:0,videoSizes:p()}}},{key:"behaviors",get:function(){return[{behaviorClass:h.f,title:s.a.getPhrase(this.lang,"share"),hideCloseButton:!0},{behaviorClass:h.g,bindViewModel:!0}]}},{key:"bindings",get:function(){var e=this;return{"[name=autoplay]":"autoplay","[name=selectedVideoSize]":{observe:"selectedVideoSize",selectOptions:{collection:function(){return l.map(e.options.videoSizes,(function(e,t){return{label:e.label,value:t}}))}}},"[name=public]":"public"}}},{key:"requiredResources",get:function(){return{config:d.b.config}}}]),n}(r.a.View)}}]);
@@ -0,0 +1 @@
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[10],{1243:function(e,t,n){e.exports={container:"_2SYyd",embedInput:"ozkKz",textareaContainer:"_1monr",shareInput:"_36Arj",copyBtn:"_2UGxe",embedCopyBtn:"gaJap",footerText:"_3ydjG"}},1244:function(e,t,n){var l=n(10);e.exports=(l.default||l).template({1:function(e,t,n,l,o){var a;e.propertyIsEnumerable;return(null!=(a=e.lambda(null!=(a=null!=t?t.options:t)?a.spinnerEl:a,t))?a:"")+"\r\n"},3:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i,r=e.lambda,s=e.escapeExpression,u=null!=t?t:e.nullContext||{},c=e.hooks.helperMissing;return'\r\n<div class="'+s(r(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.container:a,t))+'">\r\n <label for="share-input" class="mb-0 h6">'+s((n.lang||t&&t.lang||c).call(u,"shareLink",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="input-group mb-2">\r\n <input type="text" autocomplete="off" class="form-control '+s(r(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.shareInput:a,t))+'" id="share-input" spellcheck="false" readonly="true" value='+s("function"==typeof(i=null!=(i=n.shortUrl||(null!=t?t.shortUrl:t))?i:c)?i.call(u,{name:"shortUrl",hash:{},data:o}):i)+'>\r\n <div class="input-group-append">\r\n <button class="btn bg-white copy '+s(r(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.copyBtn:a,t))+'" type="button" data-clipboard-target="#share-input">'+s((n.lang||t&&t.lang||c).call(u,"copy",{name:"lang",hash:{},data:o}))+"</button>\r\n </div>\r\n </div>\r\n\r\n"+(null!=(a=n.unless.call(u,null!=(a=null!=t?t.options:t)?a.showEmbed:a,{name:"unless",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?a:"")+"\r\n"+(null!=(a=n.if.call(u,null!=(a=null!=t?t.options:t)?a.showEmbed:a,{name:"if",hash:{},fn:e.program(6,o,0),inverse:e.noop,data:o}))?a:"")+"</div>\r\n"},4:function(e,t,n,l,o){e.propertyIsEnumerable;return' <small class="embed-toggle"><a class="text-info cursor-pointer hover-text-underline">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"showOptions",{name:"lang",hash:{},data:o}))+"</a></small>\r\n"},6:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i=null!=t?t:e.nullContext||{},r=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return' <hr class="mt-4">\r\n <label for="link-options-input" class="mb-2 h6">'+s((n.lang||t&&t.lang||r).call(i,"linkOptions",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="custom-control custom-checkbox mb-2">\r\n <input type="checkbox" autocomplete="off" class="custom-control-input public-checkbox" id="public-checkbox" name="public" '+(null!=(a=n.unless.call(i,null!=(a=null!=t?t.options:t)?a.canPublicShare:a,{name:"unless",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?a:"")+'>\r\n <label class="custom-control-label" for="public-checkbox">'+s((n.lang||t&&t.lang||r).call(i,"publicCheckbox",{name:"lang",hash:{},data:o}))+"</label>\r\n "+(null!=(a=n.unless.call(i,null!=(a=null!=t?t.options:t)?a.canPublicShare:a,{name:"unless",hash:{},fn:e.program(9,o,0),inverse:e.noop,data:o}))?a:"")+'\r\n </div>\r\n <hr class="mt-4">\r\n <label for="embed-input" class="mb-0 mt-2 h6">'+s((n.lang||t&&t.lang||r).call(i,"embed",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="input-group mb-2 '+s(u(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.textareaContainer:a,t))+'">\r\n <textarea type="text" class="form-control rounded w-100 h-100 '+s(u(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.embedInput:a,t))+'" id="embed-input" spellcheck="false" readonly="true">'+s(u(null!=(a=null!=t?t.options:t)?a.embedString:a,t))+'</textarea>\r\n <div class="input-group-append '+s(u(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.embedCopyBtn:a,t))+' rounded">\r\n <button class="btn bg-white copy '+s(u(null!=(a=null!=(a=null!=t?t.options:t)?a.styles:a)?a.copyBtn:a,t))+'" type="button" data-clipboard-target="#embed-input">'+s((n.lang||t&&t.lang||r).call(i,"copy",{name:"lang",hash:{},data:o}))+"</button>\r\n </div>\r\n </div>\r\n"+(null!=(a=n.if.call(i,null!=(a=null!=t?t.options:t)?a.videoSizes:a,{name:"if",hash:{},fn:e.program(11,o,0),inverse:e.noop,data:o}))?a:"")+' <div class="custom-control custom-checkbox d-inline-block">\r\n <input type="checkbox" autocomplete="off" class="custom-control-input autoplay-checkbox" id="autoplay-checkbox" name="autoplay">\r\n <label class="custom-control-label" for="autoplay-checkbox">'+s((n.lang||t&&t.lang||r).call(i,"autoplay",{name:"lang",hash:{},data:o}))+"</label>\r\n </div>\r\n"},7:function(e,t,n,l,o){return"disabled"},9:function(e,t,n,l,o){var a;e.propertyIsEnumerable;return'<div class="text-muted">'+e.escapeExpression(e.lambda(null!=(a=null!=t?t.options:t)?a.cannotPublicShareText:a,t))+"</div>"},11:function(e,t,n,l,o){e.propertyIsEnumerable;return' <label for="size-select" class="d-block pt-2 h6">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"playerSize",{name:"lang",hash:{},data:o}))+'</label>\r\n <select class="custom-select w-25 mr-4 size-select" id="#size-select" name="selectedVideoSize"></select>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,l,o){var a;e.propertyIsEnumerable;return null!=(a=n.if.call(null!=t?t:e.nullContext||{},null!=(a=null!=t?t.options:t)?a.showLoader:a,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?a:""},useData:!0})},1245:function(e,t,n){var l=n(10);e.exports=(l.default||l).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i=e.lambda,r=e.escapeExpression;return'<small class="text-left w-100 mb-0 '+r(i(null!=(a=null!=t?t.options:t)?a.footerTextClass:a,t))+'">'+r(i(null!=(a=null!=t?t.options:t)?a.privacyDescription:a,t))+"</small>"},useData:!0})},1246:function(e,t,n){var l=n(10);e.exports=(l.default||l).template({1:function(e,t,n,l,o){return'style="position:absolute; top:0; left:0; width:100%; height:100%;"'},3:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i=e.lambda,r=e.escapeExpression;return'width="'+r(i(null!=(a=null!=t?t.videoSize:t)?a.width:a,t))+'" height="'+r(i(null!=(a=null!=t?t.videoSize:t)?a.height:a,t))+'"'},compiler:[8,">= 4.3.0"],main:function(e,t,n,l,o){e.propertyIsEnumerable;var a,i,r=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,u=e.escapeExpression;return'<iframe frameborder="0" allowfullscreen webkitallowfullscreen mozallowfullscreen '+(null!=(a=n.if.call(r,null!=t?t.isResponsive:t,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?a:"")+' src="'+u("function"==typeof(i=null!=(i=n.baseUrl||(null!=t?t.baseUrl:t))?i:s)?i.call(r,{name:"baseUrl",hash:{},data:o}):i)+"?shareCode="+u("function"==typeof(i=null!=(i=n.shortCode||(null!=t?t.shortCode:t))?i:s)?i.call(r,{name:"shortCode",hash:{},data:o}):i)+"&a="+u("function"==typeof(i=null!=(i=n.autoplay||(null!=t?t.autoplay:t))?i:s)?i.call(r,{name:"autoplay",hash:{},data:o}):i)+'"></iframe>'},useData:!0})},1473:function(e,t,n){"use strict";n.r(t);var l=n(1),o=n(1030),a=n(5),i=n(30),r=n(2),s=n(3),u=n(82),c="shared.shared-utils",p=function(){return[{label:s.a.getPhrase(c,"responsive"),width:"100%",height:"100%"},{label:s.a.getPhrase(c,"small"),width:"640",height:"360"},{label:s.a.getPhrase(c,"medium"),width:"1014",height:"576"},{label:s.a.getPhrase(c,"large"),width:"1280",height:"720"}]},h=n(283),d=n(187),f=n(16),b=n(8),m=n(13),y=n(1243),g=n.n(y),v=n(1244),k=n.n(v),w=n(1245),S=n.n(w),x=n(1246),C=n.n(x),E=n(0);function P(e){return(P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function I(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function O(e,t){for(var n=0;n<t.length;n++){var l=t[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}function z(e,t,n){return t&&O(e.prototype,t),n&&O(e,n),e}function V(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&D(e,t)}function D(e,t){return(D=Object.setPrototypeOf||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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,l=T(e);if(t){var o=T(this).constructor;n=Reflect.construct(l,arguments,o)}else n=l.apply(this,arguments);return M(this,n)}}function M(e,t){return!t||"object"!==P(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"ShareView",(function(){return U}));var R=function(e){V(n,e);var t=_(n);function n(e){return I(this,n),t.call(this,e)}return z(n,[{key:"viewOptions",value:function(){return{footerTextClass:g.a.footerText,privacyDescription:this.options.privacyDescription}}},{key:"name",get:function(){return"ShareFooterComponent"}},{key:"className",get:function(){return"modal-footer bg-light rounded-bottom"}},{key:"template",get:function(){return S.a}}]),n}(r.a.Component),U=function(e){V(n,e);var t=_(n);function n(e){var l;return I(this,n),(l=t.call(this,e)).clipboards=[],l}return z(n,[{key:"initialize",value:function(){this.setUpViewModel(),this.bindListeners(),this.videoDataService=a.a.getInstance(f.a.Video,this)}},{key:"events",value:function(){return{"click @ui.copy":"onClickCopy","click @ui.embedToggle":"onClickEmbed"}}},{key:"regions",value:function(){return{container:{el:".".concat(g.a.container),replaceElement:!1},footer:{el:".modal-footer",replaceElement:!0}}}},{key:"bindListeners",value:function(){this.listenTo(this.viewModel,"change:autoplay change:selectedVideoSize",this.render),this.listenTo(this.viewModel,"change:public",this.onTogglePublic),this.listenTo(E.e.VIDEO,"".concat(E.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render)}},{key:"setUpViewModel",value:function(){this.viewModel=i.a.get("share:".concat(this.options.videoId),this.options)}},{key:"onTogglePublic",value:function(){var e=this,t=this.viewModel.get("public")?b.l.Public:b.l.SchoolOnly;this.videoDataService.getSharedResource(this.videoId,t,(function(n){n.set("privacyId",t),e.onSharedResourceSync(n)}))}},{key:"updateViewModel",value:function(){this.viewModel.set("public",this.model.get("privacyId")===b.l.Public,{silent:!0})}},{key:"onSharedResourceSync",value:function(e){this.model=e,this.updateViewModel(),this.render()}},{key:"fetchData",value:function(){this.video=this.videoDataService.getVideo(this.videoId),this.model||this.videoDataService.getSharedResource(this.videoId,null,l.bind(this.onSharedResourceSync,this))}},{key:"buildEmbedString",value:function(){var e=l.extend({},this.model.toJSON(),this.viewModel.toJSON()),t=this.options.videoSizes[e.selectedVideoSize],n="100%"===t.height&&"100%"===t.width;e.videoSize=t,e.baseUrl=u.a.safeUrlConcat(this.config.get("onlineUrl"),"/share/embed"),e.isResponsive=n;var o=C()(e);return n?'<div style="padding:56.25% 0 0 0; position:relative;">'.concat(o,"</div>"):o}},{key:"onClickEmbed",value:function(){this.viewModel.set("showEmbed",!0),this.render()}},{key:"onClickCopy",value:function(e){this.$(e.currentTarget).text(s.a.getPhrase(this.lang,"copied"))}},{key:"getPrivacyDescription",value:function(e){switch(e){case b.l[b.l.Private]:return s.a.getPhrase(this.lang,"private");case b.l[b.l.SchoolOnly]:return s.a.getPhrase(this.lang,"schoolOnly");case b.l[b.l.Public]:return s.a.getPhrase(this.lang,"public");default:return""}}},{key:"initClipboards",value:function(){var e=this;this.destroyClipboards(),this.getUI("copy").each((function(t,n){e.clipboards.push(new o(n))}))}},{key:"destroyClipboards",value:function(){l.each(this.clipboards,(function(e){return e.destroy()})),this.clipboards=[]}},{key:"getCannotPublicShareText",value:function(){return this.video?m.x.isExchangeVideo(this.video)?s.a.getPhrase(this.lang,"cannotShareExchange"):s.a.getPhrase(this.lang,"cannotShareClickView"):""}},{key:"onBeforeDestroy",value:function(){this.destroyClipboards()}},{key:"renderFooter",value:function(){var e=this.model&&this.getPrivacyDescription(this.model.get("privacy"));this.showChildView("footer",new R({privacyDescription:e}))}},{key:"viewOptions",value:function(){return Object.assign(Object.assign({styles:g.a},this.viewModel.toJSON()),{embedString:this.model&&this.buildEmbedString(),spinnerEl:m.q.getSpinner({size:m.r.Large,extraClasses:"mx-auto"}),showLoader:!this.model||!this.video,canPublicShare:this.video&&m.j.canPublicShare(this.video),cannotPublicShareText:this.getCannotPublicShareText()})}},{key:"onBeforeRender",value:function(){this.fetchData()}},{key:"onRender",value:function(){this.initClipboards(),this.renderFooter()}},{key:"name",get:function(){return"ShareView"}},{key:"title",get:function(){return!1}},{key:"template",get:function(){return k.a}},{key:"lang",get:function(){return"shared.share"}},{key:"props",get:function(){return["videoId"]}},{key:"elements",get:function(){return{copy:".copy",embedToggle:".embed-toggle"}}},{key:"defaults",get:function(){return{autoplay:!1,selectedVideoSize:0,videoSizes:p()}}},{key:"behaviors",get:function(){return[{behaviorClass:h.f,title:s.a.getPhrase(this.lang,"share"),hideCloseButton:!0},{behaviorClass:h.g,bindViewModel:!0}]}},{key:"bindings",get:function(){var e=this;return{"[name=autoplay]":"autoplay","[name=selectedVideoSize]":{observe:"selectedVideoSize",selectOptions:{collection:function(){return l.map(e.options.videoSizes,(function(e,t){return{label:e.label,value:t}}))}}},"[name=public]":"public"}}},{key:"requiredResources",get:function(){return{config:d.b.config}}}]),n}(r.a.View)}}]);
@@ -1,4 +1,4 @@
1
- (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[11],{1151:function(t,e,i){
1
+ (window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[11],{1149:function(t,e,i){
2
2
  /*!
3
3
  * Cropper.js v1.5.6
4
4
  * https://fengyuanchen.github.io/cropperjs