1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3878],{70639:function(e){var t;window,t=()=>(()=>{var e={41:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataKeys=void 0,t.buildLogMetadata=function(e,i,s,a){var r;let l=o.deviceDetector.getDeviceInfo(),d=o.deviceDetector.getOSInfo(),h=(r=l.type)?({mobile:"Phone",tablet:"Tablet"})[r]||r:"Desktop",u=screen.width+"x"+screen.height,c=function(){let e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;return e&&(e.effectiveType||e.type)||"Unknown"}();return Object.assign({[t.MetadataKeys.LOG_IDENTIFIER]:s,[t.MetadataKeys.SESSION_ID]:e,[t.MetadataKeys.ID]:i,[t.MetadataKeys.SDK_TYPE]:"Web",[t.MetadataKeys.SDK_VERSION]:"0.34.5",[t.MetadataKeys.API_KEY]:n.ConfigService.apiKey,[t.MetadataKeys.DEVICE_TYPE]:h,[t.MetadataKeys.DEVICE_BRAND]:l.vendor,[t.MetadataKeys.DEVICE_MODEL]:l.model,[t.MetadataKeys.OPERATING_SYSTEM]:d.name,[t.MetadataKeys.OPERATING_SYSTEM_VERSION]:d.version,[t.MetadataKeys.SCREEN_RESOLUTION]:u,[t.MetadataKeys.CONNECTION_TYPE]:c,[t.MetadataKeys.REPORTING_TIMESTAMP]:new Date().toISOString()},a)};let n=i(4545),o=i(2914);t.MetadataKeys={SESSION_ID:"session_id",ID:"id",SDK_TYPE:"sdk_type",SDK_VERSION:"sdk_version",API_KEY:"api_key",DEVICE_TYPE:"device_type",DEVICE_BRAND:"device_brand",DEVICE_MODEL:"device_model",OPERATING_SYSTEM:"operating_system",OPERATING_SYSTEM_VERSION:"operating_system_version",SCREEN_RESOLUTION:"screen_resolution",CONNECTION_TYPE:"connection_type",REPORTING_TIMESTAMP:"reporting_timestamp",LOG_IDENTIFIER:"log_identifier"}},51:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetLayout=void 0,i(5127);let o=i(4403),s=i(5785),a=i(6450),r=i(9965),l=i(8921),d=i(4545),h=i(4906),u=i(3574),c=i(9266),p=i(6627),g=i(5266),v=i(6994),y=i(7951),m=window.innerWidth;class b extends p.WidgetBaseLayout{get refElement(){var e;return null!==(e=this.shadowRoot)&&void 0!==e?e:this}constructor(){super(),this.widgetHeight=0,this.parentHeight=void 0,this.focusedItemIndex=-1,this.lastFocusedIndex=-1,d.ConfigService.runInShadowDom&&this.attachShadow({mode:"open"}),this.widgetItems=[],this.contents=[],this.heightObserver=new MutationObserver(this.handleHeightChangeMutation.bind(this)),this.onResizeEvent=(0,o.debounce)(this.onResize.bind(this),75),this.onMouseMoveEvent=(0,o.debounce)(e=>{let t=(this.shadowRoot||document).elementFromPoint(e.clientX,e.clientY),i=(0,c.findParentOfType)(t,g.BlazeWidgetItem,this);if(i&&this.currentlyAnimatedItem!==i){let e=this.currentlyAnimatedItem;this.currentlyAnimatedItem=i,null==e||e.loadNewThumbnail(),this.currentlyAnimatedItem.loadNewThumbnail()}},50),this.onMouseLeaveEvent=()=>{var e,t;"function"==typeof this.onMouseMoveEvent.cancel&&this.onMouseMoveEvent.cancel();let i=this.currentlyAnimatedItem;this.currentlyAnimatedItem=null!==(e=this.firstVisibleItem)&&void 0!==e?e:this.widgetItems[0],null==i||i.loadNewThumbnail(),null===(t=this.currentlyAnimatedItem)||void 0===t||t.loadNewThumbnail()}}connectedCallback(){var e,t,i;if((0,c.setId)(this,"blaze-layout"),this.setupAccessibility(),super.connectedCallback(),this.parentElement&&new ResizeObserver(()=>{this.render()}).observe(this.parentElement),this.isAnimatedThumbnail()&&o.deviceDetector.isDesktop&&(this.addEventListener("mousemove",this.onMouseMoveEvent),this.addEventListener("mouseleave",this.onMouseLeaveEvent)),null==window||window.addEventListener("resize",this.onResizeEvent),null==window||window.addEventListener(o.DEVICE_EVENTS.SCREEN_ORIENTATION_CHANGE,this.onResizeEventDelay.bind(this)),this.intersectionObserver.observe(this),this.setStyle({display:"grid",gridAutoFlow:"column",width:"auto",height:"100%",direction:d.ConfigService.layoutDirection}),this.parentElement&&(this.parentHeight=this.parentElement.clientHeight,this.heightOb
1server.observe(this.parentElement,{attributes:!0,attributeFilter:["style","class"]})),this.widgetHeight=this.clientHeight,this.innerHTML+="<style>\n blaze-widget-layout::-webkit-scrollbar,blaze-div::-webkit-scrollbar {display: none;}\n blaze-widget-layout,blaze-div {-ms-overflow-style: none; scrollbar-width: none;}\n blaze-widget-layout:focus-visible {outline: 2px solid #007AFF; outline-offset: 2px;}\n </style>",this.theme.layoutStyle.isSkeleton){let n,o;let{itemRatio:a,columns:r,rows:d,lines:h,labelStyle:u,horizontalItemsSpacing:c,verticalItemsSpacing:p}=this.theme.layoutStyle,{maxBadgeHeight:g,maxBadgeWidth:v,maxChipHeight:y,maxChipWidth:m}=this.getStatusIndicatorBadgeAndChipSizes(),b=y/2+g/2,f=v/2+m/2,S=0,E=0,C=-1!==u.position.indexOf("outside");if(u.isVisible&&C){let e=this.calculateLabelSizes(u,h);S=e.labelAdditionalWidth,E=e.labelAdditionalHeight}let T=this.getParentHeightWithoutPadding()||this.parentHeight||this.clientHeight||this.widgetHeight;this.skeletonContainer=l.WidgetsFactory.create("blaze-div"),this.skeletonContainer.style.display="grid",this.skeletonContainer.style.columnGap=c+"px",this.skeletonContainer.style.rowGap=p+"px",this.skeletonContainer.style.overflow="hidden",this.skeletonContainer.style.gridAutoFlow="column";let A=4;1==d&&0==r?(this.skeletonContainer.style.gap=c+"px",n=T-E-b,o=this.calculateWidthForRow(n,a,f,S),this.skeletonContainer.style.overflowX="auto",A=this.clientWidth/o+1,this.skeletonContainer.style.gridTemplateColumns="repeat("+A+", "+o+"px)"):(o=(T-(r-1)*c)/r,(null===(e=this.parentElement)||void 0===e?void 0:e.clientWidth)&&(o=((null===(t=this.parentElement)||void 0===t?void 0:t.clientWidth)-(r-1)*c)/r),n=(o-S-f)/a+b+E,this.skeletonContainer.style.gridTemplateColumns="1fr ".repeat(r),this.skeletonContainer.style.height=2*n+"px");let I=this.getAttribute("max-display-items-count")||this.getAttribute("max-items");1==I&&(A=I);for(let e=0;e<A;e++){let e=new s.BlazeWidgetItemSkeleton(this.theme.layoutStyle,Math.floor(o),Math.floor(n),E);null===(i=this.skeletonContainer)||void 0===i||i.append(e)}this.refElement.append(this.skeletonContainer)}}disconnectedCallback(){var e,t,i;super.disconnectedCallback(),null==window||window.removeEventListener("resize",this.onResizeEvent),null==window||window.removeEventListener(o.DEVICE_EVENTS.SCREEN_ORIENTATION_CHANGE,this.onResizeEventDelay),this.removeEventListener("keydown",this.onKeyDown),this.isAnimatedThumbnail()&&o.deviceDetector.isDesktop&&(this.removeEventListener("mousemove",this.onMouseMoveEvent),this.removeEventListener("mouseleave",this.onMouseLeaveEvent)),null===(e=this.storysModal)||void 0===e||e.remove(),null===(t=this.momentsModal)||void 0===t||t.remove(),null===(i=this.videosModal)||void 0===i||i.remove(),this.heightObserver.disconnect(),o.deviceDetector.removeResizeListener(),y.contentAccessibilityManager.cleanup(),v.accessibilityManager.cleanup()}onResizeEventDelay(){setTimeout(()=>{this.onResize()},a.ONE_SECOND/2)}onResize(){var e,t,i,n,o,s,a,r,l,d,h,u,c,p,g;m!==window.innerWidth&&(m=window.innerWidth,this.storysModal&&(null===(e=this.storysModal)||void 0===e||e.render(),null===(i=null===(t=this.storysModal)||void 0===t?void 0:t.player)||void 0===i||i.render(),null===(o=null===(n=this.storysModal)||void 0===n?void 0:n.player)||void 0===o||o.resetPosition(),null===(r=null===(a=null===(s=this.storysModal)||void 0===s?void 0:s.player)||void 0===a?void 0:a.contentList)||void 0===r||r.forEach(e=>null==e?void 0:e.render())),this.momentsModal&&(null===(l=this.momentsModal)||void 0===l||l.render(),null===(h=null===(d=this.momentsModal)||void 0===d?void 0:d.player)||void 0===h||h.resetPosition(),null===(p=null===(c=null===(u=this.momentsModal)||void 0===u?void 0:u.player)||void 0===c?void 0:c.contentList)||void 0===p||p.forEach(e=>null==e?void 0:e.render())),this.videosModal&&(null===(g=this.videosModal)||void 0===g||g.render()))}handleHeightChangeMutation(e){var t,i,n,o,s;for(let a of e)if("style"===a.attributeName||"class"===a.attributeName){let e=this.getParentHeightWithoutPadding();if(null!=e&&e!==this.parentHeight){this.parentHeight=e;let a=this.contents.length>0;[null===(i=null===(t=this.storysModal)||void 0===t?void 0:t.player)||void 0===i?void 0:i.contentList,null===(o=null===(n=this.momentsModal)||void 0===n?void 0:n.player)||void 0===o?void 0:o.contentList,null===(s=this.videosModal)||void 0===s?void 0:s.player.contentList].some(e=>{var t;return(null!==(t=null==e?void 0:e.length)&&void 0!==t?t:0)>0})&&a&&this.render()}}}handleIntersection(e){let t=e.find(e=>e.target===this);t&&t.isIntersecting&&(this.isWidgetVisible=!0,this.widgetItems.length&&(this.event(a.WidgetAction.Visible,{},this.getAttribute("labels")),this.intersectionObserver.disconnect()))}onContentChange(e){var t,i,n,o;let s="RTL"===d.ConfigService.layoutDirection?-1:1,a=(this.thumbnailWidth||0)*s;switch(e){case"NEXT":this.scrollLeft+=a;break;case"PREV":this.scrollLeft-=a}let r=(null===(t=this.storysModal)||void 0===t?void 0:t.isOpen)||(null===(i=this.momentsModal)||void 0===i?void 0:i.isOpen)||(null===(n=this.videosModal)||void 0===n?void 0:n.isOpen);if(this.isAnimatedThumbnail()&&!r){this.setFirstVisibleItem();let e=this.currentlyAnimatedItem;
1this.currentlyAnimatedItem=this.firstVisibleItem,null==e||e.loadNewThumbnail(),null===(o=this.firstVisibleItem)||void 0===o||o.loadNewThumbnail()}}onPlayerClose(){this.restoreTabIndexOnWidgetItems(),this.lastFocusedIndex>=0&&this.lastFocusedIndex<this.widgetItems.length&&this.navigateToItem(this.lastFocusedIndex),this.shouldReloadWhenPlayerIsClosed&&(this.loadContent(),this.shouldReloadWhenPlayerIsClosed=!1)}onPlayerOpen(){this.lastFocusedIndex=this.focusedItemIndex}setFirstVisibleItem(){let e=this.widgetItems.filter(e=>e.isFullyVisibleInParent()),t=e.reduce((e,t)=>{let i=t.getBoundingClientRect(),n=e.getBoundingClientRect();return i.left<n.left?t:e},e[0]);this.firstVisibleItem=t}getParentHeightWithoutPadding(){var e;if(this.parentElement){let t=window.getComputedStyle(this.parentElement),i=parseFloat(t.paddingTop)+parseFloat(t.paddingBottom);return(this.parentElement.clientHeight||(null!==(e=this.parentHeight)&&void 0!==e?e:0))-i||null}return null}setId(e){this.containerId=e,this.id="widget-layout-"+e}set storyIds(e){this.setAttribute("story-ids",e)}set contentIds(e){this.setAttribute("content-ids",e)}updateWidgetUI(){this.widgetItems.forEach(e=>{e.content.entities&&this.perItemStyleOverrides&&Object.entries(e.content.entities).forEach(([t,i])=>{var n;i&&this.perItemStyleOverrides[t]&&(null===(n=this.perItemStyleOverrides[t])||void 0===n||n.forEach(n=>{n.name===i&&(e.updateWidgetItemStyle(n.theme.layoutStyle),this.updateActiveLayoutThemesPerItemWithEntity(t,i,n.theme))}))})}),this.setMaxPaddingOnWidgetItems(),this.render()}updateOverrideStyles(e){var t;for(let i of Object.keys(e)){let n=i;this.perItemStyleOverrides.hasOwnProperty(n)&&(null===(t=e[n])||void 0===t||t.forEach(e=>{var t,i;let o=null===(t=this.perItemStyleOverrides[n])||void 0===t?void 0:t.findIndex(t=>t.name===e.name);if(-1!==o){let t=this.perItemStyleOverrides[n];t&&void 0!==o&&(t[o]=e)}else null===(i=this.perItemStyleOverrides[n])||void 0===i||i.push(e)}))}}updatePlayerStyle(){let e=(0,c.mergeDeep)(h.ThemeFactory.create("default").playerStyle,d.ConfigService.playerStyleCustomization);(0,c.applyPlayerStyleChanges)(h.ThemeFactory.create("default").playerStyle,e,this.theme.playerStyle,{GLOBAL:[],LOCAL:[]})}setMaxPaddingOnWidgetItems(){let e={top:"0",bottom:"0",left:"0",right:"0"},t={top:!1,bottom:!1,left:!1,right:!1};this.widgetItems.forEach(i=>{let n=i.getPaddingOnContainer();e.top=(0,c.getMaxValue)(e.top,n.top),e.left=(0,c.getMaxValue)(e.left,n.left),e.right=(0,c.getMaxValue)(e.right,n.right),e.bottom=(0,c.getMaxValue)(e.bottom,n.bottom);let o=i.layoutStyle.badgePosition,s=i.layoutStyle.statusIndicatorPosition,a=o.toLocaleLowerCase().includes("top")||s.toLocaleLowerCase().includes("top"),r=o.toLocaleLowerCase().includes("bottom")||s.toLocaleLowerCase().includes("bottom"),l=o.toLocaleLowerCase().includes("right")||s.toLocaleLowerCase().includes("right"),d=o.toLocaleLowerCase().includes("left")||s.toLocaleLowerCase().includes("left"),h=o.toLocaleLowerCase().includes("outside")||s.toLocaleLowerCase().includes("outside"),u=i.layoutStyle.badgeIndicatorStyle.isVisible||i.layoutStyle[i.chipType].isVisible;h&&u&&(a&&(t.top=!0),r&&(t.bottom=!0),l&&(t.right=!0),d&&(t.left=!0))}),e.top=t.top?e.top:"0px",e.bottom=t.bottom?e.bottom:"0px",e.left=t.left?e.left:"0px",e.right=t.right?e.right:"0px",this.widgetItems.forEach(t=>{t.setPaddingOnContainer(e)})}setMaxItemsDisplaySize(e){this.setAttribute("max-display-items-count",e.toString())}setMaxItemsSize(e,t){this.setReloadData(t),this.setAttribute("max-items",(null==e?void 0:e.toString())||"")}setupVideoModalCallbacks(){var e,t,i;this.videosModal&&(this.videosModal.onContentChange=null===(e=this.onContentChange)||void 0===e?void 0:e.bind(this),this.videosModal.onClose=null===(t=this.onPlayerClose)||void 0===t?void 0:t.bind(this),this.videosModal.onOpen=null===(i=this.onPlayerOpen)||void 0===i?void 0:i.bind(this))}setupMomentModalCallbacks(){var e,t,i;this.momentsModal&&(this.momentsModal.onContentChange=null===(e=this.onContentChange)||void 0===e?void 0:e.bind(this),this.momentsModal.onClose=null===(t=this.onPlayerClose)||void 0===t?void 0:t.bind(this),this.momentsModal.onOpen=null===(i=this.onPlayerOpen)||void 0===i?void 0:i.bind(this))}setupStoryModalCallbacks(){var e,t,i;this.storysModal&&(this.storysModal.onContentChange=null===(e=this.onContentChange)||void 0===e?void 0:e.b
1ind(this),this.storysModal.onClose=null===(t=this.onPlayerClose)||void 0===t?void 0:t.bind(this),this.storysModal.onOpen=null===(i=this.onPlayerOpen)||void 0===i?void 0:i.bind(this))}beforeStoryModalCreation(){this.updatePlayerStyle()}removeSkeletonContainer(){return n(this,void 0,void 0,function*(){var e;null===(e=this.skeletonContainer)||void 0===e||e.remove()})}handlePostContentLoad(e,t,i){return n(this,void 0,void 0,function*(){var n;for(let e of(null===(n=this.skeletonContainer)||void 0===n||n.remove(),this.widgetItems))null==e||e.remove();if(this.widgetItems=[],this.handleWidgetContent(),this.render(),this.reorderWidgets(),e?this.handleStoryContent():t?this.handleMomentContent():i&&this.handleVideoContent(),this.widgetItems.forEach(e=>this.refElement.appendChild(e)),this.initializeRovingTabindex(),this.reorderWidgets(),d.EventService.dispatch(this,r.Delegation.onWidgetDataLoadCompleted,{widgetId:this.id,storyCount:this.contents.length,contentCount:this.contents.length}),this.isWidgetVisible&&this.widgetItems.length&&this.event(a.WidgetAction.Visible,{},this.getAttribute("labels")),this.event(a.WidgetAction.Load,{},this.getAttribute("labels")),this.updateWidgetUI(),this.updateAccessibilityLabel(),this.widgetItems.length>0){this.focusedItemIndex=0,this.widgetItems[0].setAttribute("tabindex","0"),this.widgetItems.slice(1).forEach(e=>e.setAttribute("tabindex","-1"));let e=this.getContentType();this.widgetItems.forEach((t,i)=>{t.updateAccessibilityInfo({position:i+1,total:this.widgetItems.length,contentType:e})})}})}handleAssetsExpiry(e){let t=new Date(Date.parse(e.assetsExpiryTime));clearTimeout(this.reloadTimeout),this.reloadTimeout=setTimeout(()=>{this.loadContent()},t.getTime()-Date.now()-3e5)}onItemClick(e,t){var i,n,s,a;window.visualViewport&&window.visualViewport.scale>1&&d.EventService.dispatch(this,r.Delegation.onErrorThrown,{widgetId:this.id,errorCode:r.ErrorCode.VisualViewportScaled});let l=this.getAttribute("content-type");if(this.isAnimatedThumbnail()&&o.deviceDetector.isDesktop){let e=this.currentlyAnimatedItem;this.currentlyAnimatedItem=this.firstVisibleItem,null==e||e.loadNewThumbnail(),null===(i=this.currentlyAnimatedItem)||void 0===i||i.loadNewThumbnail()}"video"===l&&this.videosModal?this.playVideo(null===(n=e.content)||void 0===n?void 0:n.id):"moment"===l&&this.momentsModal?this.playMoment(null===(s=e.content)||void 0===s?void 0:s.id):("story"===l||!l)&&this.storysModal&&this.playStory(null===(a=e.content)||void 0===a?void 0:a.id)}handleWidgetContent(){var e;let t=this.getTheme();null===(e=this.contents)||void 0===e||e.forEach((e,i)=>{e.entities&&Object.entries(e.entities).forEach(([e,i])=>{var n;i&&this.perItemStyleOverrides&&this.perItemStyleOverrides[e]&&(null===(n=this.perItemStyleOverrides[e])||void 0===n||n.forEach(n=>{n.name===i&&(t=n.theme,this.updateActiveLayoutThemesPerItemWithEntity(e,i,n.theme))}))});let n=new g.BlazeWidgetItem({layout:t.layoutStyle,content:e});n.onClick=()=>this.onItemClick(n,i),n.contentType=this.getAttribute("content-type")||"story",this.widgetItems.push(n)})}calculateChipSizes(e){let{chipWidth:t,chipHeight:i}=(0,c.calculateChipSize)("badge",e.layoutStyle.badgePosition,e.layoutStyle),{chipWidth:n,chipHeight:o}=(0,c.calculateChipSize)("chip",e.layoutStyle.statusIndicatorPosition,e.layoutStyle);return{badge:{width:t,height:i},chip:{width:n,height:o}}}getStatusIndicatorBadgeAndChipSizes(){let e=0,t=0,i=0,n=0;if((0,c.isEmpty)(this.activeOverridesLayoutThemes)){let{badge:o,chip:s}=this.calculateChipSizes(this.theme),{badgePosition:a,statusIndicatorPosition:r}=this.theme.layoutStyle,{maxBadgeHeight:l,maxBadgeWidth:d,maxChipHeight:h,maxChipWidth:u}=this.getMaxSizes(o,s,a,r);e=l,t=d,i=h,n=u}else Object.keys(this.activeOverridesLayoutThemes).forEach(o=>{var s;null===(s=this.activeOverridesLayoutThemes[o])||void 0===s||s.forEach(o=>{let{badge:s,chip:a}=this.calculateChipSizes(o.theme),{badgePosition:r,statusIndicatorPosition:l}=o.theme.layoutStyle,{maxBadgeHeight:d,maxBadgeWidth:h,maxChipHeight:u,maxChipWidth:c}=this.getMaxSizes(s,a,r,l);e=Math.max(e,d),t=Math.max(t,h),i=Math.max(i,u),n=Math.max(n,c)})});return{maxBadgeHeight:e,maxBadgeWidth:t,maxChipHeight:i,maxChipWidth:n}}isAnimatedThumbnail(){return"AnimatedThumbnailPoster"===(0,u.thumbnailMapping)(this.getTheme().layoutStyle.thumbnailType)}getMaxSizes(e,t,i,n){let o,s,a,r;return i===n?(o=Math.max(e.height,t.height),s=Math.max(e.width,t.width),a=o,r=s):(o=e.he
1ight,s=e.width,a=t.height,r=t.width),{maxBadgeHeight:o,maxBadgeWidth:s,maxChipHeight:a,maxChipWidth:r}}render(){var e;if(this.theme){let t,i;let{itemRatio:n,columns:o,rows:s,lines:a,labelStyle:r,verticalItemsSpacing:l,horizontalItemsSpacing:d}=this.theme.layoutStyle;this.style.overflowX="",this.style.columnGap=d+"px",this.style.rowGap=l+"px",this.style.gridAutoFlow="row",this.style.overflow="hidden",this.style.color=r.color;let h=this.maxSize(),u=h!==this.contents.length?this.contents.slice(0,h):this.contents,{maxBadgeHeight:c,maxBadgeWidth:p,maxChipHeight:g,maxChipWidth:v}=this.getStatusIndicatorBadgeAndChipSizes(),y=g/2+c/2,m=p/2+v/2,b=0,f=0,S=-1!==r.position.indexOf("outside");if(r.isVisible&&S){let e=this.calculateLabelSizes(r,a);e.labelWidth,b=e.labelAdditionalWidth,f=e.labelAdditionalHeight}let E=this.getParentHeightWithoutPadding()||this.parentHeight||this.clientHeight||this.widgetHeight;1==s&&0==o?(t=E-f-y,i=this.calculateWidthForRow(t,n,m,b),this.style.gridTemplateColumns="repeat("+(null!==(e=u.length)&&void 0!==e?e:0)+", "+i+"px)",this.style.overflowX="auto"):(t=((i=(E-(o-1)*d)/o)-b-m)/n+y+f,this.style.gridTemplateColumns="1fr ".repeat(o),this.style.overflow="auto"),this.thumbnailHeight=Math.floor(t),this.thumbnailWidth=Math.floor(i),this.style.height="auto"}}calculateWidthForRow(e,t,i,n){return e*t+i+n}calculateLabelSizes(e,t){let i=e.width,n=0,o=(0,c.convertCssUnitToNumber)(e.height)*t,{isOutside:s,isInside:a,isLeft:r,isRight:l}=(0,c.calculatePosition)(e.position);return s?r||l||(o+=e.gap+(e.padding?2*parseInt(e.padding,10):0)):a&&(r||l?(n="auto"===i?0:+i,o=0):o+=e.gap),{labelWidth:i,labelAdditionalWidth:n,labelAdditionalHeight:o}}reorderWidgetItems(){for(let e of this.contents){let t=this.widgetItems.findIndex(t=>{var i;return(null===(i=t.content)||void 0===i?void 0:i.id)===e.id}),i=this.contents.indexOf(e);if(t>0){let e=this.widgetItems[t],n=this.widgetItems[i];this.widgetItems[i]=e,this.widgetItems[t]=n}}}updateWidgetDisplay(){let e=this.maxSize();e&&this.widgetItems.forEach((t,i)=>{t.style.display=i<e?"grid":"none"})}maxSize(){var e,t;let i=this.theme.layoutStyle.columns,n=this.theme.layoutStyle.rows,o=this.getAttribute("max-display-items-count"),s=i*n,a=0;return a=null!==(t=null===(e=this.contents)||void 0===e?void 0:e.length)&&void 0!==t?t:0,0==s&&(s=a),o&&(s=o),s=Math.max(Math.min(a,s),0)}connectWidgets(){if(this.isConnected)for(let e in this.widgetItems){let t=this.widgetItems[e];t.isConnected||this.refElement.appendChild(t)}}get thumbnailShape(){var e;return(null===(e=this.theme)||void 0===e?void 0:e.layoutStyle.thumbnailShape)||this.getAttribute("thumbnail-shape")}widgetType(){return this.theme.layoutStyle.columns>1?"Grid":"Row"}setupAccessibility(){this.setAttribute("role","toolbar"),this.setAttribute("aria-orientation","horizontal"),this.addEventListener("keydown",this.onKeyDown.bind(this)),this.updateAccessibilityLabel(),v.accessibilityManager.setupLiveRegions(this)}updateAccessibilityLabel(){let e=this.getContentType(),t=this.widgetItems.length,{label:i,announcement:n}=(0,c.buildCarouselLabel)(e,t);v.accessibilityManager.announce({message:n,priority:"polite",category:"navigation"}),this.setAttribute("aria-label",i),this.setAttribute("aria-live","polite")}onKeyDown(e){var t,i,n;let o=navigator.platform.toLowerCase().includes("win")||navigator.userAgent.toLowerCase().includes("windows"),s="ArrowUp"===e.key||"ArrowDown"===e.key,a="ArrowRight"===e.key||"ArrowLeft"===e.key,r="Enter"===e.key||" "===e.key,l="Home"===e.key,d="End"===e.key;(null===(t=this.storysModal)||void 0===t?void 0:t.isOpen)&&a||(null===(i=this.momentsModal)||void 0===i?void 0:i.isOpen)&&a||(null===(n=this.videosModal)||void 0===n?void 0:n.isOpen)&&a||0!==this.widgetItems.length&&(((o?s:s||a)||r||l||d)&&(e.preventDefault(),e.stopPropagation()),"ArrowDown"!==e.key&&(o||"ArrowRight"!==e.key)?"ArrowUp"!==e.key&&(o||"ArrowLeft"!==e.key)?"Home"===e.key?this.navigateToItem(0):"End"===e.key?this.navigateToItem(this.widgetItems.length-1):"Enter"!==e.key&&" "!==e.key||this.activateCurrentItem():this.navigateToPreviousItem():this.navigateToNextItem())}navigateToNextItem(){this.focusedItemIndex<this.widgetItems.length-1&&this.navigateToItem(this.focusedItemIndex+1)}navigateToPreviousItem(){this.focusedItemIndex>0&&this.navigateToItem(this.focusedItemIndex-1)}navigateToItem(e){if(e<0||e>=this.widgetItems.length)return;let t=this.focusedItemIndex,i=this.widgetItems[e];t>=0&&t<this.widgetItems.length&&this.widgetItems[t].setAttribute("tabindex","-1"),i.setAttribute("tabindex","0"),this.focusedItemIndex=e,i.focus(),i.scrollIntoView({behavior:"smooth",block:"nearest"}),this.announceCurrentItem()}activateCurrentItem(){this.focusedItemIndex>=0&&this.focusedItemIndex<this.widgetItems.length&&this.widgetItems[this.focusedItemIndex].click()}announceCurrentItem(){var e;if(this.focusedItemIndex>=0&&this.focusedItemIndex<this.widgetItems.length){let t=this.widgetItems[this.focusedItemIndex],i=this.getContentType(),n=(0,c.buildContentAriaLabel)({contentType:i,title:(null===(e=t.content)||void 0===e?void 0:e.title)||"Untitled",content:t.content,position:this.focusedItemIndex+1,total:this.widgetItems.length,elementType:"item"});v.accessibilityManager.announce({message:n,priority:"assertive",category:"navigation"}),this.setAttribute("aria-label",n),setTimeout(()=>{this.updateAccessibilityLabel()},a.ACCESSIBILITY_TIMING.LABEL_CLEAR_DELAY)}}updateFocusedItemIndex(e){e>=0&&e<this.widgetItems.length&&(this.focusedItemIndex=e)}setFocusState(e){this.focusedItemIndex>=0&&(this.widgetItems[this.focusedItemIndex].blur(),this.widgetItems[this.focusedItemIndex].setAttribute("tabindex","-1")),this.focusedItemIndex=e,this.widgetItems[e].setAttribute("tabindex","0")}
1removeTabIndexFromWidgetItems(){this.widgetItems.forEach((e,t)=>{t===this.focusedItemIndex?e.setAttribute("tabindex","-1"):e.removeAttribute("tabindex")})}restoreTabIndexOnWidgetItems(){this.widgetItems.forEach((e,t)=>{0===t?e.setAttribute("tabindex","0"):e.setAttribute("tabindex","-1")})}initializeRovingTabindex(){this.widgetItems.forEach((e,t)=>{0===t?(e.setAttribute("tabindex","0"),this.focusedItemIndex=0):e.setAttribute("tabindex","-1")})}}t.BlazeWidgetLayout=b},78:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},147:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.INTERACTION_ANALYTICS=t.ANSWER_FEEDBACK_VIBRATE_PATTERNS=void 0,t.ANSWER_FEEDBACK_VIBRATE_PATTERNS={correctAnswerFeedback:[0,100,50,50,0,255,0,255],wrongAnswerFeedback:[0,200,50,200,0,200,0,200],selectionFeedback:[0,80,0,200]},t.INTERACTION_ANALYTICS="INTERACTION_ANALYTICS"},184:e=>{var t={"":1,lr:1,rl:1},i={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function n(e){return"string"==typeof e&&!!i[e.toLowerCase()]&&e.toLowerCase()}function o(e,i,o){this.hasBeenReset=!1;var s="",a=!1,r=e,l=i,d=o,h=null,u="",c=!0,p="auto",g="start",v="auto",y="auto",m=100,b="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a}
1,set:function(e){a=!!e}},startTime:{enumerable:!0,get:function(){return r},set:function(e){if("number"!=typeof e)throw TypeError("Start time must be set to a number.");r=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e)throw TypeError("End time must be set to a number.");l=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return d},set:function(e){d=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return h},set:function(e){h=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return u},set:function(e){var i="string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase();if(!1===i)throw SyntaxError("Vertical: an invalid or illegal direction string was specified.");u=i,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return c},set:function(e){c=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(e){if("number"!=typeof e&&"auto"!==e)throw SyntaxError("Line: an invalid number or illegal string was specified.");p=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return g},set:function(e){var t=n(e);t&&(g=t,this.hasBeenReset=!0)}},position:{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw Error("Position must be between 0 and 100.");v=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return y},set:function(e){var t=n(e);t&&(y=t,this.hasBeenReset=!0)}},size:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw Error("Size must be between 0 and 100.");m=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return b},set:function(e){var t=n(e);if(!t)throw SyntaxError("align: an invalid or illegal alignment string was specified.");b=t,this.hasBeenReset=!0}}}),this.displayState=void 0}o.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=o},200:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerDatabaseAdapter=void 0;let o=i(4545);t.LoggerDatabaseAdapter=class{storeLog(e){return n(this,void 0,void 0,function*(){return o.DatabaseService.addLog(e)})}getLogBatch(e){return n(this,void 0,void 0,function*(){return o.DatabaseService.getLogs(e)})}removeLogs(e){return n(this,void 0,void 0,function*(){return o.DatabaseService.removeLogs(e)})}clearLogs(){return n(this,void 0,void 0,function*(){return o.DatabaseService.clearLogs()})}getLogCount(){return n(this,void 0,void 0,function*(){return o.DatabaseService.getLogCount()})}}},207:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.VideoService=void 0;let o=i(4545),s=i(4403);class a extends(0,s.Singleton)(){init(){return n(this,void 0,void 0,function*(){yield this.loadHlsScript(3)})}loadHlsScript(e){return new Promise((t,i)=>{if(window.Hls)return t();let n=document.createElement("script");n.type="text/javascript",n.src=o.ConfigService.sdkStorageCDN+"/web-sdk/js/[email protected]",n.onload=()=>{window.Hls?t():e>1?this.loadHlsScript(e-1).then(t).catch(i):i(Error("Hls failed to load."))},n.onerror=()=>{e>1?this.loadHlsScript(e-1).then(t).catch(i):i(Error("Failed to load Hls script."))};let s=document.getElementsByTagName("blaze-sdk")[0];s&&s.appendChild(n)})}fetchContent(e){return n(this,void 0,void 0,function*(){let t,i;let{sourceType:n,labels:s,ids:a,orderType:r,maxItems:l,labelsPriority:d,text:h,recommendations:u}=e;if("ids"===n&&a)({data:t,error:i}=yield o.ApiService.getVideosByIds({ids:a,orderType:r}));else if("labels"===n&&s){let e=Array.isArray(s)?s.join():s.toString();({data:t,error:i}=yield o.ApiService.getVideosByLabels({labels:e,orderType:r,maxItems:l,labelsPriority:d,text:h}))}else"text"===n&&h?{data:t,error:i}=yield o.ApiService.getVideosByText({text:h,orderType:r,maxItems:l}):"recommendations"===n&&u&&({data:t,error:i}=yield o.ApiService.getContentByRecommendations({contentType:"video",re
1commendations:u}));return null==t||t.result.map(e=>{e.type="Content"}),t||{assetsExpiryTime:"",totalItems:0,result:[]}})}enrichContent(e){return n(this,void 0,void 0,function*(){for(let t of e)t.hasViewed=!!(yield o.DatabaseService.getVideoData(t.id));return e})}getVideoDataById(e){return n(this,void 0,void 0,function*(){return yield o.DatabaseService.getVideoData(e)})}updateVideoDataById(e,t){return n(this,void 0,void 0,function*(){return yield o.DatabaseService.updateVideoData(e,t)})}markVideoAsViewed(e,t){return n(this,void 0,void 0,function*(){return yield o.DatabaseService.updateVideoReadStatus(e,t)})}}t.VideoService=a.getInstance()},277:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(1590),t)},332:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetModal=void 0;let o=n(i(7168)),s=i(9126),a=i(4403),r=i(6450),l=i(8921),d=i(277),h=i(4545),u=i(9191),c=i(6994),p=i(2204);class g extends a.BaseWidget{constructor(e,t=h.VideoPlayerService){if(super(),this.videoPlayerState=t,this.isOpen=!1,this.exitButtonElement={},this.exitButtonWrapperElement={},this.blazeSdk=document.getElementsByTagName("blaze-sdk")[0],this.hammer=null,this.isMultiTouch=!1,this.contentType=e,this.player=l.WidgetsFactory.create("blaze-widget-"+e+"-player"),this.player.videoPlayerState=this.videoPlayerState,"desktop"===a.deviceDetector.platform){let e=document.createElement("style");e.textContent="\n .desktop-button:hover{background-color: #333333 !important;}\n .mute-unmute-button:hover{scale: 1.1;}\n blaze-widget-modal {\n outline: none !important;\n box-shadow: none !important;\n }\n ",this.appendChild(e),this.exitButtonWrapperElement=l.WidgetsFactory.create("blaze-div"),this.exitButtonWrapperElement.setAttribute("data-testid","blaze-widget-story-exit-button"),this.exitButtonElement=l.WidgetsFactory.create("blaze-button"),this.exitButtonElement.setAriaLabel("Close"),this.exitButtonElement.setAttribute("tabindex","0")}this.boundOnResizeEvent=(0,a.debounce)(this.onResize.bind(this),2e3),this.boundOnPopStateEvent=this.handlePopState.bind(this),this.boundOnExitButtonClick=this.handleOnExitButtonClick.bind(this),this.player.onContentChange=this.handleOnContentChange.bind(this)}connectedCallback(){window.addEventListener("resize",this.boundOnResizeEvent),window.addEventListener("popstate",this.boundOnPopStateEvent),this.id||(this.id="blaze-"+this.contentType+"-modal-"+Date.now()),c.accessibilityManager.setupModalAccessibility(this,this.contentType),this.setStyle({display:"none",position:"fixed",top:"0%",left:"0%",width:"100%",height:"100%",minHeight:"100%",justifyContent:"center",zIndex:"10000",direction:h.ConfigService.layoutDirection,outline:"none"}),a.deviceDetector.isDesktop&&(this.exitButtonWrapperElement.setStyle({position:"absolute",borderRadius:"40px",background:"#18181899",padding:"8px",top:"20px",right:"20px",zIndex:"99999",display:"block",cursor:"pointer"}),this.exitButtonWrapperElement.classList.add("desktop-button"),this.exitButtonElement.setIconUrl(d.closeIconSvg),this.exitButtonElement.setAttribute("height","30px"),this.exitButtonElement.setAttribute("width","30px"),this.exitButtonWrapperElement.addEventListener("click",this.boundOnExitButtonClick),this.exitButtonWrapperElement.append(this.exitButtonElement)),this.setupHammer(),this.render()}disconnectedCallback(){this.cleanupHammer(),a.deviceDetector.isDesktop&&this.exitButtonWrapperElement&&this.exitButtonWrapperElement.removeEventListener("click",this.boundOnExitButtonClick),window.removeEventListener("resize",this.boundOnResizeEvent),window.removeEventListener("popstate",this.boundOnPopStateEvent)}onResize(){var e,t,i,n;null===(e=this.player)||void 0===e||e.render(),null===(t=this.player)||void 0===t||t.resetPosition(),null===(n=null===(i=this.player)||void 0===i?void 0:i.contentList)||void 0===n||n.forEac
1h(e=>null==e?void 0:e.render()),this.render()}handleOnContentChange(e){var t;null===(t=this.onContentChange)||void 0===t||t.call(this,e)}handleOnExitButtonClick(){let e=this.player.playerContentList[this.player.index];e.exitTrigger="Close Button",e instanceof s.BlazeWidgetStory&&e.close(),e instanceof s.BlazeVideoElement&&e.event(r.VideoAction.VideoEnd,{}),this.close()}handlePopState(){var e,t;this.isOpen&&(a.URLManager.isUpdateLocationByScript||a.URLManager.isBackWasCalled||(this.player.close(),this.close(),this.player instanceof s.BlazeWidgetStoryPlayer&&(null===(t=(e=this.player).dispatchExitStoryEvents)||void 0===t||t.call(e)),a.URLManager.resetLocation(),a.URLManager.isBackWasCalled=!0))}seek(e){this.player.seekContentById(e)}setupHammer(){this.hammer||(this.hammer=new o.default.Manager(this),this.hammer.add(new o.default.Pan({direction:o.default.DIRECTION_ALL})),this.hammer.add(new o.default.Pinch({enable:!0})),this.hammer.on("panstart",this.handlePanStart),this.hammer.on("pan",this.handlePan),this.hammer.on("doubletap",this.handleDoubleTap),this.hammer.on("pinch",this.handlePinchOut),this.style.touchAction="pinch-zoom")}handlePanStart(e){this.isMultiTouch=e.pointers.length>1}handlePan(e){this.isMultiTouch||e.preventDefault()}handleDoubleTap(e){e.preventDefault()}handlePinchOut(e){e.preventDefault()}cleanupHammer(){this.hammer&&(this.hammer.off("panstart",this.handlePanStart),this.hammer.off("pan",this.handlePan),this.hammer.off("doubletap",this.handleDoubleTap),this.hammer.destroy(),this.hammer=null)}open(e){a.URLManager.isBackWasCalled=!1,a.URLManager.appendUrlForPrefetch(h.ConfigService.autoAdvanceUrl),this.videoPlayerState.isPlaying=!0,h.VideoPlayerService.isModalOpen=!0,this.isOpen=!0,this.setAttribute("role","dialog"),this.setAttribute("aria-modal","true"),this.blazeSdk.dataset.scrollX=""+window.scrollX,this.blazeSdk.dataset.scrollY=""+window.scrollY,document.body.style.overflow="hidden",this.style.opacity="0",this.style.display="flex",this.append(this.player),this.appendExitButton(),this.player.resetAnimation(),this.player instanceof u.BlazeWidgetVideoPlayer||this.player.play(e),setTimeout(()=>{this.style.transition="opacity 0.3s ease",this.style.opacity="1",this.transferFocusToModal()},0)}close(){this.isOpen=!1,this.removeAttribute("role"),this.removeAttribute("aria-modal"),h.VideoPlayerService.isModalOpen=!1,this.style.opacity="0",document.body.style.overflow&&document.body.style.removeProperty("overflow"),window.scrollTo(parseInt(this.blazeSdk.dataset.scrollX||"0",10),parseInt(this.blazeSdk.dataset.scrollY||"0",10)),delete this.blazeSdk.dataset.scrollX,delete this.blazeSdk.dataset.scrollY,h.VideoCacheService.isInitialized()&&h.VideoCacheService.clearAllCache(),h.ConfigService.shouldModifyUrlWithStoryId||h.ConfigService.shouldModifyUrlWithContentId?a.URLManager.updateLocationContentHash({}):a.URLManager.resetLocationAfterContentClose(),this.player.remove(),this.videoPlayerState.isPlaying=!1,c.accessibilityManager.closeModal(this.contentType),setTimeout(()=>{this.style.display="none"},r.ONE_SECOND/3)}isAllowExitModal(e){return!!e.shouldDismissPlayer||!["SingleContent","AutoAdvance"].includes(e.playReference)&&(void 0===e.customButtonVisibility||e.customButtonVisibility)}render(){if("desktop"===a.deviceDetector.platform){let e=this.player.playerContentList[this.player.index],t=this.isAllowExitModal({shouldDismissPlayer:h.ConfigService.shouldDismissPlayer,playReference:h.VideoPlayerService.playReference,customButtonVisibility:e instanceof s.BlazeWidgetStory?null==e?void 0:e.isButtonVisible("EXIT_PLAYER"):void 0});this.exitButtonWrapperElement.style.display=t?"block":"none"}}appendExitButton(){a.deviceDetector.isDesktop&&this.exitButtonWrapperElement&&this.append(this.exitButtonWrapperElement)}transferFocusToModal(){var e;let t=this.player.playerContentList[this.player.index];if(t){t.hasAttribute("tabindex")||(t.setAttribute("tabindex","0"),t.setAttribute("role","region"));let i=(0,p.generateModalAriaLabel)({contentType:this.contentType,position:this.player.index+1,total:this.player.contentList.length,title:null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.title,currentContent:t,includeNavigationContext:!1});t.setAttribute("aria-label",i),t.focus(),setTimeout(()=>{t.setAttribute("aria-label","")},1e3)}}}t.BlazeWidgetModal=g},356:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.getContentScore=void 0,t.formatDuration=function(e){if(!e||isNaN(e.getTime()))return"";let t=Math.abs(new Date().getTime()-e.getTime()),i=Math.floor(t/864e5),n=Math.floor(t%864e5/36e5),o=Math.floor(t%36e5/6e4);if(i>30){let e=Math.floor(i/30.436875);return e>=12?"1y+":e+"mo"}return i>0?i+"d":n>0?n+"h":o>=2?o+"m":"Now"},t.isCssPropertySupported=function(e){return e in document.body.style},t.pixelsToNumber=function(e){return parseInt(e.replace("px",""))},t.convertCssUnitToNumber=function(e){if("number"==typeof e)return e;if(e.endsWith("px"))return parseFloat(e);if(e.endsWith("rem")){let t=parseFloat(getComputedStyle(document.documentElement).fontSize);return parseFloat(e)*t}if(e.endsWith("em")){let t=parseFloat(getComputedStyle(document.body).fontSize);return parseFloat(e)*t}throw Error("Unsupported CSS unit: "+e)},t.isObject=s,t.mergeDeep=a,t.mergeArrays=r,t.cloneDeep=function e(t){if(Array.isArray(t))return t.map(t=>e(t));if(s(t)){let i={};for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=e(t[n]));return i}return t},t.formatDate=function(e){return[e.getFullYear(),l(e.getMonth()+1),l(e.getDate())].join("-")+" "+[l(e.getHours()),l(e.getMinutes()),l(e.getSeconds())].join(":")},t.formatUTCDate=function(e){return[e.getUTCFullYear(),l(e.getUTCMonth()+1),l(e.getUTCDate())].join("-")+" "+[l(e.getUTCHours()),l(e.getUTCMinutes()),l(e.getUTCSeconds())].join(":")},t.calculatePercentage=function(e,t){return Math.floor(e/100*t.clientHeight)+"px"},t.checkAspectRatios=function(e){for(let t of[{ratio:"16/9",decimalValue:16/9},{ratio:"9/16",decimalValue:.5625},{ratio:"2/3",decimalValue:2/3}])if(.01>Math.abs(e-t.decimalValue))return t.ratio;return"Custom Ratio"},t.getRandomId=function(){let e=new Uint8Array(4);return crypto.getRandomValues(e),e.join("-")},t.isEmpty=function(e){for(let t in e)if(e.hasOwnProperty(t)&&Array.isArray(e[t])&&e[t].length>0)return!1;return!0},t.setId=function(e,t="blaze",i=""){e.id||(e.id=t+"-"+(d+=1).toString()+(i?"-"+i:""))},t.flattenObject=function e(t){let i={};for(let n in t)if(t.hasOwnProperty(n)){if("object"!=typeof t[n]||Array.isArray(t[n]))i[n]=t[n];else{let o=e(t[n]);i=Object.assign(Object.assign({},i),o)}}return i},t.mergeStyles=function(e,t){return Object.assign(e.style,t)},t.getMaxValue=function(e,t){let i=parseInt(e.replace("px",""),10),n=parseInt(t.replace("px",""),10);return isNaN(i)||n>i?t:e},t.isReadByLastUnIgnoredPageStatus=function(e){if(e.pages.every(e=>e.ignoreReadStatusForStory&&e.hasViewed))return!0;for(let t of e.pages.slice().reverse()){if(t.ignoreReadStatusForStory&&!t.hasViewed)break;if(!t.ignoreReadStatusForStory)return t.hasViewed}return!1},t.applyPlayerStyleChanges=function(e,t,i,n){h(e,t,"GLOBAL",n),n.GLOBAL=u(n.GLOBAL,n.LOCAL),n.GLOBAL.forEach(e=>{let n=e.split("."),o=p(t,n);c(i,n,o)})},t.getChangedProperties=h,t.removeDuplicates=u,t.updateStyle=c,t.getNestedValue=p,t.formatLikes=function(e){return e>=1e5?"100K":e>=1e3?(Math.floor(e/100)/10).toFixed(1).replace(/\.0$/,"")+"K":e.toString()},t.isElementInsideTarget=function(e,t){for(let i of t)for(let t of document.querySelectorAll(i))if(t.contains(e))return!0;return!1},t.findParentOfType=function(e,t,i){for(;e&&!(e instanceof t)&&e!==i;)e=e.parentElement;return e instanceof t?e:null},t.validateContainer=function(e,t){let i=document.querySelector("#"+e);if(!i)return o.EventService.dispatch(document.body,n.Delegation.onErrorThrown,{errorCode:n.ErrorCode.FailedToFindContainerId}),document.createElement("div");if(t&&i.querySelector(t))throw o.EventService.dispatch(document.body,n.Delegation.onErrorThrown,{errorCode:n.ErrorCode.FailedContainerIdHasWidgetAlready}),Error("Container "+e+" already has a widget with name "+t);return i};let n=i(9965),o=i(4545);function s(e){return e&&"object"==typeof e&&!Array.isArray(e)}function a(e,...t){if(!t.length)return e;let i=t.shift();if(s(e)&&s(i))for(let t in i)void 0!==i[t]&&(Array.isArray(i[t])?e[t]=r(e[t]||[],i[t]):s(i[t])?(e[t]||Object.assign(e,{[t]:{}}),a(e[t],i[t])):Object.assign(e,{[t]:i[t]}));return a(e,...t)}function r(e,t){let i=e.every(e=>"string"==typeof e),n=t.every(e=>"string"==typeof e);if(i&&n)return[...t];{let i=[...e];
1return t.forEach(e=>{let t=i.findIndex(t=>t.value===e.value);-1===t?i.push(e):i[t]=a(i[t],e)}),i}}function l(e){return e.toString().padStart(2,"0")}let d=0;function h(e,t,i,n,o=""){for(let s of Object.keys(e)){let a=o?o+"."+s:s;Array.isArray(e[s])&&Array.isArray(t[s])?e[s].length!==t[s].length?n[i].push(a):e[s].forEach((e,o)=>{"object"==typeof e&&null!==e?Object.keys(e).forEach(r=>{e[r]!==t[s][o][r]&&n[i].push(a+"["+o+"]."+r)}):e!==t[s][o]&&n[i].push(a+"["+o+"]")}):"object"==typeof e[s]&&null!==e[s]&&null!==t[s]?h(e[s],t[s],i,n,a):e[s]!==t[s]&&n[i].push(a)}}function u(e,t){let i=new Set(t);return e.filter(e=>!i.has(e))}function c(e,t,i){let[n,...o]=t;if(/\[\d+\]/.test(n)){let[t,s]=n.split(/[\[\]]/).filter(Boolean);0===o.length?e[t][parseInt(s)]=i:c(e[t][parseInt(s)],o,i)}else 0===o.length?e[n]=i:c(e[n],o,i)}function p(e,t){return t.reduce((e,t)=>{if(/\[\d+\]/.test(t)){let[i,n]=t.split(/[\[\]]/).filter(Boolean);return e[i][parseInt(n)]}return e[t]},e)}t.getContentScore=e=>e.hasViewed?2:1},371:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeFactory=void 0,t.isStoryPlayerStyle=function(e){return"object"==typeof e&&null!==e&&"titleVisible"in e&&"titleFont"in e&&"titleFontSize"in e&&"titleFontSizeEmbedded"in e&&"titleColor"in e&&"publishedDateVisible"in e&&"publishedDateFont"in e&&"publishedDateFontSize"in e&&"publishedDateFontSizeEmbedded"in e&&"publishedDateColor"in e&&"statusLiveStyle"in e&&"ctaButton"in e&&"iconsPosition"in e&&"iconsButton"in e&&"iconsButtonSize"in e&&"iconsButtonEmbeddedSize"in e&&"iconsButtonNavigation"in e&&"iconsButtonPadding"in e&&"iconsButtonOrder"in e&&"contentOrder"in e&&"icons"in e},t.isMomentPlayerStyle=function(e){return"object"==typeof e&&null!==e&&"headingText"in e&&"bodyText"in e&&"likeText"in e&&"buttons"in e&&"icons"in e&&"topIconsButtonOrder"in e&&"bottomIconsButtonOrder"in e},t.isVideoPlayerStyle=function(e){return"object"==typeof e&&null!==e&&"headingText"in e&&"buttons"in e&&"backgroundColor"in e&&"cta"in e&&"seekBar"in e&&"icons"in e};let n=i(9266),o=i(7311);function s(e){return(0,n.cloneDeep)({layoutStyle:o.Presets.Default,playerStyle:a(e)})}function a(e){switch(e){case"moment":return o.Presets.DefaultMomentStyle;case"story":default:return o.Presets.DefaultStoryStyle;case"video":return o.Presets.DefaultVideoStyle}}t.ThemeFactory=class{static create(e="default",t="story"){var i,r,l,d,h,u,c;let p="moment"===t,g="video"===t;switch(p||"story"===t||g||(t="story"),e){case"grid-2-columns":return i=t,(0,n.cloneDeep)({layoutStyle:o.Presets.Grid2Column,playerStyle:a(i)});case"grid-3-columns":return r=t,(0,n.cloneDeep)({layoutStyle:o.Presets.Grid3Column,playerStyle:a(r)});case"grid-3-columns-horizontal":return l=t,(0,n.cloneDeep)({layoutStyle:o.Presets.Grid3ColumnHorizontal,playerStyle:a(l)});case"grid-2-columns-horizontal":return d=t,(0,n.cloneDeep)({layoutStyle:o.Presets.Grid2ColumnHorizontal,playerStyle:a(d)});case"row-circle":return h=t,(0,n.cloneDeep)({layoutStyle:o.Presets.RowCircle,playerStyle:a(h)});case"row-rectangle":return u=t,(0,n.cloneDeep)({layoutStyle:o.Presets.RowRectangle,playerStyle:a(u)});case"row-rectangle-animated":return p||g?function(e){let t;switch(e){case"moment":t=o.Presets.RowRectangleAnimated;break;case"video":t=o.Presets.RowHorizontalRectangleAnimated}return(0,n.cloneDeep)({layoutStyle:t,playerStyle:a(e)})}(t):s(t);case"row-rectangle-horizontal":return c=t,(0,n.cloneDeep)({layoutStyle:o.Presets.RowHorizontalRectangle,playerStyle:a(c)});default:return s(t)}}}},373:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CDN_VENDOR_TO_STORAGE_DOMAIN=t.FRONT_DOOR_STORAGE_CDN=t.CLOUDFRONT_STORAGE_CDN=t.CDN_VENDOR_TO_API_DOMAIN=t.BASE_API_PATH=t.FRONT_DOOR_REGION_CDN=t.CLOUDFRONT_REGION_CDN=void 0,t.CLOUDFRONT_REGION_CDN="https://blazesdk-prod-cdn.clipro.tv",t.FRONT_DOOR_REGION_CDN="https://blazesdk-prod-cdn-fd.clipro.tv",t.BASE_API_PATH="api/blazesdk/v1.3",t.CDN_VENDOR_TO_API_DOMAIN={cf:t.CLOUDFRONT_REGION_CDN,fd:t.FRONT_DOOR_REGION_CDN},t.CLOUDFRONT_STORAGE_CDN="https://sdk.mvp.fan",t.FRONT_DOOR_STORAGE_CDN="https://sdk-fd.mvp.fan",t.CDN_VENDOR_TO_STORAGE_DOMAIN={cf:t.CLOUDFRONT_STORAGE_CDN,fd:t.FRONT_DOOR_STORAGE_CDN}},392:(e,t)=>{"use strict";var i,n;
1Object.defineProperty(t,"__esModule",{value:!0}),t.positionMap=t.ButtonNavigation=void 0,(n=i||(t.ButtonNavigation=i={}))[n.PREV_STORY=0]="PREV_STORY",n[n.NEXT_STORY=1]="NEXT_STORY",n[n.PREV_PAGE=2]="PREV_PAGE",n[n.NEXT_PAGE=3]="NEXT_PAGE",t.positionMap={LEFT:"flex-start",CENTER:"center",RIGHT:"flex-end"}},432:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},473:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CLOSED_CAPTIONS_LANGUAGE_CHANGE=t.LOCAL_STORAGE_KEY_LAST_SELECTED=t.LOCAL_STORAGE_KEY_RECENT_LANGUAGES=void 0;let n=i(5990);t.LOCAL_STORAGE_KEY_RECENT_LANGUAGES=n.WSC_STORAGE_PREFIX+"cc-recent-languages",t.LOCAL_STORAGE_KEY_LAST_SELECTED=n.WSC_STORAGE_PREFIX+"cc-selected-language",t.CLOSED_CAPTIONS_LANGUAGE_CHANGE="cc-language-change"},541:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.AdService=void 0;let o=i(4403),s=i(9126),a=i(611),r={method:"HEAD",mode:"no-cors"};class l extends(0,o.Singleton)(){constructor(){super(...arguments),this.canRunAds=!1}init(){return n(this,void 0,void 0,function*(){try{yield fetch("https://securepubads.g.doubleclick.net/pagead/ppub_config",r),yield fetch("https://imasdk.googleapis.com/js/sdkloader/ima3.js",r),this.canRunAds=!0}catch(e){this.canRunAds=!1}})}pushAdsBetweenStories(e,t,i,n,o,r,l="Full Screen"){var d;if(!this.canRunAds||"EveryXStories"!==(null===(d=null==e?void 0:e.configuration)||void 0===d?void 0:d.adsLocationType)||n>=i.length-1)return;let h=n-o,u=e.configuration.adLocationsIndexes[0];if("Web"===e.type&&e.path){if(n<o||(h+1)%u!=0)return;let i="ad-between-stories-"+(0,a.v4)(),d=new s.BlazeWidgetStory(r,l),c={description:"",isLive:!1,pages:[{id:i+"-page",type:"Ad",duration:5,ignoreReadStatusForStory:!1,hasViewed:!1,createTime:new Date().toLocaleString(),adInfo:e}],isAd:!0,id:i,title:"",updateTime:"",createTime:"",thumbnails:[],hasViewed:!1,extraInfo:{}};d.setData(c),t.push(d)}else if("IMA"===e.type&&e.tag){if(n<=o||h%u!=0)return;t[n].shouldShowImaAdOnStart=!0,t[n].adInfo=e}}pushAdsBetweenMoments(e,t,i,n,o){var r,l,d;if(!this.canRunAds)return;let h=null!==(l=null===(r=null==e?void 0:e.configuration)||void 0===r?void 0:r.adLocationsIndexes[0])&&void 0!==l?l:1;if("Moment"!==(null===(d=null==e?void 0:e.configuration)||void 0===d?void 0:d.type)||h>1&&n<=o)return;let u=n-o;if("Web"===e.type&&e.path){if(n>=i.length-1||(u+1)%h!=0)return;let o="ad-between-moments-"+(0,a.v4)(),r=new s.BlazeWidgetMoment;return r.adInfo=e,r.setData({id:o,type:"Ad",adInfo:e,duration:"5",thumbnails:[],likes:0,baseLayer:{type:"Video",content:{renditions:[]}},poster:{rendition:{url:"",aspectRatio:"Vertical",bitRate:0,fileSize:0},type:"Image"},cta:{type:"Web",url:"",text:"",backgroundColor:"",textColor:"",enhancements:null},momentIndexInPlaylist:0,title:"",updateTime:"",createTime:"",hasViewed:!1,isAd:!0,extraInfo:{}}),t.push(r),r}if("IMA"===e.type&&e.tag){if(0===u||u%h!=0)return;t[n].shouldShowImaAdOnStart=!0,t[n].adInfo=e}}}t.AdService=l.getInstance()},542:()=>{},551:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.VideoPlayerCommands=void 0;let o=i(1908);t.VideoPlayerCommands=class{constructor(e,t){this.playbackStrategy=e,this.videoElement=t,this.commands=new Map([["play",new o.PlayCommand(e,this.videoElement.videoPlayerState)],["pause",new o.PauseCommand(e)],["toggleMute",new o.ToggleMuteCommand(e)],["mute",new o.MuteCommand(e,this.videoElement.videoPlayerState)],["unmute",new o.UnmuteCommand(e,this.videoElement.videoPlayerState)],["toggleFullscreen",new o.ToggleFullscreenCommand(e,t)],["seek",new o.SeekCommand(e)],["likeVideo",new o.LikeVideoCommand(t)]])}executeCommand(e,...t){return n(this,void 0,void 0,function*(){let i=this.commands.get(e);if(i)try{return yield i.execute(...t)}catch(e){throw e}})}}},611:(e,t,i)=>{"use strict";i.r(t),i.d(t,{NIL:()=>P,parse:()=>y,stringify:()=>d,v1:()=>v,v3:()=>I,v4:()=>M,v5:()=>_,validate:()=>a,version:()=>L});var n=new Uint8Array(16);function o(){if(!h&&!(h="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return h(n)}let s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,a=function(e){return"string"==typeof e&&s.test(e)};for(var r=[],l=0;l<256;++l)r.push((l+256).toString(16).substr(1));let d=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=(r[e[t+0]]+r[e[t+1]]+r[e[t+2]]+r[e[t+3]]+"-"+r[e[t+4]]+r[e[t+5]]+"-"+r[e[t+6]]+r[e[t+7]]+"-"+r[e[t+8]]+r[e[t+9]]+"-"+r[e[t+10]]+r[e[t+11]]+r[e[t+12]]+r[e[t+13]]+r[e[t+14]]+r[e[t+15]]).toLowerCase();
1if(!a(i))throw TypeError("Stringified UUID is invalid");return i};var h,u,c,p=0,g=0;let v=function(e,t,i){var n=t&&i||0,s=t||Array(16),a=(e=e||{}).node||u,r=void 0!==e.clockseq?e.clockseq:c;if(null==a||null==r){var l=e.random||(e.rng||o)();null==a&&(a=u=[1|l[0],l[1],l[2],l[3],l[4],l[5]]),null==r&&(r=c=16383&(l[6]<<8|l[7]))}var h=void 0!==e.msecs?e.msecs:Date.now(),v=void 0!==e.nsecs?e.nsecs:g+1,y=h-p+(v-g)/1e4;if(y<0&&void 0===e.clockseq&&(r=r+1&16383),(y<0||h>p)&&void 0===e.nsecs&&(v=0),v>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");p=h,g=v,c=r;var m=(1e4*(268435455&(h+=122192928e5))+v)%4294967296;s[n++]=m>>>24&255,s[n++]=m>>>16&255,s[n++]=m>>>8&255,s[n++]=255&m;var b=h/4294967296*1e4&268435455;s[n++]=b>>>8&255,s[n++]=255&b,s[n++]=b>>>24&15|16,s[n++]=b>>>16&255,s[n++]=r>>>8|128,s[n++]=255&r;for(var f=0;f<6;++f)s[n+f]=a[f];return t||d(s)},y=function(e){if(!a(e))throw TypeError("Invalid UUID");var t,i=new Uint8Array(16);return i[0]=(t=parseInt(e.slice(0,8),16))>>>24,i[1]=t>>>16&255,i[2]=t>>>8&255,i[3]=255&t,i[4]=(t=parseInt(e.slice(9,13),16))>>>8,i[5]=255&t,i[6]=(t=parseInt(e.slice(14,18),16))>>>8,i[7]=255&t,i[8]=(t=parseInt(e.slice(19,23),16))>>>8,i[9]=255&t,i[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,i[11]=t/4294967296&255,i[12]=t>>>24&255,i[13]=t>>>16&255,i[14]=t>>>8&255,i[15]=255&t,i};function m(e,t,i){function n(e,n,o,s){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],i=0;i<e.length;++i)t.push(e.charCodeAt(i));return t}(e)),"string"==typeof n&&(n=y(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var a=new Uint8Array(16+e.length);if(a.set(n),a.set(e,n.length),(a=i(a))[6]=15&a[6]|t,a[8]=63&a[8]|128,o){s=s||0;for(var r=0;r<16;++r)o[s+r]=a[r];return o}return d(a)}try{n.name=e}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}function b(e){return 14+(e+64>>>9<<4)+1}function f(e,t){var i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function S(e,t,i,n,o,s){var a;return f((a=f(f(t,e),f(n,s)))<<o|a>>>32-o,i)}function E(e,t,i,n,o,s,a){return S(t&i|~t&n,e,t,o,s,a)}function C(e,t,i,n,o,s,a){return S(t&n|i&~n,e,t,o,s,a)}function T(e,t,i,n,o,s,a){return S(t^i^n,e,t,o,s,a)}function A(e,t,i,n,o,s,a){return S(i^(t|~n),e,t,o,s,a)}let I=m("v3",48,function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var i=0;i<t.length;++i)e[i]=t.charCodeAt(i)}return function(e){for(var t=[],i=32*e.length,n="0123456789abcdef",o=0;o<i;o+=8){var s=e[o>>5]>>>o%32&255,a=parseInt(n.charAt(s>>>4&15)+n.charAt(15&s),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[b(t)-1]=t;for(var i=1732584193,n=-271733879,o=-1732584194,s=271733878,a=0;a<e.length;a+=16){var r=i,l=n,d=o,h=s;i=E(i,n,o,s,e[a],7,-680876936),s=E(s,i,n,o,e[a+1],12,-389564586),o=E(o,s,i,n,e[a+2],17,606105819),n=E(n,o,s,i,e[a+3],22,-1044525330),i=E(i,n,o,s,e[a+4],7,-176418897),s=E(s,i,n,o,e[a+5],12,1200080426),o=E(o,s,i,n,e[a+6],17,-1473231341),n=E(n,o,s,i,e[a+7],22,-45705983),i=E(i,n,o,s,e[a+8],7,1770035416),s=E(s,i,n,o,e[a+9],12,-1958414417),o=E(o,s,i,n,e[a+10],17,-42063),n=E(n,o,s,i,e[a+11],22,-1990404162),i=E(i,n,o,s,e[a+12],7,1804603682),s=E(s,i,n,o,e[a+13],12,-40341101),o=E(o,s,i,n,e[a+14],17,-1502002290),i=C(i,n=E(n,o,s,i,e[a+15],22,1236535329),o,s,e[a+1],5,-165796510),s=C(s,i,n,o,e[a+6],9,-1069501632),o=C(o,s,i,n,e[a+11],14,643717713),n=C(n,o,s,i,e[a],20,-373897302),i=C(i,n,o,s,e[a+5],5,-701558691),s=C(s,i,n,o,e[a+10],9,38016083),o=C(o,s,i,n,e[a+15],14,-660478335),n=C(n,o,s,i,e[a+4],20,-405537848),i=C(i,n,o,s,e[a+9],5,568446438),s=C(s,i,n,o,e[a+14],9,-1019803690),o=C(o,s,i,n,e[a+3],14,-187363961),n=C(n,o,s,i,e[a+8],20,1163531501),i=C(i,n,o,s,e[a+13],5,-1444681467),s=C(s,i,n,o,e[a+2],9,-51403784),o=C(o,s,i,n,e[a+7],14,1735328473),i=T(i,n=C(n,o,s,i,e[a+12],20,-1926607734),o,s,e[a+5],4,-378558),s=T(s,i,n,o,e[a+8],11,-2022574463),o=T(o,s,i,n,e[a+11],16,1839030562),n=T(n,o,s,i,e[a+14],23,-35309556),i=T(i,n,o,s,e[a+1],4,-1530992060),s=T(s,i,n,o,e[a+4],11,1272893353),o=T(o,s,i,n,e[a+7],16,-155497632),n=T(n,o,s,i,e[a+10],23,-1094730640),i=T(i,n,o,s,e[a+13],4,681279174),s=T(s,i,n,o,e[a],11,-358537222),o=T(o,s,i,n,e[a+3],16,-722521979),n=T(n,o,s,i,e[a+6],23,76029189),i=T(i,n,o,s,e[a+9],4,-640364487),s=T(s,i,n,o,e[a+12],11,-421815835),o=T(o,s,i,n,e[a+15],16,530742520),i=A(i,n=T(n,o,s,i,e[a+2],23,-995338651),o,s,e[a],6,-198630844),s=A(s,i,n,o,e[a+7],10,1126891415),o=A(o,s,i,n,e[a+14],15,-1416354905),n=A(n,o,s,i,e[a+5],21,-57434055),i=A(i,n,o,s,e[a+12],6,1700485571),s=A(s,i,n,o,e[a+3],10,-1894986606),o=A(o,s,i,n,e[a+10],15,-1051523),n=A(n,o,s,i,e[a+1],21,-2054922799),i=A(i,n,o,s,e[a+8],6,1873313359),s=A(s,i,n,o,e[a+15],10,-30611744),o=A(o,s,i,n,e[a+6],15,-1560198380),n=A(n,o,s,i,e[a+13],21,1309151649),i=A(i,n,o,s,e[a+4],6,-145523070),s=A(s,i,n,o,e[a+11],10,-1120210379),o=A(o,s,i,n,e[a+2],15,718787259),n=A(n,o,s,i,e[a+9],21,-343485551),i=f(i,r),n=f(n,l),o=f(o,d),s=f(s,h)}return[i,n,o,s]}(function(e){if(0===e.length)return[];for(var t=8*e.length,i=new Uint32Array(b(t)),n=0;n<t;n+=8)i[n>>5]|=(255&e[n/8])<<n%32;return i}(e),8*e.length))}),M=function(e,t,i){var n=(e=e||{}).random||(e.rng||o)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){i=i||0;for(var s=0;s<16;++s)t[i+s]=n[s];return t}return d(n)};function w(e,t){return e<<t|e>>>32-t}let _=m("v5",80,function(e){var t=[1518500249,1859775393,2400959708,3395469782],i=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var o=0;o<n.length;++o)e.push(n.charCodeAt(o))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var s=e.length/4+2,a=Math.ceil(s/16),r=Array(a),l=0;l<a;++l){for(var d=new Uint32Array(16),h=0;h<16;++h)d[h]=e[64*l+4*h]<<24|e[64*l+4*h+1]<<16|e[64*l+4*h+2]<<8|e[64*l+4*h+3];r[l]=d}r[a-1][14]=8*(e.length-1)/4294967296,r[a-1][14]=Math.floor(r[a-1][14]),r[a-1][15]=8*(e.length-1)&4294967295;for(var u=0;u<a;++u){for(var c=new Uint32Array(80),p=0;p<16;++p)c[p]=r[u][p];for(var g=16;g<80;++g)c[g]=w(c[g-3]^c[g-8]^c[g-14]^c[g-16],1);for(var v=i[0],y=i[1],m=i[2],b=i[3],f=i[4],S=0;S<80;++S){var E=Math.floor(S/20),C=w(v,5)+function(e,t,i,n){switch(e){case 0:return t&i^~t&n;case 1:case 3:return t^i^n;case 2:return t&i^t&n^i&n}}(E,y,m,b)+f+t[E]+c[S]>>>0;f=b,b=m,m=w(y,30)>>>0,y=v,v=C}i[0]=i[0]+v>>>0,i[1]=i[1]+y>>>0,i[2]=i[2]+m>>>0,i[3]=i[3]+b>>>0,i[4]=i[4]+f>>>0}return[i[0]>>24&255,i[0]>>16&255,i[0]>>8&255,255&i[0],i[1]>>24&255,i[1]>>16&255,i[1]>>8&255,255&i[1],i[2]>>24&255,i[2]>>16&255,i[2]>>8&255,255&i[2],i[3]>>24&255,i[3]>>16&255,i[3]>>8&255,255&i[3],i[4]>>24&255,i[4]>>16&255,i[4]>>8&255,255&i[4]]}),P="00000000-0000-0000-0000-000000000000",L=function(e){if(!a(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},612:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetScrollable=void 0;let n=i(4403);class o extends n.BaseWidget{constructor(){super(),this.buttonsState=[],this.totalMovement=0,this.boundOnClickEvent=this.onClick.bind(this),this.boundOnMouseWheelEvent=this.onMouseWheel.bind(this),this.boundOnMouseMoveEvent=this.onMouseMove.bind(this)}connectedCallback(){this.style.userSelect="none",this.addEventListener("click",this.boundOnClickEvent,!0),this.addEventListener("mousemove",this.boundOnMouseMoveEvent),this.addEventListener("wheel",this.boundOnMouseWheelEvent)}disconnectedCallback(){this.removeEventListener("click",this.boundOnClickEvent),this.removeEventListener("mousemove",this.boundOnMouseMoveEvent),this.removeEventListener("wheel",this.boundOnMouseWheelEvent)}onClick(e){this.totalMovement>10&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation())}onMouseMove(e){1&~e.buttons?this.totalMovement=0:(this.scrollBy({top:-e.movementY,left:-e.movementX}),(e.movementX>0||e.movementX<0)&&(this.totalMovement+=Math.abs(e.movementX)),(e.movementY>0||e.movementY<0)&&(this.totalMovement+=Math.abs(e.movementY)))}onMouseWheel(e){this.scrollBy({top:0,left:e.deltaX})}render(){}}t.BlazeWidgetScrollable=o},636:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},656:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlaybackStrategyFactory=void 0;let n=i(1908),o=i(6610),s=i(1532);t.PlaybackStrategyFactory=class{static createStrategy(e,t,i,a){switch(t){case"LONG_FORM_HLS":return new n.LongFormHlsStrategy(e,a);case"SHORT_FORM_HLS":return new o.ShortFormHLSStrategy(e,a);case"NATIVE":if(!i)throw Error("Widget parameter required for NATIVE strategy");return new s.NativeVideoStrategy(e,i,a);default:throw Error("Unsupported playback strategy type: "+t)}}}},683:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},763:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},817:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StartupService=void 0;let o=i(4545),s=i(4403);class a extends(0,s.Singleton)(){init(e){return n(this,void 0,void 0,function*(){e.staticContent||(yield o.CDNDetermineService.init()),yield o.ConfigService.init(e),yield o.VideoPlayerService.init(),yield o.ErrorService.init(),yield o.VideoCacheService.init(),yield o.ApiService.init(),yield o.AppConfigurationService.init(e),yield o.UserService.init(),yield o.AnalyticsService.init(),yield o.WidgetsService.init(),yield o.EventService.init(),yield o.DatabaseService.init(),yield o.AdService.init(),yield o.LoggerService.init(),yield o.InteractionService.init(),yield o.MomentService.init(),yield o.StoryService.init(),yield o.VideoService.init()})}}t.StartupService=a.getInstance()},941:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},961:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ASPECT_RATIO_4_3_STRING=t.ASPECT_RATIO_9_16_STRING=t.ASPECT_RATIO_16_9_STRING=t.ASPECT_RATIO_4_3=t.ASPECT_RATIO_9_16=t.ASPECT_RATIO_16_9=t.DESKTOP_PADDING_BOTTOM=t.TABLET_PADDING_BOTTOM=void 0,t.TABLET_PADDING_BOTTOM="15px",t.DESKTOP_PADDING_BOTTOM="40px",t.ASPECT_RATIO_16_9=16/9,t.ASPECT_RATIO_9_16=.5625,t.ASPECT_RATIO_4_3=4/3,t.ASPECT_RATIO_16_9_STRING="16 / 9",t.ASPECT_RATIO_9_16_STRING="9 / 16",t.ASPECT_RATIO_4_3_STRING="4 / 3"},997:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.DatabaseService=void 0;let o=i(4403),s=i(3612),a=i(4545);class r extends(0,o.Singleton)(){constructor(){super(...arguments),this.database={}}init(){return n(this,void 0,void 0,function*(){try{this.database=new s.Database({databaseName:"blaze-store",version:6}),yield this.database.init()}catch(e){a.EventBusService.publish("BlazeDatabaseServiceFailed",{error:e})}})}getUserId(){return n(this,void 0,void 0,function*(){try{return yield this.database.get(s.DB_NAMES.USER,"user_id")}catch(e){throw e}})}updateUserId(e){return n(this,void 0,void 0,function*(){try{return yield this.database.update(s.DB_NAMES.USER,{id:"user_id",value:e})}catch(e){throw e}})}getPageViewed(e){return n(this,void 0,void 0,function*(){try{return yield this.database.get(s.DB_NAMES.STORIES,e)}catch(e){throw e}})}updatePageViewed(e,t){return n(this,void 0,void 0,function*(){try{return yield this.database.update(s.DB_NAMES.STORIES,{id:e,storyId:t})}catch(e){throw e}})}isPageViewed(e){return n(this,void 0,void 0,function*(){try{let{data:t,error:i}=yield this.getPageViewed(e);return!i&&t}catch(e){return!1}})}enrichStories(e){return n(this,void 0,void 0,function*(){try{for(let t of(Object.keys(this.database).length||(yield this.init()),e))for(let e of t.pages){let t=yield this.isPageViewed(e.id);if(e.hasViewed=t,"Content"===e.type&&e.interaction){let t=yield this.getInteraction(e.interaction.id);(null==t?void 0:t.data)&&!t.error&&(yield this.updateInteraction({id:e.interaction.id,initData:e.interaction.initData,userResponse:t.data.userResponse}))}}return e}catch(t){return e}})}updateInteraction(e){return n(this,void 0,void 0,function*(){try{return yield this.database.update(s.DB_NAMES.INTERACTIONS,e)}catch(e){throw e}})}getInteraction(e){return n(this,void 0,void 0,function*(){try{return yield this.database.get(s.DB_NAMES.INTERACTIONS,e)}catch(e){return null}})}updateMomentLike(e,t){return n(this,void 0,void 0,function*(){try{return yield this.database.update(s.DB_NAMES.MOMENTS,{id:e,liked:t,viewed:!0})}catch(e){return null}})}getMomentLike(e){return n(this,void 0,void 0,function*(){try{return yield this.database.get(s.DB_NAMES.MOMENTS,e)}catch(e){return null}})}updateViewedMoment(e){return n(this,void 0,void 0,function*(){var t,i;try{let n=yield this.getMomentLike(e),o={id:e,viewed:!0,liked:null!==(i=null===(t=null==n?void 0:n.data)||void 0===t?void 0:t.liked)&&void 0!==i&&i};return yield this.database.update(s.DB_NAMES.MOMENTS,o)}catch(e){throw null}})}getViewedMoment(e){return n(this,void 0,void 0,function*(){try{let{data:t}=yield this.database.get(s.DB_NAMES.MOMENTS,e);return!!t}catch(e){return!1}})}enrichMoments(e){return n(this,void 0,void 0,function*(){for(let t of(Object.keys(this.database).length||(yield this.init()),e))t.hasViewed=yield this.getViewedMoment(t.id);return e})}updateVideoReadStatus(e,t){return n(this,void 0,void 0,function*(){if(!e)throw Error("videoId is required to update read status.");try{let t;let i=yield this.database.get(s.DB_NAMES.VIDEOS,e);if(i&&i.data)return;t={liked:!1,id:e,currentTime:0,posterCurrentTime:""},yield this.database.update(s.DB_NAMES.VIDEOS,t)}catch(e){throw e}})}getVideoData(e){return n(this,void 0,void 0,function*(){if(!e)return null;try{let t=yield this.database.get(s.DB_NAMES.VIDEOS,e);return t&&t.data?t.data:null}catch(e){return null}})}updateVideoData(e,t){return n(this,void 0,void 0,function*(){if(!e)throw Error("videoId is required to update video data.");try{let i;let n=yield this.database.get(s.DB_NAMES.VIDEOS,e);i=n&&n.data?Object.assign(Object.assign({},n.data),t):Object.assign({liked:!1,id:e,currentTime:0,posterCurrentTime:""},t),yield this.database.update(s.DB_NAMES.VIDEOS,i)}catch(e){throw e}})}getVideoLike(e){return n(this,void 0,void 0,function*(){try{return yield this.database.get(s.DB_NAMES.VIDEOS,e)}catch(e){return null}})}getVideoPosterById(e){return n(this,void 0,void 0,function*(){if(e)try{let t=yield this.database.get(s.DB_NAMES.VIDEOS,e);return t&&t.data?t.data.posterCurrentTime:void 0}catch(e){return}})}addLog(e){return n(this,void 0,void 0,function*(){try{yield this.database.update(s.DB_NAMES.LOGS,e)}catch(e){throw e}})}getLogs(e){return n(this,void 0,void 0,function*(){try{return(yield this.database.getAll(s.DB_NAMES.LOGS)).sort((e,t)=>
1t.priority-e.priority||new Date(e.timestamp).getTime()-new Date(t.timestamp).getTime()).slice(0,e)}catch(e){return[]}})}removeLogs(e){return n(this,void 0,void 0,function*(){try{for(let t of e)yield this.database.delete(s.DB_NAMES.LOGS,t)}catch(e){throw e}})}clearLogs(){return n(this,void 0,void 0,function*(){try{let e=(yield this.database.getAll(s.DB_NAMES.LOGS)).map(e=>e.id);yield this.removeLogs(e)}catch(e){throw e}})}getLogCount(){return n(this,void 0,void 0,function*(){try{return(yield this.database.getAll(s.DB_NAMES.LOGS)).length}catch(e){return 0}})}}t.DatabaseService=r.getInstance()},1006:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasePlaybackStrategy=void 0;let n=i(4545);t.BasePlaybackStrategy=class{constructor(){this.videoPlayerState=n.VideoPlayerService,this.playAttemptStartTime=0}setContentMetadata(e){this.contentId=e.contentId,this.contentTitle=e.contentTitle,this.contentType=e.contentType,this.sessionId=e.sessionId}dispatchPlaybackEvent(e,t){var i,n;if("true"!==new URLSearchParams(window.location.search).get("wsc_e2e_testing_events"))return;let o={eventType:"playback_"+e,timestamp:Date.now(),contentId:this.contentId,contentTitle:this.contentTitle,contentType:this.contentType||"video",videoState:{readyState:this.video.readyState,readyStateText:["HAVE_NOTHING","HAVE_METADATA","HAVE_CURRENT_DATA","HAVE_FUTURE_DATA","HAVE_ENOUGH_DATA"][this.video.readyState],networkState:this.video.networkState,networkStateText:["NETWORK_EMPTY","NETWORK_IDLE","NETWORK_LOADING","NETWORK_NO_SOURCE"][this.video.networkState],paused:this.video.paused,ended:this.video.ended,currentTime:this.video.currentTime,duration:this.video.duration,src:this.video.currentSrc||this.video.src,muted:this.video.muted,volume:this.video.volume},timing:{timeToPlay:t.timeToPlay,timeToFail:t.timeToFail},status:null===(i=t.result)||void 0===i?void 0:i.status,error:(null===(n=t.result)||void 0===n?void 0:n.error)||t.error,previousState:t.previousState,newState:t.newState,playerContext:{sessionId:this.sessionId,globalState:{isPlaying:this.videoPlayerState.isPlaying,isMuted:this.videoPlayerState.isMuted,playerLayout:this.videoPlayerState.playerLayout},actualVideoState:{muted:this.video.muted,paused:this.video.paused,playing:!this.video.paused&&!this.video.ended&&this.video.readyState>2},stateMismatch:{mutedMismatch:this.videoPlayerState.isMuted!==this.video.muted,playingMismatch:this.videoPlayerState.isPlaying!==(!this.video.paused&&!this.video.ended&&this.video.readyState>2)}}};window.dispatchEvent(new CustomEvent("blaze:playback_"+e,{detail:o,bubbles:!0,composed:!0})),window.dispatchEvent(new CustomEvent("blaze:video_lifecycle",{detail:Object.assign(Object.assign({},o),{lifecycleType:"playback_"+e}),bubbles:!0,composed:!0}))}}},1046:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetVideo=void 0;let o=i(9126),s=i(1908),a=i(4403),r=i(6450),l=i(9702),d=i(9965),h=i(8921),u=i(4545),c=i(9266),p=i(3214);class g extends o.BlazeWidgetVideoBase{static get observedAttributes(){return["is-captions-visible"]}constructor(e){var t;super(),this.contentParent=e,this.interactionElement=h.WidgetsFactory.create("blaze-widget-interaction"),this.captionsElement=h.WidgetsFactory.create("blaze-widget-captions"),this.eventRenderBackgroundPercentageTriggered=[!1,!1],this.lastErrorExecutionTime=0,this.videoFormat="mp4",this.isVideoStartPlaying=!1,this.isError=!0,this.isLoaded=!1,this.isVideoRunning=!1,this.isUnloading=!1,this.maxRetryTimes=5,this.shouldShowImaAd=!1,this.isCurrentlyTryingToRunImaAd=!1,this.hasPoster=!1,this.videoPlayerState=u.VideoPlayerService,this.boundHandleAdStarted=this.handleAdStarted.bind(this),this.boundHandleAdEnded=this.handleAdEnded.bind(this),this.beforeContentPlayService=new u.BeforeContentPlayService,e instanceof o.BlazeWidgetStory&&(this.videoPlayerState=e.videoPlayerState||u.VideoPlayerService),this.widgetVastAd=new o.BlazeWidgetVastAd(this.getContentType(),this.contentParent.getRefferingObject.bind(this),this.videoPlayerState),this.source=document.createElement("source"),this.video=document.createElement("video"),this.loader=h.WidgetsFactory.create("blaze-loader"),this.style.width="100%",this.style.height="100%",this.style.position="absolute",this.style.top="0",this.style.right="0",this.style.bottom="0",this.style.left="0",this.style.display="block",this.loader.style.top="45%",this.loader.style.margin="0 auto",this.video.style.top="0",this.video.style.objectFit="contain",this.video.style.position="absolute",this.video.style.width="100%",this.video.style.maxHeight="100%","Horizontal"===(null===(t=this.contentParent)||void 0===t?void 0:t.as
1pectRatio)&&(this.video.style.height="100%")}attributeChangedCallback(e,t,i){"is-captions-visible"===e&&t!==i&&this.captionsElement.setAttribute("is-visible",i)}connectedCallback(){var e;this.boundLanguageChangeEvent=this.onLanguageChange.bind(this),this.addEventListener(d.InternalEvent.AD_STARTED,this.boundHandleAdStarted),this.addEventListener(d.InternalEvent.AD_ENDED,this.boundHandleAdEnded),this.setAttribute("data-testid","blaze-widget-story-video-"+(null===(e=this.data)||void 0===e?void 0:e.id)),this.video.onended=this.onended,this.videoFrameCallback=this.requestFrameCallback,this.video.addEventListener("playing",()=>{var e;(null===(e=this.loader)||void 0===e?void 0:e.isConnected)&&this.removeLoader()}),this.video.addEventListener("timeupdate",()=>{var e;let t=this.currentTime/this.duration*100,i=[1,50];for(let n=0;n<i.length;n++)t>=i[n]&&!this.eventRenderBackgroundPercentageTriggered[n]&&(null===(e=this.videoFrameCallback)||void 0===e||e.call(this),this.eventRenderBackgroundPercentageTriggered[n]=!0)}),this.appendChild(this.video),c.SharedEventTarget.addEventListener(r.CLOSED_CAPTIONS_LANGUAGE_CHANGE,this.boundLanguageChangeEvent),this.appendChild(this.widgetVastAd),this.render()}disconnectedCallback(){this.removeLoader(),c.SharedEventTarget.removeEventListener(r.CLOSED_CAPTIONS_LANGUAGE_CHANGE,this.boundLanguageChangeEvent),this.removeEventListener(d.InternalEvent.AD_STARTED,this.boundHandleAdStarted),this.removeEventListener(d.InternalEvent.AD_ENDED,this.boundHandleAdEnded)}getContentType(){return this.contentParent instanceof o.BlazeWidgetStory?"story":this.contentParent instanceof o.BlazeWidgetMoment?"moment":"story"}getOriginalVideoUrl(){var e,t,i,n,o,s;if("Content"!==(null===(e=this.data)||void 0===e?void 0:e.type))return;let a=null!==(o=null===(n=null===(i=null===(t=this.data)||void 0===t?void 0:t.baseLayer)||void 0===i?void 0:i.content)||void 0===n?void 0:n.renditions)&&void 0!==o?o:[],r=this.contentParent.aspectRatio,l=a.filter(e=>{var t,i;return"hls"===(null===(t=e.fileType)||void 0===t?void 0:t.toLowerCase())||(null===(i=e.url)||void 0===i?void 0:i.includes(".m3u8"))});if(l.length>0){let e=l.find(e=>e.aspectRatio===r);return e?e.url:l[0].url}let d=a.filter(e=>{var t,i;return"mp4"===(null===(t=e.fileType)||void 0===t?void 0:t.toLowerCase())||(null===(i=e.url)||void 0===i?void 0:i.includes(".mp4"))});if(d.length>0){let e=d.find(e=>e.aspectRatio===r);return e?e.url:d[0].url}let h=null!==(s=a.find(e=>e.aspectRatio===r))&&void 0!==s?s:a[0];return null==h?void 0:h.url}setData(e){this.data=e,this.data&&"Content"===this.data.type&&(this.videoUrl=this.getOriginalVideoUrl(),this.shouldShowImaAd=!!e.shouldShowImaAd)}getGoogleIMA(){var e;return null===(e=window.google)||void 0===e?void 0:e.ima}isEnableInteractions(e){return"Content"===(null==e?void 0:e.type)&&"Vertical"===this.contentParent.aspectRatio}loadClosedCaptions(){return n(this,void 0,void 0,function*(){var e,t,i,n,s,a;if(!u.ConfigService.shouldAllowClosedCaptions||"Content"!==(null===(e=this.data)||void 0===e?void 0:e.type)||!(null===(i=null===(t=this.data)||void 0===t?void 0:t.closedCaptions)||void 0===i?void 0:i.length)||!(null===(s=null===(n=this.data.closedCaptions[0])||void 0===n?void 0:n.files)||void 0===s?void 0:s.length)||this.contentParent instanceof o.BlazeWidgetStory&&"Embedded"===this.contentParent.mode)return;let l=null===(a=this.data.closedCaptions)||void 0===a?void 0:a.find(e=>""+e.language===localStorage.getItem(r.LOCAL_STORAGE_KEY_LAST_SELECTED));l?(this.captionsElement.isConnected||this.append(this.captionsElement),yield this.captionsElement.initialize(this.video,l.files),this.setAttribute("is-captions-visible","true")):(this.setAttribute("is-captions-visible","false"),this.captionsElement.isConnected&&this.captionsElement.remove())})}getVideoDuration(e){return n(this,void 0,void 0,function*(){if(this.playbackStrategy){let e=this.playbackStrategy.getDuration();if(e&&!isNaN(e)&&e>0)return e}let t=e||this.video;return t&&!isNaN(t.duration)&&t.duration>0?t.duration:this.videoUrl?(0,p.getVideoDuration)(t,this.videoUrl):0})}determinePosterUrl(){var e,t,i,n,o,s,a,r,l,d;if("Content"!==(null===(e=this.data)||void 0===e?void 0:e.type))return;let h=null!==(i=null===(t=this.data.thumbnail)||void 0===t?void 0:t.renditions)&&void 0!==i?i:[],u=null===(n=null==h?void 0:h.find(e=>e.aspectRatio===this.contentParent.aspectRatio))||void 0===n?void 0:n.url,c=null===(o=null==h?void 0:h[0])||void 0===o?void 0:o.url,p=(null===(a=null===(s=this.data.thumbnail)||void 0===s?void 0:s.rendition)||void 0===a?void 0:a.url)||(null===(l=null===(r=this.data.poster)||void 0===r?void 0:r.rendition)||void 0===l?void 0:l.url);return null!==(d=null!=u?u:c)&&void 0!==d?d:p}loadPoster(){var e;if("Content"===(null===(e=this.data)||void 0===e?void 0:e.type)){let e=this.determinePosterUrl();e?(this.video.poster=e,(0,c.fetchPosterWithHighPriority)(e),this.hasPoster=!0):(this.video.poster="",this.hasPoster=!1)}}display(){this.style.visibility="visible",this.shouldShowImaAd?this.isCurrentlyTryingToRunImaAd=!0:this.isEnableInteractions(this.data)&&this.interactionElement.showInteraction(this.data.interaction)}hide(){this.isCurrentlyTryingToRunImaAd=!1,this.style.visibility="hidden",this.interactionElement.hideInteraction()}load(){return n(this,arguments,void 0,function*(e="cache"){var t;if(!this.isLoaded&&"Content"===(null===(t=this.data)||void 0===t?void 0:t.type)&&!this.isBeingUnloaded()&&this.data&&this.videoUrl){this.isLoaded=!0,this.loadInteraction();try{"cache"===e?yield Promise.all([this.loadClosedCaptions(),u.VideoCacheService.downloadAndCacheVideo(this.videoUrl).then(()=>n(this,void 0,void 0,function*(){this.isBeingUnloaded()||(yield this.setVideoSource(this.videoUrl))}))]):yield Promise.all([this.loadClosedCaptions(),this.setVideoSource(this.videoUrl)]),this.video.preload="auto"}catch(e){}}})}setVideoSource(e){return n(this,void 0,void 0,function*(){if(!e)return;let t=e.includes(".m3u8"),i=yield this.beforeContentPlayService.getTokenizedUrl(e),n=this.source.getAttribute("src");if(!n||n!==i&&n!==i+"#t=0.01"){if(this.loadPoster(),"hls"===this.videoFormat&&t&&this.playbackStrategy&&this.playbackStrategy.reloadWithNewSource)try{return void(yield this.playbackStrategy.reloadWithNewSource(i,0,0))}catch(e){}this.videoFormat=t?"hls":"mp4",this.playbackStrategy="hls"===this.videoFormat?s.PlaybackStrategyFactory.createStrategy(this.video,"SHORT_FORM_HLS",this,this.videoPlayerState):s.PlaybackStrategyFactory.createStrategy(this.video,"NATIVE",this,this.videoPlayerState),this.playerCommands=new s.VideoPlayerCommands(this.playbackStrategy,this),"hls"===this.videoFormat?yield this.initializeHLSStrategy(i):(this.playbackStrategy.initialize({loaderDelegate:{show:()=>this.tryToAddLoader(),hide:()=>this.removeLoader(),isVisible:()=>{var e;return!!(null===(e=this.loader)||void 0===e?void 0:e.isConnected)}}}),yield this.playbackStrategy.loadSource(i,0,0))}})}reloadHLSWithNewUrl(e){return n(this,void 0,void 0,function*(){if("hls"!==this.videoFormat||!this.playbackStrategy)return;let t=yield this.beforeContentPlayService.getTokenizedUrl(e);this.playbackStrategy.reloadWithNewSource&&(this.loadPoster(),yield this.playbackStrategy.reloadWithNewSource(t,0,0))})}initializeHLSStrategy(e){return n(this,void 0,void 0,function*(){try{if(!this.playbackStrategy)throw Error("No playback strategy available for HLS initialization");this.video.muted=this.videoPlayerState.isMuted,this.playbackStrategy.initialize({loaderDelegate:{show:()=>this.tryToAddLoader(),hide:()=>this.removeLoader(),isVisible:()=>{var e;return!!(null===(e=this.loader)||void 0===e?void 0:e.isConnected)}}}),yield this.playbackStrategy.loadSource(e,0,0)}catch(t){yield this.fallbackToNativeVideo(e)}})}fallbackToNativeVideo(e){return n(this,void 0,void 0,function*(){this.videoFormat="mp4",this.playbackStrategy&&this.cleanupHLSStrategy(),this.video.muted=this.videoPlayerState.isMuted,this.playbackStrategy=s.PlaybackStrategyFactory.createStrategy(this.video,"NATIVE",this,this.videoPlayerState),this.playerCommands=new s.VideoPlayerCommands(this.playbackStrategy,this),this.playbackStrategy.initialize({loaderDelegate:{show:()=>this.tryToAddLoader(),hide:()=>this.removeLoader(),isVisible:()=>{var e;return!!(null===(e=this.loader)||void 0===e?void 0:e.isConnected)}}}),yield this.playbackStrategy.loadSource(e,0,0)})}
1cleanupHLSStrategy(){if(this.playbackStrategy){try{this.playbackStrategy.destroy()}catch(e){}this.playbackStrategy=void 0,this.playerCommands=void 0}}unload(){return n(this,void 0,void 0,function*(){var e;this.playbackStrategy&&(this.playbackStrategy.unload(),"hls"===this.videoFormat&&this.cleanupHLSStrategy()),this.data&&"Content"===(null===(e=this.data)||void 0===e?void 0:e.type)&&this.data&&(this.interactionElement.unloadInteraction(),this.captionsElement.remove(),"hls"!==this.videoFormat&&this.videoUrl&&this.contentParent instanceof o.BlazeWidgetStory&&(yield u.VideoCacheService.deleteVideoFromCache(this.videoUrl)),this.isVideoStartPlaying=!1,this.isLoaded=!1,this.isVideoRunning=!1,this.videoFormat="",this.playerCommands=void 0,this.playbackStrategy=void 0,this.removeLoader())})}resetVideoState(){this.unload()}removeLoader(){clearTimeout(this.loaderTimeoutRefAppending),this.loader.remove()}tryReloadVideo(e){var t;e<=0||(this.maxRetryTimes=e,null===(t=this.playbackStrategy)||void 0===t||t.reset(),this.play())}tryToAddLoader(){var e;this.ended||!this.loader||(null===(e=this.loader)||void 0===e?void 0:e.isConnected)||(this.loaderTimeoutRefAppending=setTimeout(()=>{this.append(this.loader)},250))}play(){return n(this,void 0,void 0,function*(){var e,t;if(this.shouldShowImaAd)return this.shouldShowImaAd=!1,void(yield this.tryToPlayAd(this.contentParent.contentExtraInfo));this.videoPlayerState.isPlaying=!0,this.eventRenderBackgroundPercentageTriggered=[!1,!1],this.isVideoStartPlaying=!0,yield null===(t=null===(e=this.playerCommands)||void 0===e?void 0:e.executeCommand)||void 0===t?void 0:t.call(e,"play")})}pause(){var e,t;this.isVideoStartPlaying=!1,null===(t=null===(e=this.playerCommands)||void 0===e?void 0:e.executeCommand)||void 0===t||t.call(e,"pause")}set currentTime(e){var t,i;if(this.playbackStrategy){let i=this.playbackStrategy.getDuration();i>0&&(null===(t=this.playerCommands)||void 0===t||t.executeCommand("seek",Math.max(0,Math.min(1,e/i))))}else void 0!==(null===(i=this.video)||void 0===i?void 0:i.currentTime)&&(this.video.currentTime=e)}get currentTime(){var e,t;return(null===(e=this.playbackStrategy)||void 0===e?void 0:e.getCurrentTime())||(null===(t=this.video)||void 0===t?void 0:t.currentTime)||0}get duration(){var e,t;return(null===(e=this.playbackStrategy)||void 0===e?void 0:e.getDuration())||(null===(t=this.video)||void 0===t?void 0:t.duration)||0}videoDurationMetrics(){return n(this,void 0,void 0,function*(){try{yield this.getVideoDuration()}catch(e){}})}requestFrameCallback(e){var t,i,n;try{(null===(t=this.video)||void 0===t?void 0:t.requestVideoFrameCallback)?null===(n=null===(i=this.video)||void 0===i?void 0:i.requestVideoFrameCallback)||void 0===n||n.call(i,e):this.videoFrameCallback=e}catch(e){}}mainElement(){return this.video}get paused(){var e,t;return null!==(t=null===(e=this.playbackStrategy)||void 0===e?void 0:e.isPaused())&&void 0!==t?t:!this.isVideoStartPlaying}get ended(){var e,t,i,n;return null!==(n=null!==(t=null===(e=this.playbackStrategy)||void 0===e?void 0:e.isEnded())&&void 0!==t?t:null===(i=this.video)||void 0===i?void 0:i.ended)&&void 0!==n&&n}get muted(){var e;return!!(null===(e=this.video)||void 0===e?void 0:e.muted)}set muted(e){var t,i,n,o;e?null===(i=null===(t=this.playerCommands)||void 0===t?void 0:t.executeCommand)||void 0===i||i.call(t,"mute"):null===(o=null===(n=this.playerCommands)||void 0===n?void 0:n.executeCommand)||void 0===o||o.call(n,"unmute")}get isAd(){var e;return this.isCurrentlyTryingToRunImaAd||"Ad"===(null===(e=this.data)||void 0===e?void 0:e.type)}render(){this.video&&(this.video.style.borderRadius="mobile"===a.deviceDetector.platform?"0px":"20px")}handleAdStarted(){this.pause(),this.isCurrentlyTryingToRunImaAd=!0,this.interactionElement.hideInteraction()}handleAdEnded(){var e;document.hidden||this.play(),this.isCurrentlyTryingToRunImaAd=!1,null===(e=this.contentParent)||void 0===e||e.adjustContentView(),this.isEnableInteractions(this.data)&&this.interactionElement.showInteraction(),this.contentParent instanceof o.BlazeWidgetStory&&this.contentParent.event(r.StoryAction.PageStart,{})}loadInteraction(){if(!this.isEnableInteractions(this.data))return;let e=this.data.interaction;e&&(this.interactionElement.addEventListener(l.INTERACTION_ANALYTICS,this.handleInteractionEvent.bind(this)),this.appendChild(this.interactionElement),this.interactionElement.loadInteraction(e))}onLanguageChange(e){return n(this,void 0,void 0,function*(){var t;let i=null===(t=this.data.closedCaptions)||void 0===t?void 0:t.find(t=>""+t.language===e.detail.language);i?(this.captionsElement.isConnected||this.append(this.captionsElement),yield this.captionsElement.initialize(this.video,i.files),this.setAttribute("is-captions-visible","true")):(this.setAttribute("is-captions-visible","false"),this.captionsElement.isConnected&&this.captionsElement.remove())})}handleInteractionEvent(e){var t,i;u.AnalyticsService.pushInteractionEvent(e.detail.action,Object.assign(Object.assign({},e.detail.body),{content_id:this.contentParent.data.id,content_title:this.contentParent.data.title,content_page_id:null===(t=this.data)||void 0===t?void 0:t.id,content_type:"story",content_session_id:u.UserService.sessionId,audio_state:this.videoPlayerState.isMuted?"Mute":"Unmute",content_extra_info:"true"===(null===(i=u.AppConfigurationService.appConfigurations)||void 0===i?void 0:i.configurations.analyticsAddEntitiesInfo)?JSON.stringify(this.contentParent.data.extraInfo):void 0}),void 0,this.contentParent.getRefferingObject())}tryToPlayAd(e){return n(this,void 0,void 0,function*(){var t,i,n,o;if("Content"===(null===(t=this.data)||void 0===t?void 0:t.type)&&"IMA"===(null===(i=this.data.adInfo)||void 0===i?void 0:i.type)){let t=this.data.adInfo;this.contentParent.adIndex++;let i=yield this.getVideoDuration().catch(()=>{});return null!==(o=yield null===(n=this.widgetVastAd)||void 0===n?void 0:n.startAd({videoElement:this.video,adInfo:this.data.adInfo,contentExtraInfo:e,addCustomParams:e=>{var i;null===(i=this.widgetVastAd)||void 0===i||i.setSearchParamIfNotNullOrZero(e,"content_title",this.contentParent.data.title);let n=this.data.index;
1if(!isNaN(n)){if("Aniview"===t.adProvider)e.searchParams.set("page_index",(null==n?void 0:n.toString())||"0");else{let t=e.searchParams.get("cust_params")||"",i=["page_index="+n];i.length>0&&(t=t?t+"&"+i.join("&"):i.join("&")),t&&e.searchParams.set("cust_params",t)}}let o=e.searchParams.get("sz");if(o){let t="Horizontal"===this.contentParent.aspectRatio?r.IMA_RATIOS.vertical:r.IMA_RATIOS.horizontal;e.searchParams.set("sz",o.split("|").filter(e=>e!==t).join("|"))}},addExtraAnalyticsParams:()=>{var e,t;return{session_id:this.contentParent.sessionId,ad_index:this.contentParent.adIndex.toString(),[this.contentParent.contentType+"_id"]:null===(e=this.contentParent.data)||void 0===e?void 0:e.id,[this.contentParent.contentType+"_title"]:null===(t=this.contentParent.data)||void 0===t?void 0:t.title}},videoUrl:this.videoUrl,videoDuration:i}))&&void 0!==o&&o}return!1})}isBeingUnloaded(){return!!this.isUnloading||!!(this.contentParent instanceof o.BlazeWidgetStory&&this.contentParent.isUnloading)}}t.BlazeWidgetVideo=g},1072:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isWidgetTheme=function(e){return"object"==typeof e&&null!==e&&"layoutStyle"in e&&"playerStyle"in e}},1088:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessibilityUtils=void 0,t.AccessibilityUtils=class{static setElementsAccessible(e){e.forEach(e=>{if(e){e.setAttribute("tabindex","0"),e.setAttribute("aria-hidden","false"),e.style.pointerEvents="auto",e.focus&&e.focus.toString().includes("{}")&&delete e.focus;let t=e.querySelector("a, button, [tabindex]");t&&(t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","false"),t.style.pointerEvents="auto",t.focus&&t.focus.toString().includes("{}")&&delete t.focus)}})}static setElementsInaccessible(e){e.forEach(e=>{if(e){document.activeElement===e&&e.blur(),e.setAttribute("tabindex","-1"),e.setAttribute("aria-hidden","true"),e.style.pointerEvents="none",e.focus&&(e.focus=()=>{});let t=e.querySelector("a, button, [tabindex]");t&&(t.setAttribute("tabindex","-1"),t.setAttribute("aria-hidden","true"),t.style.pointerEvents="none",t.focus&&(t.focus=()=>{}))}})}static setElementAccessibilityHidden(e){e&&(e.setAttribute("aria-hidden","true"),e.setAttribute("role","presentation"),e.setAttribute("tabindex","-1"))}static setElementsAccessibilityHidden(e){e.forEach(e=>this.setElementAccessibilityHidden(e))}}},1091:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeAlert=void 0;let n=i(4403);class o extends n.BaseWidget{constructor(){super(),this.titleContainer=document.createElement("div"),this.textContainer=document.createElement("div")}static get observedAttributes(){return["alert-title","alert-text"]}connectedCallback(){this.className="blaze-alert"}disconnectedCallback(){}attributeChangedCallback(e,t,i){switch(e){case"alert-title":this.titleContainer.innerHTML=i,this.appendChild(this.titleContainer);break;case"alert-text":this.textContainer.innerHTML=i,this.appendChild(this.textContainer)}}setAttribute(e,t){super.setAttribute(e,t)}}t.BlazeAlert=o},1232:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerTransport=t.BatchRejectedError=void 0;let o=i(4545),s=i(8827);class a extends Error{constructor(e="Server rejected log batch (422)"){super(e),this.name="BatchRejectedError"}}t.BatchRejectedError=a,t.LoggerTransport=class{constructor(){this.MAX_RETRY_ATTEMPTS=3,this.BASE_RETRY_DELAY=1e3,this.MAX_RETRY_DELAY=3e4,this.REQUEST_TIMEOUT=1e4}send(e){return n(this,void 0,void 0,function*(){e.length&&(yield this.sendWithRetry(e))})}sendWithRetry(e){return n(this,void 0,void 0,function*(){let t;for(let i=0;i<=this.MAX_RETRY_ATTEMPTS;i++)try{if(i>0){let e=this.calculateRetryDelay(i);yield this.delay(e)}return void(yield this.attemptSend(e))}catch(e){if(t=e,e instanceof a)throw e}throw t})}attemptSend(e){return n(this,void 0,void 0,function*(){let t=this.preparePayload(e),i=yield(0,s.compressPayload)(t),n=new Promise((e,t)=>
1{setTimeout(()=>t(Error("Request timeout")),this.REQUEST_TIMEOUT)});try{yield Promise.race([this.sendToEndpoint(i),n])}catch(e){if(e instanceof Error){if(e.message.includes("422"))throw new a;if(e.message.includes("timeout"))throw Error("Request timeout");throw Error("Network request failed: "+e.message)}throw e}})}preparePayload(e){return e.map(e=>({message:e.message,level:e.level,api_key:o.ConfigService.apiKey,api_scheme_version:"1",metadata:JSON.parse(e.metadata)}))}sendToEndpoint(e){return n(this,void 0,void 0,function*(){yield o.ApiService.sendLoggerLogs(e)})}calculateRetryDelay(e){return Math.min(this.BASE_RETRY_DELAY*Math.pow(2,e-1)*(.5+.5*Math.random()),this.MAX_RETRY_DELAY)}delay(e){return new Promise(t=>setTimeout(t,e))}}},1353:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1356:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetEmbeddedBase=t.EMBEDDED_ATTRIBUTES=void 0;let n=i(4403),o=i(3524),s=i(5785),a=i(9965),r=i(4545),l=i(4906);t.EMBEDDED_ATTRIBUTES={Labels:"labels",LabelsPriority:"labels-priority",OrderType:"order-type",MaxItems:"max-items",ContentIds:"content-ids"};class d extends n.BaseWidget{get theme(){return this.getTheme()}constructor(){super(),this.isIntersecting=!1,this.shouldReloadData=!0,this.intersectionObserver=new IntersectionObserver(this.handleIntersection.bind(this),{threshold:.5}),this.boundOnPlayerDidAppear=this.onPlayerDidAppear.bind(this),this.boundOnPlayerDismissed=this.onPlayerDismissed.bind(this),this.stateManager=new o.VideoPlayerStateManager}connectedCallback(){this.innerHTML+="\n <style>\n @keyframes fadeInAnimation {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n\n "+this.getAnimationTargetSelector()+" { \n animation: fadeInAnimation ease 0.5s;\n animation-iteration-count: 1;\n animation-fill-mode: forwards;\n }\n </style>",this.style.direction=r.ConfigService.layoutDirection,this.intersectionObserver.observe(this),document.addEventListener(a.Delegation.onPlayerDidAppear,this.boundOnPlayerDidAppear),document.addEventListener(a.Delegation.onPlayerDismissed,this.boundOnPlayerDismissed),this.reloadLogic()}disconnectedCallback(){document.removeEventListener(a.Delegation.onPlayerDidAppear,this.boundOnPlayerDidAppear),document.removeEventListener(a.Delegation.onPlayerDismissed,this.boundOnPlayerDismissed)}attributeChangedCallback(e,i,n){switch(e){case t.EMBEDDED_ATTRIBUTES.Labels:case t.EMBEDDED_ATTRIBUTES.LabelsPriority:if(!i)break;this.reloadLogic();break;default:this.handleSpecificAttributeChange(e,i,n)}}updateDataSource(e){}getTheme(){let e=this.getThemeContentType();return e?this.preset||l.ThemeFactory.create("default",e):this.preset||l.ThemeFactory.create("default")}setTheme(e){let t;if("string"==typeof e){let i=this.getThemeContentType();t=i?l.ThemeFactory.create(e,i):l.ThemeFactory.create(e)}else t=e;this.preset=t}setLabels(e,i){this.setReloadData(i);let o="";if("string"==typeof e)o=e;else if(Array.isArray(e))o=e.join();else{if(!(e instanceof n.BlazeWidgetLabel))throw Error("fail to set labels - "+e+", labels must be string, array of strings, or BlazeWidgetLabel...");o=e.toString()}this.setAttribute(t.EMBEDDED_ATTRIBUTES.Labels,o)}setLabelsPriority(e,i){this.setReloadData(i);let o="";if("string"==typeof e)o=e.startsWith("[")&&e.endsWith("]")?e:"["+e+"]";else{if(!Array.isArray(e))throw Error("Failed to set labels priority - "+e+". Labels priority must be a string, array of strings, or array of BlazeWidgetLabel.");o=e.every(e=>e instanceof n.BlazeWidgetLabel)?"["+e.map(e=>e.toString()).join()+"]":"["+e.join()}this.setAttribute(t.EMBEDDED_ATTRIBUTES.LabelsPriority,o)}reload(){this.shouldReloadData=!0,this.reloadLogic()}setPersonalized(e){}updateWidgetUI(){}setMaxItemsDisplaySize(e){}setDelegations(e){for(let t in e)this.addEventListener(t,e[t])}updateOverrideStyles(e){}setMaxItemsSize(e){this.setAttribute(t.EMBEDDED_ATTRIBUTES.MaxItems,e.toString())}reloadLogic(){this.shouldReloadData&&this.loadContent()}setReloadData(e){this.shouldReloadData="object"!=typeof e||!e.hasOwnProperty("shouldReloadData")||"boolean"!=typeof e.shouldReloadData||e.shouldReloadData}showSkeleton(){var e,t,i,n;this.skeleton||(this.skeleton=new s.BlazeWidgetItemSkeleton(this.theme.layoutStyle,null!==(t=null===(e=this.parentElement)||void 0===e?void 0:e.clientWidth)&&void 0!==t?t:0,null!==(n=null===(i=this.parentElement)||void 0===i?void 0:i.clientHeight)&&void 0!==n?n:0,0),this.appendChild(this.skeleton))}hideSkeleton(){this.skeleton&&(this.removeChild(this.skeleton),this.skeleton=void 0)}onPlayerDidAppear(e){e.detail&&this.id!==e.detail.widgetId&&this.onOtherModalOpenedClosed(e,()=>this.pauseContent())}onPlayerDismissed(e){this.onOtherModalOpenedClosed(e,()=>this.playContent())}onOtherModalOpenedClosed(e,t){t()}getAnimationTargetSelector(){return"blaze-video-element, blaze-widget-story"}getThemeContentType(){}handleSpecificAttributeChange(e,t,i){}}
1t.BlazeWidgetEmbeddedBase=d},1371:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extractEntryIds=function(e){return e.map(e=>e.id)}},1381:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetInteraction=void 0;let o=i(4403),s=i(6450),a=i(9702),r=i(9965),l=i(4545),d=i(9266);class h extends o.BaseWidget{constructor(){super(...arguments),this.iframe=document.createElement("iframe"),this.isIframeLoaded=!1,this.isInitialized=!1,this.isActive=!1,this.shouldForceHide=!1,this.responseHandler=this.onUserResponse.bind(this),this.focusMainWindowHandler=this.focusMainWindow.bind(this),this.orientationChangeHandler=this.orientationChange.bind(this)}connectedCallback(){(0,d.mergeStyles)(this,{position:"relative",display:"block",width:"100%",overflow:"hidden",borderRadius:"mobile"===o.deviceDetector.platform?"0px":"20px"}),d.AccessibilityUtils.setElementAccessibilityHidden(this)}loadInteraction(e){var t,i,n,o,a,r,h,u,c,p,g,v,y,m,b,f,S,E,C,T,A,I;this.interaction=e,this.iframe.id="interaction-"+this.interaction.id,this.iframe.src=this.interaction.htmlUrl,this.iframe.onload=()=>{this.isIframeLoaded=!0,!this.isInitialized&&this.isActive&&this.initInteraction()},window.addEventListener("blur",this.focusMainWindowHandler),this.orientationChangeHandler(),window.addEventListener("resize",this.orientationChangeHandler);let M=(0,d.isCssPropertySupported)("aspectRatio");(0,d.mergeStyles)(this.iframe,{position:"absolute",border:"none",zIndex:s.Z_INDEX.interaction}),this.isActive?this.showIframe():this.hideIframe();let{bounds:w}=e;if(w){M&&"Player"===(null===(t=w.position)||void 0===t?void 0:t.yRelativeTo)?this.style.aspectRatio=s.ASPECT_RATIO_9_16_STRING:this.style.height="100%";let e="translateX("+("RTL"===l.ConfigService.layoutDirection?-1:1)*(null!==(n=null===(i=w.position)||void 0===i?void 0:i.xOffset)&&void 0!==n?n:0)+"px) translateY("+(null!==(a=null===(o=w.position)||void 0===o?void 0:o.yOffset)&&void 0!==a?a:"0")+"px)",_={BottomToTop:{},TopToTop:{top:(null!==(h=null===(r=w.position)||void 0===r?void 0:r.yOffset)&&void 0!==h?h:"0")+"px"},BottomToBottom:{bottom:(null!==(c=null===(u=w.position)||void 0===u?void 0:u.yOffset)&&void 0!==c?c:"0")+"px"},TopToBottom:{},CenterToTop:{},CenterToBottom:{},CenterY:{top:"0",bottom:"0",marginTop:"auto",marginBottom:"auto",transform:e}},P={StartToStart:{insetInlineStart:(null!==(g=null===(p=w.position)||void 0===p?void 0:p.xOffset)&&void 0!==g?g:"0")+"px"},EndToEnd:{insetInlineEnd:(null!==(y=null===(v=w.position)||void 0===v?void 0:v.xOffset)&&void 0!==y?y:"0")+"px"},StartToEnd:{},EndToStart:{},CenterToStart:{},CenterToEnd:{},CenterX:{insetInlineStart:"0",insetInlineEnd:"0",marginInline:"auto",transform:e}};(0,d.mergeStyles)(this.iframe,Object.assign(Object.assign(Object.assign({},_[null!==(b=null===(m=w.position)||void 0===m?void 0:m.yPosition)&&void 0!==b?b:"TopToTop"]),P[null!==(S=null===(f=w.position)||void 0===f?void 0:f.xPosition)&&void 0!==S?S:"StartToStart"]),{height:(null===(E=w.size)||void 0===E?void 0:E.absoluteHeight)?w.size.absoluteHeight+"px":100*(null!==(T=null===(C=w.size)||void 0===C?void 0:C.heightRatio)&&void 0!==T?T:0)+"%",width:(null===(A=w.size)||void 0===A?void 0:A.widthRatio)?100*w.size.widthRatio+"%":(null===(I=w.size)||void 0===I?void 0:I.absoluteWidth)+"px"}))}else M?this.style.aspectRatio=s.ASPECT_RATIO_9_16_STRING:this.style.height="100%",(0,d.mergeStyles)(this.iframe,{top:100*this.interaction.topOffset+"%",insetInlineStart:100*this.interaction.leftOffset+"%",height:100*this.interaction.relativeHeight+"%",width:100*this.interaction.relativeWidth+"%"});this.appendChild(this.iframe)}showInteraction(e){this.interaction||(this.interaction=e),this.interaction&&!this.isActive&&(this.pushAnalyticsEvent(s.InteractionAction.VIEW,{client_enrichment_url:this.interaction.clientEnrichmentUrl}),this.isActive=!0,this.isIframeLoaded&&!this.isInitialized&&this.initInteraction(),this.shouldForceHide||this.showIframe(),window.addEventListener("message",this.responseHandler))}shouldResetInitialization(e){var t;return"Enrichment"!==e.type||"true"!==(null===(t=l.AppConfigurationService.appConfigurations)||void 0===t?void 0:t.configurations.avoidEnrichmentReloadOnNavigation)}hideInteraction(){this.interaction&&this.isActive&&(this.isActive=!1,this.shouldResetInitialization(this.interaction)&&(this.isInitialized=!1),this.hideIframe(),window.removeEventListener("message",this.responseHandler))}unloadInteraction(){this.isIframeLoaded=!1,this.iframe.remove(),window.removeEventListener("blur",this.focusMainWindowHandler),window.removeEventListener("message",this.responseHandler),window.removeEventListener("resize",this.orientationChangeHandler)}onUserResponse(e){return n(this,void 0,void 0,function*(){if(this.interaction&&this.isActive&&e.source===this.iframe.contentWindow)switch(e.data.type){case"USER_RESPONSE":l.InteractionService.updateInteraction({id:this.interaction.id,initData:e.data.data.newInitData,userResponse:e.data.data.userResponse}),l.ApiService.sendInteractionResponse({interactionId:this.interaction.id,interactionType:this.interaction.type,responseId:e.data.data.userResponse}
1),this.pushAnalyticsEvent(s.InteractionAction.ANSWER,{interaction_selected_answer:e.data.data.userResponse});break;case"hapticFeedback":case"USER_VIBRATE":let t=e.data.data.type;"vibrate"in navigator&&navigator.vibrate(a.ANSWER_FEEDBACK_VIBRATE_PATTERNS[t]);break;case"play":this.dispatchEvent(new CustomEvent(r.InternalEvent.RESUME,{bubbles:!0}));break;case"pause":this.dispatchEvent(new CustomEvent(r.InternalEvent.PAUSE,{bubbles:!0}));break;case"goToNextPage":this.dispatchEvent(new CustomEvent(r.InternalEvent.NEXT_PAGE,{bubbles:!0}));break;case"goToPreviousPage":this.dispatchEvent(new CustomEvent(r.InternalEvent.PREVIOUS_PAGE,{bubbles:!0}));break;case"setAppContext":l.ConfigService.appContext=e.data.data}})}pushAnalyticsEvent(e,t){if(!this.interaction)return;let i={action:e,body:Object.assign({interaction_id:this.interaction.id,interaction_type:this.interaction.type,interaction_text:this.interaction.initData},t)};this.dispatchEvent(new CustomEvent(a.INTERACTION_ANALYTICS,{detail:i}))}focusMainWindow(){document.activeElement===this.iframe&&setTimeout(()=>{window.focus()},0)}initInteraction(){return n(this,void 0,void 0,function*(){var e;let t,i;if(this.interaction){try{let e=yield l.InteractionService.getInteraction(this.interaction.id);t=null==e?void 0:e.initData,i=null==e?void 0:e.userResponse}catch(e){}t=null!=t?t:this.interaction.initData,null===(e=this.iframe.contentWindow)||void 0===e||e.postMessage({type:"invokeInitInteraction",initData:JSON.parse(t),designOverrides:JSON.parse(this.interaction.designOverridesStr),userAnswer:i,userContext:l.ConfigService.appContext},"*"),this.isInitialized=!0}})}orientationChange(){this.shouldForceHide="mobile"===o.deviceDetector.platform&&"landscape"===o.deviceDetector.screenOrientation,this.isActive&&(this.shouldForceHide?this.hideIframe():this.showIframe())}hideIframe(){this.iframe.style.visibility="hidden",this.iframe.style.pointerEvents="none"}showIframe(){this.iframe.style.visibility="visible",this.iframe.style.pointerEvents="auto"}}t.BlazeWidgetInteraction=h},1430:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeDiv=void 0;let n=i(4403);class o extends n.BaseWidget{constructor(){super()}}t.BlazeDiv=o},1518:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetStoryModal=void 0;let n=i(9126),o=i(4403),s=i(6450),a=i(9965),r=i(4545),l=i(9266),d=i(332);class h extends d.BlazeWidgetModal{constructor(e,t,i,n=r.VideoPlayerService){super("story",n),this.parentWidget=e,this.playerLayout=t,this.actionHandlers=i,this.videoPlayerState=n,this.currentState=null,this.player.onClose=this.close.bind(this),this.player.dispatchExitStoryEvents=this.dispatchExitStoryEvents.bind(this),this.boundOnResizeEventDelay=this.onResizeEventDelay.bind(this),this.boundOnKeyDown=this.onKeyDown.bind(this),this.boundOnBeforeUnload=this.onBeforeUnload.bind(this);let o=document.createElement("style");o.textContent="@keyframes shrink{\n 0%{\n transform:scale(1)\n }\n 15%{\n transform:scale(.96)\n }\n 30%{\n transform:scale(1)\n }\n 100%{\n transform:scale(1)\n }\n }\n @keyframes grow{\n 0%{\n transform:scale(1)\n }\n 15%{\n transform:scale(1.04)\n }\n 30%{\n transform:scale(1)\n }\n 100%{\n transform:scale(1)\n }\n }\n @keyframes bottomToTop {\n 0% {\n opacity: 0;\n transform: translateY(100%);\n }\n 50% {\n opacity: 1;\n transform: translateY(-50%);\n }\n 100% {\n opacity: 1;\n transform: translateY(0%);\n }\n }\n ",this.appendChild(o)}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.boundOnResizeEvent),window.addEventListener(o.DEVICE_EVENTS.SCREEN_ORIENTATION_CHANGE,this.boundOnResizeEventDelay),window.addEventListener("keydown",this.boundOnKeyDown),window.addEventListener("beforeunload",this.boundOnBeforeUnload),(0,l.mergeStyles)(this,{display:"none",boxSizing:"border-box"})}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener(o.DEVICE_EVENTS.SCREEN_ORIENTATION_CHANGE,this.boundOnResizeEventDelay),window.removeEventListener("resize",this.boundOnResizeEvent),window.removeEventListener("keydown",this.boundOnKeyDown),window.removeEventListener("beforeunload",this.boundOnBeforeUnload)}onBeforeUnload(){if(o.deviceDetector.isDesktop)return this.isOpen&&this.dispatchExitStoryEvents(),null}setTheme(e){this.player.playerContentList.forEach(t=>{t instanceof n.BlazeWidgetStory&&t.setTheme(e)}),this.playerLayout=e}updateModalContent(){this.currentState&&this.player.updateContentConfig(this.currentState.stories)}setModalContent(e,t,i){this.currentState={stories:e,indexOfContentInWidget:t,defaultAdsInfo:i};let o=[];for(let s=0;s<e.length;s++){let a=new n.BlazeWidgetStory(this.playerLayout,"Full Screen",this.actionHandlers,void 0,this.videoPlayerState);a.setData(e[s]),o.push(a),r.AdService.pushAdsBetweenStories(i,o,e,s,t,this.playerLayout)}this.player.setContent(o)}onKeyDown(e){if(this.isOpen&&"Escape"==e.key){let e=this.player.playerContentList[this.player.index];e.currentPage.isAd||(e.exitTrigger="Escape Button",e.navigationType="",e.navigationDirection="",e.close(),this.close())}}close(){var e,t,i;if(!this.isOpen||"SingleContent"===r.VideoPlayerService.playReference&&!r.ConfigService.shouldDismissPlayer)return;this.dispatchPlayerEvents(),super.close(),null===(e=this.player)||void 0===e||e.playerContentList.forEach(e
1=>{e.unload(),e instanceof n.BlazeWidgetStory&&(e.currentPage.pause(),e.pages.forEach(e=>{e.paused||e.pause(),e.unload()}))});let o=this.player.playerContentList[this.player.index];null===(t=null==o?void 0:o.currentPage)||void 0===t||t.endExit(),null===(i=this.onClose)||void 0===i||i.call(this,{storyId:o.data.id,pageIndex:o.pageIndex})}dispatchExitStoryEvents(){var e,t,i;let n=this.player.playerContentList[this.player.index];n.event(s.StoryAction.PageExit,{}),n.event(s.StoryAction.Exit,{}),r.AnalyticsService.sendAnalyticsData(),null===(e=n.pause)||void 0===e||e.call(n),null===(i=null===(t=n.widgetParentItem)||void 0===t?void 0:t.updateWidget)||void 0===i||i.call(t),n.updateWidgetStatusReadUnread()}dispatchPlayerEvents(){r.EventService.dispatch(this,a.Delegation.onStoryPlayerDismissed),r.EventService.dispatch(this,a.Delegation.onPlayerDismissed),this.parentWidget&&(r.EventService.dispatch(this.parentWidget,a.Delegation.onWidgetPlayerDismissed,{widgetId:this.parentWidget.id}),r.EventService.dispatch(this.parentWidget,a.Delegation.onWidgetStoryPlayerDismissed,{widgetId:this.parentWidget.id}))}open(e){var t;super.open(e);let i=new CustomEvent("onPlayerReady",{bubbles:!0,composed:!0});this.dispatchEvent(i),null===(t=this.onOpen)||void 0===t||t.call(this),r.EventService.dispatch(this,a.Delegation.onStoryPlayerDidAppear),r.EventService.dispatch(this,a.Delegation.onPlayerDidAppear)}play(){}playToggleCurrentStory(){this.player.playToggleCurrentStory()}onResizeEventDelay(){setTimeout(()=>{this.onResize()},s.ONE_SECOND/2)}}t.BlazeWidgetStoryModal=h},1532:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.NativeVideoStrategy=void 0;let o=i(1908),s=i(2914),a=i(4545),r=i(1006);class l extends r.BasePlaybackStrategy{constructor(e,t,i){super(),this.video=e,this.videoComponent=t,this.lastErrorExecutionTime=0,this.PLAYBACK_TIMEOUT_MS=7e3,this.boundOnError=this.handleNativeVideoError.bind(this),this.boundOnPlaying=this.handlePlaying.bind(this),this.boundOnPause=this.handlePause.bind(this),this.boundOnCanPlayThrough=this.handleCanPlayThrough.bind(this),this.lastProgressTime=0,this.lastCurrentTime=0,this.boundOnTimeUpdate=this.handleTimeUpdate.bind(this),this.setupErrorHandling(),this.videoPlayerState=i||a.VideoPlayerService}setupErrorHandling(){this.video.addEventListener(o.EVENTS.ERROR,this.boundOnError),this.video.addEventListener(o.EVENTS.PLAYING,this.boundOnPlaying),this.video.addEventListener(o.EVENTS.PAUSE,this.boundOnPause),this.video.addEventListener(o.EVENTS.CAN_PLAY_THROUGH,this.boundOnCanPlayThrough),this.video.addEventListener(o.EVENTS.TIMEUPDATE,this.boundOnTimeUpdate)}handlePlaying(){this.videoComponent.isVideoStartPlaying=!0,this.videoComponent.removeLoader(),this.clearPlaybackTimeout(),this.lastProgressTime=Date.now(),this.lastCurrentTime=this.video.currentTime}handlePause(){this.videoComponent.isVideoStartPlaying=!1,this.videoComponent.removeLoader(),this.stopProgressBasedLoaderCleanup()}handleTimeUpdate(){let e=this.video.currentTime,t=Date.now();e>this.lastCurrentTime&&(this.lastProgressTime=t,this.lastCurrentTime=e,this.video.paused||this.video.ended||this.videoComponent.removeLoader())}handleCanPlayThrough(){return n(this,void 0,void 0,function*(){this.videoComponent.isVideoStartPlaying&&this.video.paused&&(yield this.play())})}startPlaybackTimeout(){this.clearPlaybackTimeout(),this.playbackTimeout=setTimeout(()=>{this.handlePlaybackTimeout()},this.PLAYBACK_TIMEOUT_MS)}clearPlaybackTimeout(){this.playbackTimeout&&(clearTimeout(this.playbackTimeout),this.playbackTimeout=void 0)}handlePlaybackTimeout(){this.videoComponent.isVideoStartPlaying&&this.video.paused&&(this.reset(),setTimeout(()=>{this.play().catch(()=>{})},500))}handleNativeVideoError(e){return n(this,void 0,void 0,function*(){var t;let i=null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.error;if((null==i?void 0:i.code)===MediaError.MEDIA_ERR_DECODE){let e=new Date().getTime();e-this.lastErrorExecutionTime>=5e3&&(this.lastErrorExecutionTime=e,this.videoComponent.source&&this.videoComponent.videoUrl&&this.video&&0===this.video.currentTime&&(this.video.removeChild(this.videoComponent.source),this.video.preload="none",this.video.load(),this.videoComponent.source.setAttribute("src",this.videoComponent.videoUrl),this.videoComponent.source.setAttribute("type","video/mp4"),this.video.preload="auto",this.video.append(this.videoComponent.source),this.videoComponent.tryReloadVideo(this.videoComponent.maxRetryTimes)))}else if((null==i?void 0:i.code)===MediaError.MEDIA_ERR_NETWORK&&this.videoComponent.source&&this.videoComponent.videoUrl&&this.video&&0===this.video.currentTime){this.video.removeChild(this.videoComponent.source),this.video.preload="none",this.video.load();let e=new URL(this.videoComponent.videoUrl);e.searchParams.set("retry",Date.now().toString()),this.videoComponent.source.setAttribute("src",e.toString()),this.videoComponent.source.setAttribute("type","video/mp4"),this.video.preload="auto",this.video.append(this.videoComponent.source),this.videoComponent.tryReloadVideo(this.videoComponent.maxRetryTimes)}})}play(){return n(this,void 0,void 0,function*(){var e;this.playAttemptStartTime=Date.now();try{this.startPlaybackTimeout(),this.startProgressBasedLoaderCleanup(),yield this.video.play(),this.videoComponent.isError=!1,this.videoComponent.isVideoRunning=!0;let e={status:o.PlayStatus.Success};return this.dispatchPlaybackEvent("success",{result:e,timeToPlay:Date.now()-this.playAttemptStartTime}),e}catch(t){this.clearPlaybackTimeout(),this.stopProgressBasedLoaderCleanup();let e={status:o.PlayStatus.Failed,error:t};return this.dispatchPlaybackEvent("failed",{result:e,timeToFail:Date.now()-this.playAttemptStartTime}),e}finally{null===(e=this.loaderDelegate)||void 0===e||e.hide()}})}playWithRetry(e){return n(this,void 0,void 0,function*(){if(!(e<=0))try{yield this.video.play(),this.videoComponent.isError=!1,this.videoComponent.isVideoRunning=!0}catch(t){throw this.reloadAndRetry(e-1),t}})}reloadAndRetry(e){e>0&&(this.reset(),setTimeout(()=>{this.playWithRetry(e).catch(()=>{})},1e3))}pause(){this.video.pause(),this.clearPlaybackTimeout(),this.stopProgressBasedLoaderCleanup()}getCurrentTime(){var e;return(null===(e=this.video)||void 0===e?void 0:e.currentTime)||0}getDuration(){var e;return(null===(e=this.video)||void 0===e?void 0:e.duration)||0}isPaused(){var e;return(null===(e=this.video)||void 0===e?void 0:e.paused)||!1}isEnded(){var e;return(null===(e=this.video)||void 0===e?void 0:e.ended)||!1}isMuted(){var e;return!!(null===(e=this.video)||void 0===e?void 0:e.muted)}setMuted(e){if(this.video){let t=this.video.muted;this.video.muted=e,t!==e&&this.dispatchPlaybackEvent("changed",{previousState:{muted:t},newState:{muted:e}})}}mute(){this.setMuted(!0)}unmute(){this.setMuted(!1)}seek(e){if(this.video&&Number.isFinite(this.video.duration)&&this.video.duration>0){let t=e*this.video.duration;Number.isFinite(t)&&t>=0&&t<=this.video.duration&&(this.video.currentTime=t)}}toggleMute(){this.setMuted(!this.isMuted())}toggleFullscreen(){}loadSource(e){return n(this,void 0,void 0,function*(){this.videoComponent.source.hasAttribute("src")||(this.videoComponent.source.setAttribute("type","video/mp4"),"Safari"===s.deviceDetector.browser?this.videoComponent.source.setAttribute("src",e+"#t=0.01"):this.videoComponent.source.setAttribute("src",e)),this.video.querySelector("source")||this.video.append(this.videoComponent.source),this.video.load()})}initialize(e){this.configureVideoElement(),(null==e?void 0:e.loaderDelegate)&&(this.loaderDelegate=e.loaderDelegate)}configureVideoElement(){this.video.preload="none",this.video.muted=this.videoPlayerState.isMuted,this.video.playsInl
1ine=!0,this.video.controls=!1,this.video.currentTime=0,this.video.setAttribute("webkit-playsinline","true")}unload(){this.video.pause(),this.video.preload="none",this.video.removeAttribute("poster"),this.video.removeAttribute("src"),this.videoComponent.source.removeAttribute("src"),this.videoComponent.source.remove(),this.video.load()}destroy(){this.clearPlaybackTimeout(),this.stopProgressBasedLoaderCleanup(),this.video.removeEventListener(o.EVENTS.ERROR,this.boundOnError),this.video.removeEventListener(o.EVENTS.PLAYING,this.boundOnPlaying),this.video.removeEventListener(o.EVENTS.PAUSE,this.boundOnPause),this.video.removeEventListener(o.EVENTS.CAN_PLAY_THROUGH,this.boundOnCanPlayThrough),this.video.removeEventListener(o.EVENTS.TIMEUPDATE,this.boundOnTimeUpdate),this.unload()}reset(){this.video.pause(),this.video.currentTime=0,this.video.preload="none",this.video.load(),this.clearPlaybackTimeout()}startProgressBasedLoaderCleanup(){this.stopProgressBasedLoaderCleanup(),this.lastProgressTime=Date.now(),this.lastCurrentTime=this.video.currentTime,this.progressCheckInterval=setInterval(()=>{this.checkVideoProgressAndCleanupLoader()},1e3)}stopProgressBasedLoaderCleanup(){this.progressCheckInterval&&(clearInterval(this.progressCheckInterval),this.progressCheckInterval=void 0)}checkVideoProgressAndCleanupLoader(){let e=Date.now()-this.lastProgressTime,t=this.video.currentTime;!this.video.paused&&!this.video.ended&&t>0&&e<1e3&&this.videoComponent.removeLoader()}}t.NativeVideoStrategy=l},1556:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Singleton=function(){return class{constructor(){}static getInstance(){return this._instance||(this._instance=new this),this._instance}}}},1590:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}
1),t.plusSvg=t.checkMarkSvg=t.linkIconSvg=t.shareVideosIconSvg=t.closedCaptionsOffIconSvg=t.closedCaptionsOnIconSvg=t.newPageIcon=t.arrowUpMomentIconSvg=t.arrowDownMomentIconSvg=t.fullscreenExitIconSvg=t.fullscreenEnterIconSvg=t.externalLinkIconSvg=t.arrowUpCtaIconSvg=t.pauseResumeIconSvg=t.playResumeIconSvg=t.restartIconSvg=t.prevPageIconSvg=t.nextPageIconSvg=t.prevStoryIconSvg=t.nextStoryIconSvg=t.closeIconSvg=t.shareIconSvg=t.muteIconSvg=t.unmuteIconSvg=t.pauseIconSvg=t.playIconSvg=t.IconGlobe=t.IconLink=t.ShareIconSvg=t.likeIconSvg=t.unlikeIconSvg=void 0,t.unlikeIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjUiIHZpZXdCb3g9IjAgMCAyOCAyNSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE0LjAwMDMgMjVMMTIuMDY3IDIzLjI2NjdDOS44MjI1NSAyMS4yNDQ1IDcuOTY2OTkgMTkuNSA2LjUwMDMzIDE4LjAzMzRDNS4wMzM2NiAxNi41NjY3IDMuODY2OTkgMTUuMjUgMy4wMDAzMyAxNC4wODM0QzIuMTMzNjYgMTIuOTE2NyAxLjUyODEgMTEuODQ0NSAxLjE4MzY2IDEwLjg2NjdDMC44MzkyMTQgOS44ODg5MSAwLjY2Njk5MiA4Ljg4ODkxIDAuNjY2OTkyIDcuODY2NjlDMC42NjY5OTIgNS43Nzc4IDEuMzY2OTkgNC4wMzMzNiAyLjc2Njk5IDIuNjMzMzZDNC4xNjY5OSAxLjIzMzM2IDUuOTExNDQgMC41MzMzNTYgOC4wMDAzMyAwLjUzMzM1NkM5LjE1NTg4IDAuNTMzMzU2IDEwLjI1NTkgMC43Nzc4IDExLjMwMDMgMS4yNjY2OUMxMi4zNDQ4IDEuNzU1NTggMTMuMjQ0OCAyLjQ0NDQ3IDE0LjAwMDMgMy4zMzMzNkMxNC43NTU5IDIuNDQ0NDcgMTUuNjU1OSAxLjc1NTU4IDE2LjcwMDMgMS4yNjY2OUMxNy43NDQ4IDAuNzc3OCAxOC44NDQ4IDAuNTMzMzU2IDIwLjAwMDMgMC41MzMzNTZDMjIuMDg5MiAwLjUzMzM1NiAyMy44MzM3IDEuMjMzMzYgMjUuMjMzNyAyLjYzMzM2QzI2LjYzMzcgNC4wMzMzNiAyNy4zMzM3IDUuNzc3OCAyNy4zMzM3IDcuODY2NjlDMjcuMzMzNyA4Ljg4ODkxIDI3LjE2MTQgOS44ODg5MSAyNi44MTcgMTAuODY2N0MyNi40NzI1IDExLjg0NDUgMjUuODY3IDEyLjkxNjcgMjUuMDAwMyAxNC4wODM0QzI0LjEzMzcgMTUuMjUgMjIuOTY3IDE2LjU2NjcgMjEuNTAwMyAxOC4wMzM0QzIwLjAzMzcgMTkuNSAxOC4xNzgxIDIxLjI0NDUgMTUuOTMzNyAyMy4yNjY3TDE0LjAwMDMgMjVaTTE0LjAwMDMgMjEuNEMxNi4xMzM3IDE5LjQ4ODkgMTcuODg5MiAxNy44NSAxOS4yNjcgMTYuNDgzNEMyMC42NDQ4IDE1LjExNjcgMjEuNzMzNyAxMy45Mjc4IDIyLjUzMzcgMTIuOTE2N0MyMy4zMzM3IDExLjkwNTYgMjMuODg5MiAxMS4wMDU2IDI0LjIwMDMgMTAuMjE2N0MyNC41MTE0IDkuNDI3OCAyNC42NjcgOC42NDQ0NyAyNC42NjcgNy44NjY2OUMyNC42NjcgNi41MzMzNiAyNC4yMjI1IDUuNDIyMjQgMjMuMzMzNyA0LjUzMzM2QzIyLjQ0NDggMy42NDQ0NyAyMS4zMzM3IDMuMjAwMDIgMjAuMDAwMyAzLjIwMDAyQzE4Ljk1NTkgMy4yMDAwMiAxNy45ODkyIDMuNDk0NDcgMTcuMTAwMyA0LjA4MzM2QzE2LjIxMTQgNC42NzIyNSAxNS42MDAzIDUuNDIyMjQgMTUuMjY3IDYuMzMzMzZIMTIuNzMzN0MxMi40MDAzIDUuNDIyMjQgMTEuNzg5MiA0LjY3MjI1IDEwLjkwMDMgNC4wODMzNkMxMC4wMTE0IDMuNDk0NDcgOS4wNDQ3NyAzLjIwMDAyIDguMDAwMzMgMy4yMDAwMkM2LjY2Njk5IDMuMjAwMDIgNS41NTU4OCAzLjY0NDQ3IDQuNjY2OTkgNC41MzMzNkMzLjc3ODEgNS40MjIyNCAzLjMzMzY2IDYuNTMzMzYgMy4zMzM2NiA3Ljg2NjY5QzMuMzMzNjYgOC42NDQ0NyAzLjQ4OTIxIDkuNDI3OCAzLjgwMDMzIDEwLjIxNjdDNC4xMTE0NCAxMS4wMDU2IDQuNjY2OTkgMTEuOTA1NiA1LjQ2Njk5IDEyLjkxNjdDNi4yNjY5OSAxMy45Mjc4IDcuMzU1ODggMTUuMTE2NyA4LjczMzY2IDE2LjQ4MzRDMTAuMTExNCAxNy44NSAxMS44NjcgMTkuNDg4OSAxNC4wMDAzIDIxLjRaIiBmaWxsPSIjRjBGMEYwIi8+Cjwvc3ZnPgo=",t.likeIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwIDE4Ljk5OTlMOC41NSAxNy42OTk5QzYuODY2NjcgMTYuMTgzMiA1LjQ3NSAxNC44NzQ5IDQuMzc1IDEzLjc3NDlDMy4yNzUgMTIuNjc0OSAyLjQgMTEuNjg3NCAxLjc1IDEwLjgxMjRDMS4xIDkuOTM3NCAwLjY0NTgzMyA5LjEzMzI0IDAuMzg3NSA4LjM5OTlDMC4xMjkxNjcgNy42NjY1NyAwIDYuOTE2NTcgMCA2LjE0OTlDMCA0LjU4MzI0IDAuNTI1IDMuMjc0OSAxLjU3NSAyLjIyNDlDMi42MjUgMS4xNzQ5IDMuOTMzMzMgMC42NDk5MDIgNS41IDAuNjQ5OTAyQzYuMzY2NjcgMC42NDk5MDIgNy4xOTE2NyAwLjgzMzIzNiA3Ljk3NSAxLjE5OTlDOC43NTgzMyAxLjU2NjU3IDkuNDMzMzMgMi4wODMyNCAxMCAyLjc0OTlDMTAuNTY2NyAyLjA4MzI0IDExLjI0MTcgMS41NjY1NyAxMi4wMjUgMS4xOTk5QzEyLjgwODMgMC44MzMyMzYgMTMuNjMzMyAwLjY0OTkwMiAxNC41IDAuNjQ5OTAyQzE2LjA2NjcgMC42NDk5MDIgMTcuMzc1IDEuMTc0OSAxOC40MjUgMi4yMjQ5QzE5LjQ3NSAzLjI3NDkgMjAgNC41ODMyNCAyMCA2LjE0OTlDMjAgNi45MTY1NyAxOS44NzA4IDcuNjY2NTcgMTkuNjEyNSA4LjM5OTlDMTkuMzU0MiA5LjEzMzI0IDE4LjkgOS45Mzc0IDE4LjI1IDEwLjgxMjRDMTcuNiAxMS42ODc0IDE2LjcyNSAxMi42NzQ5IDE1LjYyNSAxMy43NzQ5QzE0LjUyNSAxNC44NzQ5IDEzLjEzMzMgMTYuMTgzMiAxMS40NSAxNy42OTk5TDEwIDE4Ljk5OTlaIiBmaWxsPSIjRjBGMEYwIi8+Cjwvc3ZnPgo=",t.ShareIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMi45NDczIDIzLjM3NDhDMTMuMSAyMy43NTI2IDEzLjQ2NjggMjQgMTMuODc0NCAyNEgxNC4zNzE5QzE0Ljc4OTYgMjQgMTUuMTYzMyAyMy43NDAzIDE1LjMwOSAyMy4zNDg4TDIzLjIzNzUgMi4wNDg1QzIzLjUzNjIgMS4yNDYwNCAyMi43NTM5IDAuNDYzNzg1IDIxLjk1MTUgMC43NjI0OEwwLjY1MTE2IDguNjkwOTNDMC4yNTk2NjUgOC44MzY2NSAwIDkuMjEwMzcgMCA5LjYyODExVjEwLjEyNTZDMCAxMC41MzMyIDAuMjQ3MzQ5IDEwLjkgMC42MjUyMTEgMTEuMDUyN0w5LjQgMTQuNkwxMi45NDczIDIzLjM3NDhaTTE4LjM1MTggNy41MzM4OUwxNC4wNjY3IDE5LjA2NjZMMTIuMDAzNSAxMy44ODIyTDE4LjM1MTggNy41MzM4OVpNMTYuNDY2MyA1LjY0ODEyTDEwLjExNzkgMTEuOTk2NUw0LjkzMzMzIDkuOTMzMzFMMTYuNDY2MyA1LjY0ODEyWiIgZmlsbD0iI0YwRjBGMCIvPgo8L3N2Zz4K",t.IconLink='data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="10" viewB
1ox="0 0 20 10" fill="none"><path d="M9 10H5C3.61667 10 2.4375 9.5125 1.4625 8.5375C0.4875 7.5625 0 6.38333 0 5C0 3.61667 0.4875 2.4375 1.4625 1.4625C2.4375 0.4875 3.61667 0 5 0H9V2H5C4.16667 2 3.45833 2.29167 2.875 2.875C2.29167 3.45833 2 4.16667 2 5C2 5.83333 2.29167 6.54167 2.875 7.125C3.45833 7.70833 4.16667 8 5 8H9V10ZM6 6V4H14V6H6ZM11 10V8H15C15.8333 8 16.5417 7.70833 17.125 7.125C17.7083 6.54167 18 5.83333 18 5C18 4.16667 17.7083 3.45833 17.125 2.875C16.5417 2.29167 15.8333 2 15 2H11V0H15C16.3833 0 17.5625 0.4875 18.5375 1.4625C19.5125 2.4375 20 3.61667 20 5C20 6.38333 19.5125 7.5625 18.5375 8.5375C17.5625 9.5125 16.3833 10 15 10H11Z" fill="white" fill-opacity="0.92"/></svg>',t.IconGlobe='data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none"><path d="M10 20C8.61667 20 7.31667 19.7375 6.1 19.2125C4.88333 18.6875 3.825 17.975 2.925 17.075C2.025 16.175 1.3125 15.1167 0.7875 13.9C0.2625 12.6833 0 11.3833 0 10C0 8.61667 0.2625 7.31667 0.7875 6.1C1.3125 4.88333 2.025 3.825 2.925 2.925C3.825 2.025 4.88333 1.3125 6.1 0.7875C7.31667 0.2625 8.61667 0 10 0C11.3833 0 12.6833 0.2625 13.9 0.7875C15.1167 1.3125 16.175 2.025 17.075 2.925C17.975 3.825 18.6875 4.88333 19.2125 6.1C19.7375 7.31667 20 8.61667 20 10C20 11.3833 19.7375 12.6833 19.2125 13.9C18.6875 15.1167 17.975 16.175 17.075 17.075C16.175 17.975 15.1167 18.6875 13.9 19.2125C12.6833 19.7375 11.3833 20 10 20ZM9 17.95V16C8.45 16 7.97917 15.8042 7.5875 15.4125C7.19583 15.0208 7 14.55 7 14V13L2.2 8.2C2.15 8.5 2.10417 8.8 2.0625 9.1C2.02083 9.4 2 9.7 2 10C2 12.0167 2.6625 13.7833 3.9875 15.3C5.3125 16.8167 6.98333 17.7 9 17.95ZM15.9 15.4C16.2333 15.0333 16.5333 14.6375 16.8 14.2125C17.0667 13.7875 17.2875 13.3458 17.4625 12.8875C17.6375 12.4292 17.7708 11.9583 17.8625 11.475C17.9542 10.9917 18 10.5 18 10C18 8.36667 17.5458 6.875 16.6375 5.525C15.7292 4.175 14.5167 3.2 13 2.6V3C13 3.55 12.8042 4.02083 12.4125 4.4125C12.0208 4.80417 11.55 5 11 5H9V7C9 7.28333 8.90417 7.52083 8.7125 7.7125C8.52083 7.90417 8.28333 8 8 8H6V10H12C12.2833 10 12.5208 10.0958 12.7125 10.2875C12.9042 10.4792 13 10.7167 13 11V14H14C14.4333 14 14.825 14.1292 15.175 14.3875C15.525 14.6458 15.7667 14.9833 15.9 15.4Z" fill="%23131313"/></svg>',t.playIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9InBsYXlfYXJyb3dfIGhvbGxvdyI+CjxtYXNrIGlkPSJtYXNrMF8yMTA2Xzk5NCIgc3R5bGU9Im1hc2stdHlwZTphbHBoYSIgbWFza1VuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij4KPHJlY3QgaWQ9IkJvdW5kaW5nIGJveCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjRDlEOUQ5Ii8+CjwvbWFzaz4KPGcgbWFzaz0idXJsKCNtYXNrMF8yMTA2Xzk5NCkiPgo8cGF0aCBpZD0icGxheV9hcnJvdyIgZD0iTTggMTlWNUwxOSAxMkw4IDE5Wk0xMCAxNS4zNUwxNS4yNSAxMkwxMCA4LjY1VjE1LjM1WiIgZmlsbD0iI0YwRjBGMCIvPgo8L2c+CjwvZz4KPC9zdmc+Cg==",t.pauseIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9InBhdXNlIj4KPG1hc2sgaWQ9Im1hc2swXzIxMTdfMiIgc3R5bGU9Im1hc2stdHlwZTphbHBoYSIgbWFza1VuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij4KPHJlY3QgaWQ9IkJvdW5kaW5nIGJveCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjkyIi8+CjwvbWFzaz4KPGcgbWFzaz0idXJsKCNtYXNrMF8yMTE3XzIpIj4KPHBhdGggaWQ9InBhdXNlXzIiIGQ9Ik0xNCAxOVY1SDE3VjE5SDE0Wk03IDE5VjVIMTBWMTlIN1oiIGZpbGw9IndoaXRlIiBmaWxsLW9wYWNpdHk9IjAuOTIiLz4KPC9nPgo8L2c+Cjwvc3ZnPgo=",t.unmuteIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9InZvbHVtZV91cF8yIj4KPG1hc2sgaWQ9Im1hc2swXzIxMDZfOTg3IiBzdHlsZT0ibWFzay10eXBlOmFscGhhIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiPgo8cmVjdCBpZD0iQm91bmRpbmcgYm94IiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9IiNEOUQ5RDkiLz4KPC9tYXNrPgo8ZyBtYXNrPSJ1cmwoI21hc2swXzIxMDZfOTg3KSI+CjxwYXRoIGlkPSJ2b2x1bWVfdXAiIGQ9Ik0xNCAyMC43MjVWMTguNjc1QzE1LjUgMTguMjQxNiAxNi43MDgzIDE3LjQwODMgMTcuNjI1IDE2LjE3NUMxOC41NDE3IDE0Ljk0MTYgMTkgMTMuNTQxNiAxOSAxMS45NzVDMTkgMTAuN
1DA4MyAxOC41NDE3IDkuMDA4MzEgMTcuNjI1IDcuNzc0OThDMTYuNzA4MyA2LjU0MTY0IDE1LjUgNS43MDgzMSAxNCA1LjI3NDk4VjMuMjI0OThDMTYuMDY2NyAzLjY5MTY0IDE3Ljc1IDQuNzM3NDggMTkuMDUgNi4zNjI0OEMyMC4zNSA3Ljk4NzQ4IDIxIDkuODU4MzEgMjEgMTEuOTc1QzIxIDE0LjA5MTYgMjAuMzUgMTUuOTYyNSAxOS4wNSAxNy41ODc1QzE3Ljc1IDE5LjIxMjUgMTYuMDY2NyAyMC4yNTgzIDE0IDIwLjcyNVpNMyAxNVY4Ljk5OTk4SDdMMTIgMy45OTk5OFYyMEw3IDE1SDNaTTE0IDE2VjcuOTQ5OThDMTQuNzgzMyA4LjMxNjY0IDE1LjM5NTggOC44NjY2NCAxNS44Mzc1IDkuNTk5OThDMTYuMjc5MiAxMC4zMzMzIDE2LjUgMTEuMTMzMyAxNi41IDEyQzE2LjUgMTIuODUgMTYuMjc5MiAxMy42Mzc1IDE1LjgzNzUgMTQuMzYyNUMxNS4zOTU4IDE1LjA4NzUgMTQuNzgzMyAxNS42MzMzIDE0IDE2Wk0xMCA4Ljg0OTk4TDcuODUgMTFINVYxM0g3Ljg1TDEwIDE1LjE1VjguODQ5OThaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjkyIi8+CjwvZz4KPC9nPgo8L3N2Zz4K",t.muteIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9InZvbHVtZV9tdXRlIj4KPHBhdGggaWQ9InZvbHVtZV9vZmYiIGQ9Ik0xOS44IDIyLjZMMTYuNzc1IDE5LjU3NTFDMTYuMzU4NCAxOS44NDE3IDE1LjkxNjcgMjAuMDcwOSAxNS40NSAyMC4yNjI2QzE0Ljk4MzQgMjAuNDU0MiAxNC41IDIwLjYwODQgMTQgMjAuNzI1VjE4LjY3NUMxNC4yMzM0IDE4LjU5MTcgMTQuNDYyNSAxOC41MDg0IDE0LjY4NzUgMTguNDI1QzE0LjkxMjUgMTguMzQxNyAxNS4xMjUgMTguMjQxNyAxNS4zMjUgMTguMTI1MUwxMiAxNC44VjIwTDcuMDAwMDIgMTVIMy4wMDAwMlY5LjAwMDA1SDYuMjAwMDJMMS40MDAwMiA0LjIwMDA1TDIuODAwMDIgMi44MDAwNUwyMS4yIDIxLjIwMDFMMTkuOCAyMi42Wk0xOS42IDE2LjhMMTguMTUgMTUuMzVDMTguNDMzNCAxNC44MzM0IDE4LjY0NTkgMTQuMjkxNyAxOC43ODc1IDEzLjcyNUMxOC45MjkyIDEzLjE1ODQgMTkgMTIuNTc1MSAxOSAxMS45NzVDMTkgMTAuNDA4NCAxOC41NDE3IDkuMDA4MzggMTcuNjI1IDcuNzc1MDVDMTYuNzA4NCA2LjU0MTcyIDE1LjUgNS43MDgzOCAxNCA1LjI3NTA1VjMuMjI1MDVDMTYuMDY2NyAzLjY5MTcyIDE3Ljc1IDQuNzM3NTUgMTkuMDUgNi4zNjI1NUMyMC4zNSA3Ljk4NzU1IDIxIDkuODU4MzggMjEgMTEuOTc1QzIxIDEyLjg1ODQgMjAuODc5MiAxMy43MDg0IDIwLjYzNzUgMTQuNTI1MUMyMC4zOTU5IDE1LjM0MTcgMjAuMDUgMTYuMSAxOS42IDE2LjhaTTE2LjI1IDEzLjQ1TDE0IDExLjJWNy45NTAwNUMxNC43ODM0IDguMzE2NzIgMTUuMzk1OSA4Ljg2NjcyIDE1LjgzNzUgOS42MDAwNUMxNi4yNzkyIDEwLjMzMzQgMTYuNSAxMS4xMzM0IDE2LjUgMTJDMTYuNSAxMi4yNSAxNi40NzkyIDEyLjQ5NTkgMTYuNDM3NSAxMi43Mzc1QzE2LjM5NTkgMTIuOTc5MiAxNi4zMzM0IDEzLjIxNjcgMTYuMjUgMTMuNDVaTTEyIDkuMjAwMDVMOS40MDAwMyA2LjYwMDA1TDEyIDQuMDAwMDVWOS4yMDAwNVpNMTAgMTUuMTUwMVYxMi44TDguMjAwMDMgMTFINS4wMDAwMlYxM0g3Ljg1MDAzTDEwIDE1LjE1MDFaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjkyIi8+CjwvZz4KPC9zdmc+Cg==",t.shareIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9InNoYXJlIj4KPHBhdGggaWQ9IlVuaW9uIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTEyLjY0NzMgMjAuMzc0OEMxMi44IDIwLjc1MjcgMTMuMTY2OCAyMSAxMy41NzQ0IDIxSDEzLjYwNTJDMTQuMDIyOSAyMSAxNC4zOTY3IDIwLjc0MDQgMTQuNTQyNCAyMC4zNDg5TDIwLjIzNzUgNS4wNDg1NkMyMC41MzYyIDQuMjQ2MSAxOS43NTM5IDMuNDYzODUgMTguOTUxNSAzLjc2MjU0TDMuNjUxMTYgOS40NTc2NkMzLjI1OTY2IDkuNjAzMzggMyA5Ljk3NzEgMyAxMC4zOTQ4VjEwLjQyNTdDMyAxMC44MzMyIDMuMjQ3MzUgMTEuMiAzLjYyNTIxIDExLjM1MjhMMTAuMDUgMTMuOTVMMTIuNjQ3MyAyMC4zNzQ4Wk0xNi43NjM4IDguNjUwNDdMMTMuNTUgMTcuM0wxMi4wMDI2IDEzLjQxMTdMMTYuNzYzOCA4LjY1MDQ3Wk0xNS4zNDk3IDcuMjM2MTRMMTAuNTg4NCAxMS45OTc1TDYuNyAxMC40NUwxNS4zNDk3IDcuMjM2MTRaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjkyIi8+CjwvZz4KPC9zdmc+Cg==",t.closeIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzYiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCAzNiAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9ImNsb3NlIj4KPG1hc2sgaWQ9Im1hc2swXzIwODlfNjUxOCIgc3R5bGU9Im1hc2stdHlwZTphbHBoYSIgbWFza1VuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjM2IiBoZWlnaHQ9IjM2Ij4KPHJlY3QgaWQ9IkJvdW5kaW5nIGJveCIgd2lkdGg9IjM2IiBoZWlnaHQ9IjM2IiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjkyIi8+CjwvbWFzaz4KPGcgbWFzaz0idXJsKCNtYXNrMF8yMDg5XzY1MTgpIj4KPHBhdGggaWQ9ImNsb3NlXzIiIGQ9Ik05LjYgMjguNUw3LjUgMjYuNEwxNS45IDE4TDcuNSA5LjZMOS42IDcuNUwxOCAxNS45TDI2LjQgNy41TDI4LjUgOS42TDIwLjEgMThMMjguNSAyNi40TDI2LjQgMjguNUwxOCAyMC4xTDkuNiAyOC41WiIgZmlsbD0iI0YwRjBGMCIvPgo8L2c+CjwvZz4KPC9zdmc+Cg==",t.nextStoryIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9InNraXBfbmV4dCI+CjxtY
1XNrIGlkPSJtYXNrMF8yMDM2XzMyMzYiIHN0eWxlPSJtYXNrLXR5cGU6YWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiI+CjxyZWN0IGlkPSJCb3VuZGluZyBib3giIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC45MiIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazBfMjAzNl8zMjM2KSI+CjxwYXRoIGlkPSJza2lwX25leHRfMiIgZD0iTTIyIDI0VjhIMjQuNjY2NlYyNEgyMlpNNy4zMzMzMSAyNFY4TDE5LjMzMzMgMTZMNy4zMzMzMSAyNFpNOS45OTk5OCAxOUwxNC41MzMzIDE2TDkuOTk5OTggMTNWMTlaIiBmaWxsPSIjRjBGMEYwIi8+CjwvZz4KPC9nPgo8L3N2Zz4K",t.prevStoryIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9InNraXBfcHJldmlvdXMiPgo8bWFzayBpZD0ibWFzazBfMjAzNl8zMjM4IiBzdHlsZT0ibWFzay10eXBlOmFscGhhIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiPgo8cmVjdCBpZD0iQm91bmRpbmcgYm94IiB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIGZpbGw9IndoaXRlIiBmaWxsLW9wYWNpdHk9IjAuOTIiLz4KPC9tYXNrPgo8ZyBtYXNrPSJ1cmwoI21hc2swXzIwMzZfMzIzOCkiPgo8cGF0aCBpZD0ic2tpcF9wcmV2aW91c18yIiBkPSJNNy4zMzMzMyAyNFY4SDkuOTk5OTlWMjRINy4zMzMzM1pNMjQuNjY2NyAyNEwxMi42NjY3IDE2TDI0LjY2NjcgOFYyNFpNMjIgMTlWMTNMMTcuNDY2NyAxNkwyMiAxOVoiIGZpbGw9IiNGMEYwRjAiLz4KPC9nPgo8L2c+Cjwvc3ZnPgo=",t.nextPageIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIHZpZXdCb3g9IjAgMCAyOCAyOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9ImNoZXZyb25fcmlnaHQiPgo8bWFzayBpZD0ibWFzazBfMjAzNl8zMjc3IiBzdHlsZT0ibWFzay10eXBlOmFscGhhIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMjgiIGhlaWdodD0iMjgiPgo8cmVjdCBpZD0iQm91bmRpbmcgYm94IiB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIGZpbGw9IndoaXRlIiBmaWxsLW9wYWNpdHk9IjAuOTIiLz4KPC9tYXNrPgo8ZyBtYXNrPSJ1cmwoI21hc2swXzIwMzZfMzI3NykiPgo8cGF0aCBpZD0iY2hldnJvbl9yaWdodF8yIiBkPSJNMTAuOTY2NiAyMUw5LjMzMzMxIDE5LjM2NjdMMTQuNyAxNEw5LjMzMzMxIDguNjMzMzNMMTAuOTY2NiA3TDE3Ljk2NjYgMTRMMTAuOTY2NiAyMVoiIGZpbGw9IiMxMzEzMTMiLz4KPC9nPgo8L2c+Cjwvc3ZnPgo=",t.prevPageIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjgiIGhlaWdodD0iMjgiIHZpZXdCb3g9IjAgMCAyOCAyOCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9ImNoZXZyb25fbGVmdCI+CjxtY
1XNrIGlkPSJtYXNrMF8yMDM2XzMyNDAiIHN0eWxlPSJtYXNrLXR5cGU6YWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCI+CjxyZWN0IGlkPSJCb3VuZGluZyBib3giIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOCIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC45MiIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazBfMjAzNl8zMjQwKSI+CjxwYXRoIGlkPSJjaGV2cm9uX2xlZnRfMiIgZD0iTTE2LjMzMzMgMjFMOS4zMzMzMyAxNEwxNi4zMzMzIDdMMTcuOTY2NyA4LjYzMzMzTDEyLjYgMTRMMTcuOTY2NyAxOS4zNjY3TDE2LjMzMzMgMjFaIiBmaWxsPSIjMTMxMzEzIi8+CjwvZz4KPC9nPgo8L3N2Zz4K",t.restartIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAzMiAzMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPG1hc2sgaWQ9Im1hc2swXzVfNDg5ODEiIHN0eWxlPSJtYXNrLXR5cGU6YWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjQiIHk9IjQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+CjxyZWN0IHg9IjQiIHk9IjQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC45MiIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazBfNV80ODk4MSkiPgo8cGF0aCBkPSJNMTYgMjRDMTMuNzY2NyAyNCAxMS44NzUgMjMuMjI1IDEwLjMyNSAyMS42NzVDOC43NzUgMjAuMTI1IDggMTguMjMzMyA4IDE2QzggMTMuNzY2NyA4Ljc3NSAxMS44NzUgMTAuMzI1IDEwLjMyNUMxMS44NzUgOC43NzUgMTMuNzY2NyA4IDE2IDhDMTcuMTUgOCAxOC4yNSA4LjIzNzUgMTkuMyA4LjcxMjVDMjAuMzUgOS4xODc1IDIxLjI1I
1DkuODY2NjcgMjIgMTAuNzVWOEgyNFYxNUgxN1YxM0gyMS4yQzIwLjY2NjcgMTIuMDY2NyAxOS45Mzc1IDExLjMzMzMgMTkuMDEyNSAxMC44QzE4LjA4NzUgMTAuMjY2NyAxNy4wODMzIDEwIDE2IDEwQzE0LjMzMzMgMTAgMTIuOTE2NyAxMC41ODMzIDExLjc1IDExLjc1QzEwLjU4MzMgMTIuOTE2NyAxMCAxNC4zMzMzIDEwIDE2QzEwIDE3LjY2NjcgMTAuNTgzMyAxOS4wODMzIDExLjc1IDIwLjI1QzEyLjkxNjcgMjEuNDE2NyAxNC4zMzMzIDIyIDE2IDIyQzE3LjI4MzMgMjIgMTguNDQxNyAyMS42MzMzIDE5LjQ3NSAyMC45QzIwLjUwODMgMjAuMTY2NyAyMS4yMzMzIDE5LjIgMjEuNjUgMThIMjMuNzVDMjMuMjgzMyAxOS43NjY3IDIyLjMzMzMgMjEuMjA4MyAyMC45IDIyLjMyNUMxOS40NjY3IDIzLjQ0MTcgMTcuODMzMyAyNCAxNiAyNFoiIGZpbGw9ImJsYWNrIiBmaWxsLW9wYWNpdHk9IjAuOTIiLz4KPC9nPgo8L3N2Zz4K",t.playResumeIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9InBsYXlfYXJyb3ciPgo8cmVjdCB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHJ4PSIyNCIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC42Ii8+CjxwYXRoIGlkPSJwbGF5X2Fycm93XzIiIGQ9Ik0xOCAzNlYxMkwzNiAyNEwxOCAzNloiIGZpbGw9IndoaXRlIiBmaWxsLW9wYWNpdHk9IjAuOTIiLz4KPC9nPgo8L3N2Zz4K",t.pauseResumeIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgaWQ9InBsYXlfYXJyb3ciPgo8cmVjdCB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHJ4PSIyNCIgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC42Ii8+CjxwYXRoIGlkPSJwYXVzZSIgZD0iTTI3IDM2VjEySDMzVjM2SDI3Wk0xNSAzNlYxMkgyMVYzNkgxNVoiIGZpbGw9IndoaXRlIiBmaWxsLW9wYWNpdHk9IjAuOTIiLz4KPC9nPgo8L3N2Zz4K",t.arrowUpCtaIconSvg="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyMCA4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgo8cGF0aCBkPSJtMTggNy43LTAuNy0wLjItNy4zLTQtNy4zIDRjLTAuNyAwLjQtMS42IDAuMi0yLTAuNi0wLjQtMC43LTAuMS0xLjYgMC42LTJsOC00LjRhMiAyIDAgMCAxIDEuNSAwbDggNC40YzAuNyAwLjQgMSAxLjMgMC42IDItMC40IDAuNS0wLjkgMC44LTEuNCAwLjh6Ii8+Cjwvc3ZnPgo=",t.externalLinkIconSvg="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgY3Jvc3NvcmlnaW49ImFub255bW91cyI+CjxwYXRoIGQ9Im0xMiAwYzYuNiAwIDEyIDUuNCAxMiAxMnMtNS40IDEyLTEyIDEyLTEyLTUuNC0xMi0xMiA1LjQtMTIgMTItMTJ6IiBmaWxsLW9wYWNpdHk9Ii4xIi8+CjxwYXRoIGQ9Im0xMy44IDE0LjYgMC4yIDAuNS0wLjIgMC41LTEuNSAxLjRjLTAuNyAwLjctMS43IDEuMS0yLjcgMS4xYTQgNCAwIDAgMS0yLjctMS4xIDMuOSAzLjkgMCAwIDEtMS4xLTIuNyA0IDQgMCAwIDEgMS4xLTIuN2wxLjUtMS41IDAuNS0wLjEgMC41IDAuMiAwLjIgMC41LTAuMiAwLjUtMS41IDEuNWMtMC41IDAuNS0wLjcgMS4xLTAuNyAxLjdzMC4zIDEuMyAwLjcgMS43YzAuNSAwLjUgMS4xIDAuNyAxLjcgMC43czEuMy0wLjMgMS43LTAuN2wxLjUtMS41YzAuMy0wLjMgMC43LTAuMyAxIDB6bTMuMi03LjZhMy45IDMuOSAwIDAgMC0yLjctMS4xIDQgNCAwIDAgMC0yLjcgMS4xbC0xLjUgMS41LTAuMSAwLjQgMC4yIDAuNSAwLjUgMC4yIDAuNS0wLjIgMS41LTEuNWMwLjUtMC41IDEuMS0wLjcgMS43LTAuN3MxLjMgMC4zIDEuNyAwLjdjMC41IDAuNSAwLjcgMS4xIDAuNyAxLjdzLTAuMyAxLjMtMC43IDEuN2wtMS41IDEuNS0wLjIgMC41IDAuMiAwLjUgMC41IDAuMiAwLjUtMC4yIDEuNS0xLjVjMC43LTAuNyAxLjEtMS43IDEuMS0yLjctMC4xLTEtMC41LTEuOS0xLjItMi42em0tNy45IDcuMiAwLjIgMC41IDAuNSAwLjIgMC41LTAuMiA0LjUtNC41IDAuMi0wLjUtMC4yLTAuNWMtMC4zLTAuMi0wLjgtMC4yLTEgMC4xbC00LjUgNC41eiIvPgo8L3N2Zz4K",t.fullscreenEnterIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPG1hc2sgaWQ9Im1hc2swXzkxNTFfNTE4OSIgc3R5bGU9Im1hc2stdHlwZTphbHBoYSIgbWFza1VuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij4KPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjRDlEOUQ5Ii8+CjwvbWFzaz4KPGcgbWFzaz0idXJsKCNtYXNrMF85MTUxXzUxODkpIj4KPHBhdGggZD0iTTUgMjFDNC40NSAyMSAzLjk3OTE3IDIwLjgwNDIgMy41ODc1IDIwLjQxMjVDMy4xOTU4MyAyMC4wMjA4IDMgMTkuNTUgMyAxOVYxNUg1VjE5SDlWMjFINVpNMTUgMjFWMTlIMTlWMTVIMjFWMTlDMjEgMTkuNTUgMjAuODA0MiAyMC4wMjA4IDIwLjQxMjUgMjAuNDEyNUMyMC4wMjA4IDIwLjgwNDIgMTkuNTUgMjEgMTkgMjFIMTVaTTMgOVY1QzMgNC40NSAzLjE5NTgzIDMuOTc5MTcgMy41ODc1IDMuNTg3NUMzLjk3OTE3IDMuMTk1ODMgNC40NSAzIDUgM0g5VjVINVY5SDNaTTE5IDlWNUgxNVYzSDE5QzE5LjU1IDMgMjAuMDIwOCAzLjE5NTgzIDIwLjQxMjUgMy41ODc1QzIwLjgwNDIgMy45NzkxNyAyMSA0LjQ1IDIxIDVWOUgxOVoiIGZpbGw9IiNGMEYwRjAiLz4KPC9nPgo8L3N2Zz4K",t.fullscreenExitIconSvg="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjNWY2MzY4Ij48cGF0aCBkPSJNMjQwLTEyMHYtMTIwSDEyMHYtODBoMjAwdjIwMGgtODBabTQwMCAwdi0yMDBoMjAwdjgwSDcyMHYxMjBoLTgwWk0xMjAtNjQwdi04MGgxMjB2LTEyMGg4MHYyMDBIMTIwWm01MjAgMHYtMjAwaDgwdjEyMGgxMjB2ODBINjQwWiIvP
1jwvc3ZnPg==",t.arrowDownMomentIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTYuNjY2NjcgMThWNS43MzMzMkwxLjg2NjY3IDEwLjUzMzNMMCA4LjY2NjY2TDggMC42NjY2NTZMMTYgOC42NjY2NkwxNC4xMzMzIDEwLjUzMzNMOS4zMzMzMyA1LjczMzMyVjE4SDYuNjY2NjdaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjkyIi8+Cjwvc3ZnPgo=",t.arrowUpMomentIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIKICAgICB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxnIHRyYW5zZm9ybT0ic2NhbGUoMSAtMSkgdHJhbnNsYXRlKDAgLTE2KSI+CiAgICA8cGF0aCBkPSJNNi42NjY2NyAxOFY1LjczMzMyTDEuODY2NjcgMTAuNTMzM0wwIDguNjY2NjZMOCAwLjY2NjY1NkwxNiA4LjY2NjY2TDE0LjEzMzMgMTAuNTMzM0w5LjMzMzMzIDUuNzMzMzJWMThINi42NjY2N1oiIAogICAgICAgICAgZmlsbD0id2hpdGUiIGZpbGwtb3BhY2l0eT0iMC45MiIvPgogIDwvZz4KPC9zdmc+",t.newPageIcon="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPG1hc2sgaWQ9Im1hc2swXzk0NDlfOTc2NyIgc3R5bGU9Im1hc2stdHlwZTphbHBoYSIgbWFza1VuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0Ij4KPHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiBmaWxsPSIjRDlEOUQ5Ii8+CjwvbWFzaz4KPGcgbWFzaz0idXJsKCNtYXNrMF85NDQ5Xzk3NjcpIj4KPHBhdGggZD0iTTUgMjFDNC40NSAyMSAzLjk3OTE3IDIwLjgwNDIgMy41ODc1IDIwLjQxMjVDMy4xOTU4MyAyMC4wMjA4IDMgMTkuNTUgMyAxOVY1QzMgNC40NSAzLjE5NTgzIDMuOTc5MTcgMy41ODc1IDMuNTg3NUMzLjk3OTE3IDMuMTk1ODMgNC40NSAzIDUgM0gxMlY1SDVWMTlIMTlWMTJIMjFWMTlDMjEgMTkuNTUgMjAuODA0MiAyMC4wMjA4IDIwLjQxMjUgMjAuNDEyNUMyMC4wMjA4IDIwLjgwNDIgMTkuNTUgMjEgMTkgMjFINVpNOS43IDE1LjdMOC4zIDE0LjNMMTcuNiA1SDE0VjNIMjFWMTBIMTlWNi40TDkuNyAxNS43WiIgZmlsbD0iI0YwRjBGMCIvPgo8L2c+Cjwvc3ZnPgo=",t.closedCaptionsOnIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPG1hc2sgaWQ9Im1hc2swXzIxOF80NzAiIHN0eWxlPSJtYXNrLXR5cGU6YWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0iI0Q5RDlEOSIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazBfMjE4XzQ3MCkiPgo8cGF0aCBkPSJNNSAyMEM0LjQ1IDIwIDMuOTc5MTcgMTkuODA0MiAzLjU4NzUgMTkuNDEyNUMzLjE5NTgzIDE5LjAyMDggMyAxOC41NSAzIDE4VjZDMyA1LjQ1IDMuMTk1ODMgNC45NzkxNyAzLjU4NzUgNC41ODc1QzMuOTc5MTcgNC4xOTU4MyA0LjQ1IDQgNSA0SDE5QzE5LjU1IDQgMjAuMDIwOCA0LjE5NTgzIDIwLjQxMjUgNC41ODc1QzIwLjgwNDIgNC45NzkxNyAyMSA1LjQ1IDIxIDZWMThDMjEgMTguNTUgMjAuODA0MiAxOS4wMjA4IDIwLjQxMjUgMTkuNDEyNUMyMC4wMjA4IDE5LjgwNDIgMTkuNTUgMjAgMTkgMjBINVpNNSAxOEgxOVY2SDVWMThaTTcgMTVIMTBDMTAuMjgzMyAxNSAxMC41MjA4IDE0LjkwNDIgMTAuNzEyNSAxNC43MTI1QzEwLjkwNDIgMTQuNTIwOCAxMSAxNC4yODMzIDExIDE0VjEzSDkuNVYxMy41SDcuNVYxMC41SDkuNVYxMUgxMVYxMEMxMSA5LjcxNjY3IDEwLjkwNDIgOS40NzkxNyAxMC43MTI1IDkuMjg3NUMxMC41MjA4IDkuMDk1ODMgMTAuMjgzMyA5IDEwIDlIN0M2LjcxNjY3IDkgNi40NzkxNyA5LjA5NTgzIDYuMjg3NSA5LjI4NzVDNi4wOTU4MyA5LjQ3OTE3IDYgOS43MTY2NyA2IDEwVjE0QzYgMTQuMjgzMyA2LjA5NTgzIDE0LjUyMDggNi4yODc1IDE0LjcxMjVDNi40NzkxNyAxNC45MDQyIDYuNzE2NjcgMTUgNyAxNVpNMTQgMTVIMTdDMTcuMjgzMyAxNSAxNy41MjA4IDE0LjkwNDIgMTcuNzEyNSAxNC43MTI1QzE3LjkwNDIgMTQuNTIwOCAxOCAxNC4yODMzIDE4IDE0VjEzSDE2LjVWMTMuNUgxNC41VjEwLjVIMTYuNVYxMUgxOFYxMEMxOCA5LjcxNjY3IDE3LjkwNDIgOS40NzkxNyAxNy43MTI1IDkuMjg3NUMxNy41MjA4IDkuMDk1ODMgMTcuMjgzMyA5IDE3IDlIMTRDMTMuNzE2NyA5IDEzLjQ3OTIgOS4wOTU4MyAxMy4yODc1IDkuMjg3NUMxMy4wOTU4IDkuNDc5MTcgMTMgOS43MTY2NyAxMyAxMFYxNEMxMyAxNC4yODMzIDEzLjA5NTggMTQuNTIwOCAxMy4yODc1IDE0LjcxMjVDMTMuNDc5MiAxNC45MDQyIDEzLjcxNjcgMTUgMTQgMTVaIiBmaWxsPSJ3aGl0ZSIgZmlsbC1vcGFjaXR5PSIwLjkyIi8+CjwvZz4KPC9zdmc+Cg==",t.closedCaptionsOffIconSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPG1hc2sgaWQ9Im1hc2swXzIxOF80NjQiIHN0eWxlPSJtYXNrLXR5cGU6YWxwaGEiIG1hc2tVbml0cz0idXNlclNwYWNlT25Vc2UiIHg9IjAiIHk9IjAiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+CjxyZWN0IHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0iI0Q5RDlEOSIvPgo8L21hc2s+CjxnIG1hc2s9InVybCgjbWFzazBfMjE4XzQ2NCkiPgo8cGF0aCBkPSJNOS4wMjUwNSA5LjAwMDJMMTAuNTI1IDEwLjUwMDJINy41MDAwNVYxMy41MDAySDkuNTAwMDVWMTMuMDAwMkgxMVYxNC4wMDAyQzExIDE0LjI4MzUgMTAuOTA0MiAxNC41MjEgMTAuNzEyNSAxNC43MTI3QzEwLjUyMDkgMTQuOTA0NCAxMC4yODM0IDE1LjAwMDIgMTAgMTUuMDAwMkg3LjAwMDA1QzYuNzE2NzIgMTUuMDAwMiA2LjQ3OTIyIDE0LjkwNDQgNi4yODc1NSAxNC43MTI3QzYuMDk1ODggMTQuNTIxIDYuMDAwMDUgMTQuMjgzNSA2LjAwMDA1IDE0LjAwMDJWMTAuMDAwMkM2LjAwMDA1IDkuNzE2ODYgNi4wOTU4OCA5LjQ3OTM2IDYuMjg3NTUgOS4yODc3QzYuNDc5MjIgOS4wOTYwMyA2LjcxNjcyIDkuMDAwMiA3LjAwMDA1IDkuMDAwMkg5LjAyNTA1Wk02Ljg3NTA1IDQuMDAwMkgxOUMxOS41NSA0LjA
1wMDIgMjAuMDIwOSA0LjE5NjAzIDIwLjQxMjUgNC41ODc3QzIwLjgwNDIgNC45NzkzNiAyMSA1LjQ1MDIgMjEgNi4wMDAyVjE4LjEyNTJMMTkgMTYuMTI1MlY2LjAwMDJIOC44NzUwNUw2Ljg3NTA1IDQuMDAwMlpNMTggMTMuMDAwMlYxNC4wMDAyQzE4IDE0LjE1MDIgMTcuOTcwOSAxNC4yOTYgMTcuOTEyNSAxNC40Mzc3QzE3Ljg1NDIgMTQuNTc5NCAxNy43NjY3IDE0LjY5MTkgMTcuNjUgMTQuNzc1MkwxNi4zNzUgMTMuNTAwMkgxNi41VjEzLjAwMDJIMThaTTE2LjUgMTEuMDAwMlYxMC41MDAySDE0LjVWMTEuNjI1MkwxMyAxMC4xMjUyVjEwLjAwMDJDMTMgOS43MTY4NiAxMy4wOTU5IDkuNDc5MzYgMTMuMjg3NSA5LjI4NzdDMTMuNDc5MiA5LjA5NjAzIDEzLjcxNjcgOS4wMDAyIDE0IDkuMDAwMkgxN0MxNy4yODM0IDkuMDAwMiAxNy41MjA5IDkuMDk2MDMgMTcuNzEyNSA5LjI4NzdDMTcuOTA0MiA5LjQ3OTM2IDE4IDkuNzE2ODYgMTggMTAuMDAwMlYxMS4wMDAySDE2LjVaTTQuMjAwMDUgNC4xNzUyTDYuMDI1MDUgNi4wMDAySDUuMDAwMDVWMTguMDAwMkgxNS4xNzVMMC42NzUwNDkgMy41MDAyTDIuMTAwMDUgMi4wNzUyTDIxLjkgMjEuODc1MkwyMC40NzUgMjMuMzAwMkwxNy4xNzUgMjAuMDAwMkg1LjAwMDA1QzQuNDUwMDUgMjAuMDAwMiAzLjk3OTIyIDE5LjgwNDQgMy41ODc1NSAxOS40MTI3QzMuMTk1ODggMTkuMDIxIDMuMDAwMDUgMTguNTUwMiAzLjAwMDA1IDE4LjAwMDJWNi4wMDAyQzMuMDAwMDUgNS41ODM1MyAzLjExMjU1IDUuMjEyNyAzLjMzNzU1IDQuODg3N0MzLjU2MjU1IDQuNTYyNyAzLjg1MDA1IDQuMzI1MiA0LjIwMDA1IDQuMTc1MloiIGZpbGw9IndoaXRlIiBmaWxsLW9wYWNpdHk9IjAuOTIiLz4KPC9nPgo8L3N2Zz4K",t.shareVideosIconSvg="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjNWY2MzY4Ij48cGF0aCBkPSJNNjgwLTgwcS01MCAwLTg1LTM1dC0zNS04NXEwLTYgMy0yOEwyODItMzkycS0xNiAxNS0zNyAyMy41dC00NSA4LjVxLTUwIDAtODUtMzV0LTM1LTg1cTAtNTAgMzUtODV0ODUtMzVxMjQgMCA0NSA4LjV0MzcgMjMuNWwyODEtMTY0cS0yLTctMi41LTEzLjVUNTYwLTc2MHEwLTUwIDM1LTg1dDg1LTM1cTUwIDAgODUgMzV0MzUgODVxMCA1MC0zNSA4NXQtODUgMzVxLTI0IDAtNDUtOC41VDU5OC02NzJMMzE3LTUwOHEyIDcgMi41IDEzLjV0LjUgMTQuNXEwIDgtLjUgMTQuNVQzMTctNDUybDI4MSAxNjRxMTYtMTUgMzctMjMuNXQ0NS04LjVxNTAgMCA4NSAzNXQzNSA4NXEwIDUwLTM1IDg1dC04NSAzNVptMC04MHExNyAwIDI4LjUtMTEuNVQ3MjAtMjAwcTAtMTctMTEuNS0yOC41VDY4MC0yNDBxLTE3IDAtMjguNSAxMS41VDY0MC0yMDBxMCAxNyAxMS41IDI4LjVUNjgwLTE2MFpNMjAwLTQ0MHExNyAwIDI4LjUtMTEuNVQyNDAtNDgwcTAtMTctMTEuNS0yOC41VDIwMC01MjBxLTE3IDAtMjguNSAxMS41VDE2MC00ODBxMCAxNyAxMS41IDI4LjVUMjAwLTQ0MFptNDgwLTI4MHExNyAwIDI4LjUtMTEuNVQ3MjAtNzYwcTAtMTctMTEuNS0yOC41VDY4MC04MDBxLTE3IDAtMjguNSAxMS41VDY0MC03NjBxMCAxNyAxMS41IDI4LjVUNjgwLTcyMFptMCA1MjBaTTIwMC00ODBabTQ4MC0yODBaIi8+PC9zdmc+",t.linkIconSvg
vendor: 2,151 bytes, line 1
1="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAtOTYwIDk2MCA5NjAiIHdpZHRoPSIyNHB4IiBmaWxsPSIjNWY2MzY4Ij48cGF0aCBkPSJNNDQwLTI4MEgyODBxLTgzIDAtMTQxLjUtNTguNVQ4MC00ODBxMC04MyA1OC41LTE0MS41VDI4MC02ODBoMTYwdjgwSDI4MHEtNTAgMC04NSAzNXQtMzUgODVxMCA1MCAzNSA4NXQ4NSAzNWgxNjB2ODBaTTMyMC00NDB2LTgwaDMyMHY4MEgzMjBabTIwMCAxNjB2LTgwaDE2MHE1MCAwIDg1LTM1dDM1LTg1cTAtNTAtMzUtODV0LTg1LTM1SDUyMHYtODBoMTYwcTgzIDAgMTQxLjUgNTguNVQ4ODAtNDgwcTAgODMtNTguNSAxNDEuNVQ2ODAtMjgwSDUyMFoiLz48L3N2Zz4=",t.checkMarkSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPG1hc2sgaWQ9Im1hc2swXzUxMl8xMDY4IiBzdHlsZT0ibWFzay10eXBlOmFscGhhIiBtYXNrVW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4PSIwIiB5PSIwIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiPgo8cmVjdCB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIGZpbGw9IiNEOUQ5RDkiLz4KPC9tYXNrPgo8ZyBtYXNrPSJ1cmwoI21hc2swXzUxMl8xMDY4KSI+CjxwYXRoIGQ9Ik05LjU1MDEgMThMMy44NTAxIDEyLjNMNS4yNzUxIDEwLjg3NUw5LjU1MDEgMTUuMTVMMTguNzI1MSA1Ljk3NDk4TDIwLjE1MDEgNy4zOTk5OEw5LjU1MDEgMThaIiBmaWxsPSIjRjBGMEYwIi8+CjwvZz4KPC9zdmc+Cg==",t.plusSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgICAgICA8bGluZSB4MT0iNS45NTcxOCIgeTE9IjEyIiB4Mj0iNS45NTcxOCIgeTI9IjMuOTM0MDNlLTA4IiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIxLjgiLz4KICAgICAgICA8bGluZSB5MT0iNS45NTcwNiIgeDI9IjEyIiB5Mj0iNS45NTcwNiIgc3Ryb2tlPSJjdXJyZW50Q29sb3IiIHN0cm9rZS13aWR0aD0iMS44Ii8+CiAgICAgIDwvc3ZnPg=="},1643:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(4131),t)},1699:(e,t)=>
1{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BANNER_REQUEST_DEBOUNCE_MS=t.BANNER_REFRESH_INTERVAL=t.IMA_RATIOS=void 0,t.IMA_RATIOS={general:"1x1",horizontal:"640x480",vertical:"1080x1920"},t.BANNER_REFRESH_INTERVAL=3e4,t.BANNER_REQUEST_DEBOUNCE_MS=200},1712:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(6994),t),o(i(7958),t),o(i(7951),t),o(i(8832),t),o(i(2204),t)},1740:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeTimer=void 0;let n=i(8921),o=i(4403),s="00:00";class a extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),this.currentTimeText=n.WidgetsFactory.create("blaze-div"),this.totalTimeText=n.WidgetsFactory.create("blaze-div"),this.totalTimeDivider=n.WidgetsFactory.create("blaze-div")}connectedCallback(){this.attachStyles(),this.createDOM()}disconnectedCallback(){}set hidden(e){e?(this.classList.add("hidden"),this.style.display="none"):(this.style.display="flex",setTimeout(()=>{this.removeAttribute("hidden"),this.classList.remove("hidden")},250))}attachStyles(){let e=o.TextScaleService.getScale(),t=12*e,i=document.createElement("style");i.textContent="\n :host {\n display: flex;\n transition: opacity 0.5s ease, transform 0.5s ease;\n opacity: 1;\n transform: translateY(0);\n font-size: "+t+"px;\n font-weight: 400;\n color: #fff;\n background: rgba(0, 0, 0, 0.34);\n border-radius: 10px;\n position: relative;\n pointer-events: none;\n z-index: 2;\n padding: 5px 10px;\n }\n\n :host(.seeking-layout) {\n align-self: center;\n opacity: 1;\n transform: translateY(0);\n }\n\n :host(.player-layout) {\n align-self: flex-start;\n opacity: 1;\n transform: translateY(0);\n }\n\n :host(.hidden) {\n opacity: 0;\n transform: translateY(-20px);\n }\n\n .time-text {\n width: auto;\n text-align: center;\n overflow: hidden;\n white-space: nowrap;\n font-size: "+t+"px; \n }\n\n .current-time-text-seeking {\n font-size: "+22*e+"px;\n width: auto;\n }\n\n .current-time-text-player {\n font-size: "+t+"px;\n width: auto;\n }\n\n .divider {\n width: 10px; \n text-align: center;\n overflow: hidden;\n white-space: nowrap;\n }\n\n .hidden {\n display: none;\n }\n\n .visible {\n display: block;\n }\n\n blaze-div {\n display: inline-block;\n }\n ",this.shadow.appendChild(i)}createDOM(){this.currentTimeText.classList.add("time-text","current-time-text-player"),this.currentTimeText.textContent=s,this.totalTimeDivider.classList.add("divider","visible"),this.totalTimeDivider.textContent="/",this.totalTimeText.classList.add("time-text","current-time-text-player"),this.totalTimeText.textContent=s,this.shadow.appendChild(this.currentTimeText),this.shadow.appendChild(this.totalTimeDivider),this.shadow.appendChild(this.totalTimeText),this.setLayout("player")}updateCurrentTime(e){this.currentTimeText.textContent=this.formatTime(e)}updateTotalTime(e){this.totalTimeText.textContent=this.formatTime(e),this.hidden=!1}resetTimer(){this.hidden=!0,this.currentTimeText.textContent=s,this.totalTimeText.textContent=s}setLayout(e){"seeking"===e?this.applySeekingLayout():"player"===e&&this.applyPlayerLayout()}applySeekingLayout(){this.totalTimeDivider.classList.add("hidden"),this.totalTimeText.classList.add("hidden"),this.totalTimeDivider.classList.remove("visible"),this.totalTimeText.classList.remove("visible"),this.classList.add("seeking-layout"),this.classList.remove("player-layout"),this.currentTimeText.classList.add("current-time-text-seeking"),this.currentTimeText.classList.remove("current-time-text-player")}applyPlayerLayout(){this.totalTimeDivider.classList.add("visible"),this.totalTimeText.classList.add("visible"),this.totalTimeDivider.classList.remove("hidden"),this.totalTimeText.classList.remove("hidden"),this.classList.add("player-layout"),this.classList.remove("seeking-layout"),this.currentTimeText.classList.add("current-time-text-player"),this.currentTimeText.classList.remove("current-time-text-seeking")}formatTime(e){let t=Math.floor(e/3600),i=Math.floor(e%3600/60),n=Math.floor(e%60);return t>0?this.padZero(t)+":"+this.padZero(i)+":"+this.padZero(n):this.padZero(i)+":"+this.padZero(n)}padZero(e){return e<10?"0"+e:""+e}}t.BlazeTimer=a},1758:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0})},1841:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetCustomLayout=void 0;let o=i(6450),s=i(9965),a=i(8921),r=i(4545),l=i(9266),d=i(6627);class h extends d.WidgetBaseLayout{constructor(e){super(),this.customRenderer=e,this.customContainer=a.WidgetsFactory.create("blaze-div"),this.customContainer.className="blaze-custom-widget-container",this.intersectionObserver=new IntersectionObserver(this.handleIntersection.bind(this)),r.ConfigService.runInShadowDom&&this.attachShadow({mode:"open"})}getContainer(){return this.customContainer}getContents(){return(0,l.transformContentsArray)(this.contents)}connectedCallback(){var e;(0,l.setId)(this,"blaze-custom-layout"),super.connectedCallback(),this.setStyle({display:"block",width:"100%",height:"100%",outline:"none",direction:r.ConfigService.layoutDirection}),(null!==(e=this.shadowRoot)&&void 0!==e?e:this).appendChild(this.customContainer),this.intersectionObserver.observe(this),this.shouldReloadData&&this.loadContent()}disconnectedCallback(){var e,t,i,n,o;super.disconnectedCallback(),this.intersectionObserver.disconnect(),null===(t=(e=this.customRenderer).destroy)||void 0===t||t.call(e),null===(i=this.storysModal)||void 0===i||i.remove(),null===(n=this.momentsModal)||void 0===n||n.remove(),null===(o=this.videosModal)||void 0===o||o.remove()}handleIntersection(e){let t=e.find(e=>e.target===this);t&&t.isIntersecting&&(this.isWidgetVisible=!0,this.event(o.WidgetAction.Visible,{},this.getAttribute("labels")),this.intersectionObserver.disconnect())}reload(){this.shouldReloadData=!0,this.loadContent()}updateWidgetUI(){this.reorderWidgets(),this.render()}setMaxItemsDisplaySize(e){this.setAttribute("max-display-items-count",e.toString())}updateOverrideStyles(){}setId(e){this.id="widget-custom-layout-"+e}handlePostContentLoad(e,t,i){return n(this,void 0,void 0,function*(){this.updateWidgetsData(),this.reorderWidgets(),this.setupModalContent(e?"story":t?"moment":"video"),this.render(),e?this.handleStoryContent():t?this.handleMomentContent():i&&this.handleVideoContent(),this.shouldReloadData=!1,r.EventService.dispatch(this,s.Delegation.onWidgetDataLoadCompleted,{widgetId:this.id,storyCount:this.contents.length,contentCount:this.contents.length}),this.isWidgetVisible&&this.contents.length&&this.event(o.WidgetAction.Visible,{},this.getAttribute("labels")),this.event(o.WidgetAction.Load,{},this.getAttribute("labels"))})}reorderWidgetItems(){}updateWidgetDisplay(){}setupModalContent(e){"story"===e&&this.storysModal?this.storysModal.setModalContent(this.contents,0):"moment"===e&&this.momentsModal?this.momentsModal.setModalContent(this.contents,0,this.defaultAdsInfo):"video"===e&&this.videosModal&&this.videosModal.setModalContent(this.contents)}playContentById(e){if(!this.contents.find(t=>t.id===e))return;let t=this.getAttribute("content-type")||"story";r.VideoPlayerService.playReference="Widget","story"===t&&this.storysModal?this.playStory(e):"moment"===t&&this.momentsModal?this.playMoment(e):"video"===t&&this.videosModal&&this.playVideo(e)}render(){this.contents.length&&(this.customContainer.innerHTML="",this.customRenderer.render((0,l.transformContentsArray)(this.contents),this.customContainer,this.playContentById.bind(this)))}setupVideoModalCallbacks(){this.videosModal&&this.videosModal.addEventListener("onPlayerClosed",()=>{this.updateWidgetsData()})}setupMomentModalCallbacks(){this.momentsModal&&this.momentsModal.addEventListener("onPlayerClosed",()=>{this.updateWidgetsData()})}setupStoryModalCallbacks(){this.storysModal&&this.storysModal.addEventListener("onWidgetPlayerDismissed",()=>{this.updateWidgetsData()})}}t.BlazeWidgetCustomLayout=h},1868:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeCallToActionButton=t.CTA_BUTTON_ATTRIBUTES=void 0;let n=i(4403),o=i(8921),s=i(277),a=i(4906),r=i(3574),l=i(9266);t.CTA_BUTTON_ATTRIBUTES={HiddenBtn:"hidden-btn",Width:"width",Height:"height",Margin:"margin",Text:"text",Href:"href",IconUrl:"icon-url",IconSize:"icon-size",IconColor:"icon-color",ArrowIconDisplay:"arrow-icon-display",ArrowIconColor:"arrow-icon-color",DisplayIcon:"display-icon"};class d extends n.BaseWidget{constructor(){super(),this.anchorButtonElement=document.createElement("a"),this.iconButtonElement=o.WidgetsFactory.create("blaze-button"),this.iconArrowElement=o.WidgetsFactory.create("blaze-button"),this.ctaTextElement=o.WidgetsFactory.create("blaze-div"),this.isButtonCreated=!1,this.animationTimeouts=[],this.initializeAttributes(),this.initializeStyles()}initializeAttributes(){this.setAttribute("data-testid","cta-button"),this.anchorButtonElement.setAttribute("target","_blank"),this.iconButtonElement.setAttribute(t.CTA_BUTTON_ATTRIBUTES.Width,"24px"),this.iconButtonElement.setAttribute(t.CTA_BUTTON_ATTRIBUTES.Height,"24px"),this.iconButtonElement.setAttribute(t.CTA_BUTTON_ATTRIBUTES.DisplayIcon,"false"),this.iconArrowElement.setAttribute(t.CTA_BUTTON_ATTRIBUTES.Width,"26px"),this.iconArrowElement.setAttribute(t.CTA_BUTTON_ATTRIBUTES.Height,"26px"),this.iconArrowElement.setIconUrl(s.arrowUpCtaIconSvg)}initializeStyles(){(0,l.mergeStyles)(this,{display:"none",cursor:"pointer",outline:"inherit",pointerEvents:"all"}),this.anchorButtonElement.style.position="relative",this.anchorButtonElement.style["-webkit-touch-callout"]="none",this.anchorButtonElement.style["-webkit-user-select"]="none",this.setAnchorButtonStyles({width:"auto",height:"100%",textDecoration:"none",outline:"1px solid",outlineColor:a.Colors.White,fontWeight:"700",fontSize:"16px",borderRadius:"8px",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"row"}),this.iconArrowElement.setStyle({display:"none",position:"absolute",top:"-26px"}),this.setCtaTextStyle({position:"inline-flex",letterSpacing:"0.3px",display:"inline-flex",flex:"1 1 auto",alignSelf:"center",paddingRight:"20px",whiteSpace:"nowrap"})}static get observedAttributes(){return Object.values(t.CTA_BUTTON_ATTRIBUTES)}connectedCallback(){this.createButton()}disconnectedCallback(){}attributeChangedCallback(e,i,n){if(i!==n)switch(e){case t.CTA_BUTTON_ATTRIBUTES.HiddenBtn:this.style.display="true"===n?"none":"flex";break;case t.CTA_BUTTON_ATTRIBUTES.Width:this.anchorButtonElement.style.width=n;break;case t.CTA_BUTTON_ATTRIBUTES.Margin:this.anchorButtonElement.style.margin=n;break;case t.CTA_BUTTON_ATTRIBUTES.Text:this.ctaTextElement.innerText=n;break;case t.CTA_BUTTON_ATTRIBUTES.Href:this.anchorButtonElement.href=n;break;case t.CTA_BUTTON_ATTRIBUTES.IconUrl:this.iconButtonElement.setIconUrl(n);break;case t.CTA_BUTTON_ATTRIBUTES.IconSize:this.iconButtonElement.setAttribute(t.CTA_BUTTON_ATTRIBUTES.Height,n),this.iconButtonElement.setAttribute(t.CTA_BUTTON_ATTRIBUTES.Width,n);break;case t.CTA_BUTTON_ATTRIBUTES.IconColor:this.iconButtonElement.setAttribute(t.CTA_BUTTON_ATTRIBUTES.IconColor,n);break;case t.CTA_BUTTON_ATTRIBUTES.ArrowIconDisplay:this.iconButtonElement.style.display="true"===n?"inline-flex":"none";break;case t.CTA_BUTTON_ATTRIBUTES.ArrowIconColor:this.iconArrowElement.style.display="true"===n?"flex":"none";break;case t.CTA_BUTTON_ATTRIBUTES.DisplayIcon:this.iconArrowElement.setAttribute(t.CTA_BUTTON_ATTRIBUTES.IconColor,n)}}createButton(){this.isButtonCreated||(this.anchorButtonElement.append(this.iconButtonElement),this.anchorButtonElement.append(this.ctaTextElement),this.anchorButtonElement.append(this.iconArrowElement),this.append(this.anchorButtonElement),this.isButtonCreated=!0)}animateElement(e,t,i,n,o){e.style.animation="none",e.offsetWidth;let s=setTimeout(()=>{let n=r.animationCssMapper[t];n&&(e.style.animation=n+" "+i+"s cubic-bezier(0.4, 0, 0, 0.99) "+o+" forwards"),this.animationTimeouts=this.animationTimeouts.filter(e=>e!==s)},n);this.animationTimeouts.push(s)}animateButton(e){this.animateElement(this.anchorButtonElement,e,2,3500,1)}animateIcon(e){this.animateElement(this.iconArrowElement,e,3,1e3,3)}setAnchorButtonStyles(e){(0,l.mergeStyles)(this.anchorButtonElement,e)}setCtaTextStyle(e){(0,l.mergeStyles)(this.ctaTextElement,e)}setCtaIconStyles(e){(0,l.mergeStyles)(this.iconButtonElement,e)}
1clearAllAnimations(){this.animationTimeouts.forEach(e=>clearTimeout(e)),this.animationTimeouts=[]}getIconElement(){return this.iconButtonElement}}t.BlazeCallToActionButton=d},1908:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(7177),t),o(i(551),t),o(i(1740),t),o(i(2654),t),o(i(7357),t),o(i(4014),t),o(i(6025),t),o(i(2601),t),o(i(9191),t),o(i(656),t),o(i(1006),t),o(i(8772),t),o(i(8252),t),o(i(6610),t),o(i(1532),t),o(i(7195),t),o(i(7792),t),o(i(8261),t)},1948:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sortContentByViewedStatus=function(e,t){let i=e.hasViewed,o=t.hasViewed;return(0,n.isStory)(e)&&(0,n.isStory)(t)&&(i=e.pages.every(e=>e.hasViewed),o=t.pages.every(e=>e.hasViewed)),i&&!o?1:!i&&o?-1:0};let n=i(9266)},1977:(e,t)=>{"use strict";var i,n,o,s,a,r,l,d,h,u,c,p,g,v;Object.defineProperty(t,"__esModule",{value:!0}),t.exposedFieldsByAction=t.InteractionAction=t.ImaAdAction=t.AdAction=t.WidgetAction=t.VideoAction=t.MomentAction=t.StoryAction=void 0,(d=i||(t.StoryAction=i={})).Start="story_start",d.Exit="story_exit",d.PageStart="story_page_start",d.PageExit="story_page_exit",d.CtaClick="cta_click",d.Audio="audio",d.ShareClick="share_click",d.ShareSelect="share_select",d.ShareSuccess="share_success",d.PlaybackPause="playback_pause",d.PlaybackPlay="playback_play",d.PlaybackInitialStart="playback_initial_start",d.Expand="expand",d.Minimize="minimize",d.ClosedCaptionsOff="cc_off",d.ClosedCaptionsOn="cc_on",d.CustomActionButtonClick="custom_action_button_click",(h=n||(t.MomentAction=n={})).MomentsPlaylistStart="moments_playlist_start",h.MomentsPlaylistExit="moments_playlist_exit",h.MomentStart="moment_start",h.MomentExit="moment_exit",h.CtaClick="cta_click",h.Like="like",h.Unlike="unlike",h.Audio="audio",h.ShareClick="share_click",h.ShareSuccess="share_success",h.PlaybackPause="playback_pause",h.PlaybackPlay="playback_play",h.PlaybackInitialStart="playback_initial_start",h.ClosedCaptionsOff="cc_off",h.ClosedCaptionsOn="cc_on",h.CustomActionButtonClick="custom_action_button_click",h.Follow="follow",h.Unfollow="unfollow",(u=o||(t.VideoAction=o={})).VideoStart="video_start",u.VideoEnd="video_end",u.PlaybackPause="playback_pause",u.PlaybackPlay="playback_play",u.PlaybackInitialStart="playback_initial_start",u.Seek="seek",u.Like="like",u.Unlike="unlike",u.Share="share",u.Audio="audio",u.CtaVisible="cta_visible",u.CtaClick="cta_click",u.CtaDismissed="cta_dismissed",u.ClosedCaptionsOff="cc_off",u.ClosedCaptionsOn="cc_on",u.ScreenChange="screen_change",(c=s||(t.WidgetAction=s={})).Load="widget_load",c.Visible="widget_visible",c.Click="widget_click",c.SDKInit="sdk_init",(p=a||(t.AdAction=a={})).Requested="ad_requested",p.View="ad_view",p.Exit="ad_exit",p.Click="ad_click",p.BannerRequested="banner_ad_requested",p.BannerView="banner_ad_view",p.BannerLoad="banner_ad_load",p.BannerClick="banner_ad_click",(g=r||(t.ImaAdAction=r={})).REQUESTED="ima_ad_requested",g.ALL_ADS_COMPLETED="ima_all_ads_completed",g.CLICK="ima_ad_clicked",g.COMPLETED="ima_ad_completed",g.LOADED="ima_ad_loaded",g.PAUSED="ima_ad_paused",g.RESUMED="ima_ad_resumed",g.SKIPPED="ima_ad_skipped",g.STARTED="ima_ad_started",g.FIRST_QUARTILE="ima_ad_first_quartile",g.MIDPOINT="ima_ad_midpoint",g.THIRD_QUARTILE="ima_ad_third_quartile",(v=l||(t.InteractionAction=l={})).VIEW="interaction_view",v.ANSWER="interaction_answer",v.AUDIO="audio",v.ShareClick="share_click",v.ShareSelect="share_select",v.ShareSuccess="share_success",v.PlaybackPause="playback_pause",v.PlaybackPlay="playback_play";let y="labels_expression",m="story_id",b="story_title",f="moment_id",S="moment_title",E="moment_duration_viewed_percent",C="audio_state",T="player_type",A="content_type",I="playback_action_method",M="cc_state",w="skip_config",_="video_id",P="video_title",L="video_time_start",x="video_time_end",O="video_end_trigger",D="screen_change",B="follow_state",N="localization_setting",k="localization",z=["timestamp_utc","timestamp_user_tz","sdk_version","sdk_type","event_category","event_action","event_type","generated_user_id","external_user_id","content_extra_info","story_page_content_extra_info"],R=["origin_widget_id","origin_widget_name","origin_widget_type","origin_placement_id","origin_placement_name"],j=["placement_id","placement_name","placement_distance","widget_id","widget_size","widget_type","widget_content_count","widget_content_list","content_index","thumbnail_size","thumbnail_aspect_ratio","thumbnail_type","page_view_id"],V=["session_id","locale","user_type","device_type","device_brand","device_model","network_domain","os","os_version","screen_color","screen_resolution","browser","browser_size","browser_version","app_id","app_version","user_agent","connection_type","page_url","referrer_page_type","referrer_page_url","referrer_page_domain","session_referrer_page_type","session_referrer_url","session_referrer_domain","session_referrer_type","advertiser_id","advertiser_name","campaign_id","campaign_name","ad_server","ad_insertion_logic","ad_index","ad_start_trigger","ad_exit_trigger","ad_duration","ad_duration_viewed_percent",I,w],U=[y,C,T,M],W=[...z,...R,"story_session_id",m,b,"story_page_id","story_page_index","story_page_count","story_page_duration",N,k,...U],F=[...z,...R,"moments_session_id",f,S,"moment_index","loop_number","moment_duration",E,C,M,B,N,k,...U],H=[...z,...R,...U,"video_session_id",_,P,"video_duration","video_start_trigger","cta_config",D,"player_orientation","device_orientation",C,M,N,k],Y=[...z,...R,...V,I,C,m,b,f,S,_,P,w,A,T];t.exposedFieldsByAction={[i.Start]:[...W,"story_start_trigger"],[i.Exit]:[...W,"story_exit_trigger","content_duration_viewed"],[i.PageStart]:W,[i.PageExit]:[...W,"story_page_navigation_type","story_page_navigation_direction","story_page_duration_viewed_percent"],[i.CtaClick]:W,[i.Audio]:W,[i.ShareClick]:W,[i.ShareSelect]:W,[i.ShareSuccess]:W,[i.PlaybackPause]:[...W,I],[i.PlaybackPlay]:[...W,I],[i.PlaybackInitialStart]:[...W,I],[i.ClosedCaptionsOff]:W,[i.ClosedCaptionsOn]:W,[n.MomentsPlaylistStart]:[...F,"moment_start_trigger"],[n.MomentsPlaylistExit]:[...F,"moment_exit_trigger"],[n.MomentStart]:F,[n.MomentExit]:[...F,"moment_navigation_type","moment_navigation_direction",E],[n.Like]:F,[n.Unlike]:F,["$"+n.CtaClick]:F,["$"+n.Audio]:F,["$"+n.ShareClick]:F,["$"+n.ShareSuccess]:F,["$"+n.PlaybackPause]:[...F,I],["$"+n.PlaybackPlay]:[...F,I],["$"+n.PlaybackInitialStart]:[...F,I],["$"+n.ClosedCaptionsOn]:[...F,M],["$"+n.ClosedCaptionsOff]:[...F,M],["$"+n.Follow]:[...F,B],["$"+n.Unfollow]:[...F,B],[o.VideoStart]:[...H,L],[o.VideoEnd]:[...H,x,O,"next_video_id"],["#"+o.PlaybackPause]:[...H,I,L,O],["#"+o.PlaybackPlay]:[...H,I,L,O],["#"+o.PlaybackInitialStart]:[...H,I,L,O],[o.Seek]:[...H,L,x,"seek_type","seek_total_time","seek_direction"],["#"+o.Like]:[...H,L],["#"+o.Unlike]:[...H,L],["#"+o.Share]:[...H,L],["#"+o.Audio]:[...H,L],[o.CtaVisible]:[...H,L],["#"+o.CtaClick]:[...H,L],[o.CtaDismissed]:[...H,L],["#"+o.ClosedCaptionsOff]:[...H,L],["#"+o.ClosedCaptionsOn]:[...H,L],[o.ScreenChange]:[...H,L,D],[s.Load]:[...z,...j,y,T],[s.Visible]:[...z,...j,y,T],[s.Click]:[...z,...j,"content_id",A,"content_name",T,y],[a.View]:[...z,...R,...V,I,C,m,b,w,A,T],[a.Exit]:[...z,...R,...V,I,C,m,b,w,A,T],[r.REQUESTED]:Y,[r.ALL_ADS_COMPLETED]:Y,[r.CLICK]:Y,[r.COMPLETED]:Y,[r.LOADED]:Y,[r.PAUSED]:Y,[r.RESUMED]:Y,[r.SKIPPED]:Y,[r.STARTED]:Y,[r.FIRST_QUARTILE]:Y,[r.MIDPOINT]:Y,[r.THIRD_QUARTILE]:Y}},2029:(e,t)=>
1{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ACCESSIBILITY_ATTRIBUTES=t.ACCESSIBILITY_TIMING=void 0,t.ACCESSIBILITY_TIMING={FOCUS_DELAY:500,LABEL_CLEAR_DELAY:1e3,CONFIG_SCHEDULE_DELAY:1e3},t.ACCESSIBILITY_ATTRIBUTES={ACTIVE_TABINDEX:"0",INACTIVE_TABINDEX:"-1",REGION_ROLE:"region",ARIA_HIDDEN_FALSE:"false",ARIA_HIDDEN_TRUE:"true"}},2111:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2169:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2171:(e,t)=>{"use strict";var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ActionHandlerId=void 0,(n=i||(t.ActionHandlerId=i={})).AddCustomActionButton="addCustomActionButton",n.AddFollowButton="addFollowButton"},2203:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeButton=t.BUTTON_ATTRIBUTES=void 0;let n=i(4403),o=i(4545),s=i(9266);t.BUTTON_ATTRIBUTES={Disabled:"disabled",BlazeBtnHidden:"blaze-btn-hidden",BlazeBtnVisible:"blaze-btn-visible",Height:"height",Width:"width",IconColor:"icon-color",Order:"order",ButtonDesktopAnimation:"button-desktop-animation"};class a extends n.BaseWidget{get refElement(){var e;return null!==(e=this.shadowRoot)&&void 0!==e?e:this}constructor(){super(),this.buttonElement=document.createElement("button"),this.buttonIcon="",this.isAnimationOnDesktopInitialized=!1,this.onKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.buttonElement.disabled||"true"===this.getAttribute("disabled")||""===this.getAttribute("disabled")||this.click())},this.onMouseEnter=()=>{this.buttonElement.style.transform="scale(1.1)"},this.onMouseLeave=()=>{this.buttonElement.style.transform="scale(1)"},this.onClick=()=>{this.buttonElement.animate([{transform:"scale(1)",offset:0},{transform:"scale(0.95)",offset:.5},{transform:"scale(1)",offset:1}],{duration:100,easing:"ease-out"})},o.ConfigService.runInShadowDom&&this.attachShadow({mode:"open"})}setupFocusDelegation(){this.addEventListener("keydown",this.onKeyDown)}static get observedAttributes(){return Object.values(t.BUTTON_ATTRIBUTES)}connectedCallback(){(0,s.mergeStyles)(this.buttonElement,{cursor:"pointer",color:"inherit",border:"none",padding:"0",display:"block",outline:"inherit",height:this.height||"24px",width:this.width||"24px",margin:"auto",touchAction:"manipulation",transition:"transform 0.3s ease"}),this.buttonElement.setAttribute("tabindex","-1"),this.hasAttribute("tabindex")||this.setAttribute("tabindex","0"),this.setAttribute("role","button"),this.style.cursor="pointer",this.refElement.append(this.buttonElement),this.setupFocusDelegation()}disconnectedCallback(){this.buttonElement.removeEventListener("mouseenter",this.onMouseEnter),this.buttonElement.removeEventListener("mouseleave",this.onMouseLeave),this.buttonElement.removeEventListener("click",this.onClick),this.removeEventListener("keydown",this.onKeyDown)}attributeChangedCallback(e,i,n){switch(e){case t.BUTTON_ATTRIBUTES.Disabled:let o="true"===n||""===n;this.setIsDisabled(o);break;case t.BUTTON_ATTRIBUTES.BlazeBtnHidden:this.setIsHidden("true"===n);break;case t.BUTTON_ATTRIBUTES.BlazeBtnVisible:this.setIsVisible("true"===n);break;case t.BUTTON_ATTRIBUTES.Height:this.setHeight(n);break;case t.BUTTON_ATTRIBUTES.Width:this.setWidth(n);break;case t.BUTTON_ATTRIBUTES.IconColor:this.buttonElement.style.background=n;break;case t.BUTTON_ATTRIBUTES.Order:this.style.order=n;break;case t.BUTTON_ATTRIBUTES.ButtonDesktopAnimation:"true"!==n||this.isAnimationOnDesktopInitialized||(this.isAnimationOnDesktopInitialized=!0,this.buttonElement.addEventListener("mouseenter",this.onMouseEnter),this.buttonElement.addEventListener("mouseleave",this.onMouseLeave),this.buttonElement.addEventListener("click",this.onClick))}}get height(){return this.getAttribute("height")}get width(){return this.getAttribute("width")}setIconUrl(e){this.buttonIcon=e,this.applyIconStyles(e)}setIconUrlAnimation(e){this.buttonIcon!==e&&(this.buttonIcon=e,this.buttonElement.animate([{opacity:1},{opacity:0}],{duration:75,easing:"ease-out",fill:"forwards"}).onfinish=()=>{this.applyIconStyles(e),this.buttonElement.animate([{opacity:0}
1,{opacity:1}],{duration:75,easing:"ease-in",fill:"forwards"})})}setAriaLabel(e){e?this.buttonElement.setAttribute("aria-label",e):this.buttonElement.removeAttribute("aria-label")}applyIconStyles(e){(0,s.mergeStyles)(this.buttonElement,{"-webkit-mask-image":"url('"+e+"')","mask-image":"url('"+e+"')","-webkit-mask-repeat":"no-repeat","mask-repeat":"no-repeat","-webkit-mask-size":"contain","mask-size":"contain","-webkit-mask-position":"center","mask-position":"center","background-image":"none","-webkit-transform":"translateZ(0)",transform:"translateZ(0)","-webkit-backface-visibility":"hidden","backface-visibility":"hidden"})}setIsHidden(e){this.style.display=e?"none":"block"}setIsVisible(e){this.style.visibility=e?"visible":"hidden"}setIsDisabled(e){e?(this.buttonElement.disabled=!0,this.buttonElement.setAttribute("disabled",""),this.buttonElement.setAttribute("aria-disabled","true"),(0,s.mergeStyles)(this.buttonElement,{cursor:"initial",background:"rgba(239, 239, 239, 0.3)"}),this.style.cursor="initial"):(this.buttonElement.disabled=!1,this.buttonElement.removeAttribute("disabled"),this.buttonElement.removeAttribute("aria-disabled"),this.removeAttribute("disabled"),(0,s.mergeStyles)(this.buttonElement,{opacity:"1",cursor:"pointer",background:this.getAttribute("icon-color")}),this.style.cursor="pointer",this.style.pointerEvents="auto")}setHeight(e){this.buttonElement.style.height=e}setWidth(e){this.buttonElement.style.width=e}setDataTestId(e){this.setAttribute("data-testid",e)}}t.BlazeButton=a},2204:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateModalAriaLabel=function(e){let{contentType:t,position:i,total:o,title:s,currentContent:a,includeNavigationContext:r=!1}=e,l=[];if(r&&a){let e=function(e,t){let i=e.navigationType,n=e.navigationDirection;if("Manual"===i&&n){let e="story"===t?"story":"moment";return"Forwards"===n?"Next "+e:"Previous "+e}return"Automatic"===i?"New "+("story"===t?"story":"moment"):""}(a,t);e&&l.push(e)}let d=t+" "+i+" of "+o;if(s&&(d+=": "+s),l.push(d),"story"===t&&a){let e=function(e){var t;let i=(e.pageIndex||0)+1,n=null===(t=e.pages)||void 0===t?void 0:t.length;return i&&n?"page "+i+" of "+n:""}(a);e&&l.push(e)}let h=function(){let e=[];return n.VideoPlayerService.isPlaying&&e.push("playing"),n.VideoPlayerService.isMuted&&e.push("muted"),e.length>0?e.join(" and "):""}();return h&&l.push(h),l.join(", ")};let n=i(4545)},2240:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetAbstractPlayer=void 0;let n=i(4403),o=i(6450),s=i(8921),a=i(4545),r=i(4906),l=i(9266),d=i(8048),h=i(6806),u=["blaze-widget-cc-modal"];class c extends n.BaseWidget{constructor(){super(),this.index=0,this.videoPlayerState=a.VideoPlayerService,this.numberOfContentInList=3,this.contentList=[],this.playerContentList=[],this.hammer={},this.gestureActionLimitThreshold=25,this.edgeScreenThreshold=30,this.isEdgeThreshold=!1,this.isNavigationBlocked=!1,this.isCloseAnimationStarted=!1,this.listeners=new n.EventsListener,this.boundHandlePanStart=this.handlePanStart.bind(this),this.boundHandlePanMove=this.handlePanMove.bind(this),this.boundHandlePanEnd=this.handlePanEnd.bind(this),this.container=s.WidgetsFactory.create("blaze-div"),this.srcBackground=document.createElement("canvas"),this.destBackground=document.createElement("canvas"),this.srcBackground.setAttribute("aria-hidden","true"),this.destBackground.setAttribute("aria-hidden","true"),this.playerFullscreenOverlay=s.WidgetsFactory.create("blaze-div"),this.playerFullscreenOverlay.setStyle({position:"fixed",left:"0",top:"0",width:"100%",height:"100%",zIndex:"99999",display:"none"}),this.srcBackground.width=3,this.srcBackground.height=3,this.destBackground.width=3,this.destBackground.height=3,(0,l.mergeStyles)(this.srcBackground,{position:"absolute",width:"100%",height:"100%",top:"0",right:"0",bottom:"0",left:"0"}),(0,l.mergeStyles)(this.destBackground,{position:"absolute",width:"100%",height:"100%",top:"0",right:"0",bottom:"0",left:"0",opacity:"0%"})}seekContentById(e){this.cleanPlayerContentList();let t=this.contentList.findIndex(t=>t.data.id==e);if(this.isBlazeWidgetStory(this.contentList)){let e=Math.max(0,t-Math.floor(this.numberOfContentInList/2)),i=Math.min(this.contentList.length-1,t+Math.floor(this.numberOfContentInList/2));for(let t=e;t<=i;t++){let e=this.contentList[t];e&&(this.playerContentList.push(e),this.container.append(e))}}else if(this.isBlazeWidgetMoment(this.contentList)){let e=t-Math.floor((this.numberOfContentInList-1)/2),i=t+Math.ceil((this.numberOfContentInList-1)/2);e<0&&(i-=e,e=0),i>=this.contentList.length&&(e-=i-this.contentList.length+1,i=this.contentList.length-1),e=Math.max(0,e);for(let t=e;t<=i;t++){let e=this.contentList[t],i=this.cloneMoment(e);
1i&&(this.playerContentList.push(i),this.container.append(i))}}else if(this.isBlazeWidgetVideo(this.contentList)){let e=this.contentList[t],i=e.cloneNode(!0);i.videoPlayerState=e.videoPlayerState,e.modal&&i.setModal(e.modal),e.embeddedRef&&i.setEmbeddedRef(e.embeddedRef),i.playerStyle=e.playerStyle,i.setData(e.data),e.widgetParentItem&&i.setWidgetItemParent(e.widgetParentItem),i.refContentModal=e.refContentModal,i.startTrigger=e.startTrigger,i&&(this.playerContentList.push(i),this.container.append(i))}this.index=this.playerContentList.findIndex(t=>t.data.id==e)}cloneMoment(e){let t=e.cloneNode(!0);return t.setModal(e.modal),t.playerStyle=e.playerStyle,t.setData(e.data),t.shouldShowImaAdOnStart=e.shouldShowImaAdOnStart,t.adInfo=e.adInfo,t.setWidgetItemParent(e.widgetParentItem),t.momentIndex=e.momentIndex,t.refContentModal=e.refContentModal,t.startTrigger=e.startTrigger,t.actionHandlers=e.actionHandlers,t.contentExtraInfo=e.contentExtraInfo,t.video&&e.video&&(t.video.requestFrameCallback=e.video.requestFrameCallback),t}cleanPlayerContentList(){for(let e of this.playerContentList)null==e||e.remove();this.playerContentList=[]}muteVideoOnIOSOrMacTablet(){this.isBlazeWidgetMoment(this.contentList)||this.isBlazeWidgetVideo(this.contentList)||n.deviceDetector.isIOSMobileTabletSafari()&&(this.videoPlayerState.isMuted=!0)}setupHammer(e=Hammer.DIRECTION_HORIZONTAL){this.hammer=new Hammer.Manager(this);let t=new Hammer.Pan({direction:e,threshold:5}),i=new Hammer.Swipe({direction:e,threshold:5});this.hammer.add(t),this.hammer.add(i).recognizeWith(t),this.hammer.on("panstart",this.boundHandlePanStart),this.hammer.on("panmove",this.boundHandlePanMove),this.hammer.on("panend",this.boundHandlePanEnd),this.style.touchAction="pinch-zoom"}cleanupHammer(){this.hammer.off("panstart",this.boundHandlePanStart),this.hammer.off("panmove",this.boundHandlePanMove),this.hammer.off("panend",this.boundHandlePanEnd),this.hammer.destroy()}handlePanStart(e){"SingleContent"===a.VideoPlayerService.playReference&&!a.ConfigService.shouldAutoAdvance||(e.preventDefault(),"mobile"===n.deviceDetector.platform&&(this.isEdgeThreshold=this.isTouchOnScreenEdges(e.center.x,this.offsetWidth),this.isEdgeThreshold)||e.maxPointers>1||this.isNavigationBlocked||this.setAnimationContent())}handlePanMove(e){e.preventDefault(),(0,l.isElementInsideTarget)(e.target,u)||"desktop"!==n.deviceDetector.platform&&(this.isNavigationBlocked||this.isEdgeThreshold||(e.maxPointers>1?this.reverseAnimation(e):(e.deltaTime>5*o.ONE_SECOND&&this.isBlazeWidgetStory(this.contentList)&&(this.resetPosition(),a.VideoPlayerService.isNavigating=!1),this.index<0&&(this.index=0),this.handleMoveSwipe(e))))}handlePanEnd(e){e.preventDefault(),(0,l.isElementInsideTarget)(e.target,u)||"desktop"!==n.deviceDetector.platform&&(this.isNavigationBlocked||this.isEdgeThreshold||"SingleContent"===a.VideoPlayerService.playReference&&!a.ConfigService.shouldAutoAdvance||this.handleEndSwipe(e))}reverseAnimation(e){var t,i,n,o;("SingleContent"!==a.VideoPlayerService.playReference||a.ConfigService.shouldAutoAdvance)&&((this.isBlazeWidgetMoment(this.playerContentList)?e.deltaY:e.deltaX)>0?(this.processAnimation(e,this.playerContentList[this.index],this.currentPrevAnimation),null===(t=this.animateContent("PREV"))||void 0===t||t.seek(0),null===(i=this.currentPrevAnimation)||void 0===i||i.seek(0)):(this.processAnimation(e,this.playerContentList[this.index],this.currentNextAnimation),null===(n=this.animateContent("NEXT"))||void 0===n||n.seek(0),null===(o=this.currentNextAnimation)||void 0===o||o.seek(0)),a.VideoPlayerService.isNavigating=!1)}setAnimationContent(){this.currentPrevAnimation=void 0,this.currentNextAnimation=void 0;let e=this.playerContentList[this.index-1];this.playerContentList[this.index+1]&&(this.currentNextAnimation=this.animateContent("NEXT")),e&&(this.currentPrevAnimation=this.animateContent("PREV"))}isTouchOnScreenEdges(e,t){let i=t/12,n=e<=this.edgeScreenThreshold;if(e<=i||n)return!0;let o=e>t-this.edgeScreenThreshold;return!(!(t-e<=i)&&!o)}blockInteractionWithUserInterface(){(()=>{this.playerFullscreenOverlay.style.display="block",setTimeout(()=>{this.playerFullscreenOverlay.style.display="none",this.isNavigationBlocked=!1},o.ONE_SECOND)})()}
1renderPlayerBackground(e){var t,i,o,s;let a;if("mobile"===n.deviceDetector.platform||"tablet"===n.deviceDetector.platform)return;let l=this.srcBackground.getContext("2d"),d=this.destBackground.getContext("2d");if(!l||!d)return;if(e)return null===(t=this.backgroundAnimation)||void 0===t||t.cancel(),l.fillStyle=r.Colors.Black,l.fillRect(0,0,this.srcBackground.width,this.srcBackground.height),d.fillStyle=r.Colors.Black,void d.fillRect(0,0,this.srcBackground.width,this.srcBackground.height);let h=this.playerContentList[this.index];if("pages"in h){let e=h.pageIndex;a=h.pages[e]}else a=h.video;if("Ad"===(null===(i=null==a?void 0:a.data)||void 0===i?void 0:i.type)||(null==a?void 0:a.isAd))return;let u=null==a?void 0:a.mainElement();null===(o=this.backgroundAnimation)||void 0===o||o.pause(),(null===(s=this.backgroundAnimation)||void 0===s?void 0:s.currentTime)&&(l.globalAlpha=+this.backgroundAnimation.currentTime/3e3),l.drawImage(this.destBackground,0,0,this.srcBackground.width,this.srcBackground.height),l.globalAlpha=1,u&&d.drawImage(u,0,0,this.srcBackground.width,this.srcBackground.height),this.backgroundAnimation=this.destBackground.animate([{opacity:"0"},{opacity:"100"}],{duration:3e3,iterations:1,easing:"ease-in",fill:"both"})}appendToDomBasedOnNavigation(e){switch(e){case"PREV":this.handlePrevDirection();break;case"NEXT":this.handleNextDirection()}}resetAnimation(){this.currentPrevAnimation=void 0,this.currentNextAnimation=void 0,this.resetPosition()}close(){var e;if("SingleContent"!==a.VideoPlayerService.playReference||a.ConfigService.shouldDismissPlayer)try{this.playerContentList.forEach(e=>{e instanceof h.BlazeWidgetStory&&(e.isUnloading=!0)}),this.playerContentList.forEach(e=>{"pages"in e&&e.pages.forEach(e=>{e.paused||e.pause()})}),null===(e=this.onClose)||void 0===e||e.call(this),setTimeout(()=>{this.playerContentList.forEach(e=>{e instanceof h.BlazeWidgetStory&&(e.isUnloading=!1)})},o.ONE_SECOND)}catch(e){}}animateContent(e){let t="NEXT"===e?this.index+1:this.index-1;if(t<0||t>=this.playerContentList.length)return;let i=this.playerContentList[t],n=this.playerContentList[this.index];return n&&i?this.createAnimation(n,e,t):void 0}get directionBackwards(){return"RTL"===a.ConfigService.layoutDirection?Hammer.DIRECTION_LEFT:Hammer.DIRECTION_RIGHT}get directionForwards(){return"RTL"===a.ConfigService.layoutDirection?Hammer.DIRECTION_RIGHT:Hammer.DIRECTION_LEFT}processAnimation(e,t,i){if(!this.isEdgeThreshold&&!this.isNavigationBlocked&&!a.VideoPlayerService.isSeekBarDragging&&i){if(i.completed)return;this.isNavigationBlocked=!0,a.VideoPlayerService.isNavigating=!0;let o=0;"tablet"===n.deviceDetector.platform&&(o="portrait"===n.deviceDetector.screenOrientation?7:12);let s=Math.abs(e.velocityY)>.01;if(i.progress>=this.gestureActionLimitThreshold-o||s){this.blockInteractionWithUserInterface();let n=e.direction===this.directionForwards||e.direction===Hammer.DIRECTION_UP,o=e.direction===this.directionBackwards||e.direction===Hammer.DIRECTION_DOWN;n?t.navigationDirection="Forwards":o&&(t.navigationDirection="Backwards"),i.play(),i.finished.then(()=>{a.VideoPlayerService.isNavigating=!1})}else this.handleSmallGestures(i,this.playerContentList[this.index])}}unloadFromPlayerList(){let e;!this.isBlazeWidgetMoment(this.contentList)&&this.playerContentList.length>this.numberOfContentInList&&(this.index>1?(e=this.playerContentList.shift(),this.index-=1):e=this.playerContentList.pop(),null==e||e.unload(),null==e||e.remove())}handleAnimationEnd(e){for(let t of(this.appendToDomBasedOnNavigation(e),this.unloadFromPlayerList(),this.playerContentList))t.resetPosition();this.resetAnimation(),this.muteVideoOnIOSOrMacTablet(),this.loadAndPlayContent()}handleSmallGestures(e,t){e.complete=()=>{this.isNavigationBlocked=!1},e.changeComplete=()=>{this.videoPlayerState.isPlaying&&t.resume()},e.reverse(),e.play(),e.finished.then(()=>{a.VideoPlayerService.isNavigating=!1,t instanceof h.BlazeWidgetStory?t.currentPage.muted=this.videoPlayerState.isMuted:t instanceof d.BlazeWidgetMoment&&t.video&&(t.video.muted=this.videoPlayerState.isMuted)})}resetPosition(){var e,t,i,n;("SingleContent"!==a.VideoPlayerService.playReference||a.ConfigService.shouldAutoAdvance)&&(null===(t=null===(e=this.animateContent("NEXT"))||void 0===e?void 0:e.seek)||void 0===t||t.call(e,0),null===(n=null===(i=this.animateContent("PREV"))||void 0===i?void 0:i.seek)||void 0===n||n.call(i,0),this.resetStyles())}isContentDirectionInPlayerListValid(e){if(!e)return!1;let t="NEXT"===e?1:-1,i=this.playerContentList[this.index],n=this.contentList.findIndex(e=>e.data.id===i.data.id);return!(n+t<0)&&!!this.contentList[n+t]}isBlazeWidgetStory(e){return Array.isArray(e)&&e.every(e=>"story"===e.contentType)}isBlazeWidgetMoment(e){return Array.isArray(e)&&e.every(e=>"moment"===e.contentType)}isBlazeWidgetVideo(e){return Array.isArray(e)&&e.every(e=>"video"===e.contentType)}getContentExtraInfo(e,t){var i,n;let o=t>0?e[t-1]:void 0,s=t<e.length-1?e[t+1]:void 0;return{previous:null===(i=null==o?void 0:o.data)||void 0===i?void 0:i.extraInfo,next:null===(n=null==s?void 0:s.data)||void 0===n?void 0:n.extraInfo}}}t.WidgetAbstractPlayer=c},2402:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Prom
1ise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerManager=void 0;let o=i(611),s=i(2668),a=i(4403),r=i(9965),l=i(4545),d=i(8827);class h{constructor(e){this.configuration=null,this.pendingConfigUpdate=null,this.isInitialized=!1,this.isDestroyed=!1,this.isSending=!1,this.immediateLogs=[],this.offlineQueue=[],this.immediateTimer=null,this.configUpdateTimer=null,this.isOnline=navigator.onLine,this.onlineStatusListener=null,this.storage=new a.LoggerStorage(e),this.transport=new a.LoggerTransport,this.throttle=new s.LoggerThrottle,this.setupNetworkMonitoring()}init(e){return n(this,void 0,void 0,function*(){if(this.isDestroyed)throw Error("Cannot initialize destroyed logger instance");if(this.isInitialized||!e)return;let t=(0,d.sanitizeBatchSizeConfiguration)(e);!(0,d.validateLoggerConfigurationDetailed)(t).isValid&&t.isEnabled&&this.setDefaultLoggerConfiguration(t);try{this.configuration=t,this.throttle.updateConfiguration({batchIntervalMs:1e3*t.loggerBatchIntervalInSeconds,maxBatchSize:t.loggerMaxAllowedBatchSize,minBatchSize:t.loggerMinAllowedBatchSize}),this.throttle.onBatchReady(()=>this.processBatch()),this.isInitialized=!0}catch(e){throw e}})}destroy(){return n(this,void 0,void 0,function*(){try{this.isInitialized=!1,this.immediateLogs.length>0&&(yield Promise.race([this.flushImmediateLogs(),new Promise(e=>setTimeout(e,5e3))])),this.isOnline&&this.offlineQueue.length>0&&(yield Promise.race([this.syncOfflineQueue(),new Promise(e=>setTimeout(e,5e3))])),this.throttle.destroy(),this.immediateTimer&&(clearTimeout(this.immediateTimer),this.immediateTimer=null),this.configUpdateTimer&&(clearTimeout(this.configUpdateTimer),this.configUpdateTimer=null),this.onlineStatusListener&&(window.removeEventListener("online",this.onlineStatusListener),window.removeEventListener("offline",this.onlineStatusListener),this.onlineStatusListener=null)}catch(e){}finally{this.isDestroyed=!0}})}updateConfiguration(e){if(this.isDestroyed)return;let t=(0,d.sanitizeBatchSizeConfiguration)(e);!(0,d.validateLoggerConfigurationDetailed)(t).isValid&&t.isEnabled&&this.setDefaultLoggerConfiguration(t),this.pendingConfigUpdate=t,this.scheduleConfigurationUpdate()}log(e,t,i,s){return n(this,void 0,void 0,function*(){var n;let a=""+h.LOG_IDENTIFIER_PREFIX+t;if(!this.isInitialized||!(null===(n=this.configuration)||void 0===n?void 0:n.isEnabled)||!this.shouldLog(e)||(0,d.shouldIgnoreLog)(a,this.configuration.ignoredLogs||[]))return;let r=(0,o.v4)(),u=(0,d.buildLogMetadata)(l.UserService.sessionId,r,a,s),c={id:r,level:e,message:i,logIdentifier:a,metadata:JSON.stringify(u),timestamp:new Date().toISOString(),priority:(0,d.calculateLogPriority)(e)};try{if(yield this.storage.store(c),!this.isOnline)return void this.addToOfflineQueue(c);this.throttle.incrementLogCount(),this.shouldSendImmediately(e)?this.addToImmediateBatch(c):this.throttle.shouldTriggerBatch()&&(yield this.processBatch())}catch(e){}})}shouldLog(e){if(!this.configuration)return!1;let t=this.configuration.logLevel;return(0,d.isLogLevelAllowed)(e,t)}shouldSendImmediately(e){var t;if(!(null===(t=this.configuration)||void 0===t?void 0:t.immediateLogLevel))return!1;let i=this.configuration.immediateLogLevel;return(0,d.isLogLevelAllowed)(e,i)}addToImmediateBatch(e){this.immediateLogs.push(e),this.immediateLogs.length>=5?this.flushImmediateLogs():this.immediateTimer||(this.immediateTimer=setTimeout(()=>{this.flushImmediateLogs()},100))}flushImmediateLogs(){return n(this,void 0,void 0,function*(){this.immediateTimer&&(clearTimeout(this.immediateTimer),this.immediateTimer=null);let e=[...this.immediateLogs];if(this.immediateLogs=[],e.length>0){if(!this.isOnline)return void e.forEach(e=>this.addToOfflineQueue(e));try{yield this.sendEntriesAndCleanup(e)}catch(t){e.forEach(e=>this.addToOfflineQueue(e))}}})}removeEntriesFromStorage(e){return n(this,void 0,void 0,function*(){let t=(0,d.extractEntryIds)(e);yield this.storage.remove(t)})}sendEntriesAndCleanup(e){return n(this,void 0,void 0,function*(){if(!navigator.onLine)throw Error("No internet connection - logs not sent");try{yield this.transport.send(e),yield this.removeEntriesFromStorage(e)}catch(t){if(t instanceof a.BatchRejectedError)return void(yield this.removeEntriesFromStorage(e));throw t}})}processBatch(){return n(this,void 0,void 0,function*(){if(!this.isSending&&this.isOnline){this.isSending=!0;try{let e=this.throttle.minBatchSize,t=this.throttle.maxBatchSize,i=yield this.storage.getBatch(t);if(i.length<e)return;yield this.sendEntriesAndCleanup(i)}finally{this.isSending=!1}}})}setupNetworkMonitoring(){this.onlineStatusListener=e=>{let t=this.isOnline;this.isOnline=navigator.onLine,!t&&this.isOnline&&this.handleNetworkReconnection()},"undefined"!=typeof window&&(window.addEventListener("online",this.onlineStatusListener),window.addEventListener("offline",this.onlineStatusListener))}syncOfflineQueue(){return n(this,void 0,void 0,function*(){var e;if(this.isOnline&&0!==this.offlineQueue.length)try{let t=(null===(e=this.configuration)||void 0===e?void 0:e.loggerMaxAllowedBatchSize)||50;for(;this.offlineQueue.length>0;){let e=this.offlineQueue.splice(0,t);yield this.sendEntriesAndCleanup(e)}}catch(e){}})}addToOfflineQueue(e){this.offlineQueue.push(e);let{prunedQueue:t,removedCount:i}=(0,d.pruneOfflineQueue)(this.offlineQueue,1e3);this.offlineQueue=t}scheduleConfigurationUpdate(){this.configUpdateTimer&&clearTimeout(this.configUpdateTimer),this.isSending?this.configUpdateTimer=setTimeout(()=>{!this.isSending&&this.pendingConfigUpdate?this.applyPendingConfiguration():this.scheduleConfigurationUpdate()},100):this.applyPendingConfiguration()}applyPendingConfiguration(){return n(this,void 0,void 0,function*(){if(!this.pendingConfigUpdate)return;let e=this.configuration,t=this.pendingConfigUpdate;if(this.configuration=t,this.pendingConfigUpdate=null,this.configUpdateTimer&&(clearTimeout(this.configUpdateTimer),this.configUpdateTimer=null),this.resetLoggerState(),(null==e?void 0:e.isEnabled)&&!t.isEnabled)try{yield this.storage.clear()}catch(e){}t.isEnabled&&(this.throttle.updateConfiguration({batchIntervalMs:1e3*t.loggerBatchIntervalInSeconds,maxBatchSize:t.loggerMaxAllowedBatchSize,minBatchSize:t.loggerMinAllowedBatchSize}),this.throttle.onBatchReady(()=>this.processBatch()))})}resetLoggerState(){this.immediateLogs=[],this.offlineQueue=[],this.isSending=!1,this.immediateTimer&&(clearTimeout(this.immediateTimer),this.immediateTimer=null),this.isOnline=navigator.onLine}handleNetworkReconnection(){return n(this,void 0,void 0,function*(){try{yield new Promise(e=>setTimeout(e,1e3)),this.offlineQueue.length>0&&(yield this.syncOfflineQueue()),yield this.processBatch()}catch(e){}})}setDefaultLoggerConfiguration(e){return e.loggerBatchIntervalInSeconds=30,e.loggerMaxAllowedBatchSize=80,e.loggerMinAllowedBatchSize=1,e.logLevel=r.LogLevel.ERROR,e.immediateLogLevel=r.LogLevel.CRITICAL,e.ignoredLogs=[],e}}t.LoggerManager=h,h.LOG_IDENTIFIER_PREFIX="Web_"},2409:(e,t)=>{"use strict";var i,n;
1Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorLoadingCodeMapper=t.ErrorCode=void 0,(n=i||(t.ErrorCode=i={}))[n.FailedToFindContainerId=1]="FailedToFindContainerId",n[n.FailedContainerIdHasWidgetAlready=2]="FailedContainerIdHasWidgetAlready",n[n.FailedLoadingAppConfigurations=3]="FailedLoadingAppConfigurations",n[n.FailedLoadingStories=100]="FailedLoadingStories",n[n.FailedEnrichStories=101]="FailedEnrichStories",n[n.FailedToHaveLabels=103]="FailedToHaveLabels",n[n.FailedLoadingMoments=110]="FailedLoadingMoments",n[n.FailedEnrichMoments=111]="FailedEnrichMoments",n[n.FailedLoadingVideos=120]="FailedLoadingVideos",n[n.FailedEnrichVideos=121]="FailedEnrichVideos",n[n.VisualViewportScaled=150]="VisualViewportScaled",n[n.VideoError=200]="VideoError",n[n.PreviewStoryNotFound=300]="PreviewStoryNotFound",n[n.PreviewStoryLoadFailed=301]="PreviewStoryLoadFailed",n[n.PreviewMomentNotFound=310]="PreviewMomentNotFound",n[n.PreviewMomentLoadFailed=311]="PreviewMomentLoadFailed",t.ErrorLoadingCodeMapper={story:i.FailedLoadingStories,moment:i.FailedLoadingMoments,video:i.FailedLoadingVideos}},2500:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findOpenModal=s,t.findOpenMomentModal=function(){let e=s();if(e&&e instanceof n.BlazeWidgetMomentModal)return e};let n=i(2740),o=i(332);function s(){let e=document.getElementsByTagName("blaze-sdk")[0];if(e)for(let t=0;t<e.children.length;t++){let i=e.children[t];if(i instanceof o.BlazeWidgetModal&&i.isOpen)return i}}},2506:(e,t)=>{"use strict";var i,n,o,s;Object.defineProperty(t,"__esModule",{value:!0}),t.InternalEvent=t.Delegation=void 0,(o=i||(t.Delegation=i={})).onEventTriggered="blaze-event-triggered",o.onErrorThrown="blaze-error-event",o.onPlayerDidAppear="blaze-player-did-appear",o.onPlayerDismissed="blaze-player-dismissed",o.onWidgetDataLoadStarted="blaze-widget-data-load-started",o.onWidgetDataLoadCompleted="blaze-widget-data-load-completed",o.onWidgetPlayerDismissed="blaze-widget-player-dismissed",o.onWidgetTriggerCTA="blaze-widget-trigger-CTA",o.onMomentStart="blaze-moment-start",o.onStoryPlayerDidAppear="blaze-story-player-did-appear",o.onStoryPlayerDismissed="blaze-story-player-dismissed",o.onWidgetStoryPlayerDismissed="blaze-widget-story-player-dismissed",(s=n||(t.InternalEvent=n={})).NEXT_STORY="next_story",s.PREV_STORY="prev_story",s.FULL_SCREEN_CLICK="full_screen_click",s.AD_ENDED="ad_ended",s.AD_RESUMED="ad_resumed",s.AD_STARTED="ad_started",s.BANNER_ANALYTICS="banner_analytics",s.PAUSE="pause",s.RESUME="resume",s.NEXT_PAGE="next_page",s.PREVIOUS_PAGE="previous_page"},2547:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventBusService=void 0;let n=i(4403);class o extends(0,n.Singleton)(){constructor(){super(...arguments),this.subscribers={}}init(){this.subscribers={}}publish(e,t){let i=this.subscribers[e];
1void 0!==i&&Object.keys(i).forEach(e=>i[e](t))}subscribe(e,t){let i=this.getNextId();return this.subscribers[e]||(this.subscribers[e]={}),this.subscribers[e][i]=t,{unsubscribed:()=>{delete this.subscribers[e][i],0===Object.keys(this.subscribers[e]).length&&delete this.subscribers[e]}}}getNextId(){return o.nextId++}}o.nextId=0,t.EventBusService=o.getInstance()},2588:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationCssMapper=void 0,t.animationCssMapper={Growing:"grow",Shrinking:"shrink",BottomToTop:"bottomToTop"}},2601:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetVideoModal=void 0;let o=i(4403),s=i(6450),a=i(9965),r=i(8921),l=i(4545),d=i(332),h=window.innerWidth;class u extends d.BlazeWidgetModal{constructor(e,t,i=l.VideoPlayerService){super("video",i),this.parentWidget=e,this.playerLayout=t,this.videoPlayerState=i,this.data=[],this.boundOnResizeEventDelay=this.onResizeEventDelay.bind(this),this.boundOnKeyDown=this.onKeyDown.bind(this),this.boundOnBeforeUnload=this.onBeforeUnload.bind(this)}get currentPlayedContent(){return this.player.playerContentList[0]}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.boundOnResizeEvent),window.addEventListener(o.DEVICE_EVENTS.SCREEN_ORIENTATION_CHANGE,this.boundOnResizeEventDelay),o.deviceDetector.isDesktop&&(window.addEventListener("keydown",this.boundOnKeyDown),window.addEventListener("beforeunload",this.boundOnBeforeUnload)),this.render()}disconnectedCallback(){var e;super.disconnectedCallback(),window.removeEventListener("resize",this.boundOnResizeEvent),window.removeEventListener(o.DEVICE_EVENTS.SCREEN_ORIENTATION_CHANGE,this.boundOnResizeEventDelay),o.deviceDetector.isDesktop&&(window.removeEventListener("keydown",this.boundOnKeyDown),window.removeEventListener("beforeunload",this.boundOnBeforeUnload)),null===(e=this.player)||void 0===e||e.destroy()}setTheme(e){var t;this.playerLayout=e,this.style.background=e.backgroundColor,null===(t=this.currentPlayedContent)||void 0===t||t.setTheme(e)}setModalContent(e){this.data=e,this.style.background=this.playerLayout.backgroundColor;let t=[];for(let i=0;i<e.length;i++){let n=r.WidgetsFactory.create("blaze-video-element");n.setTheme(this.playerLayout),n.setData(e[i]),n.setModal(this),t.push(n)}this.player.setContent(t)}onBeforeUnload(){return this.isOpen&&this.dispatchExitEvent(),null}dispatchExitEvent(){var e,t;let i=this.currentPlayedContent;i.event(s.VideoAction.VideoEnd,{video_end_trigger:"Page Unload"}),l.AnalyticsService.sendAnalyticsData(),null===(t=null===(e=i.widgetParentItem)||void 0===e?void 0:e.updateWidget)||void 0===t||t.call(e),i.updateWidgetStatusReadUnread()}close(){let e=Object.create(null,{close:{get:()=>super.close}});return n(this,void 0,void 0,function*(){var t;if(!this.isOpen||!this.isAllowExitModal({shouldDismissPlayer:l.ConfigService.shouldDismissPlayer,playReference:l.VideoPlayerService.playReference}))return;let i=this.player.playerContentList[0];i.exitTrigger="Escape Button",i.event(s.VideoAction.VideoEnd,{}),l.EventService.dispatch(this,a.Delegation.onPlayerDismissed),this.parentWidget&&l.EventService.dispatch(this.parentWidget,a.Delegation.onWidgetPlayerDismissed,{widgetId:this.parentWidget.id}),yield this.player.tryToCloseFullscreen(),e.close.call(this),null===(t=this.onClose)||void 0===t||t.call(this)})}open(){var e;this.isOpen||l.EventService.dispatch(this,a.Delegation.onPlayerDidAppear),super.open(),this.player.load(),this.player.resume(),null===(e=this.onOpen)||void 0===e||e.call(this)}play(){}onKeyDown(e){this.isOpen&&!document.fullscreenElement&&"Escape"==e.key&&this.close()}onResize(){super.onResize(),h!==window.innerWidth&&(h=window.innerWidth)}onResizeEventDelay(){setTimeout(()=>{this.onResize()},s.ONE_SECOND/2)}}t.BlazeWidgetVideoModal=u},2654:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeVideoSeekBar=void 0;let n=i(1908),o=i(4403),s=i(6450),a=i(9965),r=i(8921),l=i(4545),d=i(9266);class h extends HTMLElement{constructor(){super(),this.isInit=!1,this.isMouseIn=!1,this.isClicked=!1,this.isSeeking=!1,this.playbackPart=r.WidgetsFactory.create("blaze-div"),this.progressBarState="playing",this.videoState=a.ButtonState.Play,this.seekType="Seek Bar",this.lastProgress=0,this.listeners=new o.EventsListener,this.boundOnTouchMove=this.handleTouchMove.bind(this),this.boundOnMouseMove=this.handleMouseDrag.bind(this),this.boundOnClick=this.handleOnClick.bind(this),this.boundOnMouseOut=this.handleOnMouseOut.bind(this),this.boundOnMouseIn=this.handleOnMouseIn.bind(this),this.boundOnStartDrag=this.handleOnStartDrag.bind(this),this.boundOnEndDrag=this.handleOnEndDrag.bind(this),this.progressBarContainer=r.WidgetsFactory.create("blaze-div"),this.progressBarFill=r.WidgetsFactory.create("blaze-div"),this.progressBarKnob=r.WidgetsFactory.create("blaze-div"),this.progressBarBuffer=r.WidgetsFactory.create("blaze-div"),this.progress=r.WidgetsFactory.create("blaze-div"),this.debouncedSeekBarUpdate=(0,o.debounce)(e=>this.updateVideoSeekBar(e),500),this.progress.classList.add(s.WSC_PREFIX+"progress")}connectedCallback(){!this.isInit&&this.seekBarStyle.isVisible&&(this.isInit=!0,this.addTransitionStyle(),this.seekBarStyle&&(isNaN(parseFloat(this.seekBarStyle.playingState.height))&&(this.seekBarStyle.playingState.height="3px"),isNaN(parseFloat(this.seekBarStyle.pausedState.height))&&(this.seekBarStyle.pausedState.height="5px")),this.setupEventListeners(),this.styleProgressContainer())}disconnectedCallback(){this.timeoutPlayingStyle&&clearTimeout(this.timeoutPlayingStyle),this.timeoutPauseStyle&&clearTimeout(this.timeoutPauseStyle),this.listeners.removeAll()}addTransitionStyle(){let e=document.createElement("style");e.textContent="\n ."+s.WSC_PREFIX+"progress {\n transition: height 0.3s ease;\n }\n ",this.appendChild(e)}setTheme(e){this.seekBarStyle=e,this.styleProgressContainer()}createPlaybackPart(){this.progressBarContainer.setStyle({width:"100%",height:"100%",display:"block"}),this.progressBarFill.setStyle({width:"0%",height:"100%",position:"relative",display:"block"}),this.progressBarKnob.setStyle({borderRadius:"100%",position:"absolute",right:"0px",top:"50%",bottom:"0px",transform:"translateX(50%) translateY(-50%)"}),this.progressBarBuffer.setStyle({width:"0%",position:"absolute",display:"block",backgroundColor:"rgba(217, 217, 217, 0.5)",borderRadius:"5px 0px 0px 5px"}),this.progressBarFill.append(this.progressBarKnob),this.playbackPart=this.progressBarFill,this.progressBarContainer.append(this.progressBarBuffer),this.progressBarContainer.append(this.progressBarFill),this.progress.append(this.progressBarContainer)}setupEventListeners(){this.listeners.addAttached(this,"mousedown",this.boundOnStartDrag),this.listeners.addAttached(this,"touchstart",this.boundOnStartDrag),this.listeners.add("mouseup",this.boundOnEndDrag),this.listeners.add("touchend",this.boundOnEndDrag),this.listeners.addAttached(this,"mousemove",this.boundOnMouseMove),this.listeners.addAttached(this,"touchmove",this.boundOnTouchMove),this.listeners.addAttached(this,"click",this.boundOnClick),this.listeners.addAttached(this,"mouseenter",this.boundOnMouseIn),this.listeners.addAttached(this,"mouseleave",this.boundOnMouseOut)}handleOnStartDrag(){var e,t;this.isClicked||(l.VideoPlayerService.isSeekBarDragging=!0,this.isSeeking=!0,clearTimeout(this.timeoutPlay),null===(e=this.onPause)||void 0===e||e.call(this),this.applyPauseSeekBarStyle(),o.deviceDetector.isDesktop&&document.addEventListener("mousemove",this.boundOnMouseMove),(o.deviceDetector.isMobile||o.deviceDetector.isTablet)&&(null===(t=this.onStartSeeking)||void 0===t||t.call(this)))}handleOnEndDrag(){var e;this.isSeeking&&(this.isSeeking=!1,o.deviceDetector.isDesktop&&document.removeEventListener("mousemove",this.boundOnMouseMove),(o.deviceDetector.isMobile||o.deviceDetector.isTablet)&&(null===(e=this.onEndSeeking)||void 0===e||e.call(this)),this.timeoutPlayingStyle=setTimeout(()=>{this.isSeeking||this.applyPlayingSeekBarStyle()},2e3),this.timeoutPlay=setTimeout(()=>{var e;l.VideoPlayerService.isSeekBarDragging=!1,this.isClicked||null===(e=this.onResume)||void 0===e||e.call(this)},1500))}handleOnClick(e){var t;let i;if(null===(t=this.onPause)||void 0===t||t.call(this),e.stopPropagation(),this.isClicked=!0,!this.isSeeking){if(e instanceof MouseEvent)i=e.clientX;else{if(!(e.touches&&e.touches.length>0))return;i=e.touches[0].clientX}this.handleSeek(i,!0)}}handleMouseDrag(e){this.handleSeek(e.clientX,1===e.buttons)}handleTouchMove(e){e.touches.length>0&&(this.handleSeek(e.touches[0].clientX,!0),e.preventDefault(),e.stopImmediatePropagation())}handleSeek(e,t){if(!t)return;let i=this.getBoundingClientRect(),n=Math.min(Math.max((e-i.left)/i.width,0),1);this.updateSeekBar(100*n)}handleOnMouseOut(){this.isSeeking||(this.isMouseIn=!1,this.timeoutPlayingStyle=setTimeout(()=>{this.videoState!==a.ButtonState.Pause&&this.applyPlayingSeekBarStyle()},2e3))}handleOnMouseIn(){this.isMouseIn=!0,this.applyPauseSeekBarStyle()}
1updateVideoSeekBar(e){this.dispatchEvent(new CustomEvent(n.VIDEO_EVENTS.SEEK,{detail:{seekTime:e/100,type:this.seekType},bubbles:!0,composed:!0})),setTimeout(()=>{this.isClicked=!1},1e3)}styleProgressContainer(){let e=Math.max(parseFloat(this.seekBarStyle.playingState.height),parseFloat(this.seekBarStyle.pausedState.height));(0,d.mergeStyles)(this,{width:"100%",height:e+"px",padding:this.seekBarStyle.horizontalMargin+" "+this.seekBarStyle.verticalMargin+" ",cursor:"pointer",boxSizing:"border-box",zIndex:"2"}),this.progress.setStyle({width:"100%",display:"grid",height:this.seekBarStyle.playingState.height,position:"relative"}),this.progressBarBuffer.setStyle({height:this.seekBarStyle.playingState.height}),this.createPlaybackPart(),this.updateProgressBarStyles(this.progressBarState),this.append(this.progress)}updateProgressBarStyles(e){let t=this.seekBarStyle[e+"State"];this.progressBarContainer.setStyle({borderRadius:t.borderRadius,backgroundColor:t.backgroundColor}),this.progressBarFill.setStyle({borderRadius:t.borderRadius,backgroundColor:t.progressColor}),this.progressBarKnob.setStyle({width:t.thumbSize,height:t.thumbSize,backgroundColor:t.thumbColor})}onContentPaused(){this.videoState=a.ButtonState.Pause,this.applyPauseSeekBarStyle()}onContentResumed(){this.videoState=a.ButtonState.Play,this.timeoutPlayingStyle=setTimeout(()=>{this.applyPlayingSeekBarStyle()},2e3)}updateProgressBar(e,t){if(this.isSeeking||this.isClicked||isNaN(t))return;this.playbackPart.style.width="0%";let i=t?e/t:this.lastProgress;Number.isNaN(i)?i=this.lastProgress:this.lastProgress=i,this.playbackPart.style.width=100*i+"%"}updateBuffer(e){this.progressBarBuffer.style.width=e+"%"}updateSeekBar(e){let t=Math.min(Math.max(e,0),100);this.playbackPart.style.width=t+"%",this.lastProgress=t/100,this.dispatchEvent(new CustomEvent(n.VIDEO_EVENTS.DISPLAY_SEEKED_TIME,{detail:{seekTime:t/100},bubbles:!0,composed:!0})),this.debouncedSeekBarUpdate(t)}reset(){this.resetProgressBar(),this.progress.style.height=this.seekBarStyle.playingState.height,this.progressBarBuffer.style.height=this.seekBarStyle.playingState.height,this.progressBarKnob.style.display=this.seekBarStyle.playingState.isThumbVisible?"block":"none",this.updateProgressBarStyles("playing")}resetProgressBar(){this.playbackPart.style.width="0%",this.updateBuffer(0)}applyPlayingSeekBarStyle(){"playing"!==this.progressBarState&&(this.isMouseIn||this.videoState!==a.ButtonState.Pause&&(this.timeoutPauseStyle&&clearTimeout(this.timeoutPauseStyle),this.progress.style.height=this.seekBarStyle.playingState.height,this.progressBarBuffer.style.height=this.seekBarStyle.playingState.height,this.progressBarKnob.style.display=this.seekBarStyle.playingState.isThumbVisible?"block":"none",this.progressBarState="playing",this.updateProgressBarStyles("playing")))}applyPauseSeekBarStyle(){"paused"!==this.progressBarState&&this.videoState!==a.ButtonState.Play&&(this.timeoutPlayingStyle&&clearTimeout(this.timeoutPlayingStyle),this.progress.style.height=this.seekBarStyle.pausedState.height,this.progressBarBuffer.style.height=this.seekBarStyle.pausedState.height,this.progressBarKnob.style.display=this.seekBarStyle.pausedState.isThumbVisible?"block":"none",this.progressBarState="paused",this.updateProgressBarStyles("paused"))}}t.BlazeVideoSeekBar=h},2668:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(2402),t),o(i(4912),t),o(i(1232),t),o(i(6133),t),o(i(200),t)},2740:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};
1Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetMomentModal=void 0;let o=i(4403),s=i(6450),a=i(9965),r=i(8921),l=i(4545),d=i(9266),h=i(6627),u=i(332),c=i(8048),p=i(4248),g=window.innerWidth;class v extends u.BlazeWidgetModal{constructor(e,t,i){super("moment"),this.parentWidget=e,this.playerLayout=t,this.actionHandlers=i,this.data=[],this.playlistSessionId="",this.navigationButtonsContainerElement=r.WidgetsFactory.create("blaze-div"),this.navigationButtonsContainerElement.setStyle({display:"flex",position:"absolute",right:"36px",flexDirection:"column",justifyContent:"center",alignItems:"normal",height:"100%",gap:"16px"}),"desktop"===o.deviceDetector.platform&&(this.prevContentButtonElement=this.createNavigationButton("PREV"),this.nextContentButtonElement=this.createNavigationButton("NEXT")),this.boundOnKeyDown=this.onKeyDown.bind(this),this.boundOnResizeEventDelay=this.onResizeEventDelay.bind(this),this.boundOnNavigationChange=this.onNavigationChange.bind(this)}connectedCallback(){super.connectedCallback(),"desktop"===o.deviceDetector.platform&&(this.addEventListener(p.UPDATE_NAVIGATION_BUTTONS_EVENT,this.boundOnNavigationChange),window.addEventListener("keydown",this.boundOnKeyDown),this.exitButtonElement.setIconUrl(this.playerLayout.icons.exit)),window.addEventListener("resize",this.boundOnResizeEvent),window.addEventListener(o.DEVICE_EVENTS.SCREEN_ORIENTATION_CHANGE,this.boundOnResizeEventDelay),this.render()}disconnectedCallback(){super.disconnectedCallback(),"desktop"===o.deviceDetector.platform&&(this.removeEventListener(p.UPDATE_NAVIGATION_BUTTONS_EVENT,this.boundOnNavigationChange),window.removeEventListener("keydown",this.boundOnKeyDown))}setTheme(e){this.player.playerContentList.forEach(t=>{t instanceof c.BlazeWidgetMoment&&t.setTheme(e)}),this.playerLayout=e}onNavigationChange(e){var t,i;if("mobile"===o.deviceDetector.platform||"tablet"===o.deviceDetector.platform)return;let{detail:{prevContentButton:n,nextContentButton:s}}=e;null===(t=this.prevContentButtonElement)||void 0===t||t.setAttribute("blaze-btn-visible",!0===n?"true":"false"),null===(i=this.nextContentButtonElement)||void 0===i||i.setAttribute("blaze-btn-visible",!0===s?"true":"false")}navigateContent(e){l.VideoPlayerService.isNavigating||(this.player.contentList[this.player.index].isActive=!1,this.player.changeContent(e))}createNavigationButton(e){let t=r.WidgetsFactory.create("blaze-button");t.setAttribute("data-testid","moment-navigation-"+e.toLowerCase()),t.classList.add("desktop-button"),t.setStyle({display:"inline-flex",zIndex:"9999",padding:"24px",borderRadius:"50%",backgroundColor:"#18181899"});let{nextMoment:i,prevMoment:n}=this.playerLayout.icons.navigation;return t.setIconUrl("NEXT"===e?i:n),t.setAttribute("width","24px"),t.setAttribute("height","24px"),t.setAttribute("icon-color","#F0F0F0"),t.setAttribute("aria-label","NEXT"===e?"Next moment":"Previous moment"),t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.addEventListener("click",()=>this.handleClickNavigation(e)),this.navigationButtonsContainerElement.append(t),t}handleClickNavigation(e){var t,i,n;if(this.player.isNavigationBlocked||(null===(i=null===(t=this.player.currentMoment)||void 0===t?void 0:t.video)||void 0===i?void 0:i.isCurrentlyTryingToRunImaAd)||l.VideoPlayerService.isNavigating||!this.player.isContentDirectionInPlayerListValid(e))return;let o=this.player.playerContentList[this.player.index];null===(n=o.closedCaptionsModal)||void 0===n||n.close(),o.exitTrigger="Skip",this.navigateContent(e)}generateMomentElement(e){let t=r.WidgetsFactory.create("blaze-widget-moment");return this.actionHandlers&&t.setActionHandlers(this.actionHandlers),t.setPlayerStyle(this.playerLayout),t.setData(e),t.setModal(this),t}generateAdMomentElement(e){return e.setModal(this),e.setPlayerStyle(this.playerLayout),this.actionHandlers&&e.setActionHandlers(this.actionHandlers),e}setModalContent(e,t,i){this.data=[...e];let n=[];for(let o=0;o<e.length;o++){let s=this.generateMomentElement(e[o]);n.push(s);let a=l.AdService.pushAdsBetweenMoments(i,n,e,o,t);a&&this.generateAdMomentElement(a)}n.forEach((e,t)=>e.setContentExtraInfo(this.player.getContentExtraInfo(n,t))),this.player.setContent(n)}appendContent(e,t){if(!e||0===e.length)return;let i=e.filter(e=>!this.data.some(t=>t.id===e.id));this.data.push(...i);let n=[];for(let e=0;e<i.length;e++){let o=this.generateMomentElement(i[e]);n.push(o);let s=l.AdService.pushAdsBetweenMoments(t,n,i,e,0);s&&this.generateAdMomentElement(s)}let o=[...this.player.contentList,...n];
1n.forEach((e,t)=>{let i=this.player.contentList.length+t;e.momentIndex=i,e.setContentExtraInfo(this.player.getContentExtraInfo(o,i))}),this.player.appendToContentList(n)}onKeyDown(e){this.isOpen&&"Escape"==e.key&&(this.player.playerContentList[this.player.index].exitTrigger="Escape Button",this.close())}close(){var e,t;if(!this.isOpen)return;let i=this.player.playerContentList[this.player.index];i.event(s.MomentAction.MomentExit,{}),i.event(s.MomentAction.MomentsPlaylistExit,{}),l.EventService.dispatch(this,a.Delegation.onPlayerDismissed),this.parentWidget&&(l.EventService.dispatch(this.parentWidget,a.Delegation.onWidgetPlayerDismissed,{widgetId:this.parentWidget.id}),i.data.hasViewed=!0,this.parentWidget instanceof h.WidgetBaseLayout&&this.parentWidget.widgetItems.forEach(e=>{e.content.id===i.data.id&&(e.setChipStyle(),e.render())})),this.playlistSessionId="",null===(e=this.player)||void 0===e||e.playerContentList.forEach(e=>{e.unload()}),super.close(),null===(t=this.onClose)||void 0===t||t.call(this)}open(){let e=Object.create(null,{open:{get:()=>super.open}});return n(this,void 0,void 0,function*(){var t;this.isOpen||l.EventService.dispatch(this,a.Delegation.onPlayerDidAppear),this.playlistSessionId=(0,d.getRandomId)();let i=this.player;yield i.playerContentList[i.index].load("direct"),i.preloadAdjacentPosters(),i.preloadAdjacentVideos(),e.open.call(this),null===(t=this.onOpen)||void 0===t||t.call(this),"desktop"===o.deviceDetector.platform&&(this.appendChild(this.navigationButtonsContainerElement),this.appendExitButton()),this.player.configurePlayerContentAccessibility()})}play(){this.player.play()}setExitButtonDisplay(){"desktop"===o.deviceDetector.platform&&(this.exitButtonWrapperElement.style.display="block")}render(){var e;this.setExitButtonDisplay(),null===(e=this.player)||void 0===e||e.render()}onResize(){super.onResize(),g!==window.innerWidth&&(g=window.innerWidth)}onResizeEventDelay(){setTimeout(()=>{this.onResize()},s.ONE_SECOND/2)}}t.BlazeWidgetMomentModal=v},2743:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2757:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},2776:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>ee});var n={update:null,begin:null,loopBegin:null,changeBegin:null,change:null,changeComplete:null,loopComplete:null,complete:null,loop:1,direction:"normal",autoplay:!0,timelineOffset:0},o={duration:1e3,delay:0,endDelay:0,easing:"easeOutElastic(1, .5)",round:0},s=["translateX","translateY","translateZ","rotate","rotateX","rotateY","rotateZ","scale","scaleX","scaleY","scaleZ","skew","skewX","skewY","perspective","matrix","matrix3d"],a={CSS:{},springs:{}};function r(e,t,i){return Math.min(Math.max(e,t),i)}function l(e,t){return e.indexOf(t)>-1}function d(e,t){return e.apply(null,t)}var h={arr:function(e){return Array.isArray(e)},obj:function(e){return l(Object.prototype.toString.call(e),"Object")},pth:function(e){return h.obj(e)&&e.hasOwnProperty("totalLength")},svg:function(e){return e instanceof SVGElement},inp:function(e){return e instanceof HTMLInputElement},dom:function(e){return e.nodeType||h.svg(e)},str:function(e){return"string"==typeof e},fnc:function(e){return"function"==typeof e},und:function(e){return void 0===e},nil:function(e){return h.und(e)||null===e},hex:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)},rgb:function(e){return/^rgb/.test(e)},hsl:function(e){return/^hsl/.test(e)},col:function(e){return h.hex(e)||h.rgb(e)||h.hsl(e)},key:function(e){return!n.hasOwnProperty(e)&&!o.hasOwnProperty(e)&&"targets"!==e&&"keyframes"!==e}};function u(e){var t=/\(([^)]+)\)/.exec(e);return t?t[1].split(",").map(function(e){return parseFloat(e)}):[]}function c(e,t){var i=u(e),n=r(h.und(i[0])?1:i[0],.1,100),o=r(h.und(i[1])?100:i[1],.1,100),s=r(h.und(i[2])?10:i[2],.1,100),l=r(h.und(i[3])?0:i[3],.1,100),d=Math.sqrt(o/n),c=s/(2*Math.sqrt(o*n)),p=c<1?d*Math.sqrt(1-c*c):0,g=c<1?(c*d-l)/p:-l+d;function v(e){var i=t?t*e/1e3:e;return i=c<1?Math.exp(-i*c*d)*(1*Math.cos(p*i)+g*Math.sin(p*i)):(1+g*i)*Math.exp(-i*d),0===e||1===e?e:1-i}return t?v:function(){var t=a.springs[e];if(t)return t;for(var i=1/6,n=0,o=0;;)if(1===v(n+=i)){if(++o>=16)break}else o=0;var s=n*i*1e3;return a.springs[e]=s,s}}function p(e){return void 0===e&&(e=10),function(t){return Math.ceil(r(t,1e-6,1)*e)*(1/e)}}var g,v,y=function(){function e(e,t,i){return(((1-3*i+3*t)*e+(3*i-6*t))*e+3*t)*e}function t(e,t,i){return 3*(1-3*i+3*t)*e*e+2*(3*i-6*t)*e+3*t}
1return function(i,n,o,s){if(0<=i&&i<=1&&0<=o&&o<=1){var a=new Float32Array(11);if(i!==n||o!==s)for(var r=0;r<11;++r)a[r]=e(.1*r,i,o);return function(r){return i===n&&o===s||0===r||1===r?r:e(function(n){for(var s=0,r=1;10!==r&&a[r]<=n;++r)s+=.1;var l=s+(n-a[--r])/(a[r+1]-a[r])*.1,d=t(l,i,o);return d>=.001?function(i,n,o,s){for(var a=0;a<4;++a){var r=t(n,o,s);if(0===r)break;n-=(e(n,o,s)-i)/r}return n}(n,l,i,o):0===d?l:function(t,i,n,o,s){var a,r,l=0;do(a=e(r=i+(n-i)/2,o,s)-t)>0?n=r:i=r;while(Math.abs(a)>1e-7&&++l<10);return r}(n,s,s+.1,i,o)}(r),n,s)}}}}(),m=(g={linear:function(){return function(e){return e}}},v={Sine:function(){return function(e){return 1-Math.cos(e*Math.PI/2)}},Circ:function(){return function(e){return 1-Math.sqrt(1-e*e)}},Back:function(){return function(e){return e*e*(3*e-2)}},Bounce:function(){return function(e){for(var t,i=4;e<((t=Math.pow(2,--i))-1)/11;);return 1/Math.pow(4,3-i)-7.5625*Math.pow((3*t-2)/22-e,2)}},Elastic:function(e,t){void 0===e&&(e=1),void 0===t&&(t=.5);var i=r(e,1,10),n=r(t,.1,2);return function(e){return 0===e||1===e?e:-i*Math.pow(2,10*(e-1))*Math.sin(2*Math.PI*(e-1-n/(2*Math.PI)*Math.asin(1/i))/n)}}},["Quad","Cubic","Quart","Quint","Expo"].forEach(function(e,t){v[e]=function(){return function(e){return Math.pow(e,t+2)}}}),Object.keys(v).forEach(function(e){var t=v[e];g["easeIn"+e]=t,g["easeOut"+e]=function(e,i){return function(n){return 1-t(e,i)(1-n)}},g["easeInOut"+e]=function(e,i){return function(n){return n<.5?t(e,i)(2*n)/2:1-t(e,i)(-2*n+2)/2}},g["easeOutIn"+e]=function(e,i){return function(n){return n<.5?(1-t(e,i)(1-2*n))/2:(t(e,i)(2*n-1)+1)/2}}}),g);function b(e,t){if(h.fnc(e))return e;var i=e.split("(")[0],n=m[i],o=u(e);switch(i){case"spring":return c(e,t);case"cubicBezier":return d(y,o);case"steps":return d(p,o);default:return d(n,o)}}function f(e){try{return document.querySelectorAll(e)}catch(e){return}}function S(e,t){for(var i=e.length,n=arguments.length>=2?arguments[1]:void 0,o=[],s=0;s<i;s++)if(s in e){var a=e[s];t.call(n,a,s,e)&&o.push(a)}return o}function E(e){return e.reduce(function(e,t){return e.concat(h.arr(t)?E(t):t)},[])}function C(e){return h.arr(e)?e:(h.str(e)&&(e=f(e)||e),e instanceof NodeList||e instanceof HTMLCollection?[].slice.call(e):[e])}function T(e,t){return e.some(function(e){return e===t})}function A(e){var t={};for(var i in e)t[i]=e[i];return t}function I(e,t){var i=A(e);for(var n in e)i[n]=t.hasOwnProperty(n)?t[n]:e[n];return i}function M(e,t){var i=A(e);for(var n in t)i[n]=h.und(e[n])?t[n]:e[n];return i}function w(e){var t=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);if(t)return t[1]}function _(e,t){return h.fnc(e)?e(t.target,t.id,t.total):e}function P(e,t){return e.getAttribute(t)}function L(e,t,i){if(T([i,"deg","rad","turn"],w(t)))return t;var n=a.CSS[t+i];if(!h.und(n))return n;var o=document.createElement(e.tagName),s=e.parentNode&&e.parentNode!==document?e.parentNode:document.body;s.appendChild(o),o.style.position="absolute",o.style.width=100+i;var r=100/o.offsetWidth;s.removeChild(o);var l=r*parseFloat(t);return a.CSS[t+i]=l,l}function x(e,t,i){if(t in e.style){var n=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),o=e.style[t]||getComputedStyle(e).getPropertyValue(n)||"0";return i?L(e,o,i):o}}function O(e,t){return h.dom(e)&&!h.inp(e)&&(!h.nil(P(e,t))||h.svg(e)&&e[t])?"attribute":h.dom(e)&&T(s,t)?"transform":h.dom(e)&&"transform"!==t&&x(e,t)?"css":null!=e[t]?"object":void 0}function D(e){if(h.dom(e)){for(var t,i=e.style.transform||"",n=/(\w+)\(([^)]*)\)/g,o=new Map;t=n.exec(i);)o.set(t[1],t[2]);return o}}function B(e,t,i,n){switch(O(e,t)){case"transform":var o,s;return o=l(t,"scale")?1:0+(l(t,"translate")||"perspective"===t?"px":l(t,"rotate")||l(t,"skew")?"deg":void 0),s=D(e).get(t)||o,n&&(n.transforms.list.set(t,s),n.transforms.last=t),i?L(e,s,i):s;case"css":return x(e,t,i);case"attribute":return P(e,t);default:return e[t]||0}}function N(e,t){var i=/^(\*=|\+=|-=)/.exec(e);if(!i)return e;var n=w(e)||0,o=parseFloat(t),s=parseFloat(e.replace(i[0],""));switch(i[0][0]){case"+":return o+s+n;case"-":return o-s+n;case"*":return o*s+n}}function k(e,t){if(h.col(e)){var i,n,o;return h.rgb(e)?(i=/rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(e))?"rgba("+i[1]+",1)":e:h.hex(e)?(n=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,i,n){return t+t+i+i+n+n}),"rgba("+parseInt((o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(n))[1],16)+","+parseInt(o[2],16)+","+parseInt(o[3],16)+",1)"):h.hsl(e)?function(e){var t,i,n,o=/hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e)||/hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e),s=parseInt(o[1],10)/360,a=parseInt(o[2],10)/100,r=parseInt(o[3],10)/100,l=o[4]||1;function d(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}if(0==a)t=i=n=r;else{var h=r<.5?r*(1+a):r+a-r*a,u=2*r-h;t=d(u,h,s+1/3),i=d(u,h,s),n=d(u,h,s-1/3)}return"rgba("+255*t+","+255*i+","+255*n+","+l+")"}(e):void 0}if(/\s/g.test(e))return e;var s=w(e),a=s?e.substr(0,e.length-s.length):e;return t?a+t:a}function z(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function R(e){for(var t,i=e.points,n=0,o=0;o<i.numberOfItems;o++){var s=i.getItem(o);o>0&&(n+=z(t,s)),t=s}return n}function j(e){var t;if(e.getTotalLength)return e.getTotalLength();switch(e.tagName.toLowerCase()){case"circle":return 2*Math.PI*P(e,"r");
1case"rect":return 2*P(e,"width")+2*P(e,"height");case"line":return z({x:P(e,"x1"),y:P(e,"y1")},{x:P(e,"x2"),y:P(e,"y2")});case"polyline":return R(e);case"polygon":return t=e.points,R(e)+z(t.getItem(t.numberOfItems-1),t.getItem(0))}}function V(e,t){var i=t||{},n=i.el||function(e){for(var t=e.parentNode;h.svg(t)&&h.svg(t.parentNode);)t=t.parentNode;return t}(e),o=n.getBoundingClientRect(),s=P(n,"viewBox"),a=o.width,r=o.height,l=i.viewBox||(s?s.split(" "):[0,0,a,r]);return{el:n,viewBox:l,x:l[0]/1,y:l[1]/1,w:a,h:r,vW:l[2],vH:l[3]}}function U(e,t){var i=/[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g,n=k(h.pth(e)?e.totalLength:e,t)+"";return{original:n,numbers:n.match(i)?n.match(i).map(Number):[0],strings:h.str(e)||t?n.split(i):[]}}function W(e){return S(e?E(h.arr(e)?e.map(C):C(e)):[],function(e,t,i){return i.indexOf(e)===t})}function F(e){var t=W(e);return t.map(function(e,i){return{target:e,id:i,total:t.length,transforms:{list:D(e)}}})}var H={css:function(e,t,i){return e.style[t]=i},attribute:function(e,t,i){return e.setAttribute(t,i)},object:function(e,t,i){return e[t]=i},transform:function(e,t,i,n,o){if(n.list.set(t,i),t===n.last||o){var s="";n.list.forEach(function(e,t){s+=t+"("+e+") "}),e.style.transform=s}}};function Y(e,t){F(e).forEach(function(e){for(var i in t){var n=_(t[i],e),o=e.target,s=w(n),a=B(o,i,s,e),r=N(k(n,s||w(a)),a);H[O(o,i)](o,i,r,e.transforms,!0)}})}function G(e,t){var i=e.length,n=function(e){return e.timelineOffset?e.timelineOffset:0},o={};return o.duration=i?Math.max.apply(Math,e.map(function(e){return n(e)+e.duration})):t.duration,o.delay=i?Math.min.apply(Math,e.map(function(e){return n(e)+e.delay})):t.delay,o.endDelay=i?o.duration-Math.max.apply(Math,e.map(function(e){return n(e)+e.duration-e.endDelay})):t.endDelay,o}var Z=0,Q=[],X=function(){var e;function t(i){for(var n=Q.length,o=0;o<n;){var s=Q[o];s.paused?(Q.splice(o,1),n--):(s.tick(i),o++)}e=o>0?requestAnimationFrame(t):void 0}return"undefined"!=typeof document&&document.addEventListener("visibilitychange",function(){q.suspendWhenDocumentHidden&&(K()?e=cancelAnimationFrame(e):(Q.forEach(function(e){return e._onDocumentVisibility()}),X()))}),function(){e||K()&&q.suspendWhenDocumentHidden||!(Q.length>0)||(e=requestAnimationFrame(t))}}();function K(){return!!document&&document.hidden}function q(e){void 0===e&&(e={});var t,i,s,a,l,d,u,p,g,v=0,y=0,m=0,f=0,C=null;function T(e){var t=window.Promise&&new Promise(function(e){return C=e});return e.finished=t,t}var P=(i=I(n,t=e),a=function(e,t){var i=[],n=t.keyframes;for(var o in n&&(t=M(function(e){for(var t=S(E(e.map(function(e){return Object.keys(e)})),function(e){return h.key(e)}).reduce(function(e,t){return 0>e.indexOf(t)&&e.push(t),e},[]),i={},n=function(n){var o=t[n];i[o]=e.map(function(e){var t={};for(var i in e)h.key(i)?i==o&&(t.value=e[i]):t[i]=e[i];return t})},o=0;o<t.length;o++)n(o);return i}(n),t)),t)h.key(o)&&i.push({name:o,tweens:function(e,t){var i=A(t);if(/^spring/.test(i.easing)&&(i.duration=c(i.easing)),h.arr(e)){var n=e.length;2!==n||h.obj(e[0])?h.fnc(t.duration)||(i.duration=t.duration/n):e={value:e}}var o=h.arr(e)?e:[e];return o.map(function(e,i){var n=h.obj(e)&&!h.pth(e)?e:{value:e};return h.und(n.delay)&&(n.delay=i?0:t.delay),h.und(n.endDelay)&&(n.endDelay=i===o.length-1?t.endDelay:0),n}).map(function(e){return M(e,i)})}(t[o],e)});return i}(s=I(o,t),t),u=G(d=S(E((l=F(t.targets)).map(function(e){return a.map(function(t){return function(e,t){var i=O(e.target,t.name);if(i){var n,o=t.tweens.map(function(i){var o=function(e,t){var i={};for(var n in e){var o=_(e[n],t);h.arr(o)&&1===(o=o.map(function(e){return _(e,t)})).length&&(o=o[0]),i[n]=o}return i.duration=parseFloat(i.duration),i.delay=parseFloat(i.delay),i}(i,e),s=o.value,a=h.arr(s)?s[1]:s,r=w(a),l=B(e.target,t.name,r,e),d=n?n.to.original:l,u=h.arr(s)?s[0]:d,c=w(u)||w(l),p=r||c;return h.und(a)&&(a=d),o.from=U(u,p),o.to=U(N(a,u),p),o.start=n?n.end:0,o.end=o.start+o.delay+o.duration+o.endDelay,o.easing=b(o.easing,o.duration),o.isPath=h.pth(s),o.isPathTargetInsideSVG=o.isPath&&h.svg(e.target),o.isColor=h.col(o.from.original),o.isColor&&(o.round=1),n=o,o}),s=o[o.length-1];return{type:i,property:t.name,animatable:e,tweens:o,duration:s.end,delay:o[0].delay,endDelay:s.endDelay}}}(e,t)})})),function(e){return!h.und(e)}),s),p=Z,Z++,M(i,{id:p,children:[],animatables:l,animations:d,duration:u.duration,delay:u.delay,endDelay:u.endDelay}));function L(){var e=P.direction;"alternate"!==e&&(P.direction="normal"!==e?"normal":"reverse"),P.reversed=!P.reversed,g.forEach(function(e){return e.reversed=P.reversed})}function x(e){return P.reversed?P.duration-e:e}function D(){v=0,y=x(P.currentTime)*(1/q.speed)}function k(e,t){t&&t.seek(e-t.timelineOffset)}function z(e){for(var t=0,i=P.animations,n=i.length;t<n;){var o=i[t],s=o.animatable,a=o.tweens,l=a.length-1,d=a[l];l&&(d=S(a,function(t){return e<t.end})[0]||d);for(var h=r(e-d.start-d.delay,0,d.duration)/d.duration,u=isNaN(h)?1:d.easing(h),c=d.to.strings,p=d.round,g=[],v=d.to.numbers.length,y=void 0,m=0;m<v;m++){var b=void 0,f=d.to.numbers[m],E=d.from.numbers[m]||0;
vendor: 4,512 bytes, line 1
1b=d.isPath?function(e,t,i){function n(i){void 0===i&&(i=0);var n=t+i>=1?t+i:0;return e.el.getPointAtLength(n)}var o=V(e.el,e.svg),s=n(),a=n(-1),r=n(1),l=i?1:o.w/o.vW,d=i?1:o.h/o.vH;switch(e.property){case"x":return(s.x-o.x)*l;case"y":return(s.y-o.y)*d;case"angle":return 180*Math.atan2(r.y-a.y,r.x-a.x)/Math.PI}}(d.value,u*f,d.isPathTargetInsideSVG):E+u*(f-E),p&&(d.isColor&&m>2||(b=Math.round(b*p)/p)),g.push(b)}var C=c.length;if(C){y=c[0];for(var T=0;T<C;T++){c[T];var A=c[T+1],I=g[T];isNaN(I)||(y+=A?I+A:I+" ")}}else y=g[0];H[o.type](s.target,o.property,y,s.transforms),o.currentValue=y,t++}}function R(e){P[e]&&!P.passThrough&&P[e](P)}function j(e){var t=P.duration,i=P.delay,n=t-P.endDelay,o=x(e);P.progress=r(o/t*100,0,100),P.reversePlayback=o<P.currentTime,g&&function(e){if(P.reversePlayback)for(var t=f;t--;)k(e,g[t]);else for(var i=0;i<f;i++)k(e,g[i])}(o),!P.began&&P.currentTime>0&&(P.began=!0,R("begin")),!P.loopBegan&&P.currentTime>0&&(P.loopBegan=!0,R("loopBegin")),o<=i&&0!==P.currentTime&&z(0),(o>=n&&P.currentTime!==t||!t)&&z(t),o>i&&o<n?(P.changeBegan||(P.changeBegan=!0,P.changeCompleted=!1,R("changeBegin")),R("change"),z(o)):P.changeBegan&&(P.changeCompleted=!0,P.changeBegan=!1,R("changeComplete")),P.currentTime=r(o,0,t),P.began&&R("update"),e>=t&&(y=0,P.remaining&&!0!==P.remaining&&P.remaining--,P.remaining?(v=m,R("loopComplete"),P.loopBegan=!1,"alternate"===P.direction&&L()):(P.paused=!0,P.completed||(P.completed=!0,R("loopComplete"),R("complete"),!P.passThrough&&"Promise"in window&&(C(),T(P)))))}return T(P),P.reset=function(){var e=P.direction;P.passThrough=!1,P.currentTime=0,P.progress=0,P.paused=!0,P.began=!1,P.loopBegan=!1,P.changeBegan=!1,P.completed=!1,P.changeCompleted=!1,P.reversePlayback=!1,P.reversed="reverse"===e,P.remaining=P.loop,g=P.children;for(var t=f=g.length;t--;)P.children[t].reset();(P.reversed&&!0!==P.loop||"alternate"===e&&1===P.loop)&&P.remaining++,z(P.reversed?P.duration:0)},P._onDocumentVisibility=D,P.set=function(e,t){return Y(e,t),P},P.tick=function(e){m=e,v||(v=m),j((m+(y-v))*q.speed)},P.seek=function(e){j(x(e))},P.pause=function(){P.paused=!0,D()},P.play=function(){P.paused&&(P.completed&&P.reset(),P.paused=!1,Q.push(P),D(),X())},P.reverse=function(){L(),P.completed=!P.reversed,D()},P.restart=function(){P.reset(),P.play()},P.remove=function(e){$(W(e),P)},P.reset(),P.autoplay&&P.play(),P}function J(e,t){for(var i=t.length;i--;)T(e,t[i].animatable.target)&&t.splice(i,1)}function $(e,t){var i=t.animations,n=t.children;J(e,i);for(var o=n.length;o--;){var s=n[o],a=s.animations;J(e,a),a.length||s.children.length||n.splice(o,1)}i.length||n.length||t.pause()}q.version="3.2.1",q.speed=1,q.suspendWhenDocumentHidden=!0,q.running=Q,q.remove=function(e){for(var t=W(e),i=Q.length;i--;)$(t,Q[i])},q.get=B,q.set=Y,q.convertPx=L,q.path=function(e,t){var i=h.str(e)?f(e)[0]:e,n=t||100;return function(e){return{property:e,el:i,svg:V(i),totalLength:j(i)*(n/100)}}},q.setDashoffset=function(e){var t=j(e);return e.setAttribute("stroke-dasharray",t),t},q.stagger=function(e,t){void 0===t&&(t={});var i=t.direction||"normal",n=t.easing?b(t.easing):null,o=t.grid,s=t.axis,a=t.from||0,r="first"===a,l="center"===a,d="last"===a,u=h.arr(e),c=u?parseFloat(e[0]):parseFloat(e),p=u?parseFloat(e[1]):0,g=w(u?e[1]:e)||0,v=t.start||0+(u?c:0),y=[],m=0;return function(e,t,h){if(r&&(a=0),l&&(a=(h-1)/2),d&&(a=h-1),!y.length){for(var b=0;b<h;b++){if(o){var f=l?(o[0]-1)/2:a%o[0],S=l?(o[1]-1)/2:Math.floor(a/o[0]),E=f-b%o[0],C=S-Math.floor(b/o[0]),T=Math.sqrt(E*E+C*C);"x"===s&&(T=-E),"y"===s&&(T=-C),y.push(T)}else y.push(Math.abs(a-b));m=Math.max.apply(Math,y)}n&&(y=y.map(function(e){return n(e/m)*m})),"reverse"===i&&(y=y.map(function(e){return s?e<0?-1*e:-e:Math.abs(m-e)}))}return v+Math.round(100*y[t])/100*(u?(p-c)/m:c)+g}},q.timeline=function(e){void 0===e&&(e={});var t=q(e);return t.duration=0,t.add=function(i,n){var s=Q.indexOf(t),a=t.children;function r(e){e.passThrough=!0}s>-1&&Q.splice(s,1);for(var l=0;l<a.length;l++)r(a[l]);var d=M(i,I(o,e));d.targets=d.targets||e.targets;var u=t.duration;d.autoplay=!1,d.direction=t.direction,d.timelineOffset=h.und(n)?u:N(n,u),r(t),t.seek(d.timelineOffset);var c=q(d);r(c),a.push(c);var p=G(a,e);return t.delay=p.delay,t.endDelay=p.endDelay,t.duration=p.duration,t.seek(0),t.reset(),t.autoplay&&t.play(),t},t},q.easing=b,q.penner=m,q.random=function(e,t){return Math.floor(Math.random()*(t-e+1))+e};let ee=q},2827:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Prom
1ise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetCtaModal=void 0;let s=o(i(2776)),a=i(4403),r=i(6450),l=i(8921),d=i(277),h=i(4906);class u extends a.BaseWidget{constructor(){var e;super(),this.isOpen=!1,this.ctaContainer=l.WidgetsFactory.create("blaze-div"),this.ctaDrawer=l.WidgetsFactory.create("blaze-modal"),this.ctaUrl=l.WidgetsFactory.create("blaze-typography"),this.iconShare=l.WidgetsFactory.create("blaze-button"),this.iconExternalLink=l.WidgetsFactory.create("blaze-button"),this.textContainer=l.WidgetsFactory.create("blaze-div"),this.labelText=l.WidgetsFactory.create("blaze-typography"),this.progressBar=l.WidgetsFactory.create("blaze-div"),this.fullscreenOverlay=l.WidgetsFactory.create("blaze-div"),this.ctaDrawer.onClose=null===(e=this.onDrawerClose)||void 0===e?void 0:e.bind(this)}connectedCallback(){return n(this,void 0,void 0,function*(){this.ctaContainer.setStyle({display:"flex",flexDirection:"column",height:"2.5rem",fontSize:".8rem",fontFamily:h.Presets.playerFont,color:"#000"}),this.progressBar.id="progress-bar",this.progressBar.setStyle({height:"3px",width:"0",backgroundColor:"#fff",position:"absolute",bottom:"0",left:"0"}),this.fullscreenOverlay.id="fullscreen-overlay",this.fullscreenOverlay.setStyle({position:"fixed",top:"0",left:"0",width:"100%",height:"100%",display:"none",zIndex:"1000"}),this.render()})}disconnectedCallback(){this.removeChild(this.ctaDrawer)}attributeChangedCallback(e,t,i){switch(e){case"cta-url":this.ctaUrl.text=i;break;case"background-color":this.ctaDrawer.setAttribute("background-color",i);break;case"icon-color":this.iconExternalLink.setAttribute("icon-color",i),this.iconShare.setAttribute("icon-color",i);break;case"text-color":this.ctaUrl.setStyle({color:i}),this.labelText.setStyle({color:i});break;case"border-color":this.ctaDrawer.setAttribute("border-color",i);break;case"progress-bar-color":this.progressBar.setStyle({backgroundColor:i})}}animateProgressBar(e){let t={targets:"#progress-bar",width:e?"100%":"0",duration:e?r.ONE_AND_HALF_SECOND:1,easing:"easeInQuad"};(0,s.default)(t)}onDrawerClose(){this.animateProgressBar(!1)}open(){this.ctaDrawer.open(),this.animateProgressBar(!0),this.fullscreenOverlay.setStyle({display:"block"}),this.isOpen=!0}close(){this.ctaDrawer.close(),this.animateProgressBar(!1),this.fullscreenOverlay.setStyle({display:"none"}),this.isOpen=!1}render(){this.ctaDrawer.init({anchor:"bottom",component:this.ctaContainer}),this.append(this.ctaDrawer),this.iconShare.setIconUrl(d.externalLinkIconSvg),this.iconShare.setAttribute("icon-color","#000"),this.textContainer.setStyle({display:"flex",alignSelf:"center",maxWidth:"75%"}),this.labelText=l.WidgetsFactory.create("blaze-typography"),this.labelText.text="Opening",this.labelText.setStyle({fontWeight:"bold",marginRight:"0.5rem"}),this.ctaUrl.setStyle({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block"}),this.textContainer.append(this.labelText),this.textContainer.append(this.ctaUrl);let e=l.WidgetsFactory.create("blaze-div");e.setStyle({display:"flex",gap:"1rem",padding:"0.5rem",alignItems:"center",justifyContent:"space-between"}),this.iconExternalLink=l.WidgetsFactory.create("blaze-button"),this.iconExternalLink.setIconUrl(d.newPageIcon),this.iconExternalLink.setAttribute("icon-color","#000"),e.append(this.iconShare),e.append(this.textContainer),e.append(this.iconExternalLink),this.ctaContainer.append(e),this.ctaDrawer.setAttribute("border-radius","1rem 1rem 0 0"),this.ctaContainer.append(this.progressBar),this.append(this.fullscreenOverlay)}}t.BlazeWidgetCtaModal=u,u.observedAttributes=["cta-url","background-color","icon-color","text-color","border-color","progress-bar-color"]},2904:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetContent=void 0;let n=i(9126),o=i(4403),s=i(6450),a=i(4545),r=i(9266);class l extends HTMLElement{constructor(){super(),this.pageIndex=0,this.startTrigger="",this.exitTrigger="",this.navigationType="",this.navigationDirection="",this.listeners=new o.EventsListener,this.isActive=!1,this.isResumeOnFocusExecuted=!1,this.isNavigationPending=!1,this.isPausedManually=!1,this.resumeAfterfocus=!1,this.contentExtraInfo=void 0,this.widgetParentItem={},this.sessionId="",this.adIndex=0,this.detachTimeout=null,this.isScheduledForDetach=!1,this.container=document.createElement("div"),this.container.style.touchAction="manipulation",this.container.style.cssText+="-webkit-user-select: none;"}connectedCallback(){this.detachTimeout&&(clearTimeout(this.detachTimeout),this.detachTimeout=null,this.isScheduledForDetach=!1),this.isScheduledForDetach||this.attachEventListeners()}disconnectedCallback(){this.isScheduledForDetach=!0,this.detachTimeout=setTimeout(()=>{this.isConnected||(this.detachEventListeners(),this.isScheduledForDetach=!1),this.detachTimeout=null},0)}
1attachEventListeners(){this.isScheduledForDetach||(window.addEventListener("focus",this.boundOnFocusEvent),window.addEventListener("blur",this.boundOnBlurEvent),window.addEventListener("visibilitychange",this.boundOnVisibilityChangeEvent),r.SharedEventTarget.addEventListener(s.CLOSED_CAPTIONS_LANGUAGE_CHANGE,this.boundOnLanguageChangeEvent))}detachEventListeners(){window.removeEventListener("blur",this.boundOnFocusEvent),window.removeEventListener("focus",this.boundOnBlurEvent),window.removeEventListener("visibilitychange",this.boundOnVisibilityChangeEvent),r.SharedEventTarget.removeEventListener(s.CLOSED_CAPTIONS_LANGUAGE_CHANGE,this.boundOnLanguageChangeEvent)}setWidgetItemParent(e){this.widgetParentItem=e}updateWidgetStatusReadUnread(){var e,t,i,n,o,s,a,r;null===(t=null===(e=this.widgetParentItem)||void 0===e?void 0:e.updateWidget)||void 0===t||t.call(e),null===(n=null===(i=this.widgetParentItem)||void 0===i?void 0:i.setChipStyle)||void 0===n||n.call(i),null===(s=null===(o=this.widgetParentItem)||void 0===o?void 0:o.render)||void 0===s||s.call(o),null===(r=null===(a=this.widgetParentItem)||void 0===a?void 0:a.updateWidgetItemPadding)||void 0===r||r.call(a)}getRefferingObject(){var e,t;let i=new o.ReferringEventInfo,s=(null===(e=this.widgetParentItem)||void 0===e?void 0:e.parentRef)||(null===(t=this.refContentModal)||void 0===t?void 0:t.parentWidget);if(s&&s instanceof n.BlazeWidgetLayout&&(i.origin_widget_id=s.id,i.origin_widget_type=s.widgetType(),i.labels_expression=s.getAttribute("labels")),(a.ConfigService.staticContent||a.ConfigService.staticContentType)&&(i.story_source="OneBox"),document.referrer){i.referrer_page_url=document.referrer;let e=document.referrer.indexOf("#blaze"),t=-1!==e?document.referrer.slice(0,e):document.referrer;i.referrer_page_type=/^(https?:\/\/[^/]+\/?)$/i.test(t)?"Homepage":"Category/Article",i.referrer_page_domain=document.referrer?new URL(document.referrer).hostname:""}return i}setContentExtraInfo(e){this.contentExtraInfo=e}render(){}}t.BlazeWidgetContent=l},2914:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.deviceDetector=t.DEVICE_EVENTS=t.Platform=void 0;let o=n(i(7232));t.Platform={Console:"console",Mobile:"mobile",Tablet:"tablet",SmartTV:"smarttv",Wearable:"wearable",Embedded:"embedded",Desktop:"desktop"},t.DEVICE_EVENTS={SCREEN_ORIENTATION_CHANGE:"screenOrientationChange"};class s{constructor(){this.boundResizeListener=this.handleResize.bind(this),this.parser=new o.default(navigator.userAgent),this.OS=this.detectOS(),this.platform=this.detectPlatform(),this.browser=this.detectBrowser(),this.screenOrientation=this.getScreenOrientation(),window.addEventListener("resize",this.boundResizeListener)}removeResizeListener(){window.removeEventListener("resize",this.boundResizeListener)}static getInstance(){return s.instance||(s.instance=new s),s.instance}detectOS(){return this.parser.getOS().name}detectBrowser(){return this.parser.getBrowser().name}get getPlatform(){return this.parser.getDevice().type}get isDesktop(){return"desktop"===this.platform}get isMobile(){return"mobile"===this.platform}get isTablet(){return"tablet"===this.platform}detectPlatform(){var e;
1let t=null===(e=this.parser.getDevice())||void 0===e?void 0:e.type,i=window.innerWidth>830||this.isDesktop;if("mobile"===t)return"mobile";if("tablet"===t)return"tablet";if(i)return"desktop";if("ontouchstart"in window||navigator.maxTouchPoints>0){if(window.innerWidth<=480)return"mobile";if(window.innerWidth<=830)return"tablet"}return"desktop"}getScreenOrientation(){return window.innerHeight>window.innerWidth?"portrait":"landscape"}handleResize(){this.OS=this.detectOS(),this.platform=this.detectPlatform();let e=this.screenOrientation;if(this.screenOrientation=this.getScreenOrientation(),e!==this.screenOrientation){let e={orientation:this.screenOrientation,changedAt:Date.now()},i=new CustomEvent(t.DEVICE_EVENTS.SCREEN_ORIENTATION_CHANGE,{detail:e,bubbles:!0,cancelable:!0});window.dispatchEvent(i)}}isIOSMobileTabletSafari(){let e="iOS"===t.deviceDetector.OS,i="tablet"===t.deviceDetector.platform&&"Mac OS"===t.deviceDetector.OS,n="Mobile Safari"===t.deviceDetector.browser||"Safari"===t.deviceDetector.browser;return e||n||i}get isFullscreenSupported(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.msFullscreenEnabled}getDeviceInfo(){return this.parser.getDevice()}getOSInfo(){return this.parser.getOS()}}t.deviceDetector=s.getInstance()},2954:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3128:(e,t)=>
1{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3136:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.calculatePosition=function(e){return{isOutside:e.startsWith("outside"),isInside:e.startsWith("inside"),isTop:e.includes("Top"),isMiddle:e.includes("Middle"),isBottom:e.includes("Bottom"),isLeft:e.includes("Left"),isRight:e.includes("Right")}}},3166:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeLoader=void 0;let n=i(356);class o extends HTMLElement{constructor(){super();let e=this.attachShadow({mode:"open"}),t=document.createElement("style");t.textContent="\n :host {\n display: block;\n position: relative;\n width: 40px;\n height: 40px;\n } \n ",e.appendChild(t)}static get observedAttributes(){return["color","size"]}attributeChangedCallback(e,t,i){"color"===e&&t!==i?this.updateLoaderColor(i):"size"===e&&t!==i&&this.updateLoaderSize(i)}connectedCallback(){var e;let t=this.getAttribute("color")||"#fff";this.updateLoaderColor(t),null===(e=this.animate)||void 0===e||e.call(this,[{transform:"rotate(0)"},{transform:"rotate(360deg)"}],{duration:1e3,iterations:Number.POSITIVE_INFINITY,easing:"linear"})}updateLoaderSize(e){(0,n.mergeStyles)(this,{width:e,height:e})}updateLoaderColor(e){(0,n.mergeStyles)(this,{display:"block",border:"solid 3px "+e,borderRadius:"50%",borderRightColor:"transparent",borderBottomColor:"transparent",transition:"transform 1s linear"})}}t.BlazeLoader=o},3214:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getVideoDuration=function(e,t){return new Promise(i=>{let n=e,o=!1;if(e&&!isNaN(e.duration)&&e.duration>0)return void i(e.duration);if(e)t&&(!e.src||isNaN(e.duration))&&(o=!0);else{if(!t)return void i(0);o=!0}if(o&&((n=document.createElement("video")).preload="metadata",n.src=t),!isNaN(n.duration)&&n.duration>0)return void i(n.duration);let s=setTimeout(()=>{l(),i(0)},2e3),a=()=>{let e=n.duration;l(),!isNaN(e)&&e>0?i(e):i(0)},r=()=>{l(),i(0)},l=()=>{clearTimeout(s),n.removeEventListener("loadedmetadata",a),n.removeEventListener("error",r),o&&(n.src="")};n.addEventListener("loadedmetadata",a),n.addEventListener("error",r),!o&&n.readyState>=1&&n.duration>0&&!isNaN(n.duration)&&(l(),i(n.duration))})}},3276:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetEmbeddedStory=void 0;let o=i(9126),s=i(9965),a=i(4545),r=i(4906),l=i(9266),d=i(6806),h=i(1356);class u extends h.BlazeWidgetEmbeddedBase{constructor(){super(),this.contents=[],this.currentStoryPlayerIndex=0,this.stories=[],this.isCurrentPlayerFirstPlay=!0}static get observedAttributes(){return Object.values(h.EMBEDDED_ATTRIBUTES)}connectedCallback(){super.connectedCallback(),this.addEventListener(s.InternalEvent.NEXT_STORY,this.nextStory),this.addEventListener(s.InternalEvent.PREV_STORY,this.prevStory),this.addEventListener(s.InternalEvent.FULL_SCREEN_CLICK,this.onFullScreenClickHandler,!0),this.addEventListener(s.InternalEvent.AD_ENDED,this.onCustomNativeAdEnded),this.addEventListener(s.InternalEvent.AD_RESUMED,this.onVastAdResumedEnded)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener(s.InternalEvent.NEXT_STORY,this.nextStory),this.removeEventListener(s.InternalEvent.PREV_STORY,this.prevStory),this.removeEventListener(s.InternalEvent.FULL_SCREEN_CLICK,this.onFullScreenClickHandler,!0),this.removeEventListener(s.InternalEvent.AD_ENDED,this.onCustomNativeAdEnded),this.removeEventListener(s.InternalEvent.AD_RESUMED,this.onVastAdResumedEnded)}setContentIds(e,t){this.setReloadData(t),this.setAttribute(h.EMBEDDED_ATTRIBUTES.ContentIds,e.join())}setSearchText(e,t){}setId(e){this.id="widget-embedded-story-"+e}getThemeContentType(){return"story"}setTheme(e){super.setTheme(e),this.modal=this.createModal()}handleSpecificAttributeChange(e,t,i){e===h.EMBEDDED_ATTRIBUTES.ContentIds&&t&&this.reloadLogic()}handleIntersection(e){let t=e.find(e=>e.target===this);t&&(this.isIntersecting=t.isIntersecting,this.currentStoryPlayer&&(this.isIntersecting?this.playContent():this.pauseContent()))}pauseContent(){var e,t,i,n,o;(null===(e=this.currentStoryPlayer)||void 0===e?void 0:e.currentPage.isCurrentlyTryingToRunImaAd)&&(null===(i=null===(t=this.currentStoryPlayer)||void 0===t?void 0:t.currentPage.widgetVastAd)||void 0===i||i.pause()),(null===(n=this.currentStoryPlayer)||void 0===n?void 0:n.currentPage.paused)||(this.stateManager.isPlaying=!1,null===(o=this.currentStoryPlayer)||void 0===o||o.playToggle({customIsPlaying:!0}))}playContent(){var e,t,i,n,o,s,a,r,l;if(!this.isIntersecting||!(null===(e=this.currentStoryPlayer)||void 0===e?void 0:e.currentPage.paused))return;let d=(null===(t=this.currentStoryPlayer)||void 0===t?void 0:t.currentPage.isCurrentlyTryingToRunImaAd)||"Ad"===(null===(n=null===(i=this.currentStoryPlayer)||void 0===i?void 0:i.currentPage.data)||void 0===n?void 0:n.type);(null===(o=this.currentStoryPlayer)||void 0===o?void 0:o.currentPage.isCurrentlyTryingToRunImaAd)&&(null===(a=null===(s=this.currentStoryPlayer)||void 0===s?void 0:s.currentPage.widgetVastAd)||void 0===a||a.resume()),d||(this.stateManager.isPlaying=!0,this.isCurrentPlayerFirstPlay?(this.isCurrentPlayerFirstPlay=!1,null===(r=this.currentStoryPlayer)||void 0===r||r.play()):null===(l=this.currentStoryPlayer)||void 0===l||l.playToggle({customIsPlaying:!1}))}get currentStoryPlayer(){return this.contents[this.currentStoryPlayerIndex]}loadContent(){return n(this,void 0,void 0,function*(){var e,t;a.EventService.dispatch(this,s.Delegation.onWidgetDataLoadStarted,{widgetId:this.id}),this.removeCurrentStoryPlayer(),this.showSkeleton(),this.contents=[];let i=this.getAttribute(h.EMBEDDED_ATTRIBUTES.MaxItems),n=this.getAttribute(h.EMBEDDED_ATTRIBUTES.Labels),o=this.getAttribute(h.EMBEDDED_ATTRIBUTES.OrderType),r=this.getAttribute(h.EMBEDDED_ATTRIBUTES.ContentIds),u=null==r?void 0:r.split(","),c=this.getAttribute(h.EMBEDDED_ATTRIBUTES.LabelsPriority),{data:p}=(null==u?void 0:u.length)&&!n?yield a.ApiService.getStoriesByIds({ids:u,orderType:o}):yield a.ApiService.getStoriesByLabels({labels:n,orderType:o,maxItems:i,labelsPriority:c});this.defaultAdsInfo=null==p?void 0:p.defaultAdsInfo;let g=null!==(e=null==p?void 0:p.result)&&void 0!==e?e:[],v=Object.assign(Object.assign({},this.theme.playerStyle),{iconsPosition:"VERTICAL",iconsButtonPadding:"7px"});
1try{(g=yield a.DatabaseService.enrichStories(g)).forEach(e=>{e.hasViewed=(0,l.isReadByLastUnIgnoredPageStatus)(e)})}catch(e){a.EventService.dispatch(this,s.Delegation.onErrorThrown,{widgetId:this.id,errorCode:s.ErrorCode.FailedEnrichStories})}this.getAttribute("should-order-widget-by-read-status")&&"Manual"!==o&&g.sort((e,t)=>{let i=e.hasViewed?1:2;return(t.hasViewed?1:2)-i}),g.forEach((e,t)=>{var i,n,o,s;let r=new d.BlazeWidgetStory(v,"Embedded",void 0,(null===(i=this.parentElement)||void 0===i?void 0:i.clientWidth)&&(null===(n=this.parentElement)||void 0===n?void 0:n.clientHeight)&&(null===(o=this.parentElement)||void 0===o?void 0:o.clientWidth)>=(null===(s=this.parentElement)||void 0===s?void 0:s.clientHeight)?"Horizontal":"Vertical",this.stateManager);r.startTrigger="Embedded Player in Viewport",r.setData(e),r.resetStoryLocationIndexToLastUnseen(),this.contents.push(r),a.AdService.pushAdsBetweenStories(this.defaultAdsInfo,this.contents,g,t,0,v,"Embedded")}),this.contents.forEach(e=>{e.refWidget=this.contents});let y=this.contents[0];y&&(y.shouldShowImaAdOnStart=!1),this.setCurrentStoryPlayer(0),null===(t=this.currentStoryPlayer)||void 0===t||t.currentPage.startEnter(),a.EventService.dispatch(this,s.Delegation.onWidgetDataLoadCompleted,{widgetId:this.id,storyCount:g.length}),this.hideSkeleton(),this.stories=g})}setCurrentStoryPlayer(e,t){var i;null===(i=this.currentStoryPlayer)||void 0===i||i.currentPage.endExit(),this.removeCurrentStoryPlayer(),this.isCurrentPlayerFirstPlay=!0;let n=e>=this.contents.length;e<0||n?(this.currentStoryPlayerIndex=0,n&&this.contents.forEach(e=>e.resetStoryLocationIndexToLastUnseen())):this.currentStoryPlayerIndex=e,this.currentStoryPlayer&&(isNaN(Number(t))||(this.currentStoryPlayer.pageIndex=null!=t?t:0),this.appendChild(this.currentStoryPlayer),this.currentStoryPlayer.load(),this.isIntersecting&&(this.isCurrentPlayerFirstPlay?(this.isCurrentPlayerFirstPlay=!1,this.currentStoryPlayer.play()):this.currentStoryPlayer.playToggle({customIsPlaying:!1})),this.currentStoryPlayer.currentPage.startEnter(),this.currentStoryPlayer.currentPage.endEnter())}nextStory(){var e,t,i;let n=null!==(t=null===(e=this.currentStoryPlayer)||void 0===e?void 0:e.pages.length)&&void 0!==t?t:0;this.currentStoryPlayer&&n&&(null===(i=this.currentStoryPlayer.pages[n-1])||void 0===i||i.pause()),this.setCurrentStoryPlayer(this.currentStoryPlayerIndex+1)}prevStory(){var e,t,i;null===(i=null===(t=null===(e=this.currentStoryPlayer)||void 0===e?void 0:e.pages)||void 0===t?void 0:t[0])||void 0===i||i.pause(),this.setCurrentStoryPlayer(this.currentStoryPlayerIndex-1)}removeCurrentStoryPlayer(){var e;null===(e=this.currentStoryPlayer)||void 0===e||e.remove()}createModal(){this.updatePlayerStyle();let e=this.modal?this.modal:new o.BlazeWidgetStoryModal(this,this.theme.playerStyle,void 0,this.stateManager);return this.modal&&this.modal.setTheme(this.theme.playerStyle),e.setModalContent(this.stories,0,this.defaultAdsInfo),e.onClose=this.handleModalClose.bind(this),e}handleModalClose(e){if(this.stateManager.isPlaying=!0,null==e?void 0:e.storyId){let t=this.contents.findIndex(t=>t.data.id===e.storyId);if(-1===t)return;let i=this.contents[t].shouldShowImaAdOnStart;this.contents[t].shouldShowImaAdOnStart=!1,this.setCurrentStoryPlayer(t,null==e?void 0:e.pageIndex),this.contents[t].shouldShowImaAdOnStart=i}}updatePlayerStyle(){let e=(0,l.mergeDeep)(r.ThemeFactory.create("default").playerStyle,a.ConfigService.playerStyleCustomization);(0,l.applyPlayerStyleChanges)(r.ThemeFactory.create("default").playerStyle,e,this.theme.playerStyle,{GLOBAL:[],LOCAL:[]})}openFullscreen(){this.currentStoryPlayer&&(this.pauseContent(),this.modal=this.createModal(),this.appendModalToBlazeSDK(this.modal),this.modal.seek(this.currentStoryPlayer.data.id),this.modal.open({pageIndex:this.currentStoryPlayer.pageIndex}))}appendModalToBlazeSDK(e){let t=document.getElementsByTagName("blaze-sdk")[0];t&&t.append(e)}onFullScreenClickHandler(e){e.stopPropagation(),this.openFullscreen()}onCustomNativeAdEnded(){var e;this.isIntersecting||null===(e=this.currentStoryPlayer)||void 0===e||e.pause()}onVastAdResumedEnded(){var e,t;this.isIntersecting||null===(t=null===(e=this.currentStoryPlayer)||void 0===e?void 0:e.currentPage.widgetVastAd)||void 0===t||t.pause()}getAnimationTargetSelector(){return"blaze-widget-story"}}t.BlazeWidgetEmbeddedStory=u},3311:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.PseudoFullscreenManager=void 0,t.PseudoFullscreenManager=class{constructor(e){this.isActive=!1,this.state=null,this.PSEUDO_FULLSCREEN_CLASS="pseudo-fullscreen",this.element=e,this.boundPreventPullToRefresh=this.preventPullToRefresh.bind(this),this.boundHandleVisualViewportResize=this.handleVisualViewportResize.bind(this)}toggle(){this.isActive?this.exit():this.enter()}enter(){var e;this.isActive||(this.captureCurrentState(),this.applyPseudoFullscreenStyles(),this.preventPageScrolling(),this.setupTouchEventListeners(),this.setupVisualViewportListener(),this.isActive=!0,this.element.classList.add(this.PSEUDO_FULLSCREEN_CLASS),null===(e=this.onStateChange)||void 0===e||e.call(this,!0))}exit(){var e;this.isActive&&(this.restoreOriginalState(),this.restorePageScrolling(),this.removeTouchEventListeners(),this.removeVisualViewportListener(),this.isActive=!1,this.element.classList.remove(this.PSEUDO_FULLSCREEN_CLASS),this.state=null,null===(e=this.onStateChange)||void 0===e||e.call(this,!1))}isInPseudoFullscreen(){return this.isActive}forceExit(){this.isActive&&this.exit()}destroy(){this.forceExit()}captureCurrentState(){let e=this.element,t={x:window.scrollX,y:window.scrollY},i={position:e.style.position,top:e.style.top,left:e.style.left,width:e.style.width,height:e.style.height,transform:e.style.transform,zIndex:e.style.zIndex,backgroundColor:e.style.backgroundColor,borderRadius:e.style.borderRadius,touchAction:e.style.touchAction},n={overflow:document.body.style.overflow,position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,width:document.body.style.width,overscrollBehavior:document.body.style.overscrollBehavior};this.state={originalStyles:i,originalBodyStyles:n,savedScrollPosition:t}}applyPseudoFullscreenStyles(){var e,t;if(!this.state)return;let i=(null===(e=window.visualViewport)||void 0===e?void 0:e.height)||window.innerHeight,n={position:"fixed",top:"0",left:"0",width:((null===(t=window.visualViewport)||void 0===t?void 0:t.width)||window.innerWidth)+"px",height:i+"px",backgroundColor:"black",zIndex:"9999",transform:"none",borderRadius:"0",touchAction:"manipulation"};Object.assign(this.element.style,n)}preventPageScrolling(){if(!this.state)return;let{savedScrollPosition:e}=this.state;document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.top="-"+e.y+"px",document.body.style.left="-"+e.x+"px",document.body.style.width="100%",document.body.style.overscrollBehavior="none",document.documentElement.style.overscrollBehavior="none"}setupTouchEventListeners(){document.addEventListener("touchstart",this.boundPreventPullToRefresh,{passive:!1}),document.addEventListener("touchmove",this.boundPreventPullToRefresh,{passive:!1})}setupVisualViewportListener(){"visualViewport"in window&&window.visualViewport&&window.visualViewport.addEventListener("resize",this.boundHandleVisualViewportResize)}restoreOriginalState(){if(!this.state)return;let{originalStyles:e}=this.state;Object.assign(this.element.style,e)}restorePageScrolling(){if(!this.state)return;let{originalBodyStyles:e,savedScrollPosition:t}=this.state;Object.assign(document.body.style,e),document.body.style.overscrollBehavior="",document.documentElement.style.overscrollBehavior="",window.scrollTo({top:t.y,left:t.x,behavior:"instant"})}removeTouchEventListeners(){document.removeEventListener("touchstart",this.boundPreventPullToRefresh),document.removeEventListener("touchmove",this.boundPreventPullToRefresh)}removeVisualViewportListener(){"visualViewport"in window&&window.visualViewport&&window.visualViewport.removeEventListener("resize",this.boundHandleVisualViewportResize)}preventPullToRefresh(e){this.element.contains(e.target)||(e.preventDefault(),e.stopPropagation())}handleVisualViewportResize(){if(!this.isActive||!window.visualViewport)return;let e=this.element,t=window.visualViewport.height,i=window.visualViewport.width;e.style.width=i+"px",e.style.height=t+"px"}}},3320:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3324:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0})},3334:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CUSTOM_SCROLLBAR_TEMPLATE=void 0,t.CUSTOM_SCROLLBAR_TEMPLATE="\n ::-webkit-scrollbar {\n width: 4px; /* Width of the scrollbar */\n }\n\n ::-webkit-scrollbar-thumb {\n background-color: #404040; /* Scrollbar thumb color */\n border-radius: 8px; /* Rounded corners */\n }\n\n ::-webkit-scrollbar-track {\n background: transparent; /* Optional: scrollbar track background */\n }\n\n :host {\n scrollbar-width: thin; /* Thin scrollbar for Firefox */\n scrollbar-color: #404040 transparent; /* Thumb color and track color for Firefox */\n }\n "},3380:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ApiService=void 0;let o=i(4545),s=i(1643),a=i(4403),r=i(9266),l="UserManagement";class d extends(0,a.Singleton)(){constructor(){super(...arguments),this.api={}}init(){return n(this,void 0,void 0,function*(){this.api=new s.API({baseUrl:o.ConfigService.apiUrl,analyticsBaseUrl:o.ConfigService.analyticsApiUrl}),this.analyticsUrlRotator=new a.UrlRotator({fallbackUrl:o.ConfigService.analyticsApiUrl,apiVersion:"v1"})})}setAdsOnStories(e,t){var i;return"EveryXStories"===(null===(i=null==t?void 0:t.configuration)||void 0===i?void 0:i.adsLocationType)?e:o.AdService.canRunAds?e.map(e=>{var i,n,o;let s=null!==(i=null==t?void 0:t.configuration)&&void 0!==i?i:null===(n=e.adInfo)||void 0===n?void 0:n.configuration,a=null!==(o=e.adInfo)&&void 0!==o?o:t,r=null==s?void 0:s.adLocationsIndexes.sort((e,t)=>e-t);switch(null==a?void 0:a.type){case"Web":let l=e.pages.length,d=0;null==r||r.forEach(t=>{l>t&&(e.pages.splice(t+d,0,{id:"ad-"+e.id+"-"+t,duration:5,ignoreReadStatusForStory:!1,hasViewed:!1,type:"Ad",createTime:new Date().toLocaleString(),adInfo:a}),d++)});break;case"IMA":null==r||r.forEach(t=>{let i=e.pages[t];"Content"===(null==i?void 0:i.type)&&(i.adInfo=a,i.shouldShowImaAd=!0)})}return e}):e}getStoriesByIds(e){return n(this,void 0,void 0,function*(){var t,i,n;let{showLiveFirst:o}=e,s=Object.assign(Object.assign(Object.assign({},this.getContentParamsByIds(e)),o&&{showLiveFirst:o}),(0,r.getPersonalizedParamsForRequest)(e.personalized)),a=yield this.api.get("stories/ids",{urlSearchParams:s});return Object.assign(Object.assign({},a),{result:this.setAdsOnStories(null!==(i=null===(t=a.data)||void 0===t?void 0:t.result)&&void 0!==i?i:[],null===(n=a.data)||void 0===n?void 0:n.defaultAdsInfo)})})}getStoriesByLabels(e){return n(this,void 0,void 0,function*(){var t,i,n;let{showLiveFirst:o,personalized:s}=e,a=Object.assign(Object.assign(Object.assign({},this.getContentParamsByLabels(e)),o&&{showLiveFirst:o}),(0,r.getPersonalizedParamsForRequest)(s)),l=yield this.api.get("stories",{urlSearchParams:a}),d=this.setAdsOnStories(null!==(i=null===(t=l.data)||void 0===t?void 0:t.result)&&void 0!==i?i:[],null===(n=l.data)||void 0===n?void 0:n.defaultAdsInfo);return Object.assign(Object.assign({},l),{result:d})})}getStoriesByText(e){return n(this,void 0,void 0,function*(){var t,i,n;let{showLiveFirst:o,personalized:s}=e,a=Object.assign(Object.assign(Object.assign({},this.getContentParamsByText(e)),o&&{showLiveFirst:o}),(0,r.getPersonalizedParamsForRequest)(s)),l=yield this.api.get("stories",{urlSearchParams:a}),d=this.setAdsOnStories(null!==(i=null===(t=l.data)||void 0===t?void 0:t.result)&&void 0!==i?i:[],null===(n=l.data)||void 0===n?void 0:n.defaultAdsInfo);return Object.assign(Object.assign({},l),{result:d})})}getMomentByIds(e){return n(this,void 0,void 0,function*(){return Object.assign({},(yield this.api.get("moments/ids",{urlSearchParams:this.getContentParamsByIds(e)})))})}getMomentsByLabels(e){return n(this,void 0,void 0,function*(){return yield this.api.get("moments",{urlSearchParams:this.getContentParam
1sByLabels(e)})})}getMomentsByText(e){return n(this,void 0,void 0,function*(){return yield this.api.get("moments",{urlSearchParams:this.getContentParamsByText(e)})})}getContentByRecommendations(e){return n(this,void 0,void 0,function*(){let{forYou:t,trending:i}=e.recommendations;if(!t&&!i)throw Error("Invalid recommendation options: must specify either forYou or trending");return yield this.api.get("recommendations/"+(i?"trending":"forYou"),{urlSearchParams:this.getContentParamsByRecommendations(e),auth:!0})})}updateMomentLikeStatus(e){return n(this,void 0,void 0,function*(){yield this.api.put("Moments/like",{urlSearchParams:e,auth:!0})})}getStaticStories(){return n(this,void 0,void 0,function*(){var e;for(let t=1;t<=3;t++){let i=null===(e=null==document?void 0:document.getElementById("wsc-response"))||void 0===e?void 0:e.textContent;if(!i)break;try{let e=JSON.parse(i),t=this.setAdsOnStories([e]);return t.length>0?t[0]:null}catch(e){if(!(t<3))return null;yield new Promise(e=>setTimeout(e,500))}}return null})}getVideosByIds(e){return n(this,void 0,void 0,function*(){return Object.assign({},(yield this.api.get("videos/ids",{urlSearchParams:this.getContentParamsByIds(e)})))})}getVideosByLabels(e){return n(this,void 0,void 0,function*(){return Object.assign({},(yield this.api.get("videos",{urlSearchParams:this.getContentParamsByLabels(e)})))})}getVideosByText(e){return n(this,void 0,void 0,function*(){return Object.assign({},(yield this.api.get("videos",{urlSearchParams:this.getContentParamsByText(e)})))})}updateVideosLikeStatus(e){return n(this,void 0,void 0,function*(){yield this.api.put("Videos/like",{urlSearchParams:e,auth:!0})})}sendAnaltyicsEvents(e){return n(this,void 0,void 0,function*(){let t="events";o.ConfigService.doNotTrack&&(t+="_do_not_track");let i=this.getAnalyticsEndpoint()+"/"+t,n={api_key:o.ConfigService.apiKey?o.ConfigService.apiKey:""};return yield this.api.post("",{urlSearchParams:n,baseUrl:i,init:{body:JSON.stringify(e),keepalive:!0}})})}sendLoggerLogs(e){return n(this,void 0,void 0,function*(){return yield this.api.post("",{urlSearchParams:{api_key:o.ConfigService.apiKey},baseUrl:o.ConfigService.loggerApiUrl,init:{body:e,keepalive:!0,headers:{"Content-Type":"application/json","Content-Encoding":"gzip"}}})})}sendInteractionResponse(e){return n(this,void 0,void 0,function*(){yield this.api.put("Interactions/Response/"+e.interactionType+"/"+e.interactionId,{init:{body:JSON.stringify(e.responseId)},auth:!0})})}getUserToken(e){return this.api.post(l,{init:{body:JSON.stringify(e)},urlSearchParams:{clientPlatform:"Web"}})}refreshUserToken(e){return this.api.put(l,{urlSearchParams:{clientPlatform:"Web"},init:{body:JSON.stringify(e)}})}getAppConfigurations(){return this.api.get("AppConfigurations",{urlSearchParams:{clientPlatform:"Web"}})}getContentDefaultParams(e){return Object.assign(Object.assign(Object.assign({clientPlatform:"Web"},o.ConfigService.geoLocation&&{geo:o.ConfigService.geoLocation}),e.orderType&&{orderType:e.orderType}),o.ConfigService.preferredLanguage&&{PreferredLanguage:o.ConfigService.preferredLanguage})}getContentParamsByLabels(e){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getContentDefaultParams(e)),{labelsFilterExpression:e.labels}),e.maxItems&&{maxItems:e.maxItems.toString()}),e.labelsPriority&&{labelsPriority:e.labelsPriority}),e.text&&{text:e.text})}getContentParamsByIds(e){return Object.assign(Object.assign({},this.getContentDefaultParams(e)),{ids:e.ids.join(",")})}getContentParamsByRecommendations(e){var t,i;let n=Object.assign({},this.getContentDefaultParams(e)),{forYou:o,trending:s}=e.recommendations,a=o||s;return n.contentType=e.contentType,(null===(t=null==a?void 0:a.anyLabelFilter)||void 0===t?void 0:t.length)&&(n.Labels=a.anyLabelFilter.join(",")),(null===(i=null==o?void 0:o.promotedLabels)||void 0===i?void 0:i.length)&&(n.promotedLabels=o.promotedLabels.join(",")),n}getContentParamsByText(e){return Object.assign(Object.assign(Object.assign({},this.getContentDefaultParams(e)),{text:e.text}),e.maxItems&&{maxItems:e.maxItems.toString()})}initializeAnalyticsUrlRotator(e){var t;null===(t=this.analyticsUrlRotator)||void 0===t||t.initialize(e)}getAnalyticsEndpoint(){var e,t;return null!==(t=null===(e=this.analyticsUrlRotator)||void 0===e?void 0:e.getNext())&&void 0!==t?t:o.ConfigService.analyticsApiUrl}}t.ApiService=d.getInstance()},3390:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Prom
1ise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorService=void 0;let o=i(4403);class s extends(0,o.Singleton)(){init(){return n(this,void 0,void 0,function*(){})}}t.ErrorService=s.getInstance()},3524:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VideoPlayerStateManager=void 0,t.VideoPlayerStateManager=class{constructor(){this._isMuted=!0,this._isPlaying=!0,this._playerLayoutDisplay="normal"}get isMuted(){return this._isMuted}set isMuted(e){this._isMuted=e}get isPlaying(){return this._isPlaying}set isPlaying(e){this._isPlaying=e}get playerLayout(){return this._playerLayoutDisplay}set playerLayout(e){this._playerLayoutDisplay=e}}},3554:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3574:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(2588),t),o(i(7449),t),o(i(4804),t),o(i(392),t),o(i(7143),t),o(i(2757),t),o(i(9690),t),o(i(5135),t),o(i(3128),t),o(i(9641),t),o(i(78),t),o(i(1353),t),o(i(7787),t),o(i(941),t),o(i(636),t),o(i(8542),t),o(i(8878),t),o(i(8046),t),o(i(4026),t),o(i(8105),t),o(i(3698),t),o(i(3324),t),o(i(8073),t),o(i(2169),t),o(i(4243),t),o(i(5185),t),o(i(8187),t),o(i(9369),t),o(i(7534),t),o(i(3554),t),o(i(9777),t),o(i(8459),t),o(i(9340),t),o(i(7143),t),o(i(2169),t),o(i(3554),t),o(i(7787),t),o(i(9690),t),o(i(4243),t),o(i(2588),t),o(i(3320),t),o(i(4437),t),o(i(2111),t),o(i(9321),t),o(i(4221),t),o(i(4195),t),o(i(7014),t),o(i(4358),t),o(i(5566),t),o(i(9903),t),o(i(3736),t)},3612:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(7315),t)},3634:(e,t)=>{"use strict";function i(e){return Array.isArray(e)&&e.length>0&&e.every(n)}function n(e){return"string"==typeof e&&e.trim().length>0&&!e.includes(" ")}Object.defineProperty(t,"__esModule",{value:!0}),t.isValidIds=i,t.hasValidIds=function(...e){return e.some(e=>void 0!==e&&i(e))}},3698:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlayTypeArray=void 0,t.PlayTypeArray=["Widget","Share","SingleContent","AutoAdvance"]},3736:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},3751:(e,t)=>{"use strict";function i(){return navigator.connection||navigator.mozConnection||navigator.webkitConnection}function n(e){return e<5?"slow":e<15?"medium":"fast"}Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_NETWORK_SPEED=t.NETWORK_CONFIGS=void 0,t.getNavigatorConnection=i,t.getNetworkSpeed=n,t.getPosterLimits=function(){var e,o;let s=i(),a=n(null==s?void 0:s.downlink);return null!==(o=null===(e=t.NETWORK_CONFIGS[a])||void 0===e?void 0:e.posterLimits)&&void 0!==o?o:t.NETWORK_CONFIGS[t.DEFAULT_NETWORK_SPEED].posterLimits},t.getVideoPreloadLimits=function(){var e,o;let s=i(),a=n(null==s?void 0:s.downlink);return null!==(o=null===(e=t.NETWORK_CONFIGS[a])||void 0===e?void 0:e.videoPreloadLimits)&&void 0!==o?o:t.NETWORK_CONFIGS[t.DEFAULT_NETWORK_SPEED].videoPreloadLimits},t.NETWORK_CONFIGS={slow:{posterLimits:{previous:0,next:1},videoPreloadLimits:{next:0}},medium:{posterLimits:{previous:1,next:2},videoPreloadLimits:{next:1}},fast:{posterLimits:{previous:1,next:3},videoPreloadLimits:{next:2}}},t.DEFAULT_NETWORK_SPEED="medium"},3811:function(e,t){"use strict";var i=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Prom
1ise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchWithTimeout=function(e){return i(this,arguments,void 0,function*(e,t=2e3,i={}){let n=new AbortController,o=setTimeout(()=>n.abort(),t);try{return yield fetch(e,Object.assign(Object.assign({},i),{signal:n.signal}))}finally{clearTimeout(o)}})}},3835:(e,t)=>{"use strict";function i(e){return n(e)||Array.isArray(e)&&e.length>0&&e.every(n)||"object"==typeof e&&null!==e&&"BlazeWidgetLabel"===e._type&&"string"==typeof e.value&&e.value.trim().length>0}function n(e){return"string"==typeof e&&e.trim().length>0}Object.defineProperty(t,"__esModule",{value:!0}),t.isValidLabels=i,t.hasValidLabels=function(...e){return e.some(e=>void 0!==e&&i(e))}},3913:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetSDK=void 0;let o=i(9126),s=i(4403),a=i(6450),r=i(9965),l=i(4545),d=i(4403),h=i(4906),u=i(9266),c=i(1908),p=window.innerWidth;class g extends s.BaseWidget{static isSdkConnected(){return g._isSdkConnected}static get observedAttributes(){return["should-allow-horizontal-stories","preferred-language"]}constructor(){super(),this.boundOnResizeEvent=(0,s.debounce)(this.onResize.bind(this),75),this.boundOnResizeEventDelay=this.onResizeEventDelay.bind(this)}connectedCallback(){return n(this,void 0,void 0,function*(){d.TextScaleService.initialize(),window.addEventListener("resize",this.boundOnResizeEvent),window.addEventListener(s.DEVICE_EVENTS.SCREEN_ORIENTATION_CHANGE,this.boundOnResizeEventDelay);let e=this.getConfigAttributes();yield this.initialize(e);let t=new CustomEvent("onBlazeSDKConnect",{bubbles:!0,composed:!0});g._isSdkConnected=!0,this.dispatchEvent(t),this.pushInitEvent(),l.ConfigService.disableAutoLoadingContent||this.handleLoadingContent()})}disconnectedCallback(){window.removeEventListener("resize",this.boundOnResizeEvent),window.removeEventListener(s.DEVICE_EVENTS.SCREEN_ORIENTATION_CHANGE,this.boundOnResizeEventDelay),d.TextScaleService.cleanup()}onResizeEventDelay(){setTimeout(()=>{this.onResize()},500)}onResize(){var e,t,i,n,s,a;p!==window.innerWidth&&(p=window.innerWidth,this.modal&&(null===(e=this.modal)||void 0===e||e.render(),this.modal instanceof o.BlazeWidgetStoryModal&&(null===(i=null===(t=this.modal)||void 0===t?void 0:t.player)||void 0===i||i.render(),null===(a=null===(s=null===(n=this.modal)||void 0===n?void 0:n.player)||void 0===s?void 0:s.contentList)||void 0===a||a.forEach(e=>null==e?void 0:e.render()))))}handleLoadingContent(){let{isStoryMatch:e,storyId:t,storyPageId:i,isMomentMatch:n,momentId:o,isVideoMatch:s,videoId:a}=this.extractContentIdsFromUrl();e&&t?this.handleContentLoad("story","Share",t,{pageId:i}):n&&o?this.handleContentLoad("moment","Share",o):s&&a?this.handleContentLoad("video","Share",a):l.ConfigService.staticContent&&this.handleStaticContentLoad("SingleContent")}extractContentIdsFromUrl(){var e,t,i,n,o,s,a;let r=location.href.match(u.RegexStoryHash),l=location.href.match(u.RegexMomentHash),d=location.href.match(u.RegexVideoHash),h=r&&null!==(t=null===(e=r[1])||void 0===e?void 0:e.split("/"))&&void 0!==t?t:[],c=null!==(i=null==h?void 0:h[2])&&void 0!==i?i:null,p=h.findIndex(e=>"page"===e);return{isStoryMatch:!!r,storyId:c,storyPageId:p>-1&&(null==h?void 0:h[p+1])?h[p+1]:null,isMomentMatch:!!l,momentId:l?null===(o=null===(n=l[1])||void 0===n?void 0:n.split("/"))||void 0===o?void 0:o[2]:null,isVideoMatch:!!d,videoId:d?null===(a=null===(s=d[1])||void 0===s?void 0:s.split("/"))||void 0===a?void 0:a[2]:null}}setPlayerStyleCustomization(e){l.ConfigService.playerStyleCustomization=e}handleContentLoad(e,t,i,o){return n(this,void 0,void 0,function*(){var n,s,a;if((null==document?void 0:document.querySelector("#blaze-standalone-player"))||!(null==i?void 0:i.length))return;let d=i.split(",");if(null===(n=this.modal)||void 0===n||n.remove(),null==d?void 0:d.length){let i;let n={sourceType:"ids",ids:d};switch(e){case"story":i=yield l.StoryService.fetchContent(n);break;case"moment":i=yield l.MomentService.fetchContent(n);break;case"video":i=yield l.VideoService.fetchContent(n)}null==i||i.result.map(e=>{e.type="Content"}),0===(null===(s=null==i?void 0:i.result)||void 0===s?void 0:s.length)?l.EventService.dispatch(this,r.Delegation.onErrorThrown,{id:d[0],errorCode:r.ErrorLoadingCodeMapper[e]}):this.setupModalAndLoadContent(e,t,null===(a=null==i?void 0:i.result)||void 0===a?void 0:a[0],o)}})}handleStaticContentLoad(e){return n(this,void 0,void 0,function*(){let t=yield l.ApiService.getStaticStories();t&&this.setupModalAndLoadContent("story",e,t)})}setupModalAndLoadContent(e,t,i,s){return n(this,void 0,void 0,function*(){var n;let a;switch(e){case"moment":a=h.ThemeFactory.create("default","moment"),this.modal=new o.BlazeWidgetMomentModal(this,a.playerStyle);break;case"video":(a=h.ThemeFactory.create("default","video")).playerStyle.buttons.prev_next.desktop.isVisible=!1,a.playerStyle.buttons.prev_next.mobile.isVisible=!1,a.playerStyle.buttons.prev_next.tablet.isVisible=!1,this.modal=new c.BlazeWidgetVideoModal(this,a.playerStyle);break;default:a=h.ThemeFactory.create("default","story");let r=(0,u.mergeDeep)(a.playerStyle,l.ConfigService.playerStyleCustomization)||a.playerStyle;this.modal=new o.BlazeWidgetStoryModal(this,r)}this.modal.id="blaze-standalone-player",l.VideoPlayerService.playReference=t,this.append(this.modal);let d=new o.BlazeWidgetItem({layout:a.layoutStyle,content:i});if(this.modal instanceof o.BlazeWidgetStoryModal){let e=yield l.StoryService.enrichContent([i]);this.modal.setModalContent(e,0)}else if(this.modal instanceof o.BlazeWidgetMomentModal){let e=yield l.MomentService.enrichContent([i]);this.modal.setModalContent(e,0)}else if(this.modal instanceof c.BlazeWidgetVideoModal){let e=yield l.VideoService.enrichContent([i]);this.modal.setModalContent(e)}let p="story"===e&&!!(null==s?void 0:s.pageId),g="story"===e?i.id:null;this.modal.player.contentList.forEach((e,i)=>{e.startTrigger=t,e.refContentModal=this.modal,e.widgetParentItem=d,e instanceof o.BlazeWidgetStory&&(p&&g===e.data.id?e.setInitialPageById(null==s?void 0:s.pageId):e.resetStoryLocationIndexToLastUnseen()),e instanceof o.BlazeWidgetMoment&&(e.momentIndex=i),e.setWidgetItemParent(d)});let v=this.modal.player.contentList[0];v&&(v instanceof o.BlazeWidgetStory||v instanceof o.BlazeWidgetMoment)&&(yield v.load("direct")),this.modal.seek(null!==(n=i.id)&&void 0!==n?n:""),this.modal.open(),this.modal.onClose=()=>{var e;null===(e=this.modal)||void 0===e||e.remove()}})}attributeChangedCallback(e,t,i){switch(e){case"should-allow-horizontal-stories":t!==i&&(l.ConfigService.shouldAllowHorizontalStories="true"===i,this.modal instanceof o.BlazeWidgetStoryModal&&this.modal.updateModalContent());break;case"preferred-language":if(t!==i){let e=null==i?void 0:i.trim();i&&e&&e.length>0?l.ConfigService.preferredLanguage=e:l.ConfigService.preferredLanguage=void 0}}}getConfigAttributes(){let e=this.getAttribute("api-key"),t=this.getAttribute("environment")||"prod",i=this.getAttribute("send-analytics"),n=this.getAttribute("disable-analytics"),o=this.getAttribute("run-in-shadow-dom"),s=this.getAttribute("preview-url"),a=this.getAttribute("preview-moment-url"),r=this.getAttribute("do-not-track"),l=this.getAttribute("external-user-id"),d=this.getAttribute("geo-location"),h=this.getAttribute("static-content"),u=this.getAttribute("static-content-type"),c=this.getAttribute("modifiy-url-with-story-id"),p=this.getAttribute("modifiy-url-with-content-id"),g=this.getAttribute("should-dismiss-player"),v=this.getAttribute("should-create-user"),y=this.getAttribute("prefetching-policy")||"default",m=this.getAttribute("should-allow-horizontal-stories"),b=this.getAttribute("should-auto-advance"),f=this.getAttribute("auto-advance-url"),S=this.getAttribute("layout-direction"),E=this.getAttribute("should-allow-closed-captions"),C=this.getAttribute("disable-auto-loading-content"),T=this.getAttribute("preferred-language");if(!e&&!s&&!a)throw Error("Please provide API Key");return{apiKey:e,environment:t,sendAnalytics:i,disableAnalytics:n,previewMomentUrl:a,previewUrl:s,doNotTrack:r,externalUserId:l,geoLocation:d,staticContent:h,staticContentType:u,runInShadowDom:o,shouldModifyUrlWithStoryId:c,shouldModifyUrlWithContentId:p,shouldDismissPlayer:g,shouldCreateUser:v,prefetchingPolicy:y,shouldAllowHorizontalStories:m,shouldAutoAdvance:b,autoAdvanceUrl:f,layoutDirection:S,shouldAllowClosedCaptions:E,disableAutoLoadingContent:C,preferredLanguage:T}}initialize(e){return n(this,void 0,void 0,function*(){yield l.StartupService.init(e),yield this.injectFontResource(),yield this.injectGoogleTag(
1),yield this.injectIma()})}injectToHead(e,t){return n(this,void 0,void 0,function*(){document.querySelectorAll(e).length||(yield new Promise((e,i)=>{t.addEventListener("load",()=>{e()}),t.addEventListener("error",()=>{i("Failed to load element: "+t.outerHTML)}),document.head.append(t)}))})}injectFontResource(){return n(this,void 0,void 0,function*(){let e=l.ConfigService.sdkStorageCDN+"/web-sdk/assets/fonts.css",t=document.createElement("link");t.setAttribute("rel","preload"),t.setAttribute("href",e),t.setAttribute("as","style"),t.setAttribute("onload","this.onload=null;this.rel='stylesheet'"),yield this.injectToHead('[href*="'+e+'"]',t);let i=document.createElement("link");i.setAttribute("rel","stylesheet"),i.setAttribute("href","https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"),yield this.injectToHead('[href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap"]',i)})}injectGoogleTag(){return n(this,void 0,void 0,function*(){if(!l.AdService.canRunAds)return;let e=document.createElement("script");e.setAttribute("src","https://securepubads.g.doubleclick.net/tag/js/gpt.js"),e.setAttribute("async",""),this.injectToHead('[src*="securepubads.g.doubleclick.net/tag/js/gpt.js"]',e)})}injectIma(){return n(this,void 0,void 0,function*(){if(!l.AdService.canRunAds)return;let e=document.createElement("script");e.setAttribute("src","//imasdk.googleapis.com/js/sdkloader/ima3.js"),e.setAttribute("async",""),this.injectToHead('[src*="imasdk.googleapis.com/js/sdkloader/ima3.js"]',e)})}pushInitEvent(){let e=new s.ReferringEventInfo;document.referrer&&(e.referrer_page_url=document.referrer),l.AnalyticsService.pushWidgetEvent(a.WidgetAction.SDKInit,{},void 0,e)}}t.BlazeWidgetSDK=g,g._isSdkConnected=!1},3972:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlRotator=void 0,t.UrlRotator=class{constructor(e){this.baseUrls=[],this.currentIndex=0,this.protocol="https://",this.fallbackUrl=e.fallbackUrl,this.apiVersion=e.apiVersion||""}initialize(e){this.baseUrls=this.parseBaseUrls(null==e?void 0:e.hosts),this.currentIndex=this.baseUrls.length>0?Math.floor(Math.random()*this.baseUrls.length):0}getNext(){if(0===this.baseUrls.length)return this.fallbackUrl;let e=this.baseUrls[this.currentIndex];return this.currentIndex=(this.currentIndex+1)%this.baseUrls.length,this.apiVersion?e+"/"+this.apiVersion:e}parseBaseUrls(e){if(!(null==e?void 0:e.length))return[];let t=[];for(let i of e){let e=i.trim();if(!e)continue;let n=e.replace(/\/$/,"");t.push(this.protocol+n)}return t}}},4014:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeVideoNavigationOverlay=t.NAVIGATION_OVERLAY_ATTRIBUTES=void 0;let n=i(1908),o=i(4403),s=i(5785),a=i(8921),r=i(9266);t.NAVIGATION_OVERLAY_ATTRIBUTES={Hidden:"hidden",Layout:"layout",HasPrev:"has-prev",HasNext:"has-next"};class l extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"open"}),this.nextButton=a.WidgetsFactory.create("blaze-button"),this.prevButton=a.WidgetsFactory.create("blaze-button"),this.playPauseButton=a.WidgetsFactory.create("blaze-button"),this.replayButton=a.WidgetsFactory.create("blaze-button"),this.isPlaying=!1,this.boundOnPrevClick=this.onPrevClick.bind(this),this.boundOnNextClick=this.onNextClick.bind(this),this.boundOnPlayStopClick=this.onPlayStopClick.bind(this),this.boundOnReplayClick=this.onReplayClick.bind(this),this.boundOnPlay=this.setPlaying.bind(this,!0),this.loader=a.WidgetsFactory.create("blaze-loader")}static get observedAttributes(){return Object.values(t.NAVIGATION_OVERLAY_ATTRIBUTES)}attributeChangedCallback(e,t,i){t!==i&&this.applyAttribute(e,i)}applyAttribute(e,i){switch(e){case t.NAVIGATION_OVERLAY_ATTRIBUTES.Hidden:"true"===i?this.hideOverlay():this.showOverlay();break;case t.NAVIGATION_OVERLAY_ATTRIBUTES.HasPrev:this.setButtonDisabled(this.prevButton,"true"!==i?"true":"false");break;case t.NAVIGATION_OVERLAY_ATTRIBUTES.HasNext:this.setButtonDisabled(this.nextButton,"true"!==i?"true":"false")}}connectedCallback(){this.initializeStyles(),this.setStyle(),this.createDom(),this.attachEventListeners()}disconnectedCallback(){this.removeEventListeners()}initializeStyles(){let e=document.createElement("style");e.textContent="\n :host {\n z-index: 5;\n display: flex;\n align-items: center;\n pointer-events: auto;\n opacity: 1;\n transition: opacity 0.3s ease, visibility 0.3s ease;\n }\n\n :host(.hidden) {\n opacity: 0;\n display: none;\n }\n\n .middle-container {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n blaze-button {\n border: none;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n\n blaze-loader {\n display: none;\n }\n ",this.shadow.appendChild(e)}setStyle(){switch(this.platform){case"mobile":case"tablet":(0,r.mergeStyles)(this,{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",gap:"20px"});break;
1case"desktop":(0,r.mergeStyles)(this,{position:"relative",gap:"5px"})}}setTheme(e){this.navigationStyle=e}get platform(){return this._platform||(this._platform=this.getAttribute("layout")),this._platform}set platform(e){this._platform=e,this.setAttribute("layout",e)}setButtonStyle(e,t,i){var n,a,r,l;e.setAttribute(s.BUTTON_ATTRIBUTES.Width,t.width),e.setAttribute(s.BUTTON_ATTRIBUTES.Height,t.height),e.setIconUrl(i),o.deviceDetector.isDesktop&&e.setAttribute(s.BUTTON_ATTRIBUTES.ButtonDesktopAnimation,"true"),e.setStyle({padding:null!==(n=t.padding)&&void 0!==n?n:null,color:null!==(a=t.color)&&void 0!==a?a:null,borderRadius:null!==(r=t.borderRadius)&&void 0!==r?r:null,backgroundColor:null!==(l=t.backgroundColor)&&void 0!==l?l:null})}createDom(){if(!this.navigationStyle)return;this.setButtonStyle(this.prevButton,this.navigationStyle.prev_next[this.platform],this.navigationStyle.navigation.prevVideo),this.setButtonStyle(this.nextButton,this.navigationStyle.prev_next[this.platform],this.navigationStyle.navigation.nextVideo),this.setButtonStyle(this.playPauseButton,this.navigationStyle.play_pause[this.platform],this.navigationStyle.play),this.setButtonStyle(this.replayButton,this.navigationStyle.replay[this.platform],this.navigationStyle.replayIcon),this.playPauseButton.setDataTestId("play-pause-button"),this.prevButton.setDataTestId("prev-button"),this.nextButton.setDataTestId("next-button");let e=a.WidgetsFactory.create("blaze-div");e.id="middle-container-play-pause",e.classList.add("middle-container"),e.appendChild(this.playPauseButton);let t=this.navigationStyle.prev_next[this.platform].isVisible;if(t&&this.shadow.appendChild(this.prevButton),this.shadow.appendChild(e),t&&this.shadow.appendChild(this.nextButton),this.loader.setAttribute("color","#FFD325"),["mobile","tablet"].includes(this.platform)){let t=e.getBoundingClientRect().width;e.style.width=t+"px"}}attachEventListeners(){this.prevButton.addEventListener(n.EVENTS.CLICK,this.boundOnPrevClick),this.nextButton.addEventListener(n.EVENTS.CLICK,this.boundOnNextClick),this.playPauseButton.addEventListener(n.EVENTS.CLICK,this.boundOnPlayStopClick),this.replayButton.addEventListener(n.EVENTS.CLICK,this.boundOnReplayClick),document.addEventListener(n.VIDEO_EVENTS.PLAY,this.boundOnPlay)}removeEventListeners(){this.prevButton.removeEventListener(n.EVENTS.CLICK,this.boundOnPrevClick),this.nextButton.removeEventListener(n.EVENTS.CLICK,this.boundOnNextClick),this.playPauseButton.removeEventListener(n.EVENTS.CLICK,this.boundOnPlayStopClick),document.removeEventListener(n.VIDEO_EVENTS.PLAY,this.boundOnPlay)}setButtonDisabled(e,t){e.setAttribute(s.BUTTON_ATTRIBUTES.Disabled,t)}onPrevClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent(n.VIDEO_EVENTS.NAVIGATION_PREV,{bubbles:!0,composed:!0}))}onNextClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent(n.VIDEO_EVENTS.NAVIGATION_NEXT,{bubbles:!0,composed:!0}))}onPlayStopClick(e){e.stopPropagation(),this.setPlaying(!this.isPlaying);let t=this.isPlaying?n.VIDEO_EVENTS.PLAY:n.VIDEO_EVENTS.PAUSE;this.dispatchEvent(new CustomEvent(t,{bubbles:!0,composed:!0}))}onReplayClick(e){e.stopPropagation(),this.setPlaying(!0),this.dispatchEvent(new CustomEvent(n.VIDEO_EVENTS.REPLAY,{bubbles:!0,composed:!0}))}setPlaying(e){if(this.isPlaying=e,!this.navigationStyle)return;let{play:t,pause:i}=this.navigationStyle;this.playPauseButton.setIconUrlAnimation(e?i:t)}showReplayButton(){this.replayButton.isConnected||(this.playPauseButton.animate([{opacity:1},{opacity:0}],{duration:75,easing:"ease-out",fill:"forwards"}),this.playPauseButton.replaceWith(this.replayButton),this.replayButton.animate([{opacity:0},{opacity:1}],{duration:75,easing:"ease-in",fill:"forwards"}))}hideReplayButton(){this.replayButton.isConnected&&(this.replayButton.animate([{opacity:1},{opacity:0}],{duration:75,easing:"ease-out",fill:"forwards"}),this.replayButton.replaceWith(this.playPauseButton),this.playPauseButton.animate([{opacity:0},{opacity:1}],{duration:75,easing:"ease-in",fill:"forwards"}))}showLoader(){this.playPauseButton.replaceWith(this.loader),this.loader.style.display="block"}hideLoader(){this.loader.replaceWith(this.playPauseButton),this.loader.style.display="none"}hideOverlay(){this.classList.add("hidden")}showOverlay(){this.classList.remove("hidden")}}t.BlazeVideoNavigationOverlay=l},4026:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0})},4047:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventsListener=void 0,t.EventsListener=class{constructor(){this.listeners=[]}add(e,t,i){this.listeners.find(t=>t.node==document&&t.type==e)||(this.listeners.push({node:document,type:e,callback:t}),document.addEventListener(e,t,i))}addAttached(e,t,i,n){this.listeners.find(i=>i.node==e&&i.type==t)||(this.listeners.push({node:e,type:t,callback:i}),e.addEventListener(t,i,n))}removeAll(){for(let e of this.listeners)try{e.node.removeEventListener(e.type,e.callback)}catch(e){}this.listeners=[]}}},4071:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.LikeService=void 0;let o=i(4545),s=i(4403);class a extends(0,s.Singleton)(){constructor(){super()}init(){return n(this,void 0,void 0,function*(){})}updateMomentLike(e,t){return n(this,void 0,void 0,function*(){try{yield o.DatabaseService.updateMomentLike(t,e),yield o.ApiService.updateMomentLikeStatus({momentId:t,setLiked:e})}catch(e){}})}isMomentLiked(e){return n(this,void 0,void 0,function*(){try{let t=yield o.DatabaseService.getMomentLike(e);return!(!t||!t.data)&&t.data.liked}catch(e){return!1}})}updateVideoLike(e,t){return n(this,void 0,void 0,function*(){try{yield o.DatabaseService.updateVideoData(t,{liked:e}),yield o.ApiService.updateVideosLikeStatus({videoId:t,setLiked:e})}catch(e){}})}isVideoLiked(e){return n(this,void 0,void 0,function*(){try{let t=yield o.DatabaseService.getVideoLike(e);return!(!t||!t.data)&&t.data.liked}catch(e){return!1}})}}t.LikeService=a.getInstance()},4131:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__rest||function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)0>t.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(i[n[o]]=e[n[o]])}return i};Object.defineProperty(t,"__esModule",{value:!0}),t.API=void 0;let s=i(9965),a=i(4545);t.API=class{constructor(e){this.options=e}get baseUrl(){return this.options.baseUrl}get(e,t){let i=null!=t?t:{},{init:n}=i,s=o(i,["init"]);return this.request(e,Object.assign({init:Object.assign(Object.assign({},n),{method:"GET"})},s))}post(e,t){let i=null!=t?t:{},{init:n}=i,s=o(i,["init"]);return this.request(e,Object.assign({init:Object.assign(Object.assign({},n),{method:"POST"})},s))}put(e,t){let i=null!=t?t:{},{init:n}=i,s=o(i,["init"]);return this.request(e,Object.assign({init:Object.assign(Object.assign({},n),{method:"PUT"})},s))}request(e,t){return n(this,void 0,void 0,function*(){var i,n,r;let l=null!==(i=null==t?void 0:t.init)&&void 0!==i?i:{},{headers:d}=l,h=o(l,["headers"]),u=Object.assign({headers:Object.assign(Object.assign(Object.assign({},(null==t?void 0:t.auth)&&{Authorization:"Bearer "+(null===(n=a.UserService.getUserTokenDataFromStorage())||void 0===n?void 0:n.accessToken)}),{"Content-Type":"application/json",Accept:"application/json"}),d)},h);try{let i;if((null==t?void 0:t.baseUrl)?i=new URL(t.baseUrl):(i=new URL(this.baseUrl+"/"+e)).searchParams.set("ApiKey",a.ConfigService.apiKey),null==t?void 0:t.urlSearchParams){let e=Object.entries(t.urlSearchParams).reduce((e,[t,i])=>(null!=i&&(e[t]=i),e),{});for(let[t,n]of Object.entries(e))i.searchParams.set(t,n)}let n,o=yield fetch(i,u);return a.ConfigService.shouldCreateUser&&o.status===s.HttpStatus.Unauthorized&&(null==t?void 0:t.auth)&&(yield a.UserService.refreshUserToken(),u.headers.Authorization="Bearer "+(null===(r=a.UserService.getUserTokenDataFromStorage())||void 0===r?void 0:r.accessToken),o=yield fetch(i,u)),o.ok&&(n=yield o.json()),{data:n,httpStatus:o.ok?s.HttpStatus.Ok:o.status}}catch(e){return a.CDNDetermineService.reset(),{error:e}}})}}},4180:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.Z_INDEX=t.MIN_PADDING_BOTTOM=t.DEFAULT_CTA_HEIGHT=void 0,t.DEFAULT_CTA_HEIGHT=40,t.MIN_PADDING_BOTTOM=10,t.Z_INDEX={base:"0",player:"1",interaction:"2",onTopOfPlayer:"3",menuBackdrop:"99",menu:"100"}},4195:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4205:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getChipSize=a,t.createChip=r,t.getMaxChipSize=l,t.calculateChipSize=function(e,t,i){let{isOutside:o}=(0,n.calculatePosition)(t),s=0,a=0;if(("chip"===e?i.statusLiveStyle.isVisible||i.statusLiveUnreadStyle.isVisible||i.statusUnreadStyle.isVisible||i.statusReadStyle.isVisible:i.badgeIndicatorStyle.isVisible)&&o){let n=l(e,i);"outsideTop"!==t&&"outsideBottom"!==t||(s=Math.floor(n.height)),"outsideLeft"!==t&&"outsideRight"!==t||(a=Math.floor(n.width))}return{chipHeight:s,chipWidth:a}};let n=i(9266),o=i(8921),s=i(4403);function a(e){let{statusLiveStyle:t,statusLiveUnreadStyle:i,statusReadStyle:n,statusUnreadStyle:o}=e,s=r(t),a=r(i),l=r(n),d=r(o);return new DOMRect(0,0,Math.max(s.width,a.width,l.width,d.width),Math.max(s.height,a.height,l.height,d.height))}function r(e){let t=o.WidgetsFactory.create("blaze-chip");document.body.append(t),t.style.opacity="0",t.innerText=e.text,t.style.fontSize=s.TextScaleService.scaleFontSize(e.textSize),t.style.fontFamily=e.font,t.style.backgroundColor=e.backgroundColor,t.style.backgroundImage=e.backgroundImage,t.style.borderColor=e.borderColor,t.style.borderWidth=e.borderWidth+"px",t.style.borderRadius=e.borderRadius,t.style.color=e.textColor,t.style.letterSpacing=e.letterSpacing,t.style.padding=e.padding,e.width&&e.height&&(t.style.width=e.width+"px",t.style.height=e.height+"px");let i=t.getBoundingClientRect();return t.remove(),i}function l(e,t){if("chip"===e){let{statusLiveStyle:e,statusLiveUnreadStyle:i,statusReadStyle:n,statusUnreadStyle:o}=t;return a({statusLiveStyle:e,statusLiveUnreadStyle:i,statusReadStyle:n,statusUnreadStyle:o})}return r(t.badgeIndicatorStyle)}},4221:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4243:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4248:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetMomentPlayer=t.UPDATE_NAVIGATION_BUTTONS_EVENT=t.MUTE_UNMUTE_EVENT=void 0;let s=o(i(2776)),a=i(9126),r=i(4403),l=i(7951),d=i(6450),h=i(4545),u=i(4906);t.MUTE_UNMUTE_EVENT="muteButtonClicked",t.UPDATE_NAVIGATION_BUTTONS_EVENT="updateNavigationButtons";class c extends a.WidgetAbstractPlayer{constructor(){super(),this.isWheelEventHandling=!1,this.boundHandleMuteClicked=this.handleMuteClicked.bind(this),this.fetchedPosterUrls=new Set,this.preloadTimer=null,this.accessibilityConfigTimeout=null,this.focusTimeout=null,this.numberOfContentInList=5,this.playerFullscreenOverlay.setStyle({backgroundColor:"#010101"})}get currentMoment(){return this.playerContentList[this.index]}connectedCallback(){this.append(this.srcBackground),this.append(this.destBackground),this.append(this.container),this.applyStyles(),this.setupContainer(),this.setupEventListeners()}disconnectedCallback(){this.listeners.removeAll(),this.fetchedPosterUrls.clear(),this.preloadTimer&&clearTimeout(this.preloadTimer),this.cancelAccessibilityConfig(),this.cancelFocus(),document.removeEventListener(t.MUTE_UNMUTE_EVENT,this.boundHandleMuteClicked)}setupEventListeners(){this.setupHammer(Hammer.DIRECTION_VERTICAL),this.listeners.add("wheel",(0,r.debounce)(this.handleWheel.bind(this),0)),this.listeners.add("keydown",(0,r.debounce)(this.handleNavigationKeyPress.bind(this),0)),document.addEventListener(t.MUTE_UNMUTE_EVENT,this.boundHandleMuteClicked)}setupContainer(){this.container.setStyle({display:"grid",overflow:"hidden",position:"relative",gridTemplateColumns:"100%"}),this.adjustContainerStyle(),this.adjustPlayerContentStyle()}updateNavigationButtons(){let e=this.isContentDirectionInPlayerListValid("PREV"),i=this.isContentDirectionInPlayerListValid("NEXT");this.dispatchEvent(new CustomEvent(t.UPDATE_NAVIGATION_BUTTONS_EVENT,{bubbles:!0,detail:{nextContentButton:i,prevContentButton:e}}))}adjustContainerStyle(){let e=this.getBoundingClientRect().height,t,i,n=40,o=.004;"mobile"===r.deviceDetector.platform?(this.style.background=u.Colors.Black,o=1-2*o,n=0,t=0,i=e):(t=e*o+n/2,i=e*(1-2*o)-2*n);let s="repeat(10, "+i+"px)";this.container.setStyle({gap:n+"px",marginTop:t+"px",gridTemplateRows:s})}adjustPlayerContentStyle(){"mobile"===r.deviceDetector.platform&&this.playerContentList.forEach(e
1=>{e.style.width=this.clientWidth+"px"})}applyStyles(){this.setStyle({display:"block",overflow:"hidden",height:"100%",width:"100%",position:"relative",background:u.Colors.Black})}attributeChangedCallback(e,t,i){}handleMoveSwipe(e){var t,i,n,o;if(!h.VideoPlayerService.isSeekBarDragging&&this.playerContentList.findIndex(e=>{var t;return e.id===(null===(t=this.playerContentList[this.index])||void 0===t?void 0:t.id)})>-1){let s=e.distance/((null==window?void 0:window.screen.height)/.85)*1e3;switch(e.offsetDirection){case Hammer.DIRECTION_UP:null===(t=this.currentNextAnimation)||void 0===t||t.seek(s);break;case Hammer.DIRECTION_DOWN:null===(i=this.currentPrevAnimation)||void 0===i||i.seek(s);break;default:null===(n=this.currentNextAnimation)||void 0===n||n.seek(0),null===(o=this.currentPrevAnimation)||void 0===o||o.seek(0)}}}handleEndSwipe(e){let t=this.playerContentList[this.index+1],i=this.playerContentList[this.index-1];switch(e.offsetDirection){case Hammer.DIRECTION_UP:if(!t)return;this.playerContentList[this.index].exitTrigger="Swipe",this.processAnimation(e,t,this.currentNextAnimation),r.URLManager.updateLocationContentHash({contentType:"moment",contentId:null==t?void 0:t.data.id,isAd:null==t?void 0:t.data.isAd});break;case Hammer.DIRECTION_DOWN:if(!i)return;this.playerContentList[this.index].exitTrigger="Swipe",this.processAnimation(e,i,this.currentPrevAnimation),r.URLManager.updateLocationContentHash({contentType:"moment",contentId:null==i?void 0:i.data.id,isAd:null==i?void 0:i.data.isAd});break;default:this.reverseAnimation(e)}}handlePrevDirection(){if(Math.floor(this.numberOfContentInList/2-1)===this.index){let e=this.playerContentList[0].data.id,t=this.contentList.findIndex(t=>t.data.id===e),i=this.contentList[t-1];if(!i)return;let n=this.playerContentList[this.playerContentList.length-1];this.releaseMomentFromMemory(n),i instanceof a.BlazeWidgetMoment&&this.updateItemData(n,i),this.container.insertBefore(n,this.container.firstChild),this.playerContentList.pop(),this.playerContentList.unshift(n),this.index+=1}}handleNextDirection(){if(Math.floor(this.numberOfContentInList/2+1)===this.index){let e=this.playerContentList[this.playerContentList.length-1].data.id,t=this.contentList.findIndex(t=>t.data.id===e),i=this.contentList[t+1];if(!i)return;let n=this.playerContentList[0];this.releaseMomentFromMemory(n),i instanceof a.BlazeWidgetMoment&&this.updateItemData(n,i),this.container.insertBefore(n,null),this.playerContentList.shift(),this.playerContentList.push(n),this.index-=1}}releaseMomentFromMemory(e){let t=e.video;t instanceof a.BlazeWidgetVideo&&t.resetVideoState()}updateItemData(e,t){var i,n;t.actionHandlers&&(e.actionHandlers=t.actionHandlers),e.refContentModal=t.refContentModal,e.playerStyle=t.playerStyle,e.updateData({data:t.data,shouldShowImaAdOnStart:t.shouldShowImaAdOnStart,adInfo:t.adInfo,contentExtraInfo:t.contentExtraInfo,momentIndex:t.momentIndex});let o=null===(i=e.refContentModal)||void 0===i?void 0:i.parentWidget;if(o instanceof a.BlazeWidgetLayout){let i=null===(n=o.widgetItems)||void 0===n?void 0:n.find(e=>e.content.id===t.data.id);i&&e.setWidgetItemParent(i)}}createAnimation(e,t,i){var n,o;return s.default.timeline({complete:()=>{var n,o,s;null===(n=e.video)||void 0===n||n.endExit(),null===(s=null===(o=this.playerContentList[i])||void 0===o?void 0:o.video)||void 0===s||s.startEnter(),this.handleAnimationCompletion(e,t)},changeBegin:()=>{this.handleAnimationStart(e,t)},easing:"easeInOutQuad",autoplay:!1}).add({targets:[this.container],keyframes:[{translateY:-this.playerContentList[this.index].offsetTop,duration:0},{translateY:-(null!==(o=null===(n=this.playerContentList[i])||void 0===n?void 0:n.offsetTop)&&void 0!==o?o:this.playerContentList[this.index].offsetTop)}]})}handleAnimationStart(e,t){var i,n,o,s,a;this.cancelFocus(),(null===(i=e.shareModal)||void 0===i?void 0:i.isOpen)&&(null===(n=e.shareModal)||void 0===n||n.close()),(null===(o=e.closedCaptionsModal)||void 0===o?void 0:o.isOpen)&&(null===(s=e.closedCaptionsModal)||void 0===s||s.close()),null===(a=this.onContentChange)||void 0===a||a.call(this,t)}calculateTruePosition(e){let t=this.contentList.findIndex(t=>t.data.id===e.data.id);return t>=0?t+1:this.index+1}handleAnimationCompletion(e,t){return n(this,void 0,void 0,function*(){var i,n,o,s,a;e.navigationType="Manual",e.navigationDirection="NEXT"===t?"Forwards":"Backwards",e.isActive=!1,e.pause(),this.index+="NEXT"===t?1:-1,this.scheduleAccessibilityConfig(),e.event(d.MomentAction.MomentExit,{}),(null===(n=null===(i=this.currentMoment)||void 0===i?void 0:i.data)||void 0===n?void 0:n.id)&&l.contentAccessibilityManager.updateButtonLabels(this.currentMoment.data.id,{isPlaying:!(null===(o=this.currentMoment.video)||void 0===o?void 0:o.paused),isMuted:null===(s=this.currentMoment.video)||void 0===s?void 0:s.muted,isLiked:this.currentMoment.isLiked});let r=this.playerContentList[this.index];r&&l.contentAccessibilityManager.announceNavigation(this.calculateTruePosition(r),this.contentList.length,"moment-list",null===(a=r.data)||void 0===a?void 0:a.title,{trigger:"navigation",navigationType:r.navigationType||"",previousPosition:this.calculateTruePosition(this.playerContentList[0===this.index?0:this.index-1])}),yield this.handleAnimationEnd(t),this.preloadAdjacentPosters(),this.preloadAdjacentVideos()})}loadAndPlayContent(){return n(this,void 0,void 0,function*(){this.isNavigationBlocked=!0,h.VideoPlayerService.isPlaying=!0;let e=this.playerContentList[this.index];e&&(yield e.load("direct"),yield e.play(),this.playerContentList.forEach(t=>{var i;t.data.id!==e.data.id&&(t.isActive=!1,null===(i=t.seekBar)||void 0===i||i.setAttribute("is-active","false"),t.removeResumeButtonFromScreen())}),e.isActive=!0,this.isNavigationBlocked=!1,h.VideoPlayerService.isNavigating=!1,h.VideoPlayerService.isPlaying=!0),this.configurePlayerContentAccessibility()})}setContent(e){for(let e of this.playerContentList)e.remove();this.playerContentList=[],this.contentList=[...e],this.container.style.transform="translateY(0px)"}appendToContentList(e){if(this.contentList.push(...e),this.playerContentList.length>=this.numberOfContentInList){let t=Math.min(Math.floor(this.numberOfContentInList/2),e.length);for(let e=0;e<t;e++)if(Math.floor(this.numberOfContentInList/2)<this.index){let e=this.playerContentList[this.playerContentList.length-1].data.id,t=this.contentList.findIndex(t=>t.data.id===e),i=this.contentList[t+1];if(!i)break;let n=this.playerContentList[0];this.releaseMomentFromMemory(n),i instanceof a.BlazeWidgetMoment&&this.updateItemData(n,i),this.container.insertBefore(n,null),this.playerContentList.shift(),this.playerContentList.push(n),this.index-=1;let o=this.playerContentList[this.index].offsetTop;this.container.style.transform="translateY(-"+o+"px)"}}else{let t=Math.min(this.numberOfContentInList-this.playerContentList.length,e.length);for(let i=0;i<t;i++){let t=e[i],n=this.cloneMoment(t);this.playerContentList.push(n),this.container.append(n)}this.adjustPlayerContentStyle()}this.updateNavigationButtons(),this.preloadAdjacentPosters(),this.preloadAdjacentVideos()}preloadAdjacentVideos(){this.preloadTimer&&clearTimeout(this.preloadTimer),this.preloadTimer=setTimeout(()=>n(this,void 0,void 0,function*(){let e=this.playerContentList[this.index+1];e&&(yield e.load("direct"))}),1e3)}
1preloadAdjacentPosters(){this.playerContentList.forEach(e=>{var t;return null===(t=e.video)||void 0===t?void 0:t.loadPoster()});let{previous:e,next:t}=(0,d.getPosterLimits)();if(0===e&&0===t)return;let i=this.getCurrentContentIndex();-1!==i&&[...this.getIndicesRange(i-e,i-1),...this.getIndicesRange(i+1,i+t)].forEach(e=>this.fetchPosterAtIndex(e))}getCurrentContentIndex(){return this.contentList.findIndex(e=>e.data.id===this.playerContentList[this.index].data.id)}getIndicesRange(e,t){return Array.from({length:Math.max(0,t-e+1)},(t,i)=>e+i).filter(e=>e>=0&&e<this.contentList.length)}fetchPosterAtIndex(e){return n(this,void 0,void 0,function*(){var t,i,n,o;let s=null===(o=null===(n=null===(i=null===(t=this.contentList[e])||void 0===t?void 0:t.data)||void 0===i?void 0:i.poster)||void 0===n?void 0:n.rendition)||void 0===o?void 0:o.url;if(s&&!this.fetchedPosterUrls.has(s)){this.fetchedPosterUrls.add(s);try{yield fetch(s,{priority:"high",cache:"force-cache"})}catch(e){}}})}play(){let e=this.playerContentList[this.index];e.event(d.MomentAction.MomentsPlaylistStart,{}),e.play(),r.URLManager.updateLocationContentHash({contentType:"moment",contentId:e.data.id,isAd:e.data.isAd}),this.updateNavigationButtons(),this.preloadAdjacentVideos()}pause(){this.playerContentList[this.index].pause()}onAnimationEnd(){}handleWheel(e){var t;if(15>=Math.abs(e.deltaY)||this.isNavigationBlocked||this.isWheelEventHandling||(null===(t=this.currentMoment.video)||void 0===t?void 0:t.isCurrentlyTryingToRunImaAd))return;this.isWheelEventHandling=!0;let i=e.deltaY>0?"NEXT":"PREV";this.isContentDirectionInPlayerListValid(i)?(this.cancelAccessibilityConfig(),this.isNavigationBlocked=!0,this.changeContent(i),setTimeout(()=>{this.isWheelEventHandling=!1},d.ONE_SECOND)):this.isWheelEventHandling=!1}handleNavigationKeyPress(e){var t;if(this.isNavigationBlocked||(null===(t=this.currentMoment.video)||void 0===t?void 0:t.isCurrentlyTryingToRunImaAd))return;let i=null;switch(e.code){case"ArrowUp":case"Up":case"PageUp":i="PREV";break;case"ArrowDown":case"Down":case"PageDown":i="NEXT";break;case"Space":return void this.currentMoment.handlePlayPauseButtonClick()}this.isContentDirectionInPlayerListValid(i)&&i&&(this.cancelAccessibilityConfig(),this.changeContent(i))}changeContent(e){this.isNavigationBlocked=!0,h.VideoPlayerService.isNavigating=!0;let t=this.animateContent(e);t&&(t.play(),t.finished.then(()=>{var e;this.updateNavigationButtons(),r.URLManager.updateLocationContentHash({contentType:"moment",contentId:null===(e=this.playerContentList[this.index])||void 0===e?void 0:e.data.id,isAd:this.playerContentList[this.index].data.isAd})}))}handleMuteClicked(){this.playerContentList.forEach(e=>e.updatePlayerButtonIcons()),this.playerContentList.forEach(e=>e.onMuteUnmuteChange())}loadContentBatch(){}resetStyles(){}render(){this.adjustContainerStyle(),this.adjustPlayerContentStyle()}configurePlayerContentAccessibility(){this.playerContentList.forEach((e,t)=>{e instanceof a.BlazeWidgetMoment&&(t===this.index?this.setCurrentMomentAccessibility(e,t):this.setInactiveMomentAccessibility(e))})}setCurrentMomentAccessibility(e,t){var i;e.setAttribute("tabindex",d.ACCESSIBILITY_ATTRIBUTES.ACTIVE_TABINDEX),e.setAttribute("aria-hidden",d.ACCESSIBILITY_ATTRIBUTES.ARIA_HIDDEN_FALSE),e.setAttribute("role",d.ACCESSIBILITY_ATTRIBUTES.REGION_ROLE),e.setAttribute("aria-label","Moment content");let n=((null===(i=e.data)||void 0===i?void 0:i.title)||"Moment "+(t+1))+", moment "+this.calculateTruePosition(e)+" of "+this.contentList.length;e.setAttribute("aria-label",n),e.enableAllButtons(),this.scheduleFocus(e),setTimeout(()=>{e.setAttribute("aria-label","")},d.ACCESSIBILITY_TIMING.LABEL_CLEAR_DELAY)}setInactiveMomentAccessibility(e){document.activeElement===e&&e.blur(),e.setAttribute("tabindex",d.ACCESSIBILITY_ATTRIBUTES.INACTIVE_TABINDEX),e.setAttribute("aria-hidden",d.ACCESSIBILITY_ATTRIBUTES.ARIA_HIDDEN_TRUE),e.disableAllButtons()}scheduleAccessibilityConfig(){this.cancelAccessibilityConfig(),this.accessibilityConfigTimeout=setTimeout(()=>{var e,t;this.configurePlayerContentAccessibility();let i=this.playerContentList[this.index];null===(t=null===(e=null==i?void 0:i.refContentModal)||void 0===e?void 0:e.updateContentAriaLabelForNavigation)||void 0===t||t.call(e),this.accessibilityConfigTimeout=null},d.ACCESSIBILITY_TIMING.CONFIG_SCHEDULE_DELAY)}cancelAccessibilityConfig(){this.accessibilityConfigTimeout&&(clearTimeout(this.accessibilityConfigTimeout),this.accessibilityConfigTimeout=null)}scheduleFocus(e){this.cancelFocus(),this.focusTimeout=setTimeout(()=>{e.focus(),this.focusTimeout=null},d.ACCESSIBILITY_TIMING.FOCUS_DELAY)}cancelFocus(){this.focusTimeout&&(clearTimeout(this.focusTimeout),this.focusTimeout=null)}}t.BlazeWidgetMomentPlayer=c},4314:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeCtaButton=void 0;let n=i(4403),o=i(6450),s=i(8921),a=i(277),r=i(4906),l=i(3574),d=i(9266);class h extends n.BaseWidget{constructor(){super(),this.isButtonCreated=!1,this.animationTimeouts=[],this.setAttribute("data-testid","cta-button"),this.anchorButtonElement=document.createElement("a"),this.iconButtonElement=s.WidgetsFactory.create("blaze-button"),this.iconArrowElement=s.WidgetsFactory.create("blaze-button"),this.ctaTextElement=s.WidgetsFactory.create("blaze-div"),(0,d.mergeStyles)(this,{display:"none",width:"100%",cursor:"pointer",outline:"inherit",pointerEvents:"all"}),this.anchorButtonElement.style.position="relative",this.anchorButtonElement.style["-webkit-touch-callout"]="none",this.anchorButtonElement.style["-webkit-user-select"]="none",this.anchorButtonElement.setAttribute("target","_blank"),this.setAnchorButtonStyles({width:"100%",height:"100%",textDecoration:"none",outline:"1px solid",outlineColor:r.Colors.White,fontWeight:"700",fontSize:"16px",borderRadius:"8px",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"}),this.iconButtonElement.setAttribute("width","24px"),this.iconButtonElement.setAttribute("height","24px"),this.iconButtonElement.setStyle({display:"none",alignSelf:"flex-start"}),this.iconArrowElement.setAttribute("width","26px"),this.iconArrowElement.setAttribute("height","26px"),this.iconArrowElement.setStyle({display:"none",position:"absolute",top:"-26px"}),this.iconArrowElement.setIconUrl(a.arrowUpCtaIconSvg),this.setCtaTextStyle({position:"absolute",letterSpacing:"0.3px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"75%",textAlign:"center"})}connectedCallback(){this.createButton()}disconnectedCallback(){}attributeChangedCallback(e,t,i){switch(e){case"hidden-btn":this.style.display="true"===i?"none":"flex";break;case"width":this.setWidth(i);break;case"margin":this.setMargin(i);break;case"text":this.setCtaText(i);break;case"href":this.anchorButtonElement.href=i;break;case"icon-url":this.iconButtonElement.setIconUrl(i);break;case"icon-size":this.iconButtonElement.setAttribute("height",i),this.iconButtonElement.setAttribute("width",i);break;case"icon-color":this.iconButtonElement.setAttribute("icon-color",i);break;case"display-icon":this.iconButtonElement.style.display="true"===i?"flex":"none";break;case"arrow-icon-display":this.iconArrowElement.style.display="true"===i?"flex":"none";break;case"arrow-icon-color":this.iconArrowElement.setAttribute("icon-color",i)}}createButton(){this.isButtonCreated||(this.anchorButtonElement.append(this.iconButtonElement),this.anchorButtonElement.append(this.ctaTextElement),this.anchorButtonElement.append(this.iconArrowElement),this.append(this.anchorButtonElement),this.isButtonCreated=!0)}animateButton(e){this.animateElement(this.anchorButtonElement,e,2,3.5*o.ONE_SECOND,1)}animateIcon(e){this.animateElement(this.iconArrowElement,e,3,o.ONE_SECOND,3)}animateElement(e,t,i,n,o){e.style.animation="none",e.offsetWidth;let s=setTimeout(()=>{let n=l.animationCssMapper[t];n&&(e.style.animation=n+" "+i+"s cubic-bezier(0.4, 0, 0, 0.99) "+o+" forwards"),this.animationTimeouts=this.animationTimeouts.filter(e=>e!==s)},n);this.animationTimeouts.push(s)}setCtaText(e){this.ctaTextElement.innerText=e}setWidth(e){this.anchorButtonElement.style.width=e}setMargin(e){this.anchorButtonElement.style.margin=e}setAnchorButtonStyles(e){(0,d.mergeStyles)(this.anchorButtonElement,e)}setCtaTextStyle(e){(0,d.mergeStyles)(this.ctaTextElement,e)}setCtaIconStyles(e){(0,d.mergeStyles)(this.iconButtonElement,e)}setAriaLabel(e){e?this.anchorButtonElement.setAttribute("aria-label",e):this.anchorButtonElement.removeAttribute("aria-label")}clearAllAnimations(){this.animationTimeouts.forEach(e=>clearTimeout(e)),this.animationTimeouts=[]}}t.BlazeCtaButton=h,h.observedAttributes=["hidden-btn","height","width","margin","text","href","icon-url","icon-size","icon-color","arrow-icon-display","arrow-icon-color","display-icon"]},4358:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4403:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);
1o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(6121),t),o(i(5029),t),o(i(8831),t),o(i(7784),t),o(i(2914),t),o(i(4047),t),o(i(8398),t),o(i(3311),t),o(i(7133),t),o(i(3972),t),o(i(2402),t),o(i(4912),t),o(i(1232),t),o(i(6133),t),o(i(9565),t),o(i(1556),t),o(i(5923),t),o(i(5486),t),o(i(9598),t),o(i(1712),t),o(i(5495),t),o(i(9205),t)},4437:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4458:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDataSourceStringRep=function(e){var t;if("labels"===e.sourceType){if("string"==typeof e.labels)return e.labels;if(Array.isArray(e.labels))return e.labels.join();if(e.labels instanceof n.BlazeWidgetLabel)return e.labels.toString()}else if("ids"===e.sourceType)return null===(t=e.ids)||void 0===t?void 0:t.join()};let n=i(4403)},4545:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(541),t),o(i(7924),t),o(i(3380),t),o(i(7708),t),o(i(5096),t),o(i(8094),t),o(i(997),t),o(i(3390),t),o(i(2547),t),o(i(6308),t),o(i(4748),t),o(i(4071),t),o(i(6248),t),o(i(7416),t),o(i(817),t),o(i(7341),t),o(i(5943),t),o(i(7452),t),o(i(9983),t),o(i(207),t),o(i(9917),t),o(i(7416),t),o(i(7341),t),o(i(6859),t),o(i(4903),t)},4578:function(e,t){"use strict";var i=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.delay=function(e){return i(this,void 0,void 0,function*(){return new Promise(t=>setTimeout(()=>{t()},e))})}},4710:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4748:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.InteractionService=void 0;let o=i(4545),s=i(4403);class a extends(0,s.Singleton)(){constructor(){super()}init(){return n(this,void 0,void 0,function*(){})}updateInteraction(e){return n(this,void 0,void 0,function*(){try{yield o.DatabaseService.updateInteraction(e)}catch(e){}})}getInteraction(e){return n(this,void 0,void 0,function*(){var t;try{return null===(t=yield o.DatabaseService.getInteraction(e))||void 0===t?void 0:t.data}catch(e){return null}})}}t.InteractionService=a.getInstance()},4765:(e,t)=>{"use strict";var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevel=void 0,(n=i||(t.LogLevel=i={})).DEBUG="DEBUG",n.INFO="INFO",n.WARN="WARN",n.ERROR="ERROR",n.CRITICAL="CRITICAL"},4784:(e,t,i)=>{var n=i(9840),o=e.exports={WebVTT:i(6311),VTTCue:i(184),VTTRegion:i(5891)};n.vttjs=o,n.WebVTT=o.WebVTT;var s=o.VTTCue,a=o.VTTRegion,r=n.VTTCue,l=n.VTTRegion;o.shim=function(){n.VTTCue=s,n.VTTRegion=a},o.restore=function(){n.VTTCue=r,n.VTTRegion=l},n.VTTCue||o.shim()},4804:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttributeParser=function(e){return class extends e{getIntAttribute(e,t){let i=this.getAttribute(e),n=Number.NaN;return i&&(n=parseInt(i)),isNaN(n)?t:n}getFloatAttribute(e,t){let i=this.getAttribute(e),n=Number.NaN;return i&&(n=parseFloat(i)),isNaN(n)?t:n}getStringAttribute(e,t){return this.getAttribute(e)||t}getBooleanAttribute(e,t){let i=this.getAttribute(e);return i?"true"==i:t}}}},4858:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0})},4903:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.CDNDetermineService=void 0;let o=i(4403),s=i(373),a=i(3811),r=i(9266);class l extends(0,o.Singleton)(){constructor(){super(...arguments),this._cdnVendor=l.GLOBAL_CDN_VENDOR_TYPE,this._isInitInProgress=!1,this._cdnVendorTypes=["cf","fd"]}init(){return n(this,void 0,void 0,function*(){if(!this._isInitInProgress){this._isInitInProgress=!0;try{let e=this.getCachedCDNVendor();if(e&&(this._cdnVendor=e,!this.isCachedExpired()))return;let t=this.updateCDNVendor();e||(yield t)}catch(e){}finally{this._isInitInProgress=!1}}})}get cdnVendor(){return this._cdnVendor}updateCDNVendor(){return n(this,void 0,void 0,function*(){this._cdnVendor=yield this.determineCDNVendor(),this.cacheCDNVendor()})}isCachedExpired(){let e=(0,r.tryGetLocalStorageItem)(l.CDN_VENDOR_CACHE_EXPIRY_KEY,"Failed to get cached CDN vendor expiry");return null===e||Date.now()>=Number(e)}getCachedCDNVendor(){let e=(0,r.tryGetLocalStorageItem)(l.CDN_VENDOR_CACHE_KEY,"Failed to get cached CDN vendor");return this._cdnVendorTypes.includes(e)?e:null}cacheCDNVendor(){this._cdnVendor&&((0,r.trySetLocalStorageItem)(l.CDN_VENDOR_CACHE_KEY,this._cdnVendor,"Failed to cache CDN vendor"),(0,r.trySetLocalStorageItem)(l.CDN_VENDOR_CACHE_EXPIRY_KEY,(Date.now()+l.CDN_VENDOR_UPDATE_INTERVAL_MS).toString(),"Failed to cache CDN vendor expiry"),(Date.now()+l.CDN_VENDOR_UPDATE_INTERVAL_MS).toString())}isGlobalVendor(e){return e===l.GLOBAL_CDN_VENDOR_TYPE}determineCDNVendor(){return n(this,void 0,void 0,function*(){let e=this._cdnVendorTypes.map(e=>(0,a.fetchWithTimeout)(s.CDN_VENDOR_TO_API_DOMAIN[e]+"/"+s.BASE_API_PATH,l.API_TIMEOUT_MS).then(t=>({vendor:t.ok?e:null})).catch(()=>({vendor:null}))),t=yield Promise.race(e);return t.vendor&&this.isGlobalVendor(t.vendor)?t.vendor:yield Promise.allSettled(e).then(e=>{var t;let i=e.filter(e=>{var t;return"fulfilled"===e.status&&!!(null===(t=e.value)||void 0===t?void 0:t.vendor)});return 1===i.length?null===(t=i[0])||void 0===t?void 0:t.value.vendor:l.GLOBAL_CDN_VENDOR_TYPE})})}reset(){(0,r.tryRemoveLocalStorageItem)(l.CDN_VENDOR_CACHE_KEY,"Failed to remove cached CDN vendor"),(0,r.tryRemoveLocalStorageItem)(l.CDN_VENDOR_CACHE_EXPIRY_KEY,"Failed to remove cached CDN vendor expiry"),this._cdnVendor=l.GLOBAL_CDN_VENDOR_TYPE,this._isInitInProgress=!1}}l.CDN_VENDOR_CACHE_KEY="cdnVendorType",l.CDN_VENDOR_CACHE_EXPIRY_KEY="cdnVendorExpiry",l.C
1DN_VENDOR_UPDATE_INTERVAL_MS=6e5,l.API_TIMEOUT_MS=2e3,l.GLOBAL_CDN_VENDOR_TYPE="cf",t.CDNDetermineService=l.getInstance()},4906:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(7311),t),o(i(371),t),o(i(5686),t)},4912:function(e,t){"use strict";var i=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerStorage=void 0,t.LoggerStorage=class{constructor(e){this.database=e}store(e){return i(this,void 0,void 0,function*(){return this.database.storeLog(e)})}getBatch(e){return i(this,void 0,void 0,function*(){return this.database.getLogBatch(e)})}remove(e){return i(this,void 0,void 0,function*(){if(e.length)return this.database.removeLogs(e)})}clear(){return i(this,void 0,void 0,function*(){return this.database.clearLogs()})}getLogCount(){return i(this,void 0,void 0,function*(){return this.database.getLogCount()})}}},4933:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetMomentSeekBar=void 0;let n=i(9126),o=i(4403),s=i(6450),a=i(8921),r=i(4545),l=i(9266),d=i(1908),h={isActive:"is-active"};class u extends HTMLElement{constructor(e,t){super(),this.video=e,this.seekBarStyle=t,this.playbackParts=[],this.isProgressBarPaused=!1,this.isActive=!1,this.isInit=!1,this.animationFrameId=null,this.lastProgress=0,this.progressBarContainer=a.WidgetsFactory.create("blaze-div"),this.progressBarFill=a.WidgetsFactory.create("blaze-div"),this.progressBarKnob=a.WidgetsFactory.create("blaze-div"),this.isMouseIn=!1,this.SEEKING_DEBOUNCE_MS=250,this.progress=a.WidgetsFactory.create("blaze-div"),this.listeners=new o.EventsListener,this.boundOnTouchMove=this.onTouchMove.bind(this),this.boundOnMouseMove=this.onMouseMove.bind(this),this.boundOnClick=this.handleOnClick.bind(this),this.boundOnStartDrag=this.handleOnStartDrag.bind(this),this.boundOnEndDrag=this.handleOnEndDrag.bind(this),this.boundOnMouseIn=this.handleOnMouseIn.bind(this),this.boundOnMouseOut=this.handleOnMouseOut.bind(this),this.progress.classList.add(s.WSC_PREFIX+"progress"),this.setupVideoEventListeners()}static get observedAttributes(){return Object.values(h)}attributeChangedCallback(e,t,i){var n,o;e===h.isActive&&(this.isActive="true"===i.toLowerCase(),this.isActive?this.setupProgressUpdate():this.stopProgressUpdate(),null===(o=null===(n=this.playbackParts)||void 0===n?void 0:n.forEach)||void 0===o||o.call(n,e=>e.style.width="0%"))}connectedCallback(){!this.isInit&&this.seekBarStyle.isVisible&&(this.isInit=!0,this.addTransitionStyle(),this.seekBarStyle&&(isNaN(parseFloat(this.seekBarStyle.playingState.height))&&(this.seekBarStyle.playingState.height="3px"),isNaN(parseFloat(this.seekBarStyle.pausedState.height))&&(this.seekBarStyle.pausedState.height="5px")),this.initialize(),this.styleProgressContainer())}addTransitionStyle(){let e=document.createElement("style");e.textContent="\n ."+s.WSC_PREFIX+"progress {\n transition: height 0.3s ease;\n }\n ",this.appendChild(e)}onContentPaused(){this.applyPauseSeekBarStyle()}onContentResumed(e=!1){e?this.applyPlayingSeekBarStyle():setTimeout(()=>{this.applyPlayingSeekBarStyle()},2*s.ONE_SECOND)}disconnectedCallback(){this.stopProgressUpdate()}initialize(){this.setupEventListeners(),this.render()}setVideo(e){this.video=e,this.stopProgressUpdate(),this.setupProgressUpdate(),this.reset()}setupProgressUpdate(){var e;let t=()=>{var e;
1this.playbackParts.forEach(e=>e.style.width="0%");let i=this.video.progress;Number.isNaN(i)?i=this.lastProgress:this.lastProgress=i;let n=this.playbackParts[0];n&&(n.style.width=100*i+"%"),this.animationFrameId=null===(e=window.requestAnimationFrame)||void 0===e?void 0:e.call(window,t)};this.animationFrameId=null===(e=window.requestAnimationFrame)||void 0===e?void 0:e.call(window,t)}stopProgressUpdate(){var e;null!==this.animationFrameId&&(null===(e=window.cancelAnimationFrame)||void 0===e||e.call(window,this.animationFrameId),this.animationFrameId=null)}setupEventListeners(){this.listeners.addAttached(this,"mousedown",this.boundOnStartDrag),this.listeners.addAttached(this,"touchstart",this.boundOnStartDrag),this.listeners.add("mouseup",this.boundOnEndDrag),this.listeners.add("touchend",this.boundOnEndDrag),this.listeners.addAttached(this,"mousemove",this.boundOnMouseMove),this.listeners.addAttached(this,"touchmove",this.boundOnTouchMove),this.listeners.addAttached(this,"click",this.boundOnClick),this.listeners.addAttached(this,"mouseenter",this.boundOnMouseIn),this.listeners.addAttached(this,"mouseleave",this.boundOnMouseOut)}handleOnStartDrag(){var e;this.isActive&&(r.VideoPlayerService.isSeekBarDragging=!0,null===(e=this.onPause)||void 0===e||e.call(this),this.applyPauseSeekBarStyle())}handleOnEndDrag(){var e;this.isActive&&r.VideoPlayerService.isSeekBarDragging&&this.isConnected&&(r.VideoPlayerService.isSeekBarDragging=!1,null===(e=this.onResume)||void 0===e||e.call(this),setTimeout(()=>{r.VideoPlayerService.isSeekBarDragging||this.applyPlayingSeekBarStyle()},2*s.ONE_SECOND))}handleOnClick(e){let t;if(this.isActive&&!r.VideoPlayerService.isSeekBarDragging){if(e instanceof MouseEvent)t=e.clientX;else{if(!(e.touches&&e.touches.length>0))return;t=e.touches[0].clientX}this.handleSeek(t,!0)}}onMouseMove(e){this.handleSeek(e.clientX,1===e.buttons)}onTouchMove(e){e.touches.length>0&&(this.handleSeek(e.touches[0].clientX,!0),e.preventDefault(),e.stopImmediatePropagation())}handleOnMouseOut(){this.isActive&&(r.VideoPlayerService.isSeekBarDragging||(this.isMouseIn=!1,setTimeout(()=>{this.applyPlayingSeekBarStyle()},2*s.ONE_SECOND)))}handleOnMouseIn(){this.isActive&&(this.isMouseIn=!0,this.applyPauseSeekBarStyle())}applyPlayingSeekBarStyle(){this.video.paused&&!r.VideoPlayerService.isPlaying||this.isProgressBarPaused&&(this.isMouseIn||(this.progress.style.height=this.seekBarStyle.playingState.height,this.progressBarKnob.style.display=this.seekBarStyle.playingState.isThumbVisible?"block":"none",this.isProgressBarPaused=!1,this.updateProgressBarStyles()))}applyPauseSeekBarStyle(){this.isProgressBarPaused||(this.progress.style.height=this.seekBarStyle.pausedState.height,this.progressBarKnob.style.display=this.seekBarStyle.pausedState.isThumbVisible?"block":"none",this.isProgressBarPaused=!0,this.updateProgressBarStyles())}reset(){this.progress.style.height=this.seekBarStyle.playingState.height,this.progressBarKnob.style.display=this.seekBarStyle.playingState.isThumbVisible?"block":"none",this.updateProgressBarStyles()}handleSeek(e,t){if(!t)return;let i=this.getBoundingClientRect(),n=(e-i.left)/i.width;"RTL"===r.ConfigService.layoutDirection&&(n=1-n);let o=Math.min(Math.max(n,0),1);this.video.currentTime=this.video.duration*o}styleProgressContainer(){let e=Math.max(parseFloat(this.seekBarStyle.playingState.height),parseFloat(this.seekBarStyle.pausedState.height));(0,l.mergeStyles)(this,{height:e+"px",padding:"20px "+this.seekBarStyle.horizontalSpacing+" "+this.seekBarStyle.verticalSpacing+" "+this.seekBarStyle.horizontalSpacing,cursor:"pointer",boxSizing:"content-box",zIndex:"2"}),this.progress.setStyle({width:"100%",display:"grid",height:this.seekBarStyle.playingState.height}),this.createPlaybackPart(),this.updateProgressBarStyles(),this.append(this.progress)}createPlaybackPart(){this.progressBarContainer.setStyle({width:"100%",height:"100%",display:"block"}),this.progressBarFill.setStyle({width:"0%",height:"100%",position:"relative",display:"block"}),this.progressBarKnob.setStyle({borderRadius:"100%",position:"absolute",right:"0px",top:"50%",bottom:"0px",transform:"translateX(50%) translateY(-50%)"}),this.progressBarFill.append(this.progressBarKnob),this.playbackParts.push(this.progressBarFill),this.progressBarContainer.appendChild(this.progressBarFill),this.progress.append(this.progressBarContainer)}updateProgressBarStyles(){this.progressBarContainer.setStyle({borderRadius:this.isProgressBarPaused?this.seekBarStyle.pausedState.borderRadius:this.seekBarStyle.playingState.borderRadius,backgroundColor:this.isProgressBarPaused?this.seekBarStyle.pausedState.backgroundColor:this.seekBarStyle.playingState.backgroundColor}),this.progressBarFill.setStyle({borderRadius:this.isProgressBarPaused?this.seekBarStyle.pausedState.borderRadius:this.seekBarStyle.playingState.borderRadius,backgroundColor:this.isProgressBarPaused?this.seekBarStyle.pausedState.progressColor:this.seekBarStyle.playingState.progressColor}),this.progressBarKnob.setStyle({width:this.isProgressBarPaused?this.seekBarStyle.pausedState.thumbSize:this.seekBarStyle.playingState.thumbSize,height:this.isProgressBarPaused?this.seekBarStyle.pausedState.thumbSize:this.seekBarStyle.playingState.thumbSize,backgroundColor:this.isProgressBarPaused?this.seekBarStyle.pausedState.thumbColor:this.seekBarStyle.playingState.thumbColor})}render(){}setupVideoEventListeners(){this.video instanceof n.BlazeWidgetVideo&&(this.video.video.addEventListener(d.EVENTS.SEEKING,()=>{this.startSeekingLoader()}),this.video.video.addEventListener(d.EVENTS.SEEKED,()=>{this.stopSeekingLoader()}),this.video.video.addEventListener(d.EVENTS.PLAYING,()=>{this.stopSeekingLoader()}))}
1startSeekingLoader(){if(!(this.video instanceof n.BlazeWidgetVideo))return;let e=this.video.video;!e.paused&&e.readyState>=3||(this.seekingTimeout&&clearTimeout(this.seekingTimeout),this.seekingTimeout=setTimeout(()=>{e.paused&&(e.readyState>=3||this.video.tryToAddLoader())},this.SEEKING_DEBOUNCE_MS))}stopSeekingLoader(){this.seekingTimeout&&(clearTimeout(this.seekingTimeout),this.seekingTimeout=void 0),this.video instanceof n.BlazeWidgetVideo&&this.video.removeLoader()}}t.BlazeWidgetMomentSeekBar=u},5029:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWidget=void 0;class i extends HTMLElement{constructor(){super(),this._animationDuration=300}getAttribute(e){var t;let i=null===(t=super.getAttribute(e))||void 0===t?void 0:t.toLocaleLowerCase();return"true"===i||"false"===i?JSON.parse(i):super.getAttribute(e)}setStyle(e){for(let t in e){let i=t.replace(/[A-Z]/g,e=>"-"+e.toLowerCase());this.style.setProperty(i,e[t])}}setAttributes(e){Object.entries(e).forEach(([e,t])=>{this.setAttribute(e,t)})}removeElement(){this.parentNode&&this.parentNode.removeChild(this)}}t.BaseWidget=i},5094:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.transformContent=o,t.transformStory=s,t.transformVideo=r,t.transformMoment=l,t.transformContentItem=d,t.transformContentsArray=function(e){return e.map(d)};let n=i(8243);function o(e){return{id:e.id,title:e.title,updateTime:e.updateTime,createTime:e.createTime,thumbnails:e.thumbnails,hasViewed:e.hasViewed,type:e.type,entities:e.entities}}function s(e){return Object.assign(Object.assign({},o(e)),{pages:e.pages.map(a),isLive:e.isLive})}function a(e){let t={id:e.id,duration:e.duration,hasViewed:e.hasViewed,createTime:e.createTime};return"Content"===e.type?Object.assign(Object.assign({},t),{index:e.index,thumbnail:e.thumbnail,poster:e.poster}):t}function r(e){return Object.assign(Object.assign({},o(e)),{duration:e.duration.toString(),likes:e.likes,isLive:e.isLive})}function l(e){return Object.assign(Object.assign({},o(e)),{duration:e.duration,likes:e.likes})}function d(e){return(0,n.isStory)(e)?s(e):(0,n.isVideo)(e)?r(e):(0,n.isMoment)(e)?l(e):o(e)}},5096:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BeforeContentPlayService=void 0;let o=i(8094),s=i(7708);t.BeforeContentPlayService=class{getTokenizedUrl(e){return n(this,void 0,void 0,function*(){var t;let i=o.ConfigService.beforeContentPlayCallback;if(!i||"true"!==(null===(t=s.AppConfigurationService.appConfigurations)||void 0===t?void 0:t.configurations.enableClientPlaybackModification))return e;try{return(yield i({originalUrl:e})).resultUrl||e}catch(t){return e}})}}},5127:()=>{!function(){"use strict";if("object"==typeof window){if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var e=function(){for(var e=window.document,t=o(e);t;)t=o(e=t.ownerDocument);return e}(),t=[],i=null,n=null;a.prototype.THROTTLE_TIMEOUT=100,a.prototype.POLL_INTERVAL=null,a.prototype.USE_MUTATION_OBSERVER=!0,a._setupCrossOriginUpdater=function(){return i||(i=function(e,i){n=e&&i?u(e,i):{top:0,bottom:0,left:0,right:0,width:0,height:0},t.forEach(function(e){e._checkForIntersections()})}),i},a._resetCrossOriginUpdater=function(){i=null,n=null},a.prototype.observe=function(e){if(!this._observationTargets.some(function(t){return t.element==e})){if(!e||1!=e.nodeType)throw Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:e,entry:null}),this._monitorIntersections(e.ownerDocument),this._checkForIntersections()}},a.prototype.unobserve=function(e){this._observationTargets=this._observationTargets.filter(function(t){return t.element!=e}),this._unmonitorIntersections(e.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},a.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},a.prototype.takeRecords=function(){var e=this._queuedEntries.slice();return this._queuedEntries=[],e},a.prototype._initThresholds=function(e){var t=e||[0];return Array.isArray(t)||(t=[t]),t.sort().filter(function(e,t,i){if("number"!=typeof e||isNaN(e)||e<0||e>1)throw Error("threshold must be a number between 0 and 1 inclusively");return e!==i[t-1]})},a.prototype._parseRootMargin=function(e){var t=(e||"0px").split(/\s+/).map(function(e){var t=/^(-?\d*\.?\d+)(px|%)$/.exec(e);if(!t)throw Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(t[1]),unit:t[2]}});return t[1]=t[1]||t[0],t[2]=t[2]||t[0],t[3]=t[3]||t[1],t},a.prototype._monitorIntersections=function(t){var i=t.defaultView;if(i&&-1==this._monitoringDocuments.indexOf(t)){var n=this._checkForIntersections,s=null,a=null;if(this.POLL_INTERVAL?s=i.setInterval(n,this.POLL_INTERVAL):(r(i,"resize",n,!0),r(t,"scroll",n,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in i&&(a=new i.MutationObserver(n)).observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(t),this._monitoringUnsubscribes.push(function(){var e=t.defaultView;e&&(s&&e.clearInterval(s),l(e,"resize",n,!0)),l(t,"scroll",n,!0),a&&a.disconnect()}),t!=(this.root&&(this.root.ownerDocument||this.root)||e)){var d=o(t);d&&this._monitorIntersections(d.ownerDocument)}}},a.prototype._unmonitorIntersections=function(t){var i=this._monitoringDocuments.indexOf(t);if(-1!=i){var n=this.root&&(this.root.ownerDocument||this.root)||e;if(!this._observationTargets.some(function(e){var i=e.element.ownerDocument;if(i==t)return!0;for(;i&&i!=n;){var s=o(i);if((i=s&&s.ownerDocument)==t)return!0}return!1})){var s=this._monitoringUnsubscribes[i];if(this._monitoringDocuments.splice(i,1),this._monitoringUnsubscribes.splice(i,1),s(),t!=n){var a=o(t);a&&this._unmonitorIntersections(a.ownerDocument)}}}},a.prototype._unmonitorAllIntersections=function(){var e=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var t=0;t<e.length;t++)e[t]()},a.prototype._checkForIntersections=function(){if(this.root||!i||n){var e=this._rootIsInDom(),t=e?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};
1this._observationTargets.forEach(function(n){var o=n.element,a=d(o),r=this._rootContainsTarget(o),l=n.entry,h=e&&r&&this._computeTargetAndRootIntersection(o,a,t),u=null;this._rootContainsTarget(o)?i&&!this.root||(u=t):u={top:0,bottom:0,left:0,right:0,width:0,height:0};var c=n.entry=new s({time:window.performance&&performance.now&&performance.now(),target:o,boundingClientRect:a,rootBounds:u,intersectionRect:h});l?e&&r?this._hasCrossedThreshold(l,c)&&this._queuedEntries.push(c):l&&l.isIntersecting&&this._queuedEntries.push(c):this._queuedEntries.push(c)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},a.prototype._computeTargetAndRootIntersection=function(t,o,s){if("none"!=window.getComputedStyle(t).display){for(var a=o,r=p(t),l=!1;!l&&r;){var h=null,c=1==r.nodeType?window.getComputedStyle(r):{};if("none"==c.display)return null;if(r==this.root||9==r.nodeType){if(l=!0,r==this.root||r==e)i&&!this.root?n&&(0!=n.width||0!=n.height)?h=n:(r=null,h=null,a=null):h=s;else{var g=p(r),v=g&&d(g),y=g&&this._computeTargetAndRootIntersection(g,v,s);v&&y?(r=g,h=u(v,y)):(r=null,a=null)}}else{var m=r.ownerDocument;r!=m.body&&r!=m.documentElement&&"visible"!=c.overflow&&(h=d(r))}if(h&&(a=function(e,t){var i=Math.max(e.top,t.top),n=Math.min(e.bottom,t.bottom),o=Math.max(e.left,t.left),s=Math.min(e.right,t.right),a=s-o,r=n-i;return a>=0&&r>=0&&{top:i,bottom:n,left:o,right:s,width:a,height:r}||null}(h,a)),!a)break;r=r&&p(r)}return a}},a.prototype._getRootRect=function(){var t;if(this.root&&!g(this.root))t=d(this.root);else{var i=g(this.root)?this.root:e,n=i.documentElement,o=i.body;t={top:0,left:0,right:n.clientWidth||o.clientWidth,width:n.clientWidth||o.clientWidth,bottom:n.clientHeight||o.clientHeight,height:n.clientHeight||o.clientHeight}}return this._expandRectByRootMargin(t)},a.prototype._expandRectByRootMargin=function(e){var t=this._rootMarginValues.map(function(t,i){return"px"==t.unit?t.value:t.value*(i%2?e.width:e.height)/100}),i={top:e.top-t[0],right:e.right+t[1],bottom:e.bottom+t[2],left:e.left-t[3]};return i.width=i.right-i.left,i.height=i.bottom-i.top,i},a.prototype._hasCrossedThreshold=function(e,t){var i=e&&e.isIntersecting?e.intersectionRatio||0:-1,n=t.isIntersecting?t.intersectionRatio||0:-1;if(i!==n)for(var o=0;o<this.thresholds.length;o++){var s=this.thresholds[o];if(s==i||s==n||s<i!=s<n)return!0}},a.prototype._rootIsInDom=function(){return!this.root||c(e,this.root)},a.prototype._rootContainsTarget=function(t){var i=this.root&&(this.root.ownerDocument||this.root)||e;return c(i,t)&&(!this.root||i==t.ownerDocument)},a.prototype._registerInstance=function(){0>t.indexOf(this)&&t.push(this)},a.prototype._unregisterInstance=function(){var e=t.indexOf(this);-1!=e&&t.splice(e,1)},window.IntersectionObserver=a,window.IntersectionObserverEntry=s}}function o(e){try{return e.defaultView&&e.defaultView.frameElement||null}catch(e){return null}}function s(e){this.time=e.time,this.target=e.target,this.rootBounds=h(e.rootBounds),this.boundingClientRect=h(e.boundingClientRect),this.intersectionRect=h(e.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!e.intersectionRect;var t=this.boundingClientRect,i=t.width*t.height,n=this.intersectionRect,o=n.width*n.height;this.intersectionRatio=i?Number((o/i).toFixed(4)):this.isIntersecting?1:0}function a(e,t){var i,n,o,s=t||{};if("function"!=typeof e)throw Error("callback must be a function");if(s.root&&1!=s.root.nodeType&&9!=s.root.nodeType)throw Error("root must be a Document or Element");this._checkForIntersections=(i=this._checkForIntersections.bind(this),n=this.THROTTLE_TIMEOUT,o=null,function(){o||(o=setTimeout(function(){i(),o=null},n))}),this._callback=e,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(s.rootMargin),this.thresholds=this._initThresholds(s.threshold),this.root=s.root||null,this.rootMargin=this._rootMarginValues.map(function(e){return e.value+e.unit}).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function r(e,t,i,n){"function"==typeof e.addEventListener?e.addEventListener(t,i,n||!1):"function"==typeof e.attachEvent&&e.attachEvent("on"+t,i)}function l(e,t,i,n){"function"==typeof e.removeEventListener?e.removeEventListener(t,i,n||!1):"function"==typeof e.detachEvent&&e.detachEvent("on"+t,i)}function d(e){var t;try{t=e.getBoundingClientRect()}catch(e){}
1return t?(t.width&&t.height||(t={top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.right-t.left,height:t.bottom-t.top}),t):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function h(e){return!e||"x"in e?e:{top:e.top,y:e.top,bottom:e.bottom,left:e.left,x:e.left,right:e.right,width:e.width,height:e.height}}function u(e,t){var i=t.top-e.top,n=t.left-e.left;return{top:i,left:n,height:t.height,width:t.width,bottom:i+t.height,right:n+t.width}}function c(e,t){for(var i=t;i;){if(i==e)return!0;i=p(i)}return!1}function p(t){var i=t.parentNode;return 9==t.nodeType&&t!=e?o(t):(i&&i.assignedSlot&&(i=i.assignedSlot.parentNode),i&&11==i.nodeType&&i.host?i.host:i)}function g(e){return e&&9===e.nodeType}}()},5135:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5182:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isBot=function(){return"undefined"==typeof navigator||!navigator.userAgent||"undefined"==typeof navigator||!0===navigator.webdriver||!!function(){if("undefined"==typeof navigator||!navigator.userAgent)return!0;let e=navigator.userAgent.toLowerCase();return i.some(t=>e.includes(t))}()};let i=["googlebot","adsbot-google","mediapartners-google","google web preview","google-inspectiontool","googleother","bingbot","slurp","duckduckbot","baiduspider","yandexbot","sogou","exabot","ia_archiver","facebookexternalhit","facebot","twitterbot","linkedinbot","pinterest","whatsapp","telegrambot","slackbot","discordbot","bot/","bot;","bot)","crawler","spider","scraper","archiver","headlesschrome","phantomjs","puppeteer","selenium","prerender","rendertron","googleweblight","uptimerobot","pingdom","gtmetrix","semrushbot","ahrefsbot","mj12bot","dotbot"]},5185:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5207:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(8897),t),o(i(2203),t),o(i(4314),t),o(i(1868),t),o(i(8103),t)},5266:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetItem=void 0;let n=i(4403),o=i(6450),s=i(8921),a=i(4545),r=i(4403),l=i(6994),d=i(3574),h=i(9266);class u extends n.BaseWidget{get parentRef(){let e=this.parentElement,t=this.getRootNode();return t instanceof ShadowRoot&&(e=t.host),e}constructor(e){super(),this.options=e,this.thumbnailString="",this.analyticsCalls={},this.chipType="statusReadStyle",this.position=1,this.total=1,this.statusIndicatorSettings={backgroundColor:"#ffffff",backgroundImage:"none",textColor:"#fffff",font:"initial",textSize:"10px",letterSpacing:"initial",borderRadius:"initial",borderColor:"#ffffff",thumbnailBorderColor:"#ffffff",text:"",borderWidth:2,isVisible:!1,padding:"3px 9px"},this.paddingItem={top:"0",left:"0",right:"0",bottom:"0"},this.debouncedIntersectionAction=(0,n.debounce)(()=>{var e,t,i,n,o,s;(null===(t=null===(e=this.parentRef)||void 0===e?void 0:e.momentsModal)||void 0===t?void 0:t.isOpen)||(null===(n=null===(i=this.parentRef)||void 0===i?void 0:i.storysModal)||void 0===n?void 0:n.isOpen)||(null===(s=null===(o=this.parentRef)||void 0===o?void 0:o.videosModal)||void 0===s?void 0:s.isOpen)||(this.parentRef.setFirstVisibleItem(),this.parentRef.currentlyAnimatedItem=this.parentRef.firstVisibleItem,this.parentRef.widgetItems.forEach(e=>{null==e||e.loadNewThumbnail()}))},1e3);let{layout:t,content:i}=e;this.content=i,this.layoutStyle=t,this.statusIndicatorSettings.borderRadius="Circle"===this.layoutStyle.thumbnailShape?"50%":"0",this.statusIndicatorSettings.borderWidth=this.layoutStyle.borderWidth,this.thumbnailType=this.layoutStyle.thumbnailType,this.setAttribute("title",i.title),this.wrapper=s.WidgetsFactory.create("blaze-div"),this.container=s.WidgetsFactory.create("blaze-div"),this.label=s.WidgetsFactory.create("blaze-div"),this.labelBackgroun
1d=s.WidgetsFactory.create("blaze-div"),this.labelContainer=s.WidgetsFactory.create("blaze-div"),this.thumbnail=s.WidgetsFactory.create("blaze-image"),this.chip=s.WidgetsFactory.create("blaze-chip"),this.badge=s.WidgetsFactory.create("blaze-chip"),this.intersectionObserver=new IntersectionObserver(this.handleIntersection.bind(this),{root:this.parentRef,threshold:[0,.01,.99,1]}),this.boundOnWidgetClick=this.handleWidgetClick.bind(this),this.boundOnFocus=this.onFocus.bind(this),this.boundOnBlur=this.onBlur.bind(this)}initializeWidget(){this.thumbnailType=(0,d.thumbnailMapping)(this.layoutStyle.thumbnailType),this.setupDOMElements(),this.setData(this.content),this.setupEventListeners(),this.intersectionObserver.observe(this)}connectedCallback(){(0,h.setId)(this,"blaze-widget-item"),this.setAttribute("data-testid","blaze-widget-item-"+this.content.id),this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.setAttribute("aria-keyshortcuts","Enter"),this.setAttribute("aria-roledescription","Widget item"),this.setAttribute("aria-haspopup","dialog"),this.setAttribute("aria-expanded","false"),this.initializeWidget(),this.updateLabel(),this.setChipStyle(),this.render()}updateAriaLabel(){var e;let t=(null===(e=this.content)||void 0===e?void 0:e.title)||"Untitled",i=this.contentType||"story",n=(0,h.buildContentAriaLabel)({contentType:i,title:t,content:this.content,position:this.position,total:this.total,badgeStyle:this.layoutStyle.badgeIndicatorStyle,elementType:"button"});this.setAttribute("aria-label",n)}updateWidget(){var e;null===(e=this.parentRef)||void 0===e||e.updateWidgetsData(),this.updateAriaLabel()}updateWidgetItemPadding(){var e;null===(e=this.parentRef)||void 0===e||e.setMaxPaddingOnWidgetItems()}updateWidgetItemStyle(e){this.resetWidgetItemStyles(),this.setTheme(e)}setupDOMElements(){this.setStyle({display:"grid",position:"relative",cursor:"pointer"}),this.wrapper.setStyle({position:"relative",display:"grid"}),this.container.setStyle({background:"transparent",position:"relative",display:"grid"}),this.labelBackground.setStyle({position:"absolute",top:"0",right:"0",bottom:"0",left:"0",height:"33.34%",borderRadius:"inherit",display:"none"}),this.thumbnail.setStyle({lineHeight:"0"}),this.label.setStyle({margin:"0px",justifySelf:"center",justifyContent:"center",textAlign:"center",overflow:"hidden",boxSizing:"border-box",fontWeight:this.layoutStyle.labelStyle.fontWeight,width:"100%",color:"transparent",borderRadius:"4px",maxWidth:"max(50%, 48px)",maxHeight:"24px"}),this.labelContainer.setStyle({display:"inline-block"}),(0,h.mergeStyles)(this.chip,{display:this.isLive?"inline":"none",transform:"unset",fontWeight:"bold",inset:"unset"}),(0,h.mergeStyles)(this.badge,{justifyContent:"center",alignItems:"center",inset:"unset"}),this.append(this.wrapper),this.container.append(this.labelBackground),this.container.append(this.thumbnail),this.wrapper.append(this.container),this.labelContainer.append(this.label),this.container.append(this.chip),this.container.append(this.badge)}setupEventListeners(){this.addEventListener("click",this.boundOnWidgetClick),this.addEventListener("focus",this.boundOnFocus),this.addEventListener("blur",this.boundOnBlur)}onFocus(e){let t=this.parentRef;if(t&&t.widgetItems){let e=t.widgetItems.indexOf(this);-1!==e&&t.updateFocusedItemIndex(e)}this.matches(":focus-visible")&&(this.style.transform="scale(0.98)",this.style.outline="2px solid #007AFF",this.style.outlineOffset="2px")}onBlur(){this.style.transform="",this.style.outline=""}handleWidgetClick(){var e;if(this.event(o.WidgetAction.Click,{}),l.accessibilityManager.storeModalFocusReturnTarget(this),a.ConfigService.onItemClick){let e=this.parentRef.containerId||"",t=this.getItemIndex(),i=this.contentType||"story",n={containerId:e,item:this.content,itemIndexInContainer:t,contentType:i};if(a.ConfigService.onItemClick(n).shouldPreventOpen)return}null===(e=this.onClick)||void 0===e||e.call(this)}disconnectedCallback(){this.removeEventListener("click",this.boundOnWidgetClick),this.removeEventListener("focus",this.boundOnFocus),this.removeEventListener("blur",this.boundOnBlur),this.intersectionObserver.disconnect()}handleIntersection(){this.parentRef.isAnimatedThumbnail()&&this.debouncedIntersectionAction()}setData(e){this.content=e,this.content&&this.label&&(this.label.textContent=this.content.title),"isLive"in this.content&&(this.isLive=this.content.isLive),this.parentRef.isAnimatedThumbnail()&&this.parentRef.widgetItems[0]===this&&(this.parentRef.currentlyAnimatedItem=this),this.thumbnailString=this.getThumbnailUrl(),this.setupChildElementsAccessibility(),this.updateAriaLabel(),this.thumbnail.load(this.thumbnailString)}setupChildElementsAccessibility(){this.chip.setAttribute("aria-hidden","true"),this.chip.setAttribute("tabindex","-1"),this.chip.style.pointerEvents="none",this.badge.setAttribute("aria-hidden","true"),this.badge.setAttribute("tabindex","-1"),this.badge.style.pointerEvents="none",this.label.setAttribute("aria-hidden","true"),this.label.setAttribute("tabindex","-1"),this.labelContainer.setAttribute("aria-hidden","true"),this.labelContainer.setAttribute("tabindex","-1"),this.labelBackgroun
1d.setAttribute("aria-hidden","true"),this.labelBackground.setAttribute("tabindex","-1"),this.labelBackground.style.pointerEvents="none",this.thumbnail.setAttribute("aria-hidden","true"),this.thumbnail.setAttribute("tabindex","-1"),this.thumbnail.style.pointerEvents="none",this.thumbnail.thumbnailElement&&(this.thumbnail.thumbnailElement.setAttribute("alt",""),this.thumbnail.thumbnailElement.setAttribute("tabindex","-1"),this.thumbnail.thumbnailElement.style.pointerEvents="none")}isFullyVisibleInParent(){let e=this.getBoundingClientRect(),t=this.parentRef.getBoundingClientRect();return e.top>=t.top&&e.bottom<=t.bottom&&e.left>=t.left&&e.right<=t.right}loadNewThumbnail(){let e=this.getThumbnailUrl();if(this.thumbnailString===e)return;let t=new Image;t.src=e,t.onload=()=>{this.thumbnail.load(e),this.thumbnailString=e}}getThumbnailUrl(){var e,t,i,n,o,s,a,r;let l,d=null===(i=null===(t=null===(e=this.content)||void 0===e?void 0:e.thumbnails[0])||void 0===t?void 0:t.rendition)||void 0===i?void 0:i.url;return l="AnimatedThumbnailPoster"===this.thumbnailType?this.parentRef.currentlyAnimatedItem===this?"Gif":"AnimatedThumbnailPoster":this.thumbnailType,(d=null!==(r=null===(a=null===(s=null===(o=null===(n=this.content)||void 0===n?void 0:n.thumbnails)||void 0===o?void 0:o.find(e=>e.type==l))||void 0===s?void 0:s.rendition)||void 0===a?void 0:a.url)&&void 0!==r?r:d)||""}setThumbnailBorderColor(e){this.container.setStyle({borderColor:e})}updateLabel(){this.label.setStyle({color:this.layoutStyle.labelStyle.color,background:"initial",borderRadius:"initial",maxWidth:"initial",maxHeight:"initial"}),this.labelBackground.setStyle({display:"block"})}resetWidgetItemStyles(){this.paddingItem={top:"0",left:"0",right:"0",bottom:"0"},this.chip.setStyle({top:"initial",bottom:"initial",left:"initial",right:"initial",transform:"initial",alignSelf:"initial",display:"none"}),this.badge.setStyle({top:"initial",bottom:"initial",left:"initial",right:"initial",transform:"initial",alignSelf:"initial",display:"none",padding:"0"}),this.wrapper.setStyle({padding:"0"})}updateContainerStyles(){let{borderWidth:e,borderRadius:t,borderPadding:i}=this.layoutStyle,{thumbnailBorderColor:n,backgroundColor:o}=this.statusIndicatorSettings,s=e!==this.statusIndicatorSettings.borderWidth?this.statusIndicatorSettings.borderWidth:e;this.container.style.borderWidth=s+"px",this.container.style.borderStyle="solid",this.container.style.borderRadius=t,this.container.style.padding=i+"px",this.setThumbnailBorderColor(n||o)}updateLabelStyles(){let e=this.layoutStyle.labelStyle,t=e.position.startsWith("inside"),i=e.position.startsWith("outside");this.label.setStyle({fontFamily:e.font,fontDisplay:"swap",fontSize:r.TextScaleService.scaleFontSize(e.fontSize),lineHeight:r.TextScaleService.scaleLineHeight(e.height+"px")}),this.labelContainer.setStyle({padding:e.padding}),1===this.layoutStyle.lines?this.label.setStyle({display:"block",textOverflow:"ellipsis",whiteSpace:"nowrap",wordBreak:this.layoutStyle.wordBreak,maxWidth:this.clientWidth+"px"}):(this.label.setStyle({textOverflow:"initial",whiteSpace:"initial"}),this.label.style.display="-webkit-box",this.label.style.webkitLineClamp=this.layoutStyle.lines.toString(),this.label.style.webkitBoxOrient="vertical",this.label.style.wordBreak=this.layoutStyle.wordBreak),e.isVisible||(this.label.style.display="none",this.labelBackground.style.display="none"),i&&this.updateOutsideLabelStyles(e),t&&this.updateInsideLabelStyles(e)}updateInsideLabelStyles(e){let{isInside:t,isTop:i,isMiddle:n,isBottom:o,isLeft:s,isRight:a}=(0,h.calculatePosition)(e.position);switch(this.style.gap="0px",this.container.appendChild(this.labelContainer),this.labelContainer.setStyle({position:"absolute",gridRow:"unset",width:"-webkit-fill-available"}),this.labelBackground.setStyle({background:"#000"}),!0){case t&&i:this.labelContainer.setStyle({alignSelf:"start"}),this.labelBackground.style.top="0",this.labelBackground.style.background="linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0))",this.labelBackground.style.background="-webkit-linear-gradient(top, rgba(0,0,0,1), rgba(0,0,0,0))";break;case t&&n:this.labelContainer.setStyle({alignSelf:"center"}
1),this.labelBackground.style.top="33.34%",this.labelBackground.style.background="linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,1), rgba(0,0,0,0))",this.labelBackground.style.background="-webkit-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,1), rgba(0,0,0,0))";break;case t&&o:this.labelContainer.setStyle({alignSelf:"end"}),this.labelBackground.style.top="66.67%",this.labelBackground.style.background="linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,1))",this.labelBackground.style.background="-webkit-linear-gradient(top, rgba(0,0,0,0), rgba(0,0,0,1), rgba(0,0,0,0));"}switch(e.backgroundColor&&(this.labelBackground.style.background=e.backgroundColor),!0){case t&&s:this.label.setStyle({textAlign:e.textAlign||"start"});break;case t&&a:this.label.setStyle({textAlign:e.textAlign||"end"});break;default:this.label.setStyle({textAlign:e.textAlign||"center"})}}updateOutsideLabelStyles(e){let t="outsideBottom"===e.position,i="outsideTop"===e.position;switch(this.appendChild(this.labelContainer),this.labelContainer.setStyle({position:"initial"}),this.labelBackground.setStyle({display:"none"}),this.style.gap=(e.isVisible?e.gap:0)+"px",!0){case t:this.labelContainer.setStyle({gridRow:"2"}),this.setStyle({gridTemplateRows:"min-content min-content",gridTemplateColumns:"initial"}),this.container.setStyle({alignContent:"flex-start"});break;case i:this.labelContainer.setStyle({gridRow:"1"}),this.setStyle({gridTemplateRows:"min-content min-content",gridTemplateColumns:"initial",alignContent:"space-between"}),this.container.setStyle({alignSelf:"flex-end"})}e.textAlign&&this.label.setStyle({textAlign:e.textAlign})}updateThumbnailStyles(){if(this.layoutStyle&&this.thumbnail){let e=(0,h.checkAspectRatios)(this.layoutStyle.itemRatio);"16/9"===e?this.thumbnail.setHeight("-webkit-fill-available"):"9/16"===e&&this.thumbnail.setHeight("100%"),this.thumbnail.setStyle({aspectRatio:this.layoutStyle.itemRatio.toString(),borderRadius:this.layoutStyle.borderRadius})}}updateStatusIndicatorStyle(e){let t="chip"===e?this.statusIndicatorSettings:this.layoutStyle.badgeIndicatorStyle,i="chip"===e?this.layoutStyle.statusIndicatorPosition:this.layoutStyle.badgePosition,n="chip"===e?this.chip:this.badge;if(!t.isVisible)return void(n.style.display="none");"badge"===e&&this.layoutStyle.badgeIndicatorStyle.padding&&(n.style.padding=this.layoutStyle.badgeIndicatorStyle.padding,n.style.zIndex="1");let{isOutside:o,isInside:s,isTop:a,isMiddle:r,isBottom:l,isLeft:d,isRight:u}=(0,h.calculatePosition)(i),c=0,p=0;if("badge"===e)t.width&&(p=Math.floor(t.width/2)),t.height&&(c=Math.floor(t.height/2));else{let e=(0,h.createChip)(this.statusIndicatorSettings);p=Math.floor(e.width/2),c=Math.floor(e.height/2)}let g="Circle"===this.layoutStyle.thumbnailShape,v=this.statusIndicatorSettings.borderWidth,y="badge"===e?t.borderWidth:this.statusIndicatorSettings.borderWidth;o?this.handleOutsidePosition({isTop:a,isBottom:l,isLeft:d,isRight:u,height:c,width:p,isCircleThumbnail:g,borderWidthElement:y,borderWidthThumbnail:v},n):s&&this.handleInsidePosition({isTop:a,isMiddle:r,isBottom:l,isLeft:d,isRight:u,height:c,isCircleThumbnail:g,borderWidthElement:y,borderWidthThumbnail:v},n),this.applyCommonStyles(e)}handleOutsidePosition(e,t){let{isTop:i,isBottom:n,isLeft:o,isRight:s,height:a,width:r,isCircleThumbnail:l,borderWidthElement:d,borderWidthThumbnail:h}=e;if(i?(t.style.top="-"+a+"px",s||o||(this.wrapper.style.paddingTop=a-h+"px",this.paddingItem.top=a-h+"px")):n&&(t.style.bottom="-"+a+"px",s||o||(this.wrapper.style.paddingBottom=a-h+"px",this.paddingItem.bottom=a-h+"px")),o||s){let e=o?"left":"right",s=n||i,d=l&&s?"0":"-"+r+"px";t.setStyle({[e]:d,alignSelf:"center"});let h=l&&s?"0":r+"px";if(this.wrapper.setStyle({[o?"paddingLeft":"paddingRight"]:h}),this.paddingItem[e]=h,n||i){let e=n?"bottom":"top";t.setStyle({[e]:l?"0":"-"+a+"px"}),this.wrapper.setStyle({[n?"paddingBottom":"paddingTop"]:l?"0":a+"px"}),this.paddingItem[e]=h}}}handleInsidePosition(e,t){let{isTop:i,isMiddle:n,isBottom:o,isLeft:s,isRight:a,isCircleThumbnail:r}=e,l={},d=(0,h.calculatePercentage)(5,this.container),u=(0,h.calculatePercentage)(15,this.container);(i||o)&&(l.top=i?r?n?d:u:"4px":"",l.bottom=o?r?n?d:u:"4px":""),n&&(l.alignSelf="center"),(s||a)&&(l.left=s?r?n?d:u:"4px":"",l.right=a?r?n?d:u:"4px":""),s||a||i||o||(l.textAlign="center"),t.setStyle(l)}
1applyCommonStyles(e){var t,i,n,o;let s="chip"===e?this.statusIndicatorSettings:this.layoutStyle.badgeIndicatorStyle,a="chip"===e?this.chip:this.badge,l={fontSize:r.TextScaleService.scaleFontSize(s.textSize),backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth+"px",borderRadius:s.borderRadius,color:s.textColor,letterSpacing:s.letterSpacing,fontFamily:s.font,fontDisplay:"swap",padding:s.padding};if("badge"===e&&(l.height=s.height+"px",l.width=s.width+"px"),"none"!==s.backgroundImage&&(new Image().src=s.backgroundImage,l.backgroundImage="url('"+s.backgroundImage+"')",l.backgroundSize="cover",l.backgroundRepeat="no-repeat",l.backgroundPosition="center"),s.positionOffset&&(l.marginLeft=null!==(t=s.positionOffset.left)&&void 0!==t?t:null,l.marginTop=null!==(i=s.positionOffset.top)&&void 0!==i?i:null,l.marginRight=null!==(n=s.positionOffset.right)&&void 0!==n?n:null,l.marginBottom=null!==(o=s.positionOffset.bottom)&&void 0!==o?o:null),"chip"===e){let e=s.thumbnailBorderColor||s.borderColor;this.setThumbnailBorderColor(e)}a.setStyle(l),a.innerText=s.text;let d=0!==a.innerText.length;a.style.display=s.isVisible&&(d||"none"!==s.backgroundImage)?"flex":"none"}setTheme(e){this.layoutStyle=e,this.initializeAndRenderWidget()}initializeAndRenderWidget(){this.initializeWidget(),this.updateLabel(),this.setChipStyle(),this.render()}getPaddingOnContainer(){return this.paddingItem}setPaddingOnContainer(e){this.paddingItem=e,this.wrapper.setStyle({paddingTop:e.top,paddingBottom:e.bottom,paddingLeft:e.left,paddingRight:e.right})}setChipStyle(){var e;let t=null===(e=this.content)||void 0===e?void 0:e.hasViewed;this.isLive?t?(this.statusIndicatorSettings=this.layoutStyle.statusLiveStyle,this.chipType="statusLiveStyle"):(this.statusIndicatorSettings=this.layoutStyle.statusLiveUnreadStyle,this.chipType="statusLiveUnreadStyle"):t?(this.statusIndicatorSettings=this.layoutStyle.statusReadStyle,this.chipType="statusReadStyle"):(this.statusIndicatorSettings=this.layoutStyle.statusUnreadStyle,this.chipType="statusUnreadStyle")}getItemIndex(){var e,t;return Array.from(null!==(t=null===(e=null==this?void 0:this.parentNode)||void 0===e?void 0:e.children)&&void 0!==t?t:[]).indexOf(this)}event(e,t,i){var s,r,l,d,h,u,c,p;if(e==o.WidgetAction.Load||e==o.WidgetAction.Visible){if(this.analyticsCalls[e])return;this.analyticsCalls[e]=!0}try{let o=this.parentRef,g=o.getBoundingClientRect();t.widget_id=o.id,t.widget_name=o.id,t.widget_size=Math.round(null==g?void 0:g.width)+"x"+Math.round(null==g?void 0:g.height),t.widget_type=null===(s=o.widgetType)||void 0===s?void 0:s.call(o),t.widget_content_count=null===(r=null==o?void 0:o.contents)||void 0===r?void 0:r.length,t.widget_content_list=null===(l=null==o?void 0:o.contents)||void 0===l?void 0:l.map(e=>e.id).join(),t.content_id=null===(d=this.content)||void 0===d?void 0:d.id,t.content_index=this.getItemIndex(),t.content_name=null===(h=this.content)||void 0===h?void 0:h.title,t.content_type=this.contentType?this.contentType.charAt(0).toUpperCase()+this.contentType.slice(1):"",t.placement_distance=Math.round((null==g?void 0:g.top)||0).toString(),t.thumbnail_aspect_ratio=null===(u=this.layoutStyle)||void 0===u?void 0:u.itemRatio.toString(),t.thumbnail_type=null===(c=this.layoutStyle)||void 0===c?void 0:c.thumbnailShape,t.thumbnail_size=(null==o?void 0:o.thumbnailWidth)+"x"+(null==o?void 0:o.thumbnailHeight);let v=new n.ReferringEventInfo;v.origin_widget_id=o.id,v.origin_widget_name=o.id,v.origin_widget_type=null===(p=o.widgetType)||void 0===p?void 0:p.call(o),v.labels_expression=o.getAttribute("labels"),document.referrer&&(v.referrer_page_url=document.referrer),a.AnalyticsService.pushWidgetEvent(e,Object.assign({},t),i,v)}catch(e){}}render(){this.updateContainerStyles(),this.updateLabelStyles(),this.updateThumbnailStyles(),this.updateStatusIndicatorStyle("chip"),this.updateStatusIndicatorStyle("badge")}updateAccessibilityInfo(e){this.position=e.position,this.total=e.total,e.contentType&&(this.contentType=e.contentType),this.updateAriaLabel(),this.setupChildElementsAccessibility()}}t.BlazeWidgetItem=u},5346:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Prom
1ise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazePlayerMenu=t.PLAYER_MENU_ATTRIBUTES=t.PLAYER_MENU_EVENTS=void 0;let s=o(i(2776)),a=i(4403),r=i(8921),l=i(4906),d=i(9266),h=i(277),u=i(8381),c=i(6450);t.PLAYER_MENU_EVENTS={OPEN:"player-menu-open",CLOSE:"player-menu-close",EXPAND:"player-menu-expand",COLLAPSE:"player-menu-collapse"},t.PLAYER_MENU_ATTRIBUTES={OPEN:"open",EXPANDED:"expanded"};class p extends a.BaseWidget{constructor(){super(),this.header=r.WidgetsFactory.create("blaze-div"),this.expander=r.WidgetsFactory.create("blaze-div"),this.backdropContainer=r.WidgetsFactory.create("blaze-div"),this.titleElement=r.WidgetsFactory.create("blaze-typography"),this.closeButton=r.WidgetsFactory.create("blaze-button"),this.menuContainer=r.WidgetsFactory.create("blaze-div"),this.boundPreventScrollBubbling=this.preventScrollBubbling.bind(this),this.boundOnKeyDown=this.onKeyDown.bind(this),this.attachShadow({mode:"open"})}connectedCallback(){this.append(this.backdropContainer),this.append(this.menuContainer),this.setupEventListeners()}disconnectedCallback(){var e;null===(e=this.detachTouchEventListeners)||void 0===e||e.call(this),this.detachEventListeners()}setAttribute(e,t){super.setAttribute(e,t)}setupEventListeners(){this.addEventListener(t.PLAYER_MENU_EVENTS.OPEN,this.onOpenChange),this.addEventListener(t.PLAYER_MENU_EVENTS.CLOSE,this.onOpenChange),this.addEventListener(t.PLAYER_MENU_EVENTS.EXPAND,this.onExpandedChange),this.addEventListener(t.PLAYER_MENU_EVENTS.COLLAPSE,this.onExpandedChange),this.menuContainer.addEventListener("wheel",this.boundPreventScrollBubbling,{passive:!1}),this.menuContainer.addEventListener("touchmove",this.boundPreventScrollBubbling,{passive:!1}),this.menuContainer.addEventListener("keydown",this.boundOnKeyDown)}detachEventListeners(){this.removeEventListener(t.PLAYER_MENU_EVENTS.OPEN,this.onOpenChange),this.removeEventListener(t.PLAYER_MENU_EVENTS.CLOSE,this.onOpenChange),this.removeEventListener(t.PLAYER_MENU_EVENTS.EXPAND,this.onExpandedChange),this.removeEventListener(t.PLAYER_MENU_EVENTS.COLLAPSE,this.onExpandedChange),this.menuContainer.removeEventListener("wheel",this.boundPreventScrollBubbling),this.menuContainer.removeEventListener("touchmove",this.boundPreventScrollBubbling),this.menuContainer.removeEventListener("keydown",this.boundOnKeyDown)}onKeyDown(e){if("true"===this.getAttribute(t.PLAYER_MENU_ATTRIBUTES.OPEN))switch(e.key){case"ArrowDown":e.preventDefault(),this.focusNextOption(1);break;case"ArrowUp":e.preventDefault(),this.focusNextOption(-1)}}focusNextOption(e){var t,i,n;let o=null===(t=this.menuComponent)||void 0===t?void 0:t.querySelectorAll('[tabindex="0"]');if(!o||0===o.length)return;let s=null===(i=this.menuComponent)||void 0===i?void 0:i.querySelector(":focus"),a=Array.from(o),r=(s?a.indexOf(s):-1)+e;r<0&&(r=a.length-1),r>=a.length&&(r=0),null===(n=a[r])||void 0===n||n.focus()}focusFirstOption(){requestAnimationFrame(()=>{var e;let t=null===(e=this.menuComponent)||void 0===e?void 0:e.querySelector('[tabindex="0"]');null==t||t.focus()})}preventScrollBubbling(e){e.stopPropagation()}init(e){let{component:i,title:n}=e;this.menuOptions=e,this.menuComponent=i,this.titleElement.innerText=n,this.setAttribute(t.PLAYER_MENU_ATTRIBUTES.OPEN,"false"),this.setAttribute(t.PLAYER_MENU_ATTRIBUTES.EXPANDED,"false"),this.onclick=e=>{e.stopPropagation()},this.buildHeader(),this.buildBackdrop(),this.buildModal()}buildHeader(){if(this.expander.setStyle({width:"9.5%",height:"4px",backgroundColor:"#404040",borderRadius:"1rem",margin:"0.5rem auto 0.8125rem auto",display:a.deviceDetector.isMobile?"flex":"none"}),this.titleElement.setStyle({fontFamily:l.Presets.playerFont,color:a.deviceDetector.isMobile?l.Colors.White:"#bababa",fontSize:a.deviceDetector.isMobile?"1rem":"0.75rem",fontWeight:a.deviceDetector.isMobile?"600":"400"}),this.header.setStyle({width:"100%",position:"relative",display:"flex",flexDirection:"column",justifyContent:a.deviceDetector.isMobile?"flex-start":"center",alignItems:a.deviceDetector.isMobile?"center":"flex-start",height:(a.deviceDetector.isMobile?72:56)+"px",padding:"0 1rem",boxSizing:"border-box"}),this.closeButton.setStyle({position:"absolute",right:"1.5rem",top:"1.5rem",cursor:"pointer",display:a.deviceDetector.isMobile?"block":"none"}),this.closeButton.setIconUrl(h.closeIconSvg),this.closeButton.setAriaLabel("Close closed captions menu"),this.closeButton.setAttribute("tabindex","0"),this.closeButton.onclick=()=>{this.collapse(),this.close()},a.deviceDetector.isMobile){let e=0,t=0,i=t=>{e=t.touches[0].clientY},n=e=>{t=e.touches[0].clientY},o=()=>{let i=e-t;i>50?this.expand():i<-50&&this.collapse()};a.deviceDetector.isMobile&&(this.header.addEventListener("touchstart",i),this.header.addEventListener("touchmove",n),this.header.addEventListener("touchend",o),this.detachTouchEventListeners=()=>{this.header.removeEventListener("touchstart",i),this.header.removeEventListener("touchmove",n),this.header.removeEventListener("touchend",o)})}this.header.append(this.closeButton),this.header.append(this.expander),this.header.append(this.titleElement)}buildBackdrop(){this.backdropContainer.onclick=this.onBackdropClick.bind(this),this.backdropContainer.setStyle({display:"none",position:"absolute",backgroundColor:"#131313",opacity:".5",top:"0",bottom:"0",left:"0",right:"0",zIndex:c.Z_INDEX.menuBackdrop,borderRadius:"desktop"===a.deviceDetector.platform||"tablet"===a.deviceDetector.platform?"20px":"0"})}buildModal(){var e,t;
1this.menuContainer.id="blaze-player-menu-container";let i=document.createElement("style");i.textContent=u.CUSTOM_SCROLLBAR_TEMPLATE,null===(e=this.shadowRoot)||void 0===e||e.appendChild(i);let n=document.createElement("slot");null===(t=this.shadowRoot)||void 0===t||t.appendChild(n),(0,d.mergeStyles)(this.menuComponent,{borderRadius:"0 0 .5rem .5rem",height:"calc(100% - "+(a.deviceDetector.isDesktop?56:72)+"px)"}),this.menuContainer.setStyle({display:"none",position:"absolute",backgroundColor:"#282828",bottom:a.deviceDetector.isMobile?"-100%":"auto",top:a.deviceDetector.isMobile?"auto":"50%",transform:a.deviceDetector.isMobile?"none":"translateY(-50%)",maxWidth:"360px",left:"1rem",right:"1rem",margin:a.deviceDetector.isMobile?"4.2rem auto 1.5rem auto":"0 auto",borderRadius:".5rem",boxShadow:"0 -8px 10px 2px rgba(0, 0, 0, 0.35)",zIndex:c.Z_INDEX.menu}),this.menuContainer.append(this.header),this.menuContainer.append(this.menuComponent)}open(){this.dispatchEvent(new CustomEvent(t.PLAYER_MENU_EVENTS.OPEN,{bubbles:!0,composed:!0,detail:{open:!0}}))}close(){this.dispatchEvent(new CustomEvent(t.PLAYER_MENU_EVENTS.CLOSE,{bubbles:!0,composed:!0,detail:{open:!1}}))}expand(){this.dispatchEvent(new CustomEvent(t.PLAYER_MENU_EVENTS.EXPAND,{bubbles:!0,composed:!0,detail:{expanded:!0}}))}collapse(){this.dispatchEvent(new CustomEvent(t.PLAYER_MENU_EVENTS.COLLAPSE,{bubbles:!0,composed:!0,detail:{expanded:!1}}))}onBackdropClick(){this.close()}onOpenChange(e){return n(this,void 0,void 0,function*(){e.detail.open?(this.setAttribute(t.PLAYER_MENU_ATTRIBUTES.OPEN,"true"),this.backdropContainer.setStyle({display:"block"}),this.menuContainer.setStyle({display:"block"}),a.deviceDetector.isMobile&&(yield this.animateMenu(this.menuOptions)),this.focusFirstOption()):(this.setAttribute(t.PLAYER_MENU_ATTRIBUTES.OPEN,"false"),a.deviceDetector.isMobile&&(yield this.animateMenu(this.menuOptions)),this.backdropContainer.setStyle({display:"none"}),this.menuContainer.setStyle({display:"none"}))})}onExpandedChange(e){return n(this,void 0,void 0,function*(){this.setAttribute(t.PLAYER_MENU_ATTRIBUTES.EXPANDED,e.detail.expanded.toString()),yield this.animateMenu(this.menuOptions)})}animateMenu(e){return n(this,void 0,void 0,function*(){return new Promise(i=>{let n=this.querySelector("#blaze-player-menu-container");if(!n)return;let o=(null==e?void 0:e.component.offsetHeight)||0,a={targets:n,duration:200,easing:"easeInQuad",complete:()=>i(),bottom:!0===this.getAttribute(t.PLAYER_MENU_ATTRIBUTES.OPEN)?"0":"-100%",height:!0===this.getAttribute(t.PLAYER_MENU_ATTRIBUTES.EXPANDED)?window.innerHeight-56+"px":o+72+"px"};(0,s.default)(a)})})}}t.BlazePlayerMenu=p},5417:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(8370),t),o(i(9090),t),o(i(6576),t),o(i(7525),t)},5486:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.URLManager=t.URL_PARAMS=void 0;let o=i(6450),s=i(4545),a=i(9266);t.URL_PARAMS={SESSION_ID:"wsc_session_id",USER_ID:"wsc_user_id",EXCLUDE_CONTENT_ID:"wsc_exclude_content_id"};class r{static resetLocationAfterContentClose(){let e=this.getHashMatch(),t=this.getHash();if(e){if(t)location.hash=t;else{let e=""+location.origin+location.pathname+location.search;history.replaceState(window.history.state,document.title,""+e)}}}static get shouldModifyUrlWithId(){return s.ConfigService.shouldModifyUrlWithStoryId||s.ConfigService.shouldModifyUrlWithContentId}static resetLocation(){if(!this.shouldModifyUrlWithId)return;let e=""+location.origin+location.pathname+location.search;history.replaceState(window.history.state,document.title,""+e)}
1static updateLocationContentHash(e){let{contentType:t="",contentId:i="",isAd:n=!1,pageId:o}=e;if("SingleContent"===s.VideoPlayerService.playReference||!s.ConfigService.shouldModifyUrlWithStoryId||!s.ConfigService.shouldModifyUrlWithContentId||n)return;this.isUpdateLocationByScript=!0;let a=this.getHashMatch(),r=this.getHash(),l=i&&t?this.buildContentHash(t,i,{pageId:o}):"";l&&i&&!a&&t?this.updateContentInHash(l):!i&&a?r?location.hash=r:this.resetLocation():l&&i&&a&&t&&(location.hash=(null==r?void 0:r.length)>1?r+"&"+l:l),this.isUpdateLocationByScript=!1}static buildContentHash(e,t,i){if(!e||!t)return"";let{pageId:n}=i||{};return"story"===e?"blaze/"+e+"/"+t+(n?"/page/"+n:""):"blaze/"+e+"/"+t}static getHashMatch(){return a.RegexStoryHash.test(document.location.hash)||a.RegexMomentHash.test(document.location.hash)||a.RegexVideoHash.test(document.location.hash)}static getHash(){return document.location.hash.replace(a.RegexStoryHash,"").replace(a.RegexMomentHash,"").replace(a.RegexVideoHash,"")}static updateContentInHash(e){e&&(location.hash=location.hash?location.hash+"&"+e:e)}static buildShareUrl(e,t,i){let n=this.buildContentHash(e,t,{pageId:i});if(!n)return window.location.href;let o=new URL(window.location.href),s=o.hash.replace(a.RegexStoryHash,"").replace(a.RegexMomentHash,"").replace(a.RegexVideoHash,"").replace(/^#/,"");return o.hash=s?s+"&"+n:n,o.toString()}static appendUrlForPrefetch(e,t=o.ONE_SECOND){e&&(document.head.querySelector('link[rel="prefetch"][href="'+e+'"]')||setTimeout(()=>{let t=document.createElement("link");t.rel="prefetch",t.href=e,document.head.appendChild(t)},t))}static navigateToLink(e){window.location.href=e}static removeUrlParamFromSearchParams(e,t){return t.delete(e),t}static removeStringParamsFromCurrentUrl(e){let t=new URL(window.location.href),i=new URLSearchParams(t.search);"string"==typeof e?i.delete(e):e.forEach(e=>i.delete(e)),t.search=i.toString(),window.history.replaceState(window.history.state,"",t.toString())}static updateParamInUrl(e,t){if(window.location.search.includes(e)){let i=new URLSearchParams(window.location.search);i.set(e,t),this.updateCurrentUrlWithParams(i)}}static updateCurrentUrlWithParams(e){window.history.replaceState(window.history.state,"",window.location.href.split("?")[0]+"?"+e.toString())}static navigateTo(e){return n(this,void 0,void 0,function*(){if("AUTO_ADVANCE"===e){let e=new URLSearchParams({[t.URL_PARAMS.SESSION_ID]:s.UserService.sessionId,[t.URL_PARAMS.USER_ID]:s.UserService.userId,[t.URL_PARAMS.EXCLUDE_CONTENT_ID]:s.VideoPlayerService.currentlyPlayedContentId});if(!s.ConfigService.autoAdvanceUrl)return;let i=new URL(s.ConfigService.autoAdvanceUrl);i.search=e.toString();let n=i.toString();s.ConfigService.staticContentType&&e.delete(t.URL_PARAMS.EXCLUDE_CONTENT_ID),this.updateCurrentUrlWithParams(e),this.navigateToLink(n)}})}}t.URLManager=r,r.isUpdateLocationByScript=!1,r.isBackWasCalled=!1,r.isAutoAdvancingEnabled=!1},5495:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FollowingsManager=void 0;class i{static isFollowing(e){return this.followedEntities.has(e)}static initialize(e){this.followedEntities=new Set(e)}static follow(e){this.followedEntities.add(e)}static unfollow(e){this.followedEntities.delete(e)}}t.FollowingsManager=i,i.followedEntities=new Set},5538:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetVideoBase=void 0;class i extends HTMLElement{constructor(){super(),this._lastProgress=0}setData(e){this.data=e}loadPoster(){throw Error("Method not implemented.")}play(){throw Error("unimplemented")}restartVideo(){this.currentTime=0,this.paused&&(this.load("direct"),this.play())}pause(){throw Error("unimplemented")}get paused(){throw Error("unimplemented")}get currentTime(){throw Error("unimplemented")}set currentTime(e){throw Error("unimplemented")}get muted(){throw Error("unimplemented")}get isAd(){return this._isAd}set isAd(e){this._isAd=e}removeLoader(){throw Error("Method not implemented.")}load(e){}unload(){}display(e){}hide(){}set muted(e){throw Error("unimplemented")}get duration(){throw Error("unimplemented")}get progress(){let e=0,t=this.duration,i=this.currentTime;return Number.isFinite(e=t&&i?i/t:NaN)&&!Number.isNaN(e)?(e>1?e=1:e<0&&(e=0),this._lastProgress=e,e):this._lastProgress||0}mainElement(){throw Error("unimplemented")}requestFrameCallback(e){throw Error("unimplemented")}connectedCallback(){throw Error("unimplemented")}disconnectedCallback(){throw Error("unimplemented")}render(){throw Error("unimplemented")}startEnter(){}endEnter(){}endExit(){}}t.BlazeWidgetVideoBase=i},5566:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0})},5573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FOLLOW_BUTTON_STATE_CHANGE=void 0,t.FOLLOW_BUTTON_STATE_CHANGE="follow-button-state-change"},5686:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Colors=void 0,t.Colors={DarkPrimary:"#0D0F14",DarkSecondary:"#232935",DarkTertiary:"#929CB3",LightPrimary:"#F8F9FB",LightSeconday:"#DFE1E4",Accent:"#5AA3FF",LiveChip:"#FF364E",ReadGray:"#9C9C9C",TimeColor:"#B6B7B8",White:"#FFFFFF",Black:"#000000",Gray:"#B6B7B8",Yellow:"#FFD325"}},5785:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(1091),t),o(i(5207),t),o(i(8639),t),o(i(1430),t),o(i(9696),t),o(i(8672),t),o(i(3166),t),o(i(9114),t),o(i(6656),t),o(i(5346),t)},5891:e=>{var t={"":!0,up:!0};function i(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,n=3,o=0,s=100,a=0,r=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!i(t))throw Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return n},set:function(e){if("number"!=typeof e)throw TypeError("Lines must be set to a number.");n=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!i(e))throw Error("RegionAnchorX must be between 0 and 100.");s=e}},regionAnchorX:{enumerable:!0,get:function(){return o},set:function(e){if(!i(e))throw Error("RegionAnchorY must be between 0 and 100.");o=e}},viewportAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!i(e))throw Error("ViewportAnchorY must be between 0 and 100.");r=e}},viewportAnchorX:{enumerable:!0,get:function(){return a}
1,set:function(e){if(!i(e))throw Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var i="string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase();!1===i||(l=i)}}})}},5923:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=function(e,t){let i=!1;return function(...s){return n(this,void 0,void 0,function*(){i||(e(...s),i=!0,yield(0,o.delay)(t),i=!1)})}};let o=i(9266)},5925:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},5929:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Stopwatch=void 0,t.Stopwatch=class{constructor(){this.isRunning=!1,this.extraTime=0,this.startTime=0}start(){this.isRunning||(this.isRunning=!0,this.startTime=Date.now())}pause(){this.isRunning&&(this.isRunning=!1,this.extraTime+=Date.now()-this.startTime)}durationMS(){return this.isRunning?Date.now()-this.startTime+this.extraTime:this.extraTime}reset(){this.isRunning=!1,this.extraTime=0,this.startTime=0}}},5943:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.UserService=void 0;let o=i(4545),s=i(4403),a=i(9965),r=i(9266),l=i(6450),d="accessToken",h="refreshToken",u="userId";class c extends(0,s.Singleton)(){constructor(){super(),this._userId="",this._sessionId="",this._abTest=null,o.EventBusService.subscribe("BlazeDatabaseServiceOpen",this.onBlazeDatabaseServiceOpen.bind(this)),o.EventBusService.subscribe("BlazeDatabaseServiceFailed",this.onBlazeDatabaseServiceFailed.bind(this))}get userId(){return this._userId}get sessionId(){return this._sessionId}get abTest(){return this._abTest}set abTest(e){this._abTest=e}init(){return n(this,void 0,void 0,function*(){this._sessionId=(0,r.getRandomId)(),o.ConfigService.shouldCreateUser&&(yield this.makeSureCurrentExternalUserTokenExists());let e=new URLSearchParams(window.location.search).get(s.URL_PARAMS.SESSION_ID);e&&(this._sessionId=e,s.URLManager.removeStringParamsFromCurrentUrl(s.URL_PARAMS.SESSION_ID))})}assignUserId(){return n(this,void 0,void 0,function*(){this._userId=yield this.getUserId()})}onBlazeDatabaseServiceOpen(){return n(this,void 0,void 0,function*(){try{yield this.assignUserId()}catch(e){}})}onBlazeDatabaseServiceFailed(){this._userId||(this._userId=(0,r.getRandomId)())}getUserId(){return n(this,void 0,void 0,function*(){if(this.userId)return this.userId;let e=yield this.fetchUserIdFromDatabase();return e||(e=yield this.handleMissingUserId()),yield o.DatabaseService.updateUserId(e),s.URLManager.removeStringParamsFromCurrentUrl(s.URL_PARAMS.USER_ID),e})}fetchUserIdFromDatabase(){return n(this,void 0,void 0,function*(){try{let e=(yield o.DatabaseService.getUserId()).data;return e?e.value:null}catch(e){return null}})}handleMissingUserId(){return n(this,void 0,void 0,function*(){return new URLSearchParams(window.location.search).get(s.URL_PARAMS.USER_ID)||(0,r.getRandomId)()})}makeSureCurrentExternalUserTokenExists(){return n(this,void 0,void 0,function*(){let e=this.getUserTokenDataFromStorage(),t=this.getStorageItem("externalId"),i=o.ConfigService.externalUserId;e&&t===i||(yield this.getAndStoreNewUserToken())})}getAndStoreNewUserToken(){return n(this,void 0,void 0,function*(){let e={externalId:o.ConfigService.externalUserId},{data:t,error:i,httpStatus:n}=yield o.ApiService.getUserToken(e);!i&&n===a.HttpStatus.Ok&&t&&this.storeUserTokenData(t,e.externalId)})}refreshUserToken(){return n(this,void 0,void 0,function*(){let e=this.getUserTokenDataFromStorage(),t=!1;if(e){let i={externalId:o.ConfigService.externalUserId,tokenData:e},n=0;for(;!t&&n<3;){let{data:e,error:s,httpStatus:l}=yield o.ApiService.refreshUserToken(i);!s&&l===a.HttpStatus.Ok&&e?(this.storeUserTokenData(e,i.externalId),t=!0):(yield(0,r.delay)(200),n++)}}t||(yield this.getAndStoreNewUserToken())})}storeUserTokenData(e,t){this.setStorageItem(d,e.accessToken),this.setStorageItem(h,e.refreshToken),this.setStorageItem(u,e.userId),this.setStorageItem("externalId",t)}getUserTokenDataFromStorage(){let e=this.getStorageItem(d),t=this.getStorageItem(h),i=this.getStorageItem(u);if(e&&t&&i)return{accessToken:e,refreshToken:t,userId:i}}setStorageItem(e,t){let i=l.WSC_STORAGE_PREFIX+e;t?localStorage.setItem(i,t):localStorage.removeItem(i)}getStorageItem(e){return localStorage.getItem(l.WSC_STORAGE_PREFIX+e)}}t.UserService=c.getInstance()},5990:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.WSC_STORAGE_PREFIX=void 0,t.WSC_STORAGE_PREFIX="wsc_ias_"},6025:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeVideoElement=void 0;let o=i(1908),s=i(4403),a=i(6450),r=i(9965),l=i(8921),d=i(4545),h=i(4906),u=i(9266),c=i(9126);class p extends c.BlazeWidgetVideoBase{constructor(e=d.VideoPlayerService){super(),this.videoPlayerState=e,this.shadow=this.attachShadow({mode:"open"}),this.video=document.createElement("video"),this.captionsElement=l.WidgetsFactory.create("blaze-widget-captions"),this.shareModal=l.WidgetsFactory.create("blaze-widget-share-modal"),this.widgetVastAd=new c.BlazeWidgetVastAd("video",this.getRefferingObject.bind(this)),this.adPercentageShownPlaces=new Map,this.adIndex=0,this.forceSkipPreroll=!1,this.lastSavedTime=0,this.shouldSaveAfterSeek=!1,this.inactivityEvents=["mousemove","keydown","scroll","touchstart"],this.contentType="video",this.data={},this.isActionBlocked=!1,this.isInitializing=!1,this.isLoaded=!1,this.isPausedManually=!1,this.videoSessionId=(0,u.getRandomId)(),this.startTrigger="",this.exitTrigger="",this.navigationType="",this.boundHandleLoaderDisplay=this.handleLoaderDisplay.bind(this),this.boundHandleLoaderHide=this.handleLoaderHide.bind(this),this.boundHandleTimeUpdate=this.handleVideoTimeUpdate.bind(this),this.boundHandleLoadedMetadata=this.handleLoadedMetadata.bind(this),this.boundHandleVideoEnded=this.handleVideoEnded.bind(this),this.boundHandleSeekDebounce=(0,s.debounce)(this.handleSeekRequest.bind(this),1e3),this.boundHandleMouseIn=this.handleMouseIn.bind(this),this.boundHandleMouseOut=this.handleMouseOut.bind(this),this.boundHandleMouseMove=this.handleMouseMove.bind(this),this.boundHandleOverlayEvents=this.handleOverlayEvents.bind(this),this.boundHandleAdStarted=this.handleAdStarted.bind(this),this.boundHandleAdEnded=this.handleAdEnded.bind(this),this.boundHandleLanguageChange=this.handleLanguageChange.bind(this),this.startOverlayAutoHideTimer=()=>{this.clearOverlayTimer(),this.inactivityTimeout=setTimeout(()=>{this.hidePlayerOverlay()},5e3)},s.deviceDetector.isMobile||s.deviceDetector.isTablet?this.boundHandleClick=(0,s.debounce)(this.handleClick.bind(this),250):this.boundHandleClick=this.handleClick.bind(this)}connectedCallback(){this.initialize(),this.setupEventListeners()}disconnectedCallback(){this.destroy()}attributeChangedCallback(e,t,i){t!==i&&this.applyAttribute(e,i)}setTheme(e){var t;this.playerStyle=e,null===(t=this.videoOverlay)||void 0===t||t.setTheme(e)}setWidgetItemParent(e){this.widgetParentItem=e}setData(e){this.data=e,this.adPercentageShownPlaces.clear()}setModal(e){this.modal=e}setEmbeddedRef(e){this.embeddedRef=e}setIsPlaying(e){this.videoOverlay.videoNavigationOverlay.setPlaying(e)}load(){return n(this,void 0,void 0,function*(){var e;if(this.isLoaded)return;this.isLoaded=!0,this.isActionBlocked=!0,this.videoOverlay.setMuteState(this.videoPlayerState.isMuted);let{title:t,id:i}=this.data;this.title=t,this.videoId=i;let[n,o]=yield Promise.all([d.VideoService.getVideoDataById(i),d.LikeService.isVideoLiked(i),this.setupClosedCaptions()]),a=(null==n?void 0:n.posterCurrentTime)||this.data.poster.rendition.url;this.video.poster=a,s.deviceDetector.isIOSMobileTabletSafari()&&(null===(e=this.posterOverlayElement)||void 0===e||e.setStyle({backgroundImage:"url("+a+")"})),this.isLiked=o,this.lastSavedTime=(null==n?void 0:n.currentTime)||0,this.data.cta&&this.setCta(this.data.cta),this.playbackStrategy.initialize({overlay:this.videoOverlay});let{url:r,bitRate:l,aspectRatio:h}=this.data.baseLayer.content.renditions[0];this.aspectRatio=h,this.playbackStrategy.loadSource(r,l,this.lastSavedTime)})}setupClosedCaptions(){return n(this,void 0,void 0,function*(){var e,t;let i=null===(e=this.data.closedCaptions)||void 0===e?void 0:e.find(e=>""+e.language===localStorage.getItem(a.LOCAL_STORAGE_KEY_LAST_SELECTED));this.videoOverlay.setClosedCaptionState((null===(t=this.data.closedCaptions)||void 0===t?void 0:t.length)?"enabled":"disabled"),this.videoOverlay.updateClosedCaptionButtonIcon(!!i),i&&(yield this.setClosedCaptions(i.files))})}setClosedCaptions(e){return n(this,void 0,void 0,function*(){var t,i;this.captionsElement.setAttribute("is-visible",e&&e.length?"true":"false"),"Content"===(null===(t=this.data)||void 0===t?void 0:t.type)&&(this.captionsElement.isConnected||null===(i=this.shadowRoot)||void 0===i||i.append(this.captionsElement),yield this.captionsElement.initialize(this.video,e))})}setCta(e){var t,i;!1!==(null===(i=null===(t=this.playerStyle)||void 0===t?void 0:t.cta)||void 0===i?void 0:i.isVisible)?this.videoOverlay.setCta(e):this.videoOverlay.removeCta()}setTitle(e){this.videoOverlay.setAttribute("video-title",e)}setLiked(e){this.videoOverlay.setLikedState(e)}setVideoId(e){this.video.setAttribute("data-video-id",e)}createSnapshot(){return n(this,void 0,void 0,function*(){yield new Promise(e=>setTimeout(e,100));let e=document.createElement("canvas"),t=this.video.videoWidth,i=this.video.videoHeight;e.width=t,e.height=i;let n=e.getContext("2d"),o="",s=0;return n&&(s=this.video.currentTime,n.drawImage(this.video,0,0,t,i),o=0===e.toDataURL("image/webp").indexOf("data:image/webp")?e.toDataURL("image/webp",.5):e.toDataURL("image/jpeg",.5)),{currentTime:s,snapshotDataUrl:o}})}unload(){var e;this.isLoaded&&(this.isLoaded=!1,this.videoOverlay.removeCta(),this.videoOverlay.videoSeekBar.reset(),this.videoOverlay.videoTimer.resetTimer(),this.playbackStrategy.unload(),s.deviceDetector.isIOSMobileTabletSafari()&&(null===(e=this.posterOverlayElement)||void 0===e||e.setStyle({backgroundImage:""})),this.lastMarkedVideoIdAsViewed=void 0)}initialize(){var e;this.isInitializing||(this.isInitializing=!0,this.playbackStrategy=o.PlaybackStrategyFactory.createStrategy(this.video,"LONG_FORM_HLS",void 0,this.videoPlayerState),this.playerCommands=new o.VideoPlayerCommands(this.playbackStrategy,this),this.videoOverlay=new o.BlazeLongFormControlsOverlay(this),this.videoOverlay.setTheme(this.playerStyle),this.videoOverlay.videoTimer.resetTimer(),this.videoOverlay.videoSeekBar.onPause=(0,s.debounce)(()=>{this.pause()},100),this.videoOverlay.videoSeekBar.onResume=()=>n(this,void 0,void 0,function*(){yield this.play()}),this.setAttribute("mute",this.videoPlayerState.isMuted?"true":"false"),this.videoOverlay.setMuteState(this.videoPlayerState.isMuted),this.captionsElement.setAttribute("hidden","true"),this.setupStyles(),this.setupVideoElement(),this.setupOverlay(),this.setupShareModal(),d.ConfigService.shouldAllowClosedCaptions&&this.configureClosedCaptionsModal(),s.deviceDetector.isIOSMobileTabletSafari()&&this.createPosterOverlay(),null===(e=this.shadowRoot)||void 0===e||e.appendChild(this.widgetVastAd))}setupStyles(){let e=document.createElement("style");e.textContent="\n :host {\n display: block;\n width: 100%;\n height: 100%;\n overflow: hidden;\n min-height: 100%;\n }\n video {\n width: 100%;\n height: 100%;\n display: block;\n }\n ",this.shadow.appendChild(e)}setupVideoElement(){this.video.setAttribute("preload","none"),this.video.setAttribute("playsinline","true"),this.video.setAttribute("webkit-playsinline","true"),this.video.controls=!1,this.shadow.appendChild(this.video)}setupOverlay(){this.shadow.appendChild(this.videoOverlay)}setupShareModal(){this.shareModal.setStyle({zIndex:"5",display:"block",position:"relative",pointerEvents:"auto"}),this.shareModal.onOpen=()=>{this.pause()},this.shadow.appendChild(this.shareModal)}configureClosedCaptionsModal(){this.closedCaptionsModal=new c.BlazeWidgetClosedCaptionsModal(this.data.closedCaptions,"video"),this.closedCaptionsModal.onClose=()=>{this.isPausedManually||(this.videoPlayerState.isPlaying=!0,this.setIsPlaying(!0),this.play())},this.closedCaptionsModal.onOpen=()=>{this.videoPlayerState.isPlaying&&(this.videoPlayerState.isPlaying=!1,this.setIsPlaying(!1),this.pause())},this.closedCaptionsModal.onClosedCaptionsEnable=e=>{this.toggleClosedCaptions(e)},this.closedCaptionsModal.onClosedCaptionsDisable=()=>{this.toggleClosedCaptions()},this.shadow.appendChild(this.closedCaptionsModal)}toggleClosedCaptions(e){var t,i;this.setClosedCaptions((null===(i=null===(t=this.data.closedCaptions)||void 0===t?void 0:t.find(t=>""+t.language===e))||void 0===i?void 0:i.files)||[]);let n=(0,u.convertCcLanguageToState)(this.data.closedCaptions,e);this.event("Off"!==n?a.VideoAction.ClosedCaptionsOn:a.VideoAction.ClosedCaptionsOff,{})}setupEventListeners(){this.video.addEventListener(o.EVENTS.TIMEUPDATE,this.boundHandleTimeUpdate),this.video.addEventListener(o.EVENTS.LOADED_METADATA,this.boundHandleLoadedMetadata),this.video.addEventListener(o.EVENTS.ENDED,this.boundHandleVideoEnded),document.addEventListener(o.VIDEO_EVENTS.LOADER_DISPLAY,this.boundHandleLoaderDisplay),document.addEventListener(o.VIDEO_EVENTS.LOADER_HIDE,this.boundHandleLoaderHide),Object.values(o.VIDEO_EVENTS).forEac
1h(e=>{this.videoOverlay.addEventListener(e,this.boundHandleOverlayEvents)}),s.deviceDetector.isDesktop&&(this.addEventListener(o.EVENTS.MOUSEENTER,this.boundHandleMouseIn),this.addEventListener(o.EVENTS.MOUSELEAVE,this.boundHandleMouseOut),this.addEventListener(o.EVENTS.MOUSEMOVE,this.boundHandleMouseMove)),this.addEventListener(o.EVENTS.CLICK,this.boundHandleClick),this.addEventListener(r.InternalEvent.AD_STARTED,this.boundHandleAdStarted),this.addEventListener(r.InternalEvent.AD_ENDED,this.boundHandleAdEnded),u.SharedEventTarget.addEventListener(a.CLOSED_CAPTIONS_LANGUAGE_CHANGE,this.boundHandleLanguageChange),this.inactivityEvents.forEach(e=>{document.addEventListener(e,this.startOverlayAutoHideTimer)})}destroy(){this.playbackStrategy.destroy(),this.video.removeEventListener(o.EVENTS.TIMEUPDATE,this.boundHandleTimeUpdate),this.video.removeEventListener(o.EVENTS.LOADED_METADATA,this.boundHandleLoadedMetadata),this.video.removeEventListener(o.EVENTS.ENDED,this.boundHandleVideoEnded),document.removeEventListener(o.VIDEO_EVENTS.LOADER_DISPLAY,this.boundHandleLoaderDisplay),document.removeEventListener(o.VIDEO_EVENTS.LOADER_HIDE,this.boundHandleLoaderHide),Object.values(o.VIDEO_EVENTS).forEach(e=>{this.videoOverlay.removeEventListener(e,this.boundHandleOverlayEvents)}),s.deviceDetector.isDesktop&&(this.removeEventListener(o.EVENTS.MOUSEENTER,this.boundHandleMouseIn),this.removeEventListener(o.EVENTS.MOUSELEAVE,this.boundHandleMouseOut),this.removeEventListener(o.EVENTS.MOUSEMOVE,this.boundHandleMouseMove)),this.removeEventListener(o.EVENTS.CLICK,this.boundHandleClick),this.removeEventListener(r.InternalEvent.AD_STARTED,this.boundHandleAdStarted),this.removeEventListener(r.InternalEvent.AD_ENDED,this.boundHandleAdEnded),u.SharedEventTarget.removeEventListener(a.CLOSED_CAPTIONS_LANGUAGE_CHANGE,this.boundHandleLanguageChange),this.inactivityEvents.forEach(e=>{document.removeEventListener(e,this.startOverlayAutoHideTimer)}),this.clearOverlayTimer()}clearOverlayTimer(){this.inactivityTimeout&&(clearTimeout(this.inactivityTimeout),this.inactivityTimeout=void 0)}handleMouseIn(){this.clearOverlayTimer(),this.showPlayerOverlay()}handleMouseOut(){this.startOverlayAutoHideTimer()}handleMouseMove(){this.clearOverlayTimer(),this.showPlayerOverlay(),this.startOverlayAutoHideTimer()}handleClick(e){var t,i;if(d.VideoPlayerService.isSeekBarDragging||this.isActionBlocked)return;(null===(t=this.shareModal)||void 0===t?void 0:t.isOpen)&&(null===(i=this.shareModal)||void 0===i||i.close());let n="true"===this.videoOverlay.getAttribute("hidden");if(this.video.paused){if(s.deviceDetector.isMobile||s.deviceDetector.isTablet)return void(n?this.showPlayerOverlay():this.hidePlayerOverlay(!0));this.play(),this.isPausedManually=!1,this.showPlayerOverlay(),this.event(a.VideoAction.PlaybackPlay,{video_end_trigger:"user_play"})}else{if(s.deviceDetector.isMobile||s.deviceDetector.isTablet)return void(n?this.showPlayerOverlay():this.hidePlayerOverlay(!0));this.pause(),this.isPausedManually=!0,this.showPlayerOverlay(),this.event(a.VideoAction.PlaybackPause,{video_end_trigger:"user_pause"})}this.videoOverlay.videoNavigationOverlay.setPlaying(!this.video.paused)}showPlayerOverlay(){this.videoOverlay.setAttribute("hidden","false")}hidePlayerOverlay(e){e?this.videoOverlay.setAttribute("hidden","true"):this.video.paused||d.VideoPlayerService.isSeekBarDragging||this.video.readyState<2||!navigator.onLine?this.startOverlayAutoHideTimer():this.videoOverlay.setAttribute("hidden","true")}createPosterOverlay(){var e,t,i,n;!this.posterOverlayElement&&(null===(i=null===(t=null===(e=this.data)||void 0===e?void 0:e.poster)||void 0===t?void 0:t.rendition)||void 0===i?void 0:i.url)&&(this.posterOverlayElement=l.WidgetsFactory.create("blaze-image"),this.posterOverlayElement.setStyle({position:"absolute",top:"0",left:"0",width:"100%",height:"100%",zIndex:"2",display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none"}),null===(n=this.shadowRoot)||void 0===n||n.appendChild(this.posterOverlayElement),this.updatePosterOverlay())}updatePosterOverlay(){var e,t,i;if(!this.posterOverlayElement||!(null===(i=null===(t=null===(e=this.data)||void 0===e?void 0:e.poster)||void 0===t?void 0:t.rendition)||void 0===i?void 0:i.url))return;let n=16/9;this.video.videoWidth&&this.video.videoHeight&&(n=this.video.videoWidth/this.video.videoHeight);let o=n<1;this.posterOverlayElement.setStyle({backgroundImage:"url("+this.data.poster.rendition.url+")",backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundColor:o?"#000000":"transparent"})}handleVideoEnded(){return n(this,void 0,void 0,function*(){this.event(a.VideoAction.VideoEnd,{}),this.navigationType="Automatic",this.exitTrigger="Video End";try{yield d.VideoService.updateVideoDataById(this.videoId,{posterCurrentTime:this.data.poster.rendition.url,currentTime:0})}catch(e){}this.dispatchEvent(new CustomEvent(o.VIDEO_EVENTS.NAVIGATION_NEXT,{bubbles:!0,composed:!0})),this.showPlayerOverlay(),this.startOverlayAutoHideTimer()})}showLoaderWithDelay(){this.loaderTimeoutId&&clearTimeout(this.loaderTimeoutId),this.loaderTimeoutId=setTimeout(()=>{this.handleLoaderDisplay()},1e3)}hideLoader(){this.loaderTimeoutId&&(clearTimeout(this.loaderTimeoutId),this.loaderTimeoutId=void 0),this.handleLoaderHide()}handleLoaderDisplay(){!this.video.paused&&this.video.readyState>=3||this.videoOverlay.showLoader()}handleLoaderHide(){this.videoOverlay.hideLoader()}handleOverlayEvents(e){var t,i;switch(e.type){case o.VIDEO_EVENTS.MUTE:this.playerCommands.executeCommand("mute"),this.startOverlayAutoHideTimer(),this.event(a.VideoAction.Audio,{});break;case o.VIDEO_EVENTS.UNMUTE:this.playerCommands.executeCommand("unmute"),this.startOverlayAutoHideTimer(),this.event(a.VideoAction.Audio,{});break;case o.VIDEO_EVENTS.SEEK:let{seekTime:n,type:s}=e.detail;this.handleSeek(n,s);break;case o.VIDEO_EVENTS.DISPLAY_SEEKED_TIME:let{seekTime:r}=e.detail;this.videoOverlay.videoTimer.setLayout("seeking"),this.videoOverlay.setCurrentTime(r*this.video.duration);break;case o.VIDEO_EVENTS.FULLSCREEN:this.event(a.VideoAction.ScreenChange,{screen_state:{current_state:"normal"===this.videoPlayerState.playerLayout?"default_view":"full_screen",next_state:"normal"===this.videoPlayerState.playerLayout?"full_screen":"default_view"}}),this.playerCommands.executeCommand("toggleFullscreen"),this.startOverlayAutoHideTimer();break;case o.VIDEO_EVENTS.SHARE:this.handleShareClick(),this.startOverlayAutoHideTimer();break;case o.VIDEO_EVENTS.LIKE:this.playerCommands.executeCommand("likeVideo"),this.startOverlayAutoHideTimer(),this.event(this.isLiked?a.VideoAction.Like:a.VideoAction.Unlike,{});break;case o.VIDEO_EVENTS.CTA_CLICKED:this.handleCtaClick(e),this.showPlayerOverlay();break;case o.VIDEO_EVENTS.CTA_DISMISS:this.event(a.VideoAction.CtaDismissed,{});break;case o.VIDEO_EVENTS.CTA_VISIBILE:this.event(a.VideoAction.CtaVisible,{});break;case o.VIDEO_EVENTS.PLAY:this.isPausedManually=!1,this.event(a.VideoAction.PlaybackPlay,{video_end_trigger:"user_play"}),this.play();break;case o.VIDEO_EVENTS.PAUSE:this.isPausedManually=!0,this.event(a.VideoAction.PlaybackPause,{video_end_trigger:"user_pause"}),this.pause();break;case o.VIDEO_EVENTS.NAVIGATION_PREV:case o.VIDEO_EVENTS.NAVIGATION_NEXT:this.event(a.VideoAction.VideoEnd,{}),this.exitTrigger="Skip";break;case o.VIDEO_EVENTS.CLOSE_PLAYER:let{exitTrigger:l}=e.detail;this.exitTrigger=l,this.event(a.VideoAction.VideoEnd,{}),null===(t=this.modal)||void 0===t||t.close();break;case o.VIDEO_EVENTS.CLOSED_CAPTIONS_OPEN_MODAL:null===(i=this.closedCaptionsModal)||void 0===i||i.open();break;case o.VIDEO_EVENTS.DISPLAY_HIDE_OVERLAY_FROM_CTA:this.handleClick(e);break;case o.VIDEO_EVENTS.UPDATE_CLOSED_CAPTIONS_LOCATION:let{top:d,left:h}=e.detail;this.captionsElement.setAbsolutePosition({top:d,left:h})}}handleCtaClick(e){var t,i,n,o,s,l,h,u;let{url:c}=e.detail;return this.event(a.VideoAction.CtaClick,{}),(null===(i=null===(t=this.refContentModal)||void 0===t?void 0:t.parentWidget)||void 0===i?void 0:i.id)&&d.EventService.dispatch(null===(n=this.refContentModal)||void 0===n?void 0:n.parentWidget,r.Delegation.onWidgetTriggerCTA,{widgetId:null===(s=null===(o=this.refContentModal)||void 0===o?void 0:o.parentWidget)||void 0===s?void 0:s.id,actionType:"URL",actionParam:c}),null===(l=this.shareModal)||void 0===l||l.close(),this.exitTrigger="CTA Click",this.event(a.VideoAction.VideoEnd,{}),(null===(h=this.video)||void 0===h?void 0:h.paused)||((null===(u=this.modal)||void 0===u?void 0:u.player).resumeAfterFocus=!0,this.pause()),!0}setPlayerLayoutToNormal(){this.videoOverlay.setFullscreenState(!1)}handleSeekRequest(e,t){return n(this,void 0,void 0,function*(){let i=this.video.currentTime,n=e;(e>.99||e*this.video.duration>this.video.duration-5)&&(n=Math.max(0,this.video.duration-5)/this.video.duration);let o=n*this.video.duration,s={seek_total_time:Math.abs(e*this.video.duration-this.video.currentTime),seek_direction:o>i?"Forward":"Backward",seek_type:t};this.lastSeekAction={action:t,currentTime:i,seekedTime:o},this.event(a.VideoAction.Seek,s),yield this.playerCommands.executeCommand("seek",n),5>=Math.abs(this.video.currentTime-i)&&(this.shouldSaveAfterSeek=!0),d.VideoPlayerService.isSeekBarDragging?this.hideLoader():this.play()})}handleSeek(e,t){this.video.paused||this.pause(),this.showLoaderWithDelay(),this.videoOverlay.videoTimer.setLayout("seeking"),this.videoOverlay.setCurrentTime(e*this.video.duration),this.boundHandleSeekDebounce(e,t)}handleShareClick(){var e;let t;this.videoPlayerState.isPlaying&&this.pause(),t=location.href.includes("blaze/video")||"SingleContent"===d.VideoPlayerService.playReference?null==window?void 0:window.location.href:location.href.includes("#")?location.href+"&blaze/video/"+this.videoId:location.href+"#blaze/video/"+this.videoId,(null==navigator?void 0:navigator.share)?navigator.share({text:this.data.title,url:t}).then(()=>{}).catch(e=>{var i;"AbortError"!==e.name&&(null===(i=this.shareModal)||void 0===i||i.open(t))}).finally(()=>{this.hideLoader(),this.videoPlayerState.isPlaying&&this.play()}):null===(e=this.shareModal)||void 0===e||e.open(t),this.event(a.VideoAction.Share,{})}pause(){this.playerCommands.executeCommand("pause"),this.videoOverlay.videoSeekBar.onContentPaused(),this.captionsElement.setAttribute("text-color","#7E7E7E")}play(){return n(this,void 0,void 0,function*(){var e;if(this.clearOverlayTimer(),yield this.tryToPlayAd({current:this.data.extraInfo}))return;let t=this.data.poster.rendition.url;this.videoId&&t&&this.videoId!==this.lastMarkedVideoIdAsViewed&&(yield d.VideoService.markVideoAsViewed(this.videoId,t),this.lastMarkedVideoIdAsViewed=this.videoId,!d.ConfigService.shouldModifyUrlWithContentId||this.embeddedRef instanceof c.BlazeWidgetEmbeddedVideo||s.URLManager.updateLocationContentHash({contentType:"video",contentId:this.videoId})),this.showLoaderWithDelay(),(yield this.playerCommands.executeCommand("play")).status===o.PlayStatus.Success?(this.videoOverlay.videoSeekBar.onContentResumed(),this.videoOverlay.videoTimer.setLayout("player"),this.videoOverlay.videoNavigationOverlay.hideReplayButton(),this.captionsElement.setAttribute("text-color",h.Colors.White),this.setIsPlaying(!0),this.videoPlayerState.isPlaying=!0,this.data.hasViewed||(this.data.hasViewed=!0,this.updateWidgetStatusReadUnread()),this.shouldSaveAfterSeek&&(this.saveCurrentTime(!0),this.shouldSaveAfterSeek=!1)):(this.setIsPlaying(!1),this.videoPlayerState.isPlaying=!1),this.hideLoader(),this.isActionBlocked=!1,this.startOverlayAutoHideTimer(),null===(e=this.posterOverlayElement)||void 0===e||e.setStyle({backgroundImage:""})})}updateMuteButtonState(e){this.videoOverlay.setMuteState(e)}handleLoadedMetadata(){return n(this,void 0,void 0,function*(){this.videoOverlay.setVideoDuration(this.video.duration)})}updateWidgetStatusReadUnread(){this.widgetParentItem&&(this.widgetParentItem.updateWidget(),this.widgetParentItem.setChipStyle(),this.widgetParentItem.render(),this.widgetParentItem.updateWidgetItemPadding())}handleVideoTimeUpdate(){return n(this,void 0,void 0,function*(){this.video.duration&&!this.video.paused&&this.videoOverlay.setCurrentTime(this.video.currentTime),this.videoOverlay.videoSeekBar.updateProgressBar(this.video.currentTime,this.video.duration),yield this.saveCurrentTime()})}saveCurrentTime(){return n(this,arguments,void 0,function*(e=!1){if(!(this.video.currentTime-this.lastSavedTime>=5||e))return;let t=this.video.currentTime;this.lastSavedTime=e?t:this.video.currentTime;try{let{currentTime:e,snapshotDataUrl:t}=yield this.createSnapshot();yield d.VideoService.updateVideoDataById(this.data.id,{posterCurrentTime:t,currentTime:e})}catch(e){}})}handleLanguageChange(e){var t;let i=null===(t=this.data.closedCaptions)||void 0===t?void 0:t.find(t=>""+t.language===e.detail.language);this.videoOverlay.updateClosedCaptionButtonIcon(!!i)}handleAdStarted(){this.adIndex++,this.isPlayingAd=!0,this.pause()}handleAdEnded(){this.isPlayingAd=!1,this.play()}static get observedAttributes(){return["mute","video-id","video-title","poster","is-liked","loading"]}get mute(){return this.video.muted}set muted(e){this.setAttribute("mute",!0===e?"true":"false")}get videoId(){return this.getAttribute("video-id")||""}set videoId(e){this.setAttribute("video-id",e)}get title(){return this.getAttribute("video-title")||""}set title(e){this.setAttribute("video-title",e)}get isLiked(){return"true"===this.getAttribute("is-liked")}set isLiked(e){this.setAttribute("is-liked",!0===e?"true":"false")}get isPlayingAd(){return"true"===this.getAttribute("is-playing-ad")}set isPlayingAd(e){this.setAttribute("is-playing-ad",!0===e?"true":"false")}applyAttribute(e,t){switch(e){case"mute":this.playbackStrategy.setMuted("true"===t),this.updateMuteButtonState("true"===t);break;case"video-id":this.setVideoId(t);break;case"video-title":this.setTitle(t);break;case"is-liked":this.setLiked("true"===t)}}updatePlayerButtonIcons(){}resetPosition(){}render(){}getRefferingObject(){var e,t;let i=new s.ReferringEventInfo,n=(null===(e=this.widgetParentItem)||void 0===e?void 0:e.parentRef)||(null===(t=this.refContentModal)||void 0===t?void 0:t.parentWidget);
1if(n&&n instanceof c.BlazeWidgetLayout&&(i.origin_widget_id=n.id,i.origin_widget_type=n.widgetType(),i.labels_expression=n.getAttribute("labels")),d.ConfigService.staticContentType&&(i.story_source="OneBox"),document.referrer){i.referrer_page_url=document.referrer;let e=document.referrer.indexOf("#blaze"),t=-1!==e?document.referrer.slice(0,e):document.referrer;i.referrer_page_type=/^(https?:\/\/[^/]+\/?)$/i.test(t)?"Homepage":"Category/Article",i.referrer_page_domain=document.referrer?new URL(document.referrer).hostname:""}return i}event(e,t){return n(this,arguments,void 0,function*(e,t,i){var n,o,r,l;try{let h=this.getRefferingObject();if("Content"===this.data.type){t.video_id=this.data.id,t.video_title=this.data.title,t.cc_state=(0,u.convertCcLanguageToState)(this.data.closedCaptions,localStorage.getItem(a.LOCAL_STORAGE_KEY_LAST_SELECTED)),t.video_session_id=this.videoSessionId;let c=s.deviceDetector.screenOrientation;if(t.player_orientation=c.toString().charAt(0).toUpperCase()+c.toString().slice(1).toLowerCase(),t.device_orientation="Horizontal"===this.aspectRatio?"Landscape":"Portrait",t.screen_state=t.screen_state||{current_state:"normal"===this.videoPlayerState.playerLayout?"default_view":"full_screen"},null===(n=this.data.cta)||void 0===n?void 0:n.url){let{duration:e,behavior:i}=this.playerStyle.cta.visibility;t.cta_config={visibile_duration:e||0,type:i||""}}else t.cta_config="";switch(t.audio_state=this.videoPlayerState.isMuted?"Mute":"Unmute",t.video_start_trigger=this.startTrigger,t.video_time_start=this.video.currentTime,t.video_duration=this.video.duration,"true"===(null===(r=null===(o=d.AppConfigurationService.appConfigurations)||void 0===o?void 0:o.configurations)||void 0===r?void 0:r.analyticsAddEntitiesInfo)&&(t.content_extra_info=JSON.stringify(this.data.extraInfo)),e){case a.VideoAction.VideoEnd:t.video_end_trigger=this.exitTrigger,t.video_time_end=this.video.currentTime,t.video_time_start=void 0;break;case a.VideoAction.Seek:t.video_time_end=this.lastSeekAction.seekedTime,t.video_time_start=null===(l=this.lastSeekAction)||void 0===l?void 0:l.currentTime}t.localization=this.data.retrievedLanguages||{},d.AnalyticsService.pushVideoEvent(e,t,i,h)}}catch(e){}})}tryToPlayAd(e){return n(this,void 0,void 0,function*(){var t;if(this.forceSkipPreroll)return this.forceSkipPreroll=!1,this.adPercentageShownPlaces.set(0,!0),!1;if(this.data.adInfo&&(0,u.isImaAdInfo)(this.data.adInfo)&&!this.adPercentageShownPlaces.get(0)){let i;this.adPercentageShownPlaces.set(0,!0);try{(!(i=null===(t=this.playbackStrategy)||void 0===t?void 0:t.getDuration())||isNaN(i)||i<=0)&&(i=void 0)}catch(e){i=void 0}return yield this.widgetVastAd.startAd({videoElement:this.video,adInfo:this.data.adInfo,contentExtraInfo:e,addCustomParams:void 0,addExtraAnalyticsParams:()=>({ad_index:this.adIndex.toString(),session_id:this.videoSessionId,video_id:this.data.id,video_title:this.data.title}),videoUrl:this.data.baseLayer.content.renditions[0].url,videoDuration:i})}return!1})}markPrerollAsPlayed(){this.adPercentageShownPlaces.set(0,!0)}skipNextPrerollOnce(){this.forceSkipPreroll=!0}}t.BlazeVideoElement=p},6121:(e,t)=>{"use strict";var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ConsentEvent=t.InteractionEvent=t.ImaAdEvent=t.AdEvent=t.VideoEvent=t.WidgetEvent=t.MomentEvent=t.StoryEvent=t.AnalyticsEvent=t.ReferringEventInfo=t.Category=void 0,(n=i||(t.Category=i={})).Story="story",n.Moment="moment",n.Widget="widget",n.Video="video",n.Ad="ad",n.Interaction="interaction",n.Consent="consent";class o{}class s{}class a{}class r{}t.ReferringEventInfo=r,t.AnalyticsEvent=class{constructor(){this.event_label="",this.session_id="",this.user=new o,this.tech=new s,this.geo=new a,this.wsc_internal={customer_name:"",customer_id:""},this.page={page_url:""},this.referring=new r}},t.StoryEvent=class{},t.MomentEvent=class{},t.WidgetEvent=class{},t.VideoEvent=class{},t.AdEvent=class{},t.ImaAdEvent=class{},t.InteractionEvent=class{},t.ConsentEvent=class{}},6133:function(e,t){"use strict";var i=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};
1Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerThrottle=void 0,t.LoggerThrottle=class{constructor(){this.batchIntervalMs=0,this.logCount=0,this.batchInterval=null,this.batchCallback=null,this._maxBatchSize=0,this._minBatchSize=0}get minBatchSize(){return this._minBatchSize}get maxBatchSize(){return this._maxBatchSize}updateConfiguration(e){this.batchIntervalMs=e.batchIntervalMs,this._maxBatchSize=e.maxBatchSize,this._minBatchSize=e.minBatchSize,this.setupBatchInterval()}onBatchReady(e){this.batchCallback=e,this.batchIntervalMs>0&&this.setupBatchInterval()}destroy(){this.batchInterval&&(clearInterval(this.batchInterval),this.batchInterval=null),this.logCount=0,this.batchCallback=null}setupBatchInterval(){this.batchInterval&&clearInterval(this.batchInterval),this.batchInterval=setInterval(()=>i(this,void 0,void 0,function*(){var e;try{yield null===(e=this.batchCallback)||void 0===e?void 0:e.call(this)}catch(e){}}),this.batchIntervalMs)}incrementLogCount(){this.logCount++}shouldTriggerBatch(){return this.logCount>=this._maxBatchSize&&(this.logCount=0,!0)}}},6206:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetShareModal=void 0;let o=i(4403),s=i(8921),a=i(277),r=i(4906);class l extends o.BaseWidget{constructor(){var e,t;super(),this.shareUrl="",this.shareContainer=s.WidgetsFactory.create("blaze-div"),this.shareDrawer=s.WidgetsFactory.create("blaze-modal"),this.shareDrawer.onOpen=null===(e=this.onDarwerOpen)||void 0===e?void 0:e.bind(this),this.shareDrawer.onClose=null===(t=this.onDrawerClose)||void 0===t?void 0:t.bind(this)}connectedCallback(){return n(this,void 0,void 0,function*(){this.shareContainer.setStyle({display:"flex",flexDirection:"column",height:"12rem",fontSize:".8rem",fontFamily:r.Presets.playerFont,color:"#000"}),this.render()})}disconnectedCallback(){this.removeChild(this.shareDrawer)}attributeChangedCallback(e,t,i){}onDarwerOpen(){var e;null===(e=this.onOpen)||void 0===e||e.call(this)}onDrawerClose(){var e;null===(e=this.onClose)||void 0===e||e.call(this)}open(e){this.shareUrl=e,this.shareDrawer.open()}close(){this.shareDrawer.close()}get isOpen(){return!0===this.shareDrawer.getAttribute("open")}renderButtons(){let e=s.WidgetsFactory.create("blaze-div");e.setStyle({display:"flex",gap:"1rem",padding:"1rem 1.5rem",alignItems:"center"}),[{type:"copy-link",onClick:()=>{(null==navigator?void 0:navigator.clipboard)&&navigator.clipboard.writeText(this.shareUrl),this.close()}}].forEach(t=>{let i=s.WidgetsFactory.create("blaze-share-button");i.type=t.type,i.onClick=e=>{var n;t.onClick(e),null===(n=this.onClick)||void 0===n||n.call(this,i)},e.append(i)}),this.shareContainer.append(e),this.shareDrawer.init({anchor:"bottom",component:this.shareContainer}),this.append(this.shareDrawer)}renderTitle(){let e=s.WidgetsFactory.create("blaze-div");e.setStyle({display:"flex",gap:"1rem",borderBottom:"solid 1px #d1d1d1",padding:"1rem 1.5rem",alignItems:"center"});let t=s.WidgetsFactory.create("blaze-div");t.setStyle({display:"flex",alignItems:"center",justifyContent:"center",width:"3rem",height:"3rem",borderRadius:".3rem",border:"solid 1px #d1d1d1"});let i=s.WidgetsFactory.create("blaze-div");i.setStyle({display:"block",width:"1.5rem",height:"1.5rem",cursor:"pointer",flexShrink:"0",background:"center center url('"+a.IconGlobe+"') no-repeat",backgroundSize:"contain"});let n=s.WidgetsFactory.create("blaze-typography");n.text=location.origin,t.append(i),e.append(t),e.append(n),this.shareContainer.append(e)}render(){this.renderTitle(),this.renderButtons()}}t.BlazeWidgetShareModal=l},6248:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};
1Object.defineProperty(t,"__esModule",{value:!0}),t.LoggerService=void 0;let o=i(4545),s=i(4403),a=i(2668),r=i(9965);class l extends(0,s.Singleton)(){constructor(){super(),this.loggerManager=new s.LoggerManager(new a.LoggerDatabaseAdapter)}init(){return n(this,void 0,void 0,function*(){var e;return yield this.loggerManager.init(null===(e=o.AppConfigurationService.appConfigurations)||void 0===e?void 0:e.sdkLoggerConfigurations)})}destroy(){return n(this,void 0,void 0,function*(){return this.loggerManager.destroy()})}updateConfiguration(e){this.loggerManager.updateConfiguration(e)}log(e,t,i){return n(this,arguments,void 0,function*(e,t,i,n={}){switch(e){case r.LogLevel.DEBUG:return this.loggerManager.log(r.LogLevel.DEBUG,t,i,n);case r.LogLevel.INFO:return this.loggerManager.log(r.LogLevel.INFO,t,i,n);case r.LogLevel.WARN:return this.loggerManager.log(r.LogLevel.WARN,t,i,n);case r.LogLevel.ERROR:return this.loggerManager.log(r.LogLevel.ERROR,t,i,n);case r.LogLevel.CRITICAL:return this.loggerManager.log(r.LogLevel.CRITICAL,t,i,n)}})}}t.LoggerService=l.getInstance()},6308:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.EventService=void 0;let o=i(4403),s=i(9965);class a extends(0,o.Singleton)(){constructor(){super()}init(){return n(this,void 0,void 0,function*(){this.rootElement=document.querySelector("blaze-sdk")})}dispatch(e,t,i={}){var n;let o=new CustomEvent(t.toString(),{bubbles:!0,detail:i,cancelable:!0});return null===(n=e.dispatchEvent)||void 0===n||n.call(e,o),{mainEvent:o}}dispatchAnaltyicsEvents(e,t){var i,n;let o=new CustomEvent(s.Delegation.onEventTriggered,{bubbles:!0,detail:{eventType:e,eventData:t},cancelable:!0});return null===(n=null===(i=this.rootElement)||void 0===i?void 0:i.dispatchEvent)||void 0===n||n.call(i,o),{mainEvent:o}}}t.EventService=a.getInstance()},6311:(e,t,i)=>{var n=i(9697),o=Object.create||function(){function e(){}return function(t){if(1!=arguments.length)throw Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();function s(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}var i=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function r(){this.values=o(null)}function l(e,t,i,n){var o=n?e.split(n):[e];for(var s in o)if("string"==typeof o[s]){var a=o[s].split(i);2===a.length&&t(a[0].trim(),a[1].trim())}}s.prototype=o(Error.prototype),s.prototype.constructor=s,s.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},r.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var d=n.createElement&&n.createElement("textarea"),h={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},u={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},c={v:"title",lang:"lang"},p={rt:"ruby"};function g(e,t){for(var i,n=e.document.createElement("div"),o=n,s=[];null!==(i=function(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}());)if("<"!==i[0])o.appendChild(e.document.createTextNode((r=i,d.innerHTML=r,r=d.textContent,d.textContent="",r)));else{if("/"===i[1]){s.length&&s[s.length-1]===i.substr(2).replace(">","")&&(s.pop(),o=o.parentNode);continue}var r,l,g,v,y=a(i.substr(1,i.length-2));if(y){v=e.document.createProcessingInstruction("timestamp",y),o.appendChild(v);continue}var m=i.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);
1if(!m||!(v=function(t,i){var n=h[t];if(!n)return null;var o=e.document.createElement(n),s=c[t];return s&&i&&(o[s]=i.trim()),o}(m[1],m[3]))||(l=o,p[(g=v).localName]&&p[g.localName]!==l.localName))continue;if(m[2]){var b=m[2].split(".");b.forEach(function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(u.hasOwnProperty(i)){var n=t?"background-color":"color",o=u[i];v.style[n]=o}}),v.className=b.join(" ")}s.push(m[1]),o.appendChild(v),o=v}return n}var v=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function y(){}function m(e,t,i){y.call(this),this.cue=t,this.cueDiv=g(e,t.text);var n={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(n,this.cueDiv),this.div=e.document.createElement("div"),n={direction:function(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function n(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}for(n(t,e);i=function e(t){if(!t||!t.length)return null;var i=t.pop(),o=i.textContent||i.innerText;if(o){var s=o.match(/^.*(\n|\r)/);return s?(t.length=0,s[0]):o}return"ruby"===i.tagName?e(t):i.childNodes?(n(t,i),e(t)):void 0}(t);)for(var o=0;o<i.length;o++)if(function(e){for(var t=0;t<v.length;t++){var i=v[t];if(e>=i[0]&&e<=i[1])return!0}return!1}(i.charCodeAt(o)))return"rtl";return"ltr"}(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var o=0;switch(t.positionAlign){case"start":case"line-left":o=t.position;break;case"center":o=t.position-t.size/2;break;case"end":case"line-right":o=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(o,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(o,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function b(e){var t,i,n,o;if(e.div){i=e.div.offsetHeight,n=e.div.offsetWidth,o=e.div.offsetTop;var s=(s=e.div.childNodes)&&(s=s[0])&&s.getClientRects&&s.getClientRects();e=e.div.getBoundingClientRect(),t=s?Math.max(s[0]&&s[0].height||0,e.height/s.length):0}this.left=e.left,this.right=e.right,this.top=e.top||o,this.height=e.height||i,this.bottom=e.bottom||o+(e.height||i),this.width=e.width||n,this.lineHeight=void 0!==t?t:e.lineHeight}function f(){}y.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},y.prototype.formatStyle=function(e,t){return 0===e?0:e+t},m.prototype=o(y.prototype),m.prototype.constructor=m,b.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},b.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},b.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},b.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},b.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},b.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},b.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},b.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||i}},f.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},f.convertCueToDOMTree=function(e,t){return e&&t?g(e,t):null},f.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var n=e.document.createElement("div");if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin="1.5%",i.appendChild(n),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var o=[],s=b.getSimpleBoxPosition(n),a={font:Math.round(.05*s.height*100)/100+"px sans-serif"};!function(){for(var i,r,l=0;l<t.length;l++)i=new m(e,r=t[l],a),n.appendChild(i.div),function(e,t,i,n){var o=new b(t),s=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return -1;for(var t=e.track,i=t.textTrackList,n=0,o=0;o<i.length&&i[o]!==t;o++)"showing"===i[o].mode&&n++;return -1*++n}(s),r=[];if(s.snapToLines){switch(s.vertical){case"":r=["+y","-y"],l="height";break;case"rl":r=["+x","-x"],l="width";break;case"lr":r=["-x","+x"],l="width"}var l,d=o.lineHeight,h=d*Math.round(a),u=i[l]+d,c=r[0];Math.abs(h)>u&&(h=Math.ceil(u/d)*d*(h<0?-1:1)),a<0&&(h+=""===s.vertical?i.height:i.width,r=r.reverse()),o.move(c,h)}else{var p=o.lineHeight/i.height*100;switch(s.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(s.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}r=["+y","-x","+x","-y"],o=new b(t)}var g=function(e,t){for(var o,s=new b(e),a=1,r=0;r<t.length;r++){for(;e.overlapsOppositeAxis(i,t[r])||e.within(i)&&e.overlapsAny(n);)e.move(t[r]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(o=new b(e),a=l),e=new b(s)}return o||s}(o,r);t.move(g.toCSSCompatValues(i))}(0,i,s,o),r.displayState=i.div,o.push(b.getSimpleBoxPosition(i))}()}else for(var r=0;r<t.length;r++)n.appendChild(t[r].displayState)},f.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},f.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof s))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t,i=this;function n(){for(var e=i.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var n=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,i.buffer=e.substr(t),n}e&&(i.buffer+=i.decoder.decode(e,{stream:!0}));try{if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;var o,d=(t=n()).match(/^WEBVTT([ \t].*)?$/);if(!d||!d[0])throw new s(s.Errors.BadSignature);i.state="HEADER"}for(var h=!1;i.buffer&&/\r\n|\n/.test(i.buffer);)switch(h?h=!1:t=n(),i.state){case"HEADER":/:/.test(t)?(o=t).match(/X-TIMESTAMP-MAP/)?l(o,function(e,t){var n;"X-TIMESTAMP-MAP"===e&&(n=new r,l(t,function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",a(t))}},/[^\d]:/,/,/),i.ontimestampmap&&i.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")}))},/=/):l(o,function(e,t){"Region"===e&&function(e){var t=new r;if(l(e,function(e,i){switch(e){case"id":t.set(e,i);break;case"width":t.percent(e,i);break;
1case"lines":t.integer(e,i);break;case"regionanchor":case"viewportanchor":var n=i.split(",");if(2!==n.length)break;var o=new r;if(o.percent("x",n[0]),o.percent("y",n[1]),!o.has("x")||!o.has("y"))break;t.set(e+"X",o.get("x")),t.set(e+"Y",o.get("y"));break;case"scroll":t.alt(e,i,["up"])}},/=/,/\s/),t.has("id")){var n=new(i.vttjs.VTTRegion||i.window.VTTRegion);n.width=t.get("width",100),n.lines=t.get("lines",3),n.regionAnchorX=t.get("regionanchorX",0),n.regionAnchorY=t.get("regionanchorY",100),n.viewportAnchorX=t.get("viewportanchorX",0),n.viewportAnchorY=t.get("viewportanchorY",100),n.scroll=t.get("scroll",""),i.onregion&&i.onregion(n),i.regionList.push({id:t.get("id"),region:n})}}(t)},/:/):t||(i.state="ID");continue;case"NOTE":t||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(t)){i.state="NOTE";break}if(!t)continue;i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,"");try{i.cue.align="center"}catch(e){i.cue.align="middle"}if(i.state="CUE",-1===t.indexOf("-->")){i.cue.id=t;continue}case"CUE":try{(function(e,t,i){var n=e;function o(){var t=a(e);if(null===t)throw new s(s.Errors.BadTimeStamp,"Malformed timestamp: "+n);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function d(){e=e.replace(/^\s+/,"")}if(d(),t.startTime=o(),d(),"-->"!==e.substr(0,3))throw new s(s.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+n);e=e.substr(3),d(),t.endTime=o(),d(),function(e,t){var n=new r;l(e,function(e,t){switch(e){case"region":for(var o=i.length-1;o>=0;o--)if(i[o].id===t){n.set(e,i[o].region);break}break;case"vertical":n.alt(e,t,["rl","lr"]);break;case"line":var s=t.split(","),a=s[0];n.integer(e,a),n.percent(e,a)&&n.set("snapToLines",!1),n.alt(e,a,["auto"]),2===s.length&&n.alt("lineAlign",s[1],["start","center","end"]);break;case"position":s=t.split(","),n.percent(e,s[0]),2===s.length&&n.alt("positionAlign",s[1],["start","center","end"]);break;case"size":n.percent(e,t);break;case"align":n.alt(e,t,["start","center","end","left","right"])}},/:/,/\s/),t.region=n.get("region",null),t.vertical=n.get("vertical","");try{t.line=n.get("line","auto")}catch(e){}t.lineAlign=n.get("lineAlign","start"),t.snapToLines=n.get("snapToLines",!0),t.size=n.get("size",100);try{t.align=n.get("align","center")}catch(e){t.align=n.get("align","middle")}try{t.position=n.get("position","auto")}catch(e){t.position=n.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=n.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)})(t,i.cue,i.regionList)}catch(e){i.reportOrThrowError(e),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var u=-1!==t.indexOf("-->");if(!t||u&&(h=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=t.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":t||(i.state="ID");continue}}catch(e){i.reportOrThrowError(e),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{if(this.buffer+=this.decoder.decode(),(this.cue||"HEADER"===this.state)&&(this.buffer+="\n\n",this.parse()),"INITIAL"===this.state)throw new s(s.Errors.BadSignature)}catch(e){this.reportOrThrowError(e)}return this.onflush&&this.onflush(),this}},e.exports=f},6426:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6433:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tryGetLocalStorageItem=function(e,t,i="warn"){try{return localStorage.getItem(e)}catch(e){return null}},t.trySetLocalStorageItem=function(e,t,i,n="warn"){try{localStorage.setItem(e,t)}catch(e){}},t.tryRemoveLocalStorageItem=function(e,t,i="warn"){try{localStorage.removeItem(e)}catch(e){}}},6450:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};
1Object.defineProperty(t,"__esModule",{value:!0}),o(i(2029),t),o(i(1699),t),o(i(1977),t),o(i(961),t),o(i(9456),t),o(i(4180),t),o(i(9142),t),o(i(8530),t),o(i(9100),t),o(i(473),t),o(i(5990),t),o(i(3751),t)},6569:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetVastAd=void 0;let o=i(5785),s=i(6450),a=i(9965),r=i(4545),l=i(9266),d=i(3214),h=window.innerWidth;class u extends HTMLElement{get googleIMA(){var e;return null===(e=window.google)||void 0===e?void 0:e.ima}constructor(e,t,i=r.VideoPlayerService){super(),this.contentType=e,this.getReferringObject=t,this.videoPlayerState=i,this.isInitialized=!1,this.adContainer=document.createElement("div"),this.adLoaderContainer=new o.BlazeLoader,this.currentAdTag="",this.boundedOnBlur=this.onBlur.bind(this),this.boundedOnFocus=this.onFocus.bind(this),this.boundedOnVisibilityChange=this.onVisibilityChange.bind(this),this.boundedOnWindowResize=this.onWindowResize.bind(this),this.initializeGoogleIma()}initializeGoogleIma(){this.googleIMA&&!this.isInitialized&&(this.isInitialized=!0,this.googleIMA.settings.setDisableCustomPlaybackForIOS10Plus(!0),(0,l.mergeStyles)(this.adContainer,{position:"absolute",width:"100%",background:"black",height:"100%",top:"0",left:"0",display:"none",justifyContent:"center",zIndex:"100000"}),(0,l.mergeStyles)(this.adLoaderContainer,{margin:"auto",position:"absolute",top:"50%",left:"calc(50% - 20px)",transform:"translate(-50%, -50%)",zIndex:"100001"}))}buildImaUrl(e,t,i,o){return n(this,void 0,void 0,function*(){var n,s;if("IMA"!==e.type)return"";let a=(null===(s=null===(n=r.ConfigService.imaAdHandler)||void 0===n?void 0:n.provideAdExtraParams)||void 0===s?void 0:s.call(n,t))||{},l=new URL(e.tag);l.searchParams.set("url",document.location.href),l.searchParams.set("vpmute",this.videoPlayerState.isMuted?"1":"0"),l.searchParams.set("plcmt","1"),l.searchParams.set("vpos","midroll"),l.searchParams.set("vpa","click");let h=null!=o?o:yield(0,d.getVideoDuration)(this.videoElement,this.videoUrl).catch(()=>0);for(let e in this.setSearchParamIfNotNullOrZero(l,"content_len",h),l.searchParams.set("language",navigator.language),a)l.searchParams.set(e,a[e]);switch(this.buildAndSetCustParams(e,l),null==i||i(l),e.adProvider){case"Aniview":this.addAniviewMacrosToUrl(l);break;case"GoogleAds":this.addGoogleAdsMacrosToUrl(l)}return l.toString()})}cleanupAdSession(){var e;this.adsManager&&(this.adsManager.destroy(),this.adsManager=void 0),this.adsLoader&&(this.adsLoader.contentComplete(),this.adsLoader=void 0),this.adDisplayContainer=void 0,this.adContainer&&(this.adContainer.innerHTML="",this.adContainer.style.display="none"),null===(e=this.adContainer)||void 0===e||e.removeEventListener("click",this.onAdClick),window.removeEventListener("blur",this.boundedOnBlur),window.removeEventListener("focus",this.boundedOnFocus),document.removeEventListener("visibilitychange",this.boundedOnVisibilityChange),window.removeEventListener("resize",this.boundedOnWindowResize)}startAd(e){return n(this,void 0,void 0,function*(){var t,i,n,o,a;let{videoElement:r,adInfo:l,contentExtraInfo:d,addCustomParams:u,addExtraAnalyticsParams:c,videoUrl:p,videoDuration:g}=e;if(this.initializeGoogleIma(),this.currentAddExtraAnalyticsParams=c,this.currentAdInfo=l,!this.googleIMA)return!1;this.appendChild(this.adLoaderContainer),this.appendChild(this.adContainer),h=window.innerWidth,this.adContainer.style.display="flex",this.videoElement=r,this.videoUrl=p,this.adDisplayContainer=new this.googleIMA.AdDisplayContainer(this.adContainer,this.videoElement),this.adsLoader=new this.googleIMA.AdsLoader(this.adDisplayContainer),null===(t=this.adsLoader)||void 0===t||t.addEventListener(this.googleIMA.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,e=>this.onAdsManagerLoaded(e),!1),null===(i=this.adsLoader)||void 0===i||i.addEventListener(this.googleIMA.AdErrorEvent.Type.AD_ERROR,this.onAdError.bind(this),!1),null===(n=this.adsLoader)||void 0===n||n.getSettings().setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.INSECURE);let v=yield this.buildImaUrl(l,d,u,g),y=new this.googleIMA.AdsRequest;return y.adTagUrl=v,this.currentAdTag=v,y.linearAdSlotWidth=this.videoElement.clientWidth,y.linearAdSlotHeight=this.videoElement.clientHeight,y.nonLinearAdSlotWidth=this.videoElement.clientWidth,y.nonLinearAdSlotHeight=(null!==(o=this.videoElement.clientHeight)&&void 0!==o?o:0)/3,null===(a=this.adsLoader)||void 0===a||a.requestAds(y),this.onAdEvent({type:s.ImaAdAction.REQUESTED}),!0})}onAdsManagerLoaded(e){let t=new this.googleIMA.AdsRenderingSettings;if(t.restoreCustomPlaybackStateOnAdBreakComplete=!0,this.adsManager=e.getAdsManager(this.videoElement,t),!this.adsManager)return;this.adsManager.addEventListener(this.googleIMA.AdErrorEvent.Type.AD_ERROR,this.onAdError.bind(this)),this.adsManager.addEventListener(this.googleIMA.AdEvent.Type.CONTENT_PAUSE_REQUESTED,this.onContentPauseRequested.bind(this)),this.adsManager.addEventListener(this.googleIMA.AdEvent.Type.CONTENT_RESUME_REQUESTED,this.onContentResumeRequested.bind(this));let i=this.onAdEvent.bind(this);for(let e of[this.googleIMA.AdEvent.Type.ALL_ADS_COMPLETED,this.googleIMA.AdEvent.Type.CLICK,this.googleIMA.AdEvent.Type.COMPLETE,this.googleIMA.AdEvent.Type.LOADED,this.googleIMA.AdEvent.Type.PAUSED,this.googleIMA.AdEvent.Type.RESUMED,this.googleIMA.AdEvent.Type.SKIPPED,this.googleIMA.AdEvent.Type.STARTED,this.googleIMA.AdEvent.Type.FIRST_QUARTILE,this.googleIMA.AdEvent.Type.MIDPOINT,this.googleIMA.AdEvent.Type.THIRD_QUARTILE])this.adsManager.addEventListener(e,i);this.loadAds()}loadAds(){if(!this.adsManager||!this.adDisplayContainer||!this.videoElement)return;this.adDisplayContainer.initialize();let e=this.videoElement.getBoundingClientRect(),t=e.width,i=e.he
1ight;try{this.adsManager.init(t,i,this.googleIMA.ViewMode.NORMAL),this.adsManager.start()}catch(e){this.onContentResumeRequested()}}onAdEvent(e){var t,i,n,o;let a={[this.googleIMA.AdEvent.Type.ALL_ADS_COMPLETED]:s.ImaAdAction.ALL_ADS_COMPLETED,[this.googleIMA.AdEvent.Type.CLICK]:s.ImaAdAction.CLICK,[this.googleIMA.AdEvent.Type.COMPLETE]:s.ImaAdAction.COMPLETED,[this.googleIMA.AdEvent.Type.LOADED]:s.ImaAdAction.LOADED,[this.googleIMA.AdEvent.Type.PAUSED]:s.ImaAdAction.PAUSED,[this.googleIMA.AdEvent.Type.RESUMED]:s.ImaAdAction.RESUMED,[this.googleIMA.AdEvent.Type.SKIPPED]:s.ImaAdAction.SKIPPED,[this.googleIMA.AdEvent.Type.STARTED]:s.ImaAdAction.STARTED,[this.googleIMA.AdEvent.Type.FIRST_QUARTILE]:s.ImaAdAction.FIRST_QUARTILE,[this.googleIMA.AdEvent.Type.MIDPOINT]:s.ImaAdAction.MIDPOINT,[this.googleIMA.AdEvent.Type.THIRD_QUARTILE]:s.ImaAdAction.THIRD_QUARTILE,[s.ImaAdAction.REQUESTED]:s.ImaAdAction.REQUESTED},l={};if("object"==typeof e&&e&&"getAd"in e&&"function"==typeof e.getAd&&(l=e.getAd().data),"object"==typeof e&&e&&"type"in e){let s=a[e.type];r.AnalyticsService.pushImaAdEvent(s,Object.assign({ad_id:l.adId,ad_title:l.title,ad_description:l.description,ad_system:l.adSystem,ad_duration:l.duration,skippable:l.skippable,skip_time_offset:l.skipTimeOffset,advertiser_name:l.advertiserName,ima_url:this.currentAdTag,audio_state:this.videoPlayerState.isMuted?"muted":"unmuted",content_type:this.contentType,ima_ad_provider:null===(t=this.currentAdInfo)||void 0===t?void 0:t.adProvider,backoffice_campaign_data:(null===(i=this.currentAdInfo)||void 0===i?void 0:i.backofficeCampaignData)||""},null===(n=this.currentAddExtraAnalyticsParams)||void 0===n?void 0:n.call(this)),void 0,null===(o=this.getReferringObject)||void 0===o?void 0:o.call(this))}}onAdError(){this.onContentResumeRequested()}onAdClick(){setTimeout(()=>{window.focus()},1e3)}onContentPauseRequested(){this.adLoaderContainer.remove(),this.dispatchEvent(new CustomEvent(a.InternalEvent.AD_STARTED,{bubbles:!0,composed:!0})),this.adContainer.addEventListener("click",this.onAdClick),window.addEventListener("blur",this.boundedOnBlur),window.addEventListener("focus",this.boundedOnFocus),document.addEventListener("visibilitychange",this.boundedOnVisibilityChange),window.addEventListener("resize",this.boundedOnWindowResize)}onContentResumeRequested(){this.adLoaderContainer.remove(),this.dispatchEvent(new CustomEvent(a.InternalEvent.AD_ENDED,{bubbles:!0,composed:!0})),this.cleanupAdSession()}onBlur(){var e;null===(e=this.adsManager)||void 0===e||e.pause()}onFocus(){var e;null===(e=this.adsManager)||void 0===e||e.resume()}onVisibilityChange(){var e,t;"visible"===document.visibilityState?null===(e=this.adsManager)||void 0===e||e.resume():null===(t=this.adsManager)||void 0===t||t.pause()}onWindowResize(){h!==window.innerWidth&&(h=window.innerWidth,this.resizeToVideoElement())}setSearchParamIfNotNullOrZero(e,t,i){"number"==typeof i&&(i=i.toString()),i&&e.searchParams.set(t,i)}addAniviewMacrosToUrl(e){var t,i;this.setSearchParamIfNotNullOrZero(e,"AV_WIDTH",null===(t=this.videoElement)||void 0===t?void 0:t.clientWidth),this.setSearchParamIfNotNullOrZero(e,"AV_HEIGHT",null===(i=this.videoElement)||void 0===i?void 0:i.clientHeight)}addGoogleAdsMacrosToUrl(e){var t,i;this.setSearchParamIfNotNullOrZero(e,"width",null===(t=this.videoElement)||void 0===t?void 0:t.clientWidth),this.setSearchParamIfNotNullOrZero(e,"height",null===(i=this.videoElement)||void 0===i?void 0:i.clientHeight)}buildAndSetCustParams(e,t){let i=Object.entries(e.context||{}).reduce((e,[t,i])=>(null!=i&&(e[t]=String(i)),e),{}),n=t.searchParams.get("cust_params")||"",o=Object.entries(i).map(([e,t])=>e+"="+t);if(o.length>0&&(n=n?n+"&"+o.join("&"):o.join("&")),n&&t.searchParams.set("cust_params",n),"Aniview"===e.adProvider)for(let e in i)t.searchParams.set(e,i[e])}pause(){var e;null===(e=this.adsManager)||void 0===e||e.pause()}resume(){var e;null===(e=this.adsManager)||void 0===e||e.resume()}handleFullscreenChange(){this.resizeToVideoElement()}resizeToVideoElement(){this.adsManager&&this.videoElement&&setTimeout(()=>{var e,t;let i=null===(e=this.videoElement)||void 0===e?void 0:e.getBoundingClientRect(),n=null==i?void 0:i.width,o=null==i?void 0:i.height;n&&o&&(null===(t=this.adsManager)||void 0===t||t.resize(n,o,this.googleIMA.ViewMode.NORMAL))},250)}}t.BlazeWidgetVastAd=u},6576:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.VideoModalTemplate=void 0;let n=i(5417),o=i(9965),s=i(4545),a=i(2601);class r extends n.BaseModalTemplate{createModal(e,t){let i=new a.BlazeWidgetVideoModal(e,t);return i.id="blaze-video-modal-"+Math.random().toString(36),i.playerLayout=t,i}configureModal(e,t){var i;e.setModalContent(t),e.seek(null!==(i=t[0].id)&&void 0!==i?i:"")}getService(){return s.VideoService}getErrorCode(){return o.ErrorCode.FailedLoadingVideos}}t.VideoModalTemplate=r},6610:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ShortFormHLSStrategy=void 0;let o=i(1908),s=i(8252);class a extends s.BaseHLSStrategy{constructor(){super(...arguments),this.isPrefetchMode=!1,this.fragmentsLoaded=0,this.maxPrefetchFragments=2,this.isBufferLoaderActive=!1,this.lastProgressTime=0,this.lastCurrentTime=0,this.boundOnTimeUpdate=this.handleTimeUpdate.bind(this),this.MIN_BUFFER_BEFORE_RECOVERY=.5,this.lastRecoveryAttempt=0,this.RECOVERY_COOLDOWN=3e3}initialize(e){this.loaderDelegate=null==e?void 0:e.loaderDelegate,this.setupEventListeners()}setupEventListeners(){super.setupEventListeners(),this.video.addEventListener(o.EVENTS.TIMEUPDATE,this.boundOnTimeUpdate)}setupHLSInstance(e,t){super.setupHLSInstance(e,t,s.HLS_CONFIGS.SHORT_FORM),this.video.setAttribute("webkit-playsinline","true"),this.video.playsInline=!0,this.video.controls=!1,this.video.muted=this.videoPlayerState.isMuted,this.hls&&this.hls.on(Hls.Events.MANIFEST_PARSED,this.handleManifestParsedForPrefetch.bind(this))}handleManifestParsedForPrefetch(){this.isPrefetchMode?this.startPrefetchLoading():this.hls&&"function"==typeof this.hls.startLoad&&this.hls.startLoad()}startPrefetchLoading(){if(!this.hls||"function"!=typeof this.hls.startLoad)return;this.fragmentsLoaded=0;let e=()=>{var t,i;this.fragmentsLoaded++,this.fragmentsLoaded>=this.maxPrefetchFragments&&(null===(t=this.hls)||void 0===t||t.stopLoad(),null===(i=this.hls)||void 0===i||i.off(Hls.Events.FRAG_LOADED,e))};this.hls.on(Hls.Events.FRAG_LOADED,e),this.hls.startLoad()}enablePrefetchMode(){this.isPrefetchMode=!0}disablePrefetchMode(){this.isPrefetchMode=!1}onLoadingState(){var e,t;null===(t=null===(e=this.loaderDelegate)||void 0===e?void 0:e.show)||void 0===t||t.call(e)}onBufferUpdate(e){}handlePlaying(){var e,t;this.isBufferLoaderActive&&(this.isBufferLoaderActive=!1),null===(t=null===(e=this.loaderDelegate)||void 0===e?void 0:e.hide)||void 0===t||t.call(e),this.lastProgressTime=Date.now(),this.lastCurrentTime=this.video.currentTime}handlePause(){var e,t;this.isBufferLoaderActive&&(this.isBufferLoaderActive=!1),null===(t=null===(e=this.loaderDelegate)||void 0===e?void 0:e.hide)||void 0===t||t.call(e)}handlePlaybackTimeout(){var e,t,i,n,o,s;"visible"!==document.visibilityState||document.hidden||(this.onLoadingState(),this.isSlowConnection()||this.getBufferAhead()>0?this.hls&&(this.hls.levels&&this.hls.levels.length>1&&(this.hls.currentLevel=0),this.hls.startLoad()):this.hls&&(this.video.error?null===(t=(e=this.hls).recoverMediaError)||void 0===t||t.call(e):(this.pause(),null===(n=(i=this.hls).detachMedia)||void 0===n||n.call(i),null===(s=(o=this.hls).attachMedia)||void 0===s||s.call(o,this.video),this.video.play().catch(e=>{this.reloadStream()}))))}onError(e,t){t.fatal||t.details}handleError(e,t){var i,n;if(this.isBufferLoaderActive=!0,null===(n=null===(i=this.loaderDelegate)||void 0===i?void 0:i.show)||void 0===n||n.call(i),t.fatal||this.canAttemptRecovery()){if(t.fatal)super.handleError(e,t);else switch(t.details){case"bufferStalledError":case"bufferNudgeOnStall":if(!this.shouldTriggerRecovery()||this.tryForceLowestQuality())return;break;case"fragLoadTimeOut":if(!this.shouldTriggerRecovery())return;this.tryForceLowestQuality();break;case"manifestLoadError":case"manifestLoadTimeOut":case"fragLoadError":break;default:super.handleError(e,t)}}}handleSeekRecovery(e){this.video.paused||super.handleSeekRecovery(e)}seek(e){var t;0!==e||this.video.paused||(this.video.pause(),null===(t=this.hls)||void 0===t||t.stopLoad()),super.seek(e)}play(){let e=Object.create(null,{play:{get:()=>super.play}});return n(this,void 0,void 0,function*(){let t=yield e.play.call(this);return this.startProgressBasedLoaderCleanup(),t})}pause(){super.pause(),this.stopProgressBasedLoaderCleanup()}unload(){var e,t;this.hls&&"undefined"!=typeof Hls&&Hls.isSupported()&&(null===(t=(e=this.hls).stopLoad)||void 0===t||t.call(e)),this.video.removeEventListener(o.EVENTS.TIMEUPDATE,this.boundOnTimeUpdate),this.stopProgressBasedLoaderCleanup(),super.unload()}handleTimeUpdate(){var e,t;let i=this.video.currentTime,n=Date.now();i>this.lastCurrentTime&&(this.lastProgressTime=n,this.lastCurrentTime=i,this.video.paused||this.video.ended||null===(t=null===(e=this.loaderDelegate)||void 0===e?void 0:e.hide)||void 0===t||t.call(e))}startProgressBasedLoaderCleanup(){this.stopProgressBasedLoaderCleanup(),this.lastProgressTime=Date.now(),this.lastCurrentTime=this.video.currentTime,this.progressCheckInterval=setInterval(()=>{this.checkVideoProgressAndCleanupLoader()},1e3)}stopProgressBasedLoaderCleanup(){this.progressCheckInterval&&(clearInterval(this.progressCheckInterval),this.progressCheckInterval=void 0)}checkVideoProgressAndCleanupLoader(){var e,t;let i=Date.now()-this.lastProgressTime,n=this.video.currentTime;!this.video.paused&&!this.video.ended&&n>0&&i<1e3&&(null===(t=null===(e=this.loaderDelegate)||void 0===e?void 0:e.hide)||void 0===t||t.call(e))}getBufferAhead(){let e=this.video.buffered,t=this.video.currentTime;for(let i=0;i<e.length;i++)if(e.start(i)<=t&&t<=e.end(i))return e.end(i)-t;return 0}shouldTriggerRecovery(){return!(this.getBufferAhead()>this.MIN_BUFFER_BEFORE_RECOVERY)}tryForceLowestQuality(){return!(!this.hls||!this.hls.levels||this.hls.levels.length<=1)&&0!==this.hls.currentLevel&&(this.hls.currentLevel=0,this.hls.startLoad(),!0)}canAttemptRecovery(){let e=Date.now();return!(e-this.lastRecoveryAttempt<this.RECOVERY_COOLDOWN||(this.lastRecoveryAttempt=e,0))}}t.ShortFormHLSStrategy=a},6614:(e,t)=>
1{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},6627:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetBaseLayout=void 0;let o=i(4403),s=i(6450),a=i(9965),r=i(8921),l=i(8243),d=i(4545),h=i(4906),u=i(9266),c=i(2601),p=i(2740),g=i(1518),v=i(612);class y extends v.BlazeWidgetScrollable{constructor(){super(),this.isWidgetVisible=!1,this.widgetItems=[],this.analyticsStack={},this.shouldReloadData=!0,this.shouldReloadWhenPlayerIsClosed=!1,this.contents=[],this.actionHandlers=[],this.perItemStyleOverrides={playerId:[],teamId:[],gameId:[],roundId:[]},this.activeOverridesLayoutThemes={playerId:[],teamId:[],gameId:[],roundId:[]},this.intersectionObserver=new IntersectionObserver(this.handleIntersection.bind(this))}widgetType(){return this.getTheme().layoutStyle.columns>1?"Grid":"Row"}get thumbnailShape(){var e;return(null===(e=this.getTheme())||void 0===e?void 0:e.layoutStyle.thumbnailShape)||this.getAttribute("thumbnail-shape")}get theme(){return this.getTheme()}updateActiveLayoutThemesPerItemWithEntity(e,t,i){let n=this.activeOverridesLayoutThemes[e];if(n){let e=n.findIndex(e=>e.name===t);-1!==e&&n.splice(e,1),n.push({name:t,theme:i})}else this.activeOverridesLayoutThemes[e]=[{name:t,theme:i}]}setReloadData(e){this.shouldReloadData="object"!=typeof e||!e.hasOwnProperty("shouldReloadData")||"boolean"!=typeof e.shouldReloadData||e.shouldReloadData}set contentIds(e){this.setAttribute("content-ids",e)}set storyIds(e){this.setAttribute("story-ids",e)}addDelegateListener(e,t,i){r.WidgetsFactory.whenDefined("blaze-widget-story-modal").then(()=>{var n;null===(n=this.storysModal)||void 0===n||n.addEventListener(e,t,i)})}event(e,t,i){var n,a,r,l;if(e==s.WidgetAction.Load||e==s.WidgetAction.Visible){if(this.analyticsStack[e])return;this.analyticsStack[e]=!0}try{let s=this.getBoundingClientRect();t.widget_id=this.id,t.widget_content_count=null===(n=this.widgetItems)||void 0===n?void 0:n.length,t.widget_content_list=(null===(a=this.contents)||void 0===a?void 0:a.length)?JSON.stringify(this.contents.map(e=>e.id)):"",t.widget_size=s.width&&s.height?Math.round(s.width)+"x"+Math.round(s.height):"",t.widget_type=null===(r=this.widgetType)||void 0===r?void 0:r.call(this),t.placement_distance=Math.round(s.top).toString(),t.content_type=null===(l=this.getAttribute("content-type"))||void 0===l?void 0:l.replace(/^\w/,e=>e.toUpperCase()),t.thumbnail_aspect_ratio=this.getTheme().layoutStyle.itemRatio.toString(),t.thumbnail_type=this.thumbnailShape,t.thumbnail_size=this.thumbnailWidth&&this.thumbnailHeight?this.thumbnailWidth+"x"+this.thumbnailHeight:"";let h=new o.ReferringEventInfo;h.labels_expression=this.getAttribute("labels"),document.referrer&&(h.referrer_page_url=document.referrer),d.AnalyticsService.pushWidgetEvent(e,Object.assign({},t),i,h)}catch(e){}}getTheme(){switch(this.getAttribute("content-type")){case"moment":return this.preset||h.ThemeFactory.create("default","moment");case"story":return this.preset||h.ThemeFactory.create("default","story");case"video":return this.preset||h.ThemeFactory.create("default","video");default:return this.preset||h.ThemeFactory.create("default")}}setTheme(e){var t,i,n,o;let s;let a=this.getAttribute("content-type");if("string"==typeof e){if("moment"!==a&&"story"!==a&&"video"!==a&&a)throw Error("Invalid content type");s="moment"===a?h.ThemeFactory.create(e,"moment"):"story"===a?h.ThemeFactory.create(e,"story"):h.ThemeFactory.create(e,"video")}else{if(!(0,l.isWidgetTheme)(e))throw Error("Invalid theme type");if((0,h.isStoryPlayerStyle)(e.playerStyle)&&"story"!==a)throw Error("Invalid theme type - story player style for "+a+" content type");if((0,h.isMomentPlayerStyle)(e.playerStyle)&&"moment"!==a)throw Error("Invalid theme type - moment player style for "+a+" content type");if((0,h.isVideoPlayerStyle)(e.playerStyle)&&"video"!==a)throw Error("Invalid theme type - video player style for "+a+" content type");s=e}this.preset=s,null===(t=this.widgetItems)||void 0===t||t.forEach(e
1=>e.setTheme(s.layoutStyle)),null===(i=this.storysModal)||void 0===i||i.setTheme(s.playerStyle),null===(n=this.momentsModal)||void 0===n||n.setTheme(s.playerStyle),null===(o=this.videosModal)||void 0===o||o.setTheme(s.playerStyle),this.contents.length&&this.render()}reload(){this.storysModal&&this.storysModal.isOpen||this.momentsModal&&this.momentsModal.isOpen||this.videosModal&&this.videosModal.isOpen?this.shouldReloadWhenPlayerIsClosed=!0:(this.shouldReloadData=!0,this.loadContent())}setMaxItemsDisplaySize(e){this.setAttribute("max-display-items-count",e.toString())}setDelegations(e){for(let t in e)this.addEventListener(t,e[t])}setOrderType(e){this.setAttribute("order-type",e||"")}updateDataSource(e){if(!e)return;let{sourceType:t,ids:i,labels:n,text:o,recommendations:s,orderType:a,maxItems:r,labelsPriority:l,personalized:d,advancedOrdering:h}=e,u={shouldReloadData:!1};(n||i||o||s)&&(this.setOrderType(a),this.setMaxItemsSize(r,u),this.setPersonalized(d),this.setAdvancedOrdering(h),"ids"===t&&i?(this.setContentIds(i,u),this.setLabelsPriority("",u),this.setLabels("",u),this.setRecommendations(void 0,u),this.setSearchText("",u)):"labels"===t&&n?(this.setLabels(n,u),this.setLabelsPriority((null==l?void 0:l.toString())||"",u),this.setContentIds([],u),this.setRecommendations(void 0,u),this.setSearchText("",u)):"text"===t&&o?(this.setSearchText(o,u),this.setLabels("",u),this.setLabelsPriority("",u),this.setContentIds([],u),this.setRecommendations(void 0,u)):"recommendations"===t&&s&&(this.setRecommendations(s,u),this.setLabels("",u),this.setLabelsPriority("",u),this.setContentIds([],u),this.setSearchText("",u)))}setPersonalized(e){this.personalized=e}setAdvancedOrdering(e){this.setAttribute("advanced-ordering",e||"")}setLabels(e,t){this.setReloadData(t);let i="";if("string"==typeof e)i=e;else if(Array.isArray(e))i=e.join();else{if(!(e instanceof o.BlazeWidgetLabel))throw Error("fail to set labels - "+e+", labels must be string, array of strings, or BlazeWidgetLabel...");i=e.toString()}this.setAttribute("labels",i)}setLabelsPriority(e,t){if(!e)return void this.setAttribute("labels-priority","");this.setReloadData(t);let i="";if("string"==typeof e)i=e.startsWith("[")&&e.endsWith("]")?e:"["+e+"]";else{if(!Array.isArray(e))throw Error("Failed to set labels priority - "+e+". Labels priority must be a string, array of strings, or array of BlazeWidgetLabel.");i=e.every(e=>e instanceof o.BlazeWidgetLabel)?"["+e.map(e=>e.toString()).join()+"]":"["+e.join()+"]"}this.setAttribute("labels-priority",i)}setSearchText(e,t){this.setReloadData(t),this.setAttribute("text",e)}setContentIds(e,t){var i;this.setReloadData(t),((null===(i=this.getAttribute("story-ids"))||void 0===i?void 0:i.split(","))||[]).length>0?this.storyIds=e.join():this.contentIds=e.join()}setMaxItemsSize(e,t){this.setReloadData(t),this.setAttribute("max-items",(null==e?void 0:e.toString())||"")}setActionHandlers(e){this.actionHandlers=e}setRecommendations(e,t){this.setReloadData(t),this.setAttribute("recommendations",e?JSON.stringify(e):"")}appendModalToBlazeSDK(e){let t=document.getElementsByTagName("blaze-sdk")[0];t&&t.append(e)}updateWidgetsData(){let e=this.getAttribute("content-type");if("story"===e||!e)for(let e of this.contents)e.hasViewed=(0,u.isReadByLastUnIgnoredPageStatus)(e)}sortContent(){let e=this.getAttribute("advanced-ordering");if("story"===this.getContentType()){let t="LiveFirst"===e,i=e=>{let i=0;return t&&(i+=e.isLive?0:1),i+=(0,u.getContentScore)(e)};this.contents.sort((e,t)=>i(e)-i(t))}else this.contents.sort((e,t)=>(0,u.getContentScore)(e)-(0,u.getContentScore)(t))}reorderWidgets(){this.updateWidgetsData(),this.getAttribute("should-order-widget-by-read-status")&&("Manual"!=this.getAttribute("order-type")&&this.sortContent(),this.reorderWidgetItems()),this.updateWidgetDisplay()}getContentType(){return this.getAttribute("content-type")||"story"}static get observedAttributes(){return["story-ids","content-ids","content-type","max-display-items-count","max-items","labels-priority","labels","order-type","preset","recommendations","text"]}createModal(e){"video"===e?customElements.whenDefined("blaze-video-modal").then(()=>{this.videosModal||(this.videosModal=new c.BlazeWidgetVideoModal(this,this.getTheme().playerStyle),this.appendModalToBlazeSDK(this.videosModal),this.setupVideoModalCallbacks())}):"moment"===e?customElements.whenDefined("blaze-widget-moment-modal").then(()=>{this.momentsModal||(this.momentsModal=new p.BlazeWidgetMomentModal(this,this.getTheme().playerStyle,this.actionHandlers),this.appendModalToBlazeSDK(this.momentsModal),this.setupMomentModalCallbacks())}):"story"!==e&&""!==e||customElements.whenDefined("blaze-widget-story-modal").then(()=>{this.storysModal||(this.beforeStoryModalCreation(),this.storysModal=new g.BlazeWidgetStoryModal(this,this.getTheme().playerStyle,this.actionHandlers),this.appendModalToBlazeSDK(this.storysModal),this.setupStoryModalCallbacks())})}beforeStoryModalCreation(){}loadContent(){return n(this,void 0,void 0,function*(){let e=this.getAttribute("content-type"),t="story"===e||!e,i="moment"===e,n="video"===e;if(this.createModal(e),!this.shouldReloadData)return;let o=this.getAttribute("max-items"),s=this.getAttribute("labels"),r=this.getAttribute("labels-priority"),l=this.getAttribute("order-type"),h=this.getAttribute("advanced-ordering"),u=this.personalized,c=this.getAttribute("text"),p=this.getAttribute("recommendations")?JSON.parse(this.getAttribute("recommendations")):void 0,g=this.getAttribute("story-ids"),v=null==g?void 0:g.split(","),y=this.getAttribute("content-ids"),m=null==y?void 0:y.split(","),b=[];try{let e;if(d.EventService.dispatch(this,a.Delegation.onWidgetDataLoadStarted,{widgetId:this.id}),(null==s?void 0:s.length)||(null==y?void 0:y.length)||(null==p?void 0:p.forYou)||null==p||p.trending,t){let t=(null==v?void 0:v.length)||(null==m?void 0:m.length)?"ids":(null==s?void 0:s.length)?"labels":(null==c?void 0:c.length)?"text":"labels";e=yield d.StoryService.fetchContent({sourceType:t,ids:v||m,labels:s,text:c,orderType:l,maxItems:o,labelsPriority:r,advancedOrdering:h,personalized:u,recommendations:p})}else if(i){let t="labels";(null==y?void 0:y.length)?t="ids":(null==s?void 0:s.length)?t="labels":(null==p?void 0:p.forYou)||(null==p?void 0:p.trending)?t="recommendations":(null==c?void 0:c.length)&&(t="text"),e=yield d.MomentService.fetchContent({sourceType:t,ids:m,labels:s,text:c,orderType:l,maxItems:o,labelsPriority:r,recommendations:p})}else if(n){let t=(null==y?void 0:y.length)?"ids":(null==s?void 0:s.length)?"labels":(null==c?void 0:c.length)?"text":"labels";e=yield d.VideoService.fetchContent({sourceType:t,ids:m,labels:s,text:c,orderType:l,maxItems:o,labelsPriority:r,recommendations:p})}if(e&&(b=e.result,this.defaultAdsInfo=null==e?void 0:e.defaultAdsInfo),!b.length)throw Error(a.ErrorCode.FailedLoadingStories.toString());e&&e.assetsExpiryTime&&this.handleAssetsExpiry(e)}catch(e){return void(yield this.handleContentLoadError(e))}try{t?this.contents=yield d.StoryService.enrichContent(b):i?this.contents=yield d.MomentService.enrichContent(b):n&&(this.contents=yield d.VideoService.enrichContent(b))}catch(e){this.contents=b,d.EventService.dispatch(this,a.Delegation.onErrorThrown,{widgetId:this.id,errorCode:a.ErrorCode.FailedEnrichStories})}yield this.handlePostContentLoad(t,i,n)})}handleContentLoadError(e){return n(this,void 0,void 0,function*(){var e;yield null===(e=this.removeSkeletonContainer)||void 0===e?void 0:e.call(this),d.EventService.dispatch(this,a.Delegation.onWidgetDataLoadCompleted,{widgetId:this.id,storyCount:0,contentCount:0}),d.EventService.dispatch(this,a.Delegation.onErrorThrown,{widgetId:this.id,errorCode:a.ErrorCode.FailedLoadingStories})})}handleStoryContent(){var e,t,i;if(null===(e=this.storysModal)||void 0===e||e.setModalContent(this.contents,0),!(0,h.isStoryPlayerStyle)(this.theme.playerStyle))throw Error("Invalid player style for story content");null===(t=this.storysModal)||void 0===t||t.setTheme(this.theme.playerStyle),"default"===d.ConfigService.prefetchingPolicy&&(null===(i=this.storysModal)||void 0===i||i.player.contentList[0].load())}handleVideoContent(){var e,t;if(null===(e=this.videosModal)||void 0===e||e.setModalContent(this.contents),!(0,h.isVideoPlayerStyle)(this.theme.playerStyle))throw Error("Invalid player style for video content");null===(t=this.videosModal)||void 0===t||t.setTheme(this.theme.playerStyle)}handleMomentContent(){var e,t,i;if(!(0,h.isMomentPlayerStyle)(this.theme.playerStyle))throw Error("Invalid player style for moment content");null===(e=this.momentsModal)||void 0===e||e.setModalContent(this.contents,0,this.defaultAdsInfo),null===(t=this.momentsModal)||void 0===t||t.setTheme(this.theme.playerStyle),"default"===d.ConfigService.prefetchingPolicy&&(null===(i=this.momentsModal)||void 0===i||i.player.contentList[0].load("direct"))}attributeChangedCallback(e,t,i){if(i)switch(e){case"labels":case"labels-priority":this.hasAttribute("labels")&&this.loadContent();break;case"story-ids":case"content-ids":this.hasAttribute("labels")||this.loadContent();break;case"text":case"recommendations":this.loadContent();break;case"preset":this.setTheme(i);break;case"max-display-items-count":if(isNaN(Number(i)))break;let n=Number(i);
1this.widgetItems.length&&this.widgetItems.forEach((e,t)=>{e.style.display=t<n?"grid":"none"}),this.updateWidgetDisplay();break;case"max-items":(this.hasAttribute("labels")||this.hasAttribute("content-ids")||this.hasAttribute("story-ids")||this.hasAttribute("text")||this.hasAttribute("recommendations"))&&this.loadContent()}else"labels"===e&&d.EventService.dispatch(this,a.Delegation.onErrorThrown,{widgetId:this.id,errorCode:a.ErrorCode.FailedToHaveLabels})}playVideo(e){if(!this.videosModal)return;this.videosModal.setModalContent(this.contents),d.VideoPlayerService.playReference="Widget",this.videosModal.player.contentList.forEach((e,t)=>{e.startTrigger="Widget",e.refContentModal=this.videosModal,e.widgetParentItem=this.widgetItems.length?this.widgetItems[t]:{},e.playerStyle=this.theme.playerStyle});let t=this.videosModal.player.contentList.findIndex(t=>t.data.id===e),i=this.widgetItems[t];i&&this.videosModal.id&&i.setAttribute("aria-controls",this.videosModal.id),this.videosModal.seek(null!=e?e:""),this.videosModal.open()}playMoment(e){if(!this.momentsModal)return;let t=this.momentsModal.player.contentList.findIndex(t=>t.data.id===e);this.momentsModal.setModalContent(this.contents,t,this.defaultAdsInfo),this.momentsModal.player.contentList.forEach((e,t)=>{e.momentIndex=t}),d.VideoPlayerService.playReference="Widget",this.momentsModal.player.contentList.forEach((t,i)=>{t.startTrigger="Widget",t.refContentModal=this.momentsModal,t.widgetParentItem=this.widgetItems.length?this.widgetItems[i]:{},t.playerStyle=this.theme.playerStyle,t.data.id===e&&t.load("direct")});let i=this.widgetItems[t];i&&this.momentsModal.id&&i.setAttribute("aria-controls",this.momentsModal.id),this.momentsModal.seek(null!=e?e:""),this.momentsModal.open()}playStory(e){if(!this.storysModal)return;let t=this.storysModal.player.contentList.findIndex(t=>t.data.id===e);this.storysModal.setModalContent(this.contents,t,this.defaultAdsInfo),d.VideoPlayerService.playReference="Widget",this.storysModal.parentWidget=this,this.storysModal.player.contentList.forEach((t,i)=>{t.startTrigger="Widget",t.refContentModal=this.storysModal,t.widgetParentItem=this.widgetItems.length?this.widgetItems[i]:{},t.resetStoryLocationIndexToLastUnseen(),t.data.id===e&&t.load()});let i=this.widgetItems[t];i&&this.storysModal.id&&i.setAttribute("aria-controls",this.storysModal.id),this.storysModal.seek(e),this.storysModal.open()}handleAssetsExpiry(e){}}t.WidgetBaseLayout=y},6656:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeTypography=void 0;let n=i(4403);class o extends n.BaseWidget{constructor(){super()}static get observedAttributes(){return["size","text"]}get size(){return this.getAttribute("size")}set size(e){this.setAttribute("size",e)}get text(){return this.getAttribute("size")}set text(e){this.setAttribute("text",e)}connectedCallback(){}disconnectedCallback(){}attributeChangedCallback(e,t,i){switch(e){case"size":this.onSizeChange(i);break;case"text":this.onTextChange(i)}}onSizeChange(e){this.setStyle({fontSize:this.fontSize})}onTextChange(e){this.innerHTML=e}get fontSize(){switch(this.size){case"small":return".5rem";default:case"medium":return".8rem";case"large":return"1rem"}}}t.BlazeTypography=o},6806:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetStory=void 0;let o=i(9126),s=i(2904),a=i(5785),r=i(4403),l=i(6450),d=i(9965),h=i(8921),u=i(277),c=i(4545),p=i(4906),g=i(3574),v=i(9266);class y extends s.BlazeWidgetContent{get currentPageIndexWithoutCustomAds(){return this.pageIndex-this.pages.slice(0,this.pageIndex).filter(e=>{var t;return"Ad"===(null===(t=e.data)||void 0===t?void 0:t.type)}).length}getShareablePageId(){var e,t;if(this.currentPage&&!this.currentPage.isAd)return(null===(e=this.currentPage.data)||void 0===e?void 0:e.id)||null;for(let e=this.pageIndex-1;e>=0;e--){let i=this.pages[e];if(!(null==i?void 0:i.isAd))return(null===(t=i.data)||void 0===t?void 0:t.id)||null}return null}constructor(e,t,i=[],n,s=c.VideoPlayerService){var u;super(),this.playerStyle=e,this.mode=t,this.actionHandlers=i,this.aspectRatio=n,this.videoPlayerState=s,this.pages=[],this.data={},this.isStoryLoadCompletedTriggered=!1,this.isStoryActive=!1,this.isResumeOnFocusExecuted=!1,this.isUnloading=!1,this.isCtaWasClickedOrSwiped=!1,this.pageIndex=0,this.contentType="story",this.resumeAfterfocus=!1,this.totalPlayStopwatch=new v.Stopwatch,this.navigationTimeout=null,this.prefetchTimeout=null,this.lastPageIndexToResume=0,this.elementsToHideOnWebAds=[],this.elementsToHideOnImaAds=[],this.requestAnimationId=null,this.shouldShowImaAdOnStart=!1,this.lastBannerRefreshInWatchTimeMS=0,this.boundOnResumeEvent=this.onResumeEvent.bind(this),this.boundOnPauseEvent=this.onPauseEvent.bind(this),this.boundOnNextPageEvent=this.onNextPageEvent.bind(this),this.boundOnPrevPageEvent=this.onPrevPageEvent.bind(this),this.playbackParts=[],(0,v.mergeStyles)(this.container,{position:"relative",width:"100%",height:"100%",minHeight:"100%",background:"#000000"}),this.shadowTopElement=document.createElement("div"),this.shadowTopElement.style.background="linear-gradient(rgba(0, 0, 0, 0.7), transparent)",this.shadowTopElement.style.background="-webkit-linear-gradient(rgba(0, 0, 0, 0.7), transparent)",this.shadowTopElement.style.position="absolute",this.shadowTopElement.style.width="100%",this.shadowTopElement.style.height="30%",this.shadowTopElement.style.top="0px",this.shadowTopElement.style.borderRadius=this.getContainerBorderRadius(),this.shadowTopElement.style.zIndex=l.Z_INDEX.onTopOfPlayer,this.shadowTopElement.style.pointerEvents="none",this.container.appendChild(this.shadowTopElement);let p=h.WidgetsFactory.create("blaze-div");if((0,v.mergeStyles)(p,{position:"absolute",top:"0%",left:"0%",right:"0%",height:"3px",opacity:"80%",margin:"16px",zIndex:l.Z_INDEX.onTopOfPlayer}),this.progressElement=document.createElement("div"),(0,v.mergeStyles)(this.progressElement,{width:"100%",height:"100%",display:"grid"}),p.append(this.progressElement),this.container.append(p),("mobile"===r.deviceDetector.platform||"tablet"===r.deviceDetector.platform)&&"Embedded"!==t){let e=new r.LongPressHandler({onStart:()=>{this.videoPlayerState.isPlaying&&!c.VideoPlayerService.isNavigating&&(this.event(l.StoryAction.PlaybackPause,{playback_action_method:"Press"}),this.pause())},onEnd:()=>{this.videoPlayerState.isPlaying&&!c.VideoPlayerService.isNavigating&&(this.event(l.StoryAction.PlaybackPlay,{playback_action_method:"Release"}),this.resume())}});e.attach(this.container),this.longPressHandler=e}let y=()=>{var e,t,i;null===(e=this.shareModal)||void 0===e||e.close(),null===(t=this.closedCaptionsModal)||void 0===t||t.close(),this.exitTrigger="Skip",this.navigationType="Manual",this.navigationDirection="Backwards","SingleContent"!==c.VideoPlayerService.playReference||0!==this.pageIndex?("SingleContent"===c.VideoPlayerService.playReference&&this.revertNextPageButtonToPreviousAction(),null===(i=this.resumeAfterBlurButton)||void 0===i||i.setAttribute("blaze-btn-hidden","true"),this.videoPlayerState.isPlaying=!0,this.goPrevPage()):this.currentPage.currentTime=0},m=()=>{var e,t,i,n,o,s,a;null===(e=this.shareModal)||void 0===e||e.close(),null===(t=this.closedCaptionsModal)||void 0===t||t.close(),this.exitTrigger="Skip",this.navigationType="Manual",this.navigationDirection="Forwards","SingleContent"===c.VideoPlayerService.playReference&&this.hasNoMorePagesToPlay()?c.ConfigService.shouldAutoAdvance&&(null===(n=null===(i=this.refContentModal)||void 0===i?void 0:i.player)||void 0===n||n.renderPlayerBackgroun
1d(!0),null===(s=null===(o=this.refContentModal)||void 0===o?void 0:o.player)||void 0===s||s.animateCloseWithDirection({direction:"HorizontalForwards",callback:()=>r.URLManager.navigateTo("AUTO_ADVANCE")})):(null===(a=this.resumeAfterBlurButton)||void 0===a||a.setAttribute("blaze-btn-hidden","true"),this.videoPlayerState.isPlaying=!0,this.goNextPage(this.navigationType))},b=h.WidgetsFactory.create("blaze-button");b.setAttribute("aria-hidden","true"),b.setAttribute("role","presentation"),b.setAttribute("tabindex","-1"),b.setAttribute("data-testid","blaze-widget-story-prev-page-button"),b.setStyle({position:"absolute",top:"0",right:"0",bottom:"15%",left:"0",width:"30%",height:"85%",opacity:"0","-webkit-tap-highlight-color":"transparent",zIndex:l.Z_INDEX.player});let f=h.WidgetsFactory.create("blaze-button");f.setAttribute("aria-hidden","true"),f.setAttribute("role","presentation"),f.setAttribute("tabindex","-1"),f.setAttribute("data-testid","blaze-widget-story-next-page-button"),f.setStyle({position:"absolute",top:"0",right:"RTL"===c.ConfigService.layoutDirection?"30%":"0",bottom:"15%",left:"RTL"===c.ConfigService.layoutDirection?"0":"30%",width:"70%",height:"85%",opacity:"0","-webkit-tap-highlight-color":"transparent",zIndex:l.Z_INDEX.player}),b.addEventListener("click",(0,r.throttle)(y,100)),f.addEventListener("click",(0,r.throttle)(m,100)),this.container.append(b),this.container.append(f),this.topContainer=h.WidgetsFactory.create("blaze-div"),this.topContainer.setStyle({position:"absolute",top:"40px",width:"100%",paddingLeft:"16px",paddingRight:"16px",display:"flex",justifyContent:"space-between",boxSizing:"border-box",columnGap:"10px",zIndex:l.Z_INDEX.onTopOfPlayer}),this.contentWrapper=h.WidgetsFactory.create("blaze-div"),this.contentWrapper.setStyle({minWidth:"0",display:"flex",flex:"3",gap:"8px",alignItems:"baseline"}),this.contentChip=h.WidgetsFactory.create("blaze-div"),v.AccessibilityUtils.setElementAccessibilityHidden(this.contentChip),this.contentChip.setStyle({display:"flex",alignItems:"center",height:"17px",boxSizing:"border-box",fontWeight:"600",alignSelf:"flex-start",borderRadius:this.playerStyle.statusLiveStyle.borderRadius,padding:this.playerStyle.statusLiveStyle.padding,fontFamily:this.playerStyle.statusLiveStyle.font,color:this.playerStyle.statusLiveStyle.textColor,borderWidth:this.playerStyle.statusLiveStyle.borderWidth+"px"}),this.contentTitle=h.WidgetsFactory.create("blaze-div"),v.AccessibilityUtils.setElementAccessibilityHidden(this.contentTitle),this.contentTitle.innerText="",this.contentTitle.setStyle({margin:"0px",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap",fontWeight:"600",color:this.playerStyle.titleColor,display:this.playerStyle.titleVisible?"inline":"none",fontFamily:this.playerStyle.titleFont}),this.contentPublishedDate=h.WidgetsFactory.create("blaze-div"),v.AccessibilityUtils.setElementAccessibilityHidden(this.contentPublishedDate),this.contentPublishedDate.innerText="",this.contentPublishedDate.setStyle({fontWeight:"600",color:this.playerStyle.publishedDateColor,display:this.playerStyle.publishedDateVisible?"inline":"none",fontFamily:this.playerStyle.publishedDateFont}),this.contentWrapper.append(this.contentTitle),this.contentWrapper.append(this.contentChip),this.contentWrapper.append(this.contentPublishedDate),this.topContainer.append(this.contentWrapper),this.container.append(this.topContainer),this.buttonsContainer=h.WidgetsFactory.create("blaze-div"),this.buttonsContainer.setStyle({display:"flex",height:"30px",gap:"1rem",zIndex:l.Z_INDEX.onTopOfPlayer});let S="iOS"===r.deviceDetector.OS,E="Mobile Safari"===r.deviceDetector.browser,C="tablet"===r.deviceDetector.platform&&"Mac OS"===r.deviceDetector.OS,T=S&&("Safari"===r.deviceDetector.browser||"Chrome"===r.deviceDetector.browser),A=null===(u=this.actionHandlers)||void 0===u?void 0:u.filter(e=>e.actionId===d.ActionHandlerId.AddCustomActionButton).slice(0,2),I=!(!A[0]||!this.playerStyle.icons.customActionButtonOne),M=!(!A[1]||!this.playerStyle.icons.customActionButtonTwo);(S||E||T||C)&&"Embedded"!==this.mode&&this.createResumeAfterBlurButton(),"desktop"===r.deviceDetector.platform&&this.isButtonVisible("PLAY_PAUSE")&&(this.playButtonElement=this.createPlayerButtonsAndAppendToButtonsContainer({iconUrl:this.playerStyle.icons.play,eventType:"click",clickHandler:()=>
1this.playToggle(),dataTestId:"blaze-widget-story-play-button"})),I&&this.isButtonVisible("CUSTOM_ACTION_BUTTON_ONE")&&(this.customActionButtonOneElement=this.createPlayerButtonsAndAppendToButtonsContainer({iconUrl:this.playerStyle.icons.customActionButtonOne,eventType:"click",clickHandler:e=>this.onCustomActionButtonClick(e,A[0].options),dataTestId:"blaze-widget-story-custom-action-button-one"})),M&&this.isButtonVisible("CUSTOM_ACTION_BUTTON_TWO")&&(this.customActionButtonTwoElement=this.createPlayerButtonsAndAppendToButtonsContainer({iconUrl:this.playerStyle.icons.customActionButtonTwo,eventType:"click",clickHandler:e=>this.onCustomActionButtonClick(e,A[1].options),dataTestId:"blaze-widget-story-custom-action-button-two"})),this.isButtonVisible("MUTE_UNMUTE")&&(this.muteButtonElement=this.createPlayerButtonsAndAppendToButtonsContainer({iconUrl:this.playerStyle.icons.mute,eventType:"click",clickHandler:this.muteToggle.bind(this),dataTestId:"blaze-widget-story-mute-button"})),this.isButtonVisible("SHARE")&&(this.shareButtonElement=this.createPlayerButtonsAndAppendToButtonsContainer({iconUrl:this.playerStyle.icons.share,eventType:"click",clickHandler:this.onShareClick.bind(this),dataTestId:"blaze-widget-story-share-button"})),this.isButtonVisible("EXIT_PLAYER")&&(this.exitMobileTabletButtonElement=this.createPlayerButtonsAndAppendToButtonsContainer({iconUrl:this.playerStyle.icons.exitMobileTablet,eventType:"click",clickHandler:e=>{null==e||e.stopPropagation(),this.exitTrigger="Close Button",this.navigationDirection="",this.navigationType="",this.close(!0)},dataTestId:"blaze-widget-story-exit-button"})),this.isButtonVisible("FULLSCREEN")&&(this.fullScreenElement=this.createPlayerButtonsAndAppendToButtonsContainer({iconUrl:this.playerStyle.icons.fullscreen,eventType:"click",clickHandler:this.onExpandClick.bind(this)})),this.isButtonVisible("CLOSED_CAPTIONS")&&c.ConfigService.shouldAllowClosedCaptions&&(this.closedCaptionsButtonElement=this.createPlayerButtonsAndAppendToButtonsContainer({iconUrl:this.playerStyle.icons.closedCaptionsOff,eventType:"click",clickHandler:this.onClosedCaptionClick.bind(this),dataTestId:"blaze-widget-story-closed-captions-button"})),this.topContainer.append(this.buttonsContainer),this.bottomContainer=h.WidgetsFactory.create("blaze-div"),this.bottomContainer.setStyle({position:"absolute",bottom:"desktop"===r.deviceDetector.platform&&"Full Screen"===t?"-100px":"0",width:"100%",height:"auto",padding:"0px 25px "+("Embedded"===t?this.getEmbeddedBottomContainerPaddingBottom():"40px"),display:"flex",flexFlow:"column",boxSizing:"border-box",zIndex:l.Z_INDEX.onTopOfPlayer}),this.bottomButtonsWrapper=h.WidgetsFactory.create("blaze-div"),this.bottomButtonsWrapper.setStyle({display:"flex",flexDirection:"column",width:"100%",alignItems:"center",gap:"8px"}),this.bottomContainer.append(this.bottomButtonsWrapper),this.ctaButtonElement=new a.BlazeCtaButton,this.ctaButtonElement.setStyle({justifyContent:g.positionMap.CENTER}),this.ctaButtonElement.setAnchorButtonStyles({width:"tablet"===r.deviceDetector.platform?"60%":"100%",fontFamily:this.playerStyle.ctaButton.font}),this.ctaButtonElement.setAttribute("hidden-btn","true"),this.ctaButtonElement.addEventListener("click",e=>this.handleCtaAction(e,"CTA Click")),this.updateCtaButtonLayout(),this.bottomButtonsWrapper.append(this.ctaButtonElement),this.bannerAdElement=new o.BlazeWidgetBannerAd(this),"mobile"===r.deviceDetector.platform&&"Embedded"!==t?this.bottomButtonsWrapper.append(this.bannerAdElement):"Embedded"!==t&&(this.bannerAdElement.style.position="absolute",this.bannerAdElement.style.bottom="10px",this.container.append(this.bannerAdElement)),this.container.append(this.bottomContainer),("desktop"===r.deviceDetector.platform&&"Full Screen"===this.mode||"desktop"===r.deviceDetector.platform&&"Embedded"===this.mode&&"Horizontal"===this.aspectRatio)&&(this.nextPageButton=this.createNavigationButtonsAndAppendToWidgetStoryContainer({iconUrl:this.playerStyle.icons.navigation.nextPage,position:"Embedded"===this.mode?"right":"left",margin:"Embedded"===this.mode?"73px":"32px",clickHandler:m,buttonType:"NEXT_PAGE"}),"SingleContent"===c.VideoPlayerService.playReference&&(this.originalNextPageDesktopClickListener=m,this.restartStoryOnClickEvent=()=>{this.playPage(0),this.revertNextPageButtonToPreviousAction()}),this.prevPageButton=this.createNavigationButtonsAndAppendToWidgetStoryContainer({iconUrl:this.playerStyle.icons.navigation.prevPage,position:"Embedded"===this.mode?"left"
1:"right",margin:"Embedded"===this.mode?"73px":"32px",clickHandler:y,buttonType:"PREV_PAGE"}),this.nextStoryButton=this.createNavigationButtonsAndAppendToWidgetStoryContainer({iconUrl:this.playerStyle.icons.navigation.nextStory,position:"Embedded"===this.mode?"right":"left",margin:"Embedded"===this.mode?"24px":"100px",clickHandler:(0,r.throttle)(()=>{var e,t,i,n,o,s,a,l;if(this.exitTrigger="Skip","SingleContent"===c.VideoPlayerService.playReference&&c.ConfigService.shouldAutoAdvance)return null===(t=null===(e=this.refContentModal)||void 0===e?void 0:e.player)||void 0===t||t.renderPlayerBackground(!0),void(null===(n=null===(i=this.refContentModal)||void 0===i?void 0:i.player)||void 0===n||n.animateCloseWithDirection({direction:"HorizontalForwards",callback:()=>r.URLManager.navigateTo("AUTO_ADVANCE")}));null===(o=this.nextStoryButton)||void 0===o||o.blur(),null===(s=this.onNextStory)||void 0===s||s.call(this,"Manual"),this.dispatchEvent(new CustomEvent(d.InternalEvent.NEXT_STORY,{bubbles:!0,cancelable:!1})),null===(a=this.shareModal)||void 0===a||a.close(),null===(l=this.closedCaptionsModal)||void 0===l||l.close(),this.currentPage.muted=this.videoPlayerState.isMuted},l.ONE_SECOND/4),buttonType:"NEXT_STORY"}),this.prevStoryButton=this.createNavigationButtonsAndAppendToWidgetStoryContainer({iconUrl:this.playerStyle.icons.navigation.prevStory,position:"Embedded"===this.mode?"left":"right",margin:"Embedded"===this.mode?"24px":"100px",clickHandler:(0,r.throttle)(()=>{var e,t,i,n;this.exitTrigger="Skip",null===(e=this.prevStoryButton)||void 0===e||e.blur(),null===(t=this.onPrevStory)||void 0===t||t.call(this,"Manual"),this.dispatchEvent(new CustomEvent(d.InternalEvent.PREV_STORY,{bubbles:!0,cancelable:!1})),null===(i=this.shareModal)||void 0===i||i.close(),null===(n=this.closedCaptionsModal)||void 0===n||n.close(),this.currentPage.muted=this.videoPlayerState.isMuted},l.ONE_SECOND/4),buttonType:"PREV_STORY"})),this.elementsToHideOnWebAds.push(this.bottomContainer,this.contentTitle,this.contentPublishedDate,this.contentChip,this.fullScreenElement,this.closedCaptionsButtonElement,p,this.shadowTopElement,this.buttonsContainer,this.bannerAdElement),this.elementsToHideOnImaAds.push(this.bottomContainer,this.contentTitle,this.contentPublishedDate,this.contentChip,p,this.shadowTopElement,this.buttonsContainer,this.muteButtonElement,this.fullScreenElement,this.closedCaptionsButtonElement,this.shareModal,b,f,this.topContainer,this.bannerAdElement),"Embedded"===this.mode&&(this.elementsToHideOnWebAds.push(this.nextPageButton,this.prevPageButton,this.nextStoryButton,this.prevStoryButton),this.elementsToHideOnImaAds.push(this.nextPageButton,this.prevPageButton,this.nextStoryButton,this.prevStoryButton)),this.addEventListener(d.InternalEvent.BANNER_ANALYTICS,e=>{let t=e.detail;this.bannerAdEvent(t)})}isButtonVisible(e){let t;return t=["MUTE_UNMUTE","EXIT_PLAYER","PLAY_PAUSE","SHARE","FULLSCREEN","CLOSED_CAPTIONS","CUSTOM_ACTION_BUTTON_ONE","CUSTOM_ACTION_BUTTON_TWO"].includes(e)?this.playerStyle.iconsButton.find(t=>t.value===e):this.playerStyle.iconsButtonNavigation.find(t=>t.value===e),"Embedded"===this.mode&&(null==t?void 0:t.isEmbeddedVisible)||"Full Screen"===this.mode&&(null==t?void 0:t.isVisible)}createPlayerButtonsAndAppendToButtonsContainer(e){let{iconUrl:t,eventType:i,clickHandler:n}=e,o=h.WidgetsFactory.create("blaze-button");return o.addEventListener(i,n),o.setIconUrl(t),e.dataTestId&&o.setAttribute("data-testid",e.dataTestId),this.buttonsContainer.append(o),o}createNavigationButtonsAndAppendToWidgetStoryContainer(e){let{buttonType:t,iconUrl:i,position:n,margin:o,clickHandler:s}=e,a=this.playerStyle.iconsButtonNavigation.find(e=>e.value===t),r="RTL"===c.ConfigService.layoutDirection?"left"===n?"right":"left":n,d=h.WidgetsFactory.create("blaze-button");return d.setStyle({position:"absolute",[r]:"Embedded"===this.mode?"0":"100%",top:"50%",transform:"RTL"===c.ConfigService.layoutDirection?"rotate(180deg) translateY(50%)":"translateY(-50%)",["left"===r?"marginLeft":"marginRight"]:o,zIndex:"Embedded"===this.mode?l.Z_INDEX.onTopOfPlayer:"auto"}
1),a&&this.applyIconStyle(d,a,i),d.addEventListener("click",s),d.setAttribute("data-testid","blaze-widget-story-"+t+"-button"),this.container.append(d),d}createResumeAfterBlurButton(){this.resumeAfterBlurButton=h.WidgetsFactory.create("blaze-button"),this.resumeAfterBlurButton.setIconUrl(u.playResumeIconSvg),this.resumeAfterBlurButton.setAttribute("height","96px"),this.resumeAfterBlurButton.setAttribute("width","96px"),this.resumeAfterBlurButton.setStyle({display:"none",position:"fixed",borderRadius:"50%",zIndex:"99999",top:"20%",padding:"40%",margin:"auto"}),this.resumeAfterBlurButton.addEventListener("click",()=>{var e,t;if(this.resume(),0===this.querySelectorAll("style").length){let e=document.createElement("style");e.innerHTML="\n @keyframes fadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n ",this.append(e)}null===(e=this.resumeAfterBlurButton)||void 0===e||e.setIconUrl(u.pauseResumeIconSvg),null===(t=this.resumeAfterBlurButton)||void 0===t||t.setStyle({opacity:"0",pointerEvents:"none",animation:"fadeOut 0.5s forwards"}),setTimeout(()=>{var e,t;null===(e=this.resumeAfterBlurButton)||void 0===e||e.setIconUrl(u.playResumeIconSvg),null===(t=this.resumeAfterBlurButton)||void 0===t||t.setStyle({opacity:"1",pointerEvents:"auto",animation:"unset",display:"none"})},l.ONE_SECOND)}),this.container.append(this.resumeAfterBlurButton)}applyIconStyle(e,t,i){e.setIconUrl(i),e.style.display=t.isVisible?"block":"none",(null==t?void 0:t.padding)&&"Embedded"!==this.mode?e.style.padding=t.padding:"Embedded"===this.mode&&(e.style.padding="5px"),(null==t?void 0:t.borderRadius)&&(e.style.borderRadius=t.borderRadius),(null==t?void 0:t.backgroundColor)&&(e.style.backgroundColor=t.backgroundColor),(null==t?void 0:t.size)&&"Embedded"!==this.mode?(e.setAttribute("width",t.size),e.setAttribute("height",t.size)):(null==t?void 0:t.embeddedSize)&&"Embedded"===this.mode&&(e.setAttribute("width",t.embeddedSize),e.setAttribute("height",t.embeddedSize)),(null==t?void 0:t.color)&&e.setAttribute("icon-color",t.color)}onCustomActionButtonClick(e,t){t.onClick(e,this.data.entities),this.event(l.StoryAction.CustomActionButtonClick,{custom_action_button_name:t.buttonName})}onLanguageChange(e){var t,i,n,o;let s=(null===(t=this.currentContentPage.closedCaptions)||void 0===t?void 0:t.find(t=>""+t.language===e.detail.language))?null===(i=this.playerStyle)||void 0===i?void 0:i.icons.closedCaptionsOn:null===(n=this.playerStyle)||void 0===n?void 0:n.icons.closedCaptionsOff;null===(o=this.closedCaptionsButtonElement)||void 0===o||o.setIconUrl(s||"")}onShareClick(){return n(this,void 0,void 0,function*(){var e;this.event(l.StoryAction.ShareClick,{}),this.videoPlayerState.isPlaying&&this.pause();let t=this.getShareablePageId(),i=r.URLManager.buildShareUrl("story",this.data.id,t||void 0);(null==navigator?void 0:navigator.share)?navigator.share({text:this.data.title,url:i}).then(()=>{this.event(l.StoryAction.ShareSuccess,{})}).catch(e=>{var t;"AbortError"!==e.name&&(null===(t=this.shareModal)||void 0===t||t.open(i))}).finally(()=>{this.videoPlayerState.isPlaying&&this.resume()}):null===(e=this.shareModal)||void 0===e||e.open(i)})}onClosedCaptionClick(){var e;null===(e=this.closedCaptionsModal)||void 0===e||e.open()}updateCtaButtonLayout(){var e;this.ctaButtonElement.setStyle({height:"Embedded"===this.mode?this.getEmbeddedCtaButtonHeight():null!==(e=this.playerStyle.ctaButton.height)&&void 0!==e?e:l.DEFAULT_CTA_HEIGHT+"px"}),"Horizontal"===this.aspectRatio&&this.ctaButtonElement.setStyle({width:this.playerStyle.ctaButton.width===p.Presets.CtaButtonStyle.width?"50%":this.playerStyle.ctaButton.width}),"Embedded"===this.mode&&("mobile"===r.deviceDetector.platform?this.ctaButtonElement.setStyle({maxWidth:"Horizontal"===this.aspectRatio?"150px":"100%"}):"tablet"===r.deviceDetector.platform?this.ctaButtonElement.setStyle({maxWidth:"200px"}):this.ctaButtonElement.setStyle({maxWidth:"320px"})),this.bottomContainer.setStyle({paddingLeft:"CENTER"!==this.playerStyle.ctaButton.position?"10px":"25px",paddingRight:"CENTER"!==this.playerStyle.ctaButton.position?"10px":"25px"}),this.bottomButtonsWrapper.setStyle({alignItems:g.positionMap[this.playerStyle.ctaButton.position]}),this.ctaButtonElement.setStyle({justifyContent:g.positionMap[this.playerStyle.ctaButton.position]}),this.ctaButtonElement.setAnchorButtonStyles({fontSize:r.TextScaleService.scaleFontSize("Embedded"===this.mode?"14px":this.playerStyle.ctaButton.fontSize),fontFamily:this.playerStyle.ctaButton.font,fontWeight:this.playerStyle.ctaButton.fontWeight,textTransform:this.playerStyle.ctaButton.textTransform,borderRadius:this.playerStyle.ctaButton.borderRadius,border:this.playerStyle.ctaButton.border}),this.ctaButtonElement.setCtaIconStyles({display:this.playerStyle.ctaButton.icon.isVisible?"inline-flex":"none",padding:this.playerStyle.ctaButton.padding}),this.ctaButtonElement.setAttribute("icon-url",this.playerStyle.ctaButton.icon.url),this.ctaButtonElement.setAttribute("icon-size",this.playerStyle.ctaButton.icon.size)}updateChip(){this.playerStyle.statusLiveStyle.isVisible&&this.data.isLive?(this.contentChip.style.display="flex",this.contentChip.style.backgroundColor=this.playerStyle.statusLiveStyle.backgroundColor,this.contentChip.textContent=this.playerStyle.statusLiveStyle.text):this.contentChip.style.display="none"}setTheme(e){this.playerStyle=e,this.render()}disableStoriesNavigationButtons(){this.nextStoryButton&&this.prevStoryButton&&(this.updateNavButton("DISABLED",this.nextStoryButton),this.updateNavButton("DISABLED",this.prevStoryButton))}disablePageNavigationButtons(){this.prevPageButton&&this.nextPageButton&&(this.updateNavButton("DISABLED",this.nextPageButton),this.updateNavButton("DISABLED",this.prevPageButton))}setButtonNavigationAsDisabled(e){"ALL"===e?(this.disableStoriesNavigationButtons(),this.disablePageNavigationButtons()):"STORIES_NAVIGATION_ONLY"===e&&this.disableStoriesNavigationButtons()}shouldShowBannerAd(){var e;return!!this.bannerAdElement&&!1!==this.currentContentPage.shouldShowBannerAd&&!("Ad"===(null===(e=this.currentPage.data)||void 0===e?void 0:e.type)||this.data.isAd)}adjustContentView(){var e,t,i,n,o,s,a,d,h,u,p,g,v,y;if([...this.elementsToHideOnWebAds,...this.elementsToHideOnImaAds].forEac
1h(e=>{e&&e!==this.bannerAdElement&&(e.style.visibility="visible")}),c.ConfigService.shouldAllowClosedCaptions){let t=null===(e=this.currentPage.data.closedCaptions)||void 0===e?void 0:e.find(e=>""+e.language===localStorage.getItem(l.LOCAL_STORAGE_KEY_LAST_SELECTED));this.currentPage.setAttribute("is-captions-visible",(!!t).toString())}let m="desktop"===r.deviceDetector.platform;return"Ad"===(null===(t=this.currentPage.data)||void 0===t?void 0:t.type)||this.data.isAd?(this.elementsToHideOnWebAds.forEach(e=>{e&&(e.style.visibility="hidden")}),m&&(null===(o=null===(n=null===(i=this.refContentModal)||void 0===i?void 0:i.player)||void 0===n?void 0:n.renderPlayerBackground)||void 0===o||o.call(n,!0),c.ConfigService.shouldDismissPlayer&&(null===(s=this.refContentModal)||void 0===s||s.exitButtonWrapperElement.setStyle({display:"none"}))),c.VideoPlayerService.muteStateBeforeAd=this.videoPlayerState.isMuted?"mute":"unmute",this.setPlayerButtonPosition("AD"),this.setButtonNavigationAsDisabled("STORIES_NAVIGATION_ONLY"),"unmute"===c.VideoPlayerService.muteStateBeforeAd&&this.muteToggle(),void this.currentPage.setAttribute("is-captions-visible","false")):this.currentPage.shouldShowImaAd?(this.elementsToHideOnImaAds.forEach(e=>{e&&(e.style.visibility="hidden")}),null===(a=this.longPressHandler)||void 0===a||a.detach(this.container),m&&(null===(u=null===(h=null===(d=this.refContentModal)||void 0===d?void 0:d.player)||void 0===h?void 0:h.renderPlayerBackground)||void 0===u||u.call(h,!0),c.ConfigService.shouldDismissPlayer&&(null===(p=this.refContentModal)||void 0===p||p.exitButtonWrapperElement.setStyle({display:"none"}))),this.setButtonNavigationAsDisabled("ALL"),void this.currentPage.setAttribute("is-captions-visible","false")):("no-ad"!==c.VideoPlayerService.muteStateBeforeAd&&(this.bannerAdElement&&!1!==this.currentContentPage.shouldShowBannerAd&&(null===(g=this.bannerAdElement)||void 0===g||g.show(this.data.bannerAdInfo,!1)),"iOS"===r.deviceDetector.OS||"tablet"===r.deviceDetector.platform&&"Mac OS"===r.deviceDetector.OS?this.videoPlayerState.isMuted||this.muteToggle():"mute"!==c.VideoPlayerService.muteStateBeforeAd||this.videoPlayerState.isMuted?"unmute"===c.VideoPlayerService.muteStateBeforeAd&&this.videoPlayerState.isMuted&&this.muteToggle():this.muteToggle(),c.VideoPlayerService.muteStateBeforeAd="no-ad"),null===(v=this.longPressHandler)||void 0===v||v.attach(this.container),this.setPlayerButtonPosition("NO_AD"),c.ConfigService.shouldDismissPlayer&&(null===(y=this.refContentModal)||void 0===y||y.render()),void this.updatePlayerButtonsState(!0))}setPlayerButtonPosition(e){var t,i,n,o,s;if("AD"===e)"HORIZONTAL"===this.playerStyle.iconsPosition?"LTR"===c.ConfigService.layoutDirection?(this.buttonsContainer.style.flexDirection="row-reverse",null===(t=this.muteButtonElement)||void 0===t||t.setAttribute("order","-1")):(this.topContainer.style.flexDirection="row",this.buttonsContainer.style.flexDirection="row-reverse",null===(i=this.muteButtonElement)||void 0===i||i.setAttribute("order","-1")):"LTR"===c.ConfigService.layoutDirection?null===(n=this.muteButtonElement)||void 0===n||n.setAttribute("order","-1"):(null===(o=this.muteButtonElement)||void 0===o||o.setAttribute("order","-1"),this.topContainer.style.flexDirection="row");else{let e=this.playerStyle.iconsButtonOrder.indexOf("MUTE_UNMUTE");null===(s=this.muteButtonElement)||void 0===s||s.setAttribute("order",String(e)),"HORIZONTAL"===this.playerStyle.iconsPosition?"LTR"===c.ConfigService.layoutDirection?(this.buttonsContainer.style.flexDirection="row",this.topContainer.style.flexDirection="row"):(this.topContainer.style.flexDirection="row",this.buttonsContainer.style.flexDirection="row"):"LTR"===c.ConfigService.layoutDirection||(this.topContainer.style.flexDirection="row")}}updatePlayerButtonIcons(){var e,t,i,n,o;let s=this.videoPlayerState.isPlaying?this.playerStyle.icons.pause:this.playerStyle.icons.play,a=this.videoPlayerState.isMuted?this.playerStyle.icons.mute:this.playerStyle.icons.unmute;if(this.playButtonElement&&this.playButtonElement.setIconUrl(s),this.muteButtonElement&&this.muteButtonElement.setIconUrl(a),this.closedCaptionsButtonElement){if((null===(e=this.currentContentPage.closedCaptions)||void 0===e?void 0:e.length)>0){let e=localStorage.getItem(l.LOCAL_STORAGE_KEY_LAST_SELECTED),s=(null===(t=this.currentContentPage.closedCaptions)||void 0===t?void 0:t.find(t=>""+t.language===e))?null===(i=this.playerStyle)||void 0===i?void 0:i.icons.closedCaptionsOn:null===(n=this.playerStyle)||void 0===n?void 0:n.icons.closedCaptionsOff;null===(o=this.closedCaptionsButtonElement)||void 0===o||o.setAttribute("disabled","false"),this.closedCaptionsButtonElement.setIconUrl(s)}else this.closedCaptionsButtonElement.setAttribute("disabled","true"),this.closedCaptionsButtonElement.setIconUrl(this.playerStyle.icons.closedCaptionsOff)}}handleCtaAction(e,t){var i,n,o,s,a,h,u,p;return this.event(l.StoryAction.CtaClick,{gesture_type:t}),(null===(i=this.shareModal)||void 0===i?void 0:i.isOpen)&&(null===(n=this.shareModal)||void 0===n||n.close()),this.playerStyle.ctaButton.isDisplayCtaModal&&(r.deviceDetector.isMobile||r.deviceDetector.isTablet)&&(null===(o=this.ctaModal)||void 0===o||o.open()),e.preventDefault(),e.stopImmediatePropagation(),(0,v.delay)(l.ONE_AND_HALF_SECOND).then(()=>{var e,t;let i=this.ctaButtonElement.querySelector("a");"iOS"===r.deviceDetector.OS||"Safari"===r.deviceDetector.browser?i&&(window.location.href=i.href):(null==i||i.dispatchEvent(new MouseEvent("click",{bubbles:!1,cancelable:!0,view:window})),(null===(e=this.ctaModal)||void 0===e?void 0:e.isOpen)&&(null===(t=this.ctaModal)||void 0===t||t.close())),this.isCtaWasClickedOrSwiped=!1}),(null===(a=null===(s=this.refContentModal)||void 0===s?void 0:s.parentWidget)||void 0===a?void 0:a.id)&&c.EventService.dispatch(null===(h=this.refContentModal)||void 0===h?void 0:h.parentWidget,d.Delegation.onWidgetTriggerCTA,{widgetId:null===(p=null===(u=this.refContentModal)||void 0===u?void 0:u.parentWidget)||void 0===p?void 0:p.id,actionType:"URL",actionParam:this.ctaButtonElement.getAttribute("href")}),this.exitTrigger=t,this.event(l.StoryAction.PageExit,{}),this.event(l.StoryAction.Exit,{}),this.pause(),this.resumeAfterfocus=!0,!0}playToggle(e){var t;let i=null!==(t=null==e?void 0:e.customIsPlaying)&&void 0!==t?t:this.videoPlayerState.isPlaying;this.event(i?l.StoryAction.PlaybackPause:l.StoryAction.PlaybackPlay,{playback_action_method:"Click"}),i?(this.pause(),this.isPausedManually=!0):(this.resume(),this.isPausedManually=!1),"boolean"!=typeof(null==e?void 0:e.customIsPlaying)&&(this.videoPlayerState.isPlaying=!i),this.updatePlayerButtonIcons(),this.updateStoryAccessibilityLabels()}muteToggle(){this.event(l.StoryAction.Audio,{}),this.videoPlayerState.isMuted=!this.videoPlayerState.isMuted;let e=this.pages[this.pageIndex];return e.muted=this.videoPlayerState.isMuted,this.updatePlayerButtonIcons(),this.updateStoryAccessibilityLabels(),e.muted}resetStoryLocationIndexToLastUnseen(){let e=0;for(let t=this.data.pages.length-1;t>=0;t--){let i=this.data.pages[t],n=this.data.pages[t-1];if(i&&n&&!i.hasViewed&&n.hasViewed){e=t;break}}this.setInitialPageIndex(e)}setInitialPageIndex(e){if(!this.pages.length)return void(this.pageIndex=0);let t=Math.min(Math.max(e,0),this.pages.length-1);this.pageIndex=t,this.pages[this.pageIndex].shouldShowImaAd=!1}setInitialPageById(e){if(!e)return void this.resetStoryLocationIndexToLastUnseen();let t=this.data.pages.findIndex(t=>(null==t?void 0:t.id)===e);t>-1?this.setInitialPageIndex(t):this.resetStoryLocationIndexToLastUnseen()}determineAspectRatio(e){var t,i;let n=null===(i=null===(t=e.pages[0])||void 0===t?void 0:t.baseLayer)||void 0===i?void 0:i.content.renditions.find(e=>"Horizontal"===e.aspectRatio);return c.ConfigService.shouldAllowHorizontalStories&&("Full Screen"===this.mode&&"desktop"===r.deviceDetector.platform||"Embedded"===this.mode&&"Horizontal"===this.aspectRatio)&&n?"Horizontal":"Vertical"}clearExistingContent(){var e,t;
1null===(e=this.pages)||void 0===e||e.forEach(e=>{var t;return null===(t=null==e?void 0:e.remove)||void 0===t?void 0:t.call(e)}),this.pages=[],null===(t=this.playbackParts)||void 0===t||t.forEach(e=>{(null==e?void 0:e.parentNode)instanceof Element&&e.parentNode.remove()}),this.playbackParts=[]}createPageElement(e){let t="Ad"===e.type?new o.BlazeWidgetAd(this):new o.BlazeWidgetVideo(this);return t instanceof o.BlazeWidgetVideo&&(t.muted=this.videoPlayerState.isMuted),t.setData(e),this.setupPageEndedHandler(t),t}setupPageEndedHandler(e){e.onended=()=>{this.pageIndex===this.pages.length-1&&(this.exitTrigger="Story Completed"),this.navigationType="Automatic",this.navigationDirection="Forwards",this.videoPlayerState.isPlaying=!0,this.goNextPage(this.navigationType)}}createProgressElements(e){let t=e.filter(e=>"Ad"!==e.type).length;this.progressElement.style.gridTemplateColumns="repeat("+t+", 1fr)",this.progressElement.style.gap="4px",e.forEach(e=>{let{part:t,filler:i}=this.createProgressPart();"Ad"===e.type&&(t.style.display="none"),this.playbackParts.push(i),this.progressElement.append(t)})}createProgressPart(){let e=document.createElement("div");(0,v.mergeStyles)(e,{width:"100%",height:"100%",backgroundColor:"gray",borderRadius:"5px"});let t=document.createElement("div");return(0,v.mergeStyles)(t,{width:"100%",height:"100%",backgroundColor:p.Colors.White,borderRadius:"5px"}),e.appendChild(t),{part:e,filler:t}}setData(e){this.data=e,this.aspectRatio=this.determineAspectRatio(e),this.setAttribute("name",e.title),this.clearExistingContent(),this.contentTitle.innerText=e.title,this.contentPublishedDate.innerText=(0,v.formatDuration)(new Date(e.createTime)),this.pages=e.pages.map(e=>this.createPageElement(e)),this.createProgressElements(e.pages),this.pages.forEach(e=>this.container.prepend(e)),this.updateChip(),this.adjustContentView()}get currentContentPage(){return this.data.pages[this.pageIndex]}get nextContentPage(){return this.data.pages[this.pageIndex+1]||null}get prevContentPage(){return this.data.pages[this.pageIndex-1]||null}get currentPage(){return this.pages[this.pageIndex]}get nextPage(){return this.pages[this.pageIndex+1]}get prevPage(){return this.pages[this.pageIndex-1]}prefetchAdjacentPages(){var e,t,i;if(this.isUnloading)return;let n=e=>2>=Math.abs(e-this.pageIndex);switch(c.ConfigService.prefetchingPolicy){case"low":null===(e=this.nextPage)||void 0===e||e.load();break;case"default":null===(t=this.nextPage)||void 0===t||t.load(),null===(i=this.pages[this.pageIndex+2])||void 0===i||i.load()}this.pages.forEach((e,t)=>{n(t)||null==e||e.unload()}),this.prefetchTimeout&&clearTimeout(this.prefetchTimeout),this.prefetchTimeout=setTimeout(()=>{var e,t,i;if(!this.isUnloading){switch(c.ConfigService.prefetchingPolicy){case"low":null===(e=this.pages[this.pageIndex+1])||void 0===e||e.load();break;case"default":null===(t=this.pages[this.pageIndex+1])||void 0===t||t.load(),null===(i=this.pages[this.pageIndex+2])||void 0===i||i.load()}this.prefetchTimeout=null}},2e3)}loadStoryPostersByDistance(e){var t;if(this.isUnloading)return;let i=Math.max(0,this.pageIndex-e),n=Math.min(this.pages.length-1,this.pageIndex+e);for(let e=i;e<=n;e++)null===(t=this.pages[e])||void 0===t||t.loadPoster()}revertNextPageButtonToPreviousAction(){this.originalNextPageDesktopClickListener&&this.nextPageButton&&this.restartStoryOnClickEvent&&(this.nextPageButton.removeEventListener("click",this.restartStoryOnClickEvent),this.nextPageButton.addEventListener("click",this.originalNextPageDesktopClickListener),this.nextPageButton.setIconUrl(this.playerStyle.icons.navigation.nextPage))}displayRestartStoryButton(){this.nextPageButton&&this.originalNextPageDesktopClickListener&&this.restartStoryOnClickEvent&&(this.nextPageButton.setIconUrl(u.restartIconSvg),this.nextPageButton.removeEventListener("click",this.originalNextPageDesktopClickListener),this.nextPageButton.addEventListener("click",this.restartStoryOnClickEvent))}playPage(e){var t,i,n,o,s;if(this.loadStoryPostersByDistance(4),this.navigationTimeout&&clearTimeout(this.navigationTimeout),this.prefetchTimeout&&(clearTimeout(this.prefetchTimeout),this.prefetchTimeout=null),e<0){
1if("SingleContent"===c.VideoPlayerService.playReference||"Share"===c.VideoPlayerService.playReference)return this.currentPage.restartVideo(),void this.updateCta(0);null===(t=this.onPrevStory)||void 0===t||t.call(this,this.navigationType),null===(i=this.prevPageButton)||void 0===i||i.blur(),this.dispatchEvent(new CustomEvent(d.InternalEvent.PREV_STORY,{bubbles:!0,cancelable:!1}))}else if(e>this.pages.length-1){if("SingleContent"===c.VideoPlayerService.playReference)return void this.updateCta(this.pages.length-1);null===(n=this.onNextStory)||void 0===n||n.call(this,this.navigationType),null===(o=this.nextPageButton)||void 0===o||o.blur(),this.dispatchEvent(new CustomEvent(d.InternalEvent.NEXT_STORY,{bubbles:!0,cancelable:!1}))}else this.isActive=!0,null===(s=this.closedCaptionsModal)||void 0===s||s.reloadData(this.pages[e].data.closedCaptions),this.switchToPage(e),"Automatic"===this.navigationType?this.startPage(e):this.navigationTimeout=setTimeout(()=>{this.videoPlayerState.isPlaying&&this.startPage(e)},250)}updatePublishedDate(e){let t=void 0===e?this.pageIndex:e,i=new Date(Date.parse(this.data.pages[t].createTime));this.contentPublishedDate.innerText=(0,v.formatDuration)(i)}switchToPage(e){var t,i,n,s,a,d,h;if(this.updatePublishedDate(e),this.updateCTAButtonPosition(),e===this.pageIndex)this.updateCTAButtonPosition();else{(null===(n=null===(i=null===(t=this.refContentModal)||void 0===t?void 0:t.player)||void 0===i?void 0:i.playerContentList)||void 0===n?void 0:n[this.refContentModal.player.index])===this&&r.contentAccessibilityManager.announceNavigation(e+1,this.pages.length,"story-page",null===(s=this.data)||void 0===s?void 0:s.title,{trigger:"navigation",navigationType:this.navigationType,previousPosition:this.pageIndex+1}),this.ctaButtonElement.clearAllAnimations(),this.updateCta(e),this.pages[this.pageIndex].hide(),this.pages[this.pageIndex].pause(),this.pages[this.pageIndex].removeLoader();let o=this.pageIndex;setTimeout(()=>{this.pages[o].currentTime=0},250,this)}e!==this.pageIndex&&this.currentPage.endExit();let u=e-this.pageIndex;this.pageIndex=e,this.markAsRead(),this.currentPage.muted=this.videoPlayerState.isMuted,"scale(1)"!==this.style.transform&&(this.style.transform="scale(1)"),this.updatePlayerButtonIcons(),"Ad"!==(null===(a=this.currentPage.data)||void 0===a?void 0:a.type)&&this.adjustContentView();let c=this.currentPage instanceof o.BlazeWidgetAd;(this.currentPage.shouldShowImaAd&&!this.shouldShowImaAdOnStart||c&&!this.data.isAd)&&this.setContentExtraInfo(this.getPagesContentExtraInfo(c)),null===(d=this.currentPage)||void 0===d||d.display(()=>{u>=0?this.goNextPage():this.goPrevPage()}),this.currentPage.endEnter(),"Ad"!==(null===(h=this.currentPage.data)||void 0===h?void 0:h.type)&&this.event(l.StoryAction.PageStart,{}),this.event(l.StoryAction.PlaybackInitialStart,{})}startPage(e){return n(this,void 0,void 0,function*(){var t,i,n,s,a,r,l,d,h;if(this.isUnloading||(this.pageIndex=e,this.currentPage instanceof o.BlazeWidgetAd&&this.adIndex++,this.currentPage instanceof o.BlazeWidgetVideo&&e>=0&&(null===(i=(t=this.currentPage).tryToAddLoader)||void 0===i||i.call(t)),this.isUnloading)||(yield null===(n=this.currentPage)||void 0===n?void 0:n.load(),this.isUnloading))return;null===(s=this.currentPage)||void 0===s||s.play(),"Embedded"===this.mode&&this.currentPage.setAttribute("is-captions-visible","false"),this.updatePlayerButtonIcons(),this.updateStoryAccessibilityLabels();let u=this.totalPlayStopwatch.durationMS();if(this.shouldShowBannerAd()){let e=!(null===(a=this.bannerAdElement)||void 0===a?void 0:a.hasAttemptedLoad);this.shouldGetNewBannerAd(u)||e?(null===(r=this.bannerAdElement)||void 0===r||r.show(this.data.bannerAdInfo),this.lastBannerRefreshInWatchTimeMS=u):((null===(l=this.bannerAdElement)||void 0===l?void 0:l.isHidden())&&(null===(d=this.bannerAdElement)||void 0===d||d.unhide()),null===(h=this.bannerAdElement)||void 0===h||h.raiseAnalyticsViewBannerAd())}this.totalPlayStopwatch.start(),this.prefetchAdjacentPages()})}shouldGetNewBannerAd(e){return 0===e||e-this.lastBannerRefreshInWatchTimeMS>l.BANNER_REFRESH_INTERVAL}
1unload(){this.pages.forEach(e=>e.unload()),this.prefetchTimeout&&(clearTimeout(this.prefetchTimeout),this.prefetchTimeout=null)}displayCurrentStoryPageAndHideTheRest(){var e;this.currentPage.display(()=>{this.goNextPage()});let t=null===(e=this.currentPage.data)||void 0===e?void 0:e.id;this.pages.forEach(e=>{var i;(null===(i=e.data)||void 0===i?void 0:i.id)!==t&&e.hide(),("iOS"===r.deviceDetector.OS||"tablet"===r.deviceDetector.platform&&"Mac OS"===r.deviceDetector.OS)&&(e.muted=!0)})}load(e="direct"){this.loadStoryPostersByDistance(2),this.currentPage.load(e),this.displayCurrentStoryPageAndHideTheRest()}play(){var e,t;if(this.sessionId=(0,v.getRandomId)(),this.totalPlayStopwatch.reset(),this.lastBannerRefreshInWatchTimeMS=0,this.event(l.StoryAction.Start,{}),this.startTrigger="",this.exitTrigger="",this.shouldShowImaAdOnStart){let t=this.pages[this.pageIndex];if("Content"===(null===(e=t.data)||void 0===e?void 0:e.type)){let e=t.data;t.shouldShowImaAd=!0,e.adInfo=this.adInfo}}else"Ad"===(null===(t=this.currentPage.data)||void 0===t?void 0:t.type)&&this.currentPage.startEnter();c.VideoPlayerService.currentlyPlayedContentId=this.data.id,this.playPage(this.pageIndex)}bannerAdEvent(e){var t,i;let n=this.getRefferingObject(),o=new r.AdEvent;o.session_id=this.sessionId,o.story_id=this.data.id,o.story_title=this.data.title,o.content_type="story","Content"===(null===(t=this.currentPage.data)||void 0===t?void 0:t.type)&&(o.story_page_id=this.currentPage.data.id,o.story_page_index=this.currentPageIndexWithoutCustomAds),o.ad_unit_id=e.adUnitId,o.backoffice_campaign_data=(null===(i=this.data.bannerAdInfo)||void 0===i?void 0:i.backofficeCampaignData)||"",c.AnalyticsService.pushAdEvent(e.type,o,void 0,n)}event(e,t){return n(this,arguments,void 0,function*(e,t,i){var n,o;try{let s=this.data.pages[this.pageIndex],a=this.pages[this.pageIndex],r=this.getRefferingObject();if("Content"===s.type){t.player_type=this.mode,t.story_page_count=this.pages.length,t.story_page_duration=yield a.getVideoDuration(),t.story_page_duration_viewed_percent=Number((100*(a.progress||0)).toFixed(3)),t.story_page_id=s.id,t.player_orientation=this.aspectRatio;let i=null==window?void 0:window.location.href.indexOf("#blaze"),r=-1!==i?null==window?void 0:window.location.href.slice(0,i):null==window?void 0:window.location.href;switch(t.story_page_type=/^(https?:\/\/[^/]+\/?)$/i.test(r)?"Homepage":"Category/Article",t.story_page_index=this.currentPageIndexWithoutCustomAds,t.is_last_page=this.pageIndex==this.pages.length-1,t.audio_state=this.videoPlayerState.isMuted?"Mute":"Unmute",t.story_session_id=this.sessionId,t.content_duration_viewed=this.totalPlayStopwatch.durationMS(),t.cc_state=(0,v.convertCcLanguageToState)(s.closedCaptions,localStorage.getItem(l.LOCAL_STORAGE_KEY_LAST_SELECTED)),t.story_page_parent_id=s.parentStoryId,t.story_composition_type=this.data.compositionType,"Enrichment"===(null===(n=s.interaction)||void 0===n?void 0:n.type)&&(t.enrichment_layer_id=s.interaction.id,t.enrichment_layer_url=s.interaction.htmlUrl),"true"===(null===(o=c.AppConfigurationService.appConfigurations)||void 0===o?void 0:o.configurations.analyticsAddEntitiesInfo)&&(t.content_extra_info=JSON.stringify(this.data.extraInfo),t.story_page_content_extra_info=JSON.stringify(s.extraInfo)),t.localization=void 0,e){case l.StoryAction.Start:t.story_start_id=this.data.id,t.story_start_trigger=this.startTrigger,t.localization=this.data.retrievedLanguages;break;case l.StoryAction.PageStart:t.localization=Object.assign(Object.assign({},this.data.retrievedLanguages),s.retrievedLanguages);break;case l.StoryAction.Exit:t.story_exit_trigger=this.exitTrigger;break;case l.StoryAction.PageExit:t.story_page_navigation_direction=this.navigationDirection,t.story_page_navigation_type=this.navigationType}}if("Content"===s.type){if(e===l.StoryAction.PageStart&&this.currentPage.shouldShowImaAd)return;c.AnalyticsService.pushStoryEvent(e,Object.assign({story_id:this.data.id,story_title:this.data.title},t),i,r),s.interaction&&Object.values(l.InteractionAction).includes(e)&&c.AnalyticsService.pushInteractionEvent(e,{interaction_id:s.interaction.id,interaction_type:s.interaction.type,content_id:this.data.id,content_title:this.data.title,content_page_id:s.id,content_type:"story",content_session_id:c.UserService.sessionId,audio_state:this.videoPlayerState.isMuted?"Mute":"Unmute"})}}catch(e){}})}updateContainerLayout(){var e,t,i,n,o,s,a,d;if(this.style.aspectRatio="Horizontal"===this.aspectRatio?String(l.ASPECT_RATIO_16_9):String(l.ASPECT_RATIO_9_16),this.style.boxSizing="content-box",this.container.style.borderRadius=this.getContainerBorderRadius(),"mobile"===r.deviceDetector.platform)this.container.style.background="#000",this.style.width="100%",this.style.height="100%",this.style.minHeight="100%";else{let h=(0,v.isCssPropertySupported)("aspectRatio");if("Horizontal"===this.aspectRatio){let r=(null===(e=this.nextStoryButton)||void 0===e?void 0:e.style.marginLeft)||"0px",l=(null===(t=this.nextStoryButton)||void 0===t?void 0:t.style.marginRight)||"0px",u=(null===(i=this.prevStoryButton)||void 0===i?void 0:i.style.marginRight)||"0px",c=(null===(n=this.prevStoryButton)||void 0===n?void 0:n.style.marginLeft)||"0px",p=null!==(s=null===(o=this.nextStoryButton)||void 0===o?void 0:o.clientWidth)&&void 0!==s?s:0,g=null!==(d=null===(a=this.prevStoryButton)||void 0===a?void 0:a.clientWidth)&&void 0!==d?d:0;
1this.style.width="calc(75% - "+r+" - "+l+" - "+p+"px - "+u+" - "+c+" - "+g+"px)",this.style.maxHeight="80vh",h?this.style.aspectRatio="16 / 9":this.style.height="auto"}else this.style.width="auto",this.style.height="87%";this.style.minHeight="tablet"===r.deviceDetector.platform?"90%":"unset",this.style.paddingBottom="tablet"===r.deviceDetector.platform?"0":"40px",h||(this.style.width="100%",this.style.height="100%",this.style.borderRadius="0px"),h&&("tablet"===r.deviceDetector.platform||"desktop"===r.deviceDetector.platform)&&setTimeout(()=>{if("Firefox"===r.deviceDetector.browser&&"Vertical"===this.aspectRatio)this.style.height="87vh";else{let{width:e}=this.getBoundingClientRect(),t=("Horizontal"===this.aspectRatio?l.ASPECT_RATIO_9_16:l.ASPECT_RATIO_16_9)*e;this.style.height=Math.round(t)+"px",this.style.width=Math.round(e)+"px"}},0)}}addOrRemoveEventListeners(e){[{event:d.InternalEvent.RESUME,handler:this.boundOnResumeEvent},{event:d.InternalEvent.PAUSE,handler:this.boundOnPauseEvent},{event:d.InternalEvent.NEXT_PAGE,handler:this.boundOnNextPageEvent},{event:d.InternalEvent.PREVIOUS_PAGE,handler:this.boundOnPrevPageEvent}].forEach(({event:t,handler:i})=>{"add"===e?this.addEventListener(t,i):this.removeEventListener(t,i)})}connectedCallback(){(0,v.setId)(this,"blaze-story"),this.addOrRemoveEventListeners("add"),this.style.borderRadius=this.getContainerBorderRadius(),this.style.margin="auto",this.style.outline="none",this.style.width="auto",this.style.minHeight="100%",this.updateContainerLayout(),this.shareModal=h.WidgetsFactory.create("blaze-widget-share-modal"),this.shareModal.onClose=this.onShareModalClose.bind(this),this.shareModal.onClick=this.onShareModalButtonClick.bind(this),c.ConfigService.shouldAllowClosedCaptions&&this.isButtonVisible("CLOSED_CAPTIONS")&&this.configureClosedCaptionsModal(),this.ctaModal=h.WidgetsFactory.create("blaze-widget-cta-modal"),this.container.append(this.shareModal),this.container.append(this.ctaModal),this.append(this.container);let e=()=>{if(this.pages.length<=0)return void(null==window||window.requestAnimationFrame(e));for(let e=0;e<this.playbackParts.length;e++)this.playbackParts[e].style.width="0%";for(let e=0;e<this.pageIndex;e++)this.playbackParts[e].style.width="100%";let t=this.pages[this.pageIndex].progress;this.playbackParts[this.pageIndex].style.width=100*t+"%",null==window||window.requestAnimationFrame(e)};null==window||window.requestAnimationFrame(e),this.render(),this.boundOnBlurEvent=this.onBlur.bind(this),this.boundOnFocusEvent=this.onFocus.bind(this),this.boundOnVisibilityChangeEvent=this.onVisibilityChange.bind(this),this.boundOnLanguageChangeEvent=this.onLanguageChange.bind(this),this.registerStoryAccessibility(),super.connectedCallback()}onShareModalClose(){this.videoPlayerState.isPlaying&&this.resume()}configureClosedCaptionsModal(){this.closedCaptionsModal=new o.BlazeWidgetClosedCaptionsModal(this.currentPage.data.closedCaptions,"story"),this.closedCaptionsModal.onClose=()=>{this.isPausedManually||(this.videoPlayerState.isPlaying=!0,this.updatePlayerButtonIcons(),this.resume())},this.closedCaptionsModal.onOpen=()=>{this.videoPlayerState.isPlaying&&(this.videoPlayerState.isPlaying=!1,this.updatePlayerButtonIcons(),this.pause())},this.closedCaptionsModal.onClosedCaptionsEnable=e=>{this.toggleClosedCaptions(e)},this.closedCaptionsModal.onClosedCaptionsDisable=()=>{this.toggleClosedCaptions()},this.container.append(this.closedCaptionsModal)}toggleClosedCaptions(e){let t=(0,v.convertCcLanguageToState)(this.data.pages[this.pageIndex].closedCaptions,e);this.event("Off"!==t?l.StoryAction.ClosedCaptionsOn:l.StoryAction.ClosedCaptionsOff,{}),this.updateStoryAccessibilityLabels()}updateStoryProgress(){if(this.pages.length<=0)return void(this.requestAnimationId=null==window?void 0:window.requestAnimationFrame(this.updateStoryProgress.bind(this)));for(let e=0;e<this.playbackParts.length;e++)this.playbackParts[e].style.width="0%";for(let e=0;e<this.pageIndex;e++)this.playbackParts[e].style.width="100%";let e=this.pages[this.pageIndex].progress;this.playbackParts[this.pageIndex].style.width=100*e+"%",this.isActive&&(this.requestAnimationId=null==window?void 0:window.requestAnimationFrame(this.updateStoryProgress.bind(this)))}onShareModalButtonClick(e){return n(this,void 0,void 0,function*(){this.event(l.StoryAction.ShareSelect,{});try{yield navigator.clipboard.readText().then(e=>{e===document.location.href&&this.event(l.StoryAction.ShareSuccess,{})})}catch(e){}})}onVisibilityChange(){this.isActive&&this.isConnected&&(this.lastPageIndexToResume=this.pageIndex,document.hidden||this.onFocus(),document.hidden&&this.onBlur())}onBlur(){var e;this.isActive&&this.isConnected&&(document.hidden||"desktop"!==r.deviceDetector.platform||"visible"!==document.visibilityState)&&((null===(e=document.activeElement)||void 0===e?void 0:e.id.includes("interaction"))||(this.lastPageIndexToResume=this.pageIndex,this.currentPage.paused||(this.resumeAfterfocus=!0,this.pause(),this.videoPlayerState.isPlaying=!1,this.updatePlayerButtonIcons(),this.event(l.StoryAction.PageExit,{}),this.event(l.StoryAction.Exit,{}))))}onFocus(){var e,t,i,n,o;if(this.isActive&&this.isConnected&&(this.lastPageIndexToResume=this.pageIndex,(this.currentPage.paused||"Ad"===(null===(e=this.currentPage.data)||void 0===e?void 0:e.type))&&this.resumeAfterfocus)){this.resumeAfterfocus=!1,(null===(t=this.ctaModal)||void 0===t?void 0:t.isOpen)&&(null===(i=this.ctaModal)||void 0===i||i.close());let e="iOS"===r.deviceDetector.OS,s="Mobile Safari"===r.deviceDetector.browser,a="tablet"===r.deviceDetector.platform&&"Mac OS"===r.deviceDetector.OS,l=e&&("Safari"===r.deviceDetector.browser||"Chrome"===r.deviceDetector.browser);if(e||s||l||a)return void("Ad"===(null===(n=this.currentPage.data)||void 0===n?void 0:n.type)?this.resume():null===(o=this.resumeAfterBlurButton)||void 0===o||o.setAttribute("blaze-btn-hidden","false"));this.resume(),this.videoPlayerState.isPlaying=!0,this.updatePlayerButtonIcons()}}close(e){return n(this,void 0,void 0,function*(){var t,i,n,o;this.resumeAfterfocus=!1,"SingleContent"===c.VideoPlayerService.playReference||(this.event(l.StoryAction.PageExit,{}),this.event(l.StoryAction.Exit,{}),null===(t=this.pause)||void 0===t||t.call(this),null===(n=null===(i=this.widgetParentItem)||void 0===i?void 0:i.updateWidget)||void 0===n||n.call(i),yield this.updateWidgetStatusReadUnread()),(c.ConfigService.shouldDismissPlayer||c.ConfigService.shouldAutoAdvance)&&(this.event(l.StoryAction.PageExit,{}),this.event(l.StoryAction.Exit,{}),c.AnalyticsService.sendAnalyticsData()),e&&(null===(o=this.onClose)||void 0===o||o.call(this))})}pause(){this.currentPage.pause(),this.totalPlayStopwatch.pause()}resume(){this.currentPage.play(),this.totalPlayStopwatch.start()}resetPosition(){this.pages[this.pageIndex].currentTime=0}updateWidgetStatusReadUnread(){var e,t,i,n,o,s,a,r;null===(t=null===(e=this.widgetParentItem)||void 0===e?void 0:e.updateWidget)||void 0===t||t.call(e),null===(n=null===(i=this.widgetParentItem)||void 0===i?void 0:i.setChipStyle)||void 0===n||n.call(i),null===(s=null===(o=this.widgetParentItem)||void 0===o?void 0:o.render)||void 0===s||s.call(o),null===(r=null===(a=this.widgetParentItem)||void 0===a?void 0:a.updateWidgetItemPadding)||void 0===r||r.call(a)}markAsRead(){return n(this,void 0,void 0,function*(){let e=this.pages[this.pageIndex];if(e.data){e.data.hasViewed=!0;let{data:t,error:i}=yield c.DatabaseService.updatePageViewed(e.data.id,this.data.id);return!i&&t}})}hasNoMorePagesToPlay(){return this.pageIndex+1>this.pages.length-1}isLastPage(){return this.pageIndex===this.pages.length-1}isAutomaticNavigation(e){return"Automatic"===e}handleLastPageAutomaticNavigation(){var e,t,i,n;c.ConfigService.shouldAutoAdvance?(null===(t=null===(e=this.refContentModal)||void 0===e?void 0:e.player)||void 0===t||t.renderPlayerBackgroun
1d(!0),null===(n=null===(i=this.refContentModal)||void 0===i?void 0:i.player)||void 0===n||n.animateCloseWithDirection({direction:"HorizontalForwards",callback:()=>r.URLManager.navigateTo("AUTO_ADVANCE")})):this.displayRestartStoryButton()}goNextPage(e){var t,i;c.VideoPlayerService.isNavigating||this.currentPage.isCurrentlyTryingToRunImaAd||("SingleContent"===c.VideoPlayerService.playReference&&this.isLastPage()&&this.isAutomaticNavigation(e)?this.handleLastPageAutomaticNavigation():(this.pageIndex+1<this.pages.length&&(!1===(null===(t=this.nextContentPage)||void 0===t?void 0:t.shouldShowBannerAd)&&(null===(i=this.bannerAdElement)||void 0===i||i.hide()),this.event(l.StoryAction.PageExit,{}),this.nextPage.startEnter()),this.playPage(this.pageIndex+1)))}goPrevPage(){var e,t;c.VideoPlayerService.isNavigating||this.currentPage.isCurrentlyTryingToRunImaAd||("SingleContent"!==c.VideoPlayerService.playReference||0!==this.pageIndex?(this.pageIndex>0&&(!1===(null===(e=this.prevContentPage)||void 0===e?void 0:e.shouldShowBannerAd)&&(null===(t=this.bannerAdElement)||void 0===t||t.hide()),this.event(l.StoryAction.PageExit,{}),this.prevPage.startEnter()),this.playPage(this.pageIndex-1)):this.currentPage.currentTime=0)}disconnectedCallback(){var e,t;this.addOrRemoveEventListeners("remove"),this.removeChild(this.container),null===(e=this.shareModal)||void 0===e||e.remove(),null===(t=this.ctaModal)||void 0===t||t.remove(),this.ctaButtonElement.setAttribute("hidden-btn","true"),this.data.id&&r.contentAccessibilityManager.unregisterContentWidget(this.data.id),super.disconnectedCallback()}updateCTAButtonPosition(){let e=this.pages[this.pageIndex];if(!e)return;let t=e.getBoundingClientRect();if(t.width){let e;let i=t.width*l.ASPECT_RATIO_16_9,n=(Math.round(t.height-i)-(this.playerStyle.ctaButton.height?parseInt(this.playerStyle.ctaButton.height):l.DEFAULT_CTA_HEIGHT))/2;switch(r.deviceDetector.platform){case"tablet":e="Embedded"===this.mode?this.getEmbeddedBottomContainerPaddingBottom():"15px";break;case"desktop":e="Embedded"===this.mode?this.getEmbeddedBottomContainerPaddingBottom():"40px";break;default:e="Embedded"===this.mode?this.getEmbeddedBottomContainerPaddingBottom():Math.max(n,l.MIN_PADDING_BOTTOM)+"px"}this.bottomContainer.style.paddingBottom=e}}updateCta(e){var t,i,n,o,s;if(null==e)return;let a=this.pages[e];if("Content"===(null===(t=null==a?void 0:a.data)||void 0===t?void 0:t.type)&&(null===(n=null===(i=null==a?void 0:a.data)||void 0===i?void 0:i.cta)||void 0===n?void 0:n.type)){if(!1===(null===(o=this.playerStyle.ctaButton)||void 0===o?void 0:o.isVisible))return void this.ctaButtonElement.setAttribute("hidden-btn","true");this.updateCTAButtonPosition();let{color:e,backgroundColor:t,isDisplayCtaModal:i,isAnimated:n,icon:l}=this.playerStyle.ctaButton,{textColor:d,backgroundColor:h,enhancements:u,text:c,url:p}=a.data.cta;this.ctaButtonElement.setAttributes({text:c,href:p});let g=e||d,v=t||h;this.ctaButtonElement.setAnchorButtonStyles({color:g,background:v}),i&&(r.deviceDetector.isMobile||r.deviceDetector.isTablet)&&(null===(s=this.ctaModal)||void 0===s||s.setAttributes({"border-color":"#fff","background-color":v,"text-color":g,"icon-color":g,"progress-bar-color":g,"cta-url":a.data.cta.url})),this.updateCtaButtonWidth(),this.setCtaButtonAttributes(l.isVisible,v,g),this.handleCtaButtonAnimation(u,n),this.ctaButtonElement.setAttribute("hidden-btn","false")}else this.ctaButtonElement.setAttribute("hidden-btn","true")}updateCtaButtonWidth(){this.ctaButtonElement.anchorButtonElement.clientWidth>0&&this.ctaButtonElement.setCtaTextStyle({width:.75*this.ctaButtonElement.anchorButtonElement.clientWidth+"px"})}animateCtaButton(e,t){this.ctaButtonElement.animateIcon(e),this.ctaButtonElement.animateButton(t)}handleCtaButtonAnimation(e,t){if(r.deviceDetector.isMobile||r.deviceDetector.isTablet)switch(!0){case null==e?void 0:e.hasSwipeUp:this.animateCtaButton("BottomToTop",e.animationType),this.setCtaIconVisibility(!0);break;case t:this.animateCtaButton("BottomToTop","Shrinking")}}setCtaButtonAttributes(e,t,i){this.ctaButtonElement.setAttribute("arrow-icon-color",t),this.ctaButtonElement.setAttribute("icon-color",i),this.setCtaIconVisibility(e)}setCtaIconVisibility(e){(r.deviceDetector.isMobile||r.deviceDetector.isTablet)&&this.ctaButtonElement.setAttribute("arrow-icon-display",!0===e?"true":"false")}updatePlayerButtonsState(e){"desktop"!==r.deviceDetector.platform||this.currentPage.isAd||(this.updateButtonState(g.ButtonNavigation.PREV_STORY,this.prevStoryButton),this.updateButtonState(g.ButtonNavigation.NEXT_STORY,this.nextStoryButton),e&&(this.updateButtonState(g.ButtonNavigation.PREV_PAGE,this.prevPageButton),this.updateButtonState(g.ButtonNavigation.NEXT_PAGE,this.nextPageButton)))}updateButtonState(e,t){if(!t)return;let i=this.isNavigationButtonActive(e)?"ACTIVE":"DISABLED";this.updateNavButton(i,t)}isSingleContentWithAutoAdvance(e){return"SingleContent"===c.VideoPlayerService.playReference&&c.ConfigService.shouldAutoAdvance&&e===g.ButtonNavigation.NEXT_STORY}isStoryPagesNavigation(e){return e===g.ButtonNavigation.NEXT_PAGE||e===g.ButtonNavigation.PREV_PAGE}isNavigationButtonActive(e){var t,i;if(this.isSingleContentWithAutoAdvance(e)||this.isStoryPagesNavigation(e))return!0;
1if(this.refWidget){let n=null===(t=this.refWidget)||void 0===t?void 0:t.indexOf(this);if(-1!==n){if(e===g.ButtonNavigation.NEXT_STORY)return n<(null===(i=this.refWidget)||void 0===i?void 0:i.length)-1;if(e===g.ButtonNavigation.PREV_STORY)return n>0}}return!1}updateNavButton(e,t){"ACTIVE"===e?t.setAttribute("disabled","false"):t.setAttribute("disabled","true")}updatePlayerButtonsStyleAttributes(){var e,t;let i=0,n=Math.round(100*window.devicePixelRatio)/100,o=window.innerWidth,s=window.innerHeight,a={smallScreen:{range1:{sizeReduce:2,gap:"0.3rem"},range2:{sizeReduce:3,gap:"0.15rem"}},largeScreen:{1.1:{sizeReduce:0,gap:"0.8rem"},1.25:{sizeReduce:1,gap:"0.6rem"},1.5:{sizeReduce:2,gap:"0.4rem"},1.75:{sizeReduce:3,gap:"0.1rem"}}};if("desktop"===r.deviceDetector.platform&&"HORIZONTAL"===this.playerStyle.iconsPosition){let e;i=(e=o<500||s<750?n>=1.5?a.smallScreen.range2:a.smallScreen.range1:a.largeScreen[String(n)]||{sizeReduce:0,gap:"1rem"}).sizeReduce,this.buttonsContainer.style.gap=e.gap}if("HORIZONTAL"===this.playerStyle.iconsPosition?this.buttonsContainer.setStyle({justifyContent:"end",alignSelf:"end",alignItems:"baseline",flexDirection:"Ad"===(null===(t=null===(e=this.currentPage)||void 0===e?void 0:e.data)||void 0===t?void 0:t.type)?"row-reverse":"row"}):this.buttonsContainer.setStyle({alignItems:"flex-end",flexDirection:"column"}),"mobile"!==r.deviceDetector.platform&&"tablet"!==r.deviceDetector.platform||(i=0),"Embedded"===this.mode)this.contentTitle.style.fontSize=r.TextScaleService.scaleFontSize(this.playerStyle.titleFontSizeEmbedded),this.contentPublishedDate.style.fontSize=r.TextScaleService.scaleFontSize(this.playerStyle.publishedDateFontSizeEmbedded);else{let e=(0,v.convertCssUnitToNumber)(this.playerStyle.titleFontSize),t=(0,v.convertCssUnitToNumber)(this.playerStyle.publishedDateFontSize),n="mobile"===r.deviceDetector.platform?e-i+"px":e+2-i+"px",o="mobile"===r.deviceDetector.platform?t-i+"px":t+2-i+"px";this.contentTitle.style.fontSize=r.TextScaleService.scaleFontSize(n),this.contentPublishedDate.style.fontSize=r.TextScaleService.scaleFontSize(o)}if(this.contentChip.style.borderRadius=this.playerStyle.statusLiveStyle.borderRadius,this.contentChip.style.padding=this.playerStyle.statusLiveStyle.padding,this.contentChip.style.color=this.playerStyle.statusLiveStyle.textColor,this.contentChip.style.borderWidth=this.playerStyle.statusLiveStyle.borderWidth+"px",this.contentChip.style.fontFamily=this.playerStyle.statusLiveStyle.font,this.contentChip.style.fontSize=r.TextScaleService.scaleFontSize(this.playerStyle.statusLiveStyle.textSize),this.contentTitle.style.fontFamily=this.playerStyle.titleFont,this.contentTitle.style.color=this.playerStyle.titleColor,this.contentTitle.style.display=this.playerStyle.titleVisible?"inline":"none",this.contentPublishedDate.style.fontFamily=this.playerStyle.publishedDateFont,this.contentPublishedDate.style.color=this.playerStyle.publishedDateColor,this.contentPublishedDate.style.display=this.playerStyle.publishedDateVisible?"inline":"none",this.isButtonVisible("MUTE_UNMUTE")&&this.muteButtonElement&&(this.setPlayerButtonSize(this.muteButtonElement,"MUTE_UNMUTE"),this.setPlayerButtonColors(this.muteButtonElement,"MUTE_UNMUTE"),this.setPlayerButtonPaddings(this.muteButtonElement)),this.isButtonVisible("SHARE")&&this.shareButtonElement&&(this.setPlayerButtonSize(this.shareButtonElement,"SHARE"),this.setPlayerButtonColors(this.shareButtonElement,"SHARE"),this.setPlayerButtonPaddings(this.shareButtonElement)),this.isButtonVisible("PLAY_PAUSE")&&this.playButtonElement&&(this.setPlayerButtonSize(this.playButtonElement,"PLAY_PAUSE"),this.setPlayerButtonColors(this.playButtonElement,"PLAY_PAUSE"),this.setPlayerButtonPaddings(this.playButtonElement)),this.isButtonVisible("FULLSCREEN")&&this.fullScreenElement&&(this.setPlayerButtonSize(this.fullScreenElement,"FULLSCREEN"),this.setPlayerButtonColors(this.fullScreenElement,"FULLSCREEN"),this.setPlayerButtonPaddings(this.fullScreenElement)),this.isButtonVisible("EXIT_PLAYER")&&this.exitMobileTabletButtonElement&&(this.setPlayerButtonSize(this.exitMobileTabletButtonElement,"EXIT_PLAYER"),this.setPlayerButtonColors(this.exitMobileTabletButtonElement,"EXIT_PLAYER"),this.setPlayerButtonPaddings(this.exitMobileTabletButtonElement)),this.isButtonVisible("CLOSED_CAPTIONS")&&this.closedCaptionsButtonElement&&(this.setPlayerButtonSize(this.closedCaptionsButtonElement,"CLOSED_CAPTIONS"),this.setPlayerButtonColors(this.closedCaptionsButtonElement,"CLOSED_CAPTIONS"),this.setPlayerButtonPaddings(this.closedCaptionsButtonElement)),this.isButtonVisible("CUSTOM_ACTION_BUTTON_ONE")&&this.customActionButtonOneElement&&(this.setPlayerButtonSize(this.customActionButtonOneElement,"CUSTOM_ACTION_BUTTON_ONE"),this.setPlayerButtonColors(this.customActionButtonOneElement,"CUSTOM_ACTION_BUTTON_ONE"),this.setPlayerButtonPaddings(this.customActionButtonOneElement)),this.isButtonVisible("CUSTOM_ACTION_BUTTON_TWO")&&this.customActionButtonTwoElement&&(this.setPlayerButtonSize(this.customActionButtonTwoElement,"CUSTOM_ACTION_BUTTON_TWO"),this.setPlayerButtonColors(this.customActionButtonTwoElement,"CUSTOM_ACTION_BUTTON_TWO"),this.setPlayerButtonPaddings(this.customActionButtonTwoElement)),this.isButtonVisible("NEXT_PAGE")&&this.nextPageButton){let e=this.playerStyle.iconsButtonNavigation.find(e=>"NEXT_PAGE"===e.value);e&&this.applyIconStyle(this.nextPageButton,e,this.playerStyle.icons.navigation.nextPage)}if(this.isButtonVisible("PREV_PAGE")&&this.prevPageButton){let e=this.playerStyle.iconsButtonNavigation.find(e=>"PREV_PAGE"===e.value);e&&this.applyIconStyle(this.prevPageButton,e,this.playerStyle.icons.navigation.prevPage)}if(this.isButtonVisible("NEXT_STORY")&&this.nextStoryButton){let e=this.playerStyle.iconsButtonNavigation.find(e=>"NEXT_STORY"===e.value);e&&this.applyIconStyle(this.nextStoryButton,e,this.playerStyle.icons.navigation.nextStory)}if(this.isButtonVisible("PREV_STORY")&&this.prevStoryButton){let e=this.playerStyle.iconsButtonNavigation.find(e=>"PREV_STORY"===e.value);e&&this.applyIconStyle(this.prevStoryButton,e,this.playerStyle.icons.navigation.prevStory)}}setPlayerButtonPaddings(e){this.playerStyle.iconsButtonPadding&&(e.style.padding=this.playerStyle.iconsButtonPadding,e.style.margin=this.playerStyle.iconsButtonPadding.split(" ").map(e=>"-"+e).join(" "))}setPlayerButtonColors(e,t){let i=this.playerStyle.iconsButton.find(e=>e.value===t);(null==i?void 0:i.color)&&e.setAttribute("icon-color",null==i?void 0:i.color),(null==i?void 0:i.backgroundColor)&&"transparent"!==i.backgroundColor&&(null==i?void 0:i.borderRadius)&&(e.style.backgroundColor=i.backgroundColor,e.style.borderRadius=i.borderRadius)}setPlayerButtonSize(e,t){let i=this.playerStyle.iconsButton.find(e=>e.value===t);if(e&&i&&this.playerStyle.iconsButtonSize&&this.playerStyle.iconsButtonEmbeddedSize){let t="Embedded"===this.mode?this.playerStyle.iconsButtonEmbeddedSize:this.playerStyle.iconsButtonSize;"Full Screen"===this.mode&&"mobile"===r.deviceDetector.platform&&(t=(0,v.convertCssUnitToNumber)(t)-4+"px"),e.setAttribute("width",t),e.setAttribute("height",t)}}getEmbeddedCtaButtonHeight(){return"desktop"===r.deviceDetector.platform?"38px":"tablet"===r.deviceDetector.platform||"Horizontal"===this.aspectRatio?"34px":"43px"}getEmbeddedBottomContainerPaddingBottom(){return"desktop"===r.deviceDetector.platform?"40px":"Horizontal"===this.aspectRatio?"8px":"32px"}getContainerBorderRadius(){return"desktop"===r.deviceDetector.platform?"Embedded"===this.mode&&"Horizontal"===this.aspectRatio?"8px":"20px":"tablet"===r.deviceDetector.platform?"Embedded"===this.mode&&"Horizontal"===this.aspectRatio?"4px":"20px":"Embedded"===this.mode?"8px":"0px"}updatePlayerButtonsOrder(){let e={MUTE_UNMUTE:this.muteButtonElement,EXIT_PLAYER:this.exitMobileTabletButtonElement,PLAY_PAUSE:this.playButtonElement,SHARE:this.shareButtonElement,FULLSCREEN:this.fullScreenElement,CLOSED_CAPTIONS:this.closedCaptionsButtonElement,CUSTOM_ACTION_BUTTON_ONE:this.customActionButtonOneElement,CUSTOM_ACTION_BUTTON_TWO:this.customActionButtonTwoElement};this.playerStyle.iconsButtonOrder.forEach((t,i)=>{let n=e[t];n&&n.setAttribute("order",i.toString())})}updatePlayerContentOrder(){let e={LIVE_CHIP:this.contentChip,STORY_TITLE:this.contentTitle,PUBLISHED_DATE:this.contentPublishedDate};this.playerStyle.contentOrder.forEach((t,i)=>{let n=e[t];n&&(n.style.order=i.toString())})}displayExitButtonOnMobileTablet(){if(!this.exitMobileTabletButtonElement)return;if(!["mobile","tablet"].includes(r.deviceDetector.platform))return void(this.exitMobileTabletButtonElement.style.display="none");let e=["SingleContent","AutoAdvance"].includes(c.VideoPlayerService.playReference)&&!c.ConfigService.shouldDismissPlayer||!this.isButtonVisible("EXIT_PLAYER");this.exitMobileTabletButtonElement.style.display=e?"none":"block"}resetLayout(){}render(){var e;this.updateContainerLayout(),this.updatePlayerContentOrder(),this.updatePlayerButtonsOrder(),this.updatePlayerButtonIcons(),this.updatePlayerButtonsState(!0),this.updatePlayerButtonsStyleAttributes(),this.updateCtaButtonLayout(),this.updateCta(this.pageIndex),this.displayExitButtonOnMobileTablet(),this.shadowTopElement.style.borderRadius=this.getContainerBorderRadius(),this.style.borderRadius=this.getContainerBorderRadius(),null===(e=this.pages)||void 0===e||e.forEach(e
1=>null==e?void 0:e.render())}onExpandClick(){this.dispatchEvent(new CustomEvent(d.InternalEvent.FULL_SCREEN_CLICK,{bubbles:!0,cancelable:!1})),this.event(l.StoryAction.Expand,{})}onResumeEvent(){this.resume(),this.videoPlayerState.isPlaying=!0,this.updatePlayerButtonIcons()}onPauseEvent(){this.pause(),this.videoPlayerState.isPlaying=!1,this.updatePlayerButtonIcons()}onNextPageEvent(){this.goNextPage()}onPrevPageEvent(){this.goPrevPage()}getPagesContentExtraInfo(e){var t,i;let n=e?this.pageIndex+1:this.pageIndex,o=this.pageIndex>0?this.prevPage:void 0,s=n<this.pages.length?this.pages[n]:void 0;return{previous:null===(t=null==o?void 0:o.data)||void 0===t?void 0:t.extraInfo,current:this.data.extraInfo,next:null===(i=null==s?void 0:s.data)||void 0===i?void 0:i.extraInfo}}getAllFocusableButtons(){return[this.playButtonElement,this.muteButtonElement,this.shareButtonElement,this.exitMobileTabletButtonElement,this.fullScreenElement,this.closedCaptionsButtonElement,this.customActionButtonOneElement,this.customActionButtonTwoElement,this.resumeAfterBlurButton,this.nextPageButton,this.prevPageButton,this.nextStoryButton,this.prevStoryButton,this.ctaButtonElement].filter(
1Boolean)}enableAllButtons(){let e=this.getAllFocusableButtons();this.setButtonsAccessibilityState(e,!0)}disableAllButtons(){let e=this.getAllFocusableButtons();this.setButtonsAccessibilityState(e,!1)}setButtonsAccessibilityState(e,t){t?v.AccessibilityUtils.setElementsAccessible(e):v.AccessibilityUtils.setElementsInaccessible(e)}registerStoryAccessibility(){if(!this.data.id)return;let e=this.buildStoryRegistrationData();r.contentAccessibilityManager.registerContentWidget(this.data.id,e,"story")}buildStoryRegistrationData(){return{widget:this,buttons:this.getStoryButtonsForAccessibility(),data:this.getStoryDataForAccessibility()}}getStoryButtonsForAccessibility(){return{play:this.playButtonElement,mute:this.muteButtonElement,share:this.shareButtonElement,close:this.exitMobileTabletButtonElement,captions:this.closedCaptionsButtonElement,custom1:this.customActionButtonOneElement,custom2:this.customActionButtonTwoElement,nextStoryPage:this.nextPageButton,prevStoryPage:this.prevPageButton,nextStory:this.nextStoryButton,prevStory:this.prevStoryButton}}getStoryDataForAccessibility(){return{id:this.data.id,title:this.data.title,description:this.data.description,isPlaying:this.videoPlayerState.isPlaying,isMuted:this.videoPlayerState.isMuted}}updateStoryAccessibilityLabels(){if(!this.data.id)return;let e=this.getCurrentAccessibilityState();r.contentAccessibilityManager.updateButtonLabels(this.data.id,e)}getCurrentAccessibilityState(){return{isPlaying:this.videoPlayerState.isPlaying,isMuted:this.videoPlayerState.isMuted}}updateAccessibilityLabels(){if(!this.data.id)return;let e=this.buildStoryAccessibilityState();r.contentAccessibilityManager.updateButtonLabels(this.data.id,e)}buildStoryAccessibilityState(){return{id:this.data.id,title:this.data.title,description:this.data.description,isPlaying:!!this.currentPage&&!this.currentPage.paused,isMuted:!!this.currentPage&&this.currentPage.muted}}}t.BlazeWidgetStory=y},6859:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.AnnouncementService=void 0;let o=i(7449);t.AnnouncementService=class{constructor(e){this.config=e,this.containerRegions=new Map,this.announcementQueue=[],this.isProcessingAnnouncement=!1,this.lastAnnouncementTime=0,this.liveRegionsSetup=!1}setupLiveRegions(e){try{if(!e)return;let t=new Map,i=e.getAttribute("id")||e.tagName.toLowerCase()+"-"+Date.now().toString();[{id:o.ANNOUNCEMENT_CONSTANTS.LIVE_REGIONS.POLITE_ID+"-"+i,priority:"polite"},{id:o.ANNOUNCEMENT_CONSTANTS.LIVE_REGIONS.ASSERTIVE_ID+"-"+i,priority:"assertive"}].forEach(({id:i,priority:n})=>{let s=e.querySelector("#"+i);s||((s=document.createElement("div")).id=i,s.setAttribute(o.ANNOUNCEMENT_CONSTANTS.ATTRIBUTES.ARIA_LIVE,n),s.setAttribute(o.ANNOUNCEMENT_CONSTANTS.ATTRIBUTES.ARIA_ATOMIC,o.ANNOUNCEMENT_CONSTANTS.ATTRIBUTES.ATOMIC_VALUE),s.style.position=o.ANNOUNCEMENT_CONSTANTS.LIVE_REGIONS.STYLES.POSITION,s.style.left=o.ANNOUNCEMENT_CONSTANTS.LIVE_REGIONS.STYLES.LEFT,s.style.width=o.ANNOUNCEMENT_CONSTANTS.LIVE_REGIONS.STYLES.WIDTH,s.style.height=o.ANNOUNCEMENT_CONSTANTS.LIVE_REGIONS.STYLES.HEIGHT,s.style.overflow=o.ANNOUNCEMENT_CONSTANTS.LIVE_REGIONS.STYLES.OVERFLOW,e.appendChild(s)),t.set(n,s)}),this.containerRegions.set(e,t),this.liveRegionsSetup=!0}catch(e){}}announce(e,t="polite",i){if(!e.trim())return;let n={message:e,priority:t,category:i,delay:this.config.delay};this.queueAnnouncement(n)}queueAnnouncement(e){if(this.liveRegionsSetup)return Date.now()-this.lastAnnouncementTime<this.config.delay?(this.announcementQueue.length<this.config.queueSize&&this.announcementQueue.push(e),void(this.isProcessingAnnouncement||this.processAnnouncementQueue())):void this.performAnnouncement(e)}clearQueue(){this.announcementQueue=[]}isProcessing(){return this.isProcessingAnnouncement}processAnnouncementQueue(){return n(this,void 0,void 0,function*(){if(!this.isProcessingAnnouncement&&0!==this.announcementQueue.length){for(this.isProcessingAnnouncement=!0;this.announcementQueue.length>0;){let e=this.announcementQueue.shift();yield this.performAnnouncement(e),yield new Promise(t=>setTimeout(t,e.delay||this.config.delay))}this.isProcessingAnnouncement=!1}})}performAnnouncement(e){return n(this,void 0,void 0,function*(){let t=document.querySelector('[role="dialog"][aria-modal="true"]');if(!t)return;let i=this.containerRegions.get(t),n=null==i?void 0:i.get(e.priority);
1n&&(n.textContent=e.message,this.lastAnnouncementTime=Date.now())})}cleanup(){this.containerRegions.forEach(e=>{e.forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)})}),this.containerRegions.clear(),this.announcementQueue=[],this.liveRegionsSetup=!1,this.isProcessingAnnouncement=!1}}},6925:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(8926),t)},6945:(e,t)=>{"use strict";function i(e,t){if(e.length<=t)return{prunedQueue:e,removedCount:0};let i=e.length-t;return{prunedQueue:e.slice(i),removedCount:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.pruneOfflineQueue=i,t.addToOfflineQueueWithPruning=function(e,t,n){let{prunedQueue:o,removedCount:s}=i([...e,t],n);return{updatedQueue:o,removedCount:s}}},6994:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accessibilityManager=t.AccessibilityManager=void 0;let n=i(6859),o=i(7958);class s{constructor(e){this.contentButtons=new Map,this.modalFocusReturnTarget=null;let t=Object.assign(Object.assign({},o.DEFAULT_ACCESSIBILITY_CONFIG),e);this.announcementService=new n.AnnouncementService(t.announcements)}setupLiveRegions(e){this.announcementService.setupLiveRegions(e)}announce(e){this.announcementService.queueAnnouncement(e)}getContentTypeLabel(e){switch(e){case"story":default:return"Story";case"moment":return"Moment"}}manageFocus(e){try{e.focus()}catch(e){}}storeModalFocusReturnTarget(e){this.modalFocusReturnTarget=e,e.hasAttribute("aria-expanded")&&e.setAttribute("aria-expanded","true")}returnFocusFromModal(){if(!this.modalFocusReturnTarget)return!1;try{return this.modalFocusReturnTarget.hasAttribute("aria-expanded")&&this.modalFocusReturnTarget.setAttribute("aria-expanded","false"),document.contains(this.modalFocusReturnTarget)?(this.modalFocusReturnTarget.focus(),this.modalFocusReturnTarget=null,!0):(this.modalFocusReturnTarget=null,!1)}catch(e){return this.modalFocusReturnTarget=null,!1}}setupModalAccessibility(e,t){let i=this.getContentTypeLabel(t);e.setAttribute("role","dialog"),e.setAttribute("aria-modal","true"),e.setAttribute("tabindex","-1"),e.setAttribute("aria-label",i+" modal"),this.storeModalFocusReturnTarget(document.activeElement),this.setupLiveRegions(e)}announceModalStatus(e,t,i){let n;let o=this.getContentTypeLabel(t);switch(e){case"opened":case"closed":n=o+" player "+e;break;default:n=o+" "+e}this.announce({message:n,priority:"polite",category:"status"})}closeModal(e){this.returnFocusFromModal(),this.announceModalStatus("closed",e)}clearModalFocusReturnTarget(){this.modalFocusReturnTarget=null}cleanup(){this.announcementService.cleanup(),this.contentButtons.clear(),this.clearModalFocusReturnTarget()}clearAnnouncementQueue(){this.announcementService.clearQueue()}}t.AccessibilityManager=s,t.accessibilityManager=new s},7014:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7133:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetLabel=void 0;class i{constructor(e){this._type="BlazeWidgetLabel",this.value=e}static singleLabel(e){return new i(e)}static mustInclude(...e){let t=i.createLabel("and",e);return i.validateAndProceed(t,"mustInclude"),new i(t)}static atLeastOneOf(...e){let t=i.createLabel("or",e);return i.validateAndProceed(t,"atLeastOneOf"),new i(t)}mustInclude(...e){return i.mustInclude(this,...e)}atLeastOneOf(...e){return i.atLeastOneOf(this,...e)}toString(){return this.value}static createLabel(e,t){return"["+e+", "+t.map(e=>e instanceof i?e.toString():e).join(", ")+"]"}static validateAndProceed(e,t){if(!i.isValidLabelFormat(e,t))throw Error("Invalid label format for "+t)}static isValidLabelFormat(e,t){return("mustInclude"===t?/^\[and, .+, .+\]$/:/^\[or, .+, .+\]$/).test(e)}}
1t.BlazeWidgetLabel=i},7143:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7168:(e,t,i)=>{var n;!function(o,s,a,r){"use strict";var l,d=["","webkit","Moz","MS","ms","o"],h=s.createElement("div"),u=Math.round,c=Math.abs,p=Date.now;function g(e,t,i){return setTimeout(E(e,i),t)}function v(e,t,i){return!!Array.isArray(e)&&(y(e,i[t],i),!0)}function y(e,t,i){var n;if(e){if(e.forEach)e.forEach(t,i);else if(e.length!==r)for(n=0;n<e.length;)t.call(i,e[n],n,e),n++;else for(n in e)e.hasOwnProperty(n)&&t.call(i,e[n],n,e)}}function m(e,t,i){var n="DEPRECATED METHOD: "+t+"\n"+i+" AT \n";return function(){var t=Error("get-stack-trace"),i=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",s=o.console&&(o.console.warn||o.console.log);return s&&s.call(o.console,n,i),e.apply(this,arguments)}}l="function"!=typeof Object.assign?function(e){if(e===r||null===e)throw TypeError("Cannot convert undefined or null to object");for(var t=Object(e),i=1;i<arguments.length;i++){var n=arguments[i];if(n!==r&&null!==n)for(var o in n)n.hasOwnProperty(o)&&(t[o]=n[o])}return t}:Object.assign;var b=m(function(e,t,i){for(var n=Object.keys(t),o=0;o<n.length;)(!i||i&&e[n[o]]===r)&&(e[n[o]]=t[n[o]]),o++;return e},"extend","Use `assign`."),f=m(function(e,t){return b(e,t,!0)},"merge","Use `assign`.");function S(e,t,i){var n,o=t.prototype;(n=e.prototype=Object.create(o)).constructor=e,n._super=o,i&&l(n,i)}function E(e,t){return function(){return e.apply(t,arguments)}}function C(e,t){return"function"==typeof e?e.apply(t&&t[0]||r,t):e}function T(e,t,i){y(w(t),function(t){e.addEventListener(t,i,!1)})}function A(e,t,i){y(w(t),function(t){e.removeEventListener(t,i,!1)})}function I(e,t){for(;e;){if(e==t)return!0;e=e.parentNode}return!1}function M(e,t){return e.indexOf(t)>-1}function w(e){return e.trim().split(/\s+/g)}function _(e,t,i){if(e.indexOf&&!i)return e.indexOf(t);for(var n=0;n<e.length;){if(i&&e[n][i]==t||!i&&e[n]===t)return n;n++}return -1}function P(e){return Array.prototype.slice.call(e,0)}function L(e,t,i){for(var n=[],o=[],s=0;s<e.length;){var a=t?e[s][t]:e[s];0>_(o,a)&&n.push(e[s]),o[s]=a,s++}return i&&(n=t?n.sort(function(e,i){return e[t]>i[t]}):n.sort()),n}function x(e,t){for(var i,n,o=t[0].toUpperCase()+t.slice(1),s=0;s<d.length;){if((n=(i=d[s])?i+o:t)in e)return n;s++}return r}var O=1;function D(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||o}var B="ontouchstart"in o,N=x(o,"PointerEvent")!==r,k=B&&/mobile|tablet|ip(ad|hone|od)|android/i.test(navigator.userAgent),z="touch",R="mouse",j=["x","y"],V=["clientX","clientY"];function U(e,t){var i=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){C(e.options.enable,[e])&&i.handler(t)},this.init()}function W(e,t,i){var n,o,s,a,l,d,h,u,g,v,y,m,b,f,S,E,C,T=i.pointers.length,A=i.changedPointers.length,M=1&t&&T-A==0,w=12&t&&T-A==0;i.isFirst=!!M,i.isFinal=!!w,M&&(e.session={}),i.eventType=t,n=e,o=i,a=n.session,d=(l=o.pointers).length,a.firstInput||(a.firstInput=F(o)),d>1&&!a.firstMultiple?a.firstMultiple=F(o):1===d&&(a.firstMultiple=!1),h=a.firstInput,g=(u=a.firstMultiple)?u.center:h.center,v=o.center=H(l),o.timeStamp=p(),o.deltaTime=o.timeStamp-h.timeStamp,o.angle=Q(g,v),o.distance=Z(g,v),y=o.center,m=a.offsetDelta||{},b=a.prevDelta||{},f=a.prevInput||{},1!==o.eventType&&4!==f.eventType||(b=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},m=a.offsetDelta={x:y.x,y:y.y}),o.deltaX=b.x+(y.x-m.x),o.deltaY=b.y+(y.y-m.y),o.offsetDirection=G(o.deltaX,o.deltaY),E=Y(o.deltaTime,o.deltaX,o.deltaY),o.overallVelocityX=E.x,o.overallVelocityY=E.y,o.overallVelocity=c(E.x)>c(E.y)?E.x:E.y,o.scale=u?(S=u.pointers,Z(l[0],l[1],V)/Z(S[0],S[1],V)):1,o.rotation=u?(s=u.pointers,Q(l[1],l[0],V)+Q(s[1],s[0],V)):0,o.maxPointers=a.prevInput?o.pointers.length>a.prevInput.maxPointers?o.pointers.length:a.prevInput.maxPointers:o.pointers.length,function(e,t){var i,n,o,s,a=e.lastInterval||t,l=t.timeStamp-a.timeStamp;if(8!=t.eventType&&(l>25||a.velocity===r)){var d=t.deltaX-a.deltaX,h=t.deltaY-a.deltaY,u=Y(l,d,h);n=u.x,o=u.y,i=c(u.x)>c(u.y)?u.x:u.y,s=G(d,h),e.lastInterval=t}else i=a.velocity,n=a.velocityX,o=a.velocityY,s=a.direction;t.velocity=i,t.velocityX=n,t.velocityY=o,t.direction=s}(a,o),C=n.element,I(o.srcEvent.target,C)&&(C=o.srcEvent.target),o.target=C,e.emit("hammer.input",i),e.recognize(i),e.session.prevInput=i}function F(e){for(var t=[],i=0;i<e.pointers.length;)t[i]={clientX:u(e.pointers[i].clientX),clientY:u(e.pointers[i].clientY)},i++;return{timeStamp:p(),pointers:t,center:H(t),deltaX:e.deltaX,deltaY:e.deltaY}}function H(e){var t=e.length;if(1===t)return{x:u(e[0].clientX),y:u(e[0].clientY)};for(var i=0,n=0,o=0;o<t;)i+=e[o].clientX,n+=e[o].clientY,o++;return{x:u(i/t),y:u(n/t)}}function Y(e,t,i){return{x:t/e||0,y:i/e||0}}function G(e,t){return e===t?1:c(e)>=c(t)?e<0?2:4:t<0?8:16}function Z(e,t,i){i||(i=j);var n=t[i[0]]-e[i[0]],o=t[i[1]]-e[i[1]];return Math.sqrt(n*n+o*o)}function Q(e,t,i){i||(i=j);var n=t[i[0]]-e[i[0]];return 180*Math.atan2(t[i[1]]-e[i[1]],n)/Math.PI}U.prototype={handler:function(){},init:function(){this.evEl&&T(this.element,this.evEl,this.domHandler),this.evTarget&&T(this.target,this.evTarget,this.domHandler),this.evWin&&T(D(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&A(this.element,this.evEl,this.domHandler),this.evTarget&&A(this.target,this.evTarget,this.domHandler),this.evWin&&A(D(this.element),this.evWin,this.domHandler)}};
1var X={mousedown:1,mousemove:2,mouseup:4};function K(){this.evEl="mousedown",this.evWin="mousemove mouseup",this.pressed=!1,U.apply(this,arguments)}S(K,U,{handler:function(e){var t=X[e.type];1&t&&0===e.button&&(this.pressed=!0),2&t&&1!==e.which&&(t=4),this.pressed&&(4&t&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:R,srcEvent:e}))}});var q={pointerdown:1,pointermove:2,pointerup:4,pointercancel:8,pointerout:8},J={2:z,3:"pen",4:R,5:"kinect"},$="pointerdown",ee="pointermove pointerup pointercancel";function et(){this.evEl=$,this.evWin=ee,U.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}o.MSPointerEvent&&!o.PointerEvent&&($="MSPointerDown",ee="MSPointerMove MSPointerUp MSPointerCancel"),S(et,U,{handler:function(e){var t=this.store,i=!1,n=q[e.type.toLowerCase().replace("ms","")],o=J[e.pointerType]||e.pointerType,s=o==z,a=_(t,e.pointerId,"pointerId");1&n&&(0===e.button||s)?a<0&&(t.push(e),a=t.length-1):12&n&&(i=!0),a<0||(t[a]=e,this.callback(this.manager,n,{pointers:t,changedPointers:[e],pointerType:o,srcEvent:e}),i&&t.splice(a,1))}});var ei={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function en(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,U.apply(this,arguments)}function eo(e,t){var i=P(e.touches),n=P(e.changedTouches);return 12&t&&(i=L(i.concat(n),"identifier",!0)),[i,n]}S(en,U,{handler:function(e){var t=ei[e.type];if(1===t&&(this.started=!0),this.started){var i=eo.call(this,e,t);12&t&&i[0].length-i[1].length==0&&(this.started=!1),this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:z,srcEvent:e})}}});var es={touchstart:1,touchmove:2,touchend:4,touchcancel:8};function ea(){this.evTarget="touchstart touchmove touchend touchcancel",this.targetIds={},U.apply(this,arguments)}function er(e,t){var i=P(e.touches),n=this.targetIds;if(3&t&&1===i.length)return n[i[0].identifier]=!0,[i,i];var o,s,a=P(e.changedTouches),r=[],l=this.target;if(s=i.filter(function(e){return I(e.target,l)}),1===t)for(o=0;o<s.length;)n[s[o].identifier]=!0,o++;for(o=0;o<a.length;)n[a[o].identifier]&&r.push(a[o]),12&t&&delete n[a[o].identifier],o++;return r.length?[L(s.concat(r),"identifier",!0),r]:void 0}function el(){U.apply(this,arguments);var e=E(this.handler,this);this.touch=new ea(this.manager,e),this.mouse=new K(this.manager,e),this.primaryTouch=null,this.lastTouches=[]}function ed(e,t){1&e?(this.primaryTouch=t.changedPointers[0].identifier,eh.call(this,t)):12&e&&eh.call(this,t)}function eh(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var i={x:t.clientX,y:t.clientY};this.lastTouches.push(i);var n=this.lastTouches;setTimeout(function(){var e=n.indexOf(i);e>-1&&n.splice(e,1)},2500)}}function eu(e){for(var t=e.srcEvent.clientX,i=e.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var o=this.lastTouches[n],s=Math.abs(t-o.x),a=Math.abs(i-o.y);if(s<=25&&a<=25)return!0}return!1}S(ea,U,{handler:function(e){var t=es[e.type],i=er.call(this,e,t);i&&this.callback(this.manager,t,{pointers:i[0],changedPointers:i[1],pointerType:z,srcEvent:e})}}),S(el,U,{handler:function(e,t,i){var n=i.pointerType==z,o=i.pointerType==R;if(!(o&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)ed.call(this,t,i);else if(o&&eu.call(this,i))return;this.callback(e,t,i)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var ec=x(h.style,"touchAction"),ep=ec!==r,eg="compute",ev="auto",ey="manipulation",em="none",eb="pan-x",ef="pan-y",eS=function(){if(!ep)return!1;var e={},t=o.CSS&&o.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(i){e[i]=!t||o.CSS.supports("touch-action",i)}),e}();function eE(e,t){this.manager=e,this.set(t)}function eC(e){var t;this.options=l({},this.defaults,e||{}),this.id=O++,this.manager=null,this.options.enable=(t=this.options.enable)===r||t,this.state=1,this.simultaneous={},this.requireFail=[]}function eT(e){return 16&e?"cancel":8&e?"end":4&e?"move":2&e?"start":""}
1function eA(e){return 16==e?"down":8==e?"up":2==e?"left":4==e?"right":""}function eI(e,t){var i=t.manager;return i?i.get(e):e}function eM(){eC.apply(this,arguments)}function ew(){eM.apply(this,arguments),this.pX=null,this.pY=null}function e_(){eM.apply(this,arguments)}function eP(){eC.apply(this,arguments),this._timer=null,this._input=null}function eL(){eM.apply(this,arguments)}function ex(){eM.apply(this,arguments)}function eO(){eC.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function eD(e,t){var i,n;return(t=t||{}).recognizers=(i=t.recognizers,n=eD.defaults.preset,i===r?n:i),new eB(e,t)}function eB(e,t){this.options=l({},eD.defaults,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=new(this.options.inputClass||(N?et:k?ea:B?el:K))(this,W),this.touchAction=new eE(this,this.options.touchAction),eN(this,!0),y(this.options.recognizers,function(e){var t=this.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}function eN(e,t){var i,n=e.element;n.style&&(y(e.options.cssProps,function(o,s){i=x(n.style,s),t?(e.oldCssProps[i]=n.style[i],n.style[i]=o):n.style[i]=e.oldCssProps[i]||""}),t||(e.oldCssProps={}))}eE.prototype={set:function(e){e==eg&&(e=this.compute()),ep&&this.manager.element.style&&eS[e]&&(this.manager.element.style[ec]=e),this.actions=e.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var e=[];return y(this.manager.recognizers,function(t){C(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),function(e){if(M(e,em))return em;var t=M(e,eb),i=M(e,ef);return t&&i?em:t||i?t?eb:ef:M(e,ey)?ey:ev}(e.join(" "))},preventDefaults:function(e){var t=e.srcEvent,i=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var n=this.actions,o=M(n,em)&&!eS[em],s=M(n,ef)&&!eS[ef],a=M(n,eb)&&!eS[eb];if(o){var r=1===e.pointers.length,l=e.distance<2,d=e.deltaTime<250;if(r&&l&&d)return}if(!a||!s)return o||s&&6&i||a&&24&i?this.preventSrc(t):void 0}},preventSrc:function(e){this.manager.session.prevented=!0,e.preventDefault()}},eC.prototype={defaults:{},set:function(e){return l(this.options,e),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(e){if(v(e,"recognizeWith",this))return this;var t=this.simultaneous;return t[(e=eI(e,this)).id]||(t[e.id]=e,e.recognizeWith(this)),this},dropRecognizeWith:function(e){return v(e,"dropRecognizeWith",this)||(e=eI(e,this),delete this.simultaneous[e.id]),this},requireFailure:function(e){if(v(e,"requireFailure",this))return this;var t=this.requireFail;return -1===_(t,e=eI(e,this))&&(t.push(e),e.requireFailure(this)),this},dropRequireFailure:function(e){if(v(e,"dropRequireFailure",this))return this;e=eI(e,this);var t=_(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(e){return!!this.simultaneous[e.id]},emit:function(e){var t=this,i=this.state;function n(i){t.manager.emit(i,e)}i<8&&n(t.options.event+eT(i)),n(t.options.event),e.additionalEvent&&n(e.additionalEvent),i>=8&&n(t.options.event+eT(i))},tryEmit:function(e){if(this.canEmit())return this.emit(e);this.state=32},canEmit:function(){for(var e=0;e<this.requireFail.length;){if(!(33&this.requireFail[e].state))return!1;e++}return!0},recognize:function(e){var t=l({},e);if(!C(this.options.enable,[this,t]))return this.reset(),void(this.state=32);56&this.state&&(this.state=1),this.state=this.process(t),30&this.state&&this.tryEmit(t)},process:function(e){},getTouchAction:function(){},reset:function(){}},S(eM,eC,{defaults:{pointers:1},attrTest:function(e){var t=this.options.pointers;return 0===t||e.pointers.length===t},process:function(e){var t=this.state,i=e.eventType,n=6&t,o=this.attrTest(e);return n&&(8&i||!o)?16|t:n||o?4&i?8|t:2&t?4|t:2:32}}),S(ew,eM,{defaults:{event:"pan",threshold:10,pointers:1,direction:30},getTouchAction:function(){var e=this.options.direction,t=[];return 6&e&&t.push(ef),24&e&&t.push(eb),t},directionTest:function(e){var t=this.options,i=!0,n=e.distance,o=e.direction,s=e.deltaX,a=e.deltaY;return o&t.direction||(6&t.direction?(o=0===s?1:s<0?2:4,i=s!=this.pX,n=Math.abs(e.deltaX)):(o=0===a?1:a<0?8:16,i=a!=this.pY,n=Math.abs(e.deltaY))),e.direction=o,i&&n>t.threshold&&o&t.direction},attrTest:function(e){return eM.prototype.attrTest.call(this,e)&&(2&this.state||!(2&this.state)&&this.directionTest(e))},emit:function(e){this.pX=e.deltaX,this.pY=e.deltaY;var t=eA(e.direction);t&&(e.additionalEvent=this.options.event+t),this._super.emit.call(this,e)}}),S(e_,eM,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[em]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.scale-1)>this.options.threshold||2&this.state)},emit:function(e){if(1!==e.scale){var t=e.scale<1?"in":"out";e.additionalEvent=this.options.event+t}this._super.emit.call(this,e)}}),S(eP,eC,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ev]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,n=e.distance<t.threshold,o=e.deltaTime>t.time;
1if(this._input=e,n&&i&&(!(12&e.eventType)||o)){if(1&e.eventType)this.reset(),this._timer=g(function(){this.state=8,this.tryEmit()},t.time,this);else if(4&e.eventType)return 8}else this.reset();return 32},reset:function(){clearTimeout(this._timer)},emit:function(e){8===this.state&&(e&&4&e.eventType?this.manager.emit(this.options.event+"up",e):(this._input.timeStamp=p(),this.manager.emit(this.options.event,this._input)))}}),S(eL,eM,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[em]},attrTest:function(e){return this._super.attrTest.call(this,e)&&(Math.abs(e.rotation)>this.options.threshold||2&this.state)}}),S(ex,eM,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:30,pointers:1},getTouchAction:function(){return ew.prototype.getTouchAction.call(this)},attrTest:function(e){var t,i=this.options.direction;return 30&i?t=e.overallVelocity:6&i?t=e.overallVelocityX:24&i&&(t=e.overallVelocityY),this._super.attrTest.call(this,e)&&i&e.offsetDirection&&e.distance>this.options.threshold&&e.maxPointers==this.options.pointers&&c(t)>this.options.velocity&&4&e.eventType},emit:function(e){var t=eA(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)}}),S(eO,eC,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ey]},process:function(e){var t=this.options,i=e.pointers.length===t.pointers,n=e.distance<t.threshold,o=e.deltaTime<t.time;if(this.reset(),1&e.eventType&&0===this.count)return this.failTimeout();if(n&&o&&i){if(4!=e.eventType)return this.failTimeout();var s=!this.pTime||e.timeStamp-this.pTime<t.interval,a=!this.pCenter||Z(this.pCenter,e.center)<t.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,a&&s?this.count+=1:this.count=1,this._input=e,0==this.count%t.taps)return this.hasRequireFailures()?(this._timer=g(function(){this.state=8,this.tryEmit()},t.interval,this),2):8}return 32},failTimeout:function(){return this._timer=g(function(){this.state=32},this.options.interval,this),32},reset:function(){clearTimeout(this._timer)},emit:function(){8==this.state&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),eD.VERSION="2.0.7",eD.defaults={domEvents:!1,touchAction:eg,enable:!0,inputTarget:null,inputClass:null,preset:[[eL,{enable:!1}],[e_,{enable:!1},["rotate"]],[ex,{direction:6}],[ew,{direction:6},["swipe"]],[eO],[eO,{event:"doubletap",taps:2},["tap"]],[eP]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},eB.prototype={set:function(e){return l(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},stop:function(e){this.session.stopped=e?2:1},recognize:function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var i,n=this.recognizers,o=t.curRecognizer;(!o||o&&8&o.state)&&(o=t.curRecognizer=null);for(var s=0;s<n.length;)i=n[s],2===t.stopped||o&&i!=o&&!i.canRecognizeWith(o)?i.reset():i.recognize(e),!o&&14&i.state&&(o=t.curRecognizer=i),s++}},get:function(e){if(e instanceof eC)return e;for(var t=this.recognizers,i=0;i<t.length;i++)if(t[i].options.event==e)return t[i];return null},add:function(e){if(v(e,"add",this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},remove:function(e){if(v(e,"remove",this))return this;if(e=this.get(e)){var t=this.recognizers,i=_(t,e);-1!==i&&(t.splice(i,1),this.touchAction.update())}return this},on:function(e,t){if(e!==r&&t!==r){var i=this.handlers;return y(w(e),function(e){i[e]=i[e]||[],i[e].push(t)}),this}},off:function(e,t){if(e!==r){var i=this.handlers;return y(w(e),function(e){t?i[e]&&i[e].splice(_(i[e],t),1):delete i[e]}),this}},emit:function(e,t){this.options.domEvents&&((i=s.createEvent("Event")).initEvent(e,!0,!0),i.gesture=t,t.target.dispatchEvent(i));var i,n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var o=0;o<n.length;)n[o](t),o++}},destroy:function(){this.element&&eN(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},l(eD,{INPUT_START:1,INPUT_MOVE:2,INPUT_END:4,INPUT_CANCEL:8,STATE_POSSIBLE:1,STATE_BEGAN:2,STATE_CHANGED:4,STATE_ENDED:8,STATE_RECOGNIZED:8,STATE_CANCELLED:16,STATE_FAILED:32,DIRECTION_NONE:1,DIRECTION_LEFT:2,DIRECTION_RIGHT:4,DIRECTION_UP:8,DIRECTION_DOWN:16,DIRECTION_HORIZONTAL:6,DIRECTION_VERTICAL:24,DIRECTION_ALL:30,Manager:eB,Input:U,TouchAction:eE,TouchInput:ea,MouseInput:K,PointerEventInput:et,TouchMouseInput:el,SingleTouchInput:en,Recognizer:eC,AttrRecognizer:eM,Tap:eO,Pan:ew,Swipe:ex,Pinch:e_,Rotate:eL,Press:eP,on:T,off:A,each:y,merge:f,extend:b,assign:l,inherit:S,bindFn:E,prefixed:x}),(void 0!==o?o:"undefined"!=typeof self?self:{}).Hammer=eD,(n=(function(){return eD}).call(t,i,t,e))===r||(e.exports=n)}(window,document)},7177:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Prom
1ise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.LikeVideoCommand=t.SeekCommand=t.ToggleFullscreenCommand=t.UnmuteCommand=t.MuteCommand=t.ToggleMuteCommand=t.PauseCommand=t.PlayCommand=void 0;let o=i(1908),s=i(4545);t.PlayCommand=class{constructor(e,t=s.VideoPlayerService){this.playbackStrategy=e,this.videoPlayerState=t}execute(...e){return this.playbackStrategy.play().then(e=>(this.videoPlayerState.isPlaying=!0,e)).catch(e=>({status:o.PlayStatus.Failed,error:e}))}},t.PauseCommand=class{constructor(e){this.playbackStrategy=e}execute(...e){this.playbackStrategy.pause()}},t.ToggleMuteCommand=class{constructor(e){this.playbackStrategy=e}execute(...e){let t=this.playbackStrategy.isMuted();this.playbackStrategy.setMuted(!t)}},t.MuteCommand=class{constructor(e,t=s.VideoPlayerService){this.playbackStrategy=e,this.videoPlayerState=t}execute(){this.playbackStrategy.setMuted(!0),this.videoPlayerState.isMuted=!0}},t.UnmuteCommand=class{constructor(e,t=s.VideoPlayerService){this.playbackStrategy=e,this.videoPlayerState=t}execute(){this.playbackStrategy.setMuted(!1),this.videoPlayerState.isMuted=!1}},t.ToggleFullscreenCommand=class{constructor(e,t){this.playbackStrategy=e,this.videoElement=t}execute(...e){return n(this,void 0,void 0,function*(){var e,t;this.playbackStrategy.toggleFullscreen(),(null===(e=this.videoElement.embeddedRef)||void 0===e?void 0:e.player)instanceof o.BlazeWidgetVideoPlayer?yield this.videoElement.embeddedRef.player.toggleFullscreen():yield(null===(t=this.videoElement.modal)||void 0===t?void 0:t.player).toggleFullscreen()})}},t.SeekCommand=class{constructor(e){this.playbackStrategy=e}execute(e){"number"==typeof e&&this.playbackStrategy.seek(e)}},t.LikeVideoCommand=class{constructor(e){this.videoElement=e}execute(...e){return n(this,void 0,void 0,function*(){let e=this.videoElement.getAttribute("video-id");if(e){let t="true"!==this.videoElement.getAttribute("is-liked");this.videoElement.setAttribute("is-liked",t.toString()),yield s.LikeService.updateVideoLike(t,e)}})}}},7188:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GuardNullOrEmpty=function(e,t){if(!t)throw Error(e+" cannot be empty")},t.isStory=function(e){return"pages"in e}},7195:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HLSQualityManager=void 0;class i{static remember(e){this.memory={level:e,lastUpdate:Date.now()}}static recall(){return this.memory.level>=0&&Date.now()-this.memory.lastUpdate<this.DURATION?this.memory.level:-1}static shouldUseMemory(){return this.recall()>=0}static clear(){this.memory={level:-1,lastUpdate:0}}}t.HLSQualityManager=i,i.DURATION=3e5,i.memory={level:-1,lastUpdate:0}},7232:function(e,t,i){var n;!function(o,s){"use strict";var a="function",r="undefined",l="object",d="string",h="major",u="model",c="name",p="type",g="vendor",v="version",y="architecture",m="console",b="mobile",f="tablet",S="smarttv",E="wearable",C="embedded",T="Amazon",A="Apple",I="ASUS",M="BlackBerry",w="Browser",_="Chrome",P="Firefox",L="Google",x="Honor",O="Huawei",D="Microsoft",B="Motorola",N="Nvidia",k="OnePlus",z="Opera",R="OPPO",j="Samsung",V="Sharp",U="Sony",W="Xiaomi",F="Zebra",H="Facebook",Y="Chromium OS",G="Mac OS",Z=" Browser",Q=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},X=function(e,t){return typeof e===d&&-1!==K(t).indexOf(K(e))},K=function(e){return e.toLowerCase()},q=function(e,t){if(typeof e===d)return e=e.replace(/^\s\s*/,""),typeof t===r?e:e.substring(0,500)},J=function(e,t){for(var i,n,o,r,d,h,u=0;u<t.length&&!d;){var c=t[u],p=t[u+1];for(i=n=0;i<c.length&&!d&&c[i];)if(d=c[i++].exec(e))for(o=0;o<p.length;o++)h=d[++n],typeof(r=p[o])===l&&r.length>0?2===r.length?typeof r[1]==a?this[r[0]]=r[1].call(this,h):this[r[0]]=r[1]:3===r.length?typeof r[1]!==a||r[1].exec&&r[1].test?this[r[0]]=h?h.replace(r[1],r[2]):void 0:this[r[0]]=h?r[1].call(this,h,r[2]):void 0:4===r.length&&(this[r[0]]=h?r[3].call(this,h.replace(r[1],r[2])):void 0):this[r]=h||s;u+=2}},$=function(e,t){for(var i in t)if(typeof t[i]===l&&t[i].length>0){for(var n=0;n<t[i].length;n++)if(X(t[i][n],e))return"?"===i?s:i}else if(X(t[i],e))return"?"===i?s:i;return t.hasOwnProperty("*")?t["*"]:e},ee={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},et={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[v,[c,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[v,[c,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[c,v],[/opios[\/ ]+([\w\.]+)/i],[v,[c,z+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[v,[c,z+" GX"]],[/\bopr\/([\w\.]+)/i],[v,[c,z]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[v,[c,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[v,[c,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[c,v],[/quark(?:pc)?\/([-\w\.]+)/i],[v,[c,"Quark"]],[/\bddg\/([\w\.]+)/i],[v,[c,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[v,[c,"UC"+w]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[v,[c,"WeChat"]],[/konqueror\/([\w\.]+)/i],[v,[c,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[v,[c,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[v,[c,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[v,[c,"Smart Lenovo "+w]],[/(avast|avg)\/([\w\.]+)/i],[[c,/(.+)
vendor: 5,603 bytes, line 1
1/,"$1 Secure "+w],v],[/\bfocus\/([\w\.]+)/i],[v,[c,P+" Focus"]],[/\bopt\/([\w\.]+)/i],[v,[c,z+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[v,[c,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[v,[c,"Dolphin"]],[/coast\/([\w\.]+)/i],[v,[c,z+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[v,[c,"MIUI"+Z]],[/fxios\/([\w\.-]+)/i],[v,[c,P]],[/\bqihoobrowser\/?([\w\.]*)/i],[v,[c,"360"]],[/\b(qq)\/([\w\.]+)/i],[[c,/(.+)/,"$1Browser"],v],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[c,/(.+)/,"$1"+Z],v],[/samsungbrowser\/([\w\.]+)/i],[v,[c,j+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[v,[c,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[c,"Sogou Mobile"],v],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[c,v],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[c],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[v,c],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[c,H],v],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[c,v],[/\bgsa\/([\w\.]+) .*safari\//i],[v,[c,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[v,[c,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[v,[c,_+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[c,_+" WebView"],v],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[v,[c,"Android "+w]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[c,v],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[v,[c,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[v,c],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[c,[v,$,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[c,v],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[c,"Netscape"],v],[/(wolvic|librewolf)\/([\w\.]+)/i],[c,v],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[v,[c,P+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[c,[v,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[c,[v,/master.|lts./,""]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[y,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[y,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[y,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[y,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[y,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[y,/ower/,"",K]],[/ sun4\w[;\)]/i],[[y,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[y,K]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[g,j],[p,f]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[u,[g,j],[p,b]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[g,A],[p,b]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[g,A],[p,f]],[/(macintosh);/i],[u,[g,A]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[g,V],[p,b]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[u,[g,x],[p,f]],[/honor([-\w ]+)[;\)]/i],[u,[g,x],[p,b]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[u,[g,O],[p,f]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[g,O],[p,b]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[u,/_/g," "],[g,W],[p,f]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[u,/_/g," "],[g,W],[p,b]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[g,R],[p,b]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[u,[g,$,{OnePlus:["304","403","203"],"*":R}],[p,f]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[g,"Vivo"],[p,b]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[g,"Realme"],[p,b]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[g,B],[p,b]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[g,B],[p,f]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[g,"LG"],[p,f]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv|watch)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[g,"LG"],[p,b]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}
1(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[u,[g,"Lenovo"],[p,f]],[/(nokia) (t[12][01])/i],[g,u,[p,f]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[u,/_/g," "],[p,b],[g,"Nokia"]],[/(pixel (c|tablet))\b/i],[u,[g,L],[p,f]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[g,L],[p,b]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[g,U],[p,b]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[g,U],[p,f]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[g,k],[p,b]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[g,T],[p,f]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[g,T],[p,b]],[/(playbook);[-\w\),; ]+(rim)/i],[u,g,[p,f]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[g,M],[p,b]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[g,I],[p,f]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[g,I],[p,b]],[/(nexus 9)/i],[u,[g,"HTC"],[p,f]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[g,[u,/_/g," "],[p,b]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[u,[g,"TCL"],[p,f]],[/(itel) ((\w+))/i],[[g,K],u,[p,$,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[g,"Acer"],[p,f]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[g,"Meizu"],[p,b]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[g,"Ulefone"],[p,b]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[u,[g,"Energizer"],[p,b]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[u,[g,"Cat"],[p,b]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[u,[g,"Smartfren"],[p,b]],[/droid.+; (a(?:015|06[35]|142p?))/i],[u,[g,"Nothing"],[p,b]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[u,[g,"Archos"],[p,f]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[u,[g,"Archos"],[p,b]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[g,u,[p,f]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (hmd|imo) ([\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[g,u,[p,b]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[g,u,[p,f]],[/(surface duo)/i],[u,[g,D],[p,f]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[g,"Fairphone"],[p,b]],[/(u304aa)/i],[u,[g,"AT&T"],[p,b]],[/\bsie-(\w*)/i],[u,[g,"Siemens"],[p,b]],[/\b(rct\w+) b/i],[u,[g,"RCA"],[p,f]],[/\b(venue[\d ]{2,7}) b/i],[u,[g,"Dell"],[p,f]],[/\b(q(?:mv|ta)\w+) b/i],[u,[g,"Verizon"],[p,f]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[g,"Barnes & Noble"],[p,f]],[/\b(tm\d{3}\w+) b/i],[u,[g,"NuVision"],[p,f]],[/\b(k88) b/i],[u,[g,"ZTE"],[p,f]],[/\b(nx\d{3}j) b/i],[u,[g,"ZTE"],[p,b]],[/\b(gen\d{3}) b.+49h/i],[u,[g,"Swiss"],[p,b]],[/\b(zur\d{3}) b/i],[u,[g,"Swiss"],[p,f]],[/\b((zeki)?tb.*\b) b/i],[u,[g,"Zeki"],[p,f]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[g,"Dragon Touch"],u,[p,f]],[/\b(ns-?\w{0,9}) b/i],[u,[g,"Insignia"],[p,f]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[g,"NextBook"],[p,f]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[g,"Voice"],u,[p,b]],[/\b(lvtel\-)?(v1[12]) b/i],[[g,"LvTel"],u,[p,b]],[/\b(ph-1) /i],[u,[g,"Essential"],[p,b]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[g,"Envizen"],[p,f]],[/\b(trio[-\w\. ]+) b/i],[u,[g,"MachSpeed"],[p,f]],[/\btu_(1491) b/i],[u,[g,"Rotor"],[p,f]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[u,[g,N],[p,f]],[/(sprint) (\w+)/i],[g,u,[p,b]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[g,D],[p,b]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[g,F],[p,f]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[g,F],[p,b]],[/smart-tv.+(samsung)/i],[g,[p,S]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[g,j],[p,S]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[g,"LG"],[p,S]],[/(apple) ?tv/i],[g,[u,A+" TV"],[p,S]],[/crkey/i],[[u,_+"cast"],[g,L],[p,S]],[/droid.+aft(\w+)( bui|\))/i],[u,[g,T],[p,S]],[/(shield \w+ tv)/i],[u,[g,N],[p,S]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[g,V],[p,S]],[/(bravia[\w ]+)( bui|\))/i],[u,[g,U],[p,S]],[/(mi(tv|box)-?\w+) bui/i],[u,[g,W],[p,S]],[/Hbbtv.*(technisat) (.*);/i],[g,u,[p,S]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[g,q],[u,q],[p,S]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[u,[p,S]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,S]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[g,u,[p,m]],[/droid.+; (shield)( bui|\))/i],[u,[g,N],[p,m]],[/(playstation \w+)/i],[u,[g,U],[p,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[g,D],[p,m]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[u,[g,j],[p,E]],[/((pebble))app/i,/(asu
vendor: 5,485 bytes, line 1
1s|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[g,u,[p,E]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[u,[g,R],[p,E]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[g,A],[p,E]],[/(opwwe\d{3})/i],[u,[g,k],[p,E]],[/(moto 360)/i],[u,[g,B],[p,E]],[/(smartwatch 3)/i],[u,[g,U],[p,E]],[/(g watch r)/i],[u,[g,"LG"],[p,E]],[/droid.+; (wt63?0{2,3})\)/i],[u,[g,F],[p,E]],[/droid.+; (glass) \d/i],[u,[g,L],[p,E]],[/(pico) (4|neo3(?: link|pro)?)/i],[g,u,[p,E]],[/; (quest( \d| pro)?)/i],[u,[g,H],[p,E]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[g,[p,C]],[/(aeobc)\b/i],[u,[g,T],[p,C]],[/(homepod).+mac os/i],[u,[g,A],[p,C]],[/windows iot/i],[[p,C]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[p,b]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[p,f]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,f]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,b]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[u,[g,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[v,[c,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[c,v],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[v,[c,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[c,v],[/ladybird\//i],[[c,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[v,c]],os:[[/microsoft (windows) (vista|xp)/i],[c,v],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[c,[v,$,ee]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[v,$,ee],[c,"Windows"]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[v,/_/g,"."],[c,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[c,G],[v,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[v,c],[/(ubuntu) ([\w\.]+) like android/i],[[c,/(.+)/,"$1 Touch"],v],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/; ]?([\d\.]*)/i],[c,v],[/\(bb(10);/i],[v,[c,M]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[v,[c,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[v,[c,P+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[v,[c,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[v,[c,"watchOS"]],[/crkey\/([\d\.]+)/i],[v,[c,_+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[c,Y],v],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[c,v],[/(sunos) ?([\w\.\d]*)/i],[[c,"Solaris"],v],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[c,v]]},ei=function(e,t){if(typeof e===l&&(t=e,e=s),!(this instanceof ei))return new ei(e,t).getResult();var i=typeof o!==r&&o.navigator?o.navigator:s,n=e||(i&&i.userAgent?i.userAgent:""),m=i&&i.userAgentData?i.userAgentData:s,S=t?function(e,t){var i={};for(var n in e)t[n]&&t[n].length%2==0?i[n]=t[n].concat(e[n]):i[n]=e[n];return i}(et,t):et,E=i&&i.userAgent==n;return this.getBrowser=function(){var e,t={};return t[c]=s,t[v]=s,J.call(t,n,S.browser),t[h]=typeof(e=t[v])===d?e.replace(/[^\d\.]/g,"").split(".")[0]:s,E&&i&&i.brave&&typeof i.brave.isBrave==a&&(t[c]="Brave"),t},this.getCPU=function(){var e={};return e[y]=s,J.call(e,n,S.cpu),e},this.getDevice=function(){var e={};return e[g]=s,e[u]=s,e[p]=s,J.call(e,n,S.device),E&&!e[p]&&m&&m.mobile&&(e[p]=b),E&&"Macintosh"==e[u]&&i&&typeof i.standalone!==r&&i.maxTouchPoints&&i.maxTouchPoints>2&&(e[u]="iPad",e[p]=f),e},this.getEngine=function(){var e={};return e[c]=s,e[v]=s,J.call(e,n,S.engine),e},this.getOS=function(){var e={};return e[c]=s,e[v]=s,J.call(e,n,S.os),E&&!e[c]&&m&&m.platform&&"Unknown"!=m.platform&&(e[c]=m.platform.replace(/chrome os/i,Y).replace(/macos/i,G)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===d&&e.length>500?q(e,500):e,this},this.setUA(n),this};ei.VERSION="1.0.41",ei.BROWSER=Q([c,v,h]),ei.CPU=Q([y]),ei.DEVICE=Q([u,g,p,m,b,S,f,E,C]),ei.ENGINE=ei.OS=Q([c,v]),typeof t!==r?(e.exports&&(t=e.exports=ei),t.UAParser=ei):i.amdO?(n=(function(){return ei}).call(t,i,t,e))===s||(e.exports=n):typeof o!==r&&(o.UAParser=ei);var en=typeof o!==r&&(o.jQuery||o.Zepto);if(en&&!en.ua){var eo=new ei;en.ua=eo.getResult(),en.ua.get=function(){return eo.getUA()},en.ua.set=function(e){eo.setUA(e);var t=eo.getResult();for(var i in t)en.ua[i]=t[i]}}}("object"==typeof window?window:this)},7311:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.Presets=void 0;let n=i(6450),o=i(277),s=i(5686);class a{}t.Presets=a,a.widgetFont="'WSC Open Sans'",a.playerFont="'WSC Open Sans'",a.iconDefaultStyle={isVisible:!1,url:o.externalLinkIconSvg,size:"24px",color:"inherit"},a.CtaButtonStyle={color:"",backgroundColor:"",borderRadius:"8px",padding:"0",border:"",fontSize:"16px",font:a.playerFont,fontWeight:"700",textTransform:"uppercase",isAnimated:!1,isDisplayCtaModal:!0,width:"100%",height:"40px",position:"CENTER",isVisible:!0,icon:a.iconDefaultStyle},a.StatusLiveStyle={backgroundColor:s.Colors.ReadGray,backgroundImage:"none",textColor:s.Colors.LightPrimary,font:a.widgetFont,textSize:"10px",letterSpacing:"initial",borderRadius:"14px",borderWidth:2,borderColor:s.Colors.LightPrimary,thumbnailBorderColor:s.Colors.ReadGray,text:"LIVE",isVisible:!0,padding:"3px 9px"},a.StatusLiveUnreadStyle={backgroundColor:s.Colors.LiveChip,backgroundImage:"none",textColor:s.Colors.LightPrimary,font:a.widgetFont,textSize:"10px",letterSpacing:"initial",borderRadius:"14px",borderWidth:2,borderColor:s.Colors.LightPrimary,thumbnailBorderColor:s.Colors.LiveChip,text:"LIVE",isVisible:!0,padding:"3px 9px"},a.StatusReadStyle={backgroundColor:s.Colors.ReadGray,backgroundImage:"none",textColor:s.Colors.LightPrimary,font:a.widgetFont,textSize:"10px",letterSpacing:"initial",borderRadius:"14px",borderWidth:2,borderColor:s.Colors.LightPrimary,thumbnailBorderColor:s.Colors.ReadGray,text:"",isVisible:!0,padding:"3px 9px"},a.StatusUnreadStyle={backgroundColor:s.Colors.Accent,backgroundImage:"none",textColor:s.Colors.LightPrimary,font:a.widgetFont,textSize:"10px",letterSpacing:"initial",borderRadius:"14px",borderWidth:2,borderColor:s.Colors.LightPrimary,thumbnailBorderColor:s.Colors.Accent,text:"NEW",isVisible:!0,padding:"3px 9px"},a.BadgeStyle={backgroundColor:"",backgroundImage:"",textColor:s.Colors.LightPrimary,font:a.widgetFont,textSize:"10px",letterSpacing:"initial",borderRadius:"50%",borderWidth:2,borderColor:s.Colors.LightPrimary,thumbnailBorderColor:"",padding:"0",text:"",isVisible:!1,width:24,height:24},a.LabelStyle={isVisible:!0,gap:8,width:"auto",color:s.Colors.LightPrimary,padding:"0px",position:"outsideBottom",height:"20px",font:a.widgetFont,fontSize:"14px",fontWeight:"bold"},a.Grid2Column={thumbnailType:"VERTICAL_TWO_BY_THREE",thumbnailShape:"Rectangle",columns:2,rows:0,itemRatio:2/3,lines:2,wordBreak:"break-word",labelStyle:Object.assign(Object.assign({},a.LabelStyle),{padding:"8px",position:"insideBottomLeft"}),horizontalItemsSpacing:8,verticalItemsSpacing:8,borderWidth:0,borderRadius:"10px",borderPadding:0,statusLiveStyle:Object.assign(Object.assign({},a.StatusLiveStyle),{borderWidth:0}),statusLiveUnreadStyle:Object.assign(Object.assign({},a.StatusLiveUnreadStyle),{borderWidth:0}),statusReadStyle:Object.assign(Object.assign({},a.StatusReadStyle),{borderWidth:0}),statusUnreadStyle:Object.assign(Object.assign({},a.StatusUnreadStyle),{borderWidth:0}),statusIndicatorPosition:"insideTopLeft",badgeIndicatorStyle:Object.assign({},a.BadgeStyle),badgePosition:"outsideTopRight",isSkeleton:!1},a.Grid3Column=Object.assign(Object.assign({},a.Grid2Column),{columns:3}),a.Grid2ColumnHorizontal=Object.assign(Object.assign({},a.Grid2Column),{columns:2,thumbnailType:"CUSTOM",itemRatio:n.ASPECT_RATIO_16_9}),a.Grid3ColumnHorizontal=Object.assign(Object.assign({},a.Grid2Column),{columns:3,thumbnailType:"CUSTOM",itemRatio:n.ASPECT_RATIO_16_9}),a.RowCircle=Object.assign(Object.assign({},a.Grid2Column),{columns:0,rows:1,thumbnailShape:"Circle",thumbnailType:"SQUARE_ICON",borderWidth:2,borderPadding:4,borderRadius:"50%",itemRatio:1,labelStyle:Object.assign(Object.assign({},a.LabelStyle),{position:"outsideBottom",color:s.Colors.Black}),statusLiveStyle:Object.assign({},a.StatusLiveStyle),statusLiveUnreadStyle:Object.assign({},a.StatusLiveUnreadStyle),statusReadStyle:Object.assign({},a.StatusReadStyle),statusUnreadStyle:Object.assign(Object.assign({},a.StatusUnreadStyle),{isVisible:!1}),statusIndicatorPosition:"outsideBottom",badgeIndicatorStyle:Object.assign({},a.BadgeStyle),badgePosition:"outsideTopRight",horizontalItemsSpacing:12,verticalItemsSpacing:12}),a.RowRectangle=Object.assign(Object.assign({},a.Grid2Column),{columns:0,rows:1}),a.RowRectangleAnimated=Object.assign(Object.assign({},a.RowRectangle),{thumbnailType:"ANIMATED_THUMBNAIL_POSTER",itemRatio:n.ASPECT_RATIO_9_16}),a.RowHorizontalRectangle=Object.assign(Object.assign({},a.Grid2Column),{columns:0,rows:1,thumbnailType:"CUSTOM",itemRatio:n.ASPECT_RATIO_16_9}),a.RowHorizontalRectangleAnimated=Object.assign(Object.assign({},a.RowHorizontalRectangle),{thumbnailType:"ANIMATED_THUMBNAIL_POSTER"}),a.Default=Object.assign({},a.RowCircle),a.DefaultStoryStyle={titleVisible:!0,titleFont:a.playerFont,titleFontSize:"12px",titleFontSizeEmbedded:"11px",titleColor:s.Colors.LightPrimary,publishedDateVisible:!0,publishedDateFont:a.playerFont,publishedDateFontSize:"12px",publishedDateFontSizeEmbedded:"11px",publishedDateColor:s.Colors.TimeColor,statusLiveStyle:a.StatusLiveUnreadStyle,ctaButton:a.CtaButtonStyle,iconsPosition:"VERTICAL",iconsButtonPadding:"5px",iconsButtonSize:"28px",iconsButtonEmbeddedSize:"20px",iconsButton:[{value:"MUTE_UNMUTE",
1isEmbeddedVisible:!0,isVisible:!0,color:s.Colors.White,backgroundColor:n.TRANSPARENT,borderRadius:"50%"},{value:"PLAY_PAUSE",isEmbeddedVisible:!0,embeddedSize:"20px",isVisible:!0,color:s.Colors.White,backgroundColor:n.TRANSPARENT,borderRadius:"50%"},{value:"SHARE",isEmbeddedVisible:!1,isVisible:!0,color:s.Colors.White,backgroundColor:n.TRANSPARENT,borderRadius:"50%"},{value:"EXIT_PLAYER",isEmbeddedVisible:!1,isVisible:!0,color:s.Colors.White,backgroundColor:n.TRANSPARENT,borderRadius:"50%"},{value:"FULLSCREEN",isEmbeddedVisible:!0,isVisible:!1,color:s.Colors.White,backgroundColor:n.TRANSPARENT,borderRadius:"50%"},{value:"CLOSED_CAPTIONS",isEmbeddedVisible:!1,isVisible:!1,color:s.Colors.White,backgroundColor:n.TRANSPARENT,borderRadius:"50%"},{value:"CUSTOM_ACTION_BUTTON_ONE",isEmbeddedVisible:!1,isVisible:!1,color:s.Colors.White,backgroundColor:n.TRANSPARENT,borderRadius:"50%"},{value:"CUSTOM_ACTION_BUTTON_TWO",isEmbeddedVisible:!1,isVisible:!1,color:s.Colors.White,backgroundColor:n.TRANSPARENT,borderRadius:"50%"}],iconsButtonNavigation:[{value:"NEXT_PAGE",size:"28px",isVisible:!0,color:s.Colors.Black,backgroundColor:s.Colors.White,borderRadius:"50%",padding:"10px"},{value:"PREV_PAGE",size:"28px",isVisible:!0,color:s.Colors.Black,backgroundColor:s.Colors.White,borderRadius:"50%",padding:"10px"},{value:"NEXT_STORY",size:"28px",isVisible:!0,color:s.Colors.White,backgroundColor:n.TRANSPARENT,borderRadius:"50%",padding:"0"},{value:"PREV_STORY",size:"28px",isVisible:!0,color:s.Colors.White,backgroundColor:n.TRANSPARENT,borderRadius:"50%",padding:"0"}],iconsButtonOrder:["EXIT_PLAYER","MUTE_UNMUTE","PLAY_PAUSE","SHARE","CLOSED_CAPTIONS","CUSTOM_ACTION_BUTTON_ONE","CUSTOM_ACTION_BUTTON_TWO"],contentOrder:["LIVE_CHIP","STORY_TITLE","PUBLISHED_DATE"],icons:{play:o.playIconSvg,pause:o.pauseIconSvg,mute:o.muteIconSvg,unmute:o.unmuteIconSvg,share:o.shareIconSvg,fullscreen:o.fullscreenEnterIconSvg,closedCaptionsOn:o.closedCaptionsOnIconSvg,closedCaptionsOff:o.closedCaptionsOffIconSvg,exitMobileTablet:o.closeIconSvg,exitDesktop:o.closeIconSvg,navigation:{nextPage:o.nextPageIconSvg,prevPage:o.prevPageIconSvg,nextStory:o.nextStoryIconSvg,prevStory:o.prevStoryIconSvg}}},a.DefaultMomentStyle={headingText:{font:a.playerFont,textSizeMobile:"16px",textSizeTablet:"17px",textSizeDesktop:"18px",textColor:"#F0F0F0",isVisible:!1,contentSource:"TITLE",lineHeight:"1.5",textTransform:"none",fontWeight:"600"},bodyText:{font:a.playerFont,textSizeMobile:"14px",textSizeTablet:"15px",textSizeDesktop:"16px",textColor:"#F0F0F0",isVisible:!0,contentSource:"TITLE",lineHeight:"1.5",textTransform:"none",fontWeight:"400"},likeText:{font:a.playerFont,textSizeMobile:"14px",textSizeTablet:"15px",textSizeDesktop:"16px",textColor:s.Colors.White,fontWeight:"700",textTransform:"none",isVisible:!0,lineHeight:"1",likeCountThreshold:0},icons:{play:o.playIconSvg,pause:o.pauseIconSvg,mute:o.muteIconSvg,unmute:o.unmuteIconSvg,share:o.shareIconSvg,exit:o.closeIconSvg,unlike:o.unlikeIconSvg,like:o.likeIconSvg,closedCaptionsOn:o.closedCaptionsOnIconSvg,closedCaptionsOff:o.closedCaptionsOffIconSvg,navigation:{nextMoment:o.arrowUpMomentIconSvg,prevMoment:o.arrowDownMomentIconSvg}},buttons:{mute_unmute:{mobile:{isVisible:!0,width:"22px",height:"22px",color:"",padding:"10px",borderRadius:"",backgroundColor:""},tablet:{isVisible:!0,width:"22px",height:"22px",color:"",padding:"10px",borderRadius:"",backgroundColor:""},desktop:{isVisible:!0,width:"25px",height:"25px",color:"",padding:"10px",borderRadius:"",backgroundColor:""}},exit:{mobile:{isVisible:!0,width:"22px",height:"22px",color:"",padding:"10px",borderRadius:"",backgroundColor:""},tablet:{isVisible:!0,width:"22px",height:"22px",color:"",padding:"10px",borderRadius:"",backgroundColor:""},desktop:{isVisible:!1,width:"25px",height:"25px",color:"",padding:"10px",borderRadius:"",backgroundColor:""}},share:{mobile:{isVisible:!0,width:"20px",height:"20px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"},tablet:{isVisible:!0,width:"20px",height:"20px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"},desktop:{isVisible:!0,width:"25px",height:"25px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"}},like_unlike:{mobile:{isVisible:!0,width:"20px",height:"20px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"},tablet:{isVisible:!0,width:"20px",height:"20px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"},desktop:{isVisible:!0,width:"25px",height:"25px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"}},closed_captions:{mobile:{isVisible:!1,width:"20px",height:"20px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"},tablet:{isVisible:!1,width:"20px",height:"20px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"},desktop:{isVisible:!1,width:"25px",height:"25px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"}},custom_action_button_one:{mobile:{isVisible:!1,width:"20px",height:"20px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"},tablet:{isVisible:!1,width:"20px",height:"20px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"},desktop:{isVisible:!1,width:"25px",height:"25px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"}},custom_action_button_two:{mobile:{isVisible:!1,width:"20px",height:"20px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"},tablet:{isVisible:!1,width:"20px",height:"20px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"},desktop:{isVisible:!1,width:"25px",height:"25px",color:"",padding:"10px",borderRadius:"50%",backgroundColor:"#18181899"}}},topIconsButtonOrder:["EXIT_PLAYER","MUTE_UNMUTE"],bottomIconsButtonOrder:["CUSTOM_ACTION_BUTTON_ONE","CUSTOM_ACTION_BUTTON_TWO","LIKE_UNLIKE","SHARE","CLOSED_CAPTIONS"],contentBoxHorizontalSpacing:"15px",seekBar:{isVisible:!0,verticalSpacing:"20px",horizontalSpacing:"15px",playingState:{isVisible:!0,isThumbVisible:!1,backgroundColor:s.Colors.Gray,progressColor:s.Colors.White,height:"3px",borderRadius:"5px",thumbColor:"",thumbSize:"0px"},pausedState:{isVisible:!0,isThumbVisible:!0,backgroundColor:s.Colors.Gray,progressColor:s.Colors.White,height:"5
1px",borderRadius:"5px",thumbColor:s.Colors.White,thumbSize:"15px"}},followButton:{isVisible:!0,variant:"text",avatar:{borderWidth:"3px",followedBorderColor:s.Colors.White,unfollowedBorderColor:s.Colors.White},chip:{followedBackgroundColor:s.Colors.White,unfollowedBackgroundColor:s.Colors.White,color:s.Colors.Black}},ctaButton:{borderRadius:"8px",textSize:"16px",font:a.playerFont,height:"40px",layoutPositioning:"CTA_BELLOW_BOTTOM_BUTTONS_BOX",horizontalAlignment:"FULL_AVAILABLE_WIDTH",fontWeight:"700",fontFamily:a.playerFont,backgroundColor:s.Colors.Accent,borderColor:s.Colors.Accent,isVisible:!0,icon:{position:"START",color:s.Colors.Black,url:o.externalLinkIconSvg,size:"24px",isVisible:!1}}},a.DefaultVideoStyle={headingText:{font:a.playerFont,textColor:"#F0F0F0",isVisible:!0,contentSource:"TITLE",textStyle:{mobile:{fontSize:"16px",fontWeight:"600",lineHeight:"1.5",letterSpacing:void 0,textTransform:"none"},tablet:{fontSize:"17px",fontWeight:"600",lineHeight:"1.5",letterSpacing:void 0,textTransform:"none"},desktop:{fontSize:"18px",fontWeight:"600",lineHeight:"1.5",letterSpacing:void 0,textTransform:"none"}}},buttons:{mute_unmute:{mobile:{width:"24px",height:"24px",color:"",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""},tablet:{width:"26px",height:"26px",color:"",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""},desktop:{width:"28px",height:"28px",color:"",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""}},exit:{mobile:{width:"24px",height:"24px",color:"",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""},tablet:{width:"26px",height:"26px",color:"",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""},desktop:{width:"28px",height:"28px",color:"",padding:"7px",isVisible:!1,borderRadius:"",backgroundColor:""}},share:{mobile:{width:"24px",height:"24px",color:"",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""},tablet:{width:"26px",height:"26px",color:"",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""},desktop:{width:"28px",height:"28px",color:"",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""}},like_unlike:{mobile:{width:"24px",height:"24px",color:"#ffd325",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""},tablet:{width:"26px",height:"26px",color:"#ffd325",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""},desktop:{width:"28px",height:"28px",color:"#ffd325",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""}},play_pause:{mobile:{width:"38px",height:"38px",color:"",padding:"12px",isVisible:!0,borderRadius:"50%",backgroundColor:"rgba(51, 51, 51, 0.9)"},tablet:{width:"42px",height:"42px",color:"",padding:"12px",isVisible:!0,borderRadius:"50%",backgroundColor:"rgba(51, 51, 51, 0.9)"},desktop:{width:"28px",height:"28px",color:"",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""}},replay:{mobile:{width:"38px",height:"38px",color:"",padding:"12px",isVisible:!0,borderRadius:"50%",backgroundColor:"rgba(51, 51, 51, 0.9)"},tablet:{width:"42px",height:"42px",color:"",padding:"12px",isVisible:!0,borderRadius:"50%",backgroundColor:"rgba(51, 51, 51, 0.9)"},desktop:{width:"28px",height:"28px",color:"",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""}},prev_next:{mobile:{width:"36px",height:"36px",color:"",padding:"10px",isVisible:!0,borderRadius:"50%",backgroundColor:"rgba(51, 51, 51, 0.9)"},tablet:{width:"40px",height:"40px",color:"",padding:"10px",isVisible:!0,borderRadius:"50%",backgroundColor:"rgba(51, 51, 51, 0.9)"},desktop:{width:"28px",height:"28px",color:"",padding:"7px",isVisible:!0,borderRadius:"0",backgroundColor:""}},closed_captions:{mobile:{width:"24px",height:"24px",color:"",padding:"7px",isVisible:!0,isEmbeddedVisible:!0,borderRadius:"",backgroundColor:""},tablet:{width:"26px",height:"26px",color:"",padding:"7px",isVisible:!0,isEmbeddedVisible:!0,borderRadius:"",backgroundColor:""},desktop:{width:"28px",height:"28px",color:"",padding:"7px",isVisible:!0,isEmbeddedVisible:!0,borderRadius:"",backgroundColor:""}},fullscreen:{mobile:{width:"24px",height:"24px",color:"",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""},tablet:{width:"26px",height:"26px",color:"",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""},desktop:{width:"28px",height:"28px",color:"",padding:"7px",isVisible:!0,borderRadius:"",backgroundColor:""}}},backgroundColor:s.Colors.Black,cta:{text:{mobile:{fontSize:"16px",fontWeight:"700",lineHeight:"17px",letterSpacing:""},tablet:{fontSize:"16px",fontWeight:"700",lineHeight:"17px",letterSpacing:""},desktop:{fontSize:"16px",fontWeight:"700",lineHeight:"17px",letterSpacing:""}}
1,height:"40px",visibility:{duration:5e3,behavior:"VisibleAfterOverlayHidden"},fontFamily:a.playerFont,isVisible:!0,icon:{position:"START",color:"",size:"24px",isVisible:!0,url:o.linkIconSvg},borderColor:"",borderRadius:"20px",horizontalAlignment:"LEFT"},seekBar:{isVisible:!0,horizontalMargin:"15px",verticalMargin:"0px",playingState:{isVisible:!0,isThumbVisible:!1,backgroundColor:"#FFFFFF66",progressColor:"rgba(255, 255, 0, 1)",height:"5px",borderRadius:"5px",thumbColor:"",thumbSize:"",bufferProgressColor:"#D9D9D955"},pausedState:{isVisible:!0,isThumbVisible:!0,backgroundColor:"#FFFFFF66",progressColor:"rgba(255, 255, 0, 1)",height:"7px",borderRadius:"5px",thumbColor:"rgba(255, 255, 0, 1)",thumbSize:"15px",bufferProgressColor:"#D9D9D955"}},icons:{play:o.playIconSvg,replay:o.restartIconSvg,pause:o.pauseIconSvg,mute:o.muteIconSvg,unmute:o.unmuteIconSvg,share:o.shareIconSvg,fullscreenEnter:o.fullscreenEnterIconSvg,fullscreenExit:o.fullscreenExitIconSvg,like:o.likeIconSvg,unlike:o.unlikeIconSvg,exit:o.closeIconSvg,closedCaptionsOn:o.closedCaptionsOnIconSvg,closedCaptionsOff:o.closedCaptionsOffIconSvg,navigation:{prevVideo:o.prevStoryIconSvg,nextVideo:o.nextStoryIconSvg}}}},7315:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.Database=t.DB_NAMES=void 0;let o=i(4545),s={user:{keyPath:"id"},moments:{keyPath:"id"},stories:{keyPath:"id",indexes:[{name:"story_index",keyPath:"storyId"}]},videos:{keyPath:"id"},interactions:{keyPath:"id"},logs:{keyPath:"id",indexes:[{name:"level_index",keyPath:"level"},{name:"timestamp_index",keyPath:"timestamp"},{name:"priority_index",keyPath:"priority"}]}};t.DB_NAMES={MOMENTS:"moments",INTERACTIONS:"interactions",USER:"user",STORIES:"stories",VIDEOS:"videos",LOGS:"logs"};let a=null,r=null;t.Database=class{constructor(e){this.options=e}init(){return n(this,void 0,void 0,function*(){if(!a){a=setTimeout(()=>{a=null},3e3);try{this.dbInstance=yield this.openDatabase()}catch(e){throw e}finally{a&&(clearTimeout(a),a=null)}}})}openDatabase(){return n(this,void 0,void 0,function*(){return new Promise((e,t)=>{let i=indexedDB.open(this.options.databaseName,this.options.version);i.addEventListener("success",()=>n(this,void 0,void 0,function*(){e(i.result),yield new Promise(e=>{setTimeout(()=>n(this,void 0,void 0,function*(){try{yield this.onOpen(),e()}catch(e){t(e)}}),150)})})),i.addEventListener("upgradeneeded",o=>n(this,void 0,void 0,function*(){let n=i.result;try{yield this.onUpgradeNeeded(n),e(n)}catch(e){t(e)}})),i.addEventListener("error",e=>n(this,void 0,void 0,function*(){t(e),yield this.onError(e)}))})})}onUpgradeNeeded(e){return n(this,void 0,void 0,function*(){var t;try{for(let i in Array.from(e.objectStoreNames).forEach(t=>{e.deleteObjectStore(t)}),s){let n=e.createObjectStore(i,{keyPath:s[i].keyPath});null===(t=s[i].indexes)||void 0===t||t.forEach(e=>{n.createIndex(e.name,e.keyPath,e.options)})}}catch(e){throw e}})}onOpen(){return n(this,void 0,void 0,function*(){try{o.EventBusService.publish("BlazeDatabaseServiceOpen")}catch(e){throw e}})}onError(e){return n(this,void 0,void 0,function*(){yield this.deleteDatabase()})}deleteDatabase(){return n(this,void 0,void 0,function*(){return new Promise((e,t)=>{let i=indexedDB.deleteDatabase(this.options.databaseName);i.onsuccess=()=>e(),i.onerror=e=>t(e),i.onblocked=()=>{this.dbInstance&&this.dbInstance.close(),e()}})})}createTransaction(e,t){try{if(!this.dbInstance)throw Error("Database is not initialized.");return this.dbInstance.transaction([e],t).objectStore(e)}catch(e){return this.throttledReinit(),null}}get(e,t){return n(this,void 0,void 0,function*(){try{let i=this.createTransaction(e,"readonly");if(!i)return{data:{},error:Error("Transaction not created.")};let n=i.get(t);return yield new Promise((e,t)=>{n.onerror=()=>{t(Error("Failed get"))},n.onsuccess=()=>{e({data:n.result})}})}catch(e){throw e}})}getAll(e){return n(this,void 0,void 0,function*(){try{let t=this.createTransaction(e,"readonly");if(!t)return[];let i=t.getAll();return yield new Promise((e,t)=>
1{i.onerror=()=>{t(Error("Failed getAll"))},i.onsuccess=()=>{e(i.result)}})}catch(e){throw e}})}update(e,t){return n(this,void 0,void 0,function*(){try{let i={},n=this.createTransaction(e,"readwrite");if(!n)return{data:{},error:Error("Transaction not created.")};let o=n.put(t);return yield new Promise((e,t)=>{o.onerror=()=>{t(Error("Failed update"))},o.onsuccess=()=>{let t=o.result;e(Object.assign(Object.assign({},i),{data:t}))}})}catch(e){throw e}})}delete(e,t){return n(this,void 0,void 0,function*(){try{let i=this.createTransaction(e,"readwrite");if(!i)return{data:void 0,error:Error("Transaction not created.")};let n=i.delete(t);return yield new Promise((e,t)=>{n.onerror=()=>{t(Error("Failed delete"))},n.onsuccess=()=>{e({data:void 0})}})}catch(e){throw e}})}throttledReinit(){r||(r=setTimeout(()=>n(this,void 0,void 0,function*(){r=null,yield this.init()}),5e3))}}},7341:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.StoryService=void 0;let o=i(4545),s=i(4403);class a extends(0,s.Singleton)(){init(){}fetchContent(e){return n(this,void 0,void 0,function*(){let t,i;let{sourceType:n,labels:s,labelsPriority:a,ids:r,orderType:l,maxItems:d,advancedOrdering:h,personalized:u,text:c,recommendations:p}=e;if("ids"===n&&r)({data:t,error:i}=yield o.ApiService.getStoriesByIds({ids:r,orderType:l,showLiveFirst:"LiveFirst"===h,personalized:u}));else if("labels"===n&&s){let e=Array.isArray(s)?s.join():s.toString();({data:t,error:i}=yield o.ApiService.getStoriesByLabels({labels:e,orderType:l,maxItems:d,labelsPriority:a,showLiveFirst:"LiveFirst"===h,personalized:u,text:c}))}else"text"===n&&c?{data:t,error:i}=yield o.ApiService.getStoriesByText({text:c,orderType:l,maxItems:d,showLiveFirst:"LiveFirst"===h,personalized:u}):"recommendations"===n&&p&&({data:t,error:i}=yield o.ApiService.getContentByRecommendations({contentType:"story",recommendations:p}));return t||{assetsExpiryTime:"",totalItems:0,result:[]}})}enrichContent(e){return n(this,void 0,void 0,function*(){try{return yield o.DatabaseService.enrichStories(e)}catch(e){throw e}})}}t.StoryService=a.getInstance()},7357:function(e,t,i){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeLongFormControlsOverlay=void 0;let o=n(i(2776)),s=i(1908),a=i(4403),r=i(5785),l=i(9965),d=i(8921),h=i(4545),u=i(4906),c=i(9266),p=i(9126);class g extends HTMLElement{constructor(e){super(),this.videoRef=e,this.shadow=this.attachShadow({mode:"open"}),this.isInitialize=!1,this.videoInfoText=d.WidgetsFactory.create("blaze-div"),this.bottomContainerCta=d.WidgetsFactory.create("blaze-div"),this.closeButton=d.WidgetsFactory.create("blaze-button"),this.shareButton=d.WidgetsFactory.create("blaze-button"),this.likeButton=d.WidgetsFactory.create("blaze-button"),this.fullscreenButton=d.WidgetsFactory.create("blaze-button"),this.muteButton=d.WidgetsFactory.create("blaze-button"),this.closedCaptionButton=d.WidgetsFactory.create("blaze-button"),this.ctaButton=new r.BlazeCallToActionButton,this.currentMuteState=l.ButtonState.Unmute,this.videoSeekBar=d.WidgetsFactory.create("blaze-video-seek-bar"),this.videoTimer=d.WidgetsFactory.create("blaze-timer"),this.videoNavigationOverlay=d.WidgetsFactory.create("blaze-video-navigation-overlay"),this.gradientOverlayBottom=d.WidgetsFactory.create("blaze-div"),this.gradientOverlayTop=d.WidgetsFactory.create("blaze-div"),this.loader=d.WidgetsFactory.create("blaze-loader"),this.boundOnFullscreenClick=this.handleFullscreenClick.bind(this),this.boundOnShareClick=this.handleShareClick.bind(this),this.boundOnLikeClick=this.handleLikeClick.bind(this),this.boundOnMuteClick=this.handleMuteClick.bind(this),this.boundOnCtaClick=this.handleCtaClick.bind(this),this.boundOnCloseClick=this.handleCloseClick.bind(this),this.boundOnClosedCaptionClick=this.handleClosedCaptionClick.bind(this),this.boundOnScreenOrientationChange=this.handleScreenOrientationChange.bind(this),this.boundOnCtaContainerClick=this.handleCtaContainerClick.bind(this),this.isOverlayChangesBlocked=!1}connectedCallback(){this.initialize(),this.attachEventListeners()}disconnectedCallback(){this.detachEventListeners()}initialize(){this.isInitialize||(this.isInitialize=!0,this.attachStyles(),this.createDOM(),this.videoSeekBar.onStart
1Seeking=()=>{this.hidePlayerOverlayWhileSeeking()},this.videoSeekBar.onEndSeeking=()=>{this.showPlayerOverlayAfterSeeking()},this.updateVideoInfoText(this.title),this.setAttribute("hidden","false"))}hidePlayerOverlayWhileSeeking(){this.videoNavigationOverlay.setAttribute(s.NAVIGATION_OVERLAY_ATTRIBUTES.Hidden,"true"),this.muteButton.setAttribute(r.BUTTON_ATTRIBUTES.BlazeBtnVisible,"false"),this.closedCaptionButton.setAttribute(r.BUTTON_ATTRIBUTES.BlazeBtnVisible,"false"),this.fullscreenButton.setAttribute(r.BUTTON_ATTRIBUTES.BlazeBtnVisible,"false"),this.closeButton.setAttribute(r.BUTTON_ATTRIBUTES.BlazeBtnVisible,"false"),this.shareButton.setAttribute(r.BUTTON_ATTRIBUTES.BlazeBtnVisible,"false"),this.likeButton.setAttribute(r.BUTTON_ATTRIBUTES.BlazeBtnVisible,"false")}showPlayerOverlayAfterSeeking(){setTimeout(()=>{this.videoNavigationOverlay.setAttribute(s.NAVIGATION_OVERLAY_ATTRIBUTES.Hidden,"false"),this.muteButton.setAttribute(r.BUTTON_ATTRIBUTES.BlazeBtnVisible,"true"),this.closedCaptionButton.setAttribute(r.BUTTON_ATTRIBUTES.BlazeBtnVisible,"true"),this.fullscreenButton.setAttribute(r.BUTTON_ATTRIBUTES.BlazeBtnVisible,"true"),this.closeButton.setAttribute(r.BUTTON_ATTRIBUTES.BlazeBtnVisible,"true"),this.shareButton.setAttribute(r.BUTTON_ATTRIBUTES.BlazeBtnVisible,"true"),this.likeButton.setAttribute(r.BUTTON_ATTRIBUTES.BlazeBtnVisible,"true")},1e3)}setTheme(e){this.playerLayout=e,this.videoSeekBar.setTheme(e.seekBar);let{navigation:t,play:i,pause:n,replay:o}=e.icons,{prev_next:s,play_pause:a,replay:r}=e.buttons;this.videoNavigationOverlay.setTheme({play:i,pause:n,navigation:t,prev_next:s,play_pause:a,replay:r,replayIcon:o}),this.ctaVisiblity=e.cta.visibility,this.setCtaButtonStyles(e.cta),this.setHeadingStyle(this.videoInfoText,e.headingText),this.setButtonStyle(this.closeButton,this.getButtonStyle("exit"),e.icons.exit),this.setButtonStyle(this.shareButton,this.getButtonStyle("share"),e.icons.share),this.setButtonStyle(this.likeButton,this.getButtonStyle("like_unlike"),e.icons.like),this.setButtonStyle(this.fullscreenButton,this.getButtonStyle("fullscreen"),e.icons.fullscreenEnter),this.setButtonStyle(this.muteButton,this.getButtonStyle("mute_unmute"),e.icons.mute),this.setButtonStyle(this.closedCaptionButton,this.getButtonStyle("closed_captions"),e.icons.closedCaptionsOff)}static get observedAttributes(){return["video-title","hidden"]}attributeChangedCallback(e,t,i){switch(e){case"video-title":i!==t&&this.updateVideoInfoText(i);break;case"hidden":i!==t&&("true"===i?this.hidePlayerOverlay():this.showPlayerOverlay())}}showLoader(){a.deviceDetector.isMobile||a.deviceDetector.isTablet?this.videoNavigationOverlay.showLoader():a.deviceDetector.isDesktop&&(this.loader.style.display="block")}hideLoader(){a.deviceDetector.isMobile||a.deviceDetector.isTablet?this.videoNavigationOverlay.hideLoader():a.deviceDetector.isDesktop&&(this.loader.style.display="none")}hidePlayerOverlay(){let e=this.shadow.querySelector("#bottom-container-controls");e&&this.animateOverlayVisibility(e,!1,"down");let t=this.shadow.querySelector("#top-container");if(t&&this.animateOverlayVisibility(t,!1,"up"),this.ctaVisiblity){let e=this.shadow.querySelector("#bottom-container-cta");"VisibleAfterOverlayHidden"===this.ctaVisiblity.behavior&&(this.ctaTimeout=setTimeout(()=>{null==e||e.classList.add("hidden"),this.isCtaRendered&&this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.CTA_DISMISS,{bubbles:!0,composed:!0}))},this.ctaVisiblity.duration))}}showPlayerOverlay(){let e=this.shadow.querySelector("#top-container");e&&this.animateOverlayVisibility(e,!0,"down");let t=this.shadow.querySelector("#bottom-container-controls");t&&this.animateOverlayVisibility(t,!0,"up");let i=this.shadow.querySelector("#bottom-container-cta");i&&(i.classList.contains("hidden")&&this.isCtaRendered&&this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.CTA_VISIBILE,{bubbles:!0,composed:!0})),i.classList.remove("hidden")),clearTimeout(this.ctaTimeout)}animateOverlayVisibility(e,t,i="down"){o.default.remove(e),t?(e.classList.remove("hidden"),(0,o.default)({targets:e,opacity:[0,1],translateY:["up"===i?20:-20,0],duration:250,easing:"easeOutQuad",begin:()=>{this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.UPDATE_CLOSED_CAPTIONS_LOCATION,{detail:{top:"70px",left:"10px"},bubbles:!0,composed:!0})),this.gradientOverlayBottom.classList.remove("hidden"),this.gradientOverlayTop.classList.remove("hidden"),this.videoNavigationOverlay.classList.remove("hidden")}})):(0,o.default)({targets:e,opacity:[1,0],translateY:[0,"up"===i?-20:20],duration:250,easing:"easeInQuad",complete:()=>{e.classList.add("hidden"),e.style.transform="",this.gradientOverlayBottom.classList.add("hidden"),this.gradientOverlayTop.classList.add("hidden"),this.videoNavigationOverlay.classList.add("hidden"),this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.UPDATE_CLOSED_CAPTIONS_LOCATION,{detail:{top:"10px",left:"10px"},bubbles:!0,composed:!0}))}})}handleScreenOrientationChange(e){a.deviceDetector.isDesktop||this.playerLayout&&this.setCtaButtonStyles(this.playerLayout.cta)}setClosedCaptionState(e){"enabled"===e?(this.closedCaptionButton.setAttribute("disabled","false"),this.updateClosedCaptionButtonIcon()):(this.closedCaptionButton.setAttribute("disabled","true"),this.closedCaptionButton.setIconUrlAnimation(this.playerLayout.icons.closedCaptionsOn))}get title(){return this.getAttribute("video-title")||""}set title(e){this.setAttribute("video-title",e)}get isCtaRendered(){return"true"===this.getAttribute("is-cta-rendered")}set isCtaRendered(e){this.setAttribute("is-cta-rendered",e.toString())}setCta(e){if(e&&e.url&&e.text&&e.backgroundColor&&e.textColor){this.ctaButton.setAttribute(r.CTA_BUTTON_ATTRIBUTES.Href,e.url),this.ctaButton.setAttribute(r.CTA_BUTTON_ATTRIBUTES.Text,e.text),this.ctaButton.setAnchorButtonStyles({color:e.textColor,background:e.backgroundColor}),this.ctaButton.setAttribute(r.CTA_BUTTON_ATTRIBUTES.IconColor,e.textColor),this.isCtaRendered=!0;let t=this.shadow.querySelector("#bottom-container-cta");t&&!t.classList.contains("hidden")&&setTimeout(()=>{this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.CTA_VISIBILE,{bubbles:!0,composed:!0})),this.ctaButton.setAttribute(r.CTA_BUTTON_ATTRIBUTES.HiddenBtn,"false")},250)}else this.ctaButton.setAttribute(r.CTA_BUTTON_ATTRIBUTES.HiddenBtn,"true"),this.isCtaRendered=!1}removeCta(){this.ctaButton.setAttribute(r.CTA_BUTTON_ATTRIBUTES.HiddenBtn,"true"),this.isCtaRendered=!1}setCtaButtonStyles(e){var t;let i=a.deviceDetector.isMobile,n=a.deviceDetector.screenOrientation,o=!!(null===(t=this.videoRef.modal)||void 0===t?void 0:t.isOpen),s="fullscreen"===this.videoRef.videoPlayerState.playerLayout,l=i&&(o&&"portrait"===n||s),d=l?"100%":"auto";this.ctaButton.setStyle({height:e.height,width:d});let h=this.getDeviceStyle(e.text);if(this.ctaButton.setAnchorButtonStyles({fontFamily:e.fontFamily,borderRadius:e.borderRadius,outline:e.borderColor?"1px solid "+e.borderColor:"",width:d,justifyContent:l?"center":"unset"}),this.ctaButton.setCtaTextStyle({fontSize:a.TextScaleService.scaleFontSize(h.fontSize),fontWeight:h.fontWeight,lineHeight:a.TextScaleService.scaleLineHeight(h.lineHeight),letterSpacing:h.letterSpacing,paddingRight:l?"unset":"20px",justifyContent:l?"center":"unset",width:d}),e.icon.isVisible){if(this.ctaButton.setAttribute(r.CTA_BUTTON_ATTRIBUTES.IconUrl,e.icon.url),this.ctaButton.setAttribute(r.CTA_BUTTON_ATTRIBUTES.IconSize,e.icon.size),this.ctaButton.setCtaIconStyles({padding:"10px"}),a.deviceDetector.isMobile){let t=(0,c.convertCssUnitToNumber)(e.icon.size)+20;this.ctaButton.setCtaTextStyle({marginRight:t+"px"})}this.ctaButton.setAttribute(r.CTA_BUTTON_ATTRIBUTES.DisplayIcon,"true")}else this.ctaButton.setAttribute(r.CTA_BUTTON_ATTRIBUTES.DisplayIcon,"false")}handleCtaClick(e){e.target===this.ctaButton&&"landscape"===a.deviceDetector.screenOrientation&&a.deviceDetector.isMobile?this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.DISPLAY_HIDE_OVERLAY_FROM_CTA,{bubbles:!0,composed:!0})):(e.stopPropagation(),this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.CTA_CLICKED,{detail:{url:this.ctaButton.getAttribute("href")},bubbles:!0,composed:!0})))}attachStyles(){let e=document.createElement("style");e.textContent='\n :host {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n padding: 10px;\n box-sizing: border-box;\n justify-content: space-between;\n font-family: "Inter", serif;\n pointer-events: all;\n z-index: 3;\n }\n\n .hidden {\n display: none;\n visibility: hidden;\n opacity: 0;\n transition: opacity 0.5s ease; /* Optional: if you want a fade-out */\n }\n\n .gradient-overlay-bottom,\n .gradient-overlay-top {\n position: absolute;\n left: 0;\n width: 100%;\n }\n .gradient-overlay-bottom {\n height: 30%;\n bottom: 0;\n background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 105.77%);\n }\n .gradient-overlay-top {\n height: 30%;\n top: 0;\n background: linear-gradient(0deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.72) 105.77%);\n }\n .top-container {\n display: flex;\n justify-content: space-between;\n column-gap: 25%;\n z-index: 1;\n padding: 10px 10px 0px 10px;\n margin: -10px -10px 0 -10px;\n }\n .bottom-container {\n display: flex;\n flex-direction: column;\n gap: 10px;\n z-index: 3;\n padding: 10px;\n margin: -10px;\n }\n .bottom-container-cta {\n display: flex;\n }\n .bottom-left-icons,\n .bottom-right-icons {\n display: flex;\n gap: 10px;\n }\n .bottom-icons-container {\n display: flex;\n justify-content: space-between;\n align-items: center;\n }\n .video-info {\n pointer-events: none;\n }\n .top-right-icons {\n display: flex;\n gap: 10px;\n flex-direction: column;\n justify-content: flex-start;\n pointer-events: all;\n }\n .controls {\n display: flex;\n align-items: center;\n flex-direction: column;\n pointer-events: all;\n }\n blaze-button {\n pointer-events: all;\n }\n blaze-loader {\n position: absolute;\n top: 40%;\n left: 50%;\n }\n ',this.shadow.appendChild(e)}createDOM(){this.gradientOverlayBottom.classList.add("gradient-overlay-bottom"),this.gradientOverlayTop.classList.add("gradient-overlay-top"),this.shadow.appendChild(this.gradientOverlayTop),this.shadow.appendChild(this.gradientOverlayBottom),a.deviceDetector.isDesktop&&(this.loader.setAttribute("color",u.Colors.White),this.shadow.appendChild(this.loader)),this.playerLayout&&(this.videoInfoText.classList.add("video-info"),this.createTopContainer(),this.createBottomContainer())}getDeviceStyle(e){switch(!0){case a.deviceDetector.isMobile:return e.mobile;case a.deviceDetector.isTablet:return e.tablet;case a.deviceDetector.isDesktop:default:return e.desktop}}getButtonStyle(e){return this.getDeviceStyle(this.playerLayout.buttons[e])}getLikeButtonStyle(e){return this.getDeviceStyle(e)}getHeadingTextStyle(e){return this.getDeviceStyle(e)}setHeadingStyle(e,t){let{font:i,textColor:n,isVisible:o}=t,{fontWeight:s,fontSize:a,textTransform:r,lineHeight:l}=this.getHeadingTextStyle(t.textStyle);
1e.setStyle({fontFamily:i,fontWeight:s,fontSize:a,color:n,textTransform:r||"none",lineHeight:l||"normal",visibility:o?"visible":"hidden"})}setButtonStyle(e,t,i,n){e.setAttribute(r.BUTTON_ATTRIBUTES.Width,t.width),e.setAttribute(r.BUTTON_ATTRIBUTES.Height,t.height),e.setIconUrl(i),e.setAttribute(r.BUTTON_ATTRIBUTES.IconColor,(null==n?void 0:n.iconColor)||t.color),a.deviceDetector.isDesktop&&e.setAttribute(r.BUTTON_ATTRIBUTES.ButtonDesktopAnimation,"true"),e.setStyle({display:"inline-flex",padding:t.padding,borderRadius:t.borderRadius,backgroundColor:t.backgroundColor})}createTopContainer(){let e=d.WidgetsFactory.create("blaze-div");e.classList.add("top-container"),e.id="top-container",this.setHeadingStyle(this.videoInfoText,this.playerLayout.headingText),e.appendChild(this.videoInfoText);let t=d.WidgetsFactory.create("blaze-div");if(t.classList.add("top-right-icons"),!h.ConfigService.staticContentType&&(!(this.videoRef.embeddedRef instanceof p.BlazeWidgetEmbeddedVideo)||this.videoRef.modal)){let e=this.getButtonStyle("exit");this.setButtonStyle(this.closeButton,e,this.playerLayout.icons.exit),e.isVisible&&t.appendChild(this.closeButton),this.closeButton.setDataTestId("close-button")}let i=this.getButtonStyle("share");this.setButtonStyle(this.shareButton,i,this.playerLayout.icons.share),i.isVisible&&t.appendChild(this.shareButton),this.shareButton.setDataTestId("share-button");let n=this.getButtonStyle("like_unlike");this.setButtonStyle(this.likeButton,n,this.playerLayout.icons.unlike,{iconColor:u.Colors.White}),n.isVisible&&t.appendChild(this.likeButton),this.likeButton.setDataTestId("like-button"),t.addEventListener("click",e=>{e.target===t&&e.stopPropagation()}),e.appendChild(t),this.shadow.appendChild(e)}createBottomContainer(){let e=d.WidgetsFactory.create("blaze-div");e.classList.add("bottom-container"),this.bottomContainerCta.id="bottom-container-cta",this.bottomContainerCta.classList.add("bottom-container-cta");let t=d.WidgetsFactory.create("blaze-div");t.id="bottom-container-controls",this.bottomContainerCta.appendChild(this.ctaButton);let i=this.createControls();t.appendChild(i);let n=d.WidgetsFactory.create("blaze-div");n.classList.add("bottom-icons-container");let o=this.createBottomLeftIcons();n.appendChild(o);let s=this.createBottomRightIcons();n.appendChild(s),t.appendChild(n),e.appendChild(this.bottomContainerCta),e.appendChild(t),e.addEventListener("click",e=>e.stopPropagation()),this.shadow.appendChild(e)}createControls(){let e=d.WidgetsFactory.create("blaze-div");return e.classList.add("controls"),e.appendChild(this.videoTimer),e.appendChild(this.videoSeekBar),e}createBottomRightIcons(){let e=d.WidgetsFactory.create("blaze-div");e.classList.add("bottom-left-icons");let t=this.getButtonStyle("fullscreen");this.setButtonStyle(this.fullscreenButton,t,this.playerLayout.icons.fullscreenEnter),this.fullscreenButton.setDataTestId("fullscreen-button");let i=this.getButtonStyle("mute_unmute");this.setButtonStyle(this.muteButton,i,this.playerLayout.icons.mute),i.isVisible&&e.appendChild(this.muteButton),this.muteButton.setDataTestId("mute-button");let n=this.getButtonStyle("closed_captions");this.setButtonStyle(this.closedCaptionButton,n,this.playerLayout.icons.closedCaptionsOn);let o=this.videoRef.embeddedRef instanceof p.BlazeWidgetEmbeddedVideo&&!this.videoRef.modal;return(o?n.isEmbeddedVisible&&n.isVisible:n.isVisible)&&e.appendChild(this.closedCaptionButton),this.closedCaptionButton.setDataTestId("closed-caption-button"),(a.deviceDetector.isFullscreenSupported||o)&&t.isVisible&&e.appendChild(this.fullscreenButton),e}createBottomLeftIcons(){let e=d.WidgetsFactory.create("blaze-div");return e.classList.add("bottom-right-icons"),a.deviceDetector.isDesktop?(this.videoNavigationOverlay.platform="desktop",e.appendChild(this.videoNavigationOverlay)):a.deviceDetector.isTablet?(this.videoNavigationOverlay.platform="tablet",this.shadow.appendChild(this.videoNavigationOverlay)):a.deviceDetector.isMobile&&(this.videoNavigationOverlay.platform="mobile",this.shadow.appendChild(this.videoNavigationOverlay)),e}attachEventListeners(){this.fullscreenButton.addEventListener(s.EVENTS.CLICK,this.boundOnFullscreenClick),this.shareButton.addEventListener(s.EVENTS.CLICK,this.boundOnShareClick),this.likeButton.addEventListener(s.EVENTS.CLICK,this.boundOnLikeClick),this.muteButton.addEventListener(s.EVENTS.CLICK,this.boundOnMuteClick),this.ctaButton.addEventListener(s.EVENTS.CLICK,this.boundOnCtaCl
1ick),this.closedCaptionButton.addEventListener(s.EVENTS.CLICK,this.boundOnClosedCaptionClick),(a.deviceDetector.isMobile||a.deviceDetector.isTablet)&&this.closeButton.addEventListener(s.EVENTS.CLICK,this.boundOnCloseClick),this.bottomContainerCta.addEventListener(s.EVENTS.CLICK,this.boundOnCtaContainerClick),window.addEventListener(a.DEVICE_EVENTS.SCREEN_ORIENTATION_CHANGE,this.boundOnScreenOrientationChange)}detachEventListeners(){this.fullscreenButton.removeEventListener(s.EVENTS.CLICK,this.boundOnFullscreenClick),this.shareButton.removeEventListener(s.EVENTS.CLICK,this.boundOnShareClick),this.likeButton.removeEventListener(s.EVENTS.CLICK,this.boundOnLikeClick),this.muteButton.removeEventListener(s.EVENTS.CLICK,this.boundOnMuteClick),this.ctaButton.removeEventListener(s.EVENTS.CLICK,this.boundOnCtaClick),this.closedCaptionButton.removeEventListener(s.EVENTS.CLICK,this.boundOnClosedCaptionClick),(a.deviceDetector.isMobile||a.deviceDetector.isTablet)&&this.closeButton.removeEventListener(s.EVENTS.CLICK,this.boundOnCloseClick),this.bottomContainerCta.removeEventListener(s.EVENTS.CLICK,this.boundOnCtaContainerClick),window.removeEventListener(a.DEVICE_EVENTS.SCREEN_ORIENTATION_CHANGE,this.boundOnScreenOrientationChange)}handleCtaContainerClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.DISPLAY_HIDE_OVERLAY_FROM_CTA,{bubbles:!0,composed:!0}))}handleFullscreenClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.FULLSCREEN,{bubbles:!0,composed:!0}))}handleShareClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.SHARE,{bubbles:!0,composed:!0}))}handleLikeClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.LIKE,{bubbles:!0,composed:!0}))}handleCloseClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.CLOSE_PLAYER,{detail:{exitTrigger:"Close Button"},bubbles:!0,composed:!0}))}handleClosedCaptionClick(e){e.stopPropagation(),this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.CLOSED_CAPTIONS_OPEN_MODAL,{bubbles:!0,composed:!0}))}handleMuteClick(e){e.stopPropagation(),this.currentMuteState===l.ButtonState.Unmute?(this.currentMuteState=l.ButtonState.Mute,this.updateMuteButtonIcon(),this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.MUTE,{bubbles:!0,composed:!0}))):(this.currentMuteState=l.ButtonState.Unmute,this.updateMuteButtonIcon(),this.dispatchEvent(new CustomEvent(s.VIDEO_EVENTS.UNMUTE,{bubbles:!0,composed:!0})))}updateClosedCaptionButtonIcon(e){let{closedCaptionsOn:t,closedCaptionsOff:i}=this.playerLayout.icons;this.closedCaptionButton.setIconUrlAnimation(e?t:i)}setMuteState(e){this.currentMuteState=e?l.ButtonState.Mute:l.ButtonState.Unmute,this.updateMuteButtonIcon()}updateMuteButtonIcon(){let{mute:e,unmute:t}=this.playerLayout.icons;this.muteButton.setIconUrlAnimation(this.currentMuteState===l.ButtonState.Unmute?t:e)}toggleMute(e){this.currentMuteState=e?l.ButtonState.Mute:l.ButtonState.Unmute,this.updateMuteButtonIcon()}updateMute(e){this.toggleMute(e)}setFullscreenState(e){let t=void 0!==e?e:"fullscreen"===this.videoRef.videoPlayerState.playerLayout,{fullscreenEnter:i,fullscreenExit:n}=this.playerLayout.icons;(a.deviceDetector.isFullscreenSupported||this.videoRef.embeddedRef)&&this.fullscreenButton.setIconUrlAnimation(t?n:i),this.playerLayout&&this.setCtaButtonStyles(this.playerLayout.cta)}setVideoDuration(e){this.videoTimer.updateTotalTime(e)}setCurrentTime(e){this.videoTimer.updateCurrentTime(e)}updateVideoInfoText(e){this.videoInfoText.textContent=e}setLikedState(e){let{like:t,unlike:i}=this.playerLayout.icons;this.likeButton.setIconUrlAnimation(e?t:i),this.likeButton.setAttribute(r.BUTTON_ATTRIBUTES.IconColor,e?this.getLikeButtonStyle(this.playerLayout.buttons.like_unlike).color:u.Colors.White)}refreshCtaLayout(){this.playerLayout&&this.setCtaButtonStyles(this.playerLayout.cta)}}t.BlazeLongFormControlsOverlay=g},7366:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertCcLanguageToState=void 0;let n=i(6450);t.convertCcLanguageToState=(e,t)=>{let i=null==e?void 0:e.find(e=>""+e.language===t),o=n.CcSupportedLanguages.filter(e=>"null"!==e.code).find(e=>e.code===t);return t&&(null==e?void 0:e.length)?i?o?t:"Unknown":"Unavailable":"Off"}},7416:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Prom
1ise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.MomentService=void 0;let o=i(4545),s=i(4403);class a extends(0,s.Singleton)(){init(){}fetchContent(e){return n(this,void 0,void 0,function*(){let t,i;let{sourceType:n,labels:s,ids:a,orderType:r,maxItems:l,labelsPriority:d,recommendations:h,text:u}=e;if("ids"===n&&a)({data:t,error:i}=yield o.ApiService.getMomentByIds({ids:a,orderType:r}));else if("labels"===n&&s){let e=Array.isArray(s)?s.join():s.toString();({data:t,error:i}=yield o.ApiService.getMomentsByLabels({labels:e,orderType:r,maxItems:l,labelsPriority:d,text:u}))}else"text"===n&&u?{data:t,error:i}=yield o.ApiService.getMomentsByText({text:u,orderType:r,maxItems:l}):"recommendations"===n&&h&&({data:t,error:i}=yield o.ApiService.getContentByRecommendations({contentType:"moment",recommendations:h}));return null==t||t.result.map(e=>{e.type="Content"}),t||{assetsExpiryTime:"",totalItems:0,result:[]}})}updateMomentReadStatusById(e){return n(this,void 0,void 0,function*(){return yield o.DatabaseService.updateViewedMoment(e)})}enrichContent(e){return n(this,void 0,void 0,function*(){return yield o.DatabaseService.enrichMoments(e)})}}t.MomentService=a.getInstance()},7446:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetStoryPlayer=void 0;let s=o(i(2776)),a=i(9126),r=i(4403),l=i(7951),d=i(6450),h=i(4545),u=i(4906),c=i(9266),p=i(2240);class g extends p.WidgetAbstractPlayer{constructor(){super(),this.boundOnKeyDown=(0,r.throttle)(this.handleNavigationKeyPress.bind(this),d.ONE_SECOND/4),this.accessibilityConfigTimeout=null,this.focusTimeout=null}connectedCallback(){this.isBlazeWidgetStory(this.playerContentList)&&(this.append(this.srcBackground),this.append(this.destBackground)),this.append(this.playerFullscreenOverlay),this.append(this.container),this.applyStyles(),this.muteVideoOnIOSOrMacTablet(),this.setupEventListeners(),this.render()}disconnectedCallback(){this.listeners.removeAll(),null==window||window.removeEventListener("focus",this.onFocus),this.cleanupHammer(),this.cancelAccessibilityConfig(),this.cancelFocus()}setupEventListeners(){this.listeners.add("keydown",this.boundOnKeyDown),null==window||window.addEventListener("focus",this.onFocus.bind(this)),this.setupHammer(Hammer.DIRECTION_HORIZONTAL)}applyStyles(){(0,c.mergeStyles)(this,{display:"block",overflow:"hidden",height:"100%",width:"100%",position:"relative",background:u.Colors.Black,boxSizing:"border-box"}),this.container.setStyle({display:"grid",position:"relative",height:"100%"})}updateContentConfig(e){(null==e?void 0:e.length)&&e.length===this.playerContentList.length&&e.forEach((e,t)=>{let i=this.playerContentList[t];if(i.data.id===e.id)try{i.setData(e),i.render(),i.load(),i.play()}catch(e){}})}attributeChangedCallback(e,t,i){}setContent(e){for(let e of(this.playerContentList=[],this.contentList))e.remove();e.forEach(e=>{e.pages.forEach(e=>e.requestFrameCallback=this.renderPlayerBackground.bind(this))}),this.contentList=[...e],this.contentList.forEach((e,t)=>{e.onNextStory=t=>{e.navigationType=t,e.navigationDirection="Forwards",this.navigateContent("NEXT")},e.onPrevStory=t=>{e.navigationType=t,e.navigationDirection="Backwards",this.navigateContent("PREV")},e.onClose=()=>{e.exitTrigger="Close Button",e.navigationType="",e.navigationDirection="",this.close()},e.setContentExtraInfo(this.getContentExtraInfo(this.contentList,t))}),e.forEach(e=>e.refWidget=this.contentList)}navigateContent(e){var t,i;let n;if(this.isNavigationBlocked)return;switch(e){case"PREV":n=this.index-1;break;case"NEXT":n=this.index+1;break;default:return}let o=this.playerContentList[this.index];if(n<0||n===this.playerContentList.length)return void("PREV"===e?(o.resetPosition(),o.play()):"NEXT"===e&&(o.exitTrigger="Stories Completed",null===(t=o.refContentModal)||void 0===t||t.dis
1patchExitStoryEvents(),this.close()));this.isNavigationBlocked=!0,h.VideoPlayerService.isNavigating=!1;let s=this.playerContentList[n];r.URLManager.updateLocationContentHash({contentType:"story",contentId:null==s?void 0:s.data.id,isAd:null==s?void 0:s.data.isAd}),null==s||s.updatePlayerButtonIcons(),this.blockInteractionWithUserInterface(),null===(i=this.animateContent(e))||void 0===i||i.play(),h.VideoPlayerService.isNavigating=!1,this.cancelFocus(),this.scheduleAccessibilityConfig(s)}onFocus(){this.resetPosition()}handleMoveSwipe(e){var t,i,n,o,s,l,u,p,g;let v=this.contentList.findIndex(e=>{var t;return e.id===(null===(t=this.playerContentList[this.index])||void 0===t?void 0:t.id)});if(!(null===(t=this.playerContentList[this.index])||void 0===t?void 0:t.currentPage.isCurrentlyTryingToRunImaAd)&&v>-1){let t=e.distance/((null==window?void 0:window.screen.width)/.75)*this._animationDuration;switch(e.offsetDirection){case this.directionForwards:if("SingleContent"===h.VideoPlayerService.playReference)return void(h.ConfigService.autoAdvanceUrl&&!r.URLManager.isAutoAdvancingEnabled&&(r.URLManager.isAutoAdvancingEnabled=!0,this.animateCloseWithDirection({direction:"HorizontalForwards",callback:()=>r.URLManager.navigateTo("AUTO_ADVANCE")})));if(v===this.contentList.length-1)return void(Math.abs(e.deltaX)>=50&&this.animateCloseWithDirection({direction:"VerticalForwards"}));null===(i=this.playerContentList[this.playerContentList.length-1])||void 0===i||i.load(),null===(n=this.currentNextAnimation)||void 0===n||n.seek(t);break;case this.directionBackwards:if("SingleContent"===h.VideoPlayerService.playReference)return;if(0===v)return void(Math.abs(e.deltaX)>=50&&this.animateCloseWithDirection({direction:"HorizontalBackwards"}));null===(o=this.playerContentList[0])||void 0===o||o.load(),null===(s=this.currentPrevAnimation)||void 0===s||s.seek(t);break;case Hammer.DIRECTION_UP:if(Math.abs(e.deltaY)>=15){let e=this.playerContentList[this.index];if(e.isCtaWasClickedOrSwiped||e.currentPage.isAd)return;let t="none"!==e.ctaButtonElement.style.display,i=null===(u=null===(l=e.currentPage.data.cta)||void 0===l?void 0:l.enhancements)||void 0===u?void 0:u.hasSwipeUp,n=e.currentPage instanceof a.BlazeWidgetVideo,o=e.currentPage instanceof a.BlazeWidgetAd;if(n&&t&&i){e.isCtaWasClickedOrSwiped=!0;let t=new Event("swipeup");e.handleCtaAction(t,"Swipe Up")}else o&&(e.isCtaWasClickedOrSwiped=!0,e.currentPage.handleCtaSwipeUp(),(0,c.delay)(d.ONE_SECOND).then(()=>e.isCtaWasClickedOrSwiped=!1))}return;default:null===(p=this.currentNextAnimation)||void 0===p||p.seek(0),null===(g=this.currentPrevAnimation)||void 0===g||g.seek(0)}}}handleEndSwipe(e){var t;let i=this.playerContentList[this.index+1],n=this.playerContentList[this.index-1],o=this.contentList.findIndex(e=>{var t;return e.id===(null===(t=this.playerContentList[this.index])||void 0===t?void 0:t.id)});if(!(null===(t=this.playerContentList[this.index])||void 0===t?void 0:t.currentPage.isCurrentlyTryingToRunImaAd))switch(e.offsetDirection){case this.directionForwards:if(o===this.contentList.length-1)return;this.playerContentList[this.index].exitTrigger="Swipe",this.playerContentList[this.index].navigationType="Manual",this.processAnimation(e,i,this.currentNextAnimation),r.URLManager.updateLocationContentHash({contentType:"story",contentId:null==i?void 0:i.data.id,isAd:null==i?void 0:i.data.isAd});break;case this.directionBackwards:this.playerContentList[this.index].exitTrigger="Swipe",this.playerContentList[this.index].navigationType="Manual",this.processAnimation(e,n,this.currentPrevAnimation),r.URLManager.updateLocationContentHash({contentType:"story",contentId:null==n?void 0:n.data.id,isAd:null==n?void 0:n.data.isAd});break;case Hammer.DIRECTION_DOWN:if("mobile"===r.deviceDetector.platform&&e.deltaY>30&&70>=Math.abs(e.deltaX)){if("SingleContent"===h.VideoPlayerService.playReference)return;this.playerContentList[this.index].exitTrigger="Swipe Down",this.animateCloseWithDirection({direction:"VerticalForwards"})}return;case Hammer.DIRECTION_UP:return;default:this.reverseAnimation(e)}}handlePrevDirection(){let e=this.playerContentList[0],t=this.contentList[this.contentList.indexOf(e)-1];t&&!this.container.contains(t)&&(t.updatePlayerButtonIcons(),t.updateCTAButtonPosition(),t.currentPage.loadPoster(),this.container.prepend(t),this.playerContentList.splice(0,0,t),this.index+=1)}handleNextDirection(){let e=this.contentList[this.contentList.indexOf(this.playerContentList[this.playerContentList.length-1])+1];e&&!this.container.contains(e)&&(e.updatePlayerButtonIcons(),e.updateCTAButtonPosition(),e.currentPage.loadPoster(),this.container.append(e),this.playerContentList.push(e))}resetStyles(){this.style.background="#000",this.style.transform="translate(0, 0)",this.style.opacity="",this.container.style.opacity=""}play(e){var t,i,n;let o=this.playerContentList[this.index];if(e&&!isNaN(null!==(t=null==e?void 0:e.pageIndex)&&void 0!==t?t:0)&&(o.pageIndex=null!==(i=null==e?void 0:e.pageIndex)&&void 0!==i?i:0),r.URLManager.updateLocationContentHash({contentType:"story",contentId:null==o?void 0:o.data.id,isAd:null==o?void 0:o.data.isAd}),o){o.load();let e=o.shouldShowImaAdOnStart;o.shouldShowImaAdOnStart=!1,o.play(),o.shouldShowImaAdOnStart=e,this.playerContentList.forEach(e
1=>{o.data.id!==e.data.id&&(e.displayCurrentStoryPageAndHideTheRest(),e.updateCTAButtonPosition())}),setTimeout(()=>{var e;switch(h.ConfigService.prefetchingPolicy){case"low":null===(e=this.playerContentList[this.playerContentList.length-1])||void 0===e||e.load();break;case"default":this.playerContentList.forEach(e=>{o.data.id!==e.data.id&&e.load()})}},3*d.ONE_SECOND),this.manageElementsAccessible(null===(n=null==o?void 0:o.data)||void 0===n?void 0:n.id)}}loadAndPlayContent(){return n(this,void 0,void 0,function*(){var e;this.isNavigationBlocked=!0,this.videoPlayerState.isPlaying=!0;let t=this.playerContentList[this.index];t&&(yield t.load("direct"),t.play(),this.playerContentList.forEach(e=>{e.data.id!==t.data.id&&(e.isActive=!1)}),t.isActive=!0,this.isNavigationBlocked=!1,h.VideoPlayerService.isNavigating=!1,this.videoPlayerState.isPlaying=!0,this.manageElementsAccessible(null===(e=t.data)||void 0===e?void 0:e.id))})}handleAnimationCompletion(e,t){var i,n;e&&(e.navigationDirection="NEXT"===t?"Forwards":"Backwards",e.event(d.StoryAction.PageExit,{}),e.event(d.StoryAction.Exit,{}),e.isActive=!1,e.updateWidgetStatusReadUnread(),e.currentPage.muted=this.videoPlayerState.isMuted,e.pause()),null===(i=this.onContentChange)||void 0===i||i.call(this,t),this.index+="NEXT"===t?1:-1,this.handleAnimationEnd(t),e.currentPage.endExit();let o=this.playerContentList[this.index];o&&l.contentAccessibilityManager.announceNavigation(this.calculateTruePosition(o),this.contentList.length,"story-list",null===(n=o.data)||void 0===n?void 0:n.title,{trigger:"navigation",navigationType:o.navigationType,previousPosition:this.calculateTruePosition(this.playerContentList[0===this.index?0:this.index-1])})}createAnimation(e,t,i){let n=this.playerContentList[i],o=this.offsetWidth*("RTL"===h.ConfigService.layoutDirection?-1:1);return s.default.timeline({complete:()=>{h.VideoPlayerService.isModalOpen&&this.handleAnimationCompletion(e,t)},changeBegin:()=>{this.handleAnimationStart(e,n)},easing:"easeOutQuad",autoplay:!1}).add({targets:[this.container],keyframes:[{translateX:-this.index*o,duration:0},{translateX:-i*o,duration:this._animationDuration}]},0).add({targets:[e],keyframes:[{scale:.8,duration:.15*this._animationDuration},{scale:1,duration:.85*this._animationDuration,delay:.15*this._animationDuration},{transform:"translate(calc("+o+"px - 100%), 0)"}]},0).add({targets:[n],keyframes:[{scale:.8,duration:.15*this._animationDuration},{scale:1,duration:.85*this._animationDuration,delay:.15*this._animationDuration},{transform:"translate(calc("+o+"px - 100%), 0)"}]},0)}handleAnimationStart(e,t){var i,n;t.currentPage.loadPoster(),t.updatePublishedDate(),t.updatePlayerButtonIcons(),null==e||e.pause(),e.currentPage.muted=this.videoPlayerState.isMuted,t.currentPage.muted=this.videoPlayerState.isMuted,(null===(i=e.shareModal)||void 0===i?void 0:i.isOpen)&&(null===(n=e.shareModal)||void 0===n||n.close()),t.currentPage.startEnter()}animateCloseWithDirection(e){let t;let{direction:i,callback:n,exitTrigger:o="Swipe",navigationType:a="Manual"}=e;switch(i){case"HorizontalForwards":case"VerticalForwards":t="Forwards";break;case"HorizontalBackwards":case"VerticalBackwards":t="Backwards"}if(this.isCloseAnimationStarted)return;this.isCloseAnimationStarted=!0;let r=s.default.timeline({complete:()=>{this.isCloseAnimationStarted=!1,this.close()},changeBegin:()=>{let e=this.playerContentList[this.index];e&&(e.pause(),e.currentPage.muted=this.videoPlayerState.isMuted),e.exitTrigger=o,e.navigationType=a,e.navigationDirection=t,e.event(d.StoryAction.Exit,{}),e.event(d.StoryAction.PageExit,{}),h.AnalyticsService.sendAnalyticsData()},easing:"easeOutQuad"});r.add(Object.assign(Object.assign(Object.assign(Object.assign({targets:[this.container]},"HorizontalBackwards"===i&&{translateX:"RTL"===h.ConfigService.layoutDirection?"-100%":"100%"}),h.ConfigService.shouldAutoAdvance&&"SingleContent"===h.VideoPlayerService.playReference&&"HorizontalForwards"===i&&{translateX:"-100%"}),"VerticalForwards"===i&&{translateY:"100%"}),{opacity:0,duration:500})),this.resetPosition(),this.style.background="",r.play(),r.finished.then(()=>{null==n||n()})}handleNavigationKeyPress(e){let t=this.playerContentList[this.index],i="SingleContent"===h.VideoPlayerService.playReference,n=t.isLastPage();if(!i||!n)return h.VideoPlayerService.isNavigating=!1,!!this.focus&&("ArrowLeft"==e.key||"Left"==e.key?(this.videoPlayerState.isPlaying=!0,"RTL"===h.ConfigService.layoutDirection?t.goNextPage():t.goPrevPage()):"ArrowRight"!=e.key&&"Right"!=e.key||(this.videoPlayerState.isPlaying=!0,"RTL"===h.ConfigService.layoutDirection?t.goPrevPage():t.goNextPage()),!1);
1h.ConfigService.shouldAutoAdvance&&(this.renderPlayerBackground(!0),this.animateCloseWithDirection({direction:"HorizontalForwards",callback:()=>r.URLManager.navigateTo("AUTO_ADVANCE")}))}render(){let e=this.getBoundingClientRect().width;this.container.style.gridTemplateColumns="repeat(10, "+e+"px)",this.container.style.transform=""}loadContentBatch(){}playToggleCurrentStory(){this.playerContentList[this.index].playToggle()}manageElementsAccessible(e){this.playerContentList&&0!==this.playerContentList.length&&e&&this.playerContentList.forEach(t=>{var i;(null===(i=t.data)||void 0===i?void 0:i.id)===e?t.enableAllButtons():t.disableAllButtons()})}calculateTruePosition(e){let t=this.contentList.findIndex(t=>t.data.id===e.data.id);return t>=0?t+1:this.index+1}configurePlayerContentAccessibility(){this.playerContentList.forEach((e,t)=>{e instanceof a.BlazeWidgetStory&&(t===this.index?this.setCurrentStoryAccessibility(e,t):this.setInactiveStoryAccessibility(e))})}setCurrentStoryAccessibility(e,t){var i;e.setAttribute("tabindex",d.ACCESSIBILITY_ATTRIBUTES.ACTIVE_TABINDEX),e.setAttribute("aria-hidden",d.ACCESSIBILITY_ATTRIBUTES.ARIA_HIDDEN_FALSE),e.setAttribute("role",d.ACCESSIBILITY_ATTRIBUTES.REGION_ROLE);let n=((null===(i=e.data)||void 0===i?void 0:i.title)||"Story "+(t+1))+", story "+this.calculateTruePosition(e)+" of "+this.contentList.length;e.setAttribute("aria-label",n),this.scheduleFocus(e),setTimeout(()=>{e.setAttribute("aria-label","")},d.ACCESSIBILITY_TIMING.LABEL_CLEAR_DELAY)}setInactiveStoryAccessibility(e){e.setAttribute("tabindex",d.ACCESSIBILITY_ATTRIBUTES.INACTIVE_TABINDEX),e.setAttribute("aria-hidden",d.ACCESSIBILITY_ATTRIBUTES.ARIA_HIDDEN_TRUE),e.setAttribute("aria-label",""),e.hasAttribute("role")||e.setAttribute("role",d.ACCESSIBILITY_ATTRIBUTES.REGION_ROLE)}scheduleAccessibilityConfig(e){this.cancelAccessibilityConfig(),this.accessibilityConfigTimeout=setTimeout(()=>{var t,i,n;this.manageElementsAccessible(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.id),this.configurePlayerContentAccessibility(),null===(n=null===(i=null==e?void 0:e.refContentModal)||void 0===i?void 0:i.updateContentAriaLabelForNavigation)||void 0===n||n.call(i),this.accessibilityConfigTimeout=null},d.ACCESSIBILITY_TIMING.CONFIG_SCHEDULE_DELAY)}cancelAccessibilityConfig(){this.accessibilityConfigTimeout&&(clearTimeout(this.accessibilityConfigTimeout),this.accessibilityConfigTimeout=null)}scheduleFocus(e){this.cancelFocus(),this.focusTimeout=setTimeout(()=>{e.focus(),this.focusTimeout=null},d.ACCESSIBILITY_TIMING.FOCUS_DELAY)}cancelFocus(){this.focusTimeout&&(clearTimeout(this.focusTimeout),this.focusTimeout=null)}}t.BlazeWidgetStoryPlayer=g},7449:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ANNOUNCEMENT_CONSTANTS=void 0,t.ANNOUNCEMENT_CONSTANTS={LIVE_REGIONS:{POLITE_ID:"blaze-aria-live-polite",ASSERTIVE_ID:"blaze-aria-live-assertive",STYLES:{POSITION:"absolute",LEFT:"-10000px",WIDTH:"1px",HEIGHT:"1px",OVERFLOW:"hidden"}},ATTRIBUTES:{ARIA_LIVE:"aria-live",ARIA_ATOMIC:"aria-atomic",ATOMIC_VALUE:"true"},TIMING:{REGION_SETUP_DELAY:10}}},7452:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.VideoCacheService=void 0;let o=i(4403),s=i(9142);class a extends(0,o.Singleton)(){constructor(){super(),this.cache=null,this.cacheName="blaze-video-cache",this.downloadControllers=new Map,this.cacheList=new Map,this.cacheInitialized=!1,this.cacheSupported=!1,this.sizeLimit=367001600,this.cacheSupported=this.isCacheSupported()}isCacheSupported(){return"undefined"!=typeof caches&&"open"in caches}init(){return n(this,void 0,void 0,function*(){this.cacheSupported&&this.retryCacheInitialization(3)})}retryCacheInitialization(e){return n(this,void 0,void 0,function*(){for(;e>0;)try{return this.cache=yield caches.open(this.cacheName),yield this.clearAllCache(),this.cacheInitialized=!0,void this.checkCacheSize()}
1catch(t){--e>0&&(yield new Promise(e=>setTimeout(e,s.ONE_SECOND)))}})}checkCacheSize(){return n(this,void 0,void 0,function*(){if("storage"in navigator&&"estimate"in navigator.storage){let{usage:e,quota:t}=yield navigator.storage.estimate();if(e&&t&&e/1048576>this.sizeLimit){let e="",t=new Date;this.cacheList.forEach((i,n)=>{i<t&&(t=i,e=n)}),this.deleteCacheVideoByUrl(e)}}})}isVideoDownloading(e){return this.downloadControllers.has(e)}isInitialized(){return this.cacheInitialized}fetchAndCache(e){return n(this,void 0,void 0,function*(){if(this.cacheInitialized&&this.cache)try{let{abort:t,ready:i,signal:o}=yield function(e,t){return n(this,void 0,void 0,function*(){let i=new AbortController,n=i.signal;try{return{abort:()=>i.abort(),ready:yield fetch(e,Object.assign(Object.assign({},t),{signal:n})),signal:n}}catch(e){throw e}})}(e,{mode:"no-cors",priority:"high"});this.downloadControllers.set(e,{abort:t,ready:i,signal:o});let s=yield i;if(o.aborted)return s;let a=s.clone();return yield this.cacheResponse(e,a),a}catch(e){}finally{this.downloadControllers.delete(e)}})}cacheResponse(e,t){return n(this,void 0,void 0,function*(){if(this.cache)try{this.cacheList.set(e,new Date),yield this.cache.put(e,t)}catch(e){}finally{this.checkCacheSize()}})}addCacheVideoByUrl(e){return n(this,void 0,void 0,function*(){if(this.cacheInitialized&&this.cache)try{return(yield this.cache.match(e))||(yield this.fetchAndCache(e))}catch(e){return}})}isVideoCached(e){return n(this,void 0,void 0,function*(){if(!this.cacheInitialized||!this.cache)return!1;try{return!!(yield this.cache.match(e))}catch(e){return!1}})}abortDownload(e){return n(this,void 0,void 0,function*(){let t=this.downloadControllers.get(e);t&&(t.abort(),this.downloadControllers.delete(e))})}deleteCacheVideoByUrl(e){return n(this,void 0,void 0,function*(){return!!this.cache&&(yield this.cache.delete(e).then(()=>!0).catch(e=>!1))})}clearAllCache(){return n(this,void 0,void 0,function*(){if(this.cache)try{let e=(yield this.cache.keys()).map(e=>
1this.deleteCacheVideoByUrl(e.url));yield Promise.all(e)}catch(e){}})}downloadAndCacheVideo(e){return n(this,void 0,void 0,function*(){this.cacheInitialized&&this.cache&&(this.downloadControllers.has(e)||(yield this.addCacheVideoByUrl(e)))})}deleteVideoFromCache(e){return n(this,void 0,void 0,function*(){this.cacheInitialized&&this.cache&&(this.abortDownload(e),(yield this.isVideoCached(e))&&(yield this.deleteCacheVideoByUrl(e)))})}}t.VideoCacheService=a.getInstance()},7471:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetClosedCaptionsModal=void 0;let o=i(4403),s=i(5785),a=i(6450),r=i(8921),l=i(277),d=i(4906),h=i(9266);class u extends o.BaseWidget{constructor(e,t){super(),this.data=e,this.contentType=t,this.closedCaptionsContainer=r.WidgetsFactory.create("blaze-div"),this.closedCaptionsMenu=r.WidgetsFactory.create("blaze-player-menu"),this.shadow=this.attachShadow({mode:"open"})}connectedCallback(){return n(this,void 0,void 0,function*(){this.boundLanguageChangeEvent=this.onLanguageChange.bind(this),this.boundOnMenuOpen=this.onMenuOpen.bind(this),this.boundOnMenuClose=this.onMenuClose.bind(this),this.boundOnMenuExpand=this.onMenuExpand.bind(this),this.boundOnMenuCollapse=this.onMenuCollapse.bind(this),this.setupEventListeners(),this.render()})}disconnectedCallback(){this.detachEventListeners()}setupEventListeners(){this.addEventListener(s.PLAYER_MENU_EVENTS.OPEN,this.boundOnMenuOpen),this.addEventListener(s.PLAYER_MENU_EVENTS.CLOSE,this.boundOnMenuClose),this.addEventListener(s.PLAYER_MENU_EVENTS.EXPAND,this.boundOnMenuExpand,!0),this.addEventListener(s.PLAYER_MENU_EVENTS.COLLAPSE,this.boundOnMenuCollapse,!0),h.SharedEventTarget.addEventListener(a.CLOSED_CAPTIONS_LANGUAGE_CHANGE,this.boundLanguageChangeEvent)}detachEventListeners(){this.removeEventListener(s.PLAYER_MENU_EVENTS.OPEN,this.boundOnMenuOpen),this.removeEventListener(s.PLAYER_MENU_EVENTS.CLOSE,this.boundOnMenuClose),this.removeEventListener(s.PLAYER_MENU_EVENTS.EXPAND,this.boundOnMenuExpand),this.removeEventListener(s.PLAYER_MENU_EVENTS.COLLAPSE,this.boundOnMenuCollapse),h.SharedEventTarget.removeEventListener(a.CLOSED_CAPTIONS_LANGUAGE_CHANGE,this.boundLanguageChangeEvent)}onLanguageChange(){this.closedCaptionsContainer.innerHTML="",this.fillContainerWithOptions()}onMenuOpen(){var e;null===(e=this.onOpen)||void 0===e||e.call(this)}onMenuClose(){var e;null===(e=this.onClose)||void 0===e||e.call(this),(0,h.mergeStyles)(this.closedCaptionsContainer,{height:"fit-content",maxHeight:3*(o.deviceDetector.isMobile?74:56)+"px"})}onMenuExpand(){(0,h.mergeStyles)(this.closedCaptionsContainer,{maxHeight:"initial"})}onMenuCollapse(){(0,h.mergeStyles)(this.closedCaptionsContainer,{height:"fit-content",maxHeight:3*(o.deviceDetector.isMobile?74:56)+"px"})}open(){this.isOpen()||this.closedCaptionsMenu.open()}close(){this.isOpen()&&this.closedCaptionsMenu.close()}isOpen(){return!0===this.closedCaptionsMenu.getAttribute(s.PLAYER_MENU_ATTRIBUTES.OPEN)}reloadData(e){this.data=e,this.closedCaptionsContainer.innerHTML="",this.fillContainerWithOptions()}handleCcOptionClick(e,t,i){var n,o;if(this.closedCaptionsContainer.querySelectorAll(".selected").forEach(e=>{e.classList.remove("selected")}),t.classList.add("selected"),i){let e=JSON.parse(localStorage.getItem(a.LOCAL_STORAGE_KEY_RECENT_LANGUAGES)||"[]"),t=e.findIndex(e=>e===i.code);-1!==t&&e.splice(t,1),e.unshift(i.code),localStorage.setItem(a.LOCAL_STORAGE_KEY_RECENT_LANGUAGES,JSON.stringify(e.slice(0,1))),localStorage.setItem(a.LOCAL_STORAGE_KEY_LAST_SELECTED,i.code||"null")}else localStorage.removeItem(a.LOCAL_STORAGE_KEY_LAST_SELECTED);h.SharedEventTarget.dispatchEvent(new CustomEvent(a.CLOSED_CAPTIONS_LANGUAGE_CHANGE,{detail:{language:null==i?void 0:i.code},bubbles:!0,composed:!0})),i?null===(n=this.onClosedCaptionsEnable)||void 0===n||n.call(this,i.code):null===(o=this.onClosedCaptionsDisable)||void 0===o||o.call(this),this.close()}buildCcOption(e,t){let i=r.WidgetsFactory.create("blaze-div"),n=r.WidgetsFactory.create("blaze-div"),s=r.WidgetsFactory.create("blaze-div"),a=r.WidgetsFactory.create("blaze-image"),h=r.Wi
1dgetsFactory.create("blaze-div"),u=(null==e?void 0:e.name)||"Off";if(i.setAttribute("role","menuitemradio"),i.setAttribute("aria-checked",(null==t?void 0:t.isSelected)?"true":"false"),i.setAttribute("aria-label",(null==t?void 0:t.isNotAvailable)?u+", not available":u),(null==t?void 0:t.isNotAvailable)?i.setAttribute("aria-disabled","true"):i.setAttribute("tabindex","0"),n.setStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"8px",flex:"1",overflow:"hidden"}),e&&"null"!==e.code){let t=r.WidgetsFactory.create("blaze-div");t.classList.add("country-code"),t.setStyle({backgroundColor:"#bababa",borderRadius:"2px",fontFamily:d.Presets.playerFont,fontSize:o.TextScaleService.scaleFontSize("10px"),fontWeight:"900",color:"#333333",lettersSpacing:"1px",display:"flex",alignItems:"center",justifyContent:"center",height:"16px",width:"23px"}),t.innerText=e.code.toUpperCase(),n.append(t)}if(n.append(h),s.setStyle({display:"flex",flexDirection:"row",alignItems:"center",gap:"16px",flexShrink:"0"}),null==t?void 0:t.isNotAvailable){let e=r.WidgetsFactory.create("blaze-typography");e.innerText="Not available",i.classList.add("not-available"),s.append(e)}return s.append(a),a.classList.add("check-mark"),a.load(l.checkMarkSvg),h.setStyle({whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",flex:"1"}),h.innerText=u,i.classList.add("cc-option"),(null==t?void 0:t.isSelected)&&i.classList.add("selected"),i.setStyle({display:"flex",flexDirection:"row",justifyContent:"space-between",height:(o.deviceDetector.isMobile?74:56)+"px",padding:"0 16px",gap:"18px",alignItems:"center",color:d.Colors.White,flexShrink:"0",flexGrow:"0",borderTop:(null==t?void 0:t.isFirstRecentlySelected)?"1px solid #404040":"none",borderBottom:(null==t?void 0:t.isLastRecentlySelected)?"1px solid #404040":"none",cursor:(null==t?void 0:t.isNotAvailable)?"not-allowed":"pointer",outline:"none"}),i.append(n),i.append(s),(null==t?void 0:t.isNotAvailable)||(i.onclick=t=>this.handleCcOptionClick(t,i,e),i.onkeydown=t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.handleCcOptionClick(t,i,e))}),i}fillContainerWithOptions(){let e=localStorage.getItem(a.LOCAL_STORAGE_KEY_LAST_SELECTED),t=JSON.parse(localStorage.getItem(a.LOCAL_STORAGE_KEY_RECENT_LANGUAGES)||"[]"),i=a.CcSupportedLanguages.filter(e=>{var i;return(null===(i=this.data)||void 0===i?void 0:i.find(t=>""+t.language===e.code))&&!t.find(t=>t===e.code)}),n=t.map(e=>a.CcSupportedLanguages.find(t=>t.code===e));this.closedCaptionsContainer.innerHTML="",this.closedCaptionsContainer.append(this.buildCcOption(null,{isSelected:!e})),n.forEach((t,o)=>{var s;let a={isFirstRecentlySelected:0===o,isLastRecentlySelected:o===n.length-1&&!!i.length,isNotAvailable:!(null===(s=this.data)||void 0===s?void 0:s.find(e=>""+e.language===t.code)),isSelected:e===t.code},r=this.buildCcOption(t,a);this.closedCaptionsContainer.append(r)}),i.forEach(e=>{let t=this.buildCcOption(e);this.closedCaptionsContainer.append(t)}),this.closedCaptionsContainer.setStyle({height:"fit-content"})}render(){let e=document.createElement("style");e.textContent="\n .cc-option .check-mark {\n display: none;\n }\n\n .cc-option.selected {\n font-weight: 700;\n }\n\n .cc-option.not-available {\n color: #5d5d5d !important;\n } \n\n .cc-option.not-available .country-code {\n background-color: #5d5d5d !important;\n } \n\n .cc-option.selected .check-mark {\n display: block;\n }\n\n .cc-option:focus-visible {\n outline: 2px solid #007AFF;\n outline-offset: -2px;\n background-color: rgba(255, 255, 255, 0.1);\n }\n\n .cc-option:hover:not(.not-available) {\n background-color: rgba(255, 255, 255, 0.05);\n }\n ",this.shadow.append(e),this.shadow.append(this.closedCaptionsMenu),this.closedCaptionsContainer.setAttribute("role","menu"),this.closedCaptionsContainer.setAttribute("aria-label","Closed captions language options"),this.closedCaptionsContainer.setStyle({display:"flex",overflowY:"scroll",flexDirection:"column",fontSize:".875rem",fontFamily:d.Presets.playerFont,color:"#000",maxHeight:3*(o.deviceDetector.isMobile?74:56)+"px"}),this.fillContainerWithOptions(),this.closedCaptionsMenu.init({title:"Closed captions",component:this.closedCaptionsContainer}),"video"===this.contentType&&o.deviceDetector.isDesktop&&(0,h.mergeStyles)(this.closedCaptionsMenu.menuContainer,{width:"320px",top:"auto",bottom:"80px",margin:"initial",right:"1rem",left:"initial",transform:"none"})}}t.BlazeWidgetClosedCaptionsModal=u},7497:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0})},7525:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MomentModalTemplate=void 0;let n=i(5417),o=i(9965),s=i(4545),a=i(9126);class r extends n.BaseModalTemplate{createModal(e,t,i){let n=new a.BlazeWidgetMomentModal(e,t,i);return n.id="blaze-moment-modal-"+Math.random().toString(36),n.playerLayout=t,n}configureModal(e,t){var i;e.setModalContent(t,0,void 0),e.seek(null!==(i=t[0].id)&&void 0!==i?i:"")}getService(){return s.MomentService}getErrorCode(){return o.ErrorCode.FailedLoadingMoments}}t.MomentModalTemplate=r},7534:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.thumbnailMapping=function(e){return i[e]};let i={SQUARE_ICON:"SquareIcon",VERTICAL_TWO_BY_THREE:"VerticalTwoByThree",GIF:"Gif",ANIMATED_THUMBNAIL_POSTER:"AnimatedThumbnailPoster",CUSTOM:"MainThumbnail"}},7705:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpStatus=void 0,t.HttpStatus={Ok:200,Created:201,NoContent:204,BadRequest:400,Unauthorized:401,Forbidden:403,NotFound:404,InternalServerError:500}},7708:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.AppConfigurationService=void 0;let o=i(4545),s=i(4403),a=i(9965),r=i(9266);class l extends(0,s.Singleton)(){constructor(){super(),this._refetchInterval=null}get appConfigurations(){return this._appConfigurations}init(e){return n(this,void 0,void 0,function*(){var t,i,n,s,l;if(e.staticContent||e.staticContentType)return;let d=3,h=!1;for(;d>0&&!h;)try{let a=yield o.ApiService.getAppConfigurations();if(a.error){if((null===(t=a.error.message)||void 0===t?void 0:t.includes("JSON"))||(null===(i=a.error.message)||void 0===i?void 0:i.includes("parse")))break;d--;let e=500*(3-d);yield(0,r.delay)(e);continue}h=!0,this._appConfigurations=a.data,o.ApiService.initializeAnalyticsUrlRotator(null===(n=this._appConfigurations)||void 0===n?void 0:n.analyticsLoadBalancerConfiguration),(null===(s=this._appConfigurations)||void 0===s?void 0:s.sdkLoggerConfigurations)&&o.LoggerService.updateConfiguration(this._appConfigurations.sdkLoggerConfigurations),(null===(l=this._appConfigurations)||void 0===l?void 0:l.configurations.configRefetchIntervalInMinutes)&&this.setupRefetchInterval(e)}catch(e){if(--d>0){let e=500*(3-d);yield(0,r.delay)(e)}}h||o.EventService.dispatch(document.body,a.Delegation.onErrorThrown,{errorCode:a.ErrorCode.FailedLoadingAppConfigurations})})}setupRefetchInterval(e){this.clearRefetchInterval();let t=this._appConfigurations.configurations;if(!t.configRefetchIntervalInMinutes)return;let i=60*t.configRefetchIntervalInMinutes*1e3;this._refetchInterval=setInterval(()=>n(this,void 0,void 0,function*(){navigator.onLine&&(yield this.init(e))}),i)}clearRefetchInterval(){this._refetchInterval&&(clearInterval(this._refetchInterval),this._refetchInterval=null)}destroy(){this.clearRefetchInterval()}}t.AppConfigurationService=l.getInstance()},7784:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=function(e,t){let i=null;function n(...o){i&&clearTimeout(i),i=setTimeout(()=>{e(...o)},t)}return n.cancel=()=>{i&&(clearTimeout(i),i=null)},n}},7787:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7792:(e,t)=>{"use strict";var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.PlayStatus=void 0,(n=i||(t.PlayStatus=i={})).Success="SUCCESS",n.Failed="FAILED"},7924:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})}
1,o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AnalyticsService=void 0;let s=i(7232),a=i(4545),r=o(i(8330)),l=i(4403),d=i(6450),h=i(356),u=i(611),c=i(9266);class p extends(0,l.Singleton)(){constructor(){super(...arguments),this.events=[],this.eventSessionCounter=1,this.mightBeABot=!1}init(){return n(this,void 0,void 0,function*(){let e=new s.UAParser(navigator.userAgent);this.uaParsed=e.getResult(),this.mightBeABot=(0,c.isBot)(),a.ConfigService.sendAnalytics&&setInterval(()=>{this.sendAnalyticsData()},d.ONE_SECOND)})}sendAnalyticsData(){return n(this,void 0,void 0,function*(){if(a.UserService.userId){if(a.UserService.sessionId&&this.events.length)try{let e=this.events.map(e=>{var t,i,n,o,s;return e.user.generated_user_id=a.ConfigService.doNotTrack?"do_not_track":a.UserService.userId,e.user.external_user_id=null!==(t=a.ConfigService.externalUserId)&&void 0!==t?t:"",e.user.ab_test_id=null!==(n=null===(i=a.UserService.abTest)||void 0===i?void 0:i.id)&&void 0!==n?n:"",e.user.ab_test_variant=null!==(s=null===(o=a.UserService.abTest)||void 0===o?void 0:o.variant)&&void 0!==s?s:"",e.session_id=a.UserService.sessionId,e.widget&&(e.widget.page_view_id=a.UserService.sessionId),e});this.events=[],yield this.bulkEvent(e)}catch(e){}}else a.UserService.assignUserId()})}bulkEvent(e){return n(this,void 0,void 0,function*(){return e.forEach(e=>{var t;let i=null!==(t=e.event_action)&&void 0!==t?t:"Unknown Action",n=!1;["cta_click","audio","cc_off","cc_on","share_click","share_success","playback_pause","playback_play"].includes(i)&&("moment"===e.event_category&&e.moment?(i="$"+i,n=!0):"video"===e.event_category&&e.video&&(i="#"+i,n=!0));let o=d.exposedFieldsByAction[i];n&&(i=i.substring(1));let s={},r=(0,h.flattenObject)(e);if(o)for(let e of o)r.hasOwnProperty(e)&&(s[e]=r[e]);a.EventService.dispatchAnaltyicsEvents(i,s)}),a.ConfigService.disableAnalytics?Promise.resolve():a.ApiService.sendAnaltyicsEvents(e)})}pushStoryEvent(e,t,i,n){this.events.push(this.setupEvent(l.Category.Story,e.toString(),t,i,n))}pushMomentEvent(e,t,i,n){this.events.push(this.setupEvent(l.Category.Moment,e.toString(),t,i,n))}pushVideoEvent(e,t,i,n){this.events.push(this.setupEvent(l.Category.Video,e.toString(),t,i,n))}pushAdEvent(e,t,i,n){this.events.push(this.setupEvent(l.Category.Ad,e.toString(),t,i,n))}pushConsentEvent(e,i){t.AnalyticsService.events.push(t.AnalyticsService.setupEvent(l.Category.Consent,e.toString(),i,void 0,void 0))}pushImaAdEvent(e,t,i,n){this.events.push(this.setupEvent(l.Category.Ad,e.toString(),t,i,n))}pushInteractionEvent(e,t,i,n){this.events.push(this.setupEvent(l.Category.Interaction,e.toString(),t,i,n))}pushWidgetEvent(e,t,i,n){this.events.push(this.setupEvent(l.Category.Widget,e.toString(),t,i,n))}setupEvent(e,t,i,n,o){var s,d,c,p,g,v,y,m,b,f,S,E,C,T;let A=new l.AnalyticsEvent;if(A[e]=i,A.api_scheme_version="2",A.sdk_event_session_counter=this.eventSessionCounter++,A.sdk_event_id=(0,u.v4)(),A.timestamp_utc=(0,h.formatUTCDate)(new Date),A.timestamp_user_tz=(0,h.formatDate)(new Date),A.sdk_type="web",A.sdk_version=r.default.version,A.sdk_id="web",A.event_action=t,A.user.locale=null==navigator?void 0:navigator.language,A.tech.user_agent=null==navigator?void 0:navigator.userAgent,A.tech.localization_setting=a.ConfigService.preferredLanguage||"",A.session_id=a.UserService.sessionId,A.page.page_url=null==location?void 0:location.href,this.uaParsed){A.tech.browser=null===(s=this.uaParsed.browser)||void 0===s?void 0:s.name,A.tech.browser_version=null===(d=this.uaParsed.browser)||void 0===d?void 0:d.version,A.tech.os=null===(c=this.uaParsed.os)||void 0===c?void 0:c.name,A.tech.os_version=null===(p=this.uaParsed.os)||void 0===p?void 0:p.version,A.tech.device_model=null===(g=this.uaParsed.device)||void 0===g?void 0:g.model,A.tech.device_brand=null===(v=this.uaParsed.device)||void 0===v?void 0:v.vendor;let e={mobile:"Phone",tablet:"Tablet",undefined:"Desktop"}[null===(y=this.uaParsed.device)||void 0===y?void 0:y.type]||(null===(m=this.uaParsed.device)||void 0===m?void 0:m.type);A.tech.device_type=e}A.tech.screen_resolution=(null===(b=null==window?void 0:window.screen)||void 0===b?void 0:b.availWidth)+"x"+(null===(f=null==window?void 0:window.screen)||void 0===f?void 0:f.availHeight),A.tech.screen_color=null===(E=null===(S=null==window?void 0:window.screen)||void 0===S?void 0:S.colorDepth)||void 0===E?void 0:E.toString();let I=(null==window?void 0:window.innerWidth)||document.documentElement.clientWidth||document.body.clientWidth,M=(null==window?void 0:window.innerHeight)||document.documentElement.clientHeight||document.body.clientHeight;if(A.tech.browser_size=I+"x"+M,(null===(C=navigator.connection)||void 0===C?void 0:C.effectiveType)&&(A.tech.connection_type=null===(T=navigator.connection)||void 0===T?void 0:T.effectiveType),A.tech.might_be_a_bot=this.mightBeABot,o&&(A.referring=o),n&&(A.event_label=n,A.referring.labels_expression=n),A.event_category=e.toString(),e==l.Category.Widget&&A.widget){A.widget.page_view_id=a.UserService.sessionId,A.widget.page_size=A.tech.browser_size;let e=null==window?void 0:window.location.href.indexOf("#blaze"),t=-1!==e?null==window?void 0:window.location.href.slice(0,e):null==window?void 0:window.location.href;A.widget.page_type=/^(https?:\/\/[^/]+\/?)$/i.test(t)?"Homepage":"Category/Article"}return A}}t.AnalyticsService=p.getInstance()},7951:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.contentAccessibilityManager=t.ContentAccessibilityManager=void 0;let n=i(7958),o=i(6994),s=i(8832);class a{constructor(e=n.DEFAULT_CONTENT_ACCESSIBILITY_CONFIG){this.config=e,this.contentStrategies=new Map,this.registeredWidgets=new Map,this.lastUserActionTime=new Map,this.userActionThrottleMs=300,this.initializeStrategies()}initializeStrategies(){this.contentStrategies.set("story",new s.StoryAccessibilityStrategy(this.config.buttonLabels.story)),this.contentStrategies.set("moment",new s.MomentAccessibilityStrategy(this.config.buttonLabels.moment))}registerContentWidget(e,t,i){let n=this.contentStrategies.get(i);if(!n)return;let o=Object.assign(Object.assign({},t),{contentType:i});this.registeredWidgets.set(e,o),n.setupAccessibility(e,t)}updateButtonLabels(e,t){let i=this.registeredWidgets.get(e);if(!i||!i.contentType)return;let n=Object.assign(Object.assign({},i.data),t),o=this.contentStrategies.get(i.contentType);o&&o.updateLabels(e,n)}getContentTypeLabel(e){switch(e){case"story":return"Story";case"story-pages":return"Story page";case"moment":return"Moment";default:return"Content"}}unregisterContentWidget(e){let t=this.registeredWidgets.get(e);if(!t||!t.contentType)return;let i=this.contentStrategies.get(t.contentType);i&&i.cleanup(e),this.registeredWidgets.delete(e)}announceUserAction(e,t,i){if("user"!==i.trigger)return;let n=e+"-"+t,s=Date.now();if(s-(this.lastUserActionTime.get(n)||0)<this.userActionThrottleMs)return;this.lastUserActionTime.set(n,s);let a=this.getContentTypeLabel(e);o.accessibilityManager.announce({message:a+" "+t,priority:"assertive",category:"status"})}announceModalOpening(e,t){let i=this.getContentTypeLabel(e)+" player opened";t.title&&(i+=": "+t.title),t.pagePosition&&t.totalPages&&(i+=", page "+t.pagePosition+" of "+t.totalPages);let n=[];t.isPlaying&&n.push("playing"),t.isMuted&&n.push("muted"),t.hasClosedCaptions&&n.push("captions available"),n.length>0&&(i+=", "+n.join(" and ")),o.accessibilityManager.announce({message:i,priority:"assertive",category:"navigation"})}announceNavigation(e,t,i,n,s){if(!("number"==typeof e&&"number"==typeof t&&e>0&&t>0&&e<=t))return;let a=this.generateMeaningfulAnnouncement(e,t,i,n,s);o.accessibilityManager.clearAnnouncementQueue(),o.accessibilityManager.announce({message:a,priority:"assertive",category:"navigation"})}generateMeaningfulAnnouncement(e,t,i,n,o){return"story-page"===i||i.includes("page")?this.buildPageNavigationAnnouncement(e,t,n,o):"story-list"===i||i.includes("story")?this.buildStoryNavigationAnnouncement(e,t,n,o):"moment-list"===i||i.includes("moment")?this.buildMomentNavigationAnnouncement(e,t,n,o):this.buildGenericNavigationAnnouncement(e,t,i,n)}buildPageNavigationAnnouncement(e,t,i,n){let o=(null==n?void 0:n.navigationType)||"";if("Manual"===o){let o=e>((null==n?void 0:n.previousPosition)||0)?"Next page":"Previous page";return this.formatAnnouncementMessage(o,i,e,t,"page")}return"Automatic"===o?this.formatAnnouncementMessage("Continuing story",i,e,t,"page"):this.formatAnnouncementMessage("Page",i,e,t,"page",!0)}buildStoryNavigationAnnouncement(e,t,i,n){let o=(null==n?void 0:n.navigationType)||"";if("Manual"===o){let o=e>((null==n?void 0:n.previousPosition)||0)?"Next story":"Previous story";return this.formatAnnouncementMessage(o,i,e,t,"story")}return"Automatic"===o?this.formatAnnouncementMessage("New story",i,e,t,"story"):this.formatAnnouncementMessage("Story",i,e,t,"story",!0)}buildMomentNavigationAnnouncement(e,t,i,n){let o=(null==n?void 0:n.navigationType)||"";if("Manual"===o){let o=e>((null==n?void 0:n.previousPosition)||0)?"Next moment":"Previous moment";return this.formatAnnouncementMessage(o,i,e,t,"moment")}return"Automatic"===o?this.formatAnnouncementMessage("New moment",i,e,t,"moment"):this.formatAnnouncementMessage("Moment",i,e,t,"moment",!0)}buildGenericNavigationAnnouncement(e,t,i,n){let o=this.getContentTypeLabel(i);return this.formatAnnouncementMessage(o,n,e,t,o.toLowerCase(),!0)}formatAnnouncementMessage(e,t,i,n,o,s=!1){let a=o+" "+i+" of "+n;return s?t?e+" "+i+" of "+n+": "+t:e+" "+i+" of "+n:t?e+": "+t+", "+a:e+": "+a}
1cleanup(){this.registeredWidgets.forEach((e,t)=>{if(e.contentType){let i=this.contentStrategies.get(e.contentType);i&&i.cleanup(t)}}),this.registeredWidgets.clear(),this.lastUserActionTime.clear()}}t.ContentAccessibilityManager=a,t.contentAccessibilityManager=new a},7958:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CONTENT_ACCESSIBILITY_CONFIG=t.DEFAULT_ACCESSIBILITY_CONFIG=void 0,t.DEFAULT_ACCESSIBILITY_CONFIG={announcements:{delay:800,queueSize:10,enableAutoRetry:!0,retryDelay:500}},t.DEFAULT_CONTENT_ACCESSIBILITY_CONFIG={buttonLabels:{story:{play:"Play story",pause:"Pause story",mute:"Mute story",unmute:"Unmute story",share:"Share story",close:"Close story player",captions:"Toggle closed captions",cta:"Call to action",nextStoryPage:"Next page of stories",prevStoryPage:"Previous page of stories",nextStory:"Next story",prevStory:"Previous story"},moment:{play:"Play moment",pause:"Pause moment",mute:"Mute moment",unmute:"Unmute moment",like:"Like moment",unlike:"Unlike moment",share:"Share moment",close:"Close moment player",captions:"Toggle closed captions",cta:"Call to action",nextMoment:"Next moment",prevMoment:"Previous moment",follow:"Follow",unfollow:"Unfollow"}}}},8016:function(e,t){"use strict";var i=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.fetchPosterWithHighPriority=function(e){return i(this,arguments,void 0,function*(e,t=2e3){if(e)return new Promise(i=>{let n=new Image,o=!1,s=()=>{o||(o=!0,i())};n.onload=()=>{s()},n.onerror=()=>{s()},"fetchPriority"in n&&(n.fetchPriority="high"),n.src=e,setTimeout(()=>{s()},t)})})}},8046:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8048:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetMoment=void 0;let o=i(9126),s=i(4403),a=i(5785),r=i(6450),l=i(9965),d=i(8921),h=i(1590),u=i(4545),c=i(4906),p=i(9266),g=i(9381),v=i(356),y=i(2904),m=i(1046),b="(rgba(0, 0, 0, 0.8), transparent)",f="(top, transparent, transparent, transparent, rgba(0, 0, 0, 1))",S="linear-gradient(180deg, transparent, #000 0%, #000 95%, transparent 100%)";class E extends y.BlazeWidgetContent{constructor(e){super(),this.playerStyle=e,this.modal={},this.seekBar=d.WidgetsFactory.create("blaze-widget-moment-seek-bar"),this.data={},this.contentType="moment",this.momentIndex=0,this.loopNumber=0,this.isLiked=!1,this.actionHandlers=[],this.topContainer=d.WidgetsFactory.create("blaze-div"),this.bottomContainer=d.WidgetsFactory.create("blaze-div"),this.bottomContentContainer=d.WidgetsFactory.create("blaze-div"),this.buttonsContainer=d.WidgetsFactory.create("blaze-div"),this.bottomContainerCtaAndContent=d.WidgetsFactory.create("blaze-div"),this.bottomContainerCtaContentButtons=d.WidgetsFactory.create("blaze-div"),this.shadowBottomElement=d.WidgetsFactory.create("blaze-div"),this.shadowTopElement=d.WidgetsFactory.create("blaze-div"),this.topButtonsContainer=d.WidgetsFactory.create("blaze-div"),this.bottomButtonsContainer=d.WidgetsFactory.create("blaze-div"),this.likeWrapperElement=d.WidgetsFactory.create("blaze-div"),this.likeCountElement=d.WidgetsFactory.create("blaze-div"),this.closeButtonElement=d.WidgetsFactory.create("blaze-button"),this.muteButtonElement=d.WidgetsFactory.create("blaze-button"),this.likeButtonElement=d.WidgetsFactory.create("blaze-button"),this.shareButtonElement=d.WidgetsFactory.create("blaze-button"),this.playPauseButtonElement=d.WidgetsFactory.create("blaze-button"),this.closedCaptionButtonElement=d.WidgetsFactory.create("blaze-button"),this.customActionButtonOneElement=d.WidgetsFactory.create("blaze-button"),this.customActionButtonTwoElement=d.WidgetsFactory.create("blaze-button"),this.headBodyContainer=d.WidgetsFactory.create("blaze-div"),this.headElement=d.WidgetsFactory.create("blaze-div"),this.bodyElement=d.WidgetsFactory.create("blaze-div"),this.ctaButtonElement=new a.BlazeCtaButton,this.isInit=!1,this.isActive=!1,this.isMomentPausedByPlayPauseButton=!1,this.shouldShowImaAdOnStart=!1,this.elementsToHideOnImaAds=[],this.elementsToHideOnCustomAds=[]}setPlayerStyle(e){this.playerStyle=e}setActionHandlers(e){this.actionHandlers=e}connectedCallback(){this.isInit||(this.isInit=!0,this.style.outline="none",this.initializeElements(),this.initializeStyles(),this.setAttribute("tabindex","0"),this.setAttribute("aria-hidden","false"),this.append(this.container),this.boundOnBlurEvent=this.onBlur.bind(this),this.boundOnFocusEvent=this.onFocus.bind(this),this.boundOnVisibilityChangeEvent=this.onVisibilityChange.bind(this),this.boundOnCtaCl
1icked=this.onCtaClick.bind(this),this.boundOnLanguageChangeEvent=this.onLanguageChange.bind(this),this.ctaButtonElement.addEventListener("click",e=>this.boundOnCtaClicked(e)),super.connectedCallback(),this.render())}disconnectedCallback(){this.listeners.removeAll(),this.ctaButtonElement.removeEventListener("click",this.boundOnCtaClicked),this.data.id&&s.contentAccessibilityManager.unregisterContentWidget(this.data.id),super.disconnectedCallback()}setTheme(e){this.playerStyle=e,this.render()}initializeStyles(){this.playerStyle&&(this.styleMainContainer(),this.styleShadowElements(),this.styleButtonsContainer(),this.styleTopContainer(),this.styleBottomContainer(),this.styleBottomContentContainer(),this.styleHeadBodyContainer())}styleMainContainer(){(0,v.mergeStyles)(this,{display:"grid",width:"auto",height:"100%",aspectRatio:r.ASPECT_RATIO_9_16.toString(),margin:"auto",maxHeight:"100%",background:c.Colors.Black}),(0,v.mergeStyles)(this.container,{position:"relative",width:"100%",height:"100%"})}styleBottomContentContainer(){this.bottomContentContainer.setStyle({display:"flex",justifyContent:"space-between",height:"100%",alignItems:"flex-end",gap:"16px"})}styleShadowElements(){this.styleShadowTopElement(),this.styleShadowBottomElement()}styleShadowTopElement(){this.shadowTopElement.setStyle({background:"linear-gradient"+b,position:"absolute",width:"100%",height:"100px",top:"0px",borderRadius:"mobile"===s.deviceDetector.platform?"0px":"20px",right:"0",left:"0"}),this.shadowTopElement.style.background="linear-gradient"+b,this.shadowTopElement.style.background="-webkit-linear-gradient"+b}styleShadowBottomElement(){this.shadowBottomElement.setStyle({background:"linear-gradient"+f,position:"absolute",width:"100%",height:"75%",bottom:"0px",borderRadius:"mobile"===s.deviceDetector.platform?"0px":"20px",right:"0",left:"0"}),this.shadowBottomElement.style.background="linear-gradient"+f,this.shadowBottomElement.style.background="-webkit-linear-gradient"+f}styleButtonsContainer(){this.topButtonsContainer.setStyle({display:"inline-flex",gap:"10px",position:"relative",flexDirection:"column",zIndex:"4",visibility:"visible",margin:"5px 5px 0px 0px",float:"right"});let e="desktop"===s.deviceDetector.platform;this.bottomButtonsContainer.setStyle({display:"flex",gap:e?"32px":"16px",position:e?"absolute":"unset",bottom:e?"0px":"unset",right:e?"-80px":"unset",flexDirection:"column",alignItems:"center",width:"fit-content"})}styleTopContainer(){this.topContainer.setStyle({position:"absolute",top:"40px",width:"100%",paddingLeft:"16px",paddingRight:"16px",display:"flex",justifyContent:"space-between",boxSizing:"border-box",columnGap:"10px"})}styleBottomContainer(){this.bottomContainer.setStyle({position:"absolute",bottom:"0px",left:"0px",width:"100%",display:"flex",flexDirection:"column-reverse",gap:"8px",boxSizing:"border-box",zIndex:"4"})}styleHeadBodyContainer(){this.headBodyContainer.setStyle({display:"flex",flexDirection:"column",gap:"0.5rem",width:"100%"})}styleContent(e,t,i){let n,o;if(this.playerStyle){if("HEADING_CONTENT"===i?n=c.Presets.DefaultMomentStyle.headingText:"BODY_CONTENT"===i&&(n=c.Presets.DefaultMomentStyle.bodyText),!n||!t)throw Error("Default Text style and custom style not found");switch(s.deviceDetector.platform){case"desktop":o=t.textSizeDesktop||n.textSizeDesktop;break;case"tablet":o=t.textSizeTablet||n.textSizeTablet;break;default:o=t.textSizeMobile||n.textSizeMobile}e.setStyle({display:t.isVisible?"-webkit-box":"none",fontSize:s.TextScaleService.scaleFontSize(o),fontFamily:t.font,fontWeight:t.fontWeight,color:t.textColor||n.textColor,textTransform:t.textTransform,lineHeight:s.TextScaleService.scaleLineHeight(t.lineHeight),overflow:"hidden",textOverflow:"ellipsis",WebkitBoxOrient:"vertical",WebkitLineClamp:"2",lineClamp:"2",boxOrient:"vertical",width:"desktop"===s.deviceDetector.platform?"75%":"100%"})}}applyLikeStyle(){var e,t,i,n,o,a,r,l,d,h,u,p,g,v,y,m,b,f,S,E,C,T;let A,I,M,w,_;if(!this.playerStyle)return;switch(this.likeWrapperElement.setStyle({fontFamily:this.playerStyle.likeText.font,display:"flex",flexDirection:"column",alignItems:"center",gap:"6px"}),"desktop"===s.deviceDetector.platform&&this.likeButtonElement.classList.add("desktop-button"),s.deviceDetector.platform){case"de
1sktop":A=null===(e=this.playerStyle)||void 0===e?void 0:e.buttons.like_unlike.desktop.padding,I=null===(t=this.playerStyle)||void 0===t?void 0:t.buttons.like_unlike.desktop.borderRadius,M=null===(i=this.playerStyle)||void 0===i?void 0:i.buttons.like_unlike.desktop.backgroundColor,w=null===(n=this.playerStyle)||void 0===n?void 0:n.likeText.font,_=null===(o=this.playerStyle)||void 0===o?void 0:o.likeText.textSizeDesktop;break;case"tablet":A=null===(a=this.playerStyle)||void 0===a?void 0:a.buttons.like_unlike.tablet.padding,I=null===(r=this.playerStyle)||void 0===r?void 0:r.buttons.like_unlike.tablet.borderRadius,M=null===(l=this.playerStyle)||void 0===l?void 0:l.buttons.like_unlike.tablet.backgroundColor,w=null===(d=this.playerStyle)||void 0===d?void 0:d.likeText.font,_=null===(h=this.playerStyle)||void 0===h?void 0:h.likeText.textSizeTablet;break;case"mobile":A=null===(u=this.playerStyle)||void 0===u?void 0:u.buttons.like_unlike.mobile.padding,I=null===(p=this.playerStyle)||void 0===p?void 0:p.buttons.like_unlike.mobile.borderRadius,M=null===(g=this.playerStyle)||void 0===g?void 0:g.buttons.like_unlike.mobile.backgroundColor,w=null===(v=this.playerStyle)||void 0===v?void 0:v.likeText.font,_=null===(y=this.playerStyle)||void 0===y?void 0:y.likeText.textSizeMobile;break;default:A=null===(m=this.playerStyle)||void 0===m?void 0:m.buttons.like_unlike.mobile.padding,I=null===(b=this.playerStyle)||void 0===b?void 0:b.buttons.like_unlike.mobile.borderRadius,M=null===(f=this.playerStyle)||void 0===f?void 0:f.buttons.like_unlike.mobile.backgroundColor,w=null===(S=this.playerStyle)||void 0===S?void 0:S.likeText.font,_=null===(E=this.playerStyle)||void 0===E?void 0:E.likeText.textSizeMobile}this.likeButtonElement.setStyle({padding:null!=A?A:"10px",borderRadius:null!=I?I:"50%",backgroundColor:null!=M?M:"#18181899"});let P=null===(C=this.playerStyle)||void 0===C?void 0:C.likeText.textColor,L=null===(T=this.playerStyle)||void 0===T?void 0:T.likeText.fontWeight;this.likeCountElement.setStyle({fontSize:s.TextScaleService.scaleFontSize(null!=_?_:"14px"),color:null!=P?P:c.Colors.White,fontWeight:null!=L?L:"normal",fontFamily:null!=w?w:c.Presets.playerFont}),this.likeButtonElement.setIconUrl(this.isLiked?this.playerStyle.icons.like:this.playerStyle.icons.unlike)}applyShareStyle(){var e,t,i,n,o,a,r,l,d,h,u,c;let p,g,v,y;if(this.playerStyle){switch(s.deviceDetector.platform){case"desktop":p=null===(e=this.playerStyle)||void 0===e?void 0:e.buttons.share.desktop.padding,g=null===(t=this.playerStyle)||void 0===t?void 0:t.buttons.share.desktop.borderRadius,v=null===(i=this.playerStyle)||void 0===i?void 0:i.buttons.share.desktop.backgroundColor,y=null===(n=this.playerStyle)||void 0===n?void 0:n.buttons.share.desktop.color;break;case"tablet":p=null===(o=this.playerStyle)||void 0===o?void 0:o.buttons.share.tablet.padding,g=null===(a=this.playerStyle)||void 0===a?void 0:a.buttons.share.tablet.borderRadius,v=null===(r=this.playerStyle)||void 0===r?void 0:r.buttons.share.tablet.backgroundColor,y=null===(l=this.playerStyle)||void 0===l?void 0:l.buttons.share.tablet.color;break;case"mobile":p=null===(d=this.playerStyle)||void 0===d?void 0:d.buttons.share.mobile.padding,g=null===(h=this.playerStyle)||void 0===h?void 0:h.buttons.share.mobile.borderRadius,v=null===(u=this.playerStyle)||void 0===u?void 0:u.buttons.share.mobile.backgroundColor,y=null===(c=this.playerStyle)||void 0===c?void 0:c.buttons.share.mobile.color}this.shareButtonElement.setStyle({padding:null!=p?p:"10px",borderRadius:null!=g?g:"50%",backgroundColor:null!=v?v:"#18181899"}),y&&this.shareButtonElement.setAttribute("icon-color",y),"desktop"===s.deviceDetector.platform&&this.shareButtonElement.classList.add("desktop-button"),this.shareButtonElement.setIconUrl(this.playerStyle.icons.share)}}applyCtaButtonStyles(){var e;if(!(null===(e=this.playerStyle)||void 0===e?void 0:e.ctaButton))throw Error("CTA button style not found");let{ctaButton:t,contentBoxHorizontalSpacing:i}=this.playerStyle;if(!1===t.isVisible)return this.ctaButtonElement.setAttribute("hidden-btn","true"),void this.bottomContainer.setStyle({justifyContent:"center"});this.setAnchorButtonStyles(t),this.setIconAttributes(t),this.setLayoutPositioning(t),this.setCtaButtonAlignment(t),this.setLayoutSpacing(t,i)}setAnchorButtonStyles(e){this.ctaButtonElement.setAnchorButtonStyles({fontFamily:e.font,fontWeight:e.fontWeight,borderRadius:e.borderRadius,fontSize:s.TextScaleService.scaleFontSize(e.textSize)})}setIconAttributes(e){e.icon.isVisible?(this.ctaButtonElement.setCtaIconStyles({padding:"5px"}),this.ctaButtonElement.setAttribute("icon-color",e.icon.color),this.ctaButtonElement.setAttribute("icon-url",e.icon.url),this.ctaButtonElement.setAttribute("icon-size",e.icon.size),this.ctaButtonElement.setCtaIconStyles({padding:"5px"}),this.ctaButtonElement.setAttribute("display-icon","true")):this.ctaButtonElement.setAttribute("display-icon","false")}setLayoutPositioning(e){var t,i,n;"CTA_NEXT_TO_BOTTOM_BUTTONS_BOX"===e.layoutPositioning?(this.bottomContainerCtaAndContent.setStyle({display:"flex",flexDirection:"column",height:"100%",gap:"16px",alignSelf:"end",flex:"1"}),this.bottomContainerCtaContentButtons.setStyle({display:"flex",gap:"16px",justifyContent:"space-between",margin:"0px "+(null===(t=this.playerStyle)||void 0===t?void 0:t.contentBoxHorizontalSpacing)}),this.ctaButtonElement.style.padding="0px "+(null===(i=this.playerStyle)||void 0===i?void 0:i.contentBoxHorizontalSpacing)):"CTA_BELLOW_BOTTOM_BUTTONS_BOX"===e.layoutPositioning&&(this.bottomContentContainer.style.margin="0px "+(null===(n=this.playerStyle)||void 0===n?void 0:n.contentBoxHorizontalSpacing))}setCtaButtonAlignment(e){this.ctaButtonElement.setStyle({height:e.height,alignSelf:{START:"flex-start",CENT
1ER:"center",FULL_AVAILABLE_WIDTH:"center",END:"flex-end"}[e.horizontalAlignment]}),this.ctaButtonElement.setCtaTextStyle({width:"100%"})}setLayoutSpacing(e,t){let i="FULL_AVAILABLE_WIDTH"===e.horizontalAlignment,n="mobile"===s.deviceDetector.platform?"50%":"33.4%";if("CTA_NEXT_TO_BOTTOM_BUTTONS_BOX"===e.layoutPositioning)this.ctaButtonElement.style.width=i?"100%":n,this.ctaButtonElement.style.padding="0";else if("CTA_BELLOW_BOTTOM_BUTTONS_BOX"===e.layoutPositioning){let e=i?"calc(100% - "+2*(0,v.convertCssUnitToNumber)(t)+"px)":n;this.ctaButtonElement.style.width=e,this.ctaButtonElement.style.margin="0px "+t}}initializeElements(){this.configureButtons(),this.configureContentBody(),this.configureShareModal(),this.appendButtonsContainer(),this.appendBottomContainer(),this.appendShadowElements(),this.handleMobileSpecificFeatures()}appendShadowElements(){this.container.append(this.shadowTopElement),this.container.append(this.shadowBottomElement),this.elementsToHideOnImaAds.push(this.shadowTopElement,this.shadowBottomElement),this.elementsToHideOnCustomAds.push(this.shadowTopElement,this.shadowBottomElement)}createButtonElement(e,t){let{testId:i,iconUrl:n,width:o,height:s,color:a,padding:r,borderRadius:l,backgroundColor:d,onClick:h}=e;t.setIconUrl(n),t.setAttribute("height",o),t.setAttribute("width",s),t.setAttribute("data-testid",i),a&&t.setAttribute("icon-color",a),Object.entries({padding:r,borderRadius:l,backgroundColor:d,flexShrink:"0",flexGrow:"0"}).forEach(([e,i])=>{i&&t.setStyle({[e]:i})}),h&&t.addEventListener("click",h)}configureShareModal(){this.shareModal=d.WidgetsFactory.create("blaze-widget-share-modal"),this.shareModal.onClose=()=>{this.playPauseButtonElement.setStyle({display:"flex"}),this.resume()},this.shareModal.onOpen=()=>this.playPauseButtonElement.setStyle({display:"none"}),this.container.append(this.shareModal)}configureClosedCaptionsModal(){this.closedCaptionsModal=new o.BlazeWidgetClosedCaptionsModal(this.data.closedCaptions,"moment"),this.closedCaptionsModal.onClose=()=>{this.isPausedManually||(u.VideoPlayerService.isPlaying=!0,this.playPauseButtonElement.setIconUrl(""),this.resume())},this.closedCaptionsModal.onOpen=()=>{u.VideoPlayerService.isPlaying&&(u.VideoPlayerService.isPlaying=!1,this.playPauseButtonElement.setIconUrl(h.playResumeIconSvg),this.pause())},this.closedCaptionsModal.onClosedCaptionsEnable=e=>{this.toggleClosedCaptions(e)},this.closedCaptionsModal.onClosedCaptionsDisable=()=>{this.toggleClosedCaptions()},this.container.append(this.closedCaptionsModal)}configureButtons(){return n(this,void 0,void 0,function*(){var e,t,i,n,o;let a,d,h,c,g,v,y;if(!(null===(e=this.playerStyle)||void 0===e?void 0:e.buttons))return;let m=this.playerStyle.buttons,b=this.playerStyle.icons,f=null===(t=this.actionHandlers)||void 0===t?void 0:t.filter(e=>e.actionId===l.ActionHandlerId.AddCustomActionButton).slice(0,2);switch(s.deviceDetector.platform){case"mobile":default:a=m.mute_unmute.mobile,d=m.exit.mobile,h=m.share.mobile,c=m.like_unlike.mobile,g=m.closed_captions.mobile,v=m.custom_action_button_one.mobile,y=m.custom_action_button_two.mobile;break;case"tablet":a=m.mute_unmute.tablet,d=m.exit.tablet,h=m.share.tablet,c=m.like_unlike.tablet,g=m.closed_captions.tablet,v=m.custom_action_button_one.tablet,y=m.custom_action_button_two.tablet;break;case"desktop":a=m.mute_unmute.desktop,d=m.exit.desktop,h=m.share.desktop,c=m.like_unlike.desktop,g=m.closed_captions.desktop,v=m.custom_action_button_one.desktop,y=m.custom_action_button_two.desktop}let S=!!(f[0]&&b.customActionButtonOne&&v.isVisible),E=!!(f[1]&&b.customActionButtonTwo&&y.isVisible);if(S&&this.createButtonElement({testId:"custom-action-button-one",iconUrl:b.customActionButtonOne,onClick:e=>this.handleOnCustomActionButtonClick(e,f[0].options),width:v.width,height:v.height,color:v.color,padding:v.padding,borderRadius:v.borderRadius,backgroundColor:v.backgroundColor},this.customActionButtonOneElement),E&&this.createButtonElement({testId:"custom-action-button-two",iconUrl:b.customActionButtonTwo,onClick:e=>this.handleOnCustomActionButtonClick(e,f[1].options),width:y.width,height:y.height,color:y.color,padding:y.padding,borderRadius:y.borderRadius,backgroundColor:y.backgroundColor},this.customActionButtonTwoElement),d&&d.isVisible&&(this.createButtonElement({testId:"exit-button",iconUrl:b.exit,onClick:this.handleOnClose.bind(this),width:d.width,height:d.height,color:d.color,padding:d.padding,borderRadius:d.borderRadius,backgroundColor:d.backgroundColor},this.closeButtonElement),this.elementsToHideOnCustomAds.push(this.closeButtonElement)),a&&a.isVisible){let e=u.VideoPlayerService.isMuted?this.playerStyle.icons.mute:this.playerStyle.icons.unmute;this.createButtonElement({testId:"mute-unmute-button",iconUrl:e,onClick:this.handleOnMuteUnmuteToggle.bind(this),width:a.width,height:a.height,color:a.color,padding:a.padding,borderRadius:a.borderRadius,backgroundColor:a.backgroundColor},this.muteButtonElement),"desktop"===s.deviceDetector.platform&&this.muteButtonElement.classList.add("mute-unmute-button"),this.elementsToHideOnImaAds.push(this.topButtonsContainer)}if(this.playerStyle.topIconsButtonOrder.forEach((e,t)=>{switch(e){case"MUTE_UNMUTE":a.isVisible&&(this.muteButtonElement.style.order=t.toString(),this.topButtonsContainer.append(this.muteButtonElement));break;case"EXIT_PLAYER":(null==d?void 0:d.isVisible)&&(this.closeButtonElement.style.order=t.toString(),this.topButtonsContainer.append(this.closeButtonElement));break;case"CUSTOM_ACTION_BUTTON_ONE":S&&(this.customActionButtonOneElement.style.order=t.toString(),this.topButtonsContainer.append(this.customActionButtonOneElement));break;case"CUSTOM_ACTION_BUTTON_TWO":E&&(this.customActionButtonTwoElement.style.order=t.toString(),this.topButtonsContainer.append(this.customActionButtonTwoElement))}}),c&&c.isVisible){this.isLiked=yield u.LikeService.isMomentLiked(this.data.id);let e=this.isLiked?this.playerStyle.icons.like:this.playerStyle.icons.unlike;this.createButtonElement({testId:"like-unlike-button",iconUrl:e,onClick:this.handleOnLikeClick.bind(this),width:c.width,height:c.height,color:c.color,padding:c.padding,borderRadius:c.borderRadius,backgroundColor:c.backgroundColor}
1,this.likeButtonElement),p.AccessibilityUtils.setElementAccessibilityHidden(this.likeCountElement),this.likeWrapperElement.append(this.likeButtonElement,this.likeCountElement)}if(h&&h.isVisible&&this.createButtonElement({testId:"share-button",iconUrl:this.playerStyle.icons.share,onClick:this.handleOnShareClick.bind(this),width:h.width,height:h.height,color:h.color,padding:h.padding,borderRadius:h.borderRadius,backgroundColor:h.backgroundColor},this.shareButtonElement),g&&g.isVisible&&u.ConfigService.shouldAllowClosedCaptions){let e=null===(i=this.data.closedCaptions)||void 0===i?void 0:i.find(e=>""+e.language===localStorage.getItem(r.LOCAL_STORAGE_KEY_LAST_SELECTED));this.createButtonElement({testId:"closed-captions-button",iconUrl:e?this.playerStyle.icons.closedCaptionsOn:this.playerStyle.icons.closedCaptionsOff,onClick:this.handleOnClosedCaptionClick.bind(this),width:g.width,height:g.height,color:g.color,padding:g.padding,borderRadius:g.borderRadius,backgroundColor:g.backgroundColor},this.closedCaptionButtonElement),(null===(n=this.data.closedCaptions)||void 0===n?void 0:n.length)?this.closedCaptionButtonElement.setAttribute("disabled","false"):this.closedCaptionButtonElement.setAttribute("disabled","true"),this.configureClosedCaptionsModal(),"desktop"===s.deviceDetector.platform&&this.closedCaptionButtonElement.classList.add("desktop-button")}else null===(o=this.video)||void 0===o||o.setAttribute("is-captions-visible","false");this.playerStyle.bottomIconsButtonOrder.forEach((e,t)=>{switch(e){case"LIKE_UNLIKE":c.isVisible&&(this.likeWrapperElement.style.order=t.toString(),this.bottomButtonsContainer.append(this.likeWrapperElement));break;case"SHARE":h.isVisible&&(this.shareButtonElement.style.order=t.toString(),this.bottomButtonsContainer.append(this.shareButtonElement));break;case"CLOSED_CAPTIONS":g.isVisible&&(this.closedCaptionButtonElement.style.order=t.toString(),this.bottomButtonsContainer.append(this.closedCaptionButtonElement));break;case"CUSTOM_ACTION_BUTTON_ONE":S&&(this.customActionButtonOneElement.style.order=t.toString(),this.bottomButtonsContainer.append(this.customActionButtonOneElement));break;case"CUSTOM_ACTION_BUTTON_TWO":E&&(this.customActionButtonTwoElement.style.order=t.toString(),this.bottomButtonsContainer.append(this.customActionButtonTwoElement))}}),this.playerStyle.followButton.isVisible&&this.configureFollowButton()})}appendButtonsContainer(){this.container.append(this.topButtonsContainer)}handleMobileSpecificFeatures(){this.createPlayPauseButton()}configureFollowButton(){var e,t;let i=null===(e=this.actionHandlers)||void 0===e?void 0:e.find(e=>e.actionId===l.ActionHandlerId.AddFollowButton);if(!i)return;let n=i.options,o=(0,g.getFollowEntityByPriority)(null===(t=this.playerStyle)||void 0===t?void 0:t.followButton.followEntityTypePriority,this.data.followEntities);o&&(this.followButtonElement=new a.BlazeFollowButton(this.playerStyle),this.followButtonElement.setSource(this.data.id,"moment"),this.followButtonElement.setEntity(o.entityId,o.entityType),this.followButtonElement.setAvatar(o.storageFile.url),this.followButtonElement.onToggle=(e,t)=>{n.onClick&&n.onClick(e,t),this.handleFollowAnalytics(t),this.updateAccessibilityLabels()},this.bottomButtonsContainer.prepend(this.followButtonElement))}configureContentBody(){this.bodyElement.onclick=this.onContentClick.bind(this),this.bodyElement.onscroll=()=>{let e=this.bodyElement.scrollTop,t=this.bodyElement.scrollHeight,i=this.bodyElement.clientHeight;0===e?this.bodyElement.setStyle({maskImage:S}):e+i>=t?this.bodyElement.setStyle({maskImage:"linear-gradient(0deg, transparent, #000 0%, #000 90%, transparent 100%)"}):this.bodyElement.setStyle({maskImage:"linear-gradient(transparent, rgb(0, 0, 0) 5%, rgb(0, 0, 0) 95%, transparent 100%), linear-gradient(0deg, transparent, rgb(0, 0, 0) 5%, rgb(0, 0, 0) 95%, transparent 100%)"})}}appendBottomContainer(){this.headBodyContainer.append(this.headElement),this.headBodyContainer.append(this.bodyElement),this.bottomContentContainer.append(this.headBodyContainer),this.updateLayoutPositioning(),this.elementsToHideOnImaAds.push(this.bottomContainer),this.elementsToHideOnCustomAds.push(this.bottomContainer)}updateLayoutPositioning(){var e;switch(this.bottomContainer.innerHTML="",null===(e=this.playerStyle)||void 0===e?void 0:e.ctaButton.layoutPositioning){case"CTA_BELLOW_BOTTOM_BUTTONS_BOX":default:this.bottomContentContainer.append(this.bottomButtonsContainer),this.bottomContainer.append(this.seekBar),this.bottomContainer.append(this.ctaButtonElement),this.bottomContainer.append(this.bottomContentContainer);break;case"CTA_NEXT_TO_BOTTOM_BUTTONS_BOX":this.bottomContainerCtaAndContent.append(this.bottomContentContainer),this.bottomContainerCtaAndContent.append(this.ctaButtonElement),this.bottomContainerCtaContentButtons.append(this.bottomContainerCtaAndContent),this.bottomContainerCtaContentButtons.append(this.bottomButtonsContainer),this.bottomContainer.append(this.seekBar),this.bottomContainer.append(this.bottomContainerCtaContentButtons)}this.container.append(this.bottomContainer)}createPlayPauseButton(){this.playPauseButtonElement.setAttribute("height","55px"),this.playPauseButtonElement.setAttribute("width","55px"),this.playPauseButtonElement.setIconUrl(""),this.playPauseButtonElement.setStyle({display:"flex",position:"absolute",zIndex:"3",margin:"auto",width:"100%",height:"85%",top:"0"}),this.boundPlayPauseButtonClick=this.handlePlayPauseButtonClick.bind(this),this.playPauseButtonElement.addEventListener("click",this.boundPlayPauseButtonClick),this.elementsToHideOnImaAds.push(this.playPauseButtonElement),this.container.append(this.playPauseButtonElement)}handlePlayPauseButtonClick(){var e;if("Ad"===this.data.type)return;let t=null===(e=this.video)||void 0===e?void 0:e.paused;this.playPauseButtonElement.setIconUrl(t?"":h.playResumeIconSvg),this.isMomentPausedByPlayPauseButton=!t,this.playToggle(
1)}setModal(e){this.modal=e}onLanguageChange(e){var t,i,n,o;let s=(null===(t=this.data.closedCaptions)||void 0===t?void 0:t.find(t=>""+t.language===e.detail.language))?null===(i=this.playerStyle)||void 0===i?void 0:i.icons.closedCaptionsOn:null===(n=this.playerStyle)||void 0===n?void 0:n.icons.closedCaptionsOff;null===(o=this.closedCaptionButtonElement)||void 0===o||o.setIconUrl(s||"")}onVisibilityChange(){this.isActive&&this.isConnected&&(document.hidden||this.onFocus(),document.hidden&&this.onBlur())}onBlur(){var e;this.isActive&&this.isConnected&&this.video&&(document.hidden||"desktop"!==s.deviceDetector.platform||"visible"!==document.visibilityState)&&((null===(e=document.activeElement)||void 0===e?void 0:e.closest("iframe"))||(this.playPauseButtonElement.setIconUrl(h.playResumeIconSvg),this.video.paused||(this.resumeAfterfocus=!0,this.pause(),u.VideoPlayerService.isPlaying=!1,this.updatePlayerButtonIcons(),this.event(r.MomentAction.MomentsPlaylistExit,{}),this.event(r.MomentAction.MomentExit,{}))))}onFocus(){var e;if(!this.isActive||!this.isConnected||!this.video)return;let t="Ad"===(null===(e=this.video.data)||void 0===e?void 0:e.type);if((this.video.paused||t)&&this.resumeAfterfocus){this.resumeAfterfocus=!1;let e="iOS"===s.deviceDetector.OS,i="Mobile Safari"===s.deviceDetector.browser,n="tablet"===s.deviceDetector.platform&&"Mac OS"===s.deviceDetector.OS,o=e&&("Safari"===s.deviceDetector.browser||"Chrome"===s.deviceDetector.browser);if(!t&&(e||i||o||n))return void this.playPauseButtonElement.setIconUrl(h.playResumeIconSvg);this.resume(),u.VideoPlayerService.isPlaying=!0,this.updatePlayerButtonIcons()}}onContentClick(){"2"===this.bodyElement.style.webkitLineClamp?this.expandBodyText("10"):this.collapseBodyText("2")}expandBodyText(e){let t=this.bodyElement.clientHeight;this.bodyElement.style.webkitLineClamp=e;let i=this.bodyElement.clientHeight;this.bodyElement.scrollHeight>this.bodyElement.clientHeight&&(this.bodyElement.style.overflow="auto",this.bodyElement.setStyle({maskImage:S})),t<i&&this.bottomContainer.setStyle({backgroundImage:"linear-gradient(0deg, rgb(0 0 0) 0%, rgb(0 0 0 / 0%) 100%)"})}collapseBodyText(e){this.bodyElement.style.webkitLineClamp=e,this.bodyElement.style.overflow="hidden",this.bodyElement.setStyle({backgroundImage:""}),this.bottomContainer.setStyle({backgroundImage:""})}onMuteUnmuteChange(){this.video&&(this.video.muted=u.VideoPlayerService.isMuted)}updatePlayerButtonIcons(){var e,t;this.video&&this.playerStyle&&(this.muteButtonElement.setIconUrl(u.VideoPlayerService.isMuted?null===(e=this.playerStyle)||void 0===e?void 0:e.icons.mute:null===(t=this.playerStyle)||void 0===t?void 0:t.icons.unmute),this.closeButtonElement.setIconUrl(this.playerStyle.icons.exit))}handleOnClosedCaptionClick(){var e;null===(e=this.closedCaptionsModal)||void 0===e||e.open()}toggleClosedCaptions(e){let t=(0,p.convertCcLanguageToState)(this.data.closedCaptions,e);this.event("Off"!==t?r.MomentAction.ClosedCaptionsOn:r.MomentAction.ClosedCaptionsOff,{})}handleOnShareClick(){return n(this,void 0,void 0,function*(){var e;let t;this.isActive&&(this.event(r.MomentAction.ShareClick,{}),this.pause(),t=location.href.includes("blaze/moment")?null==window?void 0:window.location.href:location.href.includes("#")?location.href+"&blaze/moment/"+this.data.id:location.href+"#blaze/moment/"+this.data.id,(null==navigator?void 0:navigator.share)?navigator.share({text:this.data.title,url:t}).then(()=>{this.event(r.MomentAction.ShareSuccess,{})}).catch(e=>{var i;"AbortError"!==e.name&&(null===(i=this.shareModal)||void 0===i||i.open(t))}).finally(()=>{this.resume()}):null===(e=this.shareModal)||void 0===e||e.open(t))})}load(){return n(this,arguments,void 0,function*(e="direct"){var t;yield null===(t=this.video)||void 0===t?void 0:t.load(e)})}unload(){return n(this,void 0,void 0,function*(){var e;yield null===(e=this.video)||void 0===e?void 0:e.unload()})}playToggle(){if(!this.isActive||!this.video)return;let e=!this.video.paused;this.event(this.video.paused?r.MomentAction.PlaybackPlay:r.MomentAction.PlaybackPause,{playback_action_method:"Click"}),this.video.paused?(this.resume(),this.isPausedManually=!1):(this.pause(),this.isPausedManually=!0,s.contentAccessibilityManager.announceUserAction("moment",e?"playing":"paused",{trigger:"user",action:e?"playing":"paused"}))}handleOnMuteUnmuteToggle(){if(!this.isActive)return;let e=!u.VideoPlayerService.isMuted;u.VideoPlayerService.isMuted=e,this.event(r.MomentAction.Audio,{}),this.video&&(this.video.muted=u.VideoPlayerService.isMuted),document.dispatchEvent(new Event(o.MUTE_UNMUTE_EVENT)),s.contentAccessibilityManager.announceUserAction("moment",u.VideoPlayerService.isMuted?"muted":"unmuted",{trigger:"user",action:u.VideoPlayerService.isMuted?"muted":"unmuted"}),this.updateButtonAccessibilityLabels()}setData(e){var t,i,a,l;
1e&&(this.data=e,this.updateContent({title:e.title,description:(null==e?void 0:e.description)||"",subtitle:(null==e?void 0:e.subtitle)||""}),this.updateCta(this.data.cta),this.updateLikeCount(this.data.likes),this.momentIndex=e.momentIndexInPlaylist,this.originalVideoRef||(this.originalVideoRef=new m.BlazeWidgetVideo(this),this.originalVideoRef.setData(this.data),this.originalVideoRef.onended=this.restartVideo.bind(this)),"Ad"===this.data.type?(this.video=new o.BlazeWidgetAd(this),this.video.setData(Object.assign({id:this.data.id,type:"Ad",duration:0,hasViewed:!1,ignoreReadStatusForStory:!1,createTime:new Date().toLocaleString()},"Web"===(null===(t=this.data.adInfo)||void 0===t?void 0:t.type)&&{adInfo:this.data.adInfo})),this.video.onended=this.restartVideo.bind(this)):"Video"===this.data.baseLayer.type&&(this.video=this.originalVideoRef),this.video&&this.container.prepend(this.video),this.video&&(this.seekBar.remove(),this.seekBar=new o.BlazeWidgetMomentSeekBar(this.video,(null===(i=this.playerStyle)||void 0===i?void 0:i.seekBar)||c.Presets.DefaultMomentStyle.seekBar),this.bottomContainer.prepend(this.seekBar)),this.seekBar.onResume=(0,s.debounce)(()=>n(this,void 0,void 0,function*(){this.isMomentPausedByPlayPauseButton&&this.event(r.MomentAction.PlaybackPlay,{}),this.resume()}),100),this.seekBar.onPause=(0,s.debounce)(()=>n(this,void 0,void 0,function*(){this.pause()}),100),this.adjustContentView(),(null===(l=null===(a=this.playerStyle)||void 0===a?void 0:a.followButton)||void 0===l?void 0:l.isVisible)&&(this.followButtonElement&&(this.followButtonElement.remove(),this.followButtonElement=void 0),this.configureFollowButton()),this.render(),this.updateContentAccessibilityAfterDataChange(),this.registerMomentAccessibility(),this.updateButtonAccessibilityLabels())}updateData(e){return n(this,void 0,void 0,function*(){var t,i,n,o,s,a,l,d,h,u,c;let{data:p,shouldShowImaAdOnStart:g,adInfo:v,contentExtraInfo:y,momentIndex:m}=e,b=null===(t=p.closedCaptions)||void 0===t?void 0:t.find(e=>""+e.language===localStorage.getItem(r.LOCAL_STORAGE_KEY_LAST_SELECTED));this.isLiked=!1,this.playerStyle&&this.likeButtonElement.setIconUrl(null===(i=this.playerStyle)||void 0===i?void 0:i.icons.unlike),null===(n=this.video)||void 0===n||n.remove(),this.setData(p),this.momentIndex=m,null===(o=this.video)||void 0===o||o.setAttribute("is-captions-visible",b?"true":"false"),null===(s=this.closedCaptionsModal)||void 0===s||s.reloadData(p.closedCaptions),this.closedCaptionButtonElement.setIconUrl((b?null===(a=this.playerStyle)||void 0===a?void 0:a.icons.closedCaptionsOn:null===(l=this.playerStyle)||void 0===l?void 0:l.icons.closedCaptionsOff)||""),this.closedCaptionButtonElement.setAttribute("disabled",(null===(d=this.data.closedCaptions)||void 0===d?void 0:d.length)?"false":"true"),this.data=p,this.shouldShowImaAdOnStart=g,this.adInfo=v,this.contentExtraInfo=y,null===(h=this.video)||void 0===h||h.setData(p),this.video&&this.seekBar.setVideo(this.video),this.pause(),(null===(c=null===(u=this.playerStyle)||void 0===u?void 0:u.followButton)||void 0===c?void 0:c.isVisible)&&(this.followButtonElement&&(this.followButtonElement.remove(),this.followButtonElement=void 0),this.configureFollowButton()),this.registerMomentAccessibility(),this.updateButtonAccessibilityLabels()})}updateContent(e){if(this.playerStyle){switch(this.playerStyle.headingText.contentSource){case"TITLE":this.headElement.innerHTML=e.title;break;case"SUBTITLE":this.headElement.innerHTML=e.subtitle}switch(this.playerStyle.bodyText.contentSource){case"TITLE":this.bodyElement.innerHTML=e.title;break;case"SUBTITLE":this.bodyElement.innerHTML=e.subtitle;break;case"DESCRIPTION":this.bodyElement.innerHTML=e.description}}}updateLikeCount(e){return n(this,void 0,void 0,function*(){var t,i,n,o;let{id:s,likes:a}=this.data;this.isLiked=yield u.LikeService.isMomentLiked(s);let r=null!=e?e:a;if(r=this.isLiked?r+1:r,this.likeCountElement){let e=this.isLiked?null===(t=this.playerStyle)||void 0===t?void 0:t.icons.like:null===(i=this.playerStyle)||void 0===i?void 0:i.icons.unlike,s=null===(o=null===(n=this.playerStyle)||void 0===n?void 0:n.likeText)||void 0===o?void 0:o.likeCountThreshold,a=0===r||s&&r<s?"hidden":"visible";e&&this.likeButtonElement.setIconUrl(e),this.likeCountElement.innerText=(0,v.formatLikes)(r),this.likeCountElement.style.opacity="hidden"===a?"0":"1"}})}updateCta(e){e&&e.url&&e.text&&e.backgroundColor&&e.textColor?(this.ctaButtonElement.setAttribute("href",e.url),this.ctaButtonElement.setAttribute("text",e.text),this.ctaButtonElement.setAnchorButtonStyles({color:e.textColor,background:e.backgroundColor}),this.ctaButtonElement.setAttribute("hidden-btn","false"),this.bottomContainer.setStyle({justifyContent:"flex-start"})):(this.ctaButtonElement.setAttribute("hidden-btn","true"),this.bottomContainer.setStyle({justifyContent:"center"}))}onCtaClick(e){var t,i,n,o,s,a,d;return this.event(r.MomentAction.CtaClick,{}),(null===(i=null===(t=this.refContentModal)||void 0===t?void 0:t.parentWidget)||void 0===i?void 0:i.id)&&u.EventService.dispatch(null===(n=this.refContentModal)||void 0===n?void 0:n.parentWidget,l.Delegation.onWidgetTriggerCTA,{widgetId:null===(s=null===(o=this.refContentModal)||void 0===o?void 0:o.parentWidget)||void 0===s?void 0:s.id,actionType:"URL",actionParam:this.ctaButtonElement.getAttribute("href")}),null===(a=this.shareModal)||void 0===a||a.close(),this.exitTrigger="CTA Click",this.event(r.MomentAction.MomentExit,{}),this.event(r.MomentAction.MomentsPlaylistExit,{}),(null===(d=this.video)||void 0===d?void 0:d.paused)||(this.resumeAfterfocus=!0,this.pause()),!0}play(){var e,t,i;this.isConnected&&(this.sessionId=(0,v.getRandomId)(),this.video&&(this.video.shouldShowImaAd=this.shouldShowImaAdOnStart,"Content"===(null===(e=this.video.data)||void 0===e?void 0:e.type)&&(this.event(r.MomentAction.MomentStart,{}),u.EventService.dispatch(this,l.Delegation.onMomentStart,{momentIndex:this.momentIndex,totalMomentsCount:this.modal.data.length}),this.video.data.adInfo=this.adInfo),this.event(r.MomentAction.PlaybackInitialStart,{}),this.adjustContentView(),this.updatePlayerButtonIcons(),this.video.muted=u.VideoPlayerService.isMuted,this.video.display(()=>{this.modal.handleClickNavigation("NEXT")}),this.video instanceof m.BlazeWidgetVideo&&(null===(i=(t=this.video).tryToAddLoader)||void 0===i||i.call(t)),this.video.play(),u.VideoPlayerService.isPlaying=!0,this.isActive=!0,this.seekBar.setAttribute("is-active","true"),this.seekBar.onContentResumed(!0),u.MomentService.updateMomentReadStatusById(this.data.id),this.data.hasViewed=!0,this.updateWidgetStatusReadUnread(),this.updateButtonAccessibilityLabels()))}handleOnCustomActionButtonClick(e,t){t.onClick(e,this.data.entities),this.event(r.MomentAction.CustomActionButtonClick,{custom_action_button_name:t.buttonName})}handleOnClose(){this.pause(),this.modal.close()}handleOnLikeClick(){var e,t;this.isLiked=!this.isLiked,this.event(this.isLiked?r.MomentAction.Like:r.MomentAction.Unlike,{}),u.LikeService.updateMomentLike(this.isLiked,this.data.id);let i=this.isLiked?null===(e=this.playerStyle)||void 0===e?void 0:e.icons.like:null===(t=this.playerStyle)||void 0===t?void 0:t.icons.unlike;i&&this.likeButtonElement.setIconUrl(i),this.updateLikeCount(),s.contentAccessibilityManager.announceUserAction("moment",this.isLiked?"liked":"unliked",{trigger:"user",action:this.isLiked?"liked":"unliked"}),this.updateButtonAccessibilityLabels()}handleFollowAnalytics(e){var t,i;let n=(0,g.generateFollowStateForAnalytics)(null===(t=this.followButtonElement)||void 0===t?void 0:t.entityId,null===(i=this.followButtonElement)||void 0===i?void 0:i.entityType,s.FollowingsManager),o=e.newFollowingState?r.MomentAction.Follow:r.MomentAction.Unfollow;this.event(o,{follow_state:n})}pause(){var e;null===(e=this.video)||void 0===e||e.pause(),u.VideoPlayerService.isPlaying=!1,this.updatePlayerButtonIcons(),this.isActive&&this.seekBar.onContentPaused(),this.updateButtonAccessibilityLabels()}resume(){var e;this.video&&("Content"!==this.data.type||(null===(e=this.video)||void 0===e?void 0:e.paused))&&(this.video.play(),u.VideoPlayerService.isPlaying=!0,this.updatePlayerButtonIcons(),this.removeResumeButtonFromScreen(),this.seekBar.onContentResumed(!1),this.updateButtonAccessibilityLabels())}removeResumeButtonFromScreen(){this.playPauseButtonElement.setIconUrl(""),this.isMomentPausedByPlayPauseButton=!1}resetPosition(){this.video&&this.video.currentTime>=.2&&(this.video.currentTime=0)}restartVideo(){this.video&&(this.resetPosition(),this.video.muted=u.VideoPlayerService.isMuted,u.VideoPlayerService.isPlaying&&this.video.play(),this.loopNumber++)}adjustContentView(){var e,t,i,n,s,a,r;return(null===(e=this.video)||void 0===e?void 0:e.shouldShowImaAd)?(this.elementsToHideOnImaAds.forEach(e
1=>{e&&(e.style.visibility="hidden")}),null===(t=this.modal.nextContentButtonElement)||void 0===t||t.setAttribute("disabled","true"),null===(i=this.modal.prevContentButtonElement)||void 0===i||i.setAttribute("disabled","true"),this.topButtonsContainer.style.marginTop="30px",this.topButtonsContainer.querySelectorAll("blaze-button").forEach(e=>{e.style.display=e===this.muteButtonElement?"flex":"none"}),void this.video.setAttribute("is-captions-visible","false")):"Ad"===(null===(s=null===(n=this.video)||void 0===n?void 0:n.data)||void 0===s?void 0:s.type)?(this.elementsToHideOnCustomAds.forEach(e=>{e&&(e.style.visibility="hidden")}),"no-ad"===u.VideoPlayerService.muteStateBeforeAd&&(u.VideoPlayerService.muteStateBeforeAd=u.VideoPlayerService.isMuted?"mute":"unmute"),"unmute"===u.VideoPlayerService.muteStateBeforeAd&&(u.VideoPlayerService.isMuted=!0,this.updatePlayerButtonIcons()),this.topButtonsContainer.style.marginTop="30px",this.topButtonsContainer.querySelectorAll("blaze-button").forEach(e=>{e.style.display=e===this.muteButtonElement?"flex":"none"}),void this.video.setAttribute("is-captions-visible","false")):([...this.elementsToHideOnCustomAds,...this.elementsToHideOnImaAds].forEach(e=>{e&&(e.style.visibility="visible")}),null===(a=this.modal.nextContentButtonElement)||void 0===a||a.setAttribute("disabled","false"),null===(r=this.modal.prevContentButtonElement)||void 0===r||r.setAttribute("disabled","false"),"no-ad"!==u.VideoPlayerService.muteStateBeforeAd&&(u.VideoPlayerService.isMuted="mute"===u.VideoPlayerService.muteStateBeforeAd,u.VideoPlayerService.muteStateBeforeAd="no-ad",document.dispatchEvent(new Event(o.MUTE_UNMUTE_EVENT))),this.topButtonsContainer.style.marginTop="5px",void this.topButtonsContainer.querySelectorAll("blaze-button").forEach(e=>{e.style.display="flex"}))}event(e,t){return n(this,arguments,void 0,function*(e,t,i){var n,o,a,l;try{let d=this.getRefferingObject();if("Content"===this.data.type){switch(t.moment_id=this.data.id,t.moment_title=this.data.title,t.moment_index=this.momentIndex,t.audio_state=u.VideoPlayerService.isMuted?"Mute":"Unmute",t.cc_state=(0,p.convertCcLanguageToState)(this.data.closedCaptions,localStorage.getItem(r.LOCAL_STORAGE_KEY_LAST_SELECTED)),t.loop_number=this.loopNumber.toString(),t.moments_session_id=this.modal.playlistSessionId,t.follow_state=(0,g.generateFollowStateForAnalytics)(null===(n=this.followButtonElement)||void 0===n?void 0:n.entityId,null===(o=this.followButtonElement)||void 0===o?void 0:o.entityType,s.FollowingsManager),t.moment_duration=yield this.video.getVideoDuration(),"true"===(null===(a=u.AppConfigurationService.appConfigurations)||void 0===a?void 0:a.configurations.analyticsAddEntitiesInfo)&&(t.content_extra_info=JSON.stringify(this.data.extraInfo)),e){case r.MomentAction.MomentsPlaylistStart:t.moment_start_trigger=this.startTrigger;break;case r.MomentAction.MomentsPlaylistExit:t.moment_exit_trigger=this.exitTrigger;break;case r.MomentAction.MomentExit:t.moment_navigation_type=this.navigationType,t.moment_navigation_direction=this.navigationDirection,t.moment_duration_viewed_percent=Math.round(1e4*((null===(l=this.video)||void 0===l?void 0:l.progress)||0))/100}t.localization=this.data.retrievedLanguages||{},u.AnalyticsService.pushMomentEvent(e,t,i,d)}}catch(e){}})}registerMomentAccessibility(){var e,t,i,n;this.data.id&&s.contentAccessibilityManager.registerContentWidget(this.data.id,{widget:this,buttons:{play:this.playPauseButtonElement,mute:this.muteButtonElement,like:this.likeButtonElement,share:this.shareButtonElement,close:this.closeButtonElement,captions:this.closedCaptionButtonElement,cta:this.ctaButtonElement,custom1:this.customActionButtonOneElement,custom2:this.customActionButtonTwoElement,nextMoment:this.modal.nextContentButtonElement,prevMoment:this.modal.prevContentButtonElement,follow:this.followButtonElement},data:{id:this.data.id,title:this.data.title,isPlaying:!!this.video&&!this.video.paused,isMuted:null===(e=this.video)||void 0===e?void 0:e.muted,isLiked:this.isLiked,ctaText:null===(t=this.data.cta)||void 0===t?void 0:t.text,isFollowed:null!==(n=null===(i=this.followButtonElement)||void 0===i?void 0:i.isFollowed)&&void 0!==n&&n}},"moment")}updateAccessibilityLabels(){if(!this.data.id)return;let e=this.buildMomentAccessibilityState();s.contentAccessibilityManager.updateButtonLabels(this.data.id,e)}buildMomentAccessibilityState(){var e,t,i,n,o,s;
1return{id:this.data.id,title:this.data.title,description:this.data.description,ctaText:null===(e=this.data.cta)||void 0===e?void 0:e.text,isPlaying:!!this.video&&!this.video.paused,isMuted:null!==(i=null===(t=this.video)||void 0===t?void 0:t.muted)&&void 0!==i&&i,isLiked:this.isLiked,duration:null===(n=this.video)||void 0===n?void 0:n.duration,isFollowed:null!==(s=null===(o=this.followButtonElement)||void 0===o?void 0:o.isFollowed)&&void 0!==s&&s}}updateContentAccessibilityAfterDataChange(){var e;this.data.id&&s.contentAccessibilityManager.updateButtonLabels(this.data.id,{title:this.data.title,ctaText:null===(e=this.data.cta)||void 0===e?void 0:e.text})}updateButtonAccessibilityLabels(){var e;this.data.id&&s.contentAccessibilityManager.updateButtonLabels(this.data.id,{isPlaying:!!this.video&&!this.video.paused,isMuted:null===(e=this.video)||void 0===e?void 0:e.muted,isLiked:this.isLiked})}enableAllButtons(){let e=this.getAllFocusableButtons();this.setButtonsAccessibilityState(e,!0)}disableAllButtons(){let e=this.getAllFocusableButtons();this.setButtonsAccessibilityState(e,!1)}setButtonsAccessibilityState(e,t){t?(p.AccessibilityUtils.setElementsAccessible(e),this.enableAnchorElements()):(p.AccessibilityUtils.setElementsInaccessible(e),this.disableAnchorElements())}enableAnchorElements(){let e=this.querySelector("a");e&&e.setAttribute("tabindex","0")}disableAnchorElements(){let e=this.querySelector("a");e&&e.setAttribute("tabindex","-1")}getAllFocusableButtons(){return this.getMomentButtonsForAccessibility()}getMomentButtonsForAccessibility(){return[this.playPauseButtonElement,this.muteButtonElement,this.shareButtonElement,this.closeButtonElement,this.closedCaptionButtonElement,this.customActionButtonOneElement,this.customActionButtonTwoElement,this.likeButtonElement,this.ctaButtonElement,this.followButtonElement,this.bodyElement,this.headElement,this.bottomContainer].filter(Boolean)}render(){this.data&&this.video&&this.playerStyle&&(this.updatePlayerButtonIcons(),this.updateLayoutPositioning(),this.styleContent(this.headElement,this.playerStyle.headingText,"HEADING_CONTENT"),this.styleContent(this.bodyElement,this.playerStyle.bodyText,"BODY_CONTENT"),this.applyLikeStyle(),this.applyShareStyle(),this.applyCtaButtonStyles())}}t.BlazeWidgetMoment=E},8073:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8094:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigService=void 0;let o=i(1556),s=i(4545),a=i(373);class r extends(0,o.Singleton)(){constructor(){super(),this._sendAnalytics=!0,this._disableAnalytics=!1,this._doNotTrack=!1,this._staticContent=!1,this._runInShadowDom=!0,this._shouldModifyUrlWithStoryId=!0,this._shouldModifyUrlWithContentId=!0,this._shouldDismissPlayer=!1,this._shouldAutoAdvance=!1,this._shouldCreateUser=!0,this._shouldAllowHorizontalStories=!1,this._preferredLanguage=void 0,this._appContext={},this._urls={prod_cf:a.CDN_VENDOR_TO_API_DOMAIN.cf,prod_fd:a.CDN_VENDOR_TO_API_DOMAIN.fd,prod:a.CDN_VENDOR_TO_API_DOMAIN.cf,uat:"https://blazesdk-uat-cdn.clipro.tv",local:"https://localhost.clipro.tv:5001"},this._sdkStorageCDNs={prod_cf:a.CDN_VENDOR_TO_STORAGE_DOMAIN.cf,prod_fd:a.CDN_VENDOR_TO_STORAGE_DOMAIN.fd,prod:a.CDN_VENDOR_TO_STORAGE_DOMAIN.cf,uat:a.CDN_VENDOR_TO_STORAGE_DOMAIN.cf,local:a.CDN_VENDOR_TO_STORAGE_DOMAIN.cf},this._analyticsUrls={prod:"https://blaze-audit.clipro.tv/api/eventaudit/v1",uat:"https://blaze-audit-uat.clipro.tv/api/eventaudit/v1",local:"https://blaze-audit-uat.clipro.tv/api/eventaudit/v1"},this._loggerUrls={prod:"https://blazelogger.clipro.tv/api/blazelogger/v1/logs",uat:"https://blazelogger-uat.clipro.tv/api/blazelogger/v1/logs",local:"https://blazelogger-uat.clipro.tv/api/blazelogger/v1/logs"}}init(e){return n(this,void 0,void 0,function*(){let{apiKey:t,environment:i,sendAnalytics:n,disableAnalytics:o,previewMomentUrl:s,previewUrl:a,doNotTrack:r,externalUserId:l,geoLocation:d,staticContent:h,staticContentType:u,runInShadowDom:c,shouldModifyUrlWithStoryId:p,shouldModifyUrlWithContentId:g,shouldDismissPlayer:v,shouldCreateUser:y,prefetchingPolicy:m,shouldAllowHorizontalStories:b,shouldAutoAdvance:f,autoAdvanceUrl:S,layoutDirection:E,shouldAllowClosedCaptions:C,disableAutoLoadingContent:T,preferredLanguage:A}=e;this.environment=i||"prod",this.prefetchingPolicy=m||"default",this._apiKey=t,this._previewUrl=a,this._previewMomentUrl=s,this._externalUserId=l||"",this._geoLocation=d||"",this._prefetchingPolicy=m,this._autoAdvanceUrl=S||"",this._layoutDirection=E,this._shouldAllowClosedCaptions=C,this._disableAutoLoadingContent=T,A&&(this._preferredLanguage=A),!0===h&&(this._staticContent=!0),u&&(this._staticContentType=u),!0===r&&(this._doNotTrack=!0),!0===b&&(this._shouldAllowHorizontalStories=!0),!1===n&&(this._sendAnalytics=!1),!0===o&&(this._disableAnalytics=!0),!1===c&&(this._runInShadowDom=!1),!1===p&&(this._shouldModifyUrlWithStoryId=!1),!1===g&&(this._shouldModifyUrlWithContentId=!1),!0===v&&(this._shouldDismissPlayer=!0),!0===f&&(this._shouldAutoAdvance=!0),!1===y&&(this._shouldCreateUser=!1)})}getEnvUrl(e,t){var i;return null!==(i=e[t+"_"+s.CDNDetermineService.cdnVendor])&&void 0!==i?i:e[t]}getServiceUrl(e){return this.getEnvUrl(this._urls,e)}getAnalyticsUrl(e){return this.getEnvUrl(this._analyticsUrls,e)}throwOrLog(e){if("undefined"!=typeof window&&("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname||window.location.hostname.includes("blob.core.windows.net")))throw Error(e)}get environment(){if(!this._environment)throw Error("Environment not set");return this._environment}set environment(e){this._environment=e;let t=this.getServiceUrl(e),i=a.BASE_API_PATH;this._apiUrl=t+"/"+i,this._analyticsApiUrl=this.getAnalyticsUrl(e),this._sdkStorageCDN=this.getEnvUrl(this._sdkStorageCDNs,e)}get sendAnalytics(){return this._sendAnalytics}get disableAnalytics(){return this._disableAnalytics}set disableAnalytics(e){this._disableAnalytics=e}get shouldCreateUser(){return this._shouldCreateUser}get analyticsApiUrl(){return this._analyticsUrls[this.environment]}get loggerApiUrl(){return this._loggerUrls[this.environment]}get externalUserId(){return this._externalUserId?this._externalUserId:null}set externalUserId(e){this._externalUserId=e}get doNotTrack(){return this._doNotTrack}set doNotTrack(e){this._doNotTrack=e}get shouldAllowHorizontalStories(){return this._shouldAllowHorizontalStories}set shouldAllowHorizontalStories(e){this._shouldAllowHorizontalStories=e}get geoLocation(){return this._geoLocation}set geoLocation(e){this._geoLocation=e}get staticContent(){return this._staticContent}set staticContent(e){this._staticContent=e}get staticContentType(){return this._staticContentType}set staticContentType(e){this._staticContentType=e}get apiUrl(){if(!this._apiUrl)throw Error("API url not set");return this._apiUrl}get sdkStorageCDN(){var e;return this._sdkStorageCDN||this.throwOrLog("SDK Storage CDN not set"),null!==(e=this._sdkStorageCDN)&&void 0!==e?e:this._sdkStorageCDNs.prod_cf}get apiKey(){if(!this._apiKey)throw Error("API key not set");return this._apiKey}get previewUrl(){if(!this._previewUrl)throw Error("Preview url not set");return this._previewUrl}get previewMomentsUrl(){if(!this._previewMomentUrl)throw Error("Preview moments url not set");return this._previewMomentUrl}get runInShadowDom(){return this._runInShadowDom}get playerStyleCustomization(){return this._playerStyleCustomization}set playerStyleCustomization(e){this._playerStyleCustomization=e}get shouldModifyUrlWithStoryId(){return this._shouldModifyUrlWithStoryId}get shouldModifyUrlWithContentId(){return this._shouldModifyUrlWithContentId}get shouldDismissPlayer(){return this._shouldDismissPlayer}get shouldAutoAdvance(){return this._shouldAutoAdvance}get autoAdvanceUrl(){return this._autoAdvanceUrl}get googleCustomNativeAdHandler(){return this._googleCustomNativeAdHandler}set googleCustomNativeAdHandler(e){this._googleCustomNativeAdHandler=e}get imaAdHandler(){return this._imaAdHandler}set imaAdHandler(e){this._imaAdHandler=e}get prefetchingPolicy(){if(!this._prefetchingPolicy)throw Error("Prefetching policy not set");return this._prefetchingPolicy}set prefetchingPolicy(e){this._prefetchingPolicy=e}get excludeContentId(){return this._excludeContentId}set excludeContentId(e){this._excludeContentId=e}get layoutDirection(){return this._layoutDirection}set layoutDirection(e){this._layoutDirection=e}get shouldAllowClosedCaptions(){return this._shouldAllowClosedCaptions}get appContext(){return this._appContext}set appContext(e){this._appContext=e}get disableAutoLoadingContent(){return this._disableAutoLoadingContent}set disableAutoLoadingContent(e){this._disableAutoLoadingContent=e}get onItemClick(){return this._onItemClick}set onItemClick(e){this._onItemClick=e}get beforeContentPlayCallback(){return this._beforeContentPlayCallback}set beforeContentPlayCallback(e){this._beforeContentPlayCallback=e}get preferredLanguage(){return this._preferredLanguage}set preferredLanguage(e){this._preferredLanguage=e}}t.ConfigService=r.getInstance()},8103:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeFollowButton=void 0;let n=i(4403),o=i(8921),s=i(9266),a=i(4906),r=i(5573),l=i(277),d={text:{chip:{followed:{width:"24px",height:"24px"},unfollowed:{width:"54px",height:"24px"}}},icon:{chip:{followed:{width:"28px",height:"28px"},unfollowed:{width:"28px",height:"28px"}}}};class h extends n.BaseWidget{constructor(e){super(),this.playerStyle=e,this._isFollowing=!1,this.handleClick=e=>{let t=!this._isFollowing;s.SharedEventTarget.dispatchEvent(new CustomEvent(r.FOLLOW_BUTTON_STATE_CHANGE,{detail:{isFollowing:t,entityId:this._entityId,entityType:this._entityType}})),t?n.FollowingsManager.follow(this._entityId):n.FollowingsManager.unfollow(this._entityId),this.onToggle&&this.onToggle(e,{sourceId:this._sourceId,sourceContentType:this._sourceContentType,newFollowingState:t,followEntity:{entityId:this._entityId,entityType:this._entityType}})},this.handleStateChange=e=>{let t=e.detail;t.entityId===this._entityId&&t.entityType===this._entityType&&(this._isFollowing=t.isFollowing,this.applyStateToUi(),this.updateAriaLabel())},this.onMouseEnter=()=>{this.containerEl.style.transform="scale(1.1)"},this.onMouseLeave=()=>{this.containerEl.style.transform="scale(1)"},this.handlePressKeyboard=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleClick(e))},this.setAttribute("data-testid","follow-button"),this.containerEl=o.WidgetsFactory.create("blaze-div"),this.avatarEl=o.WidgetsFactory.create("blaze-div"),this.chipEl=o.WidgetsFactory.create("blaze-div"),this.chipContentWrapperEl=o.WidgetsFactory.create("blaze-div"),this.checkMarkIconEl=o.WidgetsFactory.create("blaze-div"),this.plusIconEl=o.WidgetsFactory.create("blaze-div"),this.textEl=o.WidgetsFactory.create("blaze-div"),(0,s.mergeStyles)(this,{display:"inline-flex",cursor:"pointer",userSelect:"none",outline:"none",WebkitTapHighlightColor:"transparent",flexShrink:"0",flexGrow:"0",paddingBottom:"12px"}),this.setupContainer(),this.setupAvatar(),this.setupChip()}connectedCallback(){this._entityId&&this._entityType&&this._avatarUrl&&(this._isFollowing=n.FollowingsManager.isFollowing(this._entityId),this.contains(this.containerEl)||(this.containerEl.append(this.avatarEl,this.chipEl),this.append(this.containerEl)),this.addEventListener("click",this.handleClick),this.addEventListener("mouseenter",this.onMouseEnter),this.addEventListener("mouseleave",this.onMouseLeave),this.addEventListener("keydown",this.handlePressKeyboard),s.SharedEventTarget.addEventListener(r.FOLLOW_BUTTON_STATE_CHANGE,this.handleStateChange),this.setAttribute("role","button"),this.setAttribute("tabindex","0"),this.applyStateToUi(),this.updateAvatarBackground(),this.updateAriaLabel())}disconnectedCallback(){this.removeEventListener("click",this.handleClick),this.removeEventListener("mouseenter",this.onMouseEnter),this.removeEventListener("mouseleave",this.onMouseLeave),this.removeEventListener("keydown",this.handlePressKeyboard),s.SharedEventTarget.removeEventListener(r.FOLLOW_BUTTON_STATE_CHANGE,this.handleStateChange)}setEntity(e,t){this._entityId=e,this._entityType=t}setAvatar(e){this._avatarUrl=e,this.updateAvatarBackground()}setSource(e,t){this._sourceId=e,this._sourceContentType=t}get entityId(){return this._entityId}get entityType(){return this._entityType}get isFollowed(){return this._isFollowing}updateAriaLabel(){let e=this._isFollowing?"Unfollow":"Follow";this.setAriaLabel(e)}setupContainer(){(0,s.mergeStyles)(this.containerEl,{display:"inline-flex",flexDirection:"column",alignItems:"center",position:"relative",transition:"transform 0.2s ease-in-out"})}setupAvatar(){var e,t;let i=null===(t=null===(e=this.playerStyle)||void 0===e?void 0:e.followButton)||void 0===t?void 0:t.avatar;(0,s.mergeStyles)(this.avatarEl,{width:"50px",height:"50px",borderRadius:"50%",backgroundSize:"cover",backgroundPosition:"center",flexShrink:"0",boxSizing:"border-box",border:((null==i?void 0:i.borderWidth)||"3px")+" solid "+((this._isFollowing?null==i?void 0:i.followedBorderColor:null==i?void 0:i.unfollowedBorderColor)||a.Colors.White),transition:"border-color 0.3s ease-in-out"})}setupChip(){var e,t,i,o;let r=null===(t=null===(e=this.playerStyle)||void 0===e?void 0:e.followButton)||void 0===t?void 0:t.chip,l=(this._isFollowing?null==r?void 0:r.followedBackgroun
1dColor:null==r?void 0:r.unfollowedBackgroundColor)||a.Colors.White;(0,s.mergeStyles)(this.chipEl,Object.assign({display:"flex",justifyContent:"center",alignItems:"center",fontWeight:"bold",position:"absolute",bottom:"-12px",whiteSpace:"nowrap",borderRadius:"14px",fontFamily:a.Presets.playerFont,fontSize:n.TextScaleService.scaleFontSize("12px"),background:l,color:(null==r?void 0:r.color)||a.Colors.Black,transition:"width 0.3s ease-in-out, background-color 0.2s ease-in-out",overflow:"hidden"},d[(null===(o=null===(i=this.playerStyle)||void 0===i?void 0:i.followButton)||void 0===o?void 0:o.variant)||"text"].chip[this._isFollowing?"followed":"unfollowed"])),(0,s.mergeStyles)(this.chipContentWrapperEl,{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"}),this.setupIcons(),this.chipEl.appendChild(this.chipContentWrapperEl)}setupIcons(){var e,t;let i=null===(t=null===(e=this.playerStyle)||void 0===e?void 0:e.followButton)||void 0===t?void 0:t.chip,o=(null==i?void 0:i.color)||a.Colors.Black,r={maskRepeat:"no-repeat",webkitMaskRepeat:"no-repeat",maskPosition:"center",webkitMaskPosition:"center",maskSize:"contain",webkitMaskSize:"contain"};(0,s.mergeStyles)(this.checkMarkIconEl,Object.assign(Object.assign({width:"20px",height:"20px",backgroundColor:o,maskImage:'url("'+l.checkMarkSvg+'")',webkitMaskImage:'url("'+l.checkMarkSvg+'")'},r),{display:"none"})),(0,s.mergeStyles)(this.plusIconEl,Object.assign(Object.assign({width:"12px",height:"12px",backgroundColor:o,maskImage:'url("'+l.plusSvg+'")',webkitMaskImage:'url("'+l.plusSvg+'")'},r),{display:"none"})),(0,s.mergeStyles)(this.textEl,{fontFamily:a.Presets.playerFont,fontSize:n.TextScaleService.scaleFontSize("12px"),fontWeight:"bold",color:o,display:"none"}),this.textEl.textContent="Follow",this.chipContentWrapperEl.appendChild(this.checkMarkIconEl),this.chipContentWrapperEl.appendChild(this.plusIconEl),this.chipContentWrapperEl.appendChild(this.textEl)}updateIconVisibility(){var e,t;this.checkMarkIconEl.style.display="none",this.plusIconEl.style.display="none",this.textEl.style.display="none",this._isFollowing?this.checkMarkIconEl.style.display="block":"text"===(null===(t=null===(e=this.playerStyle)||void 0===e?void 0:e.followButton)||void 0===t?void 0:t.variant)?this.textEl.style.display="block":this.plusIconEl.style.display="block"}updateIconColors(){var e,t;let i=null===(t=null===(e=this.playerStyle)||void 0===e?void 0:e.followButton)||void 0===t?void 0:t.chip,n=(null==i?void 0:i.color)||a.Colors.Black;this.checkMarkIconEl.style.backgroundColor=n,this.plusIconEl.style.backgroundColor=n,this.textEl.style.color=n}applyStateToUi(){var e,t,i,n,o,r;let l=null===(t=null===(e=this.playerStyle)||void 0===e?void 0:e.followButton)||void 0===t?void 0:t.chip,h=null===(n=null===(i=this.playerStyle)||void 0===i?void 0:i.followButton)||void 0===n?void 0:n.avatar,u=d[(null===(r=null===(o=this.playerStyle)||void 0===o?void 0:o.followButton)||void 0===r?void 0:r.variant)||"text"].chip;(0,s.mergeStyles)(this.chipEl,Object.assign({background:(this._isFollowing?null==l?void 0:l.followedBackgroundColor:null==l?void 0:l.unfollowedBackgroundColor)||a.Colors.White},u[this._isFollowing?"followed":"unfollowed"])),(0,s.mergeStyles)(this.avatarEl,{border:((null==h?void 0:h.borderWidth)||"3px")+" solid "+((this._isFollowing?null==h?void 0:h.followedBorderColor:null==h?void 0:h.unfollowedBorderColor)||a.Colors.White)}),this.updateIconColors(),this.chipContentWrapperEl.animate([{opacity:1,transform:"scale(1)"},{opacity:0,transform:"scale(0.8)"}],{duration:150,easing:"ease-in-out",fill:"forwards"}).addEventListener("finish",()=>{this.updateIconVisibility(),this.chipContentWrapperEl.animate([{opacity:0,transform:"scale(0.8)"},{opacity:1,transform:"scale(1)"}],{duration:150,easing:"ease-in-out",fill:"forwards"}),this.updateAriaLabel()})}setAriaLabel(e){e?this.setAttribute("aria-label",e):this.removeAttribute("aria-label")}updateAvatarBackground(){this._avatarUrl?this.avatarEl.style.backgroundImage="url('"+this._avatarUrl+"')":this.avatarEl.style.backgroundImage="none"}}t.BlazeFollowButton=h},8105:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0})},8154:(e,t)=>{"use strict";function i(e,t,i="button"){let n=t||"Untitled";switch(e){case"story":return"Story "+i+": "+n;case"moment":return"Moment "+i+": "+n;case"video":return"Video "+i+": "+n;default:return e+" "+i+": "+n}}function n(e){switch(e){case"story":return". Click to view story";case"moment":return". Click to play moment";case"video":return". Click to watch video";default:return". Click to open "+e}}function o(e,t){let i=[];return"isLive"in e&&e.isLive&&i.push("live"),(null==e?void 0:e.hasViewed)?i.push("viewed"):i.push("new"),(null==t?void 0:t.isVisible)&&t.text&&i.push(t.text.toLowerCase()),i.join(", ")}Object.defineProperty(t,"__esModule",{value:!0}),t.buildContentTypeLabel=i,t.getContentTypeAction=n,t.buildStatusInfo=o,t.buildContentAriaLabel=function(e){let{contentType:t,title:s,content:a,position:r,total:l,badgeStyle:d,elementType:h="button"}=e,u=i(t,s,h),c=o(a,d);return c&&(u+=", "+c),u+=n(t),l&&l>1&&r&&(u+=". "+r+" of "+l),u},t.buildCarouselLabel=function(e,t,i=!0){let n=e+" carousel with "+t+" "+(1!==t?e+"s":e),o=n;return i&&t>1&&(o+=". Use arrow keys to navigate between "+e+"s, Enter or Space to select"),{label:o,announcement:n+"."}},t.generateThumbnailAltText=function(e,t,i){let n="Thumbnail for "+e+": "+(t||"Untitled");return"isLive"in i&&i.isLive&&(n+=" (live)"),n}},8156:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.isInitialized=t.pushConsentEvent=t.Delegations=void 0,t.setDoNotTrack=y,t.setGeoLocation=m,t.setPreferredLanguage=b,t.setExternalUserId=f,t.setOnItemClick=S,t.Initialize=C,t.WidgetRowView=I,t.WidgetGridView=M,t.WidgetEmbeddedStory=w,t.WidgetEmbeddedVideo=_,t.WidgetCustomView=P,t.Theme=L,t.addDelegateListener=x,t.LabelBuilder=O,t.DataSourceBuilder=D,t.pauseCurrentPlayer=N,t.resumeCurrentPlayer=k,t.setGoogleCustomNativeAdsHandler=z,t.setImaHandler=R,t.playStory=j,t.playStories=V,t.playContent=U,t.setAbTestParams=W,t.getAppContextManager=F,t.setBeforeContentPlayCallback=G,t.appendContentToPlayer=Z,t.setDisableAnalytics=Q;let o=i(9965),s=i(8243),a=i(4545),r=i(4906),l=i(9266),d=i(2500),h=i(9126),u=i(4403),c=i(8921),p=i(6925),g=i(5495);c.WidgetsFactory.define("blaze-sdk",h.BlazeWidgetSDK);let v={environment:"prod",sendAnalytics:!0,disableAnalytics:!1,doNotTrack:!1,externalUserId:"",geoLocation:"",runInShadowDom:!0,shouldModifyUrlWithStoryId:!0,shouldModifyUrlWithContentId:!0,shouldDismissPlayer:!1,shouldCreateUser:!0,prefetchingPolicy:"default",shouldAllowHorizontalStories:!1,layoutDirection:"LTR",shouldAllowClosedCaptions:!1};function y(e){a.ConfigService.doNotTrack=e}function m(e){a.ConfigService.geoLocation=(0,l.isValidCountryCode)(e)?e:""}function b(e){let t=document.getElementsByTagName("blaze-sdk")[0];t&&t.setAttribute("preferred-language",e||"")}function f(e){return n(this,void 0,void 0,function*(){a.ConfigService.externalUserId=e,yield a.UserService.refreshUserToken()})}function S(e){a.ConfigService.onItemClick=e}let E=!1;function C(e,t={}){if(E)return Promise.resolve();E=!0;let i=(0,l.mergeDeep)({},v,t,{apiKey:e});return new Promise(t=>{document.getElementsByTagName("blaze-sdk")[0]?t():c.WidgetsFactory.whenDefined("blaze-sdk").then(()=>{let{environment:n,sendAnalytics:o,disableAnalytics:s,previewMomentUrl:a,previewUrl:r,doNotTrack:d,externalUserId:h,geoLocation:u,preferredLanguage:c,runInShadowDom:p,shouldModifyUrlWithStoryId:v,shouldModifyUrlWithContentId:y,shouldDismissPlayer:m,playerStyleCustomization:b,shouldCreateUser:f,prefetchingPolicy:S,shouldAllowHorizontalStories:E,shouldAutoAdvance:C,layoutDirection:T,shouldAllowClosedCaptions:A,disableAutoLoadingContent:I,staticContentType:M,followedEntities:w,autoAdvanceUrl:_}=i,P=document.createElement("blaze-sdk");P.setAttribute("api-key",e),w&&g.FollowingsManager.initialize(w),_&&P.setAttribute("auto-advance-url",_),M&&P.setAttribute("static-content-type",M),"boolean"==typeof f&&P.setAttribute("should-create-user",f.toString()),"boolean"==typeof A&&P.setAttribute("should-allow-closed-captions",A.toString()),"boolean"==typeof I&&P.setAttribute("disable-auto-loading-content",I.toString()),T&&P.setAttribute("layout-direction",T),n&&P.setAttribute("environment",n),"boolean"==typeof o&&P.setAttribute("send-analytics",o.toString()),"boolean"==typeof s&&P.setAttribute("disable-analytics",s.toString()),"boolean"==typeof p&&P.setAttribute("run-in-shadow-dom",p.toString()),"boolean"==typeof v&&P.setAttribute("modifiy-url-with-story-id",v.toString()),"boolean"==typeof y&&P.setAttribute("modifiy-url-with-content-id",y.toString()),r&&P.setAttribute("preview-url",r),a&&P.setAttribute("preview-moment-url",a),d&&P.setAttribute("do-not-track",d.toString()),E&&P.setAttribute("should-allow-horizontal-stories",E.toString()),h&&P.setAttribute("external-user-id",h),u&&P.setAttribute("geo-location",(0,l.isValidCountryCode)(u)?u:""),c&&P.setAttribute("preferred-language",c),b&&P.setPlayerStyleCustomization(b),m&&P.setAttribute("should-dismiss-player",m.toString()),C&&P.setAttribute("should-auto-advance",C.toString()),S&&P.setAttribute("prefetching-policy",S);let L=document.querySelector("body");L?(L.appendChild(P),t()):document.addEventListener("DOMContentLoaded",()=>{let e=document.querySelector("body");null==e||e.appendChild(P),t()})})})}function T(e,t,i,n){let{orderType:o,storyIds:s,contentIds:a,maxItemsCount:r,maxDisplayItemsCount:d,labels:h,theme:c,delegates:p,labelsPriority:g,perItemStyleOverrides:v,shouldOrderWidgetByReadStatus:y,contentType:m="story",dataSource:b,actionHandlers:f}=i;try{let i=h&&("string"==typeof h?h.trim():h),S=s&&s.length>0||a&&a.length>0;if(!b&&!i&&!S)throw Error("valid labels, IDs, or dataSource were not found in widget options");b&&u.BlazeDataSourceValidations.validate(b,m);let E=document.createElement(e);"function"==typeof E.setId?E.setId(t):E.id="widget-layout-"+t;let C=(0,l.validateContainer)(t,e);return H(E,{delegates:p,contentType:m,theme:c,actionHandlers:f},n),v&&E.updateOverrideStyles(v),Y(E,{dataSource:b,labels:h,storyIds:s,contentIds:a,maxItemsCount:r,maxDisplayItemsCount:d,orderType:o,labelsPriority:g,shouldOrderWidgetByReadStatus:y}),C.appendChild(E),E}catch(e){return document.createElement("div")}}function A(e,t){switch(e){case"video":return"row"===t?r.ThemeFactory.create("row-rectangle-horizontal","video"):r.ThemeFactory.create("grid-2-columns-horizontal","video");case"moment":return"row"===t?r.ThemeFactory.create("row-circle","moment"):r.ThemeFactory.create("grid-2-columns","moment");default:return"row"===t?r.ThemeFactory.create("row-circle","story"):r.ThemeFactory.create("grid-2-columns","story")}}function I(e,t){return T("blaze-widget-layout",e,t,A(t.contentType||"story","row"))}function M(e,t){return T("blaze-widget-layout",e,t,A(t.contentType||"story","grid"))}function w(e,t){return T("blaze-widget-embedded-story",e,t,r.ThemeFactory.create("grid-2-columns"))}function _(e,t){return T("blaze-widget-embedded-video",e,t,r.ThemeFactory.create("grid-2-columns","video"))}function P(e,t){let{customRenderer:i,dataSource:n,maxItemsCount:s,maxDisplayItemsCount:a,orderType:r,labelsPriority:d,shouldOrderWidgetByReadStatus:c,contentIds:p,contentType:g="story",theme:v,delegates:y,actionHandlers:m}=t;try{u.BlazeDataSourceValidations.validate(n,g);let t=(0,l.validateContainer)(e,"blaze-widget-custom-layout"),b=new h.BlazeWidgetCustomLayout(i);return"function"==typeof b.setId?b.setId(e):b.id="widget-custom-layout-"+e,H(b,{delegates:y,contentType:g,theme:v,actionHandlers:m}),Y(b,{dataSource:n,maxItemsCount:s,maxDisplayItemsCount:a,orderType:r,labelsPriority:d,shouldOrderWidgetByReadStatus:c,contentIds:p}),t.appendChild(b),b.addEventListener(o.Delegation.onWidgetPlayerDismissed,()=>{b.updateWidgetsData()}),b}catch(e){return document.createElement("div")}}function L(e,t="story"){if("video"===t)return r.ThemeFactory.create(e,"video");if("moment"===t)return r.ThemeFactory.create(e,"moment");
1if("story"!==t&&t)throw Error("Invalid content type");return r.ThemeFactory.create(e,"story")}function x(e,t,i){document.addEventListener(e,t,i)}function O(){return{singleLabel:e=>u.BlazeWidgetLabel.singleLabel(e),mustInclude:(...e)=>u.BlazeWidgetLabel.mustInclude(...e),atLeastOneOf:(...e)=>u.BlazeWidgetLabel.atLeastOneOf(...e)}}function D(){return{labels:e=>u.BlazeDataSourceFactory.createLabelsDataSource(e),ids:e=>u.BlazeDataSourceFactory.createIdsDataSource(e),recommendations:e=>u.BlazeDataSourceFactory.createRecommendationsDataSource(e),text:e=>u.BlazeDataSourceFactory.createTextDataSource(e)}}function B(e){let t=document.getElementsByTagName("blaze-sdk")[0];t&&a.VideoPlayerService.isPlaying===e&&t instanceof h.BlazeWidgetSDK&&t.modal.playToggleCurrentStory()}function N(){B(!0)}function k(){B(!1)}function z(e){a.ConfigService.googleCustomNativeAdHandler=e}function R(e){a.ConfigService.imaAdHandler=e}function j(e,t,i){return n(this,void 0,void 0,function*(){yield U("story",{dataSource:D().ids({ids:[e]}),style:t,actionHandlers:i})})}function V(e,t,i){return n(this,void 0,void 0,function*(){yield U("story",{dataSource:e,style:t,actionHandlers:i})})}function U(e,t){return n(this,void 0,void 0,function*(){var i,n;try{u.BlazeDataSourceValidations.validate(t.dataSource,e),a.ConfigService.staticContentType&&(a.VideoPlayerService.playReference="SingleContent"),yield p.PlayerViewTemplate.display(e,t.dataSource,{actionHandlers:t.actionHandlers,style:null!==(i=null==t?void 0:t.style)&&void 0!==i?i:function(e){switch(e){case"video":return r.Presets.DefaultVideoStyle;case"moment":return r.Presets.DefaultMomentStyle;case"story":return r.Presets.DefaultStoryStyle}}(e),orderByReadStatus:null===(n=null==t?void 0:t.shouldOrderContentByReadStatus)||void 0===n||n})}catch(e){}})}function W(e){a.UserService._abTest=e}function F(){return a.ConfigService.appContext}function H(e,t,i){let{delegates:n,contentType:o,theme:a,actionHandlers:l}=t;n&&e.setDelegations&&e.setDelegations(n),o&&e.setAttribute("content-type",o),a?"string"==typeof a&&o?"video"===o?e.setTheme(r.ThemeFactory.create(a,"video")):"moment"===o?e.setTheme(r.ThemeFactory.create(a,"moment")):"story"===o&&e.setTheme(r.ThemeFactory.create(a,"story")):(0,s.isWidgetTheme)(a)&&e.setTheme(a):i&&e.setTheme(i),l&&e.setActionHandlers&&e.setActionHandlers(l)}function Y(e,t){var i;let{dataSource:n,labels:o,storyIds:s,contentIds:a,maxItemsCount:r,maxDisplayItemsCount:l,orderType:d,labelsPriority:h,shouldOrderWidgetByReadStatus:u}=t;r&&e.setMaxItemsSize?e.setMaxItemsSize(r):(null==n?void 0:n.maxItems)&&e.setMaxItemsSize&&e.setMaxItemsSize(n.maxItems),l&&e.setMaxItemsDisplaySize&&e.setMaxItemsDisplaySize(l),d&&e.setAttribute?e.setAttribute("order-type",d):(null==n?void 0:n.orderType)&&e.setAttribute&&e.setAttribute("order-type",n.orderType),(null==n?void 0:n.advancedOrdering)&&e.setAttribute&&e.setAttribute("advanced-ordering",n.advancedOrdering),(null==n?void 0:n.personalized)&&e.setPersonalized&&e.setPersonalized(n.personalized),h&&e.setLabelsPriority?e.setLabelsPriority(h):(null==n?void 0:n.labelsPriority)&&e.setLabelsPriority&&e.setLabelsPriority(n.labelsPriority),o&&e.setLabels?e.setLabels(o):"labels"===(null==n?void 0:n.sourceType)&&(null==n?void 0:n.labels)&&e.setLabels&&e.setLabels(n.labels),("text"===(null==n?void 0:n.sourceType)||"labels"===(null==n?void 0:n.sourceType))&&(null==n?void 0:n.text)&&e.setAttribute("text",n.text),"recommendations"===(null==n?void 0:n.sourceType)&&(null==n?void 0:n.recommendations)&&e.setAttribute&&e.setAttribute("recommendations",JSON.stringify(n.recommendations)),(null==s?void 0:s.length)&&e.setAttribute?e.setAttribute("story-ids",s.join()):(null==a?void 0:a.length)&&e.setAttribute?e.setAttribute("content-ids",a.join()):"ids"===(null==n?void 0:n.sourceType)&&(null===(i=null==n?void 0:n.ids)||void 0===i?void 0:i.length)&&e.setAttribute&&e.setAttribute("content-ids",n.ids.join());let c=(!!(null==u||u)).toString();e.setAttribute("should-order-widget-by-read-status",c)}function G(e){a.ConfigService.beforeContentPlayCallback=e}function Z(e,t,i){return n(this,void 0,void 0,function*(){let{shouldOrderContentByReadStatus:n=!0}=null!=i?i:{};try{if("moment"!==e)throw Error("Currently only 'moment' content type is supported for appendContentToPlayer");u.BlazeDataSourceValidations.validate(t,e);let i=(0,d.findOpenMomentModal)();if(!i)throw Error("No moment player is currently open");let o=yield a.MomentService.fetchContent(t);if(!o.result||0===o.result.length)throw Error("No content found from data source");let s=o.result;n||(s=yield a.MomentService.enrichContent(o.result)),i.appendContent(s,o.defaultAdsInfo)}catch(e){}})}function Q(e){a.ConfigService.disableAnalytics=e}t.Delegations=o.Delegation,t.pushConsentEvent=a.AnalyticsService.pushConsentEvent,t.isInitialized=()=>h.BlazeWidgetSDK.isSdkConnected(),t.default={Initialize:C,WidgetGridView:M,WidgetRowView:I,WidgetEmbeddedStory:w,WidgetEmbeddedVideo:_,WidgetCustomView:P,Theme:L,addDelegateListener:x,setDoNotTrack:y,setDisableAnalytics:Q,setGeoLocation:m,setPreferredLanguage:b,setOnItemClick:S,LabelBuilder:O,DataSourceBuilder:D,Delegations:o.Delegation,setGoogleCustomNativeAdsHandler:z,setImaHandler:R,pauseCurrentPlayer:N,resumeCurrentPlayer:k,setExternalUserId:f,playStory:j,playStories:V,playContent:U,setAbTestParam
1s:W,getAppContextManager:F,pushConsentEvent:t.pushConsentEvent,isInitialized:t.isInitialized,setBeforeContentPlayCallback:G,appendContentToPlayer:Z}},8187:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8198:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8214:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isStory=function(e){return"story"===e.type||void 0===e.type},t.isVideo=function(e){return"video"===e.type},t.isMoment=function(e){return"moment"===e.type}},8243:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(1072),t),o(i(3835),t),o(i(3634),t),o(i(8214),t)},8252:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseHLSStrategy=t.HLS_CONFIGS=void 0;let o=i(1908),s=i(4545),a=i(8261),r=i(1006),l=i(7195),d={fragLoadingMaxRetry:3,fragLoadingRetryDelay:100},h={abrEwmaFastLive:2,abrEwmaSlowLive:3,abrEwmaFastVoD:2,abrEwmaSlowVoD:3,abrBandWidthFactor:.95,abrBandWidthUpFactor:.9};t.HLS_CONFIGS={LONG_FORM:Object.assign(Object.assign({maxBufferLength:15,maxMaxBufferLength:20,maxBufferSize:1e7,maxBufferHole:4,autoStartLoad:!0},d),h),SHORT_FORM:Object.assign(Object.assign({maxBufferLength:5,maxMaxBufferLength:8,maxBufferSize:1e6,maxBufferHole:.5,autoStartLoad:!1},d),h)};class u extends r.BasePlaybackStrategy{constructor(e,t){super(),this.hls=window.Hls,this.retryCount=0,this.maxRetries=3,this.lastTime=0,this.boundOnBufferAppended=this.handleBufferAppended.bind(this),this.boundOnFragParsed=this.handleFragParsed.bind(this),this.boundOnLoadedMetadata=this.handleLoadedMetadata.bind(this),this.boundOnPlaying=this.handlePlaying.bind(this),this.boundOnCanPlay=this.hideLoader.bind(this),this.boundOnError=this.handleError.bind(this),this.boundOnLevelSwitched=this.handleLevelSwitched.bind(this),this.boundOnNativeError=this.handleNativeError.bind(this),this.handleOnlineNetworkRecovery=()=>{this.retryCount=0,"undefined"!=typeof Hls&&Hls.isSupported()&&this.hls&&"function"==typeof this.hls.startLoad?this.hls.startLoad():this.video.canPlayType("application/vnd.apple.mpegurl")&&this.recoverNativeHls()},this.video=e,this.videoPlayerState=t||s.VideoPlayerService}setupEventListeners(){this.video.addEventListener(a.EVENTS.PLAYING,this.boundOnPlaying),this.video.addEventListener(a.EVENTS.CAN_PLAY_THROUGH,this.boundOnCanPlay)}loadSource(e,t){return n(this,arguments,void 0,function*(e,t,i=0){this.initialBitrateBps=1e3*t,this.lastTime=i,this.isSlowConnection()&&l.HLSQualityManager.clear();let n=this.video.getAttribute("data-original-src");if(this.hls&&Hls.isSupported()&&n&&n!==e){try{"function"==typeof this.hls.destroy&&this.hls.destroy()}catch(e){}this.hls=void 0}this.video.setAttribute("data-original-src",e),Hls.isSupported()?this.setupHLSInstance(e,i):this.video.canPlayType("application/vnd.apple.mpegurl")?this.setupNativeHLS(e,i):this.video.dispatchEvent(new CustomEvent(a.VIDEO_EVENTS.ERROR,{detail:"HLS not supported",bubbles:!0,composed:!0}))})}setupHLSInstance(e,i,n=t.HLS_CONFIGS.LONG_FORM){let o=l.HLSQualityManager.shouldUseMemory()?l.HLSQualityManager.recall():-1;this.hls=new Hls({enableWorker:!0,enableSoftwareAES:!0,debug:!1,maxBufferLength:n.maxBufferLength,maxMaxBufferLength:n.maxMaxBufferLength,maxBufferSize:n.maxBufferSize,maxBufferHole:n.maxBufferHole,fragLoadingMaxRetry:n.fragLoadingMaxRetry,fragLoadingRetryDelay:n.fragLoadingRetryDelay,abrMaxWithRealBitrate:!0,abrEwmaFastLive:n.abrEwmaFastLive,abrEwmaSlowLive:n.abrEwmaSlowLive,abrEwmaFastVoD:n.abrEwmaFastVoD,abrEwmaSlowVoD:n.abrEwmaSlowVoD,abrBandWidthFactor:n.abrBandWidthFactor,abrBandWidthUpFactor:n.abrBandWidthUpFactor,capLevelToPlayerSize:!1,startPosition:i,startLevel:o}),this.hls.loadSource(e),this.hls.attachMedia(this.video),this.hls.on(Hls.Events.BUFFER_APPENDED,this.boundOnBufferAppended),this.hls.on(Hls.Events.FRAG_PARSED,this.boundOnFragParsed),this.hls.on(Hls.Events.ERROR,this.boundOnError),this.hls.on(Hls.Events.LEVEL_SWITCHED,this.boundOnLevelSwitched)}setupNativeHLS(e,t){this.video.src=e,this.video.currentTime=t,this.video.setAttribute("type","application/x-mpegURL"),this.video.addEventListener(a.EVENTS.ERROR,this.boundOnNativeError),this.video.addEventListener(a.EVENTS.LOADED_METADATA,this.boundOnLoadedMetadata)}unload(){var e,t,i,n,o,s,r,l,d,h,u,c;this.hls&&"undefined"!=typeof Hls&&Hls.isSupported()&&(null===(t=(e=this.hls).stopLoad)||void 0===t||t.call(e),null===(n=(i=this.hls).off)||void 0===n||n.call(i,Hls.Events.BUFFER_APPENDED,this.boundOnBufferAppended),null===(s=(o=this.hls).off)||void 0===s||s.call(o,Hls.Events.FRAG_PARSED,this.boundOnFragParsed),null===(l=(r=this.hls).off)||void 0===l||l.call(r,Hls.Events.ERROR,this.boundOnError),null===(h=(d=this.hls).off)||void 0===h||h.
1call(d,Hls.Events.LEVEL_SWITCHED,this.boundOnLevelSwitched),null===(c=(u=this.hls).destroy)||void 0===c||c.call(u),this.hls=void 0),this.video.removeEventListener(a.EVENTS.ERROR,this.boundOnNativeError),this.video.removeEventListener(a.EVENTS.PLAYING,this.boundOnPlaying),this.video.removeEventListener(a.EVENTS.CAN_PLAY_THROUGH,this.boundOnCanPlay),this.video.removeEventListener(a.EVENTS.LOADED_METADATA,this.boundOnLoadedMetadata),this.video.pause(),this.video.preload="none",this.video.removeAttribute("src"),this.video.removeAttribute("data-original-src"),this.video.poster="",this.video.load(),clearTimeout(this.playbackWatchdogTimeout),clearTimeout(this.loaderTimeout),clearTimeout(this.recoveryTimeout)}destroy(){this.unload()}play(){return n(this,void 0,void 0,function*(){var e,t;this.playAttemptStartTime=Date.now();try{null===(t=null===(e=this.hls)||void 0===e?void 0:e.startLoad)||void 0===t||t.call(e),this.startPlaybackWatchdog(),yield this.waitForVideoCondition(()=>this.video.readyState>=3,"canplay",3e3);let i=this.video.play();i&&"function"==typeof i.then?yield i:yield this.waitForVideoCondition(()=>!this.video.paused,"playing",2e3);let n={status:o.PlayStatus.Success};return this.dispatchPlaybackEvent("success",{result:n,timeToPlay:Date.now()-this.playAttemptStartTime}),n}catch(t){let e={status:o.PlayStatus.Failed,error:t};return this.dispatchPlaybackEvent("failed",{result:e,timeToFail:Date.now()-this.playAttemptStartTime}),e}finally{this.hideLoader()}})}pause(){var e,t;this.video.pause(),null===(t=null===(e=this.hls)||void 0===e?void 0:e.stopLoad)||void 0===t||t.call(e),clearTimeout(this.playbackWatchdogTimeout),clearTimeout(this.loaderTimeout),clearTimeout(this.recoveryTimeout)}isPaused(){return this.video.paused}isEnded(){return this.video.ended}getCurrentTime(){return this.video.currentTime}reset(){this.pause(),this.unload(),this.video.preload="none",this.video.removeAttribute("poster"),this.video.load()}getDuration(){return this.video.duration}isMuted(){return this.video.muted}seek(e){if(e<0||e>1||!Number.isFinite(this.video.duration)||this.video.duration<=0)return;let t=e*this.video.duration;Number.isFinite(t)&&t>=0&&t<=this.video.duration&&(this.video.currentTime=t,this.hls&&this.hls.levels&&this.hls.levels.length>0&&this.hls.currentLevel>0&&void 0!==this.hls.nextLoadLevel&&(this.hls.nextLoadLevel=0),this.hls&&!this.video.paused&&"function"==typeof this.hls.startLoad&&this.hls.startLoad(),this.video.paused||this.handleSeekRecovery(t))}setMuted(e){let t=this.video.muted;this.video.muted=e,t!==e&&this.dispatchPlaybackEvent("changed",{previousState:{muted:t},newState:{muted:e}})}toggleMute(){this.setMuted(!this.video.muted)}mute(){this.setMuted(!0)}unmute(){this.setMuted(!1)}toggleFullscreen(){}waitForVideoCondition(e,t,i=3e3){return new Promise((n,o)=>{if(e())return void n();let s=setTimeout(()=>{l(),n()},i),a=e=>{l(),n(e)},r=e=>{l(),o(e)},l=()=>{clearTimeout(s),this.video.removeEventListener(t,a),this.video.removeEventListener("error",r)};this.video.addEventListener(t,a,{once:!0}),this.video.addEventListener("error",r,{once:!0})})}startPlaybackWatchdog(){this.playbackWatchdogTimeout&&clearTimeout(this.playbackWatchdogTimeout),this.lastTime=this.video.currentTime,this.playbackWatchdogTimeout=setTimeout(()=>{this.isSlowConnection()||(this.video.paused||this.video.readyState<3||this.video.currentTime-this.lastTime<.1)&&!this.video.ended&&this.handlePlaybackTimeout()},3e4)}handlePlaybackTimeout(){var e,t,i,n,o,s;"visible"!==document.visibilityState||document.hidden||"function"==typeof document.hasFocus&&!document.hasFocus()||(this.onLoadingState(),this.hls?this.video.error?null===(t=(e=this.hls).recoverMediaError)||void 0===t||t.call(e):(this.pause(),null===(n=(i=this.hls).detachMedia)||void 0===n||n.call(i),null===(s=(o=this.hls).attachMedia)||void 0===s||s.call(o,this.video),this.video.play().catch(e=>{this.reloadStream()})):(this.pause(),this.video.load(),this.video.play().catch(e=>{})))}handleSeekRecovery(e){clearTimeout(this.recoveryTimeout),clearTimeout(this.loaderTimeout),this.loaderTimeout=setTimeout(()=>{navigator.onLine&&this.onLoadingState()},1e3),this.recoveryTimeout=setTimeout(()=>{var t,i;this.video.paused&&(this.hls&&(null===(i=(t=this.hls).recoverMediaError)||void 0===i||i.call(t)),this.video.currentTime=e,this.video.play().catch(()=>{this.reloadStream()}))},5e3),this.seekRecoveryListener&&(this.video.removeEventListener(a.EVENTS.PLAYING,this.seekRecoveryListener),this.seekRecoveryListener=void 0),this.seekRecoveryListener=()=>{clearTimeout(this.recoveryTimeout),clearTimeout(this.loaderTimeout),this.seekRecoveryListener=void 0},this.video.addEventListener(a.EVENTS.PLAYING,this.seekRecoveryListener,{once:!0})}isSlowConnection(){let e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(e){let{effectiveType:t,downlink:i,rtt:n,saveData:o}=e;
1if(o||"2g"===t||"slow-2g"===t||"3g"===t&&(i&&i<1.5||n&&n>400))return!0}return!1}handleBufferAppended(){this.onBufferUpdate(this.getBufferProgress())}handleFragParsed(){this.onBufferUpdate(this.getBufferProgress())}handleError(e,t){if(this.onError(e,t),t.fatal)"networkError"===t.type?this.handleNetworkError():this.handleMediaError();else switch(t.details){case"bufferNudgeOnStall":if(this.onLoadingState(),this.isSlowConnection())return;this.nudgePlayback();break;case"bufferStalledError":this.onLoadingState(),this.isSlowConnection()}}handlePlaying(){this.hideLoader()}handleLevelSwitched(e,t){this.hls&&this.hls.levels&&t.level>=0&&this.hls.levels[t.level]&&l.HLSQualityManager.remember(t.level)}handleNativeError(e){navigator.onLine,this.handleNetworkError(),this.video.dispatchEvent(new CustomEvent(a.VIDEO_EVENTS.ERROR,{detail:e,bubbles:!0,composed:!0}))}handleLoadedMetadata(){this.hideLoader()}getBufferProgress(){if(0===this.video.duration)return 0;let{buffered:e,currentTime:t,duration:i}=this.video;for(let n=0;n<e.length;n++)if(e.start(n)<=t&&e.end(n)>=t)return e.end(n)/i*100;return 0}showLoader(){this.video.dispatchEvent(new CustomEvent(a.VIDEO_EVENTS.LOADER_DISPLAY,{bubbles:!0,composed:!0}))}hideLoader(){this.video.dispatchEvent(new CustomEvent(a.VIDEO_EVENTS.LOADER_HIDE,{bubbles:!0,composed:!0}))}nudgePlayback(){var e;let t=this.video.currentTime;null===(e=this.hls)||void 0===e||e.recoverMediaError(),setTimeout(()=>{this.video.currentTime=t+.1,this.video.play().catch(e=>{})},250)}handleNetworkError(){navigator.onLine?this.retryCount<this.maxRetries?(this.retryCount++,setTimeout(()=>{this.hls&&"function"==typeof this.hls.startLoad?this.hls.startLoad():this.recoverNativeHls()},1e3*Math.pow(2,this.retryCount))):(this.reloadStream(),this.retryCount=0):(window.addEventListener("online",this.handleOnlineNetworkRecovery,{once:!0}),this.onLoadingState())}handleMediaError(){var e,t;this.lastTime=this.video.currentTime,"undefined"!=typeof Hls&&Hls.isSupported()&&this.hls?(null===(t=(e=this.hls).recoverMediaError)||void 0===t||t.call(e),setTimeout(()=>{this.video.currentTime=this.lastTime,this.video.play().catch(e=>{this.reloadStream()})},500)):this.video.canPlayType("application/vnd.apple.mpegurl")&&(this.reloadStream(),setTimeout(()=>{this.video.play().catch(e=>{})},1e3))}recoverNativeHls(){let e=this.video.getAttribute("data-original-src")||this.video.src,t=this.video.currentTime;this.video.pause(),this.video.removeAttribute("src"),this.video.load(),setTimeout(()=>{this.video.src=e,this.video.currentTime=t,this.video.load(),this.video.play().catch(e=>{})},100)}reloadStream(){if(this.retryCount=0,"undefined"!=typeof Hls&&Hls.isSupported()&&this.hls){let e=this.video.getAttribute("data-original-src")||this.video.src;this.hls.detachMedia(),this.hls.attachMedia(this.video),this.hls.loadSource(e),this.hls.startLoad()}else if(this.video.canPlayType("application/vnd.apple.mpegurl")){let e=this.video.getAttribute("data-original-src")||this.video.src,t=this.video.currentTime;this.video.pause(),this.video.removeAttribute("src"),this.video.load(),setTimeout(()=>{this.video.src=e,this.video.currentTime=t,this.video.load()},100)}}reloadWithNewSource(e){return n(this,arguments,void 0,function*(e,t=0,i=0){var n,o,s,a,r,l;if(this.initialBitrateBps=1e3*t,this.lastTime=i,this.video.setAttribute("data-original-src",e),"undefined"!=typeof Hls&&Hls.isSupported()&&this.hls)null===(o=(n=this.hls).stopLoad)||void 0===o||o.call(n),null===(a=(s=this.hls).detachMedia)||void 0===a||a.call(s),this.hls.loadSource(e),null===(l=(r=this.hls).attachMedia)||void 0===l||l.call(r,this.video),i>0&&(this.video.currentTime=i);else{if(!this.video.canPlayType("application/vnd.apple.mpegurl"))throw Error("HLS not supported");this.video.pause(),this.video.src=e,this.video.currentTime=i,this.video.load()}})}}t.BaseHLSStrategy=u},8261:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VIDEO_EVENTS=t.EVENTS=t.KEY_CODES=void 0,t.KEY_CODES={ARROW_UP:"ArrowUp",UP:"Up",PAGE_UP:"PageUp",ARROW_DOWN:"ArrowDown",DOWN:"Down",PAGE_DOWN:"PageDown",SPACE:"Space",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ESCAPE:"Escape"},t.EVENTS={KEYDOWN:"keydown",CLICK:"click",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave",MOUSEMOVE:"mousemove",BLUR:"blur",FOCUS:"focus",VISIBILITY_CHANGE:"visibilitychange",CAN_PLAY_THROUGH:"canplaythrough",PLAY:"play",PLAYING:"playing",PAUSE:"pause",PAUSED:"paused",SEEKING:"seeking",SEEKED:"seeked",LOADED_METADATA:"loadedmetadata",RESIZE:"resize",TIMEUPDATE:"timeupdate",ERROR:"error",ENDED:"ended",FULLSCREEN_CHANGE:"fullscreenchange",FULLSCREEN_CHANGE_WEBKIT:"webkitfullscreenchange",FULLSCREEN_CHANGE_MOZ:"mozfullscreenchange",CUE_CHANGE:"cuechange",DRAGSTART:"dragstart",DRAG:"drag",DROP:"drop",BEFOREUNLOAD:"beforeunload",UNLOAD:"unload",RESIZE_WINDOW:"resize"},t.VIDEO_EVENTS={PLAY:"play-video",REPLAY:"replay-video",PAUSE:"pause
1-video",MUTE:"mute-video",UNMUTE:"unmute-video",SEEK:"seek-video",FULLSCREEN:"fullscreen-video",SHARE:"share-video",LIKE:"like-video",TIME_UPDATE:"time-update",NAVIGATION_PREV:"navigate-prev",NAVIGATION_NEXT:"navigate-next",LOADER_DISPLAY:"loader-display",LOADER_HIDE:"loader-hide",ERROR:"video-error",UPDATE_NAVIGATION:"update-navigation",CTA_CLICKED:"cta-clicked",CTA_VISIBILE:"cta-visible",CTA_DISMISS:"cta-dismiss",RESET_INACTIVITY_TIMER:"reset-inactivity-timer",CLOSE_PLAYER:"close-player",CLOSED_CAPTIONS_OPEN_MODAL:"closed-captions-open-modal",DISPLAY_HIDE_OVERLAY_FROM_CTA:"display-hide-overlay-from-cta",DISPLAY_SEEKED_TIME:"display-seeked-time",UPDATE_CLOSED_CAPTIONS_LOCATION:"update-closed-captions-location"}},8305:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidCountryCode=function(e){return n.CountryCodes.includes(e)};let n=i(6450)},8330:e=>{"use strict";e.exports=JSON.parse('{"name":"@wscsports/blaze-web-sdk","version":"0.34.5","main":"publish/index","types":"publish/index","files":["publish/*"],"scripts":{"start:dev":"webpack-dev-server --config webpack/webpack.config.dev","start:dev-docker":"docker compose up --build","build:types":"dts-bundle-generator --config ./dts-bundle.config.js","build:qa-prod":"webpack --config webpack/webpack.config.qa-prod.js && npm run build:types","build:qa-dev":"webpack --config webpack/webpack.config.qa-dev.js","build:prod":"webpack --config webpack/webpack.config.prod.js && npm run build:types","build:prod-debug":"webpack --config webpack/webpack.config.prod-debug.js && npm run build:types","pack:prod":"npm run build:prod && npm pack","pack:prod-debug":"npm run build:prod-debug && npm pack","publish:latest":"npm run build:prod && npm publish --access public --tag latest","publish:beta":"npm run build:prod && npm publish --access public --tag beta","test:unit":"jest","test:unit:watch":"jest --watch","test:unit:coverage":"jest --coverage","test":"node ./node_modules/@playwright/test/cli.js test --project=\'Desktop Chrome\'","test:desktop":"node ./node_modules/@playwright/test/cli.js test --project=\'Desktop Chrome\' --project=\'Desktop Firefox\' --project=\'Desktop Safari\'","test:desktop:stories":"node ./node_modules/@playwright/test/cli.js test --project=\'Desktop Chrome\' --project=\'Desktop Safari\' e2e-tests/tests/stories","test:desktop:stories:vast-ad":"node ./node_modules/@playwright/test/cli.js test --project=\'Desktop Chrome\' --project=\'Desktop Firefox\' --project=\'Desktop Safari\' tests/stories/playback/story-playback-ad-vast.spec.ts --workers=1","test:desktop:stories:cta-nav":"node ./node_modules/@playwright/test/cli.js test --config=e2e-tests/playwright.config.ts --project=\'Desktop Chrome\' --project=\'Desktop Safari\' e2e-tests/tests/stories/navigation/story-cta-navigation.spec.ts","test:desktop:moments":"node ./node_modules/@playwright/test/cli.js test --project=\'Desktop Chrome\' --project=\'Desktop Safari\' e2e-tests/tests/moments","test:desktop:long-form":"node ./node_modules/@playwright/test/cli.js test --project=\'Desktop Chrome\' --project=\'Desktop Safari\' e2e-tests/tests/video-longform","test:mobile":"node ./node_modules/@playwright/test/cli.js test --project=\'iOS Safari 13\' --project=\'Android Chrome\'","test:mobile:stories":"node ./node_modules/@playwright/test/cli.js test --project=\'iOS Safari 13\' --project=\'Android Chrome\' e2e-tests/tests/stories","test:mobile:moments":"node ./node_modules/@playwright/test/cli.js test --project=\'iOS Safari 13\' e2e-tests/tests/moments","test:mobile:long-form":"node ./node_modules/@playwright/test/cli.js test --project=\'iOS Safari 13\' e2e-tests/tests/video-longform","test:android:stories":"export USE_PHYSICAL_DEVICE=true && export $(cat .env.physical-device 2>/dev/null | xargs) && node ./node_modules/@playwright/test/cli.js test --config=playwright.config.physical-device.ts --project=\'Android Mobile Chrome\' e2e-tests/tests/stories","test:android:moments":"export USE_PHYSICAL_DEVICE=true && export $(cat .env.physical-device 2>/dev/null | xargs) && node ./node_modules/@playwright/test/cli.js test --config=playwright.config.physical-device.ts --project=\'Android Mobile Chrome\' e2e-tests/tests/moments","test:accessibility":"node ./node_modules/@playwright/test/cli.js test --config=e2e-tests/playwright.config.ts --project=\'De
1sktop Chrome\' --project=\'Desktop Firefox\' --project=\'Desktop Safari\' e2e-tests/tests/accessibility"},"devDependencies":{"@axe-core/playwright":"^4.11.0","@playwright/test":"^1.56.0","@types/animejs":"^3.1.7","@types/google_interactive_media_ads_types":"^1.20241219.0","@types/hammerjs":"^2.0.45","@types/jest":"^30.0.0","@types/node":"^24.7.0","@types/ua-parser-js":"^0.7.36","@types/uuid":"^10.0.0","@types/videojs-vtt.js":"^0.15.3","css-loader":"^6.8.1","dts-bundle-generator":"^9.5.1","fs-extra":"^11.1.1","glob-promise":"^6.0.5","html-webpack-plugin":"^5.5.3","intersection-observer":"^0.12.2","javascript-obfuscator":"^4.0.2","jest":"^30.2.0","jest-environment-jsdom":"^30.2.0","jest-junit":"^16.0.0","media-captions":"^0.0.18","npm-registry-fetch":"^16.0.0","playwright-chromium":"^1.56.0","playwright-webkit":"^1.56.0","style-loader":"^3.3.3","ts-jest":"^29.4.6","ts-loader":"^9.4.4","typescript":"^5.4.2","videojs-vtt.js":"^0.15.5","webpack":"^5.88.1","webpack-cli":"^5.1.4","webpack-dev-server":"^4.15.1","webpack-obfuscator":"^3.5.1"},"dependencies":{"animejs":"^3.2.1","hammerjs":"^2.0.8","ua-parser-js":"^1.0.36","uuid":"^8.3.2"}}')},8370:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseModalTemplate=void 0;let o=i(9965),s=i(4545),a=i(9331);t.BaseModalTemplate=class{render(e,t,i){return n(this,void 0,void 0,function*(){let n;try{if(!(n=this.validateRequirements(e)).isValid||!n.blazeSdk||!n.dataSourceStringRep)return;let{blazeSdk:o,dataSourceStringRep:s}=n,r=yield this.fetchContent(e);if(!this.validateContentResponse(r,o,s))return;let l=this.createModal(document.body,t.style,t.actionHandlers),d=this.getService(),h=this.filterContent(r.result);d.enrichContent&&(h=yield d.enrichContent(h)),i&&(h=h.sort(a.sortContentByViewedStatus)),this.configureModal(l,h),this.openModal(l,o)}catch(e){(null==n?void 0:n.blazeSdk)&&n.dataSourceStringRep&&this.handleError(e,n.blazeSdk,n.dataSourceStringRep)}})}validateRequirements(e){if(!e)return{isValid:!1,blazeSdk:null,dataSourceStringRep:void 0};let t=document.getElementsByTagName("blaze-sdk")[0];if(!t)return{isValid:!1,blazeSdk:null,dataSourceStringRep:void 0};let i=(0,a.getDataSourceStringRep)(e);return i?{isValid:!0,blazeSdk:t,dataSourceStringRep:i}:{isValid:!1,blazeSdk:t,dataSourceStringRep:void 0}}filterContent(e){var t;return(null===(t=s.ConfigService.excludeContentId)||void 0===t?void 0:t.length)?e.filter(e=>!s.ConfigService.excludeContentId.includes(e.id)):e}validateContentResponse(e,t,i){var n;return!!(null===(n=null==e?void 0:e.result)||void 0===n?void 0:n.length)||(s.EventService.dispatch(t,o.Delegation.onErrorThrown,{id:i,errorCode:this.getErrorCode()}),!1)}openModal(e,t){try{t.appendChild(e),e.open(),e.onClose=()=>e.remove()}catch(e){throw e}}handleError(e,t,i){i&&s.EventService.dispatch(t,o.Delegation.onErrorThrown,{id:i,errorCode:this.getErrorCode(),error:e instanceof Error?e.message:String(e)})}fetchContent(e){return n(this,void 0,void 0,function*(){return this.getService().fetchContent(e)})}}},8381:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(3334),t)},8398:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};
1Object.defineProperty(t,"__esModule",{value:!0}),t.FullscreenManager=void 0;let o=i(4403),s=i(1908);t.FullscreenManager=class{constructor(e){this.isFullscreen=!1,this.isProgrammaticChange=!1,this.boundOnFullscreenChange=this.handleFullscreenChange.bind(this),this.container=e,o.deviceDetector.isFullscreenSupported&&this.attachEventListeners()}toggleFullscreen(){return n(this,void 0,void 0,function*(){try{this.isProgrammaticChange=!0;let e=this.isFullscreen?this.exitFullscreen():this.enterFullscreen();this.isFullscreen=!this.isFullscreen,yield e}catch(e){this.isFullscreen=!this.isFullscreen,this.isProgrammaticChange=!1}})}waitForFullscreenExit(){return new Promise(e=>{let t=()=>{this.isFullscreenMode()||(this.container.removeEventListener(s.EVENTS.FULLSCREEN_CHANGE,t),this.container.removeEventListener(s.EVENTS.FULLSCREEN_CHANGE_WEBKIT,t),this.container.removeEventListener(s.EVENTS.FULLSCREEN_CHANGE_MOZ,t),e())};this.container.addEventListener(s.EVENTS.FULLSCREEN_CHANGE,t),this.container.addEventListener(s.EVENTS.FULLSCREEN_CHANGE_WEBKIT,t),this.container.addEventListener(s.EVENTS.FULLSCREEN_CHANGE_MOZ,t)})}enterFullscreen(){return n(this,void 0,void 0,function*(){try{this.container.requestFullscreen?yield this.container.requestFullscreen():this.container.webkitRequestFullscreen?yield this.container.webkitRequestFullscreen():this.container.msRequestFullscreen?yield this.container.msRequestFullscreen():this.container instanceof HTMLVideoElement&&this.container.webkitEnterFullscreen?this.container.webkitEnterFullscreen():this.isProgrammaticChange=!1}catch(e){this.isProgrammaticChange=!1}})}exitFullscreen(){return n(this,void 0,void 0,function*(){try{document.exitFullscreen?yield document.exitFullscreen():document.webkitExitFullscreen?yield document.webkitExitFullscreen():document.msExitFullscreen?yield document.msExitFullscreen():this.isProgrammaticChange=!1}catch(e){this.isProgrammaticChange=!1}})}handleFullscreenChange(){var e;let t=this.isFullscreen;if(this.isFullscreen=this.isFullscreenMode(),this.isProgrammaticChange)return void(this.isProgrammaticChange=!1);let i=document.fullscreenElement||document.webkitFullscreenElement||document.msFullscreenElement;(i===this.container||t&&!i)&&(null===(e=this.onFullscreenChangeByBrowser)||void 0===e||e.call(this))}isFullscreenMode(){return!(document.fullscreenElement!==this.container&&document.webkitFullscreenElement!==this.container&&document.msFullscreenElement!==this.container)}attachEventListeners(){document.addEventListener(s.EVENTS.FULLSCREEN_CHANGE,this.boundOnFullscreenChange),document.addEventListener(s.EVENTS.FULLSCREEN_CHANGE_MOZ,this.boundOnFullscreenChange),document.addEventListener(s.EVENTS.FULLSCREEN_CHANGE_WEBKIT,this.boundOnFullscreenChange)}destroy(){document.removeEventListener(s.EVENTS.FULLSCREEN_CHANGE,this.boundOnFullscreenChange),document.removeEventListener(s.EVENTS.FULLSCREEN_CHANGE_MOZ,this.boundOnFullscreenChange),document.removeEventListener(s.EVENTS.FULLSCREEN_CHANGE_WEBKIT,this.boundOnFullscreenChange)}}},8459:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8480:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetAd=void 0;let o=i(9126),s=i(4403),a=i(6450),r=i(9965),l=i(8921),d=i(4545),h=i(4906),u=i(9266);class c extends o.BlazeWidgetVideoBase{constructor(e){super(),this.contentParent=e,this.isCurrentlyDisplay=!1,this.isAdFailed=!1,this.isPlaying=!1,this.adContainer=l.WidgetsFactory.create("blaze-div"),this.placeholderContainer=l.WidgetsFactory.create("blaze-div"),this.boundMessageEvent=this.handleMessageEvent.bind(this),this.ctaModal=l.WidgetsFactory.create("blaze-widget-cta-modal"),this.initStyles()}connectedCallback(){this.append(this.ctaModal),this.render()}disconnectedCallback(){}render(){}handleMessageEvent(e){switch(e.data){case"BLAZE_CTA_CLICK":this.event(a.AdAction.Click,{gesture_type:"CTA Click"});break;case"BLAZE_END_AD":this.contentParent instanceof o.BlazeWidgetStory?(this.contentParent.navigationType="Automatic",this.contentParent.goNextPage()):this.contentParent instanceof o.BlazeWidgetMoment&&this.contentParent.modal.handleClickNavigation("NEXT"),this.dispatchEvent(new CustomEvent(r.InternalEvent.AD_ENDED,{bubbles:!0,cancelable:!1}))}}get currentTime(){return 0}set currentTime(e){}get duration(){return 0}get progress(){return 0}set muted(e){this.changeAdMutedState(e)}getGoogletag(){return window.googletag||{cmd:{push:()=>{}}}}getAdIframeRef(){var e;return document.querySelector('iframe[id*="'+(null===(e=this.data.adInfo)||void 0===e?void 0:e.path)+'"]')}changeAdMutedState(e){if(!this.isCurrentlyDisplay||!this.data)return;let t=this.getAdIframeRef();(null==t?void 0:t.contentWindow)&&(e?t.contentWindow.postMessage("BLAZE_AD_MUTED","*"):t.contentWindow.postMessage("BLAZE_AD_UNMUTED","*"))}setData(e){this.data=e;let t="moment";this.contentParent instanceof o.BlazeWidgetStory&&(t=this.contentParent.mode.split(" ").join("-")),this.adContainer.id=e.id+"-"+t,this.appendChild(this.adContainer)}startEnter(){return n(this,void 0,void 0,function*(){let e=this.data.adInfo;e&&(yield this.isAdContainerConnectedToDOM())&&(this.isCurrentlyDisplay||(window.addEventListener("message",this.boundMessageEvent),this.placeholderContainer.style.display="flex",this.style.display="block",this.style.height="100%",this.isCurrentlyDisplay=!0,this.contentParent.adjustContentView(),this.failToLoadTimeout=setTimeout(()=>{var e;this.isCurrentlyDisplay&&(this.isAdFailed=!0,this.isPlaying&&(null===(e=this.onFail)||void 0===e||e.call(this)))},a.FAIL_TO_LOAD_TIMEOUT_MS),this.event(a.AdAction.Requested),this.getGoogletag().cmd.push(()=>{var t,i;let n=this.findOwnSlot();n&&this.getGoogletag().destroySlots([n]);let s=e.path,r=e=>{var t;if(e.slot.getSlotElementId()===this.adContainer.id){if(clearTimeout(this.failToLoadTimeout),this.failToLoadTimeout=void 0,e.isEmpty)this.isCurrentlyDisplay&&(this.isAdFailed=!0,this.isPlaying&&(null===(t=this.onFail)||void 0===t||t.call(this)));else{this.placeholderContainer.style.display="none",this.isAdFailed=!1,this.event(a.AdAction.View);let e=this.getAdIframeRef(),t=null==e?void 0:e.contentWindow,i=null==t?void 0:t.document.body;i&&(i.style.direction=d.ConfigService.layoutDirection)}this.getGoogletag().pubads().removeEventListener("slotRenderEnded",r)}};this.getGoogletag().pubads().addEventListener("slotRenderEnded",r),this.getGoogletag().pubads().display(s,["fluid",[1,1]],this.adContainer.id);let l=this.findOwnSlot();if(l){let n=(null===(i=null===(t=d.ConfigService.googleCustomNativeAdHandler)||void 0===t?void 0:t.provideAdExtraParams)||void 0===i?void 0:i.call(t,{path:s},this.contentParent.contentExtraInfo))||{};if(this.contentParent instanceof o.BlazeWidgetStory){let e=this.contentParent.currentPageIndexWithoutCustomAds;e&&(n.page_index=e.toString())}
1(0,u.addContextToCustomTargeting)(e,n),Object.entries(n).forEach(([e,t])=>{l.setTargeting(e,t)})}this.getGoogletag().enableServices(),l&&this.getGoogletag().pubads().refresh([l])})))})}endExit(){this.destroyAd()}getIframeVideoElement(){let e=this.getAdIframeRef(),t=null==e?void 0:e.contentWindow,i=null==t?void 0:t.document.body,n=null==i?void 0:i.getElementsByTagName("video");return null==n?void 0:n[0]}play(){var e;this.isPlaying=!0,this.isAdFailed&&(null===(e=this.onFail)||void 0===e||e.call(this));try{let e=this.getIframeVideoElement();e&&"function"==typeof e.play&&e.getAttribute("src")&&e.play()}catch(e){}}get paused(){return!1}pause(){this.isCurrentlyDisplay=!1,this.isPlaying=!1;try{let e=this.getAdIframeRef(),t=null==e?void 0:e.contentWindow,i=null==t?void 0:t.document.body,n=null==i?void 0:i.getElementsByTagName("video"),o=null==n?void 0:n[0];o&&"function"==typeof o.pause&&o.getAttribute("src")&&o.pause()}catch(e){}}removeLoader(){}loadPoster(){}hide(){this.placeholderContainer.style.display="none",this.changeAdMutedState(!0),this.style.display="none",this.isCurrentlyDisplay=!1}display(e){return n(this,void 0,void 0,function*(){this.onFail=e})}mainElement(){return this.adContainer}initStyles(){this.innerHTML+="\n <style>\n blaze-widget-ad iframe {\n height: 100%;\n width: 100%;\n border-radius: "+("mobile"===s.deviceDetector.platform?"0px":"20px")+";\n }\n\n blaze-widget-ad blaze-div div {\n height: 100%;\n }\n </style>\n ",this.style.borderRadius="mobile"===s.deviceDetector.platform?"0px":"20px",this.style.position="absolute",this.style.top="0",this.style.left="0",this.style.right="0",this.style.bottom="0",this.placeholderContainer.style.display="none",this.placeholderContainer.style.top="0",this.placeholderContainer.style.position="absolute",this.placeholderContainer.style.background="black",this.placeholderContainer.style.height="100%",this.placeholderContainer.style.width="100%",this.placeholderContainer.style.justifyContent="center",this.placeholderContainer.style.alignItems="center",this.placeholderContainer.style.borderRadius="mobile"===s.deviceDetector.platform?"0px":"20px";let e=document.createElement("blaze-loader");this.placeholderContainer.appendChild(e),this.appendChild(this.placeholderContainer)}isAdContainerConnectedToDOM(){return new Promise(e=>{var t;(null===(t=this.contentParent.querySelector("#"+this.adContainer.id))||void 0===t?void 0:t.isConnected)?e(!0):new MutationObserver((t,i)=>{for(let n of t)if("childList"===n.type){let t=this.contentParent.querySelector("#"+this.adContainer.id);t&&t.isConnected&&(i.disconnect(),e(!0))}}).observe(document.body,{childList:!0,subtree:!0})})}findOwnSlot(){return this.getGoogletag().pubads().getSlots().find(e=>e.getSlotElementId()===this.adContainer.id)}destroyAd(){this.getGoogletag().cmd.push(()=>{let e=this.findOwnSlot();e&&this.getGoogletag().destroySlots([e])}),window.removeEventListener("message",this.boundMessageEvent)}handleCtaSwipeUp(){let e=this.getAdIframeRef(),t=null==e?void 0:e.contentWindow,i=null==t?void 0:t.document.body,n=null==i?void 0:i.querySelectorAll("a.cta"),r=null==n?void 0:n[0];if(!r)return;this.contentParent instanceof o.BlazeWidgetStory&&this.event(a.AdAction.Click,{gesture_type:"Swipe Up"});let l=r.href,d=r.style.color||h.Colors.Black,u=r.style.backgroundColor||h.Colors.White;this.ctaModal.setAttributes({"border-color":"#fff","background-color":u,"text-color":d,"icon-color":d,"progress-bar-color":d,"cta-url":l}),this.ctaModal.open(),null==t||t.postMessage("BLAZE_CTA_SWIPE_UP","*"),setTimeout(()=>{s.deviceDetector.isIOSMobileTabletSafari()?window.location.href=r.href:window.open(r.href,"_blank"),this.ctaModal.close()},2*a.ONE_SECOND)}event(e,t){var i,n;let r=this.data.adInfo;if(!r)return;let l=this.contentParent.getRefferingObject(),h=new s.AdEvent;switch(e){case a.AdAction.View:h.ad_start_trigger=this.contentParent.startTrigger;break;case a.AdAction.Exit:h.ad_exit_trigger=this.contentParent.exitTrigger;break;case a.AdAction.Click:t&&(h.gesture_type=t.gesture_type)}this.contentParent instanceof o.BlazeWidgetStory?(h.story_id=this.contentParent.data.id,h.story_title=this.contentParent.data.title,h.ad_insertion_logic="AFTER PAGE INDEX 2,7"):this.contentParent instanceof o.BlazeWidgetMoment&&(h.ad_insertion_logic="MOMENT"),h.ad_server="google_ad_manager",h.ad_path=r.path,"true"===(null===(i=d.AppConfigurationService.appConfigurations)||void 0===i?void 0:i.configurations.analyticsAddEntitiesInfo)&&(h.content_extra_info=JSON.stringify(this.contentParent.data.extraInfo)),h.backoffice_campaign_data=(null===(n=this.data.adInfo)||void 0===n?void 0:n.backofficeCampaignData)||"",h.session_id=this.contentParent.sessionId,h.ad_index=this.contentParent.adIndex.toString();let u=this.getIframeVideoElement();u&&(h.ad_duration=u.duration.toString(),h.ad_duration_viewed_percent=(u.currentTime/u.duration*100).toFixed(0)),d.AnalyticsService.pushAdEvent(e,h,void 0,l)}}t.BlazeWidgetAd=c},8529:(e,t,i)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetBannerAd=void 0;let n=i(6450),o=i(9965),s=i(4545),a=i(9266);class r extends HTMLElement{isHidden(){return"block"!==this.style.display||"hidden"===this.style.visibility}constructor(e){super(),this.adContainer=document.createElement("div"),this.isActive=!1,this.gptSlot=null,this.currentAdUnitId=null,this.showDebounceTimer=null,this.pendingSlotRenderEndedHandler=null,this.hasAttemptedLoad=!1,this.parentContnet=e}get googletag(){return window.googletag||{cmd:[]}}connectedCallback(){this.setInitialStyles(),this.setAdContainer()}disconnectedCallback(){if(this.cancelPendingShow(),this.removePendingSlotRenderEndedListener(),this.gptSlot){let e=this.gptSlot;this.gptSlot=null,this.currentAdUnitId=null,this.googletag.cmd.push(()=>{this.googletag.destroySlots([e])})}this.isActive=!1,this.hasAttemptedLoad=!1}cancelPendingShow(){null!==this.showDebounceTimer&&(clearTimeout(this.showDebounceTimer),this.showDebounceTimer=null)}removePendingSlotRenderEndedListener(){if(this.pendingSlotRenderEndedHandler){let e=this.pendingSlotRenderEndedHandler;this.pendingSlotRenderEndedHandler=null,this.googletag.cmd.push(()=>{this.googletag.pubads().removeEventListener("slotRenderEnded",e)})}}show(e,t=!0){s.AdService.canRunAds&&e&&(this.bannerAdInfo=e,this.cancelPendingShow(),this.showDebounceTimer=setTimeout(()=>{this.showDebounceTimer=null,this.executeShow(e,t)},n.BANNER_REQUEST_DEBOUNCE_MS))}executeShow(e,t){this.googletag.cmd.push(()=>{var i,o,r,l;this.isActive=!1;let d=e.adUnitId;this.raiseAnalyticsEventToParent({type:n.AdAction.BannerRequested,adUnitId:d});let h=e=>{e.slot.getSlotElementId()===this.adContainer.id&&(e.isEmpty||(this.hasAttemptedLoad=!0,this.style.display="block",this.style.visibility="visible",this.isActive=!0,t&&(this.raiseAnalyticsEventToParent({type:n.AdAction.BannerLoad,adUnitId:d}),this.raiseAnalyticsViewBannerAd())),this.pendingSlotRenderEndedHandler=null,this.googletag.pubads().removeEventListener("slotRenderEnded",h))};this.pendingSlotRenderEndedHandler=h,this.googletag.pubads().addEventListener("slotRenderEnded",h);let u=(null===(o=null===(i=s.ConfigService.googleCustomNativeAdHandler)||void 0===i?void 0:i.provideAdExtraParams)||void 0===o?void 0:o.call(i,{path:d},this.parentContnet.contentExtraInfo))||{};(0,a.addContextToCustomTargeting)(e,u);let c=this.googletag.pubads().getSlots().filter(e=>e.getSlotElementId().startsWith("ad-banner-")&&e.getSlotElementId()!==this.adContainer.id);if(c.length>0&&this.googletag.destroySlots(c),this.gptSlot&&!this.googletag.pubads().getSlots().some(e=>e.getSlotElementId()===this.adContainer.id)&&(this.gptSlot=null,this.currentAdUnitId=null),this.gptSlot&&this.currentAdUnitId!==d&&(this.googletag.destroySlots([this.gptSlot]),this.gptSlot=null,this.currentAdUnitId=null),this.gptSlot){let e=this.gptSlot;Object.entries(u).forEach(([t,i])=>{e.setTargeting(t,i)}),this.googletag.pubads().refresh([e])}else{this.googletag.pubads().setCentering(!0),this.googletag.enableServices(),this.gptSlot=null!==(l=null===(r=this.googletag.defineSlot(d,[[320,50]],this.adContainer.id))||void 0===r?void 0:r.addService(this.googletag.pubads()))&&void 0!==l?l:null;let e=this.gptSlot;e&&(this.currentAdUnitId=d,Object.entries(u).forEach(([t,i])=>{e.setTargeting(t,i)}),this.googletag.display(this.adContainer.id),this.googletag.pubads().refresh([e]))}})}hide(){this.cancelPendingShow(),this.style.visibility="hidden"}unhide(){this.style.visibility="visible"}setInitialStyles(){(0,a.mergeStyles)(this,{width:"100%",height:"50px",display:"none",overflow:"hidden"})}setAdContainer(){this.adContainer.id="ad-banner-"+Date.now(),this.appendChild(this.adContainer)}raiseAnalyticsEventToParent(e){this.dispatchEvent(new CustomEvent(o.InternalEvent.BANNER_ANALYTICS,{bubbles:!0,detail:e}))}raiseAnalyticsViewBannerAd(){var e;s.AdService.canRunAds&&this.bannerAdInfo&&this.isActive&&!this.isHidden()&&this.raiseAnalyticsEventToParent({type:n.AdAction.BannerView,adUnitId:null===(e=this.bannerAdInfo)||void 0===e?void 0:e.adUnitId})}}t.BlazeWidgetBannerAd=r},8530:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.WSC_PREFIX=t.TRANSPARENT=void 0,t.TRANSPARENT="transparent",t.WSC_PREFIX="wsc_"},8542:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8624:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetsFactory=void 0,t.WidgetsFactory=class{static create(e,t){return document.createElement(e,t)}static define(e,t,i){customElements.get(e)||customElements.define(e,t,i)}static whenDefined(e){return customElements.whenDefined(e)}}},8639:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeChip=void 0;let n=i(4403),o=i(4906);class s extends n.BaseWidget{constructor(){super()}connectedCallback(){this.style.position="absolute",this.style.backgroundColor="",this.style.justifySelf="center",this.style.borderColor=o.Colors.White,this.style.borderStyle="solid",this.style.lineHeight="1",this.innerText=""}}t.BlazeChip=s},8643:(e,t)=>{"use strict";function i(e){return 2*e.message.length+2*e.metadata.length+2*e.logIdentifier.length+100}Object.defineProperty(t,"__esModule",{value:!0}),t.estimateEntrySize=i,t.calculateTotalMemoryUsage=function(e){return e.reduce((e,t)=>e+i(t),0)}},8672:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeImage=void 0;let n=i(4403);class o extends n.BaseWidget{constructor(){super(),this.onError=()=>{this.thumbnailElement.style.display="none"},this.thumbnailElement=document.createElement("img"),this.thumbnailElement.style.width="100%",this.thumbnailElement.style.objectFit="cover",this.thumbnailElement.style.backgroundPosition="center",this.thumbnailElement.style.backgroundRepeat="no-repeat",this.thumbnailElement.style.background="transparent",this.thumbnailElement.style.borderRadius="inherit",this.thumbnailElement.style.pointerEvents="none",this.thumbnailElement.setAttribute("loading","lazy"),this.thumbnailElement.onerror=this.onError}load(e){this.thumbnailElement.src=e,this.append(this.thumbnailElement)}setHeight(e){this.thumbnailElement.style.height=e}setAccessibility(e){this.thumbnailElement.alt=e,this.thumbnailElement.ariaLabel=e}}t.BlazeImage=o},8772:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LongFormHlsStrategy=void 0;let n=i(8252);class o extends n.BaseHLSStrategy{initialize(e){this.videoOverlay=null==e?void 0:e.overlay,this.configureVideoElement(),this.setupEventListeners()}configureVideoElement(){this.video.muted=this.videoPlayerState.isMuted,this.video.playsInline=!0,this.video.controls=!1,this.video.setAttribute("webkit-playsinline","true")}setupHLSInstance(e,t){super.setupHLSInstance(e,t,n.HLS_CONFIGS.LONG_FORM)}onLoadingState(){var e;null===(e=this.videoOverlay)||void 0===e||e.showPlayerOverlay(),this.showLoader()}onBufferUpdate(e){if(!this.videoOverlay||0===this.video.duration)return;let{buffered:t,currentTime:i,duration:n}=this.video;for(let e=0;e<t.length;e++)if(t.start(e)<=i&&t.end(e)>=i){let i=t.end(e)/n*100;this.videoOverlay.videoSeekBar.updateBuffer(i);break}}onError(e,t){var i,n;if(t.fatal)null===(i=this.videoOverlay)||void 0===i||i.showPlayerOverlay();else switch(t.details){case"bufferNudgeOnStall":case"bufferStalledError":null===(n=this.videoOverlay)||void 0===n||n.showPlayerOverlay()}}toggleFullscreen(){var e;null===(e=this.videoOverlay)||void 0===e||e.setFullscreenState()}}t.LongFormHlsStrategy=o},8785:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPersonalizedParamsForRequest=function(e){if(!e||"object"!=typeof e)return{};switch(e.type){case"ids":return{PersonalPlayers:e.players,PersonalTeams:e.teams};case"labels":return{PersonalLabelFilterExpression:e.labelsFilterExpression,PersonalLabelPriority:e.labelsPriority};default:return{}}}},8827:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addToOfflineQueueWithPruning=t.pruneOfflineQueue=t.extractEntryIds=t.sanitizeBatchSizeConfiguration=t.shouldIgnoreLog=t.validateLoggerConfigurationDetailed=t.calculateTotalMemoryUsage=t.estimateEntrySize=t.compressPayload=t.MetadataKeys=t.buildLogMetadata=t.calculateLogPriority=t.isLogLevelAllowed=t.LOG_LEVEL_VALUES=void 0;var n=i(9164);Object.defineProperty(t,"LOG_LEVEL_VALUES",{enumerable:!0,get:function(){return n.LOG_LEVEL_VALUES}}),Object.defineProperty(t,"isLogLevelAllowed",{enumerable:!0,get:function(){return n.isLogLevelAllowed}}),Object.defineProperty(t,"calculateLogPriority",{enumerable:!0,get:function(){return n.calculateLogPriority}});var o=i(41);Object.defineProperty(t,"buildLogMetadata",{enumerable:!0,get:function(){return o.buildLogMetadata}}),Object.defineProperty(t,"MetadataKeys",{enumerable:!0,get:function(){return o.MetadataKeys}});var s=i(9527);Object.defineProperty(t,"compressPayload",{enumerable:!0,get:function(){return s.compressPayload}});var a=i(8643);Object.defineProperty(t,"estimateEntrySize",{enumerable:!0,get:function(){return a.estimateEntrySize}}),Object.defineProperty(t,"calculateTotalMemoryUsage",{enumerable:!0,get:function(){return a.calculateTotalMemoryUsage}});var r=i(9535);Object.defineProperty(t,"validateLoggerConfigurationDetailed",{enumerable:!0,get:function(){return r.validateLoggerConfigurationDetailed}}),Object.defineProperty(t,"shouldIgnoreLog",{enumerable:!0,get:function(){return r.shouldIgnoreLog}}),Object.defineProperty(t,"sanitizeBatchSizeConfiguration",{enumerable:!0,get:function(){return r.s
1anitizeBatchSizeConfiguration}});var l=i(1371);Object.defineProperty(t,"extractEntryIds",{enumerable:!0,get:function(){return l.extractEntryIds}});var d=i(6945);Object.defineProperty(t,"pruneOfflineQueue",{enumerable:!0,get:function(){return d.pruneOfflineQueue}}),Object.defineProperty(t,"addToOfflineQueueWithPruning",{enumerable:!0,get:function(){return d.addToOfflineQueueWithPruning}})},8831:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeDataSourceValidations=t.BlazeDataSourceFactory=t.BlazeInternalError=void 0;let n=i(7133),o=i(4545);t.BlazeInternalError={LabelExpressionMustNotBeEmpty:"labelExpressionMustNotBeEmpty",InvalidNumberOfMaxItems:"invalidNumberOfMaxItems",IdsMustNotBeEmpty:"idsMustNotBeEmpty",MissingLabelsProperty:"missingLabelsProperty",IdsMustNotHaveSpaces:"idsMustNotHaveSpaces",SearchTextMustNotBeEmpty:"searchTextMustNotBeEmpty",ForYouNotSupported:'the "Recommendations - For You" feature is currently not supported on widgets. Please contact support to discuss upgrade options.',TrendingNotSupported:'the "Recommendations - Trending" feature is currently not supported on widgets. Please contact support to discuss upgrade options.',RecommendationTypeMustBeProvided:"At least one recommendation type (forYou or trending) must be provided",ForYouAnyLabelFilterMustBeArray:"For You anyLabelFilter must be an array",ForYouPromotedLabelsMustBeArray:"For You promotedLabels must be an array",TrendingAnyLabelFilterMustBeArray:"Trending anyLabelFilter must be an array",TrendingPromotedLabelsMustBeArray:"Trending promotedLabels must be an array",RecommendationsNotSupportedForVideo:"Recommendations are not supported for video content type",ForYouContentPreparationNotEnabled:"For You content preparation is not enabled for player",TrendingContentPreparationNotEnabled:"Trending content preparation is not enabled for player"};class s{static createLabelsDataSource(e){let{labels:t,text:i,labelsPriority:n,orderType:o,maxItems:r,advancedOrdering:l,personalized:d}=e;try{a.validate({sourceType:"labels",labels:t,text:i,labelsPriority:n,orderType:o,maxItems:r,advancedOrdering:l,personalized:d})}catch(e){}finally{return{sourceType:"labels",labels:t,text:i,labelsPriority:s.setLabelsPriority(n),orderType:o,maxItems:r,advancedOrdering:l,personalized:d}}}static createIdsDataSource(e){let{ids:t,orderType:i,advancedOrdering:n}=e;try{a.validate({sourceType:"ids",ids:t,orderType:i,advancedOrdering:n})}catch(e){}finally{return{sourceType:"ids",ids:t,orderType:i,advancedOrdering:n}}}static createRecommendationsDataSource(e){let{recommendations:t}=e;try{return a.validate({sourceType:"recommendations",recommendations:t}),{sourceType:"recommendations",recommendations:t}}catch(e){return{sourceType:"recommendations"}}}static createTextDataSource(e){let{text:t,orderType:i,maxItems:n,advancedOrdering:o,personalized:s}=e;try{a.validate({sourceType:"text",text:t,orderType:i,maxItems:n,advancedOrdering:o,personalized:s})}catch(e){}finally{return{sourceType:"text",text:t,orderType:i,maxItems:n,advancedOrdering:o,personalized:s}}}static setLabelsPriority(e){return"string"==typeof e?e.startsWith("[")&&e.endsWith("]")?e:"["+e+"]":Array.isArray(e)?e.every(e=>e instanceof n.BlazeWidgetLabel)?"["+e.map(e=>e.toString()).join()+"]":"["+e.join()+"]":""}}t.BlazeDataSourceFactory=s;class a{static validate(e,t){this.validateFormat(e),t&&"recommendations"===e.sourceType&&this.validateRecommendationsForContentType(e,t)}static validateFormat(e){var i,n,o;switch(e.sourceType){case"labels":if(void 0===e.labels||null===e.labels)throw Error(t.BlazeInternalError.MissingLabelsProperty);if(!(null===(i=e.labels)||void 0===i?void 0:i.toString().trim().length))throw Error(t.BlazeInternalError.LabelExpressionMustNotBeEmpty);if(void 0!==e.maxItems&&e.maxItems<=0)throw Error(t.BlazeInternalError.InvalidNumberOfMaxItems);break;case"ids":if(!e.ids||!e.ids.length)throw Error(t.BlazeInternalError.IdsMustNotBeEmpty);if(e.ids.some(e=>/\s/.test(e)))throw Error(t.BlazeInternalError.IdsMustNotHaveSpaces);break;case"text":if(!e.text||!e.text.trim().length)throw Error(t.BlazeInternalError.SearchTextMustNotBeEmpty);if(void 0!==e.maxItems&&e.maxItems<=0)throw Error(t.BlazeInternalError.InvalidNumberOfMaxItems);break;
1case"recommendations":let s=null===(n=e.recommendations)||void 0===n?void 0:n.forYou,a=null===(o=e.recommendations)||void 0===o?void 0:o.trending;if(!s&&!a)throw Error(t.BlazeInternalError.RecommendationTypeMustBeProvided);if(s){if(s.anyLabelFilter&&(!Array.isArray(s.anyLabelFilter)||!s.anyLabelFilter.every(e=>"string"==typeof e&&!/\s/.test(e))))throw Error(t.BlazeInternalError.ForYouAnyLabelFilterMustBeArray);if(s.promotedLabels&&(!Array.isArray(s.promotedLabels)||!s.promotedLabels.every(e=>"string"==typeof e&&!/\s/.test(e))))throw Error(t.BlazeInternalError.ForYouPromotedLabelsMustBeArray)}if(a&&a.anyLabelFilter&&(!Array.isArray(a.anyLabelFilter)||!a.anyLabelFilter.every(e=>"string"==typeof e&&!/\s/.test(e))))throw Error(t.BlazeInternalError.TrendingAnyLabelFilterMustBeArray)}}static validateRecommendationsForContentType(e,i){var n,s,a;if("recommendations"===e.sourceType){let r=null===(n=o.AppConfigurationService.appConfigurations)||void 0===n?void 0:n.recommendationsConfigurations;if(r){let n=null===(s=e.recommendations)||void 0===s?void 0:s.forYou,o=null===(a=e.recommendations)||void 0===a?void 0:a.trending,{supportForYou:l,supportTrending:d,supportStoriesForYou:h,supportStoriesTrending:u,enableForYouContentPreparation:c,enableTrendingContentPreparation:p}=r;if("video"===i)throw Error(t.BlazeInternalError.RecommendationsNotSupportedForVideo);if(n){if(!("story"===i?h:l))throw Error(t.BlazeInternalError.ForYouNotSupported);if(!c)throw Error(t.BlazeInternalError.ForYouContentPreparationNotEnabled)}if(o){if(!("story"===i?u:d))throw Error(t.BlazeInternalError.TrendingNotSupported);if(!p)throw Error(t.BlazeInternalError.TrendingContentPreparationNotEnabled)}}}}}t.BlazeDataSourceValidations=a},8832:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MomentAccessibilityStrategy=t.StoryAccessibilityStrategy=void 0;class i{constructor(e,t){this.contentType=e,this.buttonLabels=t,this.registeredWidgets=new Map}setupAccessibility(e,t){this.registeredWidgets.set(e,t),this.updateLabels(e,t.data)}updateLabels(e,t){let i=this.registeredWidgets.get(e);if(!i)return;let{buttons:n}=i;if(n.play){let e=t.isPlaying?this.buttonLabels.pause:this.buttonLabels.play;n.play.setAriaLabel(""+e)}if(n.mute){let e=t.isMuted?this.buttonLabels.unmute:this.buttonLabels.mute;n.mute.setAriaLabel(""+e)}n.share&&n.share.setAriaLabel(""+this.buttonLabels.share),n.close&&n.close.setAriaLabel(this.buttonLabels.close),n.captions&&n.captions.setAriaLabel(""+this.buttonLabels.captions),n.cta&&t.ctaText?n.cta.setAriaLabel(t.ctaText+" - opens in a new tab"):n.cta&&n.cta.setAriaLabel("Call to action - opens in a new tab")}cleanup(e){this.registeredWidgets.delete(e)}}t.StoryAccessibilityStrategy=class extends i{constructor(e){super("story",e),this.storyButtonLabels=e}updateLabels(e,t){super.updateLabels(e,t);let i=this.registeredWidgets.get(e);if(!i)return;let{buttons:n}=i;n.nextStoryPage&&n.nextStoryPage.setAriaLabel(this.storyButtonLabels.nextStoryPage),n.prevStoryPage&&n.prevStoryPage.setAriaLabel(this.storyButtonLabels.prevStoryPage),n.nextStory&&n.nextStory.setAriaLabel(this.storyButtonLabels.nextStory),n.prevStory&&n.prevStory.setAriaLabel(this.storyButtonLabels.prevStory)}},t.MomentAccessibilityStrategy=class extends i{constructor(e){super("moment",e),this.momentButtonLabels=e}updateLabels(e,t){super.updateLabels(e,t);let i=this.registeredWidgets.get(e);if(!i)return;let{buttons:n}=i;if(n.like){let e=t.isLiked?this.momentButtonLabels.unlike:this.momentButtonLabels.like;n.like.setAriaLabel(""+e)}if(n.follow){let e=t.isFollowed?this.momentButtonLabels.unfollow:this.momentButtonLabels.follow;n.follow.setAriaLabel(""+e)}n.nextMoment&&n.nextMoment.setAriaLabel(this.momentButtonLabels.nextMoment),n.prevMoment&&n.prevMoment.setAriaLabel(this.momentButtonLabels.prevMoment)}}},8878:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8897:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeShareButton=void 0;let n=i(4403),o=i(8921),s=i(277);class a extends n.BaseWidget{constructor(){super()}static get observedAttributes(){return["size","button-type"]}get size(){return this.getAttribute("size")}set size(e){this.setAttribute("size",e)}set type(e){this.setAttribute("button-type",e)}get fontSize(){switch(this.size){case"small":return".5rem";default:case"medium":return".8rem";case"large":return"1rem"}}connectedCallback(){this.onClick&&this.addEventListener("click",this.onClick.bind(this)),this.setStyle({display:"flex",gap:".3rem",flexDirection:"column",alignItems:"center",maxWidth:"3.5rem"})}disconnectedCallback(){this.onClick&&this.removeEventListener("click",this.onClick.bind(this))}attributeChangedCallback(e,t,i){switch(e){case"size":this.onSizeChange(this.getAttribute(e));break;case"button-type":this.onTypeChange(this.getAttribute(e))}}onSizeChange(e="medium"){this.style.fontSize=this.fontSize}onTypeChange(e){"copy-link"===e&&this.createButton("Copy Link",s.IconLink)}createButton(e,t){let i=o.WidgetsFactory.create("blaze-div");i.setStyle({display:"flex",alignItems:"center",justifyContent:"center",width:"3rem",height:"3rem",borderRadius:".3rem",backgroundColor:"#b1b1b1"});let n=o.WidgetsFactory.create("blaze-div");n.setStyle({display:"block",width:"1.5rem",height:"1.5rem",cursor:"pointer",flexShrink:"0",background:"center center url
1('"+t+"') no-repeat",backgroundSize:"contain"});let s=o.WidgetsFactory.create("blaze-typography");s.text=e,s.setStyle({textAlign:"center"}),i.append(n),this.append(i),this.append(s)}}t.BlazeShareButton=a},8921:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(8624),t)},8926:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.PlayerViewTemplate=void 0;let o=i(4906),s=i(9090),a=i(6576),r=i(7525);class l{static display(e,t,i){return n(this,void 0,void 0,function*(){let n=this.templates[e];if(n&&this.validateStyleType(e,i.style))switch(e){case"story":case"video":case"moment":return n.render(t,{style:i.style,actionHandlers:i.actionHandlers},i.orderByReadStatus)}})}static validateStyleType(e,t){switch(e){case"story":if(!(0,o.isStoryPlayerStyle)(t))return!1;break;case"video":if(!(0,o.isVideoPlayerStyle)(t))return!1;break;case"moment":if(!(0,o.isMomentPlayerStyle)(t))return!1}return!0}}t.PlayerViewTemplate=l,l.templates={story:new s.StoryModalTemplate,video:new a.VideoModalTemplate,moment:new r.MomentModalTemplate}},9090:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StoryModalTemplate=void 0;let n=i(5417),o=i(4545),s=i(9126),a=i(9965);class r extends n.BaseModalTemplate{createModal(e,t,i){let n=new s.BlazeWidgetStoryModal(e,t,i);return n.id="blaze-story-modal-"+Math.random().toString(36),n.playerLayout=t,n}configureModal(e,t){var i;e.setModalContent(t,0,void 0),e.player.contentList.forEach(t=>{t.startTrigger="UI Button",t.refContentModal=e,t.resetStoryLocationIndexToLastUnseen()}),e.seek(null!==(i=t[0].id)&&void 0!==i?i:"")}getService(){return o.StoryService}getErrorCode(){return a.ErrorCode.FailedLoadingStories}}t.StoryModalTemplate=r},9100:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CcSupportedLanguages=void 0,t.CcSupportedLanguages=[{code:"en",name:"English"},{code:"es",name:"Spanish"},{code:"fr",name:"French"},{code:"de",name:"German"},{code:"nl",name:"Dutch"},{code:"ja",name:"Japanese"},{code:"null",name:"Default"}]},9114:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetItemSkeleton=void 0;let n=i(4403);class o extends n.BaseWidget{constructor(e,t,i,n){super(),this.width=t,this.thumbnailHeight=i,this.labelHeight=n,this.style.width=t+"px",this.layoutStyle=e}connectedCallback(){var e;if(this.shadowRoot)return;let t=this.attachShadow({mode:"open"}),i=document.createElement("style");i.textContent="\n :host {\n display: inline-block;\n position: relative;\n width: 100%;\n height: 100%;\n overflow: hidden; /* Ensure the skeleton stays within the element */\n }\n\n .thumbnail-loader {\n position: absolute;\n left: 0;\n width: 100%;\n background-image: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);\n background-size: 400% 100%;\n border-radius: "+(null===(e=this.layoutStyle)||void 0===e?void 0:e.borderRadius)+";\n animation: loading 1.5s ease infinite;\n z-index: 0;\n }\n\n .label-loader {\n position: absolute;\n left: 0;\n width: 100%;\n background-image: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);\n background-size: 400% 100%;\n border-radius: 5px;\n animation: loading 1.5s ease infinite;\n z-index: 0;\n }\n\n .thumbnail-loader {\n height: "+this.thumbnailHeight+"px;\n top: 0;\n }\n\n .label-loader {\n height: "+(this.labelHeight-(0===this.layoutStyle.labelStyle.gap?4:this.layoutStyle.labelStyle.gap))+"px;\n bottom: 0;\n }\n\n @keyframes loading {\n 0% {\n background-position: 100% 0;\n }\n 100% {\n background-position: -100% 0;\n }\n }\n ",t.appendChild(i);let n=document.createElement("div");n.classList.add("thumbnail-loader");let o=document.createElement("div");this.layoutStyle.labelStyle.isVisible&&o.classList.add("label-loader"),t.appendChild(n),this.layoutStyle.labelStyle.isVisible&&t.appendChild(o)}}t.BlazeWidgetItemSkeleton=o,customElements.get("blaze-widget-item-skeleton")||customElements.define("blaze-widget-item-skeleton",o)},9126:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);
1o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(5538),t),o(i(2240),t),o(i(1841),t),o(i(8480),t),o(i(8529),t),o(i(6569),t),o(i(1356),t),o(i(3276),t),o(i(9290),t),o(i(1381),t),o(i(5266),t),o(i(51),t),o(i(332),t),o(i(8048),t),o(i(2740),t),o(i(4248),t),o(i(612),t),o(i(3913),t),o(i(6206),t),o(i(6806),t),o(i(1518),t),o(i(7446),t),o(i(1046),t),o(i(4933),t),o(i(2827),t),o(i(9209),t),o(i(6025),t),o(i(7471),t)},9142:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FAIL_TO_LOAD_TIMEOUT_MS=t.ONE_AND_HALF_SECOND=t.ONE_SECOND=void 0,t.ONE_SECOND=1e3,t.ONE_AND_HALF_SECOND=1500,t.FAIL_TO_LOAD_TIMEOUT_MS=3e3},9164:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LOG_LEVEL_VALUES=void 0,t.isLogLevelAllowed=function(e,i){return(t.LOG_LEVEL_VALUES[e]||1)>=(t.LOG_LEVEL_VALUES[i]||1)},t.calculateLogPriority=function(e){return t.LOG_LEVEL_VALUES[e]||1};let n=i(9965);t.LOG_LEVEL_VALUES={[n.LogLevel.DEBUG]:1,[n.LogLevel.INFO]:2,[n.LogLevel.WARN]:3,[n.LogLevel.ERROR]:4,[n.LogLevel.CRITICAL]:5}},9191:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetVideoPlayer=void 0;let s=o(i(2776)),a=i(1908),r=i(4403),l=i(6450),d=i(4545),h=i(9126);class u extends h.WidgetAbstractPlayer{constructor(e="Full Screen",t=d.VideoPlayerService){super(),this.mode=e,this.videoPlayerState=t,this.boundOnNavigationPrev=this.handlePrevDirection.bind(this),this.boundOnNavigationNext=this.handleNextDirection.bind(this),this.boundOnResize=this.calculateDesktopStyles.bind(this),this.boundOnScreenChangeByBrowser=this.handleScreenChangeByBrowser.bind(this),this.boundOnKeyDown=this.handleNavigationKeyPress.bind(this),this.boundOnReplayClick=this.handleReplayClick.bind(this),this.visibilityManager=new r.VisibilityManager(this),this.fullscreenManager=new r.FullscreenManager(this),this.pseudoFullscreenManager=new r.PseudoFullscreenManager(this),this.resumeAfterFocus=!1,this.numberOfContentInList=1}connectedCallback(){this.append(this.srcBackground),this.append(this.destBackground),this.append(this.container),this.applyStyles(),this.setupContainer(),this.setupEventListeners()}disconnectedCallback(){this.detachEventListeners()}destroy(){this.visibilityManager.detach(),this.fullscreenManager.destroy(),this.pseudoFullscreenManager.destroy()}get currentVideoItem(){return this.playerContentList[0]}setupEventListeners(){r.deviceDetector.isDesktop&&(window.addEventListener(a.EVENTS.KEYDOWN,this.boundOnKeyDown),window.addEventListener(a.EVENTS.RESIZE,this.boundOnResize)),this.addEventListener(a.VIDEO_EVENTS.NAVIGATION_PREV,this.boundOnNavigationPrev),this.addEventListener(a.VIDEO_EVENTS.NAVIGATION_NEXT,this.boundOnNavigationNext),this.addEventListener(a.VIDEO_EVENTS.REPLAY,this.boundOnReplayClick),this.fullscreenManager.onFullscreenChangeByBrowser=this.boundOnScreenChangeByBrowser}detachEventListeners(){r.deviceDetector.isDesktop&&(window.removeEventListener(a.EVENTS.KEYDOWN,this.boundOnKeyDown),window.removeEventListener(a.EVENTS.RESIZE,this.boundOnResize)),this.removeEventListener(a.VIDEO_EVENTS.NAVIGATION_PREV,this.boundOnNavigationPrev),this.removeEventListener(a.VIDEO_EVENTS.NAVIGATION_NEXT,this.boundOnNavigationNext)}tryToCloseFullscreen(){return n(this,void 0,void 0,function*(){this.fullscreenManager&&this.fullscreenManager.isFullscreenMode()?(yield this.fullscreenManager.exitFullscreen(),yield this.fullscreenManager.waitForFullscreenExit()):this.pseudoFullscreenManager.isInPseudoFullscreen()&&this.pseudoFullscreenManager.exit()})}isInPseudoFullscreen(){return this.pseudoFullscreenManager.isInPseudoFullscreen()}isCurrentlyInFullscreen(){return this.fullscreenManager.isFullscreenMode()||this.pseudoFullscreenManager.isInPseudoFullscreen()}updateFullscreenState(){var e,t;let i=this.isCurrentlyInFullscreen();this.videoPlayerState.playerLayout=i?"fullscreen":"normal",this.updateContainerStyles(),null===(t=null===(e=this.currentVideoItem)||void 0===e?void 0:e.videoOverlay)||void 0===t||t.setFullscreenState(i)}toggleFullscreen(){return n(this,void 0,void 0,function*(){var e,t;let i=this.isCurrentlyInFullscreen();this.videoPlayerState.playerLayout=i?"normal":"fullscreen",this.updateContainerStyles(),"Embedded"!==this.mode||r.deviceDetector.isFullscreenSupported?yield this.fullscreenManager.toggleFullscreen():this.pseudoFullscreenManager.toggle(
1),null===(t=null===(e=this.currentVideoItem)||void 0===e?void 0:e.widgetVastAd)||void 0===t||t.handleFullscreenChange(),this.updateFullscreenState()})}handleScreenChangeByBrowser(){var e,t,i;this.isCurrentlyInFullscreen()||null===(e=this.currentVideoItem)||void 0===e||e.setPlayerLayoutToNormal(),null===(i=null===(t=this.currentVideoItem)||void 0===t?void 0:t.widgetVastAd)||void 0===i||i.handleFullscreenChange(),this.updateFullscreenState()}applyStyles(){this.setStyle({display:"block",overflow:"hidden",height:"100%",width:"100%",minHeight:"100%",position:"relative"})}setupContainer(){return n(this,void 0,void 0,function*(){this.updateContainerStyles()})}updateContainerStyles(){if(this.pseudoFullscreenManager.isInPseudoFullscreen())return;let e=this.calculateDesktopStyles();this.container.style.cssText="",Object.assign(this.container.style,{overflow:"hidden",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",display:"flex",justifyContent:"center",alignItems:"center"}),"fullscreen"===this.videoPlayerState.playerLayout?Object.assign(this.container.style,{width:"100%",height:"100%",top:"0",left:"0",transform:"none",borderRadius:"0"}):r.deviceDetector.isMobile||r.deviceDetector.isTablet?Object.assign(this.container.style,{width:"100%",height:"100%",borderRadius:"8px"}):Object.assign(this.container.style,e),"Embedded"===this.mode&&Object.assign(this.container.style,{width:"100%",height:"100%",borderRadius:"8px",background:"black"})}calculateDesktopStyles(){let e=16/9,t=.9*window.innerWidth,i=.8*window.innerHeight,n=t,o=n/e;return o>i&&(n=(o=i)*e),{width:n+"px",height:o+"px",objectFit:"contain",borderRadius:"24px"}}handleDirection(e){return n(this,void 0,void 0,function*(){var t,i,n,o;if(!navigator.onLine)return;let s=this.contentList.findIndex(e=>e.data.id===this.currentVideoItem.data.id),a=this.contentList["Backwards"===e?s-1:s+1];if(!a)return this.currentVideoItem.videoOverlay.videoNavigationOverlay.showReplayButton(),void this.pause();if(null===(t=this.onContentChange)||void 0===t||t.call(this,"Backwards"===e?"PREV":"NEXT"),this.currentVideoItem.unload(),d.ConfigService.shouldAllowClosedCaptions){let e=null===(i=a.data.closedCaptions)||void 0===i?void 0:i.find(e=>""+e.language===localStorage.getItem(l.LOCAL_STORAGE_KEY_LAST_SELECTED));this.currentVideoItem.setClosedCaptions(null!==(n=null==e?void 0:e.files)&&void 0!==n?n:[]),null===(o=this.currentVideoItem.closedCaptionsModal)||void 0===o||o.reloadData(a.data.closedCaptions),this.currentVideoItem.videoOverlay.updateClosedCaptionButtonIcon(!!e)}yield this.currentVideoItem.setData(a.data),a.widgetParentItem&&this.currentVideoItem.setWidgetItemParent(a.widgetParentItem),yield this.play()})}handlePrevDirection(){this.handleDirection("Backwards")}handleNextDirection(){this.handleDirection("Forwards")}setContent(e){for(let e of this.playerContentList)e.remove();this.playerContentList=[],this.contentList=e}load(){return n(this,void 0,void 0,function*(){yield this.currentVideoItem.load()})}play(){return n(this,void 0,void 0,function*(){this.updateOverlayNavigationButtons(),yield this.load(),yield this.currentVideoItem.play(),this.currentVideoItem.event(l.VideoAction.VideoStart,{}),this.currentVideoItem.event(l.VideoAction.PlaybackInitialStart,{}),this.videoPlayerState.isPlaying=!0,this.updateOverlayNavigationPlayingState(!0)})}resume(){return n(this,void 0,void 0,function*(){yield this.currentVideoItem.play(),this.currentVideoItem.event(l.VideoAction.VideoStart,{}),this.videoPlayerState.isPlaying=!0,this.updateOverlayNavigationPlayingState(!0)})}pause(){this.currentVideoItem.pause(),this.currentVideoItem.event(l.VideoAction.VideoEnd,{}),this.videoPlayerState.isPlaying=!1,this.updateOverlayNavigationPlayingState(!1)}restart(){this.currentVideoItem.video.currentTime=0,this.currentVideoItem.videoOverlay.videoTimer.updateCurrentTime(0)}updateOverlayNavigationPlayingState(e){this.currentVideoItem.setIsPlaying(e)}updateOverlayNavigationButtons(){let e=this.currentVideoItem.data.id,t=this.contentList.findIndex(t=>t.data.id===e),i=t<this.contentList.length-1;this.currentVideoItem.videoOverlay.videoNavigationOverlay.setAttribute("has-next",i.toString()),this.currentVideoItem.videoOverlay.videoNavigationOverlay.setAttribute("has-prev",(t>0).toString())}handleNavigationKeyPress(e){if(this.isNavigationBlocked||this.currentVideoItem.isPlayingAd||"video"===d.ConfigService.staticContentType)return;let t=null;switch(e.code){case a.KEY_CODES.ARROW_LEFT:t="Backwards";break;case a.KEY_CODES.ARROW_RIGHT:t="Forwards"}t&&this.handleDirection(t)}handleReplayClick(e){this.restart(),this.play()}createAnimation(e,t,i){return s.default.timeline()}handleAnimationStart(e,t){}handleAnimationCompletion(e,t){return n(this,void 0,void 0,function*(){})}loadAndPlayContent(){return n(this,void 0,void 0,function*(){})}preloadAdjacentContent(e){return n(this,void 0,void 0,function*(){})}prefetchPosters(){return n(this,void 0,void 0,function*(){})}onAnimationEnd(){}handleMoveSwipe(e){}handleEndSwipe(e){}resetStyles(){}render(){this.setupContainer()}}t.BlazeWidgetVideoPlayer=u},9205:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0}),t.TextScaleService=void 0;class i{static initialize(){this.initialized||(this.initialized=!0,this.updateScale(),this.focusHandler=()=>this.updateScale(),window.addEventListener("focus",this.focusHandler),this.intervalId=setInterval(()=>this.updateScale(),5e3))}static updateScale(){try{let e=parseFloat(getComputedStyle(document.documentElement).fontSize);this.scale=Math.max(1,e/this.DEFAULT_FONT_SIZE)}catch(e){this.scale=1}}static getScale(){return this.scale}static isScalingNeeded(){return this.scale>1}static scaleFontSize(e){if(null==e)return"";if(1===this.scale)return String(e);let t=String(e),i=t.match(/^([\d.]+)(.*)$/);if(!i)return t;let n=parseFloat(i[1]),o=i[2]||"px";return""+Math.round(n*this.scale*100)/100+o}static scaleLineHeight(e){if(null==e)return"";let t=String(e);return/^[\d.]+$/.test(t)?t:this.scaleFontSize(e)}static cleanup(){this.focusHandler&&(window.removeEventListener("focus",this.focusHandler),this.focusHandler=null),this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null),this.initialized=!1,this.scale=1}}t.TextScaleService=i,i.DEFAULT_FONT_SIZE=16,i.scale=1,i.initialized=!1,i.focusHandler=null,i.intervalId=null},9209:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetCaptions=void 0;let o=i(4784),s=i(4403),a=i(4906);class r extends HTMLElement{constructor(){super(),this.parser=new o.WebVTT.Parser(window,o.WebVTT.StringDecoder()),this.container=document.createElement("div"),this.observer=new MutationObserver(this.checkContainerContent.bind(this)),this.captions=null,this.video=null,this.startTime=0,this.cues=[];let e=this.attachShadow({mode:"open"});this.container.className="captions-container",e.appendChild(this.container),this.boundTimeUpdate=this.handleTimeUpdate.bind(this),this.boundSeekUpdate=this.handleSeekUpdate.bind(this)}static get observedAttributes(){return["is-visible","text-color"]}connectedCallback(){this.setupStyles()}disconnectedCallback(){this.cleanup()}attributeChangedCallback(e,t,i){"is-visible"===e&&t!==i?this.updateVisibility("false"!==i):"text-color"===e&&t!==i&&(this.container.style.color=i)}checkContainerContent(){var e;let t=(null!==(e=this.container.textContent)&&void 0!==e?e:"").trim().length>0;this.container.style.display=t?"block":"none"}handleTimeUpdate(e){this.video&&this.updateCaptions(this.video.currentTime-this.startTime)}handleSeekUpdate(e){this.video&&this.updateCaptions(this.video.currentTime-this.startTime)}setupTimeUpdateHandling(){var e,t;null===(e=this.video)||void 0===e||e.addEventListener("timeupdate",this.boundTimeUpdate),null===(t=this.video)||void 0===t||t.addEventListener("seeked",this.boundSeekUpdate)}cleanup(){var e,t;null===(e=this.video)||void 0===e||e.removeEventListener("timeupdate",this.boundTimeUpdate),null===(t=this.video)||void 0===t||t.removeEventListener("seeked",this.boundSeekUpdate),this.observer.disconnect()}updateVisibility(e){let t=null!=e?e:"false"!==this.getAttribute("is-visible");this.style.display=t?"block":"none"}setupStyles(){var e,t;let i=s.TextScaleService.getScale(),n=document.createElement("style");n.textContent="\n .captions-container {\n position: absolute;\n top: 70px;\n left: 10px;\n background: rgba(51, 51, 51, 0.5);\n color: "+(null!==(e=this.getAttribute("text-color"))&&void 0!==e?e:a.Colors.White)+';\n padding: 10px;\n z-index: 3;\n display: block;\n max-width: 75%;\n unicode-bidi: plaintext;\n white-space: pre-wrap;\n word-break: break-word;\n border-radius: 5px;\n font-family: "Inter", sans-serif;\n font-optical-sizing: auto;\n font-style: normal;\n font-size: '+14*i+"px;\n font-weight: 700;\n line-height: "+22.4*i+"px;\n text-align: left;\n }\n ",null===(t=this.shadowRoot)||void 0===t||t.appendChild(n)}initialize(e,t){return n(this,void 0,void 0,function*(){this.video=e,this.captions=t,this.observer.observe(this.container,{childList:!0,subtree:!0,characterData:!0}
1),yield this.setupCaptions()})}setupCaptions(){return n(this,void 0,void 0,function*(){var e;if(this.video&&(null===(e=this.captions)||void 0===e?void 0:e.length))try{let e=this.captions.find(e=>e.url.endsWith(".vtt"));if(!e)return;let t=yield fetch(e.url);if(!t.ok)throw Error("HTTP error! status: "+t.status);let i=yield t.text();this.cues=[],this.parser.oncue=e=>{this.cues.push(new VTTCue(e.startTime+this.startTime,e.endTime+this.startTime,e.text))},this.parser.onflush=()=>{this.updateCaptions(0),this.setupTimeUpdateHandling()},this.parser.parse(i),this.parser.flush()}catch(e){this.updateVisibility(!1)}})}updateCaptions(e){this.video&&(this.container.innerHTML="",this.cues.forEach(t=>{t.startTime<=e&&t.endTime>=e&&(this.container.innerHTML=t.text)}),this.checkContainerContent())}setAbsolutePosition(e){let{top:t,left:i,right:n,bottom:o}=e;this.container.style.top=null!=t?t:"unset",this.container.style.left=null!=i?i:"unset",this.container.style.right=null!=n?n:"unset",this.container.style.bottom=null!=o?o:"unset"}}t.BlazeWidgetCaptions=r},9266:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(8154),t),o(i(9561),t),o(i(7366),t),o(i(4205),t),o(i(4578),t),o(i(5094),t),o(i(8305),t),o(i(7188),t),o(i(356),t),o(i(8016),t),o(i(8785),t),o(i(3136),t),o(i(9462),t),o(i(9843),t),o(i(1088),t),o(i(5929),t),o(i(6433),t),o(i(5182),t)},9290:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeWidgetEmbeddedVideo=void 0;let o=i(4545),s=i(1908),a=i(1356);class r extends a.BlazeWidgetEmbeddedBase{constructor(){super(),this.contents=[],this.player=new s.BlazeWidgetVideoPlayer("Embedded",this.stateManager)}static get observedAttributes(){return Object.values(a.EMBEDDED_ATTRIBUTES)}setContentIds(e,t){this.setReloadData(t),this.setAttribute(a.EMBEDDED_ATTRIBUTES.ContentIds,e.join())}setId(e){this.id="widget-embedded-video-"+e}getThemeContentType(){return"video"}handleSpecificAttributeChange(e,t,i){e===a.EMBEDDED_ATTRIBUTES.ContentIds&&t&&this.reloadLogic()}handleIntersection(e){if(!this.player.currentVideoItem)return;let t=e.find(e=>e.target===this);t&&(this.isIntersecting=t.isIntersecting,"fullscreen"!==this.player.videoPlayerState.playerLayout&&(this.isIntersecting?this.playContent():this.pauseContent()))}pauseContent(){var e,t;if(!this.player.currentVideoItem)return;let i=this.player.currentVideoItem.isPlayingAd||"Ad"===(null===(e=this.player.currentVideoItem.data)||void 0===e?void 0:e.type);this.player.currentVideoItem.isPlayingAd&&(null===(t=this.player.currentVideoItem.widgetVastAd)||void 0===t||t.pause()),i||(this.stateManager.isPlaying=!1,this.player.pause())}playContent(){var e,t;if(!this.player.currentVideoItem||!this.isIntersecting)return;let i=this.player.currentVideoItem.isPlayingAd||"Ad"===(null===(e=this.player.currentVideoItem.data)||void 0===e?void 0:e.type);this.player.currentVideoItem.isPlayingAd&&(null===(t=this.player.currentVideoItem.widgetVastAd)||void 0===t||t.resume()),i||(this.stateManager.isPlaying=!0,this.player.resume())}loadContent(){return n(this,void 0,void 0,function*(){var e;this.contents=[],this.showSkeleton();let t=this.getAttribute(a.EMBEDDED_ATTRIBUTES.MaxItems),i=this.getAttribute(a.EMBEDDED_ATTRIBUTES.Labels),n=this.getAttribute(a.EMBEDDED_ATTRIBUTES.OrderType),r=this.getAttribute(a.EMBEDDED_ATTRIBUTES.ContentIds),l=this.getAttribute(a.EMBEDDED_ATTRIBUTES.LabelsPriority),d=yield o.VideoService.fetchContent({sourceType:(null==i?void 0:i.length)?"labels":(null==r?void 0:r.length)?"ids":"labels",ids:null==r?void 0:r.split(","),labels:i,orderType:n,maxItems:t,labelsPriority:l});this.defaultAdsInfo=null==d?void 0:d.defaultAdsInfo;let h=null!==(e=null==d?void 0:d.result)&&void 0!==e?e:[];this.getAttribute("should-order-widget-by-read-status")&&"Manual"!==n&&h.length&&h.sort((e,t)=>
1{let i=e.hasViewed?1:2;return(t.hasViewed?1:2)-i}),h.length&&(this.append(this.player),h.forEach((e,t)=>{let i=new s.BlazeVideoElement(this.stateManager);i.setTheme(this.theme.playerStyle),i.setData(e),i.setEmbeddedRef(this),i.startTrigger="Embedded Player in Viewport",this.contents.push(i)}),this.player.setContent(this.contents),this.player.seekContentById(h[0].id),this.player.play(),this.stateManager.isPlaying=!0),this.hideSkeleton()})}getAnimationTargetSelector(){return"blaze-video-element"}}t.BlazeWidgetEmbeddedVideo=r},9321:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9331:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(4458),t),o(i(1948),t)},9340:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9369:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9381:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateFollowStateForAnalytics=t.getFollowEntityByPriority=void 0,t.getFollowEntityByPriority=(e,t)=>{if(!t||0===(null==t?void 0:t.length))return null;if(!e||0===(null==e?void 0:e.length))return t[0];for(let i of e){if("FirstAvailable"===i)return t[0];let e=null==t?void 0:t.find(e=>e.entityType===i);if(e)return e}return null},t.generateFollowStateForAnalytics=(e,t,i)=>{let n;if(!e||!t||!i||!i.isFollowing(e))return null;switch(t){case"Player":n="player_id";break;case"Team":n="team_id";break;case"Property":n="property_id";break;default:return null}return JSON.stringify({[n]:e})}},9456:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CountryCodes=void 0,t.CountryCodes=["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]},9462:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegexVideoHash=t.RegexMomentHash=t.RegexStoryHash=void 0,t.RegexStoryHash=/\/?[&|?|#](blaze\/story\/[^?|&|#]*)/,t.RegexMomentHash=/\/?[&|?|#](blaze\/moment\/[^?|&|#]*)/,t.RegexVideoHash=/\/?[&|?|#](blaze\/video\/[^?|&|#]*)/},9492:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9527:function(e,t){"use strict";var i=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.compressPayload=function(e){return i(this,void 0,void 0,function*(){try{let t="string"==typeof e?e:JSON.stringify(e),i=new TextEncoder().encode(t),n=new CompressionStream("gzip"),o=n.writable.getWriter(),s=n.readable.getReader();o.write(i),o.close();let a=[],r=!1;for(;!r;){let{value:e,done:t}=yield s.read();r=t,e&&a.push(e)}let l=a.reduce((e,t)=>
1e+t.length,0),d=new Uint8Array(l),h=0;for(let e of a)d.set(e,h),h+=e.length;return d.buffer}catch(e){throw Error("Payload compression failed")}})}},9535:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateLoggerConfigurationDetailed=function(e){let t=[];return e.isEnabled&&e.loggerBatchIntervalInSeconds&&e.loggerMaxAllowedBatchSize&&e.loggerMinAllowedBatchSize&&e.logLevel||t.push("Basic configuration validation failed"),{isValid:0===t.length,errors:t}},t.sanitizeBatchSizeConfiguration=function(e){let t=Object.assign({},e);return t.loggerMaxAllowedBatchSize<0?(t.loggerMaxAllowedBatchSize=10,t.loggerMinAllowedBatchSize=1):(t.loggerMinAllowedBatchSize<0&&(t.loggerMinAllowedBatchSize=1),t.loggerMinAllowedBatchSize>t.loggerMaxAllowedBatchSize&&(t.loggerMinAllowedBatchSize=t.loggerMaxAllowedBatchSize)),t},t.shouldIgnoreLog=function(e,t){return t.some(t=>{let i=t.logIdentifier;return i.includes("*")?RegExp("^"+i.replace(/[.+?^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*")+"$").test(e):i===e})}},9561:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isImaAdInfo=function(e){return"IMA"===e.type},t.addContextToCustomTargeting=function(e,t){for(let i in e.context){let n=e.context[i];t[i]=n}}},9565:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LongPressHandler=void 0,t.LongPressHandler=class{constructor(e){this.options=e,this.startPress=()=>{this.pressTimer=setTimeout(()=>{this.isDuringPress=!0,this.options.onStart()},200)},this.endPress=e=>{clearTimeout(this.pressTimer),this.isDuringPress&&(this.options.onEnd(),this.isDuringPress=!1,e.preventDefault())},this.isDuringPress=!1,this.isAttached=!1}attach(e){this.isAttached||(e.addEventListener("touchstart",this.startPress),e.addEventListener("touchend",this.endPress),e.addEventListener("touchcancel",this.endPress),this.isAttached=!0)}detach(e){this.isAttached&&(e.removeEventListener("touchstart",this.startPress),e.removeEventListener("touchend",this.endPress),e.removeEventListener("touchcancel",this.endPress),this.isAttached=!1)}}},9598:(e,t,i)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VisibilityManager=void 0;let n=i(4403),o=i(1908);t.VisibilityManager=class{constructor(e){this.controller=e,this.boundHandleVisibilityChange=this.handleVisibilityChange.bind(this),this.boundHandleFocus=this.handleFocus.bind(this),this.BoundHandleBlur=this.handleBlur.bind(this),this.attachEventListeners()}attachEventListeners(){document.addEventListener(o.EVENTS.VISIBILITY_CHANGE,this.boundHandleVisibilityChange),window.addEventListener(o.EVENTS.BLUR,this.BoundHandleBlur),window.addEventListener(o.EVENTS.FOCUS,this.boundHandleFocus)}handleVisibilityChange(){this.controller.isConnected&&(document.hidden?this.handleBlur():this.handleFocus())}handleBlur(){this.controller.isConnected&&(n.deviceDetector.isDesktop&&!document.hidden&&"visible"===document.visibilityState||(!n.deviceDetector.isTablet&&!n.deviceDetector.isMobile||"visible"!==document.visibilityState||document.hidden)&&(this.controller.currentVideoItem.video.paused||(this.controller.resumeAfterFocus=!0,this.controller.pause())))}handleFocus(){if(this.controller.isConnected&&this.controller.resumeAfterFocus){this.controller.resumeAfterFocus=!1;let e="iOS"===n.deviceDetector.OS,t="Mobile Safari"===n.deviceDetector.browser,i="tablet"===n.deviceDetector.platform&&"Mac OS"===n.deviceDetector.OS,o=e&&("Safari"===n.deviceDetector.browser||"Chrome"===n.deviceDetector.browser);if(e||t||o||i)return void this.controller.pause();this.controller.resume()}}detach(){document.removeEventListener(o.EVENTS.VISIBILITY_CHANGE,this.boundHandleVisibilityChange),window.removeEventListener(o.EVENTS.BLUR,this.BoundHandleBlur),window.removeEventListener(o.EVENTS.FOCUS,this.boundHandleFocus)}}},9605:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9641:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9690:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9696:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Prom
1ise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BlazeDrawer=void 0;let s=o(i(2776)),a=i(4403),r=i(8921);class l extends a.BaseWidget{constructor(){super(),this.backdropContainer=r.WidgetsFactory.create("blaze-div"),this.drawerContainer=r.WidgetsFactory.create("blaze-div")}get drawerContainerHeight(){var e,t;return(null===(e=this.drawerOptions)||void 0===e?void 0:e.height)||(null===(t=this.drawerComponent)||void 0===t?void 0:t.style.height)||"1rem"}static get observedAttributes(){return["open","background-color","border-color","border-radius"]}connectedCallback(){this.append(this.backdropContainer),this.append(this.drawerContainer)}disconnectedCallback(){}attributeChangedCallback(e,t,i){switch(e){case"open":this.onOpenChange(this.getAttribute(e));break;case"background-color":this.drawerContainer.setStyle({backgroundColor:i});break;case"border-color":this.drawerContainer.setStyle({border:"1px solid "+i});break;case"border-radius":this.drawerContainer.setStyle({borderRadius:i})}}onOpenChange(e){return n(this,void 0,void 0,function*(){e?(this.backdropContainer.setStyle({display:"block"}),this.drawerContainer.setStyle({display:"block"}),yield this.animateDrawer(!0,this.drawerOptions)):(yield this.animateDrawer(!1,this.drawerOptions),this.backdropContainer.setStyle({display:"none"}),this.drawerContainer.setStyle({display:"none"}))})}setAttribute(e,t){super.setAttribute(e,t)}onBackdropClick(){this.close()}init(e){let{component:t}=e;this.drawerOptions=e,this.drawerComponent=t,this.drawerContainer.append(t),this.buildBackdrop(),this.buildModal()}buildBackdrop(){this.backdropContainer.onclick=this.onBackdropClick.bind(this),this.backdropContainer.setStyle({display:"none",position:"absolute",backgroundColor:"#000",opacity:".5",top:"0",bottom:"0",left:"0",right:"0",zIndex:"1",borderRadius:"desktop"===a.deviceDetector.platform||"tablet"===a.deviceDetector.platform?"20px":"0"})}buildModal(){this.drawerContainer.id="blaze-modal",this.drawerContainer.setStyle({display:"none",position:"absolute",backgroundColor:"#FFF",bottom:"-"+this.drawerContainerHeight,left:"0",right:"0",borderTopRightRadius:".5rem",borderTopLeftRadius:".5rem",height:this.drawerContainerHeight,zIndex:"5"})}open(){var e;this.setAttribute("open","true"),null===(e=this.onOpen)||void 0===e||e.call(this)}close(){var e;this.setAttribute("open","false"),null===(e=this.onClose)||void 0===e||e.call(this)}animateDrawer(e,t){return n(this,void 0,void 0,function*(){if(t)return new Promise(i=>{let n=this.querySelector("#blaze-modal");if(!n)return;let o={targets:n,duration:200,easing:"easeInQuad",complete:()=>i()};if(t){switch(t.anchor){case"top":case"right":case"left":break;case"bottom":o=Object.assign(Object.assign({},o),{bottom:e?"0":"-"+this.drawerContainerHeight})}(0,s.default)(o)}})})}}t.BlazeDrawer=l},9697:(e,t,i)=>{var n,o=void 0!==i.g?i.g:"undefined"!=typeof window?window:{},s=i(542);"undefined"!=typeof document?n=document:(n=o["__GLOBAL_DOCUMENT_CACHE@4"])||(n=o["__GLOBAL_DOCUMENT_CACHE@4"]=s),e.exports=n},9702:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(683),t),o(i(2954),t),o(i(5925),t),o(i(147),t),o(i(8198),t),o(i(1758),t),o(i(9492),t),o(i(7497),t),o(i(6614),t),o(i(763),t),o(i(4858),t),o(i(2743),t),o(i(432),t),o(i(6426),t),o(i(4710),t),o(i(9605),t)},9777:(e,t)=>{"use strict";
1Object.defineProperty(t,"__esModule",{value:!0})},9840:(e,t,i)=>{var n;n="undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},e.exports=n},9843:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedEventTarget=void 0,"undefined"!=typeof window&&(()=>{if(void 0===window.EventTarget)return!0;try{return new window.EventTarget,!1}catch(e){return!0}})()&&(window.EventTarget=class{constructor(){this._listeners={}}addEventListener(e,t){t&&(this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].includes(t)||this._listeners[e].push(t))}removeEventListener(e,t){if(!t)return;let i=this._listeners[e];i&&(this._listeners[e]=i.filter(e=>e!==t),0===this._listeners[e].length&&delete this._listeners[e])}dispatchEvent(e){if(!e||"string"!=typeof e.type)return!1;let t=this._listeners[e.type];if(!t||0===t.length)return!0;for(let i of[...t])try{"function"==typeof i?i.call(this,e):i&&"function"==typeof i.handleEvent&&i.handleEvent.call(this,e)}catch(e){}return!0}}),t.SharedEventTarget=new EventTarget},9862:(e,t)=>{"use strict";var i,n;Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonState=void 0,(n=i||(t.ButtonState=i={}))[n.Play=0]="Play",n[n.Pause=1]="Pause",n[n.Mute=2]="Mute",n[n.Unmute=3]="Unmute"},9903:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},9917:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.WidgetsService=void 0;let o=i(4403),s=i(5785),a=i(8921),r=i(1908),l=i(9126);class d extends(0,o.Singleton)(){init(){return n(this,void 0,void 0,function*(){a.WidgetsFactory.define("blaze-widget-vast-ad",l.BlazeWidgetVastAd),a.WidgetsFactory.define("blaze-widget-ad",l.BlazeWidgetAd),a.WidgetsFactory.define("blaze-widget-embedded-story",l.BlazeWidgetEmbeddedStory),a.WidgetsFactory.define("blaze-widget-embedded-video",l.BlazeWidgetEmbeddedVideo),a.WidgetsFactory.define("blaze-widget-modal",l.BlazeWidgetModal),a.WidgetsFactory.define("blaze-widget-item",l.BlazeWidgetItem),a.WidgetsFactory.define("blaze-widget-layout",l.BlazeWidgetLayout),a.WidgetsFactory.define("blaze-widget-custom-layout",l.BlazeWidgetCustomLayout),a.WidgetsFactory.define("blaze-widget-story",l.BlazeWidgetStory),a.WidgetsFactory.define("blaze-widget-story-player",l.BlazeWidgetStoryPlayer),a.WidgetsFactory.define("blaze-widget-story-modal",l.BlazeWidgetStoryModal),a.WidgetsFactory.define("blaze-widget-moment",l.BlazeWidgetMoment),a.WidgetsFactory.define("blaze-widget-moment-player",l.BlazeWidgetMomentPlayer),a.WidgetsFactory.define("blaze-widget-moment-modal",l.BlazeWidgetMomentModal),a.WidgetsFactory.define("blaze-widget-moment-seek-bar",l.BlazeWidgetMomentSeekBar),a.WidgetsFactory.define("blaze-widget-video",l.BlazeWidgetVideo),a.WidgetsFactory.define("blaze-widget-share-modal",l.BlazeWidgetShareModal),a.WidgetsFactory.define("blaze-widget-cc-modal",l.BlazeWidgetClosedCaptionsModal),a.WidgetsFactory.define("blaze-widget-cta-modal",l.BlazeWidgetCtaModal),a.WidgetsFactory.define("blaze-widget-interaction",l.BlazeWidgetInteraction),a.WidgetsFactory.define("blaze-widget-banner-ad",l.BlazeWidgetBannerAd),a.WidgetsFactory.define("blaze-widget-captions",l.BlazeWidgetCaptions),a.WidgetsFactory.define("blaze-video-element",l.BlazeVideoElement),a.WidgetsFactory.define("blaze-video-long-form-overlay",r.BlazeLongFormControlsOverlay),a.WidgetsFactory.define("blaze-widget-video-player",r.BlazeWidgetVideoPlayer),a.WidgetsFactory.define("blaze-video-modal",r.BlazeWidgetVideoModal),a.WidgetsFactory.define("blaze-video-navigation-overlay",r.BlazeVideoNavigationOverlay),a.WidgetsFactory.define("blaze-video-seek-bar",r.BlazeVideoSeekBar),a.WidgetsFactory.define("blaze-loader",s.BlazeLoader),a.WidgetsFactory.define("blaze-chip",s.BlazeChip),a.WidgetsFactory.define("blaze-image",s.BlazeImage),a.WidgetsFactory.define("blaze-alert",s.BlazeAlert),a.WidgetsFactory.define("blaze-modal",s.BlazeDrawer),a.WidgetsFactory.define("blaze-player
1-menu",s.BlazePlayerMenu),a.WidgetsFactory.define("blaze-div",s.BlazeDiv),a.WidgetsFactory.define("blaze-share-button",s.BlazeShareButton),a.WidgetsFactory.define("blaze-button",s.BlazeButton),a.WidgetsFactory.define("blaze-button-cta",s.BlazeCtaButton),a.WidgetsFactory.define("blaze-call-to-action-button",s.BlazeCallToActionButton),a.WidgetsFactory.define("blaze-follow-button",s.BlazeFollowButton),a.WidgetsFactory.define("blaze-typography",s.BlazeTypography),a.WidgetsFactory.define("blaze-timer",r.BlazeTimer)})}}t.WidgetsService=d.getInstance()},9965:function(e,t,i){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),o=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||n(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),o(i(2409),t),o(i(2506),t),o(i(7705),t),o(i(9862),t),o(i(2171),t),o(i(4765),t)},9983:function(e,t,i){"use strict";var n=this&&this.__awaiter||function(e,t,i,n){return new(i||(i=Promise))(function(o,s){function a(e){try{l(n.next(e))}catch(e){s(e)}}function r(e){try{l(n.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?o(e.value):((t=e.value)instanceof i?t:new i(function(e){e(t)})).then(a,r)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.VideoPlayerService=void 0;let o=i(4545),s=i(4403);class a extends(0,s.Singleton)(){constructor(){super(),this._isMuted=!0,this._isPlaying=!0,this._isNavigating=!1,this._isModalOpen=!1,this._isSeekBarDragging=!1,this._currentPlayedContentId="",this._playerLayoutDisplay="normal",this.muteStateBeforeAd="no-ad",this._playReference="Widget",this.updateExcludeContentIdFromURL()}init(){return n(this,void 0,void 0,function*(){})}get isMuted(){return this._isMuted}set isMuted(e){this._isMuted=e}updateExcludeContentIdFromURL(){let e=new URLSearchParams(window.location.search).get(s.URL_PARAMS.EXCLUDE_CONTENT_ID);e&&(o.ConfigService.excludeContentId=e,s.URLManager.removeStringParamsFromCurrentUrl(s.URL_PARAMS.EXCLUDE_CONTENT_ID))}get currentlyPlayedContentId(){return this._currentPlayedContentId}set currentlyPlayedContentId(e){this._currentPlayedContentId=e}get isPlaying(){return this._isPlaying}set isPlaying(e){this._isPlaying=e}get isNavigating(){return this._isNavigating}set isNavigating(e){this._isNavigating=e}get playReference(){return this._playReference}set playReference(e){this._playReference=e}get isModalOpen(){return this._isModalOpen}set isModalOpen(e){this._isModalOpen=e}get isSeekBarDragging(){return this._isSeekBarDragging}set isSeekBarDragging(e){this._isSeekBarDragging=e}get playerLayout(){return this._playerLayoutDisplay}set playerLayout(e){this._playerLayoutDisplay=e}}t.VideoPlayerService=a.getInstance()}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,i),s.exports}return i.amdO={},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(8156)})(),e.exports=t()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.