1&&p>2&&(T>4?(o+="\n".concat(b,"...").concat(w),l=!0):T>3&&(o+="\n ".concat(d[p-2]),x++),o+="\n ".concat(d[p-1]),x++),a=p,i+="\n".concat(S,"-").concat(w," ").concat(d[p]),x++;else if(d.length1&&p>2&&(T>4?(o+="\n".concat(b,"...").concat(w),l=!0):T>3&&(o+="\n ".concat(u[p-2]),x++),o+="\n ".concat(u[p-1]),x++),a=p,o+="\n".concat(E,"+").concat(w," ").concat(u[p]),x++;else{var R=d[p],O=u[p],I=O!==R&&(!y(O,",")||O.slice(0,-1)!==R);I&&y(R,",")&&R.slice(0,-1)===O&&(I=!1,O+=","),I?(T>1&&p>2&&(T>4?(o+="\n".concat(b,"...").concat(w),l=!0):T>3&&(o+="\n ".concat(u[p-2]),x++),o+="\n ".concat(u[p-1]),x++),a=p,o+="\n".concat(E,"+").concat(w," ").concat(O),i+="\n".concat(S,"-").concat(w," ").concat(R),x+=2):(o+=i,i="",1!==T&&0!==p||(o+="\n ".concat(O),x++))}if(x>20&&p30)for(h[26]="".concat(b,"...").concat(w);h.length>27;)h.pop();t=1===h.length?d.call(this,"".concat(p," ").concat(h[0])):d.call(this,"".concat(p,"\n\n").concat(h.join("\n"),"\n"))}else{var f=C(a),g="",x=_[i];"notDeepEqual"===i||"notEqual"===i?(f="".concat(_[i],"\n\n").concat(f)).length>1024&&(f="".concat(f.slice(0,1021),"...")):(g="".concat(C(s)),f.length>512&&(f="".concat(f.slice(0,509),"...")),g.length>512&&(g="".concat(g.slice(0,509),"...")),"deepEqual"===i||"equal"===i?f="".concat(x,"\n\n").concat(f,"\n\nshould equal\n\n"):g=" ".concat(i," ").concat(g)),t=d.call(this,"".concat(f).concat(g))}return Error.stackTraceLimit=u,t.generatedMessage=!n,Object.defineProperty(c(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=a,t.expected=s,t.operator=i,Error.captureStackTrace&&Error.captureStackTrace(c(t),o),t.stack,t.name="AssertionError",l(t)}return s=P,(u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return g(this,o(o({},t),{},{customInspect:!1,depth:0}))}}])&&a(s.prototype,u),Object.defineProperty(s,"prototype",{writable:!1}),P}(u(Error),g.custom);e.exports=P},2818:function(e,t,n){"use strict";n.d(t,{OQ:function(){return u},n1:function(){return l},uW:function(){return c}});var r=n(8790),i=n(1838),o=n(8974);const a=["hls","h265","vp9","h264","vp8","mp4","theora"];function s(e,t){let n=null,r=document.createElement("video");if(r.canPlayType)try{switch(e){case"hls":case"mp4":n=!0;break;case"h265":n="probably"===r.canPlayType('video/mp4; codecs="hvc1.1.L0.0"')||"probably"===r.canPlayType('video/mp4; codecs="hev1.1.L0.0"');break;case"h264":n="probably"===r.canPlayType('video/mp4; codecs="avc1.42E01E"')||"probably"===r.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');break;case"vp9":n="probably"===r.canPlayType('video/webm; codecs="vp9"');break;case"vp8":n="probably"===r.canPlayType('video/webm; codecs="vp8, vorbis"');break;case"theora":n="probably"===r.canPlayType('video/ogg; codecs="theora"')}if(t=(t instanceof Boolean||0===t||1==t)&&t){if("no"===r.canPlayType("video/nonsense")&&o.warn('BUGGY: Codec detection bug in Firefox 3.5.0 - 3.5.1 and Safari 4.0.0 - 4.0.4 that answer "no" to unknown codecs instead of an empty string'),"probably"===r.canPlayType("video/webm")&&o.warn('BUGGY: Codec detection bug that Firefox 27 and earlier always says "probably" when asked about WebM, even when the codecs string is not present'),"maybe"===r.canPlayType('video/mp4; codecs="avc1.42E01E"'))switch(r.canPlayType("video/mp4")){case"probably":o.warn('BUGGY: Codec detection bug in iOS 4.1 and earlier that switches "maybe" and "probably" around');break;case"maybe":o.warn('BUGGY: Codec detection bug in Android where no better answer than "maybe" is given')}"probably"===r.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"')&&"probably"!==r.canPlayType('video/mp4; codecs="avc1.42E01E"')&&o.warn("BUGGY: Codec detection bug in Internet Explorer 9 that requires both audio and video codec on test")}}catch(e){o.warn(e)}return n}function l(e){let t=[],n={},r=document.createElement("video");return r.canPlayType&&(n.hls=!0,t.push("hls"),(r.canPlayType('video/mp4; codecs="hvc1.1.L0.0"')||"probably"===r.canPlayType('video/mp4; codecs="hev1.1.L0.0"'))&&(n.h265=!0,t.push("h265")),"probably"===r.canPlayType('video/mp4; codecs="avc1.42E01E"')&&(n.h264=!0,t.push("h264")),"probably"===r.canPlayType('video/webm; codecs="vp9"')&&(n.vp9=!0,t.push("vp9")),e&&("probably"===r.canPlayType('video/webm; codecs="vp8, vorbis"')&&(n.vp8=!0,t.push("vp8")),"probably"===r.canPlayType('video/ogg; codecs="theora"')&&(n.theora=!0,t.push("theora"))),"probably"===r.canPlayType('video/mp4; codecs="mp4v.20.8"')&&(n.mp4=!0,t.push("mp4"))),{order:t,support:n}}function c(e,t,n){const c={};let u,d,p;n=void 0===n?l():n;const h={hls:["m3u8"],h265:["mp4","webm"],h264:["mp4","webm"],vp9:["mp4","webm"],vp8:["mp4","webm"],theora:["ogg"],mp4:["mp4"]};for(u in t)t.hasOwnProperty(u)&&(d=null,"master_file"===u?d="Auto":(d=u.split("_playlist"),d=2===d.length?d[0]:null),null!==d&&(c[d]=void 0===c[d]?{format:[],url:[]}:c[d],c[d].format.push("hls"),c[d].url.push((0,i.formatInnerLink)(t[u],r.SiteContext._currentValue.url))));for(d in e)if(e.hasOwnProperty(d)&&Object.keys(e[d]).length&&(1080>=parseInt(d,10)||1080=parseInt(r[r.length-1],10))return r[r.length-1];if(parseInt(e,10)<=parseInt(r[0],10))return r[0];for(n=r.length-1;n>=0;){if(parseInt(e,10)>=parseInt(r[n],10))return r[n+1];n-=1}}},2828:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(9471);const i=e=>{let{type:t}=e;return t?r.createElement("i",{className:"material-icons","data-icon":t}):null}},2855:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MediaListWrapper=void 0;var i=r(n(9471)),o=n(6190);n(2101),t.MediaListWrapper=function(e){var t=e.title,n=e.viewAllLink,r=e.viewAllText,a=e.className,s=e.style,l=e.children;return i.default.createElement("div",{className:(a?a+" ":"")+"media-list-wrapper",style:s},i.default.createElement(o.MediaListRow,{title:t,viewAllLink:n,viewAllText:r},l||null))}},2901:function(e,t,n){"use strict";n.d(t,{AP:function(){return a},cp:function(){return o}});var r=n(9471);const i=r.forwardRef(((e,t)=>void 0!==e.children?r.createElement("div",{ref:t,className:"popup"+(void 0!==e.className?" "+e.className:""),style:e.style},e.children):null));function o(e){return void 0!==e.children?r.createElement("div",{className:"popup-top"+(void 0!==e.className?" "+e.className:""),style:e.style},e.children):null}function a(e){return void 0!==e.children?r.createElement("div",{className:"popup-main"+(void 0!==e.className?" "+e.className:""),style:e.style},e.children):null}t.Ay=i},2907:function(e,t,n){"use strict";n.r(t),n.d(t,{useItemListInlineSlider:function(){return l}});var r=n(9471),i=n(1838),o=n(7664),a=n(5289),s=n(4876);function l(e){const t=(0,r.useRef)(null),n=(0,r.useRef)(null),[l,c,u,d,p,h,f]=(0,s.useItemList)(e,t),[m,g]=(0,r.useState)(null),[v,y]=(0,r.useState)(!1),[b,E]=(0,r.useState)(!1),[S,w]=(0,r.useState)(null),[_,k]=(0,r.useState)(null);let C=null,P=null,x=!0,A={list:"items-list",listOuter:"items-list-outer list-inline list-slider"+(e.className?" "+e.className:"")};function M(){m.updateDataStateOnResize(l.length,u.loadedAllItems()),m.scrollToCurrentSlide(),(0,i.removeClassname)(n.current,"resizing"),C=null}function T(){m.nextSlide(),I(),!u.loadedAllItems()&&m.loadMoreItems()?(x=!0,u.loadItems(m.itemsFit())):m.scrollToCurrentSlide()}function R(){m.previousSlide(),I(),m.scrollToCurrentSlide()}function O(e){null!==m?(m.updateDataState(l.length,u.loadedAllItems(),!e),!u.loadedAllItems()&&m.loadItemsToFit()?u.loadItems(m.itemsFit()):(I(),x&&(x=!1,m.scrollToCurrentSlide()))):n.current&&g(new a.A(n.current,".item"))}function I(){m&&(y(m.hasNextSlide()),E(m.hasPreviousSlide()))}return(0,r.useEffect)((()=>{f(),O(!0)}),[l]),(0,r.useEffect)((()=>{O(!0)}),[m]),(0,r.useEffect)((()=>{null!==m?(clearTimeout(C),(0,i.addClassname)(n.current,"resizing"),m.updateDataStateOnResize(l.length,u.loadedAllItems()),m.scrollToCurrentSlide(),C=setTimeout(M,200)):O(!1)}),[S]),(0,r.useEffect)((()=>{clearTimeout(P),P=setTimeout((function(){I(),P=setTimeout((function(){P=null,O()}),50)}),150)}),[_]),[l,c,u,A,d,h,p,function(){w(new Date)},function(){k(new Date)},n,t,function(){return b?r.createElement("span",{className:"previous-slide"},r.createElement(o.CircleIconButton,{buttonShadow:!0,onClick:R},r.createElement("i",{className:"material-icons"},"keyboard_arrow_left"))):null},function(){return v?r.createElement("span",{className:"next-slide"},r.createElement(o.CircleIconButton,{buttonShadow:!0,onClick:T},r.createElement("i",{className:"material-icons"},"keyboard_arrow_right"))):null}]}},2954:function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o,a,s=[],l=!0,c=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(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 i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function I(e){return Object.keys(e).filter(O).concat(u(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function D(e,t){if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i{let{children:t}=e;return r.createElement(a.LayoutProvider,null,r.createElement(o.ThemeProvider,null,r.createElement(s.UserProvider,null,t)))};function u(e,t){const n=document.getElementById("app-header"),u=document.getElementById("app-sidebar"),d=e?document.getElementById(e):void 0;d&&t?i.render(r.createElement(c,null,n?i.createPortal(r.createElement(l.PageHeader,null),n):null,u?i.createPortal(r.createElement(l.PageSidebar,null),u):null,r.createElement(t,null)),d):n&&u?i.render(r.createElement(c,null,i.createPortal(r.createElement(l.PageHeader,null),n),r.createElement(l.PageSidebar,null)),u):n?i.render(r.createElement(a.LayoutProvider,null,r.createElement(o.ThemeProvider,null,r.createElement(s.UserProvider,null,r.createElement(l.PageHeader,null)))),u):u&&i.render(r.createElement(c,null,r.createElement(l.PageSidebar,null)),u),document.body.classList.contains("js-loading")&&document.body.classList.remove("js-loading")}function d(e,t){const n=e?document.getElementById(e):void 0;n&&t&&i.render(r.createElement(t,null),n),document.body.classList.contains("js-loading")&&document.body.classList.remove("js-loading")}},3063:function(e,t,n){"use strict";e.exports=n(1095)},3095:function(e){"use strict";e.exports=Object},3114:function(e,t,n){"use strict";e.exports=n(6881)},3129:function(e,t,n){"use strict";var r,i=n(7118),o=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(n(9471)),a=function(){return o.createElement(i.Icon,{size:16},o.createElement("path",{d:"M11.5,5.5v-2C11.5,2.672,12.172,2,13,2s1.5,0.672,1.5,1.5v2 M14.5,11.5v-6C14.5,4.672,15.172,4,16,4\n c0.828,0,1.5,0.672,1.5,1.5v3 M17.5,13V8.5C17.5,7.672,18.172,7,19,7s1.5,0.672,1.5,1.5v10c0,2.761-2.239,5-5,5h-3.335\n c-1.712-0.001-3.305-0.876-4.223-2.321C6.22,18.467,4.083,14,4.083,14c-0.378-0.545-0.242-1.292,0.303-1.67\n c0.446-0.309,1.044-0.281,1.458,0.07L8.5,15.5v-10C8.5,4.672,9.172,4,10,4s1.5,0.672,1.5,1.5v6"}))},s=function(){return s=Object.assign||function(e){for(var t,n=1,r=arguments.length;n(0,r.useContext)(i.LayoutContext)},3289:function(e){"use strict";e.exports=Math.min},3337:function(e,t,n){"use strict";n.r(t),n.d(t,{UpNextLoaderView:function(){return i}});var r=n(1838);function i(e){var t,n=function(){window.location.href=e.url},i=function(){(0,r.removeClassname)(this.vjsPlayerElem,"vjs-mediacms-up-next-hidden")}.bind(this),o=function(){this.cancelTimer(),(0,r.addClassname)(this.vjsPlayerElem,"vjs-mediacms-up-next-hidden")}.bind(this),a={nextMediaPoster:document.createElement("div"),wrapper:document.createElement("div"),inner:document.createElement("div"),innerContent:document.createElement("div"),upNextLabel:document.createElement("div"),nextMediaTitle:document.createElement("div"),nextMediaAuthor:document.createElement("div"),cancelNext:document.createElement("div"),cancelNextButton:document.createElement("button"),goNext:document.createElement("div")};a.nextMediaPoster.setAttribute("class","next-media-poster"),a.wrapper.setAttribute("class","up-next-loader"),a.inner.setAttribute("class","up-next-loader-inner"),a.goNext.setAttribute("class","go-next"),a.cancelNext.setAttribute("class","up-next-cancel"),a.upNextLabel.setAttribute("class","up-next-label"),a.nextMediaTitle.setAttribute("class","next-media-title"),a.nextMediaAuthor.setAttribute("class","next-media-author"),a.upNextLabel.innerHTML=(0,r.translateString)("Up Next"),a.nextMediaTitle.innerHTML=e.title,a.nextMediaAuthor.innerHTML=e.author_name,a.goNext.innerHTML='skip_next',a.cancelNextButton.innerHTML="CANCEL",a.cancelNextButton.addEventListener("click",o),a.nextMediaPoster.style.backgroundImage="url('"+e.thumbnail_url+"')",a.cancelNext.appendChild(a.cancelNextButton),a.innerContent.appendChild(a.upNextLabel),a.innerContent.appendChild(a.nextMediaTitle),a.innerContent.appendChild(a.nextMediaAuthor),a.innerContent.appendChild(a.goNext),a.innerContent.appendChild(a.cancelNext),a.inner.appendChild(a.innerContent),a.wrapper.appendChild(a.nextMediaPoster),a.wrapper.appendChild(a.inner);var s=!1;function l(){var e=this.vjsPlayerElem.getBoundingClientRect();window.pageYOffset||document.documentElement.scrollTop,0>=this.vjsPlayerElem.offsetHeight-56+e.top?(s||this.cancelTimer(!0),s=!0):(s&&this.startTimer(),s=!1)}l=l.bind(this),this.vjsPlayerElem=null,this.html=function(){return a.wrapper},this.startTimer=function(){i(),t=setTimeout(n,1e4),this.vjsPlayerElem&&(0,r.removeClassname)(this.vjsPlayerElem,"vjs-mediacms-canceled-next"),window.addEventListener("scroll",l)},this.cancelTimer=function(e){(e=!!e)||window.removeEventListener("scroll",l),clearTimeout(t),t=null,this.vjsPlayerElem&&(0,r.addClassname)(this.vjsPlayerElem,"vjs-mediacms-canceled-next")},this.setVideoJsPlayerElem=function(e){e&&(this.vjsPlayerElem=e,(0,r.addClassname)(this.vjsPlayerElem,"vjs-mediacms-has-up-next-view"))},this.showTimerView=function(e){(e=!!e)?this.startTimer():i()},this.hideTimerView=function(){o()}}},3354:function(e,t,n){"use strict";var r=n(5935),i=n(2756),o=n(1474),a=n(1723),s=n(2365),l=i(a(),Object);r(l,{getPolyfill:a,implementation:o,shim:s}),e.exports=l},3369:function(e,t,n){"use strict";var r=n(7118),i=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(n(9471)),o=function(){return i.createElement(r.Icon,{size:16},i.createElement("path",{d:"M0.541,5.627L11.666,18.2c0.183,0.207,0.499,0.226,0.706,0.043c0.015-0.014,0.03-0.028,0.043-0.043\n L23.541,5.627"}))},a=function(){return i.createElement(r.Icon,{size:16},i.createElement("path",{d:"M23.535,18.373L12.409,5.8c-0.183-0.207-0.499-0.226-0.706-0.043C11.688,5.77,11.674,5.785,11.66,5.8\n L0.535,18.373"}))},s=function(){return i.createElement(r.Icon,{ignoreDirection:!0,size:16},i.createElement("path",{d:"M10.5,0.5c5.523,0,10,4.477,10,10s-4.477,10-10,10s-10-4.477-10-10S4.977,0.5,10.5,0.5z\n M23.5,23.5\n l-5.929-5.929"}))},l=function(){return l=Object.assign||function(e){for(var t,n=1,r=arguments.length;nt.top?1:e.leftt.left?1:0},m=function(e){var t=e.numPages,n=e.pageIndex,o=e.renderHighlights,a=e.store,s=e.onHighlightKeyword,l=i.useRef(),p=i.useCallback((function(e){return i.createElement(i.Fragment,null,e.highlightAreas.map((function(e,t){return i.createElement(d,{index:t,key:t,area:e,onHighlightKeyword:s})})))}),[]),m=o||p,g=i.useState(a.get("matchPosition")),v=g[0],y=g[1],b=i.useState(a.get("keyword")||[c]),E=b[0],S=b[1],w=i.useState({pageIndex:n,scale:1,status:r.LayerRenderStatus.PreRender}),_=w[0],k=w[1],C=i.useRef(null),P=i.useRef([]),x=i.useState([]),A=x[0],M=x[1],T=function(){return!0},R=i.useCallback((function(){return a.get("targetPageFilter")||T}),[a.get("targetPageFilter")]),O=function(e){e&&e.length>0&&S(e)},I=function(e){return y(e)},D=function(e){if(e.has(n)){var t=e.get(n);t&&k({ele:t.ele,pageIndex:n,scale:t.scale,status:t.status})}},L=function(){return 0===E.length||1===E.length&&""===E[0].keyword.trim()};return i.useEffect((function(){if(!L()&&_.status===r.LayerRenderStatus.DidRender&&!P.current.length){var e=_.ele,t=[].slice.call(e.querySelectorAll(".rpv-core__text-layer-text")).map((function(e){return e.textContent})).reduce((function(e,t,n){return e.concat(t.split("").map((function(e,t){return{char:e,charIndexInSpan:t,spanIndex:n}})))}),[{char:"",charIndexInSpan:0,spanIndex:0}]).slice(1);P.current=t}}),[E,_.status]),i.useEffect((function(){if(!L()&&_.ele&&_.status===r.LayerRenderStatus.DidRender&&R()({pageIndex:n,numPages:t})){var e=function(e){var r=P.current;if(0===r.length)return[];var i=[],o=[].slice.call(e.querySelectorAll(".rpv-core__text-layer-text")),a=r.map((function(e){return e.char})).join("");return E.forEach((function(s){var l=s.keyword;if(l.trim()){for(var c,u=-1===s.regExp.flags.indexOf("g")?new RegExp(s.regExp,"".concat(s.regExp.flags,"g")):s.regExp,d=[];null!==(c=u.exec(a));)d.push({keyword:u,startIndex:c.index,endIndex:u.lastIndex});d.map((function(e){return{keyword:e.keyword,indexes:r.slice(e.startIndex,e.endIndex)}})).forEach((function(r){var a=r.indexes.reduce((function(e,t){return e[t.spanIndex]=(e[t.spanIndex]||[]).concat([t]),e}),{});Object.values(a).forEach((function(a){if(1!==a.length||""!==a[0].char.trim()){var c=s.wholeWords?a.slice(1,-1):a,u=function(e,r,i,o,a){var s=document.createRange(),l=o.firstChild;if(!l||l.nodeType!==Node.TEXT_NODE)return null;var c=l.textContent.length,u=a[0].charIndexInSpan,d=1===a.length?u:a[a.length-1].charIndexInSpan;if(u>c||d+1>c)return null;s.setStart(l,u),s.setEnd(l,d+1);var p=document.createElement("span");s.surroundContents(p);var f=p.getBoundingClientRect(),m=i.getBoundingClientRect(),g=m.height,v=m.width,y=100*(f.left-m.left)/v,b=100*(f.top-m.top)/g,E=100*f.height/g,S=100*f.width/v;return h(p),{keyword:r,keywordStr:e,numPages:t,pageIndex:n,left:y,top:b,height:E,width:S,pageHeight:g,pageWidth:v}}(l,r.keyword,e,o[c[0].spanIndex],c);u&&i.push(u)}}))}))}})),i.sort(f)}(_.ele);M(e)}}),[E,v,_.status,P.current]),i.useEffect((function(){L()&&_.ele&&_.status===r.LayerRenderStatus.DidRender&&M([])}),[E,_.status]),i.useEffect((function(){if(0!==A.length){var e=l.current;if(v.pageIndex===n&&e&&_.status===r.LayerRenderStatus.DidRender){var t=e.querySelector('.rpv-search__highlight[data-index="'.concat(v.matchIndex,'"]'));if(t){var i=function(e,t){for(var n=e.offsetTop,r=e.offsetLeft,i=e.parentElement;i&&i!==t;)n+=i.offsetTop,r+=i.offsetLeft,i=i.parentElement;return{left:r,top:n}}(t,e),o=i.left,s=i.top,c=a.get("jumpToDestination");c&&(c({pageIndex:n,bottomOffset:(e.getBoundingClientRect().height-s)/_.scale,leftOffset:o/_.scale,scaleTo:_.scale}),C.current&&C.current.classList.remove("rpv-search__highlight--current"),C.current=t,t.classList.add("rpv-search__highlight--current"))}}}}),[A,v]),i.useEffect((function(){return a.subscribe("keyword",O),a.subscribe("matchPosition",I),a.subscribe("renderStatus",D),function(){a.unsubscribe("keyword",O),a.unsubscribe("matchPosition",I),a.unsubscribe("renderStatus",D)}}),[]),i.createElement("div",{className:"rpv-search__highlights","data-testid":"search__highlights-".concat(n),ref:l},m({getCssProperties:u,highlightAreas:A}))},g=function(e){var t,n=e.wholeWords?" ".concat(e.keyword," "):e.keyword,r=e.matchCase?"g":"gi";return{keyword:e.keyword,regExp:new RegExp((t=n,t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r),wholeWords:e.wholeWords||!1}},v=function(e,t,n){return e instanceof RegExp?{keyword:e.source,regExp:e,wholeWords:n||!1}:"string"==typeof e?""===e?c:g({keyword:e,matchCase:t||!1,wholeWords:n||!1}):(void 0!==t&&(e.matchCase=t),void 0!==n&&(e.wholeWords=n),g(e))},y=function(e){var t,n=e.get("initialKeyword"),o=i.useMemo((function(){if(n&&1===n.length){var e=v(n[0]);return{matchCase:-1===e.regExp.flags.indexOf("i"),wholeWords:e.wholeWords}}return{matchCase:!1,wholeWords:!1}}),[]),a=function(e){var t=i.useRef(e.get("doc")),n=function(e){t.current=e};return i.useEffect((function(){return e.subscribe("doc",n),function(){e.unsubscribe("doc",n)}}),[]),t}(e),s=i.useState(n),l=s[0],u=s[1],d=i.useState([]),p=d[0],h=d[1],f=i.useState(0),m=f[0],g=f[1],y=i.useState(o.matchCase),b=y[0],E=y[1],S=i.useRef([]),w=i.useState(o.wholeWords),_=w[0],k=w[1],C=function(){return!0},P=i.useCallback((function(){return e.get("targetPageFilter")||C}),[e.get("targetPageFilter")]),x=function(e){var t=p.length;if(0===l.length||0===t)return null;var n=e===t+1?1:Math.max(1,Math.min(t,e));return g(n),M(p[n-1])},A=function(e){return u(""===e?[]:[e])},M=function(t){var n=e.get("jumpToPage");return n&&n(t.pageIndex),e.update("matchPosition",{matchIndex:t.matchIndex,pageIndex:t.pageIndex}),t},T=function(t,n,i){var o=a.current;if(!o)return Promise.resolve([]);var s=o.numPages,l=t.map((function(e){return v(e,n,i)}));return e.update("keyword",l),g(0),h([]),new Promise((function(e,t){var n=0===S.current.length?function(){var e=a.current;if(!e)return Promise.resolve([]);var t=Array(e.numPages).fill(0).map((function(t,n){return r.getPage(e,n).then((function(e){return e.getTextContent()})).then((function(e){var t=e.items.map((function(e){return e.str||""})).join("");return Promise.resolve({pageContent:t,pageIndex:n})}))}));return Promise.all(t).then((function(e){return e.sort((function(e,t){return e.pageIndex-t.pageIndex})),Promise.resolve(e.map((function(e){return e.pageContent})))}))}().then((function(e){return S.current=e,Promise.resolve(e)})):Promise.resolve(S.current);n.then((function(t){var n=[];t.forEach((function(e,t){P()({pageIndex:t,numPages:s})&&l.forEach((function(r){for(var i,o=0;null!==(i=r.regExp.exec(e));)n.push({keyword:r.regExp,matchIndex:o,pageIndex:t,pageText:e,startIndex:i.index,endIndex:r.regExp.lastIndex}),o++}))})),h(n),n.length>0&&(g(1),M(n[0])),e(n)}))}))};return i.useEffect((function(){S.current=[]}),[a.current]),{clearKeyword:function(){e.update("keyword",[c]),A(""),g(0),h([]),E(!1),k(!1)},changeMatchCase:function(e){E(e),l.length>0&&T(l,e,_)},changeWholeWords:function(e){k(e),l.length>0&&T(l,b,e)},currentMatch:m,jumpToMatch:x,jumpToNextMatch:function(){return x(m+1)},jumpToPreviousMatch:function(){return x(m-1)},keywords:l,matchCase:b,numberOfMatches:p.length,wholeWords:_,search:function(){return T(l,b,_)},searchFor:T,setKeywords:u,keyword:0===l.length?"":(t=l[0],t instanceof RegExp?t.source:"string"==typeof t?t:t.keyword),setKeyword:A,setTargetPages:function(t){e.update("targetPageFilter",t)}}},b=function(e){var t=e.children,n=e.store,r=y(n),o=i.useState(!1),a=o[0],s=o[1],c=function(e){return s(!0)};return i.useEffect((function(){return n.subscribe("doc",c),function(){n.unsubscribe("doc",c)}}),[]),t(l(l({},r),{isDocumentLoaded:a}))},E=function(e){var t=e.containerRef,n=e.store,o=i.useRef(!1),a=function(){o.current=!0},s=function(){o.current=!1},l=function(e){var i=t.current;i&&(e.shiftKey||e.altKey||"f"!==e.key||(r.isMac()?e.metaKey&&!e.ctrlKey:e.ctrlKey)&&(o.current||document.activeElement&&i.contains(document.activeElement))&&(e.preventDefault(),n.update("areShortcutsPressed",!0)))};return i.useEffect((function(){var e=t.current;if(e)return document.addEventListener("keydown",l),e.addEventListener("mouseenter",a),e.addEventListener("mouseleave",s),function(){document.removeEventListener("keydown",l),e.removeEventListener("mouseenter",a),e.removeEventListener("mouseleave",s)}}),[t.current]),i.createElement(i.Fragment,null)},S={left:0,top:8},w=function(e){var t=e.store,n=e.onToggle,s=i.useContext(r.LocalizationContext).l10n,l=i.useContext(r.ThemeContext).direction,c=i.useState(!1),u=c[0],d=c[1],p=i.useState(!1),h=p[0],f=p[1],m=l===r.TextDirection.RightToLeft,g=y(t),v=g.clearKeyword,b=g.changeMatchCase,E=g.changeWholeWords,w=g.currentMatch,_=g.jumpToNextMatch,k=g.jumpToPreviousMatch,C=g.keyword,P=g.matchCase,x=g.numberOfMatches,A=g.wholeWords,M=g.search,T=g.setKeyword,R=function(e){d(!0),M().then((function(t){d(!1),f(!0),e&&e()}))};i.useEffect((function(){var e=t.get("initialKeyword");e&&1===e.length&&C&&R((function(){t.update("initialKeyword",[])}))}),[]);var O=s&&s.search?s.search.enterToSearch:"Enter to search",I=s&&s.search?s.search.previousMatch:"Previous match",D=s&&s.search?s.search.nextMatch:"Next match",L=s&&s.search?s.search.close:"Close";return i.createElement("div",{className:"rpv-search__popover"},i.createElement("div",{className:"rpv-search__popover-input-counter"},i.createElement(r.TextBox,{ariaLabel:O,autoFocus:!0,placeholder:O,type:"text",value:C,onChange:function(e){f(!1),T(e)},onKeyDown:function(e){"Enter"===e.key&&C&&(h?_():R())}}),i.createElement("div",{className:r.classNames({"rpv-search__popover-counter":!0,"rpv-search__popover-counter--ltr":!m,"rpv-search__popover-counter--rtl":m})},u&&i.createElement(r.Spinner,{testId:"search__popover-searching",size:"1rem"}),!u&&i.createElement("span",{"data-testid":"search__popover-num-matches"},w,"/",x))),i.createElement("label",{className:"rpv-search__popover-label"},i.createElement("input",{className:"rpv-search__popover-label-checkbox","data-testid":"search__popover-match-case",checked:P,type:"checkbox",onChange:function(e){f(!1),b(e.target.checked)}})," ",s&&s.search?s.search.matchCase:"Match case"),i.createElement("label",{className:"rpv-search__popover-label"},i.createElement("input",{className:"rpv-search__popover-label-checkbox",checked:A,"data-testid":"search__popover-whole-words",type:"checkbox",onChange:function(e){f(!1),E(e.target.checked)}})," ",s&&s.search?s.search.wholeWords:"Whole words"),i.createElement("div",{className:"rpv-search__popover-footer"},i.createElement("div",{className:"rpv-search__popover-footer-item"},i.createElement(r.Tooltip,{ariaControlsSuffix:"search-previous-match",position:m?r.Position.BottomRight:r.Position.BottomCenter,target:i.createElement(r.MinimalButton,{ariaLabel:I,isDisabled:w<=1,onClick:k},i.createElement(a,null)),content:function(){return I},offset:S})),i.createElement("div",{className:"rpv-search__popover-footer-item"},i.createElement(r.Tooltip,{ariaControlsSuffix:"search-next-match",position:r.Position.BottomCenter,target:i.createElement(r.MinimalButton,{ariaLabel:D,isDisabled:w>x-1,onClick:_},i.createElement(o,null)),content:function(){return D},offset:S})),i.createElement("div",{className:r.classNames({"rpv-search__popover-footer-button":!0,"rpv-search__popover-footer-button--ltr":!m,"rpv-search__popover-footer-button--rtl":m})},i.createElement(r.Button,{onClick:function(){n(),v()}},L))))},_=function(e){var t=e.children,n=e.onClick,o=i.useContext(r.LocalizationContext).l10n,a=o&&o.search?o.search.search:"Search";return t({icon:i.createElement(s,null),label:a,onClick:n})},k={left:0,top:8},C=function(e){var t=e.enableShortcuts,n=e.store,o=e.onClick,a=t?r.isMac()?"Meta+F":"Ctrl+F":"",s=function(e){e&&o()};return i.useEffect((function(){return n.subscribe("areShortcutsPressed",s),function(){n.unsubscribe("areShortcutsPressed",s)}}),[]),i.createElement(_,{onClick:o},(function(e){return i.createElement(r.Tooltip,{ariaControlsSuffix:"search-popover",position:r.Position.BottomCenter,target:i.createElement(r.MinimalButton,{ariaKeyShortcuts:a,ariaLabel:e.label,testId:"search__popover-button",onClick:o},e.icon),content:function(){return e.label},offset:k})}))},P={left:0,top:8},x=function(e){var t=e.children,n=e.enableShortcuts,o=e.store,a=i.useContext(r.ThemeContext).direction===r.TextDirection.RightToLeft?r.Position.BottomRight:r.Position.BottomLeft,s=t||function(e){return i.createElement(C,l({enableShortcuts:n,store:o},e))};return i.createElement(r.Popover,{ariaControlsSuffix:"search",lockScroll:!1,position:a,target:function(e){return s({onClick:e})},content:function(e){return i.createElement(w,{store:o,onToggle:e})},offset:P,closeOnClickOutside:!1,closeOnEscape:!0})},A=function(e){return Array.isArray(e)?e.map((function(e){return v(e)})):[v(e)]};t.NextIcon=o,t.PreviousIcon=a,t.SearchIcon=s,t.searchPlugin=function(e){var t=i.useMemo((function(){return Object.assign({},{enableShortcuts:!0,onHighlightKeyword:function(){}},e)}),[]),n=i.useMemo((function(){return r.createStore({initialKeyword:e&&e.keyword?Array.isArray(e.keyword)?e.keyword:[e.keyword]:[],keyword:e&&e.keyword?A(e.keyword):[c],matchPosition:{matchIndex:-1,pageIndex:-1},renderStatus:new Map})}),[]),o=y(n),a=o.clearKeyword,s=o.jumpToMatch,u=o.jumpToNextMatch,d=o.jumpToPreviousMatch,p=o.searchFor,h=o.setKeywords,f=o.setTargetPages,g=function(e){return i.createElement(x,l({enableShortcuts:t.enableShortcuts},e,{store:n}))};return{install:function(t){var r=e&&e.keyword?Array.isArray(e.keyword)?e.keyword:[e.keyword]:[],i=e&&e.keyword?A(e.keyword):[c];n.update("initialKeyword",r),n.update("jumpToDestination",t.jumpToDestination),n.update("jumpToPage",t.jumpToPage),n.update("keyword",i)},renderPageLayer:function(r){return i.createElement(m,{key:r.pageIndex,numPages:r.doc.numPages,pageIndex:r.pageIndex,renderHighlights:null==e?void 0:e.renderHighlights,store:n,onHighlightKeyword:t.onHighlightKeyword})},renderViewer:function(e){var r=e.slot;return r.subSlot&&(r.subSlot.children=i.createElement(i.Fragment,null,t.enableShortcuts&&i.createElement(E,{containerRef:e.containerRef,store:n}),r.subSlot.children)),r},uninstall:function(e){var t=n.get("renderStatus");t&&t.clear()},onDocumentLoad:function(e){n.update("doc",e.doc)},onTextLayerRender:function(e){var t=n.get("renderStatus");t&&(t=t.set(e.pageIndex,e),n.update("renderStatus",t))},Search:function(e){return i.createElement(b,l({},e,{store:n}))},ShowSearchPopover:g,ShowSearchPopoverButton:function(){return i.createElement(g,null,(function(e){return i.createElement(C,l({enableShortcuts:t.enableShortcuts,store:n},e))}))},clearHighlights:function(){a()},highlight:function(e){var t=Array.isArray(e)?e:[e];return h(t),p(t)},jumpToMatch:s,jumpToNextMatch:u,jumpToPreviousMatch:d,setTargetPages:f}}},3496:function(e,t,n){"use strict";n.r(t),n.d(t,{MemberConsumer:function(){return a},MemberContext:function(){return o}});var r=n(9471),i=n(3997);const o=(0,r.createContext)((0,i.$)(window.MediaCMS).member),a=o.Consumer},3534:function(e,t,n){"use strict";var r=n(9383),i=60103,o=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,s=60110,l=60112;t.Suspense=60113;var c=60115,u=60116;if("function"==typeof Symbol&&Symbol.for){var d=Symbol.for;i=d("react.element"),o=d("react.portal"),t.Fragment=d("react.fragment"),t.StrictMode=d("react.strict_mode"),t.Profiler=d("react.profiler"),a=d("react.provider"),s=d("react.context"),l=d("react.forward_ref"),t.Suspense=d("react.suspense"),c=d("react.memo"),u=d("react.lazy")}var p="function"==typeof Symbol&&Symbol.iterator;function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i1?n-1:0),i=1;i(0,r.useContext)(i.ThemeContext)},3640:function(e,t,n){"use strict";var r=n(6035),i=n.n(r);if(201==n.j)var o=n(419);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t(s.MediaPageStore.on("playlist_creation_completed",v),s.MediaPageStore.on("playlist_creation_failed",y),n.current.focus(),()=>{s.MediaPageStore.removeListener("playlist_creation_completed",v),s.MediaPageStore.removeListener("playlist_creation_failed",y)})),[]),r.createElement("div",{className:"playlist-form-wrap"},r.createElement("div",{className:"playlist-form-field playlist-title",ref:t},r.createElement("span",{className:"playlist-form-label"},"Title"),r.createElement("input",{ref:n,type:"text",placeholder:"Enter playlist title...",value:d,onChange:function(){p(n.current.value)},onFocus:function(){(0,l.addClassname)(t.current,"focused")},onBlur:function(){(0,l.removeClassname)(t.current,"focused")},onClick:function(){(0,l.removeClassname)(t.current,"invalid")}})),r.createElement("div",{className:"playlist-form-field playlist-description",ref:i},r.createElement("span",{className:"playlist-form-label"},"Description"),r.createElement("textarea",{ref:o,rows:"1",placeholder:"Enter playlist description...",value:h,onChange:function(){o.current.style.height="";const e=o.current.scrollHeight-2,t=0{o(function(e,t,n){if(void 0!==e){let r=null;return r=void 0!==t&&t>e?t:e,r=void 0!==n&&n=0&&"[object Array]"!==i(e)&&"callee"in e&&"[object Function]"===i(e.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=a,e.exports=s?o:a},3973:function(e,t,n){"use strict";var r=n(7118),i=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(n(9471)),o=function(){return i.createElement(r.Icon,{size:16},i.createElement("path",{d:"M18.5,7.5c.275,0,.341-.159.146-.354L12.354.854a.5.5,0,0,0-.708,0L5.354,7.147c-.2.195-.129.354.146.354h3v10a1,1,0,0,0,1,1h5a1,1,0,0,0,1-1V7.5Z"}),i.createElement("path",{d:"M23.5,18.5v4a1,1,0,0,1-1,1H1.5a1,1,0,0,1-1-1v-4"}))},a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;ni[this.id].minutes?"0":"")+i[this.id].minutes+":"+i[this.id].fn.infoToString(i[this.id].seconds)),i[this.id].toString}ariaLabel(){if(void 0===i[this.id].ariaLabel){let e=[];0=s[i]&&i(0==(i*=2)?9:1)&&(i+=1),t(e,i,r)[n].replace("%s",e.toString())}(r,function(e){return o[e]||o.en_US}(t))};a("en_US",(function(e,t){if(0===t)return["just now","right now"];var n=r[Math.floor(t/2)];return e>1&&(n+="s"),[e+" "+n+" ago","in "+e+" "+n]})),a("zh_CN",(function(e,t){if(0===t)return["刚刚","片刻后"];var n=i[~~(t/2)];return[e+" "+n+"前",e+" "+n+"后"]}))},4388:function(e,t,n){"use strict";n.r(t),n.d(t,{addMediaToPlaylist:function(){return m},addNewPlaylist:function(){return v},copyEmbedMediaCode:function(){return u},copyShareLink:function(){return c},createPlaylist:function(){return f},deleteComment:function(){return h},dislikeMedia:function(){return s},likeMedia:function(){return a},loadMediaData:function(){return o},removeMedia:function(){return d},removeMediaFromPlaylist:function(){return g},reportMedia:function(){return l},submitComment:function(){return p}});var r=n(7143),i=n.n(r);function o(){i().dispatch({type:"LOAD_MEDIA_DATA"})}function a(){i().dispatch({type:"LIKE_MEDIA"})}function s(){i().dispatch({type:"DISLIKE_MEDIA"})}function l(e){i().dispatch({type:"REPORT_MEDIA",reportDescription:e?e.replace(/\s/g,""):""})}function c(e){i().dispatch({type:"COPY_SHARE_LINK",inputElement:e})}function u(e){i().dispatch({type:"COPY_EMBED_MEDIA_CODE",inputElement:e})}function d(){i().dispatch({type:"REMOVE_MEDIA"})}function p(e){i().dispatch({type:"SUBMIT_COMMENT",commentText:e})}function h(e){i().dispatch({type:"DELETE_COMMENT",commentId:e})}function f(e){i().dispatch({type:"CREATE_PLAYLIST",playlist_data:e})}function m(e,t){i().dispatch({type:"ADD_MEDIA_TO_PLAYLIST",playlist_id:e,media_id:t})}function g(e,t){i().dispatch({type:"REMOVE_MEDIA_FROM_PLAYLIST",playlist_id:e,media_id:t})}function v(e){i().dispatch({type:"APPEND_NEW_PLAYLIST",playlist_data:e})}},4389:function(e,t,n){"use strict";var r,i=n(7118),o=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(n(9471)),a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0)return!1;var r=n.length;if(0===r)return!1;for(var i=n.concat([]);i.length>0;){var o=i.shift(),a=o.items;o.count&&a&&o.count>0&&a.length>0&&(r+=a.length,i=i.concat(a))}return Math.abs(t)===r}(t)}),[t]),y=m.get("bookmarkExpandedMap"),b=d?d({bookmark:t,doc:r,depth:n,index:c}):y.has(g)?y.get(g):!v,E=o.useState(b),S=E[0],w=E[1],_=t.items&&t.items.length>0,k=function(){var e=!S;m.updateCurrentValue("bookmarkExpandedMap",(function(t){return t.set(g,e)})),w(e)},C=function(){var e=t.dest,n=m.get("jumpToDestination");i.getDestination(r,e).then((function(e){n&&n(a({label:t.title},e))}))},P=function(){_&&t.dest&&C()},x=function(){!_&&t.dest&&C()},A=function(e,t){return o.createElement("div",{className:"rpv-bookmark__item",style:{paddingLeft:"".concat(1.25*n,"rem")},onClick:e},t)},M=function(e,t){return _?o.createElement("span",{className:"rpv-bookmark__toggle","data-testid":"bookmark__toggle-".concat(n,"-").concat(c),onClick:k},S?e:t):o.createElement("span",{className:"rpv-bookmark__toggle"})},T=function(e){return t.url?o.createElement("a",{className:"rpv-bookmark__title",href:t.url,rel:"noopener noreferrer nofollow",target:t.newWindow?"_blank":""},t.title):o.createElement("div",{className:"rpv-bookmark__title","aria-label":t.title,onClick:e},t.title)};return o.createElement("li",{"aria-expanded":S?"true":"false","aria-label":t.title,"aria-level":n+1,"aria-posinset":c+1,"aria-setsize":p,role:"treeitem",tabIndex:-1},f?f({bookmark:t,depth:n,hasSubItems:_,index:c,isExpanded:S,path:g,defaultRenderItem:A,defaultRenderTitle:T,defaultRenderToggle:M,onClickItem:x,onClickTitle:P,onToggleSubItems:k}):A(x,o.createElement(o.Fragment,null,M(o.createElement(s,null),o.createElement(l,null)),T(P))),_&&S&&o.createElement(u,{bookmarks:t.items,depth:n+1,doc:r,isBookmarkExpanded:d,isRoot:!1,pathFromRoot:g,renderBookmarkItem:f,store:m}))},u=function(e){var t=e.bookmarks,n=e.depth,r=void 0===n?0:n,i=e.doc,a=e.isBookmarkExpanded,s=e.isRoot,l=e.pathFromRoot,u=e.renderBookmarkItem,d=e.store;return o.createElement("ul",{className:"rpv-bookmark__list",role:s?"tree":"group",tabIndex:-1},t.map((function(e,n){return o.createElement(c,{bookmark:e,depth:r,doc:i,index:n,isBookmarkExpanded:a,key:n,numberOfSiblings:t.length,pathFromRoot:l,renderBookmarkItem:u,store:d})})))};!function(e){e[e.Collapse=0]="Collapse",e[e.Expand=1]="Expand"}(r||(r={}));var d=function(e){var t=e.bookmarks,n=e.doc,i=e.isBookmarkExpanded,a=e.renderBookmarkItem,s=e.store,l=o.useRef(),c=function(e){var t=l.current;if(t&&e.target instanceof HTMLElement&&t.contains(e.target))switch(e.key){case"ArrowDown":e.preventDefault(),p((function(e,t){return e.indexOf(t)+1}));break;case"ArrowLeft":e.preventDefault(),h(r.Collapse);break;case"ArrowRight":e.preventDefault(),h(r.Expand);break;case"ArrowUp":e.preventDefault,p((function(e,t){return e.indexOf(t)-1}));break;case"End":e.preventDefault(),p((function(e,t){return e.length-1}));break;case" ":case"Enter":case"Space":e.preventDefault(),d();break;case"Home":e.preventDefault(),p((function(e,t){return 0}))}},d=function(){var e=document.activeElement.closest(".rpv-bookmark__item").querySelector(".rpv-bookmark__title");e&&e.click()},p=function(e){var t=l.current,n=[].slice.call(t.getElementsByClassName("rpv-bookmark__item"));if(0!==n.length){var r=document.activeElement,i=n[Math.min(n.length-1,Math.max(0,e(n,r)))];r.setAttribute("tabindex","-1"),i.setAttribute("tabindex","0"),i.focus()}},h=function(e){var t=l.current;if(0!==[].slice.call(t.getElementsByClassName("rpv-bookmark__item")).length){var n=document.activeElement.closest(".rpv-bookmark__item"),i=e===r.Collapse?"true":"false";if(n&&n.parentElement.getAttribute("aria-expanded")===i){var o=n.querySelector(".rpv-bookmark__toggle");o&&o.click()}}};return o.useEffect((function(){return document.addEventListener("keydown",c),function(){document.removeEventListener("keydown",c)}}),[]),o.useEffect((function(){var e=l.current;if(e){var t=[].slice.call(e.getElementsByClassName("rpv-bookmark__item"));t.length>0&&(t[0].focus(),t[0].setAttribute("tabindex","0"))}}),[]),o.createElement("div",{ref:l},o.createElement(u,{bookmarks:t,depth:0,doc:n,isBookmarkExpanded:i,isRoot:!0,pathFromRoot:"",renderBookmarkItem:a,store:s}))},p=function(e){var t=e.doc,n=e.isBookmarkExpanded,r=e.renderBookmarkItem,a=e.store,s=o.useContext(i.LocalizationContext).l10n,l=o.useContext(i.ThemeContext).direction===i.TextDirection.RightToLeft,c=o.useState({isLoaded:!1,items:[]}),u=c[0],p=c[1];return o.useEffect((function(){p({isLoaded:!1,items:[]}),t.getOutline().then((function(e){p({isLoaded:!0,items:e||[]})}))}),[t]),u.isLoaded?0===u.items.length?o.createElement("div",{"data-testid":"bookmark__empty",className:i.classNames({"rpv-bookmark__empty":!0,"rpv-bookmark__empty--rtl":l})},s&&s.bookmark?s.bookmark.noBookmark:"There is no bookmark"):o.createElement("div",{"data-testid":"bookmark__container",className:i.classNames({"rpv-bookmark__container":!0,"rpv-bookmark__container--rtl":l})},o.createElement(d,{bookmarks:u.items,doc:t,isBookmarkExpanded:n,renderBookmarkItem:r,store:a})):o.createElement("div",{className:"rpv-bookmark__loader"},o.createElement(i.Spinner,null))},h=function(e){var t=e.isBookmarkExpanded,n=e.renderBookmarkItem,r=e.store,a=o.useState(r.get("doc")),s=a[0],l=a[1],c=function(e){l(e)};return o.useEffect((function(){return r.subscribe("doc",c),function(){r.unsubscribe("doc",c)}}),[]),s?o.createElement(p,{doc:s,isBookmarkExpanded:t,renderBookmarkItem:n,store:r}):o.createElement("div",{className:"rpv-bookmark__loader"},o.createElement(i.Spinner,null))};t.DownArrowIcon=s,t.RightArrowIcon=l,t.bookmarkPlugin=function(){var e=o.useMemo((function(){return i.createStore({bookmarkExpandedMap:new Map})}),[]);return{install:function(t){e.update("jumpToDestination",t.jumpToDestination)},onDocumentLoad:function(t){e.update("doc",t.doc)},Bookmarks:function(t){return o.createElement(h,{isBookmarkExpanded:null==t?void 0:t.isBookmarkExpanded,renderBookmarkItem:null==t?void 0:t.renderBookmarkItem,store:e})}}}},4402:function(e,t,n){"use strict";n.r(t);var r=n(9032),i=n.n(r),o=n(1838),a=n(3997);const s={};class l extends(i()){constructor(){super(),this.mediacms_config=(0,a.$)(window.MediaCMS);const e=(t={},window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,(function(e,n,r){t[n]=r})),t);var t;const n=e.q,r=e.c,i=e.t;s[Object.defineProperty(this,"id",{value:"SearchFieldStoreData_"+Object.keys(s).length}).id]={searchQuery:n?decodeURIComponent(n).replace(/\+/g," "):"",categoriesQuery:r?decodeURIComponent(r).replace(/\+/g," "):"",tagsQuery:i?decodeURIComponent(i).replace(/\+/g," "):"",predictions:[]},this.dataResponse=this.dataResponse.bind(this)}dataResponse(e){if(e&&e.data){let t=0;for(s[this.id].predictions=[];t]+)>)/gi,""),_.description=m,e.summary&&(g=e.summary.trim(),g=null===g?g:g.replace(/(<([^>]+)>)/gi,""),_.meta_description=g)):(m=e.preferSummary&&"string"==typeof e.summary?e.summary.trim():"string"==typeof t.description?t.description.trim():null,m=null===m?m:m.replace(/(<([^>]+)>)/gi,""),l||e.inCategoriesList||"user"===p?_.description=m:_.meta_description=m),"video"===p&&(_.previewThumbnail=d),"video"!==p&&"audio"!==p||(_.duration=t.duration),!r&&!a||isNaN(t.media_count)||(_.media_count=parseInt(t.media_count,10)),s&&(w.date=e.hideDate||!1,w.views=e.hideViews||!1,w.author=e.hideAuthor||!1),_={..._,hide:w},_}function P(e){let t=!1;const n={order:e.order,title:e.title,link:e.url.view,thumbnail:e.thumbnail,publish_date:e.date,singleLinkContent:e.singleLinkContent,hasMediaViewer:e.hasMediaViewer,hasMediaViewerDescr:e.hasMediaViewerDescr};switch(e.type){case"user":case"playlist":break;case"video":t=!0,n.duration=e.duration,n.preview_thumbnail=e.previewThumbnail;break;case"audio":t=!0,n.duration=e.duration;break;case"image":case"pdf":t=!0}if(void 0!==e.description&&(n.description=e.description),void 0!==e.meta_description&&(n.meta_description=e.meta_description),!e.taxonomyPage.current&&"playlist"!==e.type||isNaN(e.media_count)||(n.media_count=e.media_count),n.hideAllMeta=e.hide.allMeta,t&&(n.views=e.stats.views,n.author_name=e.author.name,n.author_link=e.author.url,n.hideDate=e.hide.date,n.hideViews=e.hide.views,n.hideAuthor=e.hide.author),(e.playlistPage.current||e.playlistPlayback.current)&&(n.playlistOrder=e.order,e.playlistPlayback.current?(n.playlist_id=e.playlistPlayback.id,n.playlistActiveItem=e.playlistPlayback.activeItem,n.hidePlaylistOrderNumber=e.playlistPlayback.hideOrderNumber):(n.playlist_id=e.playlistPage.id,n.hidePlaylistOptions=e.playlistPage.hideOptions,n.hidePlaylistOrderNumber=e.playlistPage.hideOrderNumber)),e.canEdit&&(n.editLink=e.url.edit),e.taxonomyPage.current)switch(e.taxonomyPage.type){case"categories":return r.createElement(S,_({},n,{type:"category"}));case"tags":return r.createElement(S,_({},n,{type:"tag"}))}switch(e.type){case"user":return r.createElement(w,n);case"playlist":return window.MediaCMS.site.devEnv&&(n.link=n.link.replace("/playlists/","playlist.html?pl=")),r.createElement(E,n);case"video":return r.createElement(y,n);case"audio":return r.createElement(v,n);case"image":return r.createElement(g,_({},n,{type:"image"}));case"pdf":return r.createElement(g,_({},n,{type:"pdf"}))}return r.createElement(g,_({},n,{type:"attachment"}))}E.propTypes={...m.propTypes,media_count:c.PositiveIntegerOrZero},E.defaultProps={...m.defaultProps,media_count:0},S.propTypes={...m.propTypes,type:s().string.isRequired,class_name:s().string,media_count:c.PositiveIntegerOrZero},S.defaultProps={...m.defaultProps,class_name:"",media_count:0},w.propTypes={...m.propTypes},w.defaultProps={...m.defaultProps}},4449:function(e,t,n){"use strict";var r=n(9718),i=n(5953),o=i([r("%String.prototype.indexOf%")]);e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&o(e,".prototype.")>-1?i([n]):n}},4463:function(e,t,n){"use strict";n.r(t),n.d(t,{UserConsumer:function(){return l},UserContext:function(){return o},UserProvider:function(){return s}});var r=n(9471),i=n(3997);const o=(0,r.createContext)(),a=(0,i.$)(window.MediaCMS).member,s=e=>{let{children:t}=e;const n={isAnonymous:a.is.anonymous,username:a.username,thumbnail:a.thumbnail,userCan:a.can,pages:a.pages};return r.createElement(o.Provider,{value:n},t)},l=o.Consumer;t.default=o},4470:function(e,t,n){"use strict";function r(e){for(const t in window.REPLACEMENTS)e=e.replace(t,window.REPLACEMENTS[t]);return e}n.d(t,{u:function(){return r}})},4473:function(e,t,n){"use strict";var r,i=n(1385),o=n(7118),a=n(9471),s=n(9834),l=function(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}(a),c=function(){return l.createElement(o.Icon,{size:16},l.createElement("path",{d:"M7.5,19.499h9 M7.5,16.499h9 M5.5,16.5h-3c-1.103-0.003-1.997-0.897-2-2v-6c0.003-1.103,0.897-1.997,2-2h19\n c1.103,0.003,1.997,0.897,2,2v6c-0.003,1.103-0.897,1.997-2,2h-3\n M5.5,4.5v-4h9.586c0.265,0,0.52,0.105,0.707,0.293l2.414,2.414\n C18.395,3.394,18.5,3.649,18.5,3.914V4.5\n M18.5,22.5c0,0.552-0.448,1-1,1h-11c-0.552,0-1-0.448-1-1v-9h13V22.5z\n M3.5,8.499\n c0.552,0,1,0.448,1,1s-0.448,1-1,1s-1-0.448-1-1S2.948,8.499,3.5,8.499z\n M14.5,0.499v4h4"}))},u=function(){return u=Object.assign||function(e){for(var t,n=1,r=arguments.length;n