@clickview/library-editor 1.63.0 → 1.64.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/bundles.json +2 -2
  2. package/dist/css/{5193-library-editor-b0081783ab.chunk.css → 2781-library-editor-054108e3bf.chunk.css} +5 -4
  3. package/dist/css/{336-library-editor-ebbdf687fd.chunk.css → 336-library-editor-0763858934.chunk.css} +2 -2
  4. package/dist/css/{library-editor-app-2321c4f5e3.css → library-editor-app-17d6a6644c.css} +1 -1
  5. package/dist/languages/en.json +1 -1
  6. package/dist/scripts/2781-efa54c8c8c.chunk.js +2 -0
  7. package/dist/scripts/{3236-6956d24163.chunk.js → 3236-24a5bf1bb8.chunk.js} +2 -2
  8. package/dist/scripts/336-86a858ee3c.chunk.js +2 -0
  9. package/dist/scripts/3475-c2090d0f65.chunk.js +1 -0
  10. package/dist/scripts/3664-7bab52835f.chunk.js +1 -0
  11. package/dist/scripts/4096-2f0afc78f8.chunk.js +1 -0
  12. package/dist/scripts/4201-f856bd659a.chunk.js +1 -0
  13. package/dist/scripts/4796-1b85c00672.chunk.js +2 -0
  14. package/dist/scripts/{5513-77d89142ce.chunk.js → 5513-1c7c464e84.chunk.js} +1 -1
  15. package/dist/scripts/{5972-988de17e3f.chunk.js → 5972-e170671a7c.chunk.js} +1 -1
  16. package/dist/scripts/6591-62947b6aea.chunk.js +1 -0
  17. package/dist/scripts/{6768-aab63a1809.chunk.js → 6768-416924be66.chunk.js} +1 -1
  18. package/dist/scripts/{7197-faf24e915d.chunk.js → 7197-35da0227f2.chunk.js} +1 -1
  19. package/dist/scripts/{777-1328221d09.chunk.js → 777-03d78e4162.chunk.js} +1 -1
  20. package/dist/scripts/777-03d78e4162.chunk.js.LICENSE.txt +1 -0
  21. package/dist/scripts/8306-7e1ecc6b80.chunk.js +1 -0
  22. package/dist/scripts/9096-ce7dabfccf.chunk.js +1 -0
  23. package/dist/scripts/{9219-925a2f0d6d.chunk.js → 9219-5a71a27c3e.chunk.js} +1 -1
  24. package/dist/scripts/95-d04a83d83f.chunk.js +1 -0
  25. package/dist/scripts/968-b8e7ead008.chunk.js +1 -0
  26. package/dist/scripts/9743-d88fb1f700.chunk.js +1 -0
  27. package/dist/scripts/bundle-64721692b2.min.js +2 -0
  28. package/package.json +1 -1
  29. package/dist/css/3288-library-editor-cbe896c46a.chunk.css +0 -1
  30. package/dist/scripts/3288-bab20aa94e.chunk.js +0 -1
  31. package/dist/scripts/336-632ad6b1fd.chunk.js +0 -2
  32. package/dist/scripts/3475-896a4bf034.chunk.js +0 -1
  33. package/dist/scripts/3664-1de6858c52.chunk.js +0 -1
  34. package/dist/scripts/4096-884ca2d342.chunk.js +0 -1
  35. package/dist/scripts/4201-8856b389f1.chunk.js +0 -1
  36. package/dist/scripts/4796-71f3b01af9.chunk.js +0 -2
  37. package/dist/scripts/5193-c993e0b42c.chunk.js +0 -1
  38. package/dist/scripts/6591-4e6eb900d4.chunk.js +0 -1
  39. package/dist/scripts/7153-2e88379ef0.chunk.js +0 -1
  40. package/dist/scripts/9096-ebb6d8925e.chunk.js +0 -1
  41. package/dist/scripts/95-999936425e.chunk.js +0 -1
  42. package/dist/scripts/968-ba17f0be6f.chunk.js +0 -1
  43. package/dist/scripts/9743-bfa716d7eb.chunk.js +0 -1
  44. package/dist/scripts/bundle-e7e41a68f2.min.js +0 -2
  45. /package/dist/scripts/{1010-0051447919.chunk.js → 1010-9c54dac5ec.chunk.js} +0 -0
  46. /package/dist/scripts/{1115-538343833e.chunk.js → 1115-189174d1dd.chunk.js} +0 -0
  47. /package/dist/scripts/{1318-d8b9d84472.chunk.js → 1318-11b8de6498.chunk.js} +0 -0
  48. /package/dist/scripts/{1524-2f444ac3ec.chunk.js → 1524-ae7b7beeda.chunk.js} +0 -0
  49. /package/dist/scripts/{2591-384c8c6cac.chunk.js → 2591-730e72b14a.chunk.js} +0 -0
  50. /package/dist/scripts/{3236-6956d24163.chunk.js.LICENSE.txt → 2781-efa54c8c8c.chunk.js.LICENSE.txt} +0 -0
  51. /package/dist/scripts/{299-e0377b8731.chunk.js → 299-f415ca8856.chunk.js} +0 -0
  52. /package/dist/scripts/{336-632ad6b1fd.chunk.js.LICENSE.txt → 3236-24a5bf1bb8.chunk.js.LICENSE.txt} +0 -0
  53. /package/dist/scripts/{3305-dc6932b39d.chunk.js → 3305-d21eab0110.chunk.js} +0 -0
  54. /package/dist/scripts/{4796-71f3b01af9.chunk.js.LICENSE.txt → 336-86a858ee3c.chunk.js.LICENSE.txt} +0 -0
  55. /package/dist/scripts/{3373-39774fb619.chunk.js → 3373-c35e99d4f4.chunk.js} +0 -0
  56. /package/dist/scripts/{3391-79af5afacd.chunk.js → 3391-c1544af17d.chunk.js} +0 -0
  57. /package/dist/scripts/{3643-8f1bb9fe5a.chunk.js → 3643-877406d207.chunk.js} +0 -0
  58. /package/dist/scripts/{3873-f1118739a9.chunk.js → 3873-32cef8b267.chunk.js} +0 -0
  59. /package/dist/scripts/{4245-8b0c56357d.chunk.js → 4245-09abccc77c.chunk.js} +0 -0
  60. /package/dist/scripts/{7197-faf24e915d.chunk.js.LICENSE.txt → 4796-1b85c00672.chunk.js.LICENSE.txt} +0 -0
  61. /package/dist/scripts/{5327-22e2dcce4b.chunk.js → 5327-c4b6d0885a.chunk.js} +0 -0
  62. /package/dist/scripts/{5346-e31d4e982b.chunk.js → 5346-4a50d1fd29.chunk.js} +0 -0
  63. /package/dist/scripts/{5424-78b4a60a70.chunk.js → 5424-843a480e1a.chunk.js} +0 -0
  64. /package/dist/scripts/{576-c984785d03.chunk.js → 576-b7bc67c359.chunk.js} +0 -0
  65. /package/dist/scripts/{6239-f2b11c31b2.chunk.js → 6239-b13c96eaf8.chunk.js} +0 -0
  66. /package/dist/scripts/{6350-f5d0b9b443.chunk.js → 6350-ebae8f11b0.chunk.js} +0 -0
  67. /package/dist/scripts/{6467-48cc8b5479.chunk.js → 6467-eae5f517db.chunk.js} +0 -0
  68. /package/dist/scripts/{6677-4118a57ece.chunk.js → 6677-5c66883ffc.chunk.js} +0 -0
  69. /package/dist/scripts/{6796-0794258bfc.chunk.js → 6796-d47d2fa948.chunk.js} +0 -0
  70. /package/dist/scripts/{7071-19ad9a324d.chunk.js → 7071-e41e06917b.chunk.js} +0 -0
  71. /package/dist/scripts/{777-1328221d09.chunk.js.LICENSE.txt → 7197-35da0227f2.chunk.js.LICENSE.txt} +0 -0
  72. /package/dist/scripts/{7366-2f7da593c6.chunk.js → 7366-4b7b22791a.chunk.js} +0 -0
  73. /package/dist/scripts/{7384-80e81af49f.chunk.js → 7384-8f86b79bd6.chunk.js} +0 -0
  74. /package/dist/scripts/{8862-4e8a2dc34f.chunk.js → 8862-292b678cef.chunk.js} +0 -0
  75. /package/dist/scripts/{8915-75cddb9442.chunk.js → 8915-e31f2d1282.chunk.js} +0 -0
  76. /package/dist/scripts/{9082-c3c4b347ad.chunk.js → 9082-ad6d7d2f96.chunk.js} +0 -0
  77. /package/dist/scripts/{9928-f23b5324b7.chunk.js → 9928-0d83a09f31.chunk.js} +0 -0
  78. /package/dist/scripts/{bundle-e7e41a68f2.min.js.LICENSE.txt → bundle-64721692b2.min.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[95],{46814:function(e,t,n){"use strict";n.r(t),n.d(t,{PastReleasesView:function(){return $}});var i=n(21161),r=n(21679),o=n(57857),a=n(31647),s=n(47022),l=n(70763),c=n(58688),u=n(45390),f=n(29457),d=n(3059),h=n(85847),p=n(48404),y=n(19226),v=(n(14129),n(97463)),b=n(69072),g=n(7170),m=n(92266),w=n(5344),S=n(56750),C=n.n(S);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},P(e)}function O(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,k(i.key),i)}}function k(e){var t=function(e){if("object"!=P(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==P(t)?t:t+""}function R(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(R=function(){return!!e})()}function E(e){return E=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},E(e)}function j(e,t){return j=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},j(e,t)}var V=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=E(t),function(e,t){if(t&&("object"==P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,R()?Reflect.construct(t,n||[],E(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&j(e,t)}(t,e),n=t,(i=[{key:"name",get:function(){return"PastReleasesFiltersComponent"}},{key:"template",get:function(){return C()}},{key:"lang",get:function(){return"contentUpdates.pastReleasesFilters"}},{key:"regions",value:function(){return{filterList:{el:".filter-list-region",replaceRegion:!1,partialLoading:f.LP.PastReleasesSearchFilter}}}},{key:"getVisibleFilters",value:function(){return new g.y(this.collection.filter((function(e){return w.qr.showFilter(e)})))}},{key:"renderFilterList",value:function(){var e=new m.$V({collection:this.getVisibleFilters(),channelName:this.options.channelName});this.showChildView("filterList",e)}},{key:"onBeforeRender",value:function(){return!!this.collection}},{key:"onRender",value:function(){this.renderFilterList()}}])&&O(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(a.Q.wA),T=n(68536),_=n.n(T);function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function N(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,I(i.key),i)}}function I(e){var t=function(e){if("object"!=L(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==L(t)?t:t+""}function D(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(D=function(){return!!e})()}function F(e){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},F(e)}function U(e,t){return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},U(e,t)}var M=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=F(t),function(e,t){if(t&&("object"==L(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,D()?Reflect.construct(t,n||[],F(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U(e,t)}(t,e),n=t,(i=[{key:"name",get:function(){return"PastReleasesHeaderComponent"}},{key:"props",get:function(){return["filterCollection"]}},{key:"lang",get:function(){return"contentUpdates.pastReleasesHeader"}},{key:"className",get:function(){return"d-flex justify-content-between align-items-center p-3 border-bottom"}},{key:"template",get:function(){return _()}},{key:"regions",value:function(){return{filters:{el:".filters-region"}}}},{key:"renderFilters",value:function(){var e=new V({collection:this.filterCollection,channelName:this.options.channelName});this.showChildView("filters",e)}},{key:"viewOptions",value:function(){return{}}},{key:"onRender",value:function(){this.renderFilters()}}])&&N(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(a.Q.wA),x=n(82405),A=n(73616),B=n(39090),H=n(65351),W=n(95061),Q=n(69711),q=n.n(Q);function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function z(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,J(i.key),i)}}function J(e){var t=function(e){if("object"!=G(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=G(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==G(t)?t:t+""}function K(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(K=function(){return!!e})()}function X(e){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X(e)}function Z(e,t){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Z(e,t)}var $=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=X(t),function(e,t){if(t&&("object"==G(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,K()?Reflect.construct(t,n||[],X(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z(e,t)}(t,e),n=t,(g=[{key:"initialize",value:function(){this.bindListeners(),this.contentUpdatesDataService=r.u.getInstance(u.Or.ContentUpdates,this),this.videoDataService=r.u.getInstance(u.Or.Video,this),this.libraryDataService=r.u.getInstance(u.Or.Library,this),this.videoMixinService=r.u.getInstance(u.K9.VideoMixin,this)}},{key:"name",get:function(){return"PastReleasesView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.pastReleases"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white rounded"}},{key:"template",get:function(){return q()}},{key:"regions",value:function(){return{header:{el:".header-region",replaceElement:!0},leftNav:{el:".left-nav-region",replaceElement:!0},listHeader:{el:".list-header-region",replaceElement:!0},videos:{el:".video-list-region",replaceElement:!0,partialLoading:f.LP.VideoGroupList},pagination:{el:".pagination-region",replaceElement:!0}}}},{key:"bindListeners",value:function(){this.listenTo(u.Vk.CONTENT_UPDATES,"".concat(u.M_.LIBRARY_REVIEW_SETTINGS,":sync"),this.render),this.listenTo(u.Vk.RESTRICTED_VIDEO,"".concat(u.M_.UPDATE_VIDEO_RESTRICTION,":sync"),this.updateRestrictedVideos),this.listenTo(this.channelName,u.Vy.Filters.FILTER_CHANGED,i.debounce(this.onFilterChange,100)),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata)}},{key:"initializeFilterCollection",value:function(){var e=this;this.filterCollection||this.libraryDataService.getHostedLibraries((function(t){return e.onLibrariesSync(t)}))}},{key:"onLibrariesSync",value:function(e){var t=this;this.filterCollection||(this.libraryIds=B.RF.getLibraryIds(this.options.queryParams[A.g.Libraries],e),this.subjectCollectionIdentifier=new d.xw({dateQueryString:this.options.queryParams[A.g.ReleaseDate],libraryIds:this.libraryIds}),this.contentUpdatesDataService.getRecentVideoSubjects(this.subjectCollectionIdentifier,(function(n){return t.onSubjectsSync(e,n)})))}},{key:"onSubjectsSync",value:function(e,t){var n=B.RF.getSubjectOptions(t);this.filterCollection=B.RF.getFilterCollection(e,n,this.options.queryParams);var i=B.RF.getSelectedSubjects(this.filterCollection),r=n.length>1&&n.length===i.length;this.videoCollectionIdentifier=new d.IJ({dateQueryString:this.options.queryParams[A.g.ReleaseDate],libraryIds:this.libraryIds,subjects:!r&&i,cursor:this.options.queryParams.cursor}),this.listenTo(u.Vk.CONTENT_UPDATES,"".concat(this.videoCollectionIdentifier.toString(),":sync"),this.render),this.fetchVideos()}},{key:"setVideosWithMetadata",value:function(){this.videoCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new l.t(this.videoCollection.map((function(e){return new h.n({id:e.get("id")})}))))}},{key:"updateRestrictedVideos",value:function(){var e=this;this.videoMixinService.getAndMixinVideoCollectionRestrictions(this.videoCollection,null,(function(){return e.render()}))}},{key:"onFilterChange",value:function(){a.Q.C$.trigger({application:u.OV.CONTENT_UPDATES,action:u.eX.ContentUpdates.PAST_RELEASES,params:B.RF.getRouteQueryParams(this.filterCollection)})}},{key:"getContentClassName",value:function(){var e=H.Z.content;return this.reviewSetting&&this.reviewSetting.get("reviewPeriod")?e+=" d-inline-block border-start ".concat(H.Z.contentWithLeftNav):e+=" w-100",e}},{key:"renderHeader",value:function(){this.reviewSetting?this.showChildView("header",new v.u({activeTab:B.JI.PastReleases,reviewEnabled:this.reviewSetting.get("reviewPeriod")})):this.renderPartialLoading("header")}},{key:"renderLeftNav",value:function(){this.reviewSetting&&this.reviewSetting.get("reviewPeriod")&&this.showChildView("leftNav",new b.m({supportSiteUrl:this.config.get("supportSiteUrl"),currentUser:this.currentUser}))}},{key:"renderListHeader",value:function(){this.showChildView("listHeader",new M({filterCollection:this.filterCollection,channelName:this.channelName}))}},{key:"renderVideos",value:function(){this.config&&this.groupedVideoCollection?this.showChildView("videos",new x.D({collection:this.groupedVideoCollection,childOptions:{config:this.config,videoItemComponentType:c.U.PastReleases,videosWithMetadata:this.videosWithMetadata,customerHasCustomLibrary:this.customLibraries&&!!this.customLibraries.length,collectionViewChannel:this.channelName,currentUser:this.currentUser,libraries:this.customLibraries},emptyStateType:f.ub.PastReleases,emptyStateOptions:{heading:o.T.getPhrase(this.lang,"emptyState")}})):this.renderPartialLoading("videos")}},{key:"renderPagination",value:function(){if(this.videoCollection){var e=this.contentUpdatesDataService.getVideoCollectionCursors(this.videoCollectionIdentifier),t=new s.Q({cursors:e,appLink:{application:u.OV.CONTENT_UPDATES,action:u.eX.ContentUpdates.PAST_RELEASES,params:B.RF.getRouteQueryParams(this.filterCollection)}});this.showChildView("pagination",t)}}},{key:"fetchVideos",value:function(){this.filterCollection&&!this.videoCollection&&(this.videoCollection=this.contentUpdatesDataService.getRecentVideos(this.videoCollectionIdentifier),this.videoCollection&&(this.setVideosWithMetadata(),this.groupedVideoCollection=B.RF.groupVideosByReleaseMonth(this.videoCollection)))}},{key:"fetchVideoWithMetadata",value:function(e){var t=this;this.videoDataService.getVideo(e,(function(n){var i=t.videosWithMetadata.get(e);i&&(i.set(n.toJSON()),i.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:p.p.config,currentUser:y.K.currentUser,customLibraries:W.T.libraries}}},{key:"onBeforeRender",value:function(){this.initializeFilterCollection(),this.fetchVideos(),this.videoCollection&&(this.groupedVideoCollection=B.RF.groupVideosByReleaseMonth(this.videoCollection)),this.reviewSetting=this.contentUpdatesDataService.getLibraryReviewSettings()}},{key:"viewOptions",value:function(){return{showLeftNav:this.reviewSetting&&this.reviewSetting.get("reviewPeriod"),contentClass:this.getContentClassName()}}},{key:"onRender",value:function(){this.renderHeader(),this.renderLeftNav(),this.renderListHeader(),this.renderVideos(),this.renderPagination()}}])&&z(n.prototype,g),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,g}(a.Q.G7)},56750:function(e,t,n){var i=n(31197);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){return e.propertyIsEnumerable,'<div class="d-inline-block border-end py-1 pe-3"><strong>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"filters",{name:"lang",hash:{},data:r}))+'</strong></div>\n<div class="filter-list-region d-inline-block ps-2"></div>'},useData:!0})},68536:function(e,t,n){var i=n(31197);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){return'<div class="filters-region d-inline-block"></div>'},useData:!0})},69711:function(e,t,n){var i=n(31197);e.exports=(i.default||i).template({1:function(e,t,n,i,r){return'<div class="left-nav-region"></div>'},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){var o;return e.propertyIsEnumerable,'<div class="header-region"></div>\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.showLeftNav:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:"")+'<div class="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.contentClass:o,t))+'">\n<div class="list-header-region"></div>\n<div class="video-list-region"></div>\n<div class="pagination-region"></div>\n</div>'},useData:!0})}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[968],{16616:function(e,n,t){t.d(n,{FT:function(){return i}});var r=t(32735),a=t(74512);const o=["as","disabled"];function i({tagName:e,disabled:n,href:t,target:r,rel:a,role:o,onClick:i,tabIndex:c=0,type:l}){e||(e=null!=t||null!=r||null!=a?"a":"button");const u={tagName:e};if("button"===e)return[{type:l||"button",disabled:n},u];const s=r=>{(n||"a"===e&&function(e){return!e||"#"===e.trim()}(t))&&r.preventDefault(),n?r.stopPropagation():null==i||i(r)};return"a"===e&&(t||(t="#"),n&&(t=void 0)),[{role:null!=o?o:"button",disabled:void 0,tabIndex:n?void 0:c,href:t,target:"a"===e?r:void 0,"aria-disabled":n||void 0,rel:"a"===e?a:void 0,onClick:s,onKeyDown:e=>{" "===e.key&&(e.preventDefault(),s(e))}},u]}const c=r.forwardRef(((e,n)=>{let{as:t,disabled:r}=e,c=function(e,n){if(null==e)return{};var t={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(n.indexOf(r)>=0)continue;t[r]=e[r]}return t}(e,o);const[l,{tagName:u}]=i(Object.assign({tagName:t,disabled:r},c));return(0,a.jsx)(u,Object.assign({},c,l,{ref:n}))}));c.displayName="Button",n.ZP=c},27445:function(e,n,t){t.d(n,{PB:function(){return a}});const r="data-rr-ui-";function a(e){return`${r}${e}`}},16608:function(e,n,t){t.d(n,{Z:function(){return a}});var r=t(32735);function a(e){const n=(0,r.useRef)(null);return(0,r.useEffect)((()=>{n.current=e})),n.current}},54096:function(e,n,t){t.d(n,{G:function(){return o}});var r=t(32735),a=t(21679);function o(e){var n,t;return n=e,t=a.u.getInstance(n),r.useEffect((function(){return function(){a.u.releaseInstance(n)}})),t}},19442:function(e,n,t){t.d(n,{h:function(){return s}});var r=t(32735),a=t(53808),o=t(31647),i=t(52076),c=t(77105),l=t(39396),u={iconButton:"aGxoe",iconWithText:"_cjiV",svg:"q6vwS",iconOnly:"T1CzO",iconBorder:"lBPNt"};function s(e){var n="".concat(e.className," ").concat(u.iconButton);r.Children.toArray(e.children).length?n+=" ".concat(u.iconWithText):e.showBorder||e.customSize||(n+=" ".concat(u.iconOnly)),e.showBorder&&(n+=" ".concat(u.iconBorder," btn btn-outline-dark me-2")),e.disabled&&(n+=" disabled");var t=r.createElement(l.x,{svgName:e.svgName,className:"svg-container ".concat(u.svg),size:e.svgSize});return e.appLink||e.href?e.href?r.createElement("a",{className:n,href:e.href,onClick:function(n){n.preventDefault(),e.analyticsData&&e.analyticsOptions&&i.k.logUserAction(e.analyticsData,e.analyticsOptions),a.q.isFunction(e.onClick)&&e.onClick(n),o.Q.Ab.PageLoad(e.href,e.openInNewTab)},"aria-label":e.ariaLabel,role:e.role},t,e.children):r.createElement(c.F,{appLink:e.appLink,className:n,onClick:e.onClick,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,openInNewTab:e.openInNewTab,disabled:e.disabled,ariaLabel:e.ariaLabel,role:e.role},t,e.children):r.createElement("button",{type:"button",className:n,"aria-label":e.ariaLabel,onClick:function(n){e.analyticsData&&e.analyticsOptions&&i.k.logUserAction(e.analyticsData,e.analyticsOptions),a.q.isFunction(e.onClick)&&e.onClick(n)},disabled:e.disabled,role:e.role},t,e.children)}},2491:function(e,n,t){t.d(n,{Z:function(){return i}});var r=t(92159),a=t(21186),o=t(54096);function i(){var e=(0,o.G)(r.P.ALERT);return{success:function(n){e.success(n)()},error:function(n){e.error(n)()},warning:function(n){e.createAlert({type:a.NK.Warning,heading:a.R6.Warning,message:n})},info:function(n,t){e.createAlert({heading:n,message:t,type:a.NK.Info})}}}},17942:function(e,n,t){t.r(n),t.d(n,{RemoveLogoView:function(){return g}});var r=t(32735),a=t(57857),o=t(86120),i=t(52076),c=t(70065),l=t(4231),u=t(85610),s=t(66703),f=t(2491),d=t(2248),p=t(45390),b={removeLogo:function(e,n,t,r){return{url:"/api/domain/v2/objects/".concat(e,"/logo/").concat(n),key:"remove:logo:".concat(n),type:d.k.DELETE,success:t,error:r,invalidationKeys:[p.M_.LOGO],dataServices:[p.Or.Customer]}}};function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var v="libraryEditor.removeLogo",y=a.T.encloseNamespace(v);function g(e){var n,t,a=(n=r.useState(!1),t=2,function(e){if(Array.isArray(e))return e}(n)||function(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,a,o,i,c=[],l=!0,u=!1;try{if(o=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;l=!1}else for(;!(l=(r=o.call(t)).done)&&(c.push(r.value),c.length!==n);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&null!=t.return&&(i=t.return(),Object(i)!==i))return}finally{if(u)throw a}}return c}}(n,t)||function(e,n){if(e){if("string"==typeof e)return m(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m(e,n):void 0}}(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),d=a[0],p=a[1],g=o.a.useGetFetch(),h=(0,f.Z)();return r.createElement(l.G,{closePopup:e.closePopup,title:y("removeSchoolCrest")},r.createElement("p",null,r.createElement(s.x,{namespace:v,phrase:"areYouSure"})),r.createElement(u.u,null,r.createElement(u.u.Cancel,{onClick:e.closePopup}),r.createElement(u.u.Submit,{onClick:function(){p(!0),g(b.removeLogo(e.customerId,e.logoId,(function(){h.success(y("success")),i.k.logUserAction({id:e.logoId},{actionType:c.Vw.Remove,entity:c.py.Logo,workflowPhase:c.eu.Complete,location:c.LZ.Popup}),e.closePopup()}),(function(){h.success(y("error")),p(!1)})))},text:y("remove"),showSpinner:d,variant:"danger"})))}},30720:function(e,n,t){t.d(n,{Z:function(){return a}});var r=Function.prototype.bind.call(Function.prototype.call,[].slice);function a(e,n){return r(e.querySelectorAll(n))}},98269:function(e,n,t){var r=t(95685),a=t.n(r),o=t(32735),i=t(16616),c=t(46304),l=t(74512);const u=o.forwardRef((({as:e,bsPrefix:n,variant:t="primary",size:r,active:o=!1,disabled:u=!1,className:s,...f},d)=>{const p=(0,c.vE)(n,"btn"),[b,{tagName:m}]=(0,i.FT)({tagName:e,disabled:u,...f}),v=m;return(0,l.jsx)(v,{...b,...f,ref:d,disabled:u,className:a()(s,p,o&&"active",t&&`${p}-${t}`,r&&`${p}-${r}`,f.href&&u&&"disabled")})}));u.displayName="Button",n.Z=u}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9743],{77037:function(e,t,n){n.d(t,{q:function(){return l}});var i=n(32735),r=n(68003),a=n(88483),o=n(87013),c=n(85475),u=n(39396),s={avatar:"Gvwzj",dot:"JJHBJ"};function l(e){var t,n,l=!e.anonymiseUsers&&e.imageUrl||(t=e.imageCdnUrl,(n=e.initials)?o.j.createUrl(r._.safeUrlConcat(t,"/v1/profile-images?initials=".concat(n)),{size:a.h2.Small}):"");return i.createElement("div",{className:"position-relative h-100 w-100"},e.showAnonymousUser?i.createElement("div",{className:"".concat(s.avatar," ").concat((null==e?void 0:e.extraClasses)||""," bg-gray-700 text-light")},i.createElement(u.x,{svgName:c.vn.Anonymous,size:e.anonymousSvgSize||u.S.Large,className:"svg-container w-100 h-100"})):i.createElement("div",{className:"".concat(s.avatar," ").concat((null==e?void 0:e.extraClasses)||""),style:{backgroundImage:"url('".concat(l,"')")}}," "),e.showDot&&i.createElement("div",{className:"".concat(s.dot," rounded-circle bg-danger")}))}},41087:function(e,t,n){n.d(t,{C:function(){return h},g:function(){return l}});var i,r=n(32735),a=n(57857),o=n(95544),c=n(39396),u=n(21326),s=n(50028);!function(e){e.Exchange="exchange",e.Streamable="streamable",e.MoviesAndTv="movies_and_tv",e.Twig="twig"}(i||(i={}));var l,d=n(27866),v=n(45428),p=n(85475),m=n(21974),g=n(6665),f=a.T.encloseNamespace("shared.badges");!function(e){e.DurationExact="duration-exact",e.DurationApproximate="duration-approximate",e.Interactive="interactive",e.Rating="rating",e.ProductionYear="production-year",e.Captions="captions",e.Status="status",e.Trending="trending",e.Count="count",e.Restriction="restriction",e.Source="source"}(l||(l={}));var y={xs:c.S.ExtraSmall,sm:c.S.Small,std:c.S.Standard,lg:c.S.Large},b={xs:"badge-xs",sm:"badge-sm",std:"badge-std",lg:"badge-lg"};function h(e){var t=e.type,n=e.data,a=e.size,h=void 0===a?"std":a;if(!function(e,t){var n,i;return"boolean"==typeof t?!!t:e===l.Rating?t&&!!t.value:e===l.Interactive?!!(null==t?void 0:t.length)||!!(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.length):e===l.Captions?!!(null==t?void 0:t.length)||!!(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.length):e===l.Status?"number"==typeof t:!!t}(t,n))return r.createElement(r.Fragment,null);var C=function(e,t,n){var r,a=b[n],c="";if(e===l.DurationApproximate&&(c="duration-badge-new px-2 rounded-pill text-nowrap d-flex align-items-center"),e===l.DurationExact&&(c="duration-badge"),e===l.Interactive&&(c="interactive-badge"),e===l.Rating&&(c="rating-badge text-shadow ".concat(m.u.mapRatingToClass(t.value))),e===l.ProductionYear&&(c="production-year-badge text-shadow"),e===l.Captions)return"p-0";if(e===l.Status)return"badge ".concat(function(e){switch(e){case s.X.Published:return"bg-success";case s.X.Archived:case s.X.Rejected:return"bg-danger";case s.X.Draft:return"draft-badge px-2 rounded-pill text-nowrap d-flex align-items-center";case s.X.Pending:case s.X.Processing:return"bg-warning"}}(t));if(e===l.Trending)return"trending-badge px-1 d-flex align-items-center ".concat(a);if(e===l.Count&&(c="count-badge px-1 rounded"),e===l.Restriction){var u=v.l.mapRestrictionToClass(t.restrictions);return(0,o.A)("restriction-badge rounded-pill px-2 d-flex align-items-center",u)}return e===l.Source&&(c=(r=t).includes(i.Streamable)?"px-1 text-nowrap d-flex align-items-center ".concat(g.Z.streamable):r.includes(i.MoviesAndTv)?"bg-indigo text-white px-1 text-nowrap d-flex align-items-center":r.includes(i.Exchange)?"bg-orange text-white px-1 text-nowrap d-flex align-items-center":r.includes(i.Twig)?"bg-pink text-white px-1 text-nowrap d-flex align-items-center":""),(0,o.A)("badge",c)}(t,n,h);C="".concat(C," ").concat(e.inline?"d-inline-block":"d-flex justify-content-center"," ").concat(e.className||"");var w=function(e,t,n){if(e===l.Interactive)return f("interactive");if(e===l.DurationApproximate)return d.T.ToDisplayDurationNewStyle(t);if(e===l.DurationExact)return d.T.ToDisplayDuration(t);if(e===l.Rating)return t.code;if(e===l.ProductionYear)return t;if(e===l.Captions)return r.createElement(c.x,{svgName:p.vn.CloseCaptionBadge});if(e===l.Status)return s.X[t];if(e===l.Trending)return r.createElement(r.Fragment,null,r.createElement(c.x,{svgName:p.vn.Trending,size:y[n]}),r.createElement("span",{className:"ps-1"},t));if(e===l.Count)return t;if(e===l.Restriction)return r.createElement(r.Fragment,null,r.createElement(c.x,{svgName:v.l.mapRestrictionToSvg(t.restrictions)}),r.createElement("span",null,v.l.mapRestrictionToText(t.restrictions,t.yearGroups)));if(e===l.Source){var a=t;return a.includes(i.Streamable)?"streamable":a.includes(i.MoviesAndTv)?"movies + tv":a.includes(i.Exchange)?"exchange":a.includes(i.Twig)?"twig":"-"}}(t,n,h),T=function(e,t){return e===l.Rating?{title:t.name,placement:"top"}:null}(t,n),I=e.inline&&"d-inline-block";return T?r.createElement("div",{className:"badge-wrapper d-inline"},r.createElement(u.u,Object.assign({},T,{spanHack:!0,spanHackClassName:I}),r.createElement("span",{className:C},w))):r.createElement("span",{className:"".concat(C," badge-wrapper")},w)}},44550:function(e,t,n){n.d(t,{c:function(){return a}});var i=n(32735),r=n(6665);function a(e){var t="d-flex align-items-center badge-list ".concat(r.Z.minHeight);return e.className&&(t+=" ".concat(e.className)),i.createElement("div",{className:t},e.children)}},90547:function(e,t,n){var i;n.d(t,{r:function(){return i}}),function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(i||(i={}))},34254:function(e,t,n){var i;n.d(t,{r:function(){return i}}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(i||(i={}))},86257:function(e,t,n){var i;n.d(t,{L:function(){return i}}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(i||(i={}))},87648:function(e,t,n){var i;n.d(t,{c:function(){return i}}),function(e){e.Custom="custom",e.User="year_group"}(i||(i={}))},90335:function(e,t,n){var i;n.d(t,{D:function(){return i}}),function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series",e.ProductionYear="production_year"}(i||(i={}))},332:function(e,t,n){n.d(t,{e:function(){return c}});var i=n(2248),r=n(68003),a=n(84657),o=n(34254),c={clip:function(e,t){return{key:"clip:".concat(e,":").concat(t),url:r._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:a.v.CLIP,permissionFilterOption:t})}},videoClips:function(e,t,n){return{key:"video:".concat(e,":clips:").concat(t,":").concat(n),url:r._.urlBuilder("{gateway}/v1/objects/".concat(e,"/clips"),{query:a.v.CLIP_COLLECTION,permissionFilterOption:t,cursor:n})}},clipWithAllInteractives:function(e,t){return{key:"clip:".concat(e,":").concat(t,":interactives"),url:r._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"".concat(a.v.CLIP,",interactives{status:[0,1]}"),permissionFilterOption:t}),normalize:!1}},publicClip:function(e,t,n,i){return{key:"clip:".concat(e,":public:").concat(t),url:r._.urlBuilder("/api/objects/".concat(e),{query:"_parentVideo,_canBeConsumed,_thumbnail",permissionFilterOption:o.r.StripMetadata,shareId:t}),bootstrapName:"shared:object:".concat(e),success:n,error:i}},sharedClip:function(e,t,n,i){return{key:"shared:clip:".concat(e),url:r._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:a.v.CLIP}),success:n,error:i}},createClip:function(e,t,n,r,a){return{key:"create:clip",url:"{gateway}/v1/objects/".concat(e,"/clips"),data:t,type:i.k.POST,invalidationKeys:["videos:".concat(e),"my:videos"],success:n,error:r,always:a}},updateClip:function(e,t,n,r,a){return{key:"update:clip",url:"{gateway}/v1/objects/".concat(e),data:t,type:i.k.PUT,success:n,error:r,always:a}},deleteClip:function(e,t,n,r,a){return{key:"delete:clip",url:"{gateway}/v1/objects/".concat(e),type:i.k.DELETE,invalidationKeys:["videos:".concat(t),"my:videos","videos"],success:n,error:r,always:a}}}},91432:function(e,t,n){n.d(t,{b:function(){return c}});var i=n(2248),r=n(68003),a=n(84657),o=n(34254),c={interactiveMetadata:function(e,t){return{url:r._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:a.v.INTERACTIVE,permissionFilterOption:t}),key:"interactive:metadata:".concat(e,":").concat(t)}},videoInteractives:function(e,t,n){return{key:"video:".concat(e,":interactives:").concat(t,":").concat(n),url:r._.urlBuilder("{gateway}/v1/objects/".concat(e,"/interactives"),{query:a.v.INTERACTIVE_COLLECTION,cursor:n}),publicUrl:r._.urlBuilder("/api/objects/".concat(e,"/interactives"),{query:a.v.INTERACTIVE_COLLECTION,cursor:n})}},sharedInteractiveMetadata:function(e,t,n,i){return{url:r._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:a.v.INTERACTIVE}),key:"shared:interactive:metadata:".concat(e),success:n,error:i}},publicInteractiveMetadata:function(e,t,n,i){return{url:r._.urlBuilder("/api/objects/".concat(e),{query:"_parentVideo[rating],_canBeConsumed,_thumbnail",permissionFilterOption:o.r.StripMetadata,shareId:t}),key:"interactive:metadata:".concat(e,":public:").concat(t),bootstrapName:"shared:object:".concat(e),success:n,error:i}},interactive:function(e){return{url:"/api/domain/v1/interactives/".concat(e),key:"interactive:".concat(e),normalize:!1}},createInteractive:function(e,t,n){return{url:"/api/domain/v1/interactives",key:"create:interactive",type:i.k.POST,invalidationKeys:["my:videos"],data:e,success:t,error:n}},createInteractiveMetadata:function(e,t,n,r){return{url:"{gateway}/v1/objects/".concat(e,"/interactives"),key:"create:interactive:metadata",type:i.k.POST,data:t,success:n,error:r}},updateInteractive:function(e,t,n,r){return{url:"/api/domain/v1/interactives/".concat(e),key:"update:interactive",type:i.k.PUT,data:t,success:n,error:r,formatData:function(){return t},invalidationKeys:["interactive:".concat(e)]}},updateInteractiveMetadata:function(e,t,n,r){return{url:"{gateway}/v1/objects/".concat(e),key:"update:interactive:metadata",type:i.k.PUT,data:t,success:n,error:r}},interactiveResultSet:function(e,t){return{url:"/api/domain/v1/analytics/interactives/".concat(e,"/metadata/").concat(t),key:"interactive:result:set:".concat(e,":").concat(t)}},copyInteractive:function(e,t,n){return{url:"/api/domain/v1/interactives/".concat(e,"/copy"),key:"copy:interactive",type:i.k.POST,invalidationKeys:["interactive:".concat(e),"my:videos"],success:t,error:n}},deleteInteractiveMetadata:function(e,t,n){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:interactive",type:i.k.DELETE,invalidationKeys:["interactive:".concat(e),"my:videos","videos"],success:t,error:n}},removeInteractiveMetadata:function(e){var t=e.libraryId,n=e.categoryId,a=e.interactiveMetadataId;return{url:r._.urlBuilder("/api/domain/v1/libraries/".concat(t,"/videos"),{categoryId:n,videoIds:a}),key:"remove:interactive:metadata:".concat(a),type:i.k.DELETE,invalidationKeys:["interactive:".concat(a),"my:videos","videos"]}},contributeToCommunity:function(e){return{url:"/api/domain/v2/interactives/".concat(e,"/contribute"),key:"contribute:interactive",type:i.k.POST}},revokefromCommunity:function(e){return{url:"/api/domain/v2/interactives/".concat(e,"/contribute"),key:"contribute:interactive",type:i.k.DELETE}},isContributed:function(e){return{url:"/api/domain/v2/interactives/".concat(e,"/contributed"),key:"iscontributed:".concat(e),normalize:!1}},updateInteraction:function(e){return{url:"/api/domain/v1/interactions/bulk/".concat(e.id),key:"contribute:interactive",data:e,type:i.k.PUT,invalidationKeys:["interactive:".concat(e.interactiveId)]}}}},77131:function(e,t,n){n.d(t,{R:function(){return g}});var i,r=n(2248),a=n(68003),o=n(84657),c=n(50028),u=n(74421),s=n(34254);!function(e){e.Series="series",e.Playlist="playlist",e.Widget="widget",e.Folder="category",e.CategoryTree="categoryTree"}(i||(i={}));var l=n(15970),d=function(e,t){return a._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:o.v.VIDEO})},v=function(e,t){return a._.urlBuilder("/api/objects/".concat(e),{query:"thumbnail,_canBeConsumed,series,season,rating,libraries{typeId:[17]}",permissionFilterOption:s.r.StripMetadata,shareId:t})},p=function(e){return a._.urlBuilder("{gateway}/v1/objects",{"query.video":o.v.VIDEO_COLLECTION,"query.clip":o.v.CLIP_COLLECTION,"query.interactive":o.v.INTERACTIVE_COLLECTION,id:e})},m=function(e){var t=e.videoId,n=e.context,r=e.collectionId,c=e.moviesAndTv,u={videoId:t,limit:e.limit,query:o.v.VIDEO_COLLECTION};return n&&(n===i.Widget?u["context.widgetId"]=r:(u["context.collectionType"]=n,u["context.collectionId"]=r)),c&&(u["context.moviesAndTv"]=!0),a._.urlBuilder("{gateway}/v1/suggestions/related-videos",u)},g={video:function(e,t){return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:o.v.VIDEO,permissionFilterOption:t}),publicUrl:a._.urlBuilder("/api/objects/".concat(e),{query:o.t.VIDEO,permissionFilterOption:t}),key:"videos:".concat(e,":").concat(t)}},publicVideo:function(e,t,n,i){return{url:v(e,t),key:"videos:".concat(e,":public:").concat(t),bootstrapName:"shared:object:".concat(e),success:n,error:i}},sharedVideo:function(e,t,n,i){return{url:d(e,t),key:"shared:video:".concat(e),success:n,error:i}},myVideos:function(e,t){var n=o.v.VIDEO_COLLECTION,i=o.v.CLIP_COLLECTION,r=o.v.INTERACTIVE,l="videos[".concat(n,"]{libraries.typeid:").concat(u.E.WorkspaceCollection,"}"),d="clips[".concat(i,"]"),v="interactives[".concat(r,"]{status:[").concat(c.X.Published,",").concat(c.X.Draft,"]}"),p={query:"(".concat(l,"|").concat(d,"|").concat(v,"){orderbydesc:id}"),permissionFilterOption:s.r.StripMetadata};return t&&(p.cursor=t),{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),p),key:"my:videos:".concat(t)}},videos:function(e,t){return{url:p(e),key:"videos:by:id:".concat(e.join(",")),success:t}},watchHistoryVideos:function(e,t){return{url:p(e),key:"watch:history:videos:by:id:".concat(e.join(",")),success:t}},updateVideo:function(e,t,n,i,a){return{key:"update:video:".concat(e),url:"{gateway}/v1/objects/".concat(e),type:r.k.PUT,data:t,success:n,error:i,always:a}},videoRatings:function(e,t){var n=e.map((function(e){return"id=".concat(e)}));if(n.length)return{url:"/api/domain/v2/objects?query=rating&".concat(n.join("&")),key:"video:ratings:by:id:".concat(e.join(",")),normalizeOptions:{namespace:t}}},videoMixinAssocs:function(e,t){if(e.map((function(e){return"id=".concat(e)})).length)return{url:a._.urlBuilder("{gateway}/v1/objects",{query:"interactives{limit:100},resources{limit:100},links{limit:100},_hasCurriculumLinks",id:e}),publicUrl:a._.urlBuilder("/api/objects",{query:"interactives{limit:100},resources{limit:100},links{limit:100},_hasCurriculumLinks",id:e}),key:"video:mixin:assocs:".concat(e.join(",")),normalizeOptions:{namespace:t}}},getRestrictions:function(e){var t=e.slice().sort();return{url:"/api/domain/v1/restrictedobjects"+"?objectTypeId=".concat(u.E.Video).concat(t.map((function(e){return"&objectId=".concat(e)})).join("")),key:"restrictions:".concat(t.join(",")),normalizeOptions:{namespace:"domain",idAttribute:"objectId"}}},delete:function(e,t,n){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:video:".concat(e),type:r.k.DELETE,success:t,error:n,invalidationKeys:["videos","search"]}},deleteBulk:function(e,t,n,i,a){var o=e.map((function(e){return"videoIds=".concat(e)})).join("&"),c=["categoryId=".concat(n),"".concat(o)].join("&");return{url:"/api/domain/v1/libraries/".concat(t,"/videos?").concat(c),key:"delete:bulk:video:".concat(e.join(":"),":").concat(t,":").concat(n),type:r.k.DELETE,success:i,error:a,invalidationKeys:["videos","search"]}},relatedVideos:function(e){var t=e.videoId,n=e.context,i=e.collectionId,r=e.moviesAndTv;return{url:m(e),key:"related:videos:".concat(t,":").concat(n,":").concat(i,":").concat(r)}},collectionVideos:function(e,t,n,i,r,u){var d=l.d.getVideoSortParam(t),v=o.v.VIDEO_COLLECTION,p=o.v.CLIP_COLLECTION,m=o.v.INTERACTIVE,g="videos[".concat(v,"]"),f="clips[".concat(p,"]"),y="interactives[".concat(m,"]{status:[").concat(c.X.Published,",").concat(c.X.Draft,"]}"),b=Object.assign({query:"(".concat(g,"|").concat(f,"|").concat(y,")").concat(d?"{".concat(d,"}"):""),permissionFilterOption:s.r.FilterOut},n?{cursor:n}:{}),h=["folder","videos",e,n,t].filter((function(e){return!!e})).join(":");return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),b),key:h,success:i,error:r,always:u}},pointsOfInterest:function(e,t,n,i,r){var o={query:"{limit:100}",cursor:t};return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/pointsofinterest"),o),publicUrl:a._.urlBuilder("/api/objects/".concat(e,"/pointsofinterest"),o),key:"pointsofinterest:".concat(e).concat(t?":".concat(t):""),success:n,error:i,always:r}},regionAlternatives:function(e,t,n,i){return{url:"/api/objects/videos/".concat(e,"/region-alternatives"),publicUrl:"/api/objects/videos/".concat(e,"/region-alternatives"),key:"video:regionAlternatives:".concat(e),normalize:!1,success:t,error:n,always:i}}}},45428:function(e,t,n){n.d(t,{l:function(){return g}});var i=n(57857),r=n(10657),a=n(6665),o=n(87648),c=n(85475);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function s(e,t,n){return(t=function(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=i.T.encloseNamespace("shared.shared-utils"),d=s(s({},o.c.Custom,a.Z.restrictionBadgeCustom),o.c.User,a.Z.restrictionBadgeUser),v=s(s({},o.c.Custom,c.vn.Timer),o.c.User,c.vn.Lock),p=s(s({},o.c.Custom,"restrictionCustom"),o.c.User,"restrictionYearGroup"),m=s(s({},o.c.Custom,200),o.c.User,100),g={mapRestrictionToClass:function(e){var t;if(!(null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.length))return"";var n=g.getWeightedRestriction(e.value);return d[n.type]},mapRestrictionToSvg:function(e){var t;if(!(null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.length))return c.vn.Lock;var n=g.getWeightedRestriction(e.value);return v[n.type]},mapRestrictionToText:function(e,t){var n;if(!(null===(n=null==e?void 0:e.value)||void 0===n?void 0:n.length)||!(null==t?void 0:t.length))return"";var i=g.getWeightedRestriction(e.value),r=t.find((function(e){return e.value===i.yearGroup})),a=p[i.type];if(i.type===o.c.User)return null===i.yearGroup?l("restrictionStaff"):r?1===t.length?l("restrictionStudents"):l(a,{yearGroup:r.name}):"";if(i.type===o.c.Custom){var c=g.getRestrictionDuration(i);return c?l(a,{duration:c,smartCount:c}):l("restrictionCustomLessThanDay",{duration:c,smartCount:1})}return""},getWeightedRestriction:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"highest";if(null==e?void 0:e.length)return 1===e.length?e[0]:e.reduce((function(e,n){var i=m[e.type],r=m[n.type];return"highest"===t&&i>r||"lowest"===t&&i<r?e:n}))},getRestrictionByType:function(e,t){if(!g.hasRestrictions(e))return null;var n=Array.isArray(t)?t:[t],i=e._restrictions.value.filter((function(e){return n.includes(e.type)}));return g.getWeightedRestriction(i)},getRestrictionDuration:function(e){if(e.type===o.c.Custom&&e.expiresOn){var t=r.O.convertUTCToLocal(e.expiresOn);if(t)return r.O.diffBetween(t,new Date,"day")}},hasCustomRestriction:function(e){return!!g.getRestrictionByType(e,[o.c.Custom])},hasRestrictions:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e._restrictions)||void 0===t?void 0:t.value)||void 0===n?void 0:n.length)}}},21974:function(e,t,n){n.d(t,{u:function(){return l}});var i=n(57857),r=n(75459),a=n(86257),o=n(85475);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=c(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s="shared.shared-utils",l={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-blue";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e,t){switch(e.type){case r.r.HostedLibrary:case r.r.CustomLibrary:return e.name;case r.r.Exchange:return i.T.getPhrase(s,"exchange");case r.r.Workspace:return i.T.getPhrase(s,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case r.r.HostedLibrary:case r.r.CustomLibrary:return"bg-blue";case r.r.Exchange:return"bg-green";case r.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t=u(u(u(u(u(u(u({},a.L.Pdf,o.vn.FilePDF),a.L.Image,o.vn.FileImg),a.L.PowerPoint,o.vn.FilePowerpoint),a.L.Document,o.vn.FileWord),a.L.Excel,o.vn.FileExcel),a.L.Zip,o.vn.FileZip),a.L.File,o.vn.File)[e];return t||(t=o.vn.Folder),t},mapTypeToClass:function(e){switch(e){case a.L.Pdf:return"icon-red";case a.L.Image:return"icon-purple";case a.L.Document:return"icon-blue";case a.L.Excel:return"icon-green";case a.L.PowerPoint:return"icon-orange";case a.L.Zip:return"icon-teal";case a.L.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case a.L.Pdf:return i.T.getPhrase(s,"pdf");case a.L.Image:return i.T.getPhrase(s,"image");case a.L.Document:return i.T.getPhrase(s,"document");case a.L.Excel:return i.T.getPhrase(s,"spreadsheet");case a.L.PowerPoint:return i.T.getPhrase(s,"presentation");case a.L.Zip:return i.T.getPhrase(s,"zipArchive");case a.L.File:return i.T.getPhrase(s,"file");default:return""}}}},11275:function(e,t,n){n.d(t,{M:function(){return b}});var i,r=n(11306),a=n(57857),o=n(31647),c=n(10657),u=n(70065);!function(e){e.Screenrights="screenrights",e.Era="era",e.ClickView="clickview"}(i||(i={}));var s=n(50028),l=n(74421),d=n(87648),v=n(332),p=n(91432),m=n(77131),g=n(45428),f=n(13034),y=a.T.encloseNamespace("shared.shared-utils"),b={isVideo:function(e){return(null==e?void 0:e.typeId)===l.E.Video},isClip:function(e){return(null==e?void 0:e.typeId)===l.E.Clip},isInteractive:function(e){return(null==e?void 0:e.typeId)===l.E.Interactive},isVideoTypeArchived:function(e){return(null==e?void 0:e.status)===s.X.Archived},isVideoType:function(e){return b.isVideo(e)||b.isInteractive(e)||b.isClip(e)},hasSeries:function(e){var t;return!!(null===(t=null==e?void 0:e.series)||void 0===t?void 0:t.id)},showVideoGuidance:function(e){return!e(f.C.StudentExperience)},showInteractivesGuidance:function(e){var t,n;return!(!e||b.isInteractive(e)||!(null===(n=null===(t=e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length))},showResourcesGuidance:function(e){var t,n,i,r;return!(!e||b.isInteractive(e)||!(((null===(n=null===(t=e.resources)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)||0)+((null===(r=null===(i=e.links)||void 0===i?void 0:i.data)||void 0===r?void 0:r.length)||0)))},getVideoProgress:function(e){var t,n;return(null==e?void 0:e.lastProgressPoint)?null==e?void 0:e.lastProgressPoint:(null===(t=null==e?void 0:e._videoProgress)||void 0===t?void 0:t.progress)?null===(n=null==e?void 0:e._videoProgress)||void 0===n?void 0:n.progress:0},getThumbnail:function(e){var t,n,i;return e?b.isVideo(e)?e.thumbnail:(null==e?void 0:e._thumbnail)?e._thumbnail:b.isClip(e)?e.thumbnail||(null===(t=e._parentVideo)||void 0===t?void 0:t.thumbnail):b.isInteractive(e)?(null===(n=e._parentVideo)||void 0===n?void 0:n.thumbnail)||(null===(i=e._parentClip)||void 0===i?void 0:i.thumbnail):void 0:null},getDuration:function(e){var t,n;if(e){if(b.isVideo(e))return e.duration;if(b.isInteractive(e)){if(null===(t=e._parentClip)||void 0===t?void 0:t.id)return 1e3*(e._parentClip.endTime-e._parentClip.startTime);if(null===(n=e._parentVideo)||void 0===n?void 0:n.duration)return e._parentVideo.duration}return b.isClip(e)?1e3*(e.endTime-e.startTime):void 0}},getAnalyticsEntity:function(e){return b.isVideo(e)?u.py.Video:b.isInteractive(e)?u.py.Interactive:b.isClip(e)?u.py.Clip:void 0},getAnalyticsData:function(e){var t,n,i,r,a,o,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(b.isVideo(e))return Object.assign(Object.assign({},c||{}),{id:e.id,name:e.name});if(b.isClip(e)){var u=Object.assign(Object.assign({},c||{}),{id:e.id,name:e.name});return(null===(t=e._parentVideo)||void 0===t?void 0:t.id)&&(u.video={id:null===(n=e._parentVideo)||void 0===n?void 0:n.id,name:e._parentVideo.name}),u}var s=Object.assign(Object.assign({},c),{id:e.id,interactiveId:e.interactiveId,name:e.name,status:e.status,originType:e.originType});return(null===(i=null==e?void 0:e._parentClip)||void 0===i?void 0:i.id)&&(s.clip={id:null===(r=null==e?void 0:e._parentClip)||void 0===r?void 0:r.id,name:null==e?void 0:e._parentClip.name}),(null===(a=null==e?void 0:e._parentVideo)||void 0===a?void 0:a.id)&&(s.video={id:null===(o=null==e?void 0:e._parentVideo)||void 0===o?void 0:o.id,name:null==e?void 0:e._parentVideo.name}),s},getCanBeConsumed:function(e){var t,n;return e&&b.isVideoType(e)?e._canBeConsumed?{canNavigate:"login-required"===(null===(t=e._canBeConsumed)||void 0===t?void 0:t.reason)&&b.isVideo(e)||!0===e._canBeConsumed.value,canConsume:e._canBeConsumed.value,reason:null===(n=e._canBeConsumed)||void 0===n?void 0:n.reason}:{canNavigate:!0,canConsume:!0}:{canNavigate:!1,canConsume:!1}},getPrivacyReasoning:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=b.getCanBeConsumed(e),r=i.canConsume,a=i.canNavigate,o=i.reason,c=function(){return b.isClip(e)?y("clipLoginRequired"):b.isInteractive(e)?y("interactiveLoginRequired"):y("videoLoginRequired")};if(!r&&!a){if(n)return c();switch(o){case"rating-not-allowed":return y("ratingNotAllowed");case"video-deleted":return b.isClip(e)?y("clipParentDeleted"):b.isInteractive(e)?y("interactiveParentDeleted"):y("videoDeleted");case"clickview-private":return y("clickViewPrivate");case"private":default:return y("genericCannotAccess");case"login-required":return c();case"restricted-access":var u=g.l.getWeightedRestriction(null===(t=e._restrictions)||void 0===t?void 0:t.value);return(null==u?void 0:u.type)===d.c.Custom?y("awaitingApproval"):y("restrictedAccess")}}return b.isInteractive(e)&&e.status===s.X.Draft?y("draftInteractive"):""},getTitle:function(e){if(e.name)return b.isInteractive(e)&&e.status===s.X.Draft?y("draftInteractiveTitle",{name:e.name}):e.name;var t=b.getCanBeConsumed(e),n=t.canConsume,i=t.reason;return y(n||"private"!==i?n||"video-deleted"!==i?"privateVideo":"videoUnavailable":"privateVideo")},getParentVideo:function(e){return b.isVideo(e)?e:b.isClip(e)||b.isInteractive(e)?e._parentVideo:void 0},getRating:function(e){var t;return b.isVideo(e)?e.rating:null===(t=null==e?void 0:e._parentVideo)||void 0===t?void 0:t.rating},getVideoRequest:function(e,t,n){if(n){switch(t){case l.E.Video:return m.R.sharedVideo(e,n);case l.E.Clip:return v.e.sharedClip(e,n);case l.E.Interactive:return p.b.sharedInteractiveMetadata(e,n)}o.Q.Ry.throw(new r.H("Unsupported master type"))}switch(t){case l.E.Video:return m.R.video(e);case l.E.Clip:return v.e.clip(e);case l.E.Interactive:return p.b.interactiveMetadata(e)}o.Q.Ry.throw(new r.H("Unsupported master type"))},isBroadcast:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.contentLicences)||void 0===t?void 0:t.data)||void 0===n?void 0:n.some((function(e){return e.systemName===i.Era||e.systemName===i.Screenrights})))},getReleaseDate:function(e){return e&&e.dateReleased&&b.isBroadcast(e)?c.O.format(e.dateReleased,"DD/MM/YYYY"):""},canViewOriginalVideo:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e._parentVideo)||void 0===t?void 0:t._canBeConsumed)||void 0===n?void 0:n.value)},getTrackingCode:function(e){return b.isVideo(e)?e.trackingCode:b.isClip(e)||b.isInteractive(e)?e._parentVideo.trackingCode:void 0},isInExchange:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.libraries)||void 0===t?void 0:t.data)||void 0===n?void 0:n.some((function(e){return e.typeId===l.E.ExchangeCollection})))},canViewUploadDate:function(e){return!(!e||!e.dateCreated||!e._isClickViewCurated||e._isClickViewCurated.value)}}},15970:function(e,t,n){n.d(t,{d:function(){return o}});var i=n(51614),r=n(90335),a=r.D.RecentlyAdded,o={getValidSortTypeFromParam:function(e){return Object.values(r.D).includes(e)?e:r.D.Newest},getOrSetSortType:function(e,t,n,r){var o=function(e,t){return"".concat(t?"".concat(t,":"):"","video:sort:").concat(e)}(e,r);return!t&&i.SG.cacheExists(o)||i.SG.cacheSet(o,t||n||a),t||(t=i.SG.cacheGet(o)),t},getVideoSortParam:function(e){switch(e){case r.D.AtoZ:return"orderby:name";case r.D.ZtoA:return"orderbydesc:name";case r.D.Newest:return"orderbydesc:datecreated";case r.D.Oldest:return"orderby:datecreated";case r.D.RecentlyAdded:return"orderbydesc:timestamp";case r.D.Series:return"orderby:seriessort";case r.D.ProductionYear:return"orderbydesc:productionyear";default:return}}}},6665:function(e,t){t.Z={minHeight:"jEh7m",restrictionBadgeCustom:"WQ2eS",restrictionBadgeUser:"z4DeQ",streamable:"D_2nt"}}}]);