Spaces:
Running
Running
| const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["chunks/YouTube-8naRW_9O.js","chunks/sidepanel-DjwwbR2c.js","assets/sidepanel-Bm0DOHi9.css","chunks/SoundCloud-C1q3o5ey.js","chunks/Vimeo-C2ru3W0B.js","chunks/Mux-BSWrBpZP.js","chunks/Facebook-CbG0_jez.js","chunks/Streamable-BsCvFyja.js","chunks/Wistia-DBD0XvkL.js","chunks/Twitch-K5Lc2N4C.js","chunks/DailyMotion-Mu-1s4ir.js","chunks/Mixcloud-jUDy-IoK.js","chunks/Vidyard-N6MhfVze.js","chunks/Kaltura-BDM2l5do.js","chunks/FilePlayer-CYjbWbG8.js","chunks/Preview-of7xUcD9.js"])))=>i.map(i=>d[i]); | |
| import{a as ae,_ as x,b as be,c as we,d as K,g as Ee}from"./sidepanel-DjwwbR2c.js";function Te(g,c){for(var S=0;S<c.length;S++){const b=c[S];if(typeof b!="string"&&!Array.isArray(b)){for(const v in b)if(v!=="default"&&!(v in g)){const i=Object.getOwnPropertyDescriptor(b,v);i&&Object.defineProperty(g,v,i.get?i:{enumerable:!0,get:()=>b[v]})}}}return Object.freeze(Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}))}var W,se;function me(){if(se)return W;se=1;var g=typeof Element<"u",c=typeof Map=="function",S=typeof Set=="function",b=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function v(i,p){if(i===p)return!0;if(i&&p&&typeof i=="object"&&typeof p=="object"){if(i.constructor!==p.constructor)return!1;var _,o,y;if(Array.isArray(i)){if(_=i.length,_!=p.length)return!1;for(o=_;o--!==0;)if(!v(i[o],p[o]))return!1;return!0}var L;if(c&&i instanceof Map&&p instanceof Map){if(i.size!==p.size)return!1;for(L=i.entries();!(o=L.next()).done;)if(!p.has(o.value[0]))return!1;for(L=i.entries();!(o=L.next()).done;)if(!v(o.value[1],p.get(o.value[0])))return!1;return!0}if(S&&i instanceof Set&&p instanceof Set){if(i.size!==p.size)return!1;for(L=i.entries();!(o=L.next()).done;)if(!p.has(o.value[0]))return!1;return!0}if(b&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(p)){if(_=i.length,_!=p.length)return!1;for(o=_;o--!==0;)if(i[o]!==p[o])return!1;return!0}if(i.constructor===RegExp)return i.source===p.source&&i.flags===p.flags;if(i.valueOf!==Object.prototype.valueOf&&typeof i.valueOf=="function"&&typeof p.valueOf=="function")return i.valueOf()===p.valueOf();if(i.toString!==Object.prototype.toString&&typeof i.toString=="function"&&typeof p.toString=="function")return i.toString()===p.toString();if(y=Object.keys(i),_=y.length,_!==Object.keys(p).length)return!1;for(o=_;o--!==0;)if(!Object.prototype.hasOwnProperty.call(p,y[o]))return!1;if(g&&i instanceof Element)return!1;for(o=_;o--!==0;)if(!((y[o]==="_owner"||y[o]==="__v"||y[o]==="__o")&&i.$$typeof)&&!v(i[y[o]],p[y[o]]))return!1;return!0}return i!==i&&p!==p}return W=function(p,_){try{return v(p,_)}catch(o){if((o.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw o}},W}var X,le;function Se(){if(le)return X;le=1,X=function(v,i,p){var _=document.head||document.getElementsByTagName("head")[0],o=document.createElement("script");typeof i=="function"&&(p=i,i={}),i=i||{},p=p||function(){},o.type=i.type||"text/javascript",o.charset=i.charset||"utf8",o.async="async"in i?!!i.async:!0,o.src=v,i.attrs&&g(o,i.attrs),i.text&&(o.text=""+i.text);var y="onload"in o?c:S;y(o,p),o.onload||c(o,p),_.appendChild(o)};function g(b,v){for(var i in v)b.setAttribute(i,v[i])}function c(b,v){b.onload=function(){this.onerror=this.onload=null,v(null,b)},b.onerror=function(){this.onerror=this.onload=null,v(new Error("Failed to load "+this.src),b)}}function S(b,v){b.onreadystatechange=function(){this.readyState!="complete"&&this.readyState!="loaded"||(this.onreadystatechange=null,v(null,b))}}return X}var Y,ue;function ve(){if(ue)return Y;ue=1;var g=function(s){return c(s)&&!S(s)};function c(a){return!!a&&typeof a=="object"}function S(a){var s=Object.prototype.toString.call(a);return s==="[object RegExp]"||s==="[object Date]"||i(a)}var b=typeof Symbol=="function"&&Symbol.for,v=b?Symbol.for("react.element"):60103;function i(a){return a.$$typeof===v}function p(a){return Array.isArray(a)?[]:{}}function _(a,s){return s.clone!==!1&&s.isMergeableObject(a)?P(p(a),a,s):a}function o(a,s,r){return a.concat(s).map(function(n){return _(n,r)})}function y(a,s){if(!s.customMerge)return P;var r=s.customMerge(a);return typeof r=="function"?r:P}function L(a){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(a).filter(function(s){return Object.propertyIsEnumerable.call(a,s)}):[]}function e(a){return Object.keys(a).concat(L(a))}function h(a,s){try{return s in a}catch{return!1}}function O(a,s){return h(a,s)&&!(Object.hasOwnProperty.call(a,s)&&Object.propertyIsEnumerable.call(a,s))}function j(a,s,r){var n={};return r.isMergeableObject(a)&&e(a).forEach(function(u){n[u]=_(a[u],r)}),e(s).forEach(function(u){O(a,u)||(h(a,u)&&r.isMergeableObject(s[u])?n[u]=y(u,r)(a[u],s[u],r):n[u]=_(s[u],r))}),n}function P(a,s,r){r=r||{},r.arrayMerge=r.arrayMerge||o,r.isMergeableObject=r.isMergeableObject||g,r.cloneUnlessOtherwiseSpecified=_;var n=Array.isArray(s),u=Array.isArray(a),d=n===u;return d?n?r.arrayMerge(a,s,r):j(a,s,r):_(s,r)}P.all=function(s,r){if(!Array.isArray(s))throw new Error("first argument should be an array");return s.reduce(function(n,u){return P(n,u,r)},{})};var R=P;return Y=R,Y}var J,ce;function $(){if(ce)return J;ce=1;var g=Object.create,c=Object.defineProperty,S=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,v=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,p=(l,m)=>{for(var I in m)c(l,I,{get:m[I],enumerable:!0})},_=(l,m,I,U)=>{if(m&&typeof m=="object"||typeof m=="function")for(let k of b(m))!i.call(l,k)&&k!==I&&c(l,k,{get:()=>m[k],enumerable:!(U=S(m,k))||U.enumerable});return l},o=(l,m,I)=>(I=l!=null?g(v(l)):{},_(!l||!l.__esModule?c(I,"default",{value:l,enumerable:!0}):I,l)),y=l=>_(c({},"__esModule",{value:!0}),l),L={};p(L,{callPlayer:()=>t,getConfig:()=>E,getSDK:()=>w,isBlobUrl:()=>N,isMediaStream:()=>f,lazy:()=>j,omit:()=>A,parseEndTime:()=>d,parseStartTime:()=>u,queryString:()=>M,randomString:()=>T,supportsWebKitPresentationMode:()=>H}),J=y(L);var e=o(ae()),h=o(Se()),O=o(ve());const j=l=>e.default.lazy(async()=>{const m=await l();return typeof m.default=="function"?m:m.default}),P=/[?&#](?:start|t)=([0-9hms]+)/,R=/[?&#]end=([0-9hms]+)/,a=/(\d+)(h|m|s)/g,s=/^\d+$/;function r(l,m){if(l instanceof Array)return;const I=l.match(m);if(I){const U=I[1];if(U.match(a))return n(U);if(s.test(U))return parseInt(U)}}function n(l){let m=0,I=a.exec(l);for(;I!==null;){const[,U,k]=I;k==="h"&&(m+=parseInt(U,10)*60*60),k==="m"&&(m+=parseInt(U,10)*60),k==="s"&&(m+=parseInt(U,10)),I=a.exec(l)}return m}function u(l){return r(l,P)}function d(l){return r(l,R)}function T(){return Math.random().toString(36).substr(2,5)}function M(l){return Object.keys(l).map(m=>`${m}=${l[m]}`).join("&")}function C(l){return window[l]?window[l]:window.exports&&window.exports[l]?window.exports[l]:window.module&&window.module.exports&&window.module.exports[l]?window.module.exports[l]:null}const D={},w=function(m,I,U=null,k=()=>!0,q=h.default){const F=C(I);return F&&k(F)?Promise.resolve(F):new Promise((ne,oe)=>{if(D[m]){D[m].push({resolve:ne,reject:oe});return}D[m]=[{resolve:ne,reject:oe}];const ie=V=>{D[m].forEach(B=>B.resolve(V))};if(U){const V=window[U];window[U]=function(){V&&V(),ie(C(I))}}q(m,V=>{V?(D[m].forEach(B=>B.reject(V)),D[m]=null):U||ie(C(I))})})};function E(l,m){return(0,O.default)(m.config,l.config)}function A(l,...m){const I=[].concat(...m),U={},k=Object.keys(l);for(const q of k)I.indexOf(q)===-1&&(U[q]=l[q]);return U}function t(l,...m){if(!this.player||!this.player[l]){let I=`ReactPlayer: ${this.constructor.displayName} player could not call %c${l}%c – `;return this.player?this.player[l]||(I+="The method was not available"):I+="The player was not available",console.warn(I,"font-weight: bold",""),null}return this.player[l](...m)}function f(l){return typeof window<"u"&&typeof window.MediaStream<"u"&&l instanceof window.MediaStream}function N(l){return/^blob:/.test(l)}function H(l=document.createElement("video")){const m=/iPhone|iPod/.test(navigator.userAgent)===!1;return l.webkitSupportsPresentationMode&&typeof l.webkitSetPresentationMode=="function"&&m}function z(l){return l}return J}var Z,pe;function Ae(){if(pe)return Z;pe=1;var g=Object.defineProperty,c=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,b=Object.prototype.hasOwnProperty,v=(t,f)=>{for(var N in f)g(t,N,{get:f[N],enumerable:!0})},i=(t,f,N,H)=>{if(f&&typeof f=="object"||typeof f=="function")for(let z of S(f))!b.call(t,z)&&z!==N&&g(t,z,{get:()=>f[z],enumerable:!(H=c(f,z))||H.enumerable});return t},p=t=>i(g({},"__esModule",{value:!0}),t),_={};v(_,{AUDIO_EXTENSIONS:()=>T,DASH_EXTENSIONS:()=>D,FLV_EXTENSIONS:()=>w,HLS_EXTENSIONS:()=>C,MATCH_URL_DAILYMOTION:()=>r,MATCH_URL_FACEBOOK:()=>O,MATCH_URL_FACEBOOK_WATCH:()=>j,MATCH_URL_KALTURA:()=>d,MATCH_URL_MIXCLOUD:()=>n,MATCH_URL_MUX:()=>h,MATCH_URL_SOUNDCLOUD:()=>L,MATCH_URL_STREAMABLE:()=>P,MATCH_URL_TWITCH_CHANNEL:()=>s,MATCH_URL_TWITCH_VIDEO:()=>a,MATCH_URL_VIDYARD:()=>u,MATCH_URL_VIMEO:()=>e,MATCH_URL_WISTIA:()=>R,MATCH_URL_YOUTUBE:()=>y,VIDEO_EXTENSIONS:()=>M,canPlay:()=>A}),Z=p(_);var o=$();const y=/(?:youtu\.be\/|youtube(?:-nocookie|education)?\.com\/(?:embed\/|v\/|watch\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})|youtube\.com\/playlist\?list=|youtube\.com\/user\//,L=/(?:soundcloud\.com|snd\.sc)\/[^.]+$/,e=/vimeo\.com\/(?!progressive_redirect).+/,h=/stream\.mux\.com\/(\w+)/,O=/^https?:\/\/(www\.)?facebook\.com.*\/(video(s)?|watch|story)(\.php?|\/).+$/,j=/^https?:\/\/fb\.watch\/.+$/,P=/streamable\.com\/([a-z0-9]+)$/,R=/(?:wistia\.(?:com|net)|wi\.st)\/(?:medias|embed)\/(?:iframe\/)?([^?]+)/,a=/(?:www\.|go\.)?twitch\.tv\/videos\/(\d+)($|\?)/,s=/(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/,r=/^(?:(?:https?):)?(?:\/\/)?(?:www\.)?(?:(?:dailymotion\.com(?:\/embed)?\/video)|dai\.ly)\/([a-zA-Z0-9]+)(?:_[\w_-]+)?(?:[\w.#_-]+)?/,n=/mixcloud\.com\/([^/]+\/[^/]+)/,u=/vidyard.com\/(?:watch\/)?([a-zA-Z0-9-_]+)/,d=/^https?:\/\/[a-zA-Z]+\.kaltura.(com|org)\/p\/([0-9]+)\/sp\/([0-9]+)00\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(.*)entry_id.([a-zA-Z0-9-_].*)$/,T=/\.(m4a|m4b|mp4a|mpga|mp2|mp2a|mp3|m2a|m3a|wav|weba|aac|oga|spx)($|\?)/i,M=/\.(mp4|og[gv]|webm|mov|m4v)(#t=[,\d+]+)?($|\?)/i,C=/\.(m3u8)($|\?)/i,D=/\.(mpd)($|\?)/i,w=/\.(flv)($|\?)/i,E=t=>{if(t instanceof Array){for(const f of t)if(typeof f=="string"&&E(f)||E(f.src))return!0;return!1}return(0,o.isMediaStream)(t)||(0,o.isBlobUrl)(t)?!0:T.test(t)||M.test(t)||C.test(t)||D.test(t)||w.test(t)},A={youtube:t=>t instanceof Array?t.every(f=>y.test(f)):y.test(t),soundcloud:t=>L.test(t)&&!T.test(t),vimeo:t=>e.test(t)&&!M.test(t)&&!C.test(t),mux:t=>h.test(t),facebook:t=>O.test(t)||j.test(t),streamable:t=>P.test(t),wistia:t=>R.test(t),twitch:t=>a.test(t)||s.test(t),dailymotion:t=>r.test(t),mixcloud:t=>n.test(t),vidyard:t=>u.test(t),kaltura:t=>d.test(t),file:E};return Z}var Q,fe;function Re(){if(fe)return Q;fe=1;var g=Object.defineProperty,c=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,b=Object.prototype.hasOwnProperty,v=(e,h)=>{for(var O in h)g(e,O,{get:h[O],enumerable:!0})},i=(e,h,O,j)=>{if(h&&typeof h=="object"||typeof h=="function")for(let P of S(h))!b.call(e,P)&&P!==O&&g(e,P,{get:()=>h[P],enumerable:!(j=c(h,P))||j.enumerable});return e},p=e=>i(g({},"__esModule",{value:!0}),e),_={};v(_,{default:()=>L}),Q=p(_);var o=$(),y=Ae(),L=[{key:"youtube",name:"YouTube",canPlay:y.canPlay.youtube,lazyPlayer:(0,o.lazy)(()=>x(()=>import("./YouTube-8naRW_9O.js").then(e=>e.Y),__vite__mapDeps([0,1,2])))},{key:"soundcloud",name:"SoundCloud",canPlay:y.canPlay.soundcloud,lazyPlayer:(0,o.lazy)(()=>x(()=>import("./SoundCloud-C1q3o5ey.js").then(e=>e.S),__vite__mapDeps([3,1,2])))},{key:"vimeo",name:"Vimeo",canPlay:y.canPlay.vimeo,lazyPlayer:(0,o.lazy)(()=>x(()=>import("./Vimeo-C2ru3W0B.js").then(e=>e.V),__vite__mapDeps([4,1,2])))},{key:"mux",name:"Mux",canPlay:y.canPlay.mux,lazyPlayer:(0,o.lazy)(()=>x(()=>import("./Mux-BSWrBpZP.js").then(e=>e.M),__vite__mapDeps([5,1,2])))},{key:"facebook",name:"Facebook",canPlay:y.canPlay.facebook,lazyPlayer:(0,o.lazy)(()=>x(()=>import("./Facebook-CbG0_jez.js").then(e=>e.F),__vite__mapDeps([6,1,2])))},{key:"streamable",name:"Streamable",canPlay:y.canPlay.streamable,lazyPlayer:(0,o.lazy)(()=>x(()=>import("./Streamable-BsCvFyja.js").then(e=>e.S),__vite__mapDeps([7,1,2])))},{key:"wistia",name:"Wistia",canPlay:y.canPlay.wistia,lazyPlayer:(0,o.lazy)(()=>x(()=>import("./Wistia-DBD0XvkL.js").then(e=>e.W),__vite__mapDeps([8,1,2])))},{key:"twitch",name:"Twitch",canPlay:y.canPlay.twitch,lazyPlayer:(0,o.lazy)(()=>x(()=>import("./Twitch-K5Lc2N4C.js").then(e=>e.T),__vite__mapDeps([9,1,2])))},{key:"dailymotion",name:"DailyMotion",canPlay:y.canPlay.dailymotion,lazyPlayer:(0,o.lazy)(()=>x(()=>import("./DailyMotion-Mu-1s4ir.js").then(e=>e.D),__vite__mapDeps([10,1,2])))},{key:"mixcloud",name:"Mixcloud",canPlay:y.canPlay.mixcloud,lazyPlayer:(0,o.lazy)(()=>x(()=>import("./Mixcloud-jUDy-IoK.js").then(e=>e.M),__vite__mapDeps([11,1,2])))},{key:"vidyard",name:"Vidyard",canPlay:y.canPlay.vidyard,lazyPlayer:(0,o.lazy)(()=>x(()=>import("./Vidyard-N6MhfVze.js").then(e=>e.V),__vite__mapDeps([12,1,2])))},{key:"kaltura",name:"Kaltura",canPlay:y.canPlay.kaltura,lazyPlayer:(0,o.lazy)(()=>x(()=>import("./Kaltura-BDM2l5do.js").then(e=>e.K),__vite__mapDeps([13,1,2])))},{key:"file",name:"FilePlayer",canPlay:y.canPlay.file,canEnablePIP:e=>y.canPlay.file(e)&&(document.pictureInPictureEnabled||(0,o.supportsWebKitPresentationMode)())&&!y.AUDIO_EXTENSIONS.test(e),lazyPlayer:(0,o.lazy)(()=>x(()=>import("./FilePlayer-CYjbWbG8.js").then(e=>e.F),__vite__mapDeps([14,1,2])))}];return Q}var ye=Number.isNaN||function(c){return typeof c=="number"&&c!==c};function Me(g,c){return!!(g===c||ye(g)&&ye(c))}function Ce(g,c){if(g.length!==c.length)return!1;for(var S=0;S<g.length;S++)if(!Me(g[S],c[S]))return!1;return!0}function Ie(g,c){c===void 0&&(c=Ce);var S,b=[],v,i=!1;function p(){for(var _=[],o=0;o<arguments.length;o++)_[o]=arguments[o];return i&&S===this&&c(_,b)||(v=g.apply(this,_),i=!0,S=this,b=_),v}return p}const Le=Object.freeze(Object.defineProperty({__proto__:null,default:Ie},Symbol.toStringTag,{value:"Module"})),De=be(Le);var G,de;function Oe(){if(de)return G;de=1;var g=Object.create,c=Object.defineProperty,S=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,v=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,p=(M,C)=>{for(var D in C)c(M,D,{get:C[D],enumerable:!0})},_=(M,C,D,w)=>{if(C&&typeof C=="object"||typeof C=="function")for(let E of b(C))!i.call(M,E)&&E!==D&&c(M,E,{get:()=>C[E],enumerable:!(w=S(C,E))||w.enumerable});return M},o=(M,C,D)=>(D=M!=null?g(v(M)):{},_(!M||!M.__esModule?c(D,"default",{value:M,enumerable:!0}):D,M)),y=M=>_(c({},"__esModule",{value:!0}),M),L={};p(L,{defaultProps:()=>T,propTypes:()=>u}),G=y(L);var e=o(we());const{string:h,bool:O,number:j,array:P,oneOfType:R,shape:a,object:s,func:r,node:n}=e.default,u={url:R([h,P,s]),playing:O,loop:O,controls:O,volume:j,muted:O,playbackRate:j,width:R([h,j]),height:R([h,j]),style:s,progressInterval:j,playsinline:O,pip:O,stopOnUnmount:O,light:R([O,h,s]),playIcon:n,previewTabIndex:j,previewAriaLabel:h,fallback:n,oEmbedUrl:h,wrapper:R([h,r,a({render:r.isRequired})]),config:a({soundcloud:a({options:s}),youtube:a({playerVars:s,embedOptions:s,onUnstarted:r}),facebook:a({appId:h,version:h,playerId:h,attributes:s}),dailymotion:a({params:s}),vimeo:a({playerOptions:s,title:h}),mux:a({attributes:s,version:h}),file:a({attributes:s,tracks:P,forceVideo:O,forceAudio:O,forceHLS:O,forceSafariHLS:O,forceDisableHls:O,forceDASH:O,forceFLV:O,hlsOptions:s,hlsVersion:h,dashVersion:h,flvVersion:h}),wistia:a({options:s,playerId:h,customControls:P}),mixcloud:a({options:s}),twitch:a({options:s,playerId:h}),vidyard:a({options:s})}),onReady:r,onStart:r,onPlay:r,onPause:r,onBuffer:r,onBufferEnd:r,onEnded:r,onError:r,onDuration:r,onSeek:r,onPlaybackRateChange:r,onPlaybackQualityChange:r,onProgress:r,onClickPreview:r,onEnablePIP:r,onDisablePIP:r},d=()=>{},T={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:d},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:d,onStart:d,onPlay:d,onPause:d,onBuffer:d,onBufferEnd:d,onEnded:d,onError:d,onDuration:d,onSeek:d,onPlaybackRateChange:d,onPlaybackQualityChange:d,onProgress:d,onClickPreview:d,onEnablePIP:d,onDisablePIP:d};return G}var ee,_e;function je(){if(_e)return ee;_e=1;var g=Object.create,c=Object.defineProperty,S=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,v=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,p=(r,n,u)=>n in r?c(r,n,{enumerable:!0,configurable:!0,writable:!0,value:u}):r[n]=u,_=(r,n)=>{for(var u in n)c(r,u,{get:n[u],enumerable:!0})},o=(r,n,u,d)=>{if(n&&typeof n=="object"||typeof n=="function")for(let T of b(n))!i.call(r,T)&&T!==u&&c(r,T,{get:()=>n[T],enumerable:!(d=S(n,T))||d.enumerable});return r},y=(r,n,u)=>(u=r!=null?g(v(r)):{},o(!r||!r.__esModule?c(u,"default",{value:r,enumerable:!0}):u,r)),L=r=>o(c({},"__esModule",{value:!0}),r),e=(r,n,u)=>(p(r,typeof n!="symbol"?n+"":n,u),u),h={};_(h,{default:()=>s}),ee=L(h);var O=y(ae()),j=y(me()),P=Oe(),R=$();const a=5e3;class s extends O.Component{constructor(){super(...arguments),e(this,"mounted",!1),e(this,"isReady",!1),e(this,"isPlaying",!1),e(this,"isLoading",!0),e(this,"loadOnReady",null),e(this,"startOnPlay",!0),e(this,"seekOnPlay",null),e(this,"onDurationCalled",!1),e(this,"handlePlayerMount",n=>{if(this.player){this.progress();return}this.player=n,this.player.load(this.props.url),this.progress()}),e(this,"getInternalPlayer",n=>this.player?this.player[n]:null),e(this,"progress",()=>{if(this.props.url&&this.player&&this.isReady){const n=this.getCurrentTime()||0,u=this.getSecondsLoaded(),d=this.getDuration();if(d){const T={playedSeconds:n,played:n/d};u!==null&&(T.loadedSeconds=u,T.loaded=u/d),(T.playedSeconds!==this.prevPlayed||T.loadedSeconds!==this.prevLoaded)&&this.props.onProgress(T),this.prevPlayed=T.playedSeconds,this.prevLoaded=T.loadedSeconds}}this.progressTimeout=setTimeout(this.progress,this.props.progressFrequency||this.props.progressInterval)}),e(this,"handleReady",()=>{if(!this.mounted)return;this.isReady=!0,this.isLoading=!1;const{onReady:n,playing:u,volume:d,muted:T}=this.props;n(),!T&&d!==null&&this.player.setVolume(d),this.loadOnReady?(this.player.load(this.loadOnReady,!0),this.loadOnReady=null):u&&this.player.play(),this.handleDurationCheck()}),e(this,"handlePlay",()=>{this.isPlaying=!0,this.isLoading=!1;const{onStart:n,onPlay:u,playbackRate:d}=this.props;this.startOnPlay&&(this.player.setPlaybackRate&&d!==1&&this.player.setPlaybackRate(d),n(),this.startOnPlay=!1),u(),this.seekOnPlay&&(this.seekTo(this.seekOnPlay),this.seekOnPlay=null),this.handleDurationCheck()}),e(this,"handlePause",n=>{this.isPlaying=!1,this.isLoading||this.props.onPause(n)}),e(this,"handleEnded",()=>{const{activePlayer:n,loop:u,onEnded:d}=this.props;n.loopOnEnded&&u&&this.seekTo(0),u||(this.isPlaying=!1,d())}),e(this,"handleError",(...n)=>{this.isLoading=!1,this.props.onError(...n)}),e(this,"handleDurationCheck",()=>{clearTimeout(this.durationCheckTimeout);const n=this.getDuration();n?this.onDurationCalled||(this.props.onDuration(n),this.onDurationCalled=!0):this.durationCheckTimeout=setTimeout(this.handleDurationCheck,100)}),e(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(n){if(!this.player)return;const{url:u,playing:d,volume:T,muted:M,playbackRate:C,pip:D,loop:w,activePlayer:E,disableDeferredLoading:A}=this.props;if(!(0,j.default)(n.url,u)){if(this.isLoading&&!E.forceLoad&&!A&&!(0,R.isMediaStream)(u)){console.warn(`ReactPlayer: the attempt to load ${u} is being deferred until the player has loaded`),this.loadOnReady=u;return}this.isLoading=!0,this.startOnPlay=!0,this.onDurationCalled=!1,this.player.load(u,this.isReady)}!n.playing&&d&&!this.isPlaying&&this.player.play(),n.playing&&!d&&this.isPlaying&&this.player.pause(),!n.pip&&D&&this.player.enablePIP&&this.player.enablePIP(),n.pip&&!D&&this.player.disablePIP&&this.player.disablePIP(),n.volume!==T&&T!==null&&this.player.setVolume(T),n.muted!==M&&(M?this.player.mute():(this.player.unmute(),T!==null&&setTimeout(()=>this.player.setVolume(T)))),n.playbackRate!==C&&this.player.setPlaybackRate&&this.player.setPlaybackRate(C),n.loop!==w&&this.player.setLoop&&this.player.setLoop(w)}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(n,u,d){if(!this.isReady){n!==0&&(this.seekOnPlay=n,setTimeout(()=>{this.seekOnPlay=null},a));return}if(u?u==="fraction":n>0&&n<1){const M=this.player.getDuration();if(!M){console.warn("ReactPlayer: could not seek using fraction – duration not yet available");return}this.player.seekTo(M*n,d);return}this.player.seekTo(n,d)}render(){const n=this.props.activePlayer;return n?O.default.createElement(n,{...this.props,onMount:this.handlePlayerMount,onReady:this.handleReady,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onLoaded:this.handleLoaded,onError:this.handleError}):null}}return e(s,"displayName","Player"),e(s,"propTypes",P.propTypes),e(s,"defaultProps",P.defaultProps),ee}var te,he;function Ue(){if(he)return te;he=1;var g=Object.create,c=Object.defineProperty,S=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,v=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,p=(w,E,A)=>E in w?c(w,E,{enumerable:!0,configurable:!0,writable:!0,value:A}):w[E]=A,_=(w,E)=>{for(var A in E)c(w,A,{get:E[A],enumerable:!0})},o=(w,E,A,t)=>{if(E&&typeof E=="object"||typeof E=="function")for(let f of b(E))!i.call(w,f)&&f!==A&&c(w,f,{get:()=>E[f],enumerable:!(t=S(E,f))||t.enumerable});return w},y=(w,E,A)=>(A=w!=null?g(v(w)):{},o(!w||!w.__esModule?c(A,"default",{value:w,enumerable:!0}):A,w)),L=w=>o(c({},"__esModule",{value:!0}),w),e=(w,E,A)=>(p(w,typeof E!="symbol"?E+"":E,A),A),h={};_(h,{createReactPlayer:()=>D}),te=L(h);var O=y(ae()),j=y(ve()),P=y(De),R=y(me()),a=Oe(),s=$(),r=y(je());const n=(0,s.lazy)(()=>x(()=>import("./Preview-of7xUcD9.js").then(w=>w.P),__vite__mapDeps([15,1,2]))),u=typeof window<"u"&&window.document&&typeof document<"u",d=typeof K<"u"&&K.window&&K.window.document,T=Object.keys(a.propTypes),M=u||d?O.Suspense:()=>null,C=[],D=(w,E)=>{var A;return A=class extends O.Component{constructor(){super(...arguments),e(this,"state",{showPreview:!!this.props.light}),e(this,"references",{wrapper:t=>{this.wrapper=t},player:t=>{this.player=t}}),e(this,"handleClickPreview",t=>{this.setState({showPreview:!1}),this.props.onClickPreview(t)}),e(this,"showPreview",()=>{this.setState({showPreview:!0})}),e(this,"getDuration",()=>this.player?this.player.getDuration():null),e(this,"getCurrentTime",()=>this.player?this.player.getCurrentTime():null),e(this,"getSecondsLoaded",()=>this.player?this.player.getSecondsLoaded():null),e(this,"getInternalPlayer",(t="player")=>this.player?this.player.getInternalPlayer(t):null),e(this,"seekTo",(t,f,N)=>{if(!this.player)return null;this.player.seekTo(t,f,N)}),e(this,"handleReady",()=>{this.props.onReady(this)}),e(this,"getActivePlayer",(0,P.default)(t=>{for(const f of[...C,...w])if(f.canPlay(t))return f;return E||null})),e(this,"getConfig",(0,P.default)((t,f)=>{const{config:N}=this.props;return j.default.all([a.defaultProps.config,a.defaultProps.config[f]||{},N,N[f]||{}])})),e(this,"getAttributes",(0,P.default)(t=>(0,s.omit)(this.props,T))),e(this,"renderActivePlayer",t=>{if(!t)return null;const f=this.getActivePlayer(t);if(!f)return null;const N=this.getConfig(t,f.key);return O.default.createElement(r.default,{...this.props,key:f.key,ref:this.references.player,config:N,activePlayer:f.lazyPlayer||f,onReady:this.handleReady})})}shouldComponentUpdate(t,f){return!(0,R.default)(this.props,t)||!(0,R.default)(this.state,f)}componentDidUpdate(t){const{light:f}=this.props;!t.light&&f&&this.setState({showPreview:!0}),t.light&&!f&&this.setState({showPreview:!1})}renderPreview(t){if(!t)return null;const{light:f,playIcon:N,previewTabIndex:H,oEmbedUrl:z,previewAriaLabel:l}=this.props;return O.default.createElement(n,{url:t,light:f,playIcon:N,previewTabIndex:H,previewAriaLabel:l,oEmbedUrl:z,onClick:this.handleClickPreview})}render(){const{url:t,style:f,width:N,height:H,fallback:z,wrapper:l}=this.props,{showPreview:m}=this.state,I=this.getAttributes(t),U=typeof l=="string"?this.references.wrapper:void 0;return O.default.createElement(l,{ref:U,style:{...f,width:N,height:H},...I},O.default.createElement(M,{fallback:z},m?this.renderPreview(t):this.renderActivePlayer(t)))}},e(A,"displayName","ReactPlayer"),e(A,"propTypes",a.propTypes),e(A,"defaultProps",a.defaultProps),e(A,"addCustomPlayer",t=>{C.push(t)}),e(A,"removeCustomPlayers",()=>{C.length=0}),e(A,"canPlay",t=>{for(const f of[...C,...w])if(f.canPlay(t))return!0;return!1}),e(A,"canEnablePIP",t=>{for(const f of[...C,...w])if(f.canEnablePIP&&f.canEnablePIP(t))return!0;return!1}),A};return te}var re,Pe;function Ne(){if(Pe)return re;Pe=1;var g=Object.create,c=Object.defineProperty,S=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,v=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,p=(P,R)=>{for(var a in R)c(P,a,{get:R[a],enumerable:!0})},_=(P,R,a,s)=>{if(R&&typeof R=="object"||typeof R=="function")for(let r of b(R))!i.call(P,r)&&r!==a&&c(P,r,{get:()=>R[r],enumerable:!(s=S(R,r))||s.enumerable});return P},o=(P,R,a)=>(a=P!=null?g(v(P)):{},_(!P||!P.__esModule?c(a,"default",{value:P,enumerable:!0}):a,P)),y=P=>_(c({},"__esModule",{value:!0}),P),L={};p(L,{default:()=>j}),re=y(L);var e=o(Re()),h=Ue();const O=e.default[e.default.length-1];var j=(0,h.createReactPlayer)(e.default,O);return re}var ge=Ne();const xe=Ee(ge),ze=Te({__proto__:null,default:xe},[ge]);export{Ae as a,ze as i,$ as r}; | |