@clickview/exchange 0.17.1-rc.1 → 0.18.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.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunk_clickview_exchange=self.webpackChunk_clickview_exchange||[]).push([[13],{78681:(e,t,a)=>{a.d(t,{Z:()=>n});var n={ratings:function(){return{url:"/api/domain/v2/me/ratings",key:"ratings"}}}},47399:(e,t,a)=>{a.d(t,{n:()=>m});var n=a(32735),i=a(81886),r=a(83914),l=a(35223),o=a(73818),s=a(82329);const c={searchBar:"YbmeO"};function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function m(e){var t,a,m,d=(a=n.useState(null!==(t=e.query)&&void 0!==t?t:""),m=2,function(e){if(Array.isArray(e))return e}(a)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,i,r,l,o=[],s=!0,c=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;s=!1}else for(;!(s=(n=r.call(a)).done)&&(o.push(n.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(a,m)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?u(e,t):void 0}}(a,m)||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.")}()),p=d[0],g=d[1];return n.createElement("form",{onSubmit:function(e){e.preventDefault(),p&&i.Q.C$.trigger({application:s.O.EXCHANGE,action:o.e.Exchange.SEARCH,params:{query:p}})}},n.createElement("div",{className:"".concat(c.searchBar," d-flex border border-dark rounded align-items-center mb-3")},n.createElement(r.x,{svgName:l.vn.Search}),n.createElement("input",{type:"text",className:"form-control h-100 w-100 py-0 border-0 shadow-none",placeholder:"Search for resources in the Exchange Archive",value:p,onChange:function(e){return g(e.target.value)},autoComplete:"off"})))}},63759:(e,t,a)=>{a.r(t),a.d(t,{ExchangeSearchResultsView:()=>na});var n=a(32735),i=a(65858),r=a(68050),l=a(79967),o=a(40370),s=a(69111),c=a(45157),u=a(57408),m=a(83914);const d={circle:"Uxnsl",img:"BQ87Y"};function p(e){var t;return e.imageUrl||e.svgName?e.imageUrl?n.createElement("div",{className:"".concat(d.img," rounded-circle h-100 w-100"),style:{backgroundImage:"url(".concat(e.imageUrl,")")}}," "):n.createElement("div",{className:"".concat(d.circle," ").concat(e.variant?"bg-".concat(e.variant):""," text-").concat(e.textVariant," rounded-circle h-100 w-100 ").concat(null!==(t=e.svgWrapperClassName)&&void 0!==t?t:"")},n.createElement(m.x,{svgName:e.svgName,size:e.svgSize})):n.createElement(n.Fragment,null)}p.defaultProps={textVariant:"white"};var g=a(85177),y=a(83345),v=a(54610),f=a(67453),h=a(35223);const b={appLink:"fFjKN",name:"A_by9",selectedMask:"xSQtR",widgetItem:"Ys9W_",text:"JfAoy",imagePanel:"aUNDc",partialLargeImage:"RuLxv",selected:"BViJb",image:"LkTep",dragHandle:"CJqvP",large:"R5clw",comingSoonPanel:"Wa2PG",editSubjectsItem:"gGNFD",allSubjectsItem:"IHdlJ",logoContainer:"Nzaes",draggingItem:"zUOye",partialLargeFallback:"FmJP9",partialIcon:"sdZuo"};var E=function(e){var t=e.name,a=e.multiline,i="".concat(b.comingSoonPanel," \n d-flex flex-column align-items-center justify-content-center px-3 text-center"),r="";return a?r+=" ".concat(b.clamped," clamp-2"):(i+=" text-nowrap",r+=" text-truncate"),n.createElement("div",{className:i},n.createElement("small",{className:"text-secondary"},n.createElement(y.x,{namespace:"shared.subjectWidgetItem",phrase:"comingSoon"})),n.createElement("p",{className:"".concat(b.name," h6")},n.createElement("span",{className:r},t)))},k=function(e){var t=e.name,a=e.multiline,i=e.subtitle,r="px-3 d-flex flex-column justify-content-center",l="".concat(b.name," h6");return a?l+=" clamp-3 text-start":(r+=" text-nowrap text-truncate",l+=" text-truncate mb-0 pb-1"),n.createElement("div",{className:r},i&&n.createElement("div",{className:"text-secondary clamp-1 ".concat(b.text)},i),n.createElement("div",{className:l,title:t},t))};function x(e){var t=f.j.createUrl(e.coverUrl,{size:e.isLarge?v.h2.Medium:v.h2.Small}),a={name:e.data.name,multiline:e.isLarge||e.multiline,subtitle:e.subtitle};return n.createElement("div",{className:"border d-flex position-relative ".concat(e.className," ").concat(b.widgetItem," ").concat(e.isSelected?"border-success border-2":""),id:"".concat(e.data.id,"-").concat(c.Y.getRandomInt())},e.isSelected&&n.createElement("div",{className:"".concat(b.selectedMask," border-2")}),n.createElement("div",{className:"".concat(b.imagePanel," ").concat(e.isLarge?b.large:"")},e.isSelected&&!e.hideCheckmark&&n.createElement("div",{className:b.selected},n.createElement(p,{svgName:h.vn.Check,svgSize:m.S.Large,textVariant:"white",variant:"green"})),n.createElement("div",{className:"".concat(b.image," ").concat(e.imageClassName),style:e.coverUrl?{backgroundImage:"url('".concat(t,"')")}:{}}),!e.hideFallback&&n.createElement(g.oy,{type:g.mS.Subject,extraClasses:e.isLarge?b.large:""})),e.isComingSoon?n.createElement(E,Object.assign({},a)):n.createElement(k,Object.assign({},a)))}function L(e){var t,a=e.getChildAppLink?e.getChildAppLink(e.data):null;return n.createElement(n.Fragment,null,a?n.createElement(u.F,{className:b.appLink,appLink:a,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,appLinkOptions:null===(t=e.getChildAppLinkOptions)||void 0===t?void 0:t.call(e)},n.createElement(x,Object.assign({},e))):n.createElement(x,Object.assign({},e)))}function A(e){var t,a,r,l=Object.assign(Object.assign({},e.analyticsData),{id:null===(t=e.data)||void 0===t?void 0:t.id,name:null===(a=e.data)||void 0===a?void 0:a.name}),o=Object.assign(Object.assign({location:i.LZ.ClassificationListItem},e.analyticsOptions),{actionType:i.Vw.Click,entity:i.py.Company,descriptor:i._S.Cover});return n.createElement(L,Object.assign({},e,{analyticsData:l,analyticsOptions:o,coverUrl:null===(r=e.data.logo)||void 0===r?void 0:r.url}))}function O(e){return n.createElement(s.Z,{sm:6,md:e.useLargeStyle?6:4,lg:e.useLargeStyle?4:3},n.createElement("div",{className:"position-relative px-1 mb-2"},n.createElement(A,{data:e.item,getChildAppLink:e.appLinks.getCompanyAppLink,getChildAppLinkOptions:function(){var t,a;return null===(a=(t=e.appLinks).getCompanyAppLinkOptions)||void 0===a?void 0:a.call(t,e.item)},analyticsData:{itemIndex:e.itemIndex,search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:0},isLarge:e.useLargeStyle})))}var S=a(81886),w=a(43500),j=a(55577);const C="ZhLPS";function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var I="search.exchangeVideoGroup";function N(e){var t,a,r=e.item.showCount>=3?3:e.item.showCount,l=S.Q.C$.getCurrentAppLink(),o=null!==(t=l.params)&&void 0!==t?t:{},s=null!==(a=null==o?void 0:o.source)&&void 0!==a?a:[];s&&!Array.isArray(s)&&(s=[s]);var c,m=Object.assign(Object.assign({},l),{params:Object.assign(Object.assign({},o),{source:[].concat((c=s,function(e){if(Array.isArray(e))return T(e)}(c)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?T(e,t):void 0}}(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),[w.fi.ExchangeArchive])})}),d={query:e.queryParams.query,itemIndex:e.itemIndex,pagePositionIndex:e.pagePositionIndex},p={entity:i.py.SearchResults,location:i.LZ.ExchangeSearchGroupItem,actionType:i.Vw.Click,descriptor:i.Bk.ExchangeArchive};return n.createElement("div",{className:0===e.pagePositionIndex?"border-bottom pb-1 mb-3":"border-top border-bottom pt-3 mt-2 pb-1 mb-3"},n.createElement(u.F,{appLink:m,analyticsData:d,analyticsOptions:p},n.createElement("h2",{className:"h4"},n.createElement(y.x,{namespace:I,phrase:"heading"}))),n.createElement("p",null,n.createElement(y.x,{namespace:I,phrase:"message"})," ",n.createElement(u.F,{appLink:e.appLinks.searchSettings,className:"text-info",analyticsData:d,analyticsOptions:Object.assign(Object.assign({},p),{descriptor:i._S.Settings})},n.createElement(y.x,{namespace:I,phrase:"searchSettings"})),"."),n.createElement("div",{className:"position-relative ".concat(C)},e.item.videos.slice(0,r).map((function(t,a){return n.createElement(j.m,{key:a,video:t,yearGroups:e.yearGroups,getVideoAppLink:e.appLinks.getVideoAppLink,getSubTextAppLink:e.appLinks.getSubTextAppLink,presentationAudiences:e.audiences,setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:{search:{query:e.queryParams.query,score:t._score,maxScore:t._maxScore,featured:t._featured},pagePositionIndex:e.pagePositionIndex},companyLogoFallbackUrl:e.companyLogoFallbackUrl,subTextType:e.subTextType})}))),e.item.videos.length>r&&n.createElement("div",{className:"text-center py-2"},n.createElement(u.F,{className:"text-secondary",appLink:m,analyticsData:d,analyticsOptions:p},n.createElement(y.x,{namespace:I,phrase:"seeMore"}))))}var P=a(49985),F=a(70498),U=a(28203),D=a(17464),q=a(58870),_=a(12788),V=a(49439),R=a(78479),M=function(e){return e.xs||e.sm};function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,i,r,l,o=[],s=!0,c=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;s=!1}else for(;!(s=(n=r.call(a)).done)&&(o.push(n.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Z(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Z(e,t):void 0}}(e,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.")}()}function Z(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var G=n.forwardRef((function(e,t){var a=H(n.useState(!1),2),i=a[0],r=a[1],o=H(n.useState(null),2),s=o[0],c=o[1],u=n.useRef(),m=H((0,V.X)(),2),d=m[0],p=m[1],g=(0,l.k)(),y=n.useCallback((function(){p||e.show||e.tagIsHovering?r(!0):(r(!1),c(null))}),[p,e.show,e.tagIsHovering]),v=n.useCallback((function(){var a,n,i,r,l=null===(a=u.current)||void 0===a?void 0:a.getBoundingClientRect(),o=null===(n=t.current)||void 0===n?void 0:n.getBoundingClientRect(),s=null===(r=null===(i=e.containerRef)||void 0===i?void 0:i.current)||void 0===r?void 0:r.getBoundingClientRect();if(l){var m=function(e,t,a,n,i){var r={padding:"".concat(10,"px 0"),visibility:"visible"},l=n.top-a.bottom;if(M(i)){var o=t.height+l+20,s=document.documentElement.clientWidth-a.right+10,c=a.bottom+window.scrollY-t.height-20;return Object.assign(Object.assign({},r),{top:c,right:s,height:o})}switch(e){case R.f.ThumbnailHeroMedia:var u=t.height+(l+20),m=document.documentElement.clientWidth-a.right+10,d=a.bottom+window.scrollY-t.height-20;return Object.assign(Object.assign({},r),{top:d,right:m,height:u});case R.f.ThumbnailFeaturedMedia:var p=t.height+20,g=document.documentElement.clientWidth-a.right-t.width-20,y=a.bottom+window.scrollY-t.height-n.height-20;return Object.assign(Object.assign({},r),{top:y,right:g,height:p});case R.f.ThumbnailFixedListMediaLarge:var v=a.height+l,f=document.documentElement.clientWidth-a.right+10,h=a.bottom+window.scrollY-t.height-20;return Object.assign(Object.assign({},r),{top:h,right:f,height:v})}}(e.widgetTemplate,l,s,o,g);c(m)}}),[u.current,t.current,e.containerRef,e.widgetTemplate,g]);if(n.useEffect((function(){var e=setTimeout(y,150),t=setTimeout(v,200);return function(){clearTimeout(e),clearTimeout(t)}}),[y,v]),!t.current)return n.createElement(n.Fragment,null);var f=e.childComponent;return i?(0,_.createPortal)(n.createElement("div",{ref:d,className:"gZ3Ae",style:s},n.createElement(f,Object.assign({ref:u,isShowing:i&&s},e.childProps))),document.body):n.createElement(n.Fragment,null)})),B=a(44013);function $(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var W=function(e,t,a){var r,l,o=(r=n.useState(!1),l=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,i,r,l,o=[],s=!0,c=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;s=!1}else for(;!(s=(n=r.call(a)).done)&&(o.push(n.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(r,l)||function(e,t){if(e){if("string"==typeof e)return $(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?$(e,t):void 0}}(r,l)||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.")}()),s=o[0],c=o[1];return(0,B.q)(e,t,{entity:i.py.Video,location:a}),n.useEffect((function(){c(!!e)}),[e]),s},z=a(23481),Q=a(42648);function Y(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function X(e){var t,a,i,r,o=(i=n.useState(!1),r=2,function(e){if(Array.isArray(e))return e}(i)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,i,r,l,o=[],s=!0,c=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;s=!1}else for(;!(s=(n=r.call(a)).done)&&(o.push(n.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(i,r)||function(e,t){if(e){if("string"==typeof e)return Y(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Y(e,t):void 0}}(i,r)||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.")}()),s=o[0],c=o[1],u=(0,l.k)(),d=null===(a=null===(t=e.containerRef)||void 0===t?void 0:t.current)||void 0===a?void 0:a.getBoundingClientRect(),p=function(e,t,a){return M(a)?(null==e?void 0:e.height)-20:t===R.f.ThumbnailFeaturedMedia?(null==e?void 0:e.height)-52+20:(null==e?void 0:e.height)-20}(d,e.widgetTemplate,u),g=function(e,t,a){if(M(a))return{width:e.width-20};switch(t){case R.f.ThumbnailHeroMedia:return{width:480,maxWidth:e.width-20};case R.f.ThumbnailFeaturedMedia:return{width:null==e?void 0:e.width};case R.f.ThumbnailFixedListMediaLarge:return{width:(null==e?void 0:e.width)-20}}}(d,e.widgetTemplate,u);return n.createElement("div",{className:"bg-white rounded-3 box-shadow overflow-hidden",style:Object.assign({maxHeight:p},g)},n.createElement("div",{className:"".concat("kiea4"," d-flex align-items-center px-3 py-2 ").concat(s?"box-shadow":"")},n.createElement("div",{className:"".concat("C3rvx"," bg-").concat(e.iconVariant," text-white rounded-circle")},n.createElement(m.x,{svgName:e.svgName,size:m.S.Large})),n.createElement("h2",{className:"h6 mb-0 ps-2"},e.heading)),n.createElement(Q.$B,{onUpdate:function(e){var t=e.top;s&&0===t?c(!1):!s&&t>0&&c(!0)},autoHeight:!0,autoHeightMax:p-52},n.createElement("div",{className:"pb-3 px-3"},e.children)))}var J=a(92827),K=z.T.encloseNamespace("shared.whatsIncluded"),ee=n.forwardRef((function(e,t){return n.createElement("div",{ref:t},n.createElement(X,{iconVariant:"blue",heading:K("whatsIncluded"),svgName:h.vn.Video,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate},n.createElement(J.V,{video:e.video,imageCdnUrl:e.imageCdnUrl,resourceThumbnailFallbackImageUrl:e.imageErrorFallbackUrl,isShowing:e.isShowing})))})),te=a(6296);function ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function ne(e){var t,a,r=(t=(0,V.L)({delay:50}),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,i,r,l,o=[],s=!0,c=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;s=!1}else for(;!(s=(n=r.call(a)).done)&&(o.push(n.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(t,a)||function(e,t){if(e){if("string"==typeof e)return ae(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?ae(e,t):void 0}}(t,a)||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.")}()),l=r[0],s=r[1],c=W(s,Object.assign(Object.assign({},e.analyticsData),{id:e.video.id,name:e.video.name}),i.LZ.TeachingResources);return n.useMemo((function(){return o.M.showWhatsIncluded(e.video)}),[e.video])?n.createElement(n.Fragment,null,n.createElement(te.V,{ref:l,active:c}),n.createElement(G,{childComponent:ee,childProps:{video:e.video,imageCdnUrl:e.imageCdnUrl,imageErrorFallbackUrl:e.resourceThumbnailFallbackImageUrl,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate},show:c,ref:l,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate,tagIsHovering:s})):n.createElement(n.Fragment,null)}var ie=a(20684),re=z.T.encloseNamespace("shared.whyThisVideo"),le=n.forwardRef((function(e,t){return n.createElement("div",{ref:t},n.createElement(X,{iconVariant:"navy",heading:re("whyThisVideo"),svgName:h.vn.StarOutline,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate},n.createElement(ie.p,{video:e.video,curriculum:e.curriculum,getCurriculumLinksRequest:e.getCurriculumLinksRequest})))})),oe=a(16226);function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function ce(e){var t,a,r=(t=(0,V.L)({delay:50}),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,i,r,l,o=[],s=!0,c=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;s=!1}else for(;!(s=(n=r.call(a)).done)&&(o.push(n.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(t,a)||function(e,t){if(e){if("string"==typeof e)return se(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?se(e,t):void 0}}(t,a)||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.")}()),l=r[0],s=r[1],c=W(s,Object.assign(Object.assign({},e.analyticsData),{id:e.video.id,name:e.video.name}),i.LZ.ClassroomGuide);return n.useMemo((function(){return o.M.showWhyThisVideo(e.video)}),[e.video])?n.createElement(n.Fragment,null,n.createElement(oe.A,{ref:l,active:c}),n.createElement(G,{childComponent:le,childProps:{video:e.video,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate,curriculum:e.curriculum,getCurriculumLinksRequest:e.getCurriculumLinksRequest},show:c,ref:l,tagIsHovering:s,containerRef:e.containerRef,widgetTemplate:e.widgetTemplate})):n.createElement(n.Fragment,null)}var ue=a(85784),me=a(70872),de=a(17034),pe=a(68626),ge=a(38326);const ye={partialHeroThumbnail:"z0_Sm",partialSeriesText:"xuWtC",partialVideoTitleText:"fXYdC",partialBadge:"FlUpr",partialDescription:"YgWxP",partialSubject:"QBKwQ",partialHeading:"S__E9",guidance:"Ax9h2",description:"zejMP",details:"MRyVe"};function ve(e){var t,a=e.video,l=e.presentationAudiences,c=e.videoAppLink,u=e.subTextAppLink,m=e.hideInteractiveBadge,d=null===(t=null==a?void 0:a.subjectPresentationAudiences)||void 0===t?void 0:t.data,p=(0,ge.n)(d,l),g=P.k.mergeOptions(e.analyticsOptions,{location:i.LZ.ClassificationHero,entity:o.M.getAnalyticsEntity(a)}),y=n.useRef();return a?n.createElement(r.Z,null,n.createElement(s.Z,{xs:12,md:6},n.createElement("div",{ref:y},n.createElement(q.u,{analyticsData:e.analyticsData,analyticsOptions:g,video:a,appLink:c,imageOptions:{size:v.h2.Medium},textPosition:pe.z.Independent,type:"static",setFavourite:e.setFavourite,canFavourite:e.canFavourite,audience:"thumbnail"===e.badgePosition?p:null,newDurationStyle:e.newDurationStyle,hideRating:"thumbnail"!==e.badgePosition||!!p,companyLogoFallbackUrl:e.companyLogoFallbackUrl,subTextType:"none"}))),n.createElement(s.Z,{xs:12,md:6,className:"".concat(ye.details," position-relative")},n.createElement(ue.Q,{analyticsData:e.analyticsData,analyticsOptions:g,video:a}),n.createElement(de.$,{type:e.subTextType,analyticsData:e.analyticsData,analyticsOptions:g,video:a,appLink:u,className:"text-reset"}),n.createElement(me.u,{video:a,analyticsData:e.analyticsData,analyticsOptions:g,appLink:c,linkClassName:"d-inline-block",textClassName:"h4",yearGroups:e.yearGroups}),"info-panel"===e.badgePosition&&n.createElement(D.c,{className:"pb-1"},!m&&n.createElement(U.C,{type:U.g.Interactive,data:a.interactives}),n.createElement(U.C,{type:U.g.Rating,data:a.rating}),n.createElement(U.C,{type:U.g.ProductionYear,data:a.productionYear})),n.createElement("p",{className:"mb-1"},n.createElement("span",{className:ye.description},a.description)),"info-panel"===e.badgePosition&&n.createElement(F.P,{audience:p,className:"mt-1",border:"dark"}),e.showVideoGuidance&&n.createElement("div",{className:"d-flex ".concat(ye.guidance)},n.createElement(ce,{containerRef:y,widgetTemplate:R.f.ThumbnailFeaturedMedia,video:a,curriculum:e.curriculum,getCurriculumLinksRequest:e.getCurriculumLinksRequest,analyticsData:e.analyticsData}),n.createElement(ne,{containerRef:y,widgetTemplate:R.f.ThumbnailFeaturedMedia,video:a,imageCdnUrl:e.imageCdnUrl,resourceThumbnailFallbackImageUrl:e.resourceThumbnailFallbackImageUrl,analyticsData:e.analyticsData})))):n.createElement(n.Fragment,null)}function fe(e){return n.createElement("div",{className:"pb-3"},n.createElement(ve,{video:e.item,presentationAudiences:e.audiences,videoAppLink:e.appLinks.getVideoAppLink(e.item),subTextAppLink:e.appLinks.getSubTextAppLink(e.item),setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:{search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:e.pagePositionIndex},hideInteractiveBadge:!0,yearGroups:e.yearGroups,companyLogoFallbackUrl:e.companyLogoFallbackUrl,subTextType:e.subTextType}))}ve.defaultProps={newDurationStyle:!0,badgePosition:"thumbnail"};const he={playlistItem:"CaRJx",playlistItemGradient:"BI7p2",playlistMetadata:"eDk1l",partialHeading:"w4lWh",ownerAvatarContainer:"JImqE"};var be=["second","minute","hour","day","week","month","year"],Ee=["秒","分钟","小时","天","周","个月","年"],ke={},xe=function(e,t){ke[e]=t},Le=[60,60,24,7,365/7/12,12];function Ae(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}var Oe=function(e,t,a){var n=function(e,t){return(+(t?Ae(t):new Date)-+Ae(e))/1e3}(e,a&&a.relativeDate);return function(e,t){for(var a=e<0?1:0,n=e=Math.abs(e),i=0;e>=Le[i]&&i<Le.length;i++)e/=Le[i];return(e=Math.floor(e))>(0==(i*=2)?9:1)&&(i+=1),t(e,i,n)[a].replace("%s",e.toString())}(n,function(e){return ke[e]||ke.en_US}(t))};xe("en_US",(function(e,t){if(0===t)return["just now","right now"];var a=be[Math.floor(t/2)];return e>1&&(a+="s"),[e+" "+a+" ago","in "+e+" "+a]})),xe("zh_CN",(function(e,t){if(0===t)return["刚刚","片刻后"];var a=Ee[~~(t/2)];return[e+" "+a+"前",e+" "+a+"后"]}));var Se=a(110);const we={fontSmall:"OYBRp"};var je="playlists.playlistCount";function Ce(e){var t=function(e){var t,a,n,i,r,l;return!!e&&(null!==(a=null===(t=e.videos)||void 0===t?void 0:t.count)&&void 0!==a?a:0)+(null!==(i=null===(n=e.interactives)||void 0===n?void 0:n.count)&&void 0!==i?i:0)+(null!==(l=null===(r=e.clips)||void 0===r?void 0:r.count)&&void 0!==l?l:0)}(e.playlist);return!1===t||Number.isNaN(t)?n.createElement(n.Fragment,null):n.createElement("span",{className:we.fontSmall},n.createElement(y.x,{namespace:je,phrase:"count",options:{smartCount:t}}))}var Te=a(91374),Ie=a(2786);const Ne={avatar:"_N1vT"};function Pe(){return n.createElement("div",{className:Ne.avatar},n.createElement(Ie.Sd,null))}var Fe=a(64818);function Ue(e){var t,a,i,r=e.playlist._liteOwner;if(null===(t=e.playlist._isClickViewCurated)||void 0===t?void 0:t.value)return n.createElement(Pe,null);if(!(null==r?void 0:r.id)||!(null===(a=e.currentUser)||void 0===a?void 0:a.id))return n.createElement(n.Fragment,null);if(r.id.toString()===e.currentUser.id.toString())return n.createElement(n.Fragment,null);var l="string"==typeof r.avatar?r.avatar:null===(i=r.avatar)||void 0===i?void 0:i.url;return n.createElement(Te.q,{imageUrl:l,imageCdnUrl:e.imageCdnUrl,initials:Fe.l.getInitials(r.name,r.surname)})}var De=a(85473),qe=a(9085),_e="playlists.playlistList";function Ve(e){var t,a,r=f.j.createUrl(e.data.cover&&e.data.cover.url,{size:v.h2.Medium,resizeType:v.Nq.Cover}),l=e.data.subjectPresentationAudiences&&e.data.subjectPresentationAudiences.data,o=(0,ge.n)(l,e.presentationAudiences),s=he.playlistItem,c=!!r||!!e.showFallbackImage;c&&(s+=" ".concat(he.playlistItemGradient)),!c&&e.bgColourClassNames&&(s+=" ".concat(he.playlistItem," ").concat((0,qe.x)(e.data.name,e.bgColourClassNames))),"round"===e.itemStyle&&(s+=" rounded-3 overflow-hidden"),"round-left"===e.itemStyle&&(s+=" rounded-start-lg overflow-hidden");var m=Object.assign(Object.assign({},e.analyticsData),{id:null===(t=e.data)||void 0===t?void 0:t.id,name:null===(a=e.data)||void 0===a?void 0:a.name}),d=Object.assign(Object.assign({},e.analyticsOptions),{entity:i.py.Playlist});return n.createElement(u.F,{appLink:e.appLink,analyticsData:m,analyticsOptions:d,title:function(){var t;return!e.data.contentModifiedDate||(null===(t=e.data._isClickViewCurated)||void 0===t?void 0:t.value)?"":z.T.getPhrase(_e,"lastUpdated",{timeago:Oe(Se.O.convertUTCToLocal(e.data.contentModifiedDate))})}()},n.createElement(De.Z,{data:r,alt:e.data.name,className:s},!!e.showFallbackImage&&n.createElement(g.oy,{type:g.mS.Playlist}),n.createElement("div",{className:"text-white ".concat(he.playlistMetadata)},!!e.showCount&&n.createElement(Ce,{playlist:e.data}),n.createElement("h5",{className:"mb-0 ".concat(e.titleClassName||"")},n.createElement("span",{className:"clamp-2"},e.data.name)),!!l&&!!l.length&&!!o&&n.createElement(F.P,{className:"".concat(e.audienceLabelClass?e.audienceLabelClass:""," mt-1"),audience:o,border:"white"})),!!e.showOwner&&!!e.imageCdnUrl&&n.createElement("div",{className:he.ownerAvatarContainer},n.createElement(Ue,{playlist:e.data,currentUser:e.currentUser,imageCdnUrl:e.imageCdnUrl}))))}Ve.defaultProps={itemStyle:"square"},i.Vw.Click,i.py.Playlist,i.LZ.PlaylistListItem,i._S.Cover;var Re=a(7733);const Me={videoList:"eEZEe"};var He="search.playlistWithVideos";function Ze(e){var t,a=(t=(0,l.k)()).xl||t.xxl?3:2,o=e.playlist.videos.data.slice(0,a),c={actionType:i.Vw.Click,entity:i.py.Playlist,location:i.LZ.PlaylistWithVideos},m=Object.assign(Object.assign({},e.analyticsData),{id:e.playlist.id,name:e.playlist.name});return n.createElement("div",{className:"ps-2 py-2"},n.createElement(r.Z,{className:"g-0 border border-light rounded-3"},n.createElement(s.Z,{xs:4,lg:3,className:"pe-3"},n.createElement(Ve,{appLink:e.playlistAppLink,analyticsData:e.analyticsData,analyticsOptions:Object.assign(Object.assign({},c),{descriptor:i._S.Cover}),data:e.playlist,presentationAudiences:e.presentationAudiences,bgColourClassNames:Re.o,itemStyle:"round-left",imageCdnUrl:e.imageCdnUrl,currentUser:e.currentUser,showCount:!1,showOwner:!0})),n.createElement(s.Z,{xs:8,lg:9},n.createElement("div",{className:"d-flex justify-content-between"},n.createElement("div",{className:"pt-3 ".concat(Me.videoList)},null==o?void 0:o.map((function(t){var a=Object.assign(Object.assign({},m),{videoId:t.id,videoName:t.name});return n.createElement(j.m,{key:t.id,video:t,getSubTextAppLink:e.getSubTextAppLink,canFavourite:function(){return!1},setFavourite:null,getVideoAppLink:e.getVideoAppLink,analyticsData:a,analyticsOptions:{entity:i.py.Video,location:i.LZ.PlaylistWithVideos},size:"sm",yearGroups:e.yearGroups,companyLogoFallbackUrl:e.companyLogoFallbackUrl,subTextType:e.subTextType})}))),n.createElement("div",{className:"text-end pt-3 pe-3"},n.createElement(u.F,{className:"info-link fw-semibold",appLink:e.playlistAppLink,analyticsData:m,analyticsOptions:Object.assign(Object.assign({},c),{descriptor:i._S.Link})},n.createElement(y.x,{namespace:He,phrase:"seeAllVideos"})))))))}function Ge(e){return n.createElement("div",{className:"mx-n2"},n.createElement(Ze,{playlist:e.item,yearGroups:e.yearGroups,playlistAppLink:e.appLinks.getPlaylistAppLink(e.item),presentationAudiences:e.audiences,analyticsData:{search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:e.pagePositionIndex},imageCdnUrl:e.imageCdnUrl,currentUser:e.currentUser,preloadImage:!0,getSubTextAppLink:e.appLinks.getSubTextAppLink,getVideoAppLink:e.appLinks.getVideoAppLink,companyLogoFallbackUrl:e.companyLogoFallbackUrl,subTextType:e.subTextType}))}const Be={labelContainer:"ieonz",hoverActive:"vqHCl",mask:"qEOPN",largeHoverTitle:"ZYApF",smallHoverTitle:"qcfHO",largeHoverDescription:"Uh4gM",smallHoverDescription:"TiqqV"};function $e(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function We(e){var t,a,i=(t=(0,V.L)({className:Be.hoverActive}),a=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,i,r,l,o=[],s=!0,c=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;s=!1}else for(;!(s=(n=r.call(a)).done)&&(o.push(n.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(t,a)||function(e,t){if(e){if("string"==typeof e)return $e(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?$e(e,t):void 0}}(t,a)||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.")}()),r=i[0],l=i[1],o=e.series&&e.series.subjectPresentationAudiences&&e.series.subjectPresentationAudiences.data||[],s=(0,ge.n)(o,e.presentationAudiences),c=!!(o&&o.length&&s);return n.createElement("div",{ref:r},l&&n.createElement("div",{className:"py-3 text-white text-center mb-3 ".concat(Be.mask)},n.createElement("h3",{className:"fw-semibold ".concat(Be.hoverTitle," ").concat(e.isSmall?Be.smallHoverTitle:Be.largeHoverTitle)},n.createElement("span",{className:"clamp-3"},e.series.name)),!!e.series.description&&n.createElement("p",{className:"".concat(Be.hoverDescription," ").concat(e.isSmall?Be.smallHoverDescription:Be.largeHoverDescription," mb-0")},e.series.description)),n.createElement(De.Z,{data:e.series.tallPoster,alt:e.series.name,imageType:v.__.TallPosters,preload:e.preloadImage,imageOptions:{size:v.h2.Large},imageClassName:e.imageClass?e.imageClass:"rounded-3"},n.createElement(g.oy,{type:g.mS.Series}),n.createElement("div",{className:"position-absolute text-white ".concat(Be.labelContainer)},c?n.createElement(F.P,{audience:s,border:"white"}):n.createElement(U.C,{type:U.g.Rating,data:e.series.rating}))))}const ze={videoList:"UT8bc"};var Qe="search.seriesWithVideos";function Ye(e){var t,a=(t=(0,l.k)()).xl||t.xxl?5:t.lg||t.md?4:3,o=e.series.videos.data.slice(0,a),c={actionType:i.Vw.Click,entity:i.py.Series,location:i.LZ.SeriesWithVideos},m=Object.assign(Object.assign({},e.analyticsData),{id:e.series.id,name:e.series.name});return n.createElement("div",{className:"ps-2 py-2"},n.createElement(r.Z,{className:"g-0 border border-light rounded-3"},n.createElement(s.Z,{xs:4,lg:3,className:"pe-3"},n.createElement(u.F,{appLink:e.seriesAppLink,className:"position-relative",analyticsData:m,analyticsOptions:Object.assign(Object.assign({},c),{descriptor:i._S.TallPoster})},n.createElement(We,{series:e.series,presentationAudiences:e.presentationAudiences,preloadImage:e.preloadImage,imageClass:"rounded-start-lg"}))),n.createElement(s.Z,{xs:8,lg:9},n.createElement("div",{className:"d-flex justify-content-between"},n.createElement("div",{className:"pt-3 ".concat(ze.videoList)},null==o?void 0:o.map((function(t){var a=Object.assign(Object.assign({},m),{videoId:t.id,videoName:t.name});return t=Object.assign(Object.assign({},t),{series:e.series}),n.createElement(j.m,{key:t.id,video:t,getSubTextAppLink:e.subTextAppLink,canFavourite:function(){return!1},setFavourite:null,getVideoAppLink:function(t){return e.getVideoAppLink(t)},analyticsData:a,analyticsOptions:{entity:i.py.Video,location:i.LZ.SeriesWithVideos},size:"sm",yearGroups:e.yearGroups,companyLogoFallbackUrl:e.companyLogoFallbackUrl,subTextType:e.subTextType})}))),n.createElement("div",{className:"text-end pt-3 pe-3"},n.createElement(u.F,{className:"info-link fw-semibold",appLink:e.seriesAppLink,analyticsData:m,analyticsOptions:Object.assign(Object.assign({},c),{descriptor:i._S.Link})},n.createElement(y.x,{namespace:Qe,phrase:"seeAllVideos"})))))))}function Xe(e){return n.createElement("div",{className:"mx-n2"},n.createElement(Ye,{yearGroups:e.yearGroups,presentationAudiences:e.audiences,series:e.item,seriesAppLink:e.appLinks.getSeriesAppLink(e.item),subTextAppLink:e.appLinks.getSubTextAppLink,getVideoAppLink:e.appLinks.getVideoAppLink,analyticsData:{search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:e.pagePositionIndex},preloadImage:!0,companyLogoFallbackUrl:e.companyLogoFallbackUrl,subTextType:e.subTextType}))}var Je=a(54569),Ke="search.collectionVideoList";function et(e){var t,a=(t=(0,l.k)()).xs?2:t.sm?1:3,i={analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions};return n.createElement(n.Fragment,null,n.createElement("ul",{className:"list-unstyled my-1"},e.videos.slice(0,a).map((function(t){var a,r=!!t.episodeNumber&&!!(null===(a=t.season)||void 0===a?void 0:a.id);return n.createElement("li",{key:"".concat(e.collectionId,":").concat(t.id),className:"d-flex align-items-center"},n.createElement(u.F,Object.assign({},i,{className:"clamp-1",appLink:e.getVideoAppLink(t)}),r&&n.createElement(n.Fragment,null,n.createElement(de.Q,{video:t})," "),t.name))}))),n.createElement(u.F,Object.assign({},i,{className:"info-link",appLink:e.appLink}),n.createElement(y.x,{namespace:Ke,phrase:"seeAll"})))}var tt=a(64887),at=a(9977);const nt={overlayContainer:"MnBcv",overlay:"AZSmh"};var it="search.collectionThumbnail";function rt(e){var t,a,r,o,c=(0,l.k)(),m="sm"===at.O.getSize(c,"md"),d=!!(null===(a=null===(t=e.collection.videos)||void 0===t?void 0:t.data)||void 0===a?void 0:a.length),p=d&&e.collection.videos.data.find((function(e){var t;return!!(null===(t=e.thumbnail)||void 0===t?void 0:t.url)})),f=(o=Object.assign(Object.assign({},e.analyticsData),{id:e.collection.id,name:e.collection.name}),p&&(o.videoId=p.id,o.videoName=p.name),o),h="series"===e.collectionType;return n.createElement("div",{className:"row g-0 ".concat(m?"":"py-2")},n.createElement(s.Z,Object.assign({},at.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(m?"pb-2 pe-2":"mb-1 px-2")}),n.createElement("div",{className:"position-relative overflow-hidden ".concat(m?"rounded":"rounded-3")},n.createElement(De.Z,{data:null==p?void 0:p.thumbnail,appLink:e.appLink,imageType:v.__.Thumbnails,analyticsData:f,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:i._S.Thumbnail})},n.createElement(Je.z,{type:e.maskType}),n.createElement(g.oy,{type:e.imageFallbackType}),n.createElement("div",{className:"d-flex flex-column align-items-center justify-content-center text-white h-100 ".concat(nt.overlay)},n.createElement(y.x,{namespace:it,phrase:"seeAll"}))))),n.createElement(s.Z,Object.assign({},at.O.getDetailsColumns(),{className:m?"pb-2":"px-2"}),!e.isPlugin&&n.createElement(tt.e,{actions:e.getCollectionActions(e.collection,e.showActions,e.collectionType,e.analyticsOptions),className:"float-end mt-n1",actionsDropdownClassName:"btn btn-link ms-1"}),n.createElement(u.F,{appLink:e.appLink,analyticsData:f,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:i._S.Title})},n.createElement("h5",{className:"m-0 mb-1"},n.createElement("span",{className:"clamp-1"},e.collection.name))),h&&!e.hideBadges&&n.createElement(D.c,null,n.createElement(U.C,{type:U.g.Rating,data:e.collection.rating}),n.createElement(U.C,{type:U.g.ProductionYear,data:null===(r=e.collection.metadata)||void 0===r?void 0:r.year})),d&&n.createElement(et,{collectionId:e.collection.id,videos:e.collection.videos.data,appLink:e.appLink,analyticsData:f,analyticsOptions:Object.assign(Object.assign({},e.analyticsOptions),{descriptor:i._S.Link}),getVideoAppLink:e.getVideoAppLink})))}function lt(e){return n.createElement("div",{className:"position-relative ".concat(C)},n.createElement(rt,{analyticsData:{search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:e.pagePositionIndex},analyticsOptions:{entity:i.py.Playlist,actionType:i.Vw.Click,location:i.LZ.PlaylistListItem},appLink:e.appLinks.getPlaylistAppLink(e.item),showActions:e.showActions,collection:e.item,collectionType:"playlist",maskType:Je.O.Playlist,imageFallbackType:g.mS.PlaylistThumbnail,isPlugin:e.isPlugin,getVideoAppLink:e.appLinks.getVideoAppLink,getCollectionActions:e.appLinks.getCollectionActions}))}function ot(e){return n.createElement("div",{className:"position-relative ".concat(C)},n.createElement(rt,{analyticsData:{search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:e.pagePositionIndex},analyticsOptions:{entity:i.py.Series,actionType:i.Vw.Click,location:i.LZ.SeriesListItem},appLink:e.appLinks.getSeriesAppLink(e.item),collectionType:"series",collection:e.item,showActions:e.showActions,maskType:Je.O.Series,imageFallbackType:g.mS.SeriesThumbnail,hideBadges:!0,isPlugin:e.isPlugin,getVideoAppLink:e.appLinks.getVideoAppLink,getCollectionActions:e.appLinks.getCollectionActions}))}var st,ct=a(52641);!function(e){e.Draft="Draft",e.ComingSoon="ComingSoon",e.Published="Published"}(st||(st={}));var ut=n.memo((function(e){var t,a,r,l,o,s=(null===(t=e.data)||void 0===t?void 0:t.status)===st.ComingSoon,c=function(e,t){var a;if((null==t?void 0:t.length)>=ct._.MULTI_PRESENTATION_THRESHOLD)return null===(a=null==t?void 0:t.find((function(t){return t.id===e})))||void 0===a?void 0:a.name}(e.data.presentationId,null==e?void 0:e.availablePresentations),u=Object.assign(Object.assign({},e.analyticsData),{id:null===(a=e.data)||void 0===a?void 0:a.id,name:null===(r=e.data)||void 0===r?void 0:r.name,presentationId:e.data.presentationId,comingSoon:!!s}),m=Object.assign(Object.assign({location:i.LZ.ClassificationListItem},e.analyticsOptions),{actionType:i.Vw.Click,entity:i.py.Classification,descriptor:i._S.Cover});return n.createElement(L,Object.assign({},e,{analyticsData:u,analyticsOptions:m,coverUrl:null===(l=e.data.cover)||void 0===l?void 0:l.url,subtitle:(null===(o=e.getSubtitle)||void 0===o?void 0:o.call(e,e.data))||c,isComingSoon:s}))}));function mt(e){return n.createElement(s.Z,{sm:6,md:e.useLargeStyle?6:4,lg:e.useLargeStyle?4:3},n.createElement("div",{className:"position-relative px-1 mb-2"},n.createElement(ut,{data:e.item,getChildAppLink:e.appLinks.getClassificationAppLink,getChildAppLinkOptions:function(){var t,a;return null===(a=(t=e.appLinks).getClassificationAppLinkOptions)||void 0===a?void 0:a.call(t,e.item)},availablePresentations:e.availablePresentations,analyticsData:{itemIndex:e.itemIndex,search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:0},isLarge:e.useLargeStyle})))}i.Vw.Click,i.py.UserSetting,i._S.Tile,i.Vw.Click,i.py.Url,i._S.Tile;var dt=a(50333),pt=a(54293);function gt(e){var t,a=(t=e.item,o.M.isClip(t)?dt.I:o.M.isInteractive(t)?pt.H:j.m);return n.createElement("div",{className:"position-relative ".concat(C)},n.createElement(a,{video:e.item,yearGroups:e.yearGroups,getVideoAppLink:e.appLinks.getVideoAppLink,getSubTextAppLink:e.appLinks.getSubTextAppLink,getPreviewQuestionsAppLink:e.appLinks.getPreviewQuestionsAppLink,presentationAudiences:e.audiences,setFavourite:e.setFavourite,canFavourite:e.canFavourite,analyticsData:{search:{query:e.queryParams.query,score:e.item._score,maxScore:e.item._maxScore,featured:e.item._featured},pagePositionIndex:e.pagePositionIndex},companyLogoFallbackUrl:e.companyLogoFallbackUrl,subTextType:e.subTextType}))}function yt(e){return function(e){if(Array.isArray(e))return vt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return vt(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?vt(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var ft=n.memo((function(e){var t,a,i,s,c,u,m,d,p=(0,l.k)(),g=p.xs||p.sm;if(!(null===(t=e.results)||void 0===t?void 0:t.length)&&!(null===(a=e.topics)||void 0===a?void 0:a.totalResults)&&!(null===(i=e.companies)||void 0===i?void 0:i.totalResults))return n.createElement(n.Fragment,null);var y=[].concat(yt(null!==(c=null===(s=e.companies)||void 0===s?void 0:s.results)&&void 0!==c?c:[]),yt(null!==(m=null===(u=e.topics)||void 0===u?void 0:u.results)&&void 0!==m?m:[])),v=Object.assign({useLargeStyle:y.length<4},e);return n.createElement("div",{className:"position-relative"},!!y.length&&n.createElement(r.Z,{className:"g-0 pb-3 mx-n1"},y.slice(0,8).map((function(e,t){switch(e.type.toLowerCase()){case"company":return n.createElement(O,Object.assign({key:t,item:e,itemIndex:t},v));case"subject":return n.createElement(mt,Object.assign({key:t,item:e,itemIndex:t},v))}}))),null===(d=e.results)||void 0===d?void 0:d.map((function(e,t){var a,i,r=y.length?t+1:t;if("isExchangeVideoGroup"in e&&e.isExchangeVideoGroup)return n.createElement(N,Object.assign({key:t,item:e,pagePositionIndex:r},v));switch(null===(a=e.type)||void 0===a?void 0:a.toLowerCase()){case"interactive":case"clip":case"video":return 0===t&&e._featured&&o.M.isVideo(e)?n.createElement(fe,Object.assign({key:t,item:e,pagePositionIndex:r},v)):n.createElement(gt,Object.assign({key:t,item:e,pagePositionIndex:r},v));case"playlist":return g?n.createElement(lt,Object.assign({key:t,item:e,pagePositionIndex:r},v)):n.createElement(Ge,Object.assign({key:t,item:e,pagePositionIndex:r},v));case"series":return g||!(null===(i=e.tallPoster)||void 0===i?void 0:i.id)?n.createElement(ot,Object.assign({key:t,item:e,pagePositionIndex:r},v)):n.createElement(Xe,Object.assign({key:t,item:e,pagePositionIndex:r},v))}})))})),ht=a(28419),bt="search.searchSubstitute";function Et(e){return e.substitute?n.createElement("p",{className:"mb-3"},n.createElement(y.x,{namespace:bt,phrase:"showingFor"})," ",n.createElement(u.F,{className:"info-link",appLink:e.getAppLink(e.substitute,e.queryParams),appLinkOptions:{replace:!0}},e.substitute)):n.createElement(n.Fragment,null)}var kt="search.searchSuggestions";function xt(e){var t;return(null===(t=e.suggestions)||void 0===t?void 0:t.length)?n.createElement("div",{className:"d-flex align-items-center mb-3"},n.createElement(y.x,{namespace:kt,phrase:"didYouMean"})," ",e.suggestions.map((function(t,a){return n.createElement(n.Fragment,{key:"".concat(t,":").concat(a)},0!==a&&n.createElement("span",{className:"mx-1"},"•"),n.createElement(u.F,{className:"info-link",appLink:e.getAppLink(t,e.queryParams),appLinkOptions:{replace:!0}},t))}))):n.createElement(n.Fragment,null)}xt.defaultProps={suggestions:[],queryParams:{}};var Lt=a(63545),At=a(71471),Ot=a(51365),St=a(79612),wt=a(73818),jt=a(82329),Ct=a(47399),Tt=a(34051),It=a(75896),Nt=a(28400),Pt=a(2997),Ft=a(63484);function Ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}var Dt={useOnFilterChange:function(e,t){var a=Object.assign({},t);delete a.query;var i=Object.keys(a).map((function(e){return a[e]})).sort((function(e,t){return e-t}));n.useEffect((function(){e()}),[i.join(":")])},getCollectionActions:function(e,t,a,n){return[]},getSeriesAppLink:function(e){return(null==e?void 0:e.id)?{application:jt.O.EXCHANGE,action:wt.e.Exchange.SERIES,args:[e.id,Nt.m.slugify(e.name)]}:null},getVideoAppLink:function(e){return(null==e?void 0:e.id)?{application:jt.O.EXCHANGE,action:wt.e.Exchange.PREVIEW,args:[e.id,Nt.m.slugify(e.name)]}:null},getAppliedIndices:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).type;if(e){if(!Array.isArray(e))return[e];if(e.length)return e}return["video"]},getNestedCategoryIds:function(e,t){var a=function(e){var a=[],n=t.find((function(t){return+t.data.id==+e}));return(null==n?void 0:n.children.length)?(function e(t){t&&(t.data&&a.push(t.data.id),t.children.length&&t.children.forEach((function(t){e(t)})))}(n),a):[e]};if(!Array.isArray(e))return a(e);var n,i=(n=e,function(e){if(Array.isArray(e))return Ut(e)}(n)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return Ut(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Ut(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(e){return a(e)}));return It.m.flatten(i)},buildBackendFilterParams:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],n=arguments.length>3?arguments[3]:void 0,i=null==t?void 0:t.categoryId,r=i&&this.getNestedCategoryIds(i,n),l=Ft.qr.buildBackendFilterParams(Object.assign(Object.assign({},t),{categoryId:r}),a,null,!1,[]);return l["".concat(Pt.w.FILTER_PARAM_PREFIX,"library")]=e,l},getBackendFilters:function(e){if(!e.hasDataLoaded)return null;var t=e.queryParams,a=e.ratings,n=e.exchange,i=e.categories;return{queryParams:t,backendFilters:Dt.buildBackendFilterParams(n.data.id,t,a.data,i.data),appliedIndices:Dt.getAppliedIndices(t)}},getFilters:function(e,t){if(!e.hasDataLoaded||!t.hasCompleted)return null;var a=e.categories,n=e.ratings;return{mainFilters:[Ft.x$.Categories(a.data),Ft.x$.Rating(n.data,null),Ft.x$.HasResources(),Ft.x$.HasSubtitles(),Ft.x$.TagOrClassification(t.data)],moreFilters:Ft.qr.getMoreFilters([Ft.x$.ProductionYear(),Ft.x$.IsHD(),Ft.x$.Duration()])}},getAppLink:function(e,t){return{application:jt.O.EXCHANGE,action:wt.e.Exchange.SEARCH,params:Object.assign(Object.assign({},t),{query:e})}}},qt=a(15800),_t=a(99742),Vt="exchange.searchResultsEmptyState";function Rt(e){return n.createElement(y.D.Provider,{value:Vt},n.createElement(qt.u,null,n.createElement(qt.u.Image,{src:_t.W.EmptyStates.SEARCH}),n.createElement(qt.u.Heading,null,e.query?n.createElement(y.x,{phrase:"headingWithQuery",options:{query:e.query}}):n.createElement(y.x,{phrase:"headingWithoutQuery"})),n.createElement(qt.u.Info,null,n.createElement(y.x,{phrase:"info"}),n.createElement(u.F,{className:"info-link",appLink:{application:jt.O.EXCHANGE,action:wt.e.Exchange.INDEX}},n.createElement(y.x,{phrase:"topicsAppLink"})))))}var Mt=a(20354),Ht=a(39151),Zt=a(78681),Gt=a(31949),Bt=a(83145),$t=a(69834),Wt=a(55110),zt=a(60115),Qt="exchange.searchResultsView2",Yt=a(99940),Xt=a(97395),Jt=a(27898);function Kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=new Array(t);a<t;a++)n[a]=e[a];return n}function ea(e){return ea="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},ea(e)}function ta(e){var t,a,n,i=e.totalResults,r=null!==(a=null===(t=null==e?void 0:e.results)||void 0===t?void 0:t.filter((function(e){var t,a,n,r,l,o,s,c;if("series"!==e._index&&"playlist"!==e._index)return!0;if("playlist"===e._index){var u=e;return!!((null===(a=null===(t=u.clips)||void 0===t?void 0:t.data)||void 0===a?void 0:a.length)||(null===(r=null===(n=u.interactives)||void 0===n?void 0:n.data)||void 0===r?void 0:r.length)||(null===(o=null===(l=u.videos)||void 0===l?void 0:l.data)||void 0===o?void 0:o.length))||(i--,!1)}return 0!==(null===(c=null===(s=e.videos)||void 0===s?void 0:s.data)||void 0===c?void 0:c.length)||(i--,!1)})))&&void 0!==a?a:[];e.results=r,e.totalResults=i;var l=null===(n=r[0])||void 0===n?void 0:n._score;return Object.assign(Object.assign({},e),{results:Jt.Q.mapMaxScoreToSearchResults(r,l)})}var aa={searchV4:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,i="search:v4:".concat(e,":").concat(t,":").concat(n);i+=Object.keys(a).map((function(e){var t=a[e];return Array.isArray(t)?t.join(";"):t})).join(";");var r=a,l="".concat(Pt.w.FILTER_PARAM_PREFIX,"excludeLibraryExclusive"),o=r[l],s=r.isLearner,c=function(e,t){var a={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(a[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(a[n[i]]=e[n[i]])}return a}(r,["symbol"===ea(l)?l:l+"","isLearner"]),u={searchType:"content",indices:t.map((function(e){return"video"===e&&o?{index:e,filters:{excludeLibraryExclusive:o}}:{index:e}})),filters:Object.entries(c).reduce((function(e,t){var a,n,i=(n=2,function(e){if(Array.isArray(e))return e}(a=t)||function(e,t){var a=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=a){var n,i,r,l,o=[],s=!0,c=!1;try{if(r=(a=a.call(e)).next,0===t){if(Object(a)!==a)return;s=!1}else for(;!(s=(n=r.call(a)).done)&&(o.push(n.value),o.length!==t);s=!0);}catch(e){c=!0,i=e}finally{try{if(!s&&null!=a.return&&(l=a.return(),Object(l)!==l))return}finally{if(c)throw i}}return o}}(a,n)||function(e,t){if(e){if("string"==typeof e)return Kt(e,t);var a=Object.prototype.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?Kt(e,t):void 0}}(a,n)||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.")}()),r=i[0],l=i[1];return Object.assign(Object.assign({},e),function(e,t,a){var n;return n=function(e,t){if("object"!=ea(e)||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var n=a.call(e,"string");if("object"!=ea(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==ea(n)?n:String(n))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}({},r.replace("filters.",""),l))}),{}),query:e,allowSubstitute:!0,cursor:null!=n?n:void 0,isLearner:!!s};return{url:"{gateway}/v4/search",publicUrl:"/api/search/v4",type:Yt.k.POST,data:u,key:i,formatData:ta}},search:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,l="search:".concat(e,":").concat(t,":").concat(n);l+=Object.keys(a).map((function(e){var t=a[e];return Array.isArray(t)?t.join(";"):t})).join(";");var o=Object.assign({},Object.assign({index:t,cursor:null!=n?n:void 0,query:e,allowSubstitute:!0},a));return{url:Xt._.urlBuilder("{gateway}/v3/search",o),publicUrl:Xt._.urlBuilder("/api/search",o),key:l,formatData:ta,success:i,error:r}},tagsAndClassifications:function(e,t){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,r=arguments.length>5?arguments[5]:void 0,l=Object.assign({},Object.assign({index:t,cursor:n,query:e},a));return{url:Xt._.urlBuilder("{gateway}/v3/search/tags-and-classifications",l),publicUrl:Xt._.urlBuilder("/api/search/tags-and-classifications",l),key:"filter:options:".concat(e,":").concat(t.join(":"),":").concat(n),success:i,error:r,normalize:!1}}};function na(e){var t,a,r,l=e.queryParams,o=void 0===l?{}:l,s=(0,Tt.A)("video-list"),c=function(e){var t=Mt.a.useBasicFetch(Gt.N.currentUser()),a=Mt.a.useBasicFetch(Bt.U.exchange()),n=Mt.a.useBasicFetch(Ht.L.config()),i=Mt.a.useBasicFetch(Zt.Z.ratings()),r=Mt.a.useBasicFetch(Bt.U.categories());return{queryParams:e,currentUser:t,exchange:a,config:n,ratings:i,categories:r,hasDataLoaded:t.hasCompleted&&a.hasCompleted&&n.hasCompleted&&i.hasCompleted&&r.hasCompleted}}(o),u=Dt.getBackendFilters(c),m=(r=u,Mt.a.useBasicFetch(r&&aa.tagsAndClassifications(r.queryParams.query,r.appliedIndices,r.backendFilters))),d=function(e){var t,a,n,i=e.queryParams,r=e.appliedIndices,l=e.backendFilters,o=(0,Wt.Z)(),s=Mt.a.useGetFetch(),c=Mt.a.useGetResponse(null===(t=u())||void 0===t?void 0:t.key);function u(t){return e.hasDataLoaded&&Bt.U.search(i.query,r,l,t)}function m(e){s(u(e))}var d=(0,zt.K)(u,m,(function(e,t){if(1===e)return(0,$t.r)(t);o.error(z.T.getPhrase(Qt,"error"))}),(function(e){return e.results}));return Object.assign(Object.assign({},d),{fetchNext:m,substituteQuery:null===(a=c.data)||void 0===a?void 0:a.substituteQuery,suggestions:null===(n=c.data)||void 0===n?void 0:n.suggestions})}(Object.assign(Object.assign({},u),c)),p=Dt.getFilters(c,m);(0,St.M)({title:null!==(t=o.query)&&void 0!==t?t:""});var g=c.hasDataLoaded&&p,y=d.hasFirstPageCompleted&&m.hasCompleted&&!!p,v=null===(a=d.items)||void 0===a?void 0:a.length;return g?n.createElement(n.Fragment,null,n.createElement(Ct.n,{query:o.query}),n.createElement(Et,{substitute:d.substituteQuery,queryParams:o,getAppLink:Dt.getAppLink}),!d.substituteQuery&&n.createElement(xt,{suggestions:null==d?void 0:d.suggestions,queryParams:o,getAppLink:Dt.getAppLink}),n.createElement(ht.J,{queryParams:o,mainFilters:null==p?void 0:p.mainFilters,moreFilters:null==p?void 0:p.moreFilters,analyticsOptions:{entity:i.py.SearchResults,location:i.LZ.SearchFilters},appLink:{application:jt.O.EXCHANGE,action:wt.e.Exchange.SEARCH},isFetchingOptions:m.isFetching}),y?n.createElement("section",null,v?n.createElement(Ot.M.Provider,{value:s},n.createElement(ft,{queryParams:o.query,results:d.items,setFavourite:function(){},canFavourite:function(){return!1},audiences:null,currentUser:c.currentUser.data,imageCdnUrl:c.config.data.imageCdnUrl,availablePresentations:null,showActions:!0,yearGroups:null,isPlugin:!1,companies:null,appLinks:{getSubTextAppLink:function(e){return Dt.getSeriesAppLink(e.series)},getCollectionActions:Dt.getCollectionActions,getSeriesAppLink:Dt.getSeriesAppLink,getVideoAppLink:Dt.getVideoAppLink,getClassificationAppLink:function(){return null},getClassificationAppLinkOptions:function(){return null},getPlaylistAppLink:function(){return null},getCompanyAppLink:function(){return null},getPreviewQuestionsAppLink:function(){return null}}})):n.createElement(Rt,{query:o.query}),d.hasMore&&n.createElement(Lt._,{isFetching:d.isFetching,fetchNext:d.fetchNext,nextCursor:d.nextCursor})):n.createElement("div",{className:"mx-n2"},n.createElement(At.S,null))):n.createElement(n.Fragment,null)}}}]);