import{a as ao,b as Ye,c as lo}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-VMHER7LG.js";import{a as te,c as Fe,d as Rt,f as eo,h as It,j as to}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-R73QAR6I.js";import{a as Ne,b as so}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-3TBF7G6S.js";import{a as Wt,b as no}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-PGY4GJQT.js";import{a as B,b as Tt}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-2BUBKS6J.js";import{a as Et,b as Zr}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-E3PN6FPW.js";import{a as _t,b as Xr}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-KHUCEDJC.js";import{j as Ct,n as ce,o as Jr}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-UOREKGLD.js";import{h as xe,s as kt,u as St,x as De}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-RTWVJP45.js";import{d as Ke,e as ro}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-3GCR2AMZ.js";import{a as Lt,b as io}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-2ITC2CN6.js";import{a as oo}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-5W4SOH7E.js";import{a as Ot,b as Qr,c as Z,d as j,f as ee,g as fe}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-KIV3G2U7.js";import{k as $e,o as Fr,q as ze,r as Kr}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-3MHJUKLY.js";import{a as Q,b as de,k as Oe}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-NK3IIPNH.js";import{a as xt}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-QIWOHHQR.js";import{a as h,d as X}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-TDWJQPXH.js";import{i as Ue,j as je,k as G,l as Be,p as J,q as qe}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-EKZ77NER.js";import{C as bt,D as Ve,m as Ae,v as Pt}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-VJNBKADO.js";import{b as wt,e as Gr}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-SFQDXO5D.js";import{r as V,s as Yr,v as Se}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-FSQTZK5P.js";import{e as M,j as vt}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-3KKZC7PX.js";import{c as gt}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-R2KIU7TX.js";import{C as Ce,D as u,E as z,F as T}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-NZVUOPQ3.js";import{a as A}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-DBI7FGLY.js";import{b as pe,c as Nr}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-JZQ46BAR.js";import{a as He,b as qr}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-IEGAWPK5.js";import{a as x,b as Y,d as U,f as ke}from"https://st-p.rmcdn1.net/341d0bff/dist/c/c-Y625Z7UC.js";var $t=Y((Di,Ht)=>{"use strict";var Xe=Object.defineProperty,uo=Object.getOwnPropertyDescriptor,po=Object.getOwnPropertyNames,co=Object.prototype.hasOwnProperty,fo=(e,t)=>{for(var r in t)Xe(e,r,{get:t[r],enumerable:!0})},yo=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of po(t))!co.call(e,i)&&i!==r&&Xe(e,i,{get:()=>t[i],enumerable:!(o=uo(t,i))||o.enumerable});return e},mo=e=>yo(Xe({},"__esModule",{value:!0}),e),Mt={};fo(Mt,{default:()=>ho});Ht.exports=mo(Mt);var W=Ye(),O=lo(),ho=[{key:"youtube",name:"YouTube",canPlay:O.canPlay.youtube,lazyPlayer:(0,W.lazy)(()=>import("https://st-p.rmcdn1.net/341d0bff/dist/c/c-DSRZWNXD.js"))},{key:"soundcloud",name:"SoundCloud",canPlay:O.canPlay.soundcloud,lazyPlayer:(0,W.lazy)(()=>import("https://st-p.rmcdn1.net/341d0bff/dist/c/c-NZR76JKT.js"))},{key:"vimeo",name:"Vimeo",canPlay:O.canPlay.vimeo,lazyPlayer:(0,W.lazy)(()=>import("https://st-p.rmcdn1.net/341d0bff/dist/c/c-GWMTDA3D.js"))},{key:"mux",name:"Mux",canPlay:O.canPlay.mux,lazyPlayer:(0,W.lazy)(()=>import("https://st-p.rmcdn1.net/341d0bff/dist/c/c-6PSEJDY5.js"))},{key:"facebook",name:"Facebook",canPlay:O.canPlay.facebook,lazyPlayer:(0,W.lazy)(()=>import("https://st-p.rmcdn1.net/341d0bff/dist/c/c-TRDU7KQ6.js"))},{key:"streamable",name:"Streamable",canPlay:O.canPlay.streamable,lazyPlayer:(0,W.lazy)(()=>import("https://st-p.rmcdn1.net/341d0bff/dist/c/c-EJ5XZC5B.js"))},{key:"wistia",name:"Wistia",canPlay:O.canPlay.wistia,lazyPlayer:(0,W.lazy)(()=>import("https://st-p.rmcdn1.net/341d0bff/dist/c/c-VTBC54LW.js"))},{key:"twitch",name:"Twitch",canPlay:O.canPlay.twitch,lazyPlayer:(0,W.lazy)(()=>import("https://st-p.rmcdn1.net/341d0bff/dist/c/c-UG2L6LQJ.js"))},{key:"dailymotion",name:"DailyMotion",canPlay:O.canPlay.dailymotion,lazyPlayer:(0,W.lazy)(()=>import("https://st-p.rmcdn1.net/341d0bff/dist/c/c-OFP3J5Z3.js"))},{key:"mixcloud",name:"Mixcloud",canPlay:O.canPlay.mixcloud,lazyPlayer:(0,W.lazy)(()=>import("https://st-p.rmcdn1.net/341d0bff/dist/c/c-PE3QO3XT.js"))},{key:"vidyard",name:"Vidyard",canPlay:O.canPlay.vidyard,lazyPlayer:(0,W.lazy)(()=>import("https://st-p.rmcdn1.net/341d0bff/dist/c/c-CVZBXNRN.js"))},{key:"kaltura",name:"Kaltura",canPlay:O.canPlay.kaltura,lazyPlayer:(0,W.lazy)(()=>import("https://st-p.rmcdn1.net/341d0bff/dist/c/c-OBZ5DC3B.js"))},{key:"file",name:"FilePlayer",canPlay:O.canPlay.file,canEnablePIP:e=>O.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,W.supportsWebKitPresentationMode)())&&!O.AUDIO_EXTENSIONS.test(e),lazyPlayer:(0,W.lazy)(()=>import("https://st-p.rmcdn1.net/341d0bff/dist/c/c-4OG3SZ2Q.js"))}]});var Vt=Y((Ui,At)=>{"use strict";var zt=Number.isNaN||function(t){return typeof t=="number"&&t!==t};function Po(e,t){return!!(e===t||zt(e)&&zt(t))}function bo(e,t){if(e.length!==t.length)return!1;for(var r=0;r{"use strict";var vo=Object.create,Ee=Object.defineProperty,_o=Object.getOwnPropertyDescriptor,wo=Object.getOwnPropertyNames,ko=Object.getPrototypeOf,So=Object.prototype.hasOwnProperty,Co=(e,t)=>{for(var r in t)Ee(e,r,{get:t[r],enumerable:!0})},Ut=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of wo(t))!So.call(e,i)&&i!==r&&Ee(e,i,{get:()=>t[i],enumerable:!(o=_o(t,i))||o.enumerable});return e},xo=(e,t,r)=>(r=e!=null?vo(ko(e)):{},Ut(t||!e||!e.__esModule?Ee(r,"default",{value:e,enumerable:!0}):r,e)),Oo=e=>Ut(Ee({},"__esModule",{value:!0}),e),jt={};Co(jt,{defaultProps:()=>Io,propTypes:()=>Ro});Bt.exports=Oo(jt);var Eo=xo(oo()),{string:_,bool:E,number:re,array:Ge,oneOfType:ye,shape:H,object:S,func:g,node:Dt}=Eo.default,Ro={url:ye([_,Ge,S]),playing:E,loop:E,controls:E,volume:re,muted:E,playbackRate:re,width:ye([_,re]),height:ye([_,re]),style:S,progressInterval:re,playsinline:E,pip:E,stopOnUnmount:E,light:ye([E,_,S]),playIcon:Dt,previewTabIndex:re,previewAriaLabel:_,fallback:Dt,oEmbedUrl:_,wrapper:ye([_,g,H({render:g.isRequired})]),config:H({soundcloud:H({options:S}),youtube:H({playerVars:S,embedOptions:S,onUnstarted:g}),facebook:H({appId:_,version:_,playerId:_,attributes:S}),dailymotion:H({params:S}),vimeo:H({playerOptions:S,title:_}),mux:H({attributes:S,version:_}),file:H({attributes:S,tracks:Ge,forceVideo:E,forceAudio:E,forceHLS:E,forceSafariHLS:E,forceDisableHls:E,forceDASH:E,forceFLV:E,hlsOptions:S,hlsVersion:_,dashVersion:_,flvVersion:_}),wistia:H({options:S,playerId:_,customControls:Ge}),mixcloud:H({options:S}),twitch:H({options:S,playerId:_}),vidyard:H({options:S})}),onReady:g,onStart:g,onPlay:g,onPause:g,onBuffer:g,onBufferEnd:g,onEnded:g,onError:g,onDuration:g,onSeek:g,onPlaybackRateChange:g,onPlaybackQualityChange:g,onProgress:g,onClickPreview:g,onEnablePIP:g,onDisablePIP:g},w=()=>{},Io={playing:!1,loop:!1,controls:!1,volume:null,muted:!1,playbackRate:1,width:"640px",height:"360px",style:{},progressInterval:1e3,playsinline:!1,pip:!1,stopOnUnmount:!0,light:!1,fallback:null,wrapper:"div",previewTabIndex:0,previewAriaLabel:"",oEmbedUrl:"https://noembed.com/embed?url={url}",config:{soundcloud:{options:{visual:!0,buying:!1,liking:!1,download:!1,sharing:!1,show_comments:!1,show_playcount:!1}},youtube:{playerVars:{playsinline:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1},embedOptions:{},onUnstarted:w},facebook:{appId:"1309697205772819",version:"v3.3",playerId:null,attributes:{}},dailymotion:{params:{api:1,"endscreen-enable":!1}},vimeo:{playerOptions:{autopause:!1,byline:!1,portrait:!1,title:!1},title:null},mux:{attributes:{},version:"2"},file:{attributes:{},tracks:[],forceVideo:!1,forceAudio:!1,forceHLS:!1,forceDASH:!1,forceFLV:!1,hlsOptions:{},hlsVersion:"1.1.4",dashVersion:"3.1.3",flvVersion:"1.5.0",forceDisableHls:!1},wistia:{options:{},playerId:null,customControls:null},mixcloud:{options:{hide_cover:1}},twitch:{options:{},playerId:null},vidyard:{options:{}}},onReady:w,onStart:w,onPlay:w,onPause:w,onBuffer:w,onBufferEnd:w,onEnded:w,onError:w,onDuration:w,onSeek:w,onPlaybackRateChange:w,onPlaybackQualityChange:w,onProgress:w,onClickPreview:w,onEnablePIP:w,onDisablePIP:w}});var Gt=Y((Bi,Xt)=>{"use strict";var Lo=Object.create,me=Object.defineProperty,To=Object.getOwnPropertyDescriptor,Wo=Object.getOwnPropertyNames,Mo=Object.getPrototypeOf,Ho=Object.prototype.hasOwnProperty,$o=(e,t,r)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zo=(e,t)=>{for(var r in t)me(e,r,{get:t[r],enumerable:!0})},Ft=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Wo(t))!Ho.call(e,i)&&i!==r&&me(e,i,{get:()=>t[i],enumerable:!(o=To(t,i))||o.enumerable});return e},Kt=(e,t,r)=>(r=e!=null?Lo(Mo(e)):{},Ft(t||!e||!e.__esModule?me(r,"default",{value:e,enumerable:!0}):r,e)),Ao=e=>Ft(me({},"__esModule",{value:!0}),e),P=(e,t,r)=>($o(e,typeof t!="symbol"?t+"":t,r),r),Nt={};zo(Nt,{default:()=>oe});Xt.exports=Ao(Nt);var qt=Kt(A()),Vo=Kt(xt()),Yt=Je(),Do=Ye(),Uo=5e3,oe=class extends qt.Component{constructor(){super(...arguments),P(this,"mounted",!1),P(this,"isReady",!1),P(this,"isPlaying",!1),P(this,"isLoading",!0),P(this,"loadOnReady",null),P(this,"startOnPlay",!0),P(this,"seekOnPlay",null),P(this,"onDurationCalled",!1),P(this,"handlePlayerMount",t=>{if(this.player){this.progress();return}this.player=t,this.player.load(this.props.url),this.progress()}),P(this,"getInternalPlayer",t=>this.player?this.player[t]:null),P(this,"progress",()=>{if(this.props.url&&this.player&&this.isReady){let t=this.getCurrentTime()||0,r=this.getSecondsLoaded(),o=this.getDuration();if(o){let i={playedSeconds:t,played:t/o};r!==null&&(i.loadedSeconds=r,i.loaded=r/o),(i.playedSeconds!==this.prevPlayed||i.loadedSeconds!==this.prevLoaded)&&this.props.onProgress(i),this.prevPlayed=i.playedSeconds,this.prevLoaded=i.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)}),P(this,"handleReady",()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;let{onReady:t,playing:r,volume:o,muted:i}=this.props;t(),!i&&o!==null&&this.player.setVolume(o),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):r&&this.player.play(),this.handleDurationCheck()}),P(this,"handlePlay",()=>{this.isPlaying=!0,this.isLoading=!1;let{onStart:t,onPlay:r,playbackRate:o}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&o!==1&&this.player.setPlaybackRate(o),t(),this.startOnPlay=!1),r(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()}),P(this,"handlePause",t=>{this.isPlaying=!1,this.isLoading||this.props.onPause(t)}),P(this,"handleEnded",()=>{let{activePlayer:t,loop:r,onEnded:o}=this.props;t.loopOnEnded&&r&&this.seekTo(0),r||(this.isPlaying=!1,o())}),P(this,"handleError",(...t)=>{this.isLoading=!1,this.props.onError(...t)}),P(this,"handleDurationCheck",()=>{clearTimeout(this.durationCheckTimeout);let t=this.getDuration();t?this.onDurationCalled||(this.props.onDuration(t),this.onDurationCalled=!0):this.durationCheckTimeout=setTimeout(this.handleDurationCheck,100)}),P(this,"handleLoaded",()=>{this.isLoading=!1})}componentDidMount(){this.mounted=!0}componentWillUnmount(){clearTimeout(this.progressTimeout),clearTimeout(this.durationCheckTimeout),this.isReady&&this.props.stopOnUnmount&&(this.player.stop(),this.player.disablePIP&&this.player.disablePIP()),this.mounted=!1}componentDidUpdate(t){if(!this.player)return;let{url:r,playing:o,volume:i,muted:n,playbackRate:l,pip:s,loop:a,activePlayer:p,disableDeferredLoading:f}=this.props;if(!(0,Vo.default)(t.url,r)){if(this.isLoading&&!p.forceLoad&&!f&&!(0,Do.isMediaStream)(r)){console.warn(`ReactPlayer: the attempt to load ${r} is being deferred until the player has loaded`),this.loadOnReady=r;return}this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(r,this.isReady)}!t.playing&&o&&!this.isPlaying&&this.player.play(),t.playing&&!o&&this.isPlaying&&this.player.pause(),!t.pip&&s&&this.player.enablePIP&&this.player.enablePIP(),t.pip&&!s&&this.player.disablePIP&&this.player.disablePIP(),t.volume!==i&&i!==null&&this.player.setVolume(i),t.muted!==n&&(n?this.player.mute():(this.player.unmute(),i!==null&&setTimeout(()=>this.player.setVolume(i)))),t.playbackRate!==l&&this.player.setPlaybackRate&&this.player.setPlaybackRate(l),t.loop!==a&&this.player.setLoop&&this.player.setLoop(a)}getDuration(){return this.isReady?this.player.getDuration():null}getCurrentTime(){return this.isReady?this.player.getCurrentTime():null}getSecondsLoaded(){return this.isReady?this.player.getSecondsLoaded():null}seekTo(t,r,o){if(!this.isReady){t!==0&&(this.seekOnPlay=t,setTimeout(()=>{this.seekOnPlay=null},Uo));return}if(r?r==="fraction":t>0&&t<1){let n=this.player.getDuration();if(!n){console.warn("ReactPlayer: could not seek using fraction \u2013\xA0duration not yet available");return}this.player.seekTo(n*t,o);return}this.player.seekTo(t,o)}render(){let t=this.props.activePlayer;return t?qt.default.createElement(t,{...this.props,onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError}):null}};P(oe,"displayName","Player");P(oe,"propTypes",Yt.propTypes);P(oe,"defaultProps",Yt.defaultProps)});var rr=Y((qi,tr)=>{"use strict";var jo=Object.create,be=Object.defineProperty,Bo=Object.getOwnPropertyDescriptor,qo=Object.getOwnPropertyNames,Fo=Object.getPrototypeOf,Ko=Object.prototype.hasOwnProperty,No=(e,t,r)=>t in e?be(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Yo=(e,t)=>{for(var r in t)be(e,r,{get:t[r],enumerable:!0})},Qt=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of qo(t))!Ko.call(e,i)&&i!==r&&be(e,i,{get:()=>t[i],enumerable:!(o=Bo(t,i))||o.enumerable});return e},ge=(e,t,r)=>(r=e!=null?jo(Fo(e)):{},Qt(t||!e||!e.__esModule?be(r,"default",{value:e,enumerable:!0}):r,e)),Xo=e=>Qt(be({},"__esModule",{value:!0}),e),b=(e,t,r)=>(No(e,typeof t!="symbol"?t+"":t,r),r),Zt={};Yo(Zt,{createReactPlayer:()=>oi});tr.exports=Xo(Zt);var ie=ge(A()),Go=ge(ao()),Qe=ge(Vt()),Jt=ge(xt()),Pe=Je(),er=Ye(),Jo=ge(Gt()),Qo=(0,er.lazy)(()=>import("https://st-p.rmcdn1.net/341d0bff/dist/c/c-JCZZJMUS.js")),Zo=typeof window<"u"&&window.document&&typeof document<"u",ei=typeof window<"u"&&window.window&&window.window.document,ti=Object.keys(Pe.propTypes),ri=Zo||ei?ie.Suspense:()=>null,he=[],oi=(e,t)=>{var r;return r=class extends ie.Component{constructor(){super(...arguments),b(this,"state",{showPreview:!!this.props.light}),b(this,"references",{wrapper:o=>{this.wrapper=o},player:o=>{this.player=o}}),b(this,"handleClickPreview",o=>{this.setState({showPreview:!1}),this.props.onClickPreview(o)}),b(this,"showPreview",()=>{this.setState({showPreview:!0})}),b(this,"getDuration",()=>this.player?this.player.getDuration():null),b(this,"getCurrentTime",()=>this.player?this.player.getCurrentTime():null),b(this,"getSecondsLoaded",()=>this.player?this.player.getSecondsLoaded():null),b(this,"getInternalPlayer",(o="player")=>this.player?this.player.getInternalPlayer(o):null),b(this,"seekTo",(o,i,n)=>{if(!this.player)return null;this.player.seekTo(o,i,n)}),b(this,"handleReady",()=>{this.props.onReady(this)}),b(this,"getActivePlayer",(0,Qe.default)(o=>{for(let i of[...he,...e])if(i.canPlay(o))return i;return t||null})),b(this,"getConfig",(0,Qe.default)((o,i)=>{let{config:n}=this.props;return Go.default.all([Pe.defaultProps.config,Pe.defaultProps.config[i]||{},n,n[i]||{}])})),b(this,"getAttributes",(0,Qe.default)(o=>(0,er.omit)(this.props,ti))),b(this,"renderActivePlayer",o=>{if(!o)return null;let i=this.getActivePlayer(o);if(!i)return null;let n=this.getConfig(o,i.key);return ie.default.createElement(Jo.default,{...this.props,key:i.key,ref:this.references.player,config:n,activePlayer:i.lazyPlayer||i,onReady:this.handleReady})})}shouldComponentUpdate(o,i){return!(0,Jt.default)(this.props,o)||!(0,Jt.default)(this.state,i)}componentDidUpdate(o){let{light:i}=this.props;!o.light&&i&&this.setState({showPreview:!0}),o.light&&!i&&this.setState({showPreview:!1})}renderPreview(o){if(!o)return null;let{light:i,playIcon:n,previewTabIndex:l,oEmbedUrl:s,previewAriaLabel:a}=this.props;return ie.default.createElement(Qo,{url:o,light:i,playIcon:n,previewTabIndex:l,previewAriaLabel:a,oEmbedUrl:s,onClick:this.handleClickPreview})}render(){let{url:o,style:i,width:n,height:l,fallback:s,wrapper:a}=this.props,{showPreview:p}=this.state,f=this.getAttributes(o),c=typeof a=="string"?this.references.wrapper:void 0;return ie.default.createElement(a,{ref:c,style:{...i,width:n,height:l},...f},ie.default.createElement(ri,{fallback:s},p?this.renderPreview(o):this.renderActivePlayer(o)))}},b(r,"displayName","ReactPlayer"),b(r,"propTypes",Pe.propTypes),b(r,"defaultProps",Pe.defaultProps),b(r,"addCustomPlayer",o=>{he.push(o)}),b(r,"removeCustomPlayers",()=>{he.length=0}),b(r,"canPlay",o=>{for(let i of[...he,...e])if(i.canPlay(o))return!0;return!1}),b(r,"canEnablePIP",o=>{for(let i of[...he,...e])if(i.canEnablePIP&&i.canEnablePIP(o))return!0;return!1}),r}});var sr=Y((Ki,nr)=>{"use strict";var ii=Object.create,Re=Object.defineProperty,ni=Object.getOwnPropertyDescriptor,si=Object.getOwnPropertyNames,ai=Object.getPrototypeOf,li=Object.prototype.hasOwnProperty,ui=(e,t)=>{for(var r in t)Re(e,r,{get:t[r],enumerable:!0})},or=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of si(t))!li.call(e,i)&&i!==r&&Re(e,i,{get:()=>t[i],enumerable:!(o=ni(t,i))||o.enumerable});return e},pi=(e,t,r)=>(r=e!=null?ii(ai(e)):{},or(t||!e||!e.__esModule?Re(r,"default",{value:e,enumerable:!0}):r,e)),ci=e=>or(Re({},"__esModule",{value:!0}),e),ir={};ui(ir,{default:()=>yi});nr.exports=ci(ir);var Ze=pi($t()),di=rr(),fi=Ze.default[Ze.default.length-1],yi=(0,di.createReactPlayer)(Ze.default,fi)});function mi(e){return"url"in e&&typeof e.url=="string"}function hi(e){return/\.svg$/i.test(e)}function et(e){let{width:t=40,height:r=40}=e;if(mi(e)){let o=hi(e.url)?{backgroundColor:e.color,mask:ee(e.url),maskPosition:"center",maskRepeat:"no-repeat",maskSize:"contain"}:{backgroundImage:ee(e.url),backgroundSize:"contain"};return u(h,{width:t,height:r,css:o})}return u("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:t,height:r,children:u("path",{d:e.type==="left"?"M23.5 11.5 L15.5 19.5 L23.5 27.5":"M16.5 11.5 L24.5 19.5 L16.5 27.5",strokeLinejoin:"round",strokeLinecap:"round",style:{fill:"none",stroke:e.color,strokeWidth:"3px"}})})}var ar=x(()=>{"use strict";X();fe();T()});function tt(e){return typeof e=="function"}function on(e,t,r,o){let i=!1,n=tt(t)?t():t,{useStore:l}=Ke("Window hook",n);return function(){let[s,a]=l(),p=(0,ve.useRef)(0),f=(0,ve.useCallback)(c=>{window.cancelAnimationFrame(p.current),p.current=window.requestAnimationFrame(()=>{a(y=>r(y,c))})},[]);return je(()=>{if(!i){i=!0,a(tt(t)?t():t);let c=$e({events:Array.isArray(e)?e:[e],element:o||window,callback:f});return()=>{c()}}},[f]),s}}function lr(e,t,r,o){let i={current:tt(t)?t():t};function n(s){function a(f){let c=r(i.current,f,o);for(let y in s){let v=s[y];typeof v=="function"&&v(c)}i.current=c}let p=$e({events:Array.isArray(e)?e:[e],element:o||window,callback:a,passive:!1});return()=>{p()}}let{useSetState:l}=Ke("Handlers",{},n);return function(s,a=[]){let p=l(),f=Ue(s,[a]);je(()=>{let c=Et();return i.current!==void 0&&f(i.current),p(y=>({...y,[c]:f})),()=>{p(y=>c in y?Pt(y,c):y)}},[f,p])}}function ur(...e){return function(r,o=[]){let i=(0,ve.useRef)({});for(let n=0;n{"use strict";ve=U(A());Be();Ve();Zr();ro();Fr()});var Pi,Ie,ot=x(()=>{"use strict";rt();Pi={x:0,y:0},Ie=lr(["pointerdown","pointermove"],Pi,(e,t)=>({x:t.clientX,y:t.clientY}))});var pr,cr=x(()=>{"use strict";rt();ot();eo();pr=ur((e,t)=>{Rt(e,t)},Ie)});function it({slideshowElement:e,zoom:t,clientX:r,clientY:o}){let i=ze.getClientBox(e,t),n={left:r,top:o};if(ze.isPointInBox(n,i)){let l={left:n.left-i.left,top:n.top-i.top},s=l.left<=i.width/2?"left":"right";return{cursorPositionInElement:l,side:s}}return null}function wn({color:e,leftIconUrl:t,rightIconUrl:r,isMobile:o,isWidgetHovered:i}){let n=(0,ne.useRef)(null),[l,s]=te(I=>[I.meta.state.zoom,I.meta.state.transform],!0),{isRenderedOnClient:a}=J(),p=t?{width:36,height:36}:{width:40,height:40},f=r?{width:36,height:36}:{width:40,height:40},[{top:c,left:y,side:v,isVisible:C},R]=(0,ne.useState)({top:0,left:0,side:"left",isVisible:!1});pr(({x:I,y:d})=>{if(n.current){let L=it({slideshowElement:n.current,zoom:l,clientX:I,clientY:d});L?R({...L.cursorPositionInElement,side:L.side,isVisible:!0}):C&&R({top:0,left:0,side:"left",isVisible:!1})}},[n,l,s,C,a]);let $=(0,ne.useMemo)(()=>({display:i&&C?"block":"none",transform:`translate(${Z`calc(${j(y)} / ${I=>I.pageScale})`}, ${Z`calc(${j(c)} / ${I=>I.pageScale})`})`}),[C,i,y,c]);return o?null:u(h,{ref:n,width:"100%",height:"100%",position:"absolute",top:0,left:0,cursor:"none",children:a?z(h,{position:"absolute",style:$,children:[u(h,{style:{display:v==="left"?"block":"none"},children:u(et,{color:e,url:t,type:"left",...p})}),u(h,{style:{display:v==="right"?"block":"none"},children:u(et,{color:e,url:r,type:"right",...f})})]}):null})}var ne,dr=x(()=>{"use strict";ne=U(A());X();ar();Fe();qe();Kr();cr();fe();T()});function yr({children:e,isViewerNext:t,pageScale:r,isFloating:o,isPlaying:i=!1,autoHide:n,outOfBoundsFloatPlaceholder:l}){let s=(0,q.useRef)(null),a=0,p=0;t?[a,p]=te(d=>[d.meta.state.zoom,d.meta.state.transform],!0):(a=window.RM.constructorRouter?.zoom?.getZoom()||r||1,p=1);let[{top:f,left:c,isVisible:y,inArea:v},C]=(0,q.useState)({top:0,left:0,isVisible:!0,inArea:!1});function R(){n&&C(d=>({...d,isVisible:!1}))}function $(){C(d=>({...d,isVisible:!0}))}Ie(({x:d,y:L})=>{if(s.current){let F=it({slideshowElement:s.current,zoom:a,clientX:d,clientY:L});F?C(k=>({...k,...F.cursorPositionInElement,inArea:!0})):v&&C(k=>({...k,inArea:!1}))}},[s.current,a,p,y,v]),gi({left:c,top:f,isPlaying:i,onShow:$,onHide:R});let I=(0,q.useMemo)(()=>({transform:`translate(${Z`calc(-50% + ${j(c)} / ${d=>t?d.pageScale:a.toString()})`}, ${Z`calc(-50% + ${j(f)} / ${d=>t?d.pageScale:a.toString()})`})`}),[t,c,f,a]);return u(nt,{ref:s,pointerEvents:"all",cursor:o?"none":y?"":"none",overflow:"hidden",children:o?!v&&l?u(vi,{shake:l==="shake",children:u(nt,{children:e})}):u(h,{position:"absolute",width:"inherit",height:"inherit",style:I,opacity:v&&y?1:0,transition:`opacity ${fr}s linear`,children:e}):u(nt,{opacity:y?1:0,transition:`opacity ${fr}s linear`,children:e})})}function gi({left:e=0,top:t=0,isPlaying:r,onHide:o,onShow:i}){let n=(0,q.useRef)();function l(){n.current=setTimeout(()=>o?.(),bi)}(0,q.useEffect)(()=>{clearTimeout(n.current),i?.(),r?l():i?.()},[e,t,r])}function vi({shake:e,children:t}){return e?u(Q.div,{style:{width:"100%",height:"100%"},animate:{x:[0,1,0,-1,0],rotate:[0,1,0,-1,0]},transition:{duration:.4,repeat:1/0,ease:"easeInOut"},children:t}):u(h,{children:t})}var q,bi,fr,nt,mr=x(()=>{"use strict";q=U(A());Fe();fe();X();dr();ot();Se();Oe();hr();T();bi=1e3,fr=.1,nt=V(h)` position: absolute; width: 100%; height: 100%; left: 0; top: 0; `});function ki(e){let{progress:i,isPlaying:n,...l}=e,s=360*i,a=(s-90)*(Math.PI/180),p=28+23*Math.cos(a),f=28+23*Math.sin(a),c=s<=180?0:1,y=s===360||s===0?"M 28 5 A 23 23 0 1 1 28 51 A 23 23 0 1 1 28 5":`M 28 5 A 23 23 0 ${c} 1 ${p} ${f}`;return u(h,{width:56,height:56,children:z("svg",{width:"56",height:"56",viewBox:"0 0 56 56",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l,children:[n?z(Ce,{children:[u("path",{d:"M23 20V36",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),u("path",{d:"M33 20V36",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}):u("path",{d:"M21 34.7014V21.2986C21 18.9667 23.5439 17.5264 25.5435 18.7261L36.7125 25.4275C38.6546 26.5927 38.6546 29.4073 36.7125 30.5725L25.5435 37.2739C23.5439 38.4737 21 37.0333 21 34.7014Z",fill:"currentColor",stroke:"currentColor",strokeWidth:"2"}),u("circle",{opacity:"0.1",cx:"28",cy:"28",r:"23",stroke:"currentColor",strokeWidth:"2"}),u("path",{d:y,stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})})}function Pr({isPlaying:e,progress:t=1,styling:r=ce,onClick:o,hideCursor:i,customCursorStyle:n}){let l=(0,st.useMemo)(()=>Object.assign({},ce,r),[r]),{fontFamily:s,size:a,fontSize:p,fontStyle:f,fontWeight:c,letterSpacing:y,position:v,type:C=ce.type}=l,R=(0,st.useMemo)(()=>{let{r:k,g:Le,b:K,a:_e}=kt(l.controlColor);return`rgba(${k}, ${Le}, ${K}, ${_e})`},[l.controlColor]),$=y===0?null:M(y),{transformOrigin:I,...d}=Si(v||ce.position);function L(k){(k.code==="Space"||k.code==="Enter")&&(k.preventDefault(),o?.())}let F=`${e?"Pause":"Play"} video`;return u(h,{id:"custom",display:"flex",position:"absolute",top:0,left:0,width:"100%",height:"100%",padding:11,pointerEvents:"all",onClick:o&&o,...d,children:z(h,{userSelect:"none",children:[C==="Icon"&&u(_i,{position:"relative",transform:`scale(${a/Ct})`,transformOrigin:I,cursor:i?"":n?.cursor??"pointer",tabIndex:0,onKeyDown:L,"aria-label":F,role:"button",pointerEvents:"all",children:u(ki,{progress:t,isPlaying:e,color:R,pointerEvents:"none"})}),C==="Text"&&u(wi,{pointerEvents:"all",fontSize:p,letterSpacing:$,color:R,fontFamily:s,fontWeight:c,fontStyle:f,cursor:i?"":n?.cursor??"pointer",tabIndex:0,onKeyDown:L,"aria-label":F,role:"button",marginRight:`-${$}`,children:e?"Pause":"Play"})]})})}function Si(e){let t={justifyContent:"center",alignItems:"center",transformOrigin:""},r=["center","center"];return e.includes("n")&&(t.alignItems="start",r[0]="top"),e.includes("s")&&(t.alignItems="end",r[0]="bottom"),e.includes("w")&&(t.justifyContent="left",r[1]="left"),e.includes("e")&&(t.justifyContent="right",r[1]="right"),t.transformOrigin=r.join(" "),t}var st,_i,wi,br=x(()=>{"use strict";X();Gr();st=U(A());De();Jr();vt();Se();T();_i=V(h)` -webkit-tap-highlight-color: transparent; `,wi=V(wt)` -webkit-tap-highlight-color: transparent; display: inline-block; `});function at({children:e,withDelay:t,withTransition:r,...o}){return r?u(gr,{...o,initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{delay:t?.1:0,opacity:{duration:.2}},suppressHydrationWarning:!0,children:e}):u(gr,{...o,suppressHydrationWarning:!0,children:e})}var Ci,gr,vr=x(()=>{"use strict";Se();Oe();T();Ci=V("div")({width:"100%",height:"100%",position:"absolute",top:0,left:0}),gr=Q(Ci)});function xi(e){let t=typeof e.opacity=="number"?e.opacity:1,r=e.border_radius_independent?[e.border_radius_tl,e.border_radius_tr,e.border_radius_br,e.border_radius_bl].map(p=>j(p||0)).join(" "):j(e.border_radius_max?9999:e.border_radius||0),o=St(xe(e.border_color||"000000",typeof e.border_color_opacity>"u"?1:e.border_color_opacity/100)),i=typeof e.border_size=="number"&&e.border_size>0?`inset 0 0 0 ${e.border_size}px ${o}`:"none",n=e.is_full_height?e.fhpos?e.fhpos:50:void 0,l=e.is_full_width?e.fwpos?e.fwpos:50:void 0,s=n!==void 0||l!==void 0,a=s?`${n??50}% ${l??50}%`:void 0;return{boxShadow:i,opacity:t,borderRadius:r,backgroundSize:e.size||(s?"cover":"100% 100%"),...a?{backgroundPosition:a}:void 0}}function wr(e){return(0,_r.useMemo)(()=>xi(e),[e])}var _r,kr=x(()=>{"use strict";_r=U(A());fe();De()});function Oi(e){return{width:e.w,height:e.h,cropX:e.cropX,cropY:e.cropY,cropW:e.cropW,cropH:e.cropH,originalW:e.originalW,originalH:e.originalH,isStretched:e.is_full_width||e.is_full_height}}function Sr({data:e,scale:t,isExportedProject:r}){let o=e.picture;if(o.finalUrl?.split(".").pop()==="svg")return{url:o.finalUrl};if(!r&&(B.useLambdaUrl(o)||B.useLambdaUrlOldProjects(o))){let a={...Oi(e),scale:t},p=B.getSrcset(o,{...a,asArray:!0});return p?.length?{imgSet:p}:{url:B.getLambdaUrl(o,a)}}let i=o.finalUrl||o.unscaledOptimizedUrl||o.unscaledUrl,n=o.final2xUrl,l=o.final2xUrl&&(o.unscaledOptimizedUrl||o.final3xUrl),s=bt([{url:i,dpr:1},{url:n,dpr:2},{url:l,dpr:3}],"url").filter(({url:a})=>!!a);return s.length?s.length===0?{url:s[0].url}:{imgSet:s}:{url:o.effectUrl||o.editedVectorUrl||o.unscaledOptimizedUrl||o.unscaledUrl||o.url}}function Ei(e){return B.getLqipUrl(e.picture,{cropX:e.cropX,cropY:e.cropY,cropW:e.cropW,cropH:e.cropH,originalW:e.originalW,originalH:e.originalH})}function Ri({useLqip:e,data:t,...r}){return e?t.blurHash&&t.w!==void 0&&t.h!==void 0?{url:B.decodeBlurHash(t.blurHash,t.w,t.h)}:{url:Ei(t)}:Sr({...r,data:t,scale:1})}function Cr(e){let t=G(()=>Sr(e),[e]),r=G(()=>Ri(e),[e]);return G(()=>({originalImage:t,previewImage:r}),[t,r])}var xr=x(()=>{"use strict";Ve();Be();Tt()});function Or(e,t){let[r,o]=(0,se.useState)(!1);return(0,se.useEffect)(()=>{(e||t)&&!r&&o(!0)},[e,t,r]),{bindLazyLoad:(0,se.useCallback)(n=>e||t||r?{style:{backgroundImage:`-webkit-image-set(${n.imageSet})`}}:{"data-lazy-image-set":n.imageSet},[e,t,r])}}var se,Er=x(()=>{"use strict";se=U(A())});function Rr(e){return He()?!1:window.rmLqipState?.get(e)||!1}function lt(e,t){return{[`data-${Ii}`]:e,[`data-${Li}`]:t}}var Ii,Li,ut=x(()=>{"use strict";qr();He()||(window.rmLqipState=window.rmLqipState||new Map);Ii="preload-key",Li="preload-id"});function Lr(e){return{wasPreloaded:(0,Ir.useRef)(Rr(e)).current}}var Ir,Tr=x(()=>{"use strict";Ir=U(A());ut()});function Wr({picture:e,style:t,lazyLoad:r,isVisible:o,...i}){let n=G(()=>e.imgSet?e.imgSet.map(({url:p,dpr:f})=>`${ee(p)} ${f}x`).join(", "):e.url?ee(e.url):"",[e]),{bindLazyLoad:l}=Or(!r,o),s=l({imageSet:n});return u(h,{role:"img",width:"100%",height:"100%",fetchpriority:"low",backgroundPosition:"center",backgroundRepeat:"no-repeat",...i,...s,suppressHydrationWarning:!0,css:gt(t)})}function Ti({data:e,useLqip:t,style:r,pointerEvents:o,originalImage:i,previewImage:n,isVisible:l}){let{isRenderedOnClient:s}=J(),{wasPreloaded:a}=Lr(e._id);return z(h,{width:"100%",height:"100%",position:"relative",borderRadius:r.borderRadius,pointerEvents:o,children:[u(de,{initial:!1,children:(!a||!s)&&t&&!l?u(at,{withDelay:typeof e.opacity>"u"||e.opacity===1,withTransition:t,...lt("preview",e._id),children:a?null:u(Wr,{isVisible:l,"aria-label":e.alt?Ae(e.alt):void 0,picture:n,style:r,transition:"opacity .2s",filter:"blur(20px)",transform:"scale(1.05)",lazyLoad:!0})},"lqip"):null}),u(de,{children:u(at,{withTransition:a?!1:t,withDelay:!0,...t&&l?lt("original",e._id):{},children:u(Wr,{isVisible:l,"aria-label":e.alt?Ae(e.alt):void 0,picture:i,style:r,lazyLoad:!0})},"original")})]})}function Mr({data:e,useLqip:t,isVisible:r,pointerEvents:o}){let i=te(p=>p.meta.state.scale),n=It(p=>p.meta.isExportedProject),{previewImage:l,originalImage:s}=Cr({data:e,useLqip:t,scale:i,isExportedProject:n});if(!s.url&&!s.imgSet)return console.error(new Ot("Picture is broken",{id:e._id})),null;let a=wr(e);return u(Ti,{data:e,style:a,useLqip:t,isVisible:r,pointerEvents:o,previewImage:l,originalImage:s})}var Hr=x(()=>{"use strict";Ve();Se();X();Oe();Be();fe();Fe();vr();Qr();to();kr();xr();Er();Tr();ut();qe();T()});function Ai(e,t){return!e||!t?"":e.split(" ").map(i=>{let n=parseInt(i);return Math.max(0,n-t)+"px"}).join(" ")}function Vi(e){let t={display:"grid",justifyContent:"center",alignItems:"center",overflow:"hidden",boxSizing:"border-box",position:"relative"};if(e.video_styles){if(e.video_styles){let{color:r,borders:o,opacity:i,radius:n,radius_rect_tl:l,radius_rect_tr:s,radius_rect_br:a,radius_rect_bl:p,radius_rect_independent:f,video_opacity:c}=e.video_styles,y=xe(r,i),v=`rgba(${y.r}, ${y.g}, ${y.b}, ${y.a})`;Object.assign(t,{borderRadius:f?`${M(l)} ${M(s)} ${M(a)} ${M(p)}`:M(n),border:`${M(o)} solid ${v}`,opacity:c>0?c/100:1,boxShadow:o?`inset 0 0 0 1px ${v}`:""})}}else return t;return t}var $r,m,Wi,Mi,Hi,$i,zi,pt,Js,hr=x(()=>{"use strict";X();Oe();io();$r=U(sr()),m=U(A());De();Nr();mr();br();so();vt();no();Hr();Xr();Yr();Tt();qe();T();Wi=Q(h),Mi=V(_t,{excludeProps:["providerName"]})` object-fit: cover; display: flex; width: 100%; height: 100%; `,Hi=V(h,{excludeProps:["providerName","width","height"]})` div:has(> video) { position: absolute; display: ${e=>e.width<=12||e.height<=12?"grid":"block"}; } div:has(> iframe) { display: ${e=>e.width<=12||e.height<=12?"flex":"block"}; } video { object-fit: ${e=>e.providerName==="File"?"cover":"contain"}; width: ${e=>M(e.width)}; height: ${e=>M(e.height)}; } iframe { width: ${e=>M(e.width)}; height: ${e=>M(e.height)}; } `,$i=({width:e=65,height:t=65})=>u(h,{position:"absolute",top:"50%",left:"50%",zIndex:10,transform:"translate(-50%, -50%)",children:u(Lt,{width:e,height:t,color:"white"})}),zi=(0,m.forwardRef)(({widget:e,isVisible:t=!1,useLqip:r=!1,isTabVisible:o,isViewerNext:i=!1,playerRef:n,width:l,height:s,autoplay:a,pageScale:p,outOfBoundsFloatPlaceholder:f,renderSimpleVersion:c,controlsCursorStyle:y},v)=>{let{isRenderedOnClient:C}=J(),R=e.provider_name==="File"&&pe.readymag_video_files_origin?`${pe.readymag_video_files_origin}/${e.url}`:e.url,$=e.controls&&e.controls_type==="custom",I=e.url&&Ne.isYoutube(R)?Ne.getYoutubeIdFromUrl(e.url):"",[d]=(0,m.useState)(()=>new pt),{isPlaying:L,progress:F}=d.useSnapshot(),[k,Le]=(0,m.useState)(!1),[K,_e]=(0,m.useState)(()=>e.w),[ae,ct]=(0,m.useState)(()=>e.h),Te=Vi(e),dt=Ai(Te?.borderRadius,e.video_styles?.borders),le=(0,m.useMemo)(()=>c?!1:!!((typeof a<"u"?a:e.autoplay)&&o),[a,o,c,e.autoplay]);(0,m.useEffect)(()=>{typeof l=="number"&&_e(l),typeof s=="number"&&ct(s)},[l,s]),(0,m.useEffect)(()=>{_e(e.w),ct(e.h)},[e.w,e.h]),(0,m.useImperativeHandle)(n,()=>d,[d]),(0,m.useEffect)(()=>{le&&t&&k&&d.play(),!t&&d.stop()},[t,le,k]);let{isCustomThumbnail:D,thumbnail:ue}=(0,m.useMemo)(()=>e.picture&&e.custom_thumbnail?{isCustomThumbnail:!0,thumbnail:e.picture}:{isCustomThumbnail:!1,thumbnail:{url:e.provider_name==="File"?pe.readymag_video_files_origin?`${pe.readymag_video_files_origin}/${e.thumbnail_url}`:e.posterUri:e.thumbnail_url,type:"jpg"}},[e.picture,e.custom_thumbnail,e.provider_name,e.thumbnail_url,e.posterUri]),[We,Me]=(0,m.useState)(()=>D&&!le||c);(0,m.useEffect)(()=>{Me(()=>D&&!le||c)},[D,le]),(0,m.useEffect)(()=>{k&&We&&L&&Me(!1)},[k,L,We]),(0,m.useEffect)(()=>{c&&setTimeout(()=>{d.events.dispatchEvent(new Event("ready"))},300)},[c]);let ft=i?!1:window.RM.constructorRouter&&!window.RM.constructorRouter.preview;function zr(){!$&&Me(!0),yt()}let yt=(0,m.useCallback)(()=>{d.play(),d.events.dispatchEvent(new CustomEvent("start",{detail:`${e.title} / ${R}`}))},[R,e.title,d]),Ar=(0,m.useCallback)(()=>{d.stop(),d.events.dispatchEvent(new CustomEvent("stop",{detail:`${e.title} / ${R}`}))},[R,e.title,d]),Vr=()=>{ft||d.toggle()};function Dr(){Le(!0),d.events.dispatchEvent(new Event("ready"))}let mt=e?.custom_controls?.position===null;function Ur(){return u(yr,{isViewerNext:i,pageScale:p,isPlaying:L,isFloating:mt,autoHide:e?.custom_controls?.autoHide,outOfBoundsFloatPlaceholder:f,children:u(Pr,{isPlaying:L,styling:e.custom_controls,progress:F,onClick:Vr,hideCursor:mt,customCursorStyle:y})})}let jr=(0,m.useMemo)(()=>({pointerEvents:$?"none":"all",...Te}),[Te,$]),ht=(0,m.useMemo)(()=>ue.lambdaUrl||ue.url||B.getLqipUrl(ue),[ue]),Br=(0,m.useMemo)(()=>typeof e.color=="string"?e.color.slice(1,-2):"000",[e.color]),we=(0,m.useMemo)(()=>{let N=e.video_styles?.borders?2*e.video_styles?.borders:0;return{width:Math.round(K-N+1),height:Math.round(ae-N+1)}},[e.video_styles?.borders,K,ae]);return z(Hi,{ref:v,providerName:e.provider_name,style:jr,width:Math.round(K),height:Math.round(ae),borderRadius:dt,children:[C&&u($r.default,{width:we.width,height:we.height,url:R,muted:e.mute,loop:e.loop,onReady:Dr,onPlay:yt,onPause:Ar,playing:L,light:c,controls:e.controls&&e.controls_type==="default",onProgress:N=>{d.progress=N.played<.001?0:N.played>1?1:N.played},progressInterval:20,playsinline:!0,config:{youtube:{playerVars:{wmode:"opaque",enablejsapi:1,autohide:1,showinfo:e.info,theme:e.theme,html5:1,rel:0,vq:"hd1080",controls:1},embedOptions:{videoId:I}},vimeo:{playerOptions:{wmode:"opaque",api:1,title:e.info,byline:e.info,portrait:e.info,color:Br,controls:!0,muted:e.mute}},file:{attributes:{poster:D?null:ht}}}}),u(de,{children:We&&u(Wi,{width:we.width,height:we.height,borderRadius:dt,overflow:"hidden",top:0,left:0,position:"absolute",pointerEvents:ft?"none":"all",objectFit:"cover",initial:{opacity:1},animate:{opacity:1},exit:{opacity:0},role:D?"button":void 0,cursor:D?"pointer":void 0,onClick:D?zr:void 0,children:(D||!k)&&z(Ce,{children:[D&&!$&&u($i,{width:Math.round(K/3),height:Math.round(ae/3)}),i?u(Mr,{isVisible:t,data:{_id:e._id,w:K,h:ae,picture:ue,size:"cover"},useLqip:r,pointerEvents:"none"}):u(Mi,{providerName:e.provider_name,src:ht||e.posterUri,alt:"video thumbnail"})]})})}),C&&k&&$&&Ur()]})});pt=class extends Wt{constructor(){super();ke(this,"events");ke(this,"isPlaying",!1);ke(this,"progress",0);this.events=this.detach(new EventTarget)}play(){this.isPlaying=!0}stop(){this.isPlaying=!1}toggle(){this.isPlaying?this.stop():this.play()}},Js=zi});export{et as a,ar as b,on as c,rt as d,Ie as e,ot as f,pr as g,cr as h,wn as i,dr as j,Sr as k,xr as l,Wr as m,Mr as n,Hr as o,Js as p,hr as q};