@vkontakte/videoplayer-shared 1.0.100-dev.a5a2d3fc3.0 → 1.0.100-dev.cb6e2e206.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015.cjs +3 -3
- package/es2015.esm.js +3 -3
- package/esnext.cjs +3 -3
- package/esnext.esm.js +3 -3
- package/evergreen.esm.js +3 -3
- package/package.json +1 -1
- package/types/index.d.ts +0 -1
- package/types/types/index.d.ts +1 -7
- package/types/utils/browser.d.ts +1 -5
- package/types/utils/clearVideoElement.d.ts +1 -1
- package/types/utils/index.d.ts +0 -1
- package/types/audio/AudioGraph.d.ts +0 -37
- package/types/audio/AudioPluginChain.d.ts +0 -41
- package/types/audio/AudioSourceConnection.d.ts +0 -36
- package/types/audio/global.d.d.ts +0 -3
- package/types/audio/index.d.ts +0 -5
- package/types/audio/plugins/EqualizerPlugin.d.ts +0 -31
- package/types/audio/plugins/NormalizerPlugin.d.ts +0 -23
- package/types/audio/plugins/VolumeFaderPlugin.d.ts +0 -39
- package/types/audio/types.d.ts +0 -132
- package/types/utils/timers/WorkerTimersBackend.d.ts +0 -28
- package/types/utils/timers/index.d.ts +0 -3
- package/types/utils/timers/sharedTimers.d.ts +0 -1
- package/types/utils/timers/timers.d.ts +0 -6
- package/types/utils/timers/types.d.ts +0 -30
- package/types/utils/timers/worker.d.ts +0 -28
package/es2015.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-shared v1.0.100-dev.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/videoplayer-shared v1.0.100-dev.cb6e2e206.0
|
|
3
|
+
* Thu, 27 Aug 2026 11:40:58 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-100/doc/
|
|
5
5
|
*/
|
|
6
|
-
function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}var t=e;function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol._oxc_toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@_oxc_toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}var t=e,r=n;function i(e){var n=r(e,`string`);return t(n)==`symbol`?n:n+``}var a=i;function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=o;function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?c(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){u(a,r,i,o,s,`next`,e)}function s(e){u(a,r,i,o,s,`throw`,e)}o(void 0)})}}var f=l,p=d;let m;var h=Object.defineProperty,ee=Object.getOwnPropertyNames,te=Object.getOwnPropertyDescriptor,ne=Object.prototype.hasOwnProperty;function g(e){return this[e]}var _=e=>{var t=(v??=new WeakMap).get(e),n;if(t)return t;if(t=h({},`__esModule`,{value:!0}),e&&typeof e==`object`||typeof e==`function`)for(var r of ee(e))ne.call(t,r)||h(t,r,{get:g.bind(e,r),enumerable:!(n=te(e,r))||n.enumerable});return v.set(e,t),t},v,re=e=>e;function ie(e,t){this[e]=re.bind(null,t)}var y=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0,configurable:!0,set:ie.bind(t,n)})},b={};y(b,{withoutNullable:()=>fe,videoSizeToQuality:()=>tt,videoQualityToHeight:()=>nt,videoHeightToQuality:()=>et,urlCanParsePolyfilled:()=>Br,timeout:()=>ht,timeCodeToString:()=>st,throttleFn:()=>lt,throttle:()=>Dt,tap:()=>Ht,suppressAbort:()=>an,stringTrimStart:()=>Or,stringTrimRight:()=>jr,stringTrimLeft:()=>Ar,stringTrimEnd:()=>kr,stringReplaceAll:()=>Dr,stringPadStart:()=>Er,stringPadEnd:()=>Tr,stringMatchAll:()=>wr,stringAt:()=>Cr,skip:()=>Wt,shareReplay:()=>Kt,safeStorage:()=>Be,retainTimers:()=>Pe,requestIdleCallbackPolyfilled:()=>Lr,releaseTimers:()=>Fe,promiseWithResolvers:()=>ur,promiseTry:()=>lr,promiseFinally:()=>cr,promiseAny:()=>sr,promiseAllSettled:()=>or,pairwise:()=>Bt,once:()=>zt,observeElementSize:()=>Jt,observableFrom:()=>vt,objectValues:()=>ar,objectHasOwn:()=>ir,objectFromEntries:()=>nr,objectEntries:()=>tr,nowInt:()=>_e,now:()=>k,noop:()=>C,merge:()=>mt,mapTo:()=>Rt,map:()=>It,loadVKLangPack:()=>xn,isValidURL:()=>Zt,isNullable:()=>D,isNonNullable:()=>E,isLowerOrEqual:()=>Ze,isLower:()=>V,isInvariantQuality:()=>H,isIntersecting:()=>Qt,isHigherOrEqual:()=>Xe,isHigher:()=>Ye,isBrowserWindow:()=>ge,isAbortError:()=>rn,interval:()=>gt,interpolate:()=>tn,includesPolyfilled:()=>zr,globalThisPolyfill:()=>er,getWindow:()=>O,getVideoQualityLabel:()=>at,getTraceSubscriptionMethod:()=>sn,getTimersDiagnostics:()=>Ie,getTimerWindow:()=>he,getRangeAroundIndex:()=>nn,getPlayerId:()=>en,getMessageFromError:()=>on,getHighestQuality:()=>Qe,getExponentialDelay:()=>ze,fromEvent:()=>yt,flattenObject:()=>Yt,filterChanged:()=>Nt,filter:()=>kt,fillWithDefault:()=>ot,fetchPolyfilled:()=>yr,devNull:()=>En,detectEmbed:()=>qe,debounceFn:()=>ct,debounce:()=>wt,createTimers:()=>Me,createDIContainer:()=>In,combine:()=>pt,cloneDeepWith:()=>U,cloneDeep:()=>ut,clearVideoElement:()=>Xt,checkNever:()=>oe,cancelIdleCallbackPolyfilled:()=>Rr,buffer:()=>xt,atPolyfilled:()=>Mr,assertQualityIsExact:()=>it,assertNullable:()=>de,assertNotEmptyArray:()=>pe,assertNonNullable:()=>ue,assertNever:()=>S,assertEmptyArray:()=>me,arrayWith:()=>$n,arrayToSpliced:()=>Qn,arrayToSorted:()=>Zn,arrayToReversed:()=>Xn,arrayIncludes:()=>Yn,arrayFlatMap:()=>Jn,arrayFlat:()=>qn,arrayFindLastIndex:()=>Kn,arrayFindLast:()=>Gn,arrayAt:()=>Wn,areQualitiesExact:()=>rt,addScript:()=>Le,abortable:()=>Re,WorkerState:()=>Se,VolumeFaderPlugin:()=>Bn,VideoQuality:()=>Je,ValueSubject:()=>ft,VKNumericLanguage:()=>yn,VERSION:()=>ae,TracerFactory:()=>gn,TimerModule:()=>xe,SubscriptionRemovable:()=>bt,Subscription:()=>x,Subject:()=>T,RequestPolyfilled:()=>br,ReplaySubject:()=>dt,Observable:()=>w,NormalizerPlugin:()=>Un,Logger:()=>le,InternalsExposure:()=>Tn,InterfaceLanguage:()=>wn,InjectionToken:()=>Fn,INTERNAL_EXPOSE_GLOBAL_KEY:()=>K,ErrorOrigin:()=>_n,ErrorCategory:()=>vn,EqualizerPlugin:()=>Y,CircularBuffer:()=>W,AudioGraph:()=>zn,AppTracer:()=>J,AbortSignalPolyfilled:()=>Sr,AbortControllerPolyfilled:()=>xr}),module.exports=_(b);var ae=`1.0.100-dev.a5a2d3fc3.0`;class x{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(e=>{typeof e==`function`?e():e.unsubscribe()})}add(e){return this.subscriptions.push(e),this}}var S=e=>{throw Error(`${e} is value of unexpected type`)},oe=e=>{},C=()=>{},se=e=>{throw console.error(e),e},ce=e=>{console.error(e)};class w{constructor(e){this.suppressErrors=!1,e&&(this._subscribe=e)}setSuppressErrors(e){this.suppressErrors=e}subscribe(e,t){let n=this.suppressErrors?ce:se,r;r=t?typeof t==`function`?{next:t,error:C}:{next:e=>t.next(e),error:e=>t.error?.call(t,e)}:{next:n,error:C};let i=typeof e==`function`?{next:t=>{try{let n=e(t);n instanceof Promise&&n.catch(e=>r.next(e))}catch(e){r.next(e)}},error:e=>r.next(e)}:{next:t=>e.next(t),error:t=>e.error?e.error(t):r.next(t)},a;try{a=this._subscribe(i)}catch(e){i.error?.call(i,e)}return new x().add(()=>{switch(i.next=C,i.error=C,typeof a){case`function`:a();return;case`object`:a.unsubscribe();return;case`undefined`:return;default:return S(a)}})}pipe(...e){return e.reduce((e,t)=>t(e),this)}_subscribe(e){}}class T extends w{constructor(){super(),this.keyCounter=0,this.subscribers=new Map}next(e){this.subscribers.forEach(t=>t.next(e))}error(e){this.subscribers.forEach(t=>t.error?.call(t,e))}_subscribe(e){let t=this.keyCounter++;return this.subscribers.set(t,e),new x().add(()=>this.subscribers.delete(t))}}class le{constructor(){this.log$=new T,this.logs=[],this.log=e=>{let t=f(f({},e),{},{timestamp:Date.now()});this.logs.push(t),this.log$.next(t)},this.getAllLogs=()=>this.logs}createCustomLog(e){return(...t)=>{let n;try{n=e(...t)}catch{n={message:"error in `createCustomLog`",component:`Logger`}}this.log(n)}}createComponentLog(e){return this.createCustomLog(t=>f({component:e},t))}}function ue(e,t=`Assertion "value is not nullable" failed`){if(e==null)throw Error(t)}function de(e,t=`Assertion "value is nullable" failed`){if(e!=null)throw Error(t)}function E(e){return e!=null}function D(e){return e==null}var fe=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>E(t)));function pe(e,t){if(!e?.length)throw Error(t)}function me(e,t){if(e?.length)throw Error(t)}var O=()=>globalThis,he=()=>globalThis,ge=(e=O())=>!!(e.window&&e.screen),k=typeof O().performance?.now==`function`?()=>O().performance.now():()=>Date.now(),_e=()=>Math.trunc(k());function ve(){var e=self,t=new Map;e.onmessage=function(n){var r=n.data;if(r.type===`ping`){e.postMessage({type:`ready`});return}if(r.type===`set`){var i=r.id;r.repeat?t.set(i,{repeat:!0,handle:e.setInterval(function(){e.postMessage({type:`tick`,id:i})},r.delay)}):t.set(i,{repeat:!1,handle:e.setTimeout(function(){t.delete(i),e.postMessage({type:`tick`,id:i})},r.delay)});return}var a=t.get(r.id);a&&(a.repeat?e.clearInterval(a.handle):e.clearTimeout(a.handle),t.delete(r.id))}}var ye=()=>`'use strict';(${ve.toString()})();`;class be{constructor(e,t){this.worker=void 0,this.handlers=void 0,this.records=new Map,this.ticks=0,this.handleMessage=e=>{if(e.data.type===`ready`){this.handlers.onReady();return}let{id:t}=e.data,n=this.records.get(t);D(n)||(this.ticks++,n.repeat||this.records.delete(t),n.callback())},this.handleError=()=>{this.handlers.onFatalError(this.destroy())},this.worker=e,this.handlers=t,this.worker.onmessage=this.handleMessage,this.worker.onerror=this.handleError,this.worker.onmessageerror=this.handleError,this.postCommand({type:`ping`})}static create(e){let t=O();if(typeof t.Worker!=`function`||typeof t.Blob!=`function`||D(t.URL?.createObjectURL))return null;let n=t.URL.createObjectURL(new t.Blob([ye()],{type:`text/javascript`}));try{return new be(new t.Worker(n),e)}catch{return null}finally{t.URL.revokeObjectURL(n)}}get activeCount(){return this.records.size}get deliveredTicks(){return this.ticks}set(e,t,n,r){this.records.set(e,{callback:t,repeat:r,delay:n,startedAt:k()}),this.postCommand({type:`set`,id:e,delay:n,repeat:r})}clear(e){this.records.delete(e)&&this.postCommand({type:`clear`,id:e})}destroy(){let e=new Map(this.records);return this.records.clear(),this.worker.onmessage=null,this.worker.onerror=null,this.worker.onmessageerror=null,this.worker.terminate(),e}postCommand(e){this.worker.postMessage(e)}}var xe;(e=>{e.SHARED=`shared`,e.CORE=`core`,e.STATISTICS=`statistics`,e.INTERACTIVE=`interactive`,e.UI=`ui`,e.UI_TV=`ui-tv`})(xe||={});var Se;(e=>{e.IDLE=`idle`,e.STARTING=`starting`,e.READY=`ready`,e.FAILED=`failed`})(Se||={});var Ce=1,A=0,j=`idle`,M=null,N=new Map,P=new Set,we=e=>{let t=k();for(let[n,r]of e){let e=r.repeat?r.delay:Math.max(0,r.delay-(t-r.startedAt));ke(n,r.callback,e,r.repeat)}},Te=e=>{j=`failed`,M=null,we(e)},Ee=()=>{D(M)||(we(M.destroy()),M=null),j=`idle`},De=()=>{j===`idle`&&(j=`starting`,M=be.create({onReady:()=>{j=`ready`},onFatalError:Te}))},Oe=e=>P.has(e)?(De(),j===`ready`?M:null):null,ke=(e,t,n,r)=>{let i=he();r?N.set(e,{repeat:!0,nativeId:i.setInterval(t,n)}):N.set(e,{repeat:!1,nativeId:i.setTimeout(()=>{N.delete(e),t()},n)})},Ae=(e,t,n,r)=>{let i=Ce++,a=Oe(e);return D(a)?ke(i,t,n,r):a.set(i,t,n,r),i},je=e=>{if(D(e))return;let t=N.get(e);if(D(t)){M?.clear(e);return}N.delete(e);let n=he();t.repeat?n.clearInterval(t.nativeId):n.clearTimeout(t.nativeId)},Me=e=>({setTimeout:(t,n=0)=>Ae(e,t,n,!1),setInterval:(t,n=0)=>Ae(e,t,n,!0),clearTimeout:je,clearInterval:je}),Ne=e=>{P.clear(),e.forEach(e=>P.add(e)),P.size===0&&Ee()},Pe=e=>{A++,Ne(e)},Fe=()=>{A!==0&&(A--,A===0&&Ne([]))},Ie=()=>({workerModules:[...P],workerState:j,liveConsumers:A,activeWindowTimers:N.size,activeWorkerTimers:M?.activeCount??0,workerTicks:M?.deliveredTicks??0}),F=Me(`shared`),Le=(e,t,n)=>new Promise((r,i)=>{t.addEventListener(`abort`,()=>{s(),l.remove()});let a=()=>{s(),i(`error`)},o=()=>{s(),r()},s=()=>{c&&F.clearTimeout(c),l.removeEventListener(`load`,o),l.removeEventListener(`error`,a)},c;n&&(c=F.setTimeout(()=>{s(),i(`timeout`)},n));let l=document.createElement(`script`);l.addEventListener(`load`,o),l.addEventListener(`error`,a),l.src=e,document.head.appendChild(l)}),Re=(e,t)=>p(function*(...n){let r=t(...n),i=e.aborted,a;for(;!i&&!e.aborted;)try{let e=yield r.next(a);i=e.done??!1,a=e.value}catch(e){yield r.throw(e)}return a}),ze=(e,{start:t=0,factor:n=2,max:r=1/0,min:i=t,random:a=0}={})=>{let o=t;return o*=n**+e,o*=1+(Math.random()*a*2-a),o=Math.round(o),o=Math.min(o,r),o=Math.max(o,i),o},Be={};y(Be,{set:()=>Ue,remove:()=>Ge,isPersistent:()=>Ve,has:()=>We,get:()=>He,clear:()=>Ke});var I,L,R=`vk-videoplayer-dummy-key-${Math.random()}`,z=()=>{if(L!==void 0)return L;try{localStorage.setItem(R,`test`),localStorage.removeItem(R),L=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(R),L=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)L=2;else throw e}else throw e}return L===2&&(I=new Map),L},Ve=()=>z()===0,He=e=>{let t=z();switch(t){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return I?.get(e);default:S(t)}},Ue=(e,t)=>{let n=z();switch(n){case 0:try{localStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 1:try{sessionStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 2:I?.set(e,t);return;default:S(n)}},We=e=>{let t=z();switch(t){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return I?.has(e)??!1;default:return S(t),!1}},Ge=e=>{let t=z();switch(t){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:I?.delete(e);return;default:S(t)}},Ke=()=>{let e=z();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return I?.clear();default:S(e)}},qe=()=>{let e,t=[],n=O();try{e=n.self!==n.top}catch(t){t instanceof DOMException&&t.name===`SecurityError`?e=!0:(e=!1,console.error(t))}try{n.location?.ancestorOrigins&&(t=[...n.location.ancestorOrigins])}catch(e){console.error(e)}try{!t.length&&n.document.referrer&&(t=[new URL(n.document.referrer).origin])}catch(e){console.error(e)}return t=t.filter(e=>URL.canParse(e)),{isEmbed:e,origins:t,topOrigin:t.at(-1),immediateOrigin:t.at(0)}},Je;(e=>{e.INVARIANT=`Invariant quality`,e.Q_144P=`144p`,e.Q_240P=`240p`,e.Q_360P=`360p`,e.Q_480P=`480p`,e.Q_576P=`576p`,e.Q_720P=`720p`,e.Q_1080P=`1080p`,e.Q_1440P=`1440p`,e.Q_2160P=`2160p`,e.Q_4320P=`4320p`})(Je||={});var B={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},Ye=(e,t)=>B[e].height>B[t].height,Xe=(e,t)=>B[e].height>=B[t].height,V=(e,t)=>B[e].height<B[t].height,Ze=(e,t)=>B[e].height<=B[t].height,Qe=e=>e.sort((e,t)=>e===t?0:e===`Invariant quality`?1:t===`Invariant quality`?-1:V(e,t)?1:-1)[0],$e=Object.keys(B).sort((e,t)=>V(e,t)?-1:1),et=(e,t=.02)=>[...$e].find(n=>B[n].height*(1+t)>=e),tt=({width:e,height:t})=>{let n=Math.min(e,t),r=Math.max(e,t);return $e.find(e=>{let t=B[e];return t.width>=r&&t.height>=n})},nt=e=>B[e].height,H=e=>e===`Invariant quality`,rt=e=>e.every(e=>!H(e));function it(e){if(H(e))throw Error(`Expected exact quality`)}var at=e=>{switch(e){case`4320p`:return`8K`;case`2160p`:return`4K`;case`1440p`:return`QHD`;case`1080p`:return`FHD`;case`720p`:return`HD`;default:return``}},ot=(e,t)=>{let n={};for(let r of Object.keys(t)){let i=t[r],a=e[r];Array.isArray(i)?n[r]=Array.isArray(a)?a:i:typeof i==`object`&&i?typeof a==`object`&&a&&!Array.isArray(a)?n[r]=ot(a,i):n[r]=a??i:n[r]=r in e?a:i}return n},st=e=>{let t=``;return e>=3600&&(t+=Math.floor(e/3600)+`h`,e%=3600),e>=60&&(t+=Math.floor(e/60)+`m`,e%=60),e>0&&(t+=Math.floor(e)+`s`),t};function ct(e,t=0,n){let r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0,p=!t&&t!==0&&typeof O().requestAnimationFrame==`function`;n&&(u=!!n.leading,d=`maxWait`in n,a=n?.maxWait?Math.max(+n?.maxWait||0,t):a,f=`trailing`in n?!!n.trailing:f);function m(t){let n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function h(e,t){return p?(s&&O().cancelAnimationFrame(s),O().requestAnimationFrame(e)):F.setTimeout(e,t)}function ee(e){if(p){O().cancelAnimationFrame(e);return}F.clearTimeout(e)}function te(e){return l=e,s=h(_,t),u?m(e):o}function ne(e){let n=e-c,r=e-l,i=t-n;return d?Math.min(i,a-r):i}function g(e){let n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function _(){let e=Date.now();if(g(e))return v(e);s=h(_,ne(e))}function v(e){return s=void 0,f&&r?m(e):(r=i=void 0,o)}function re(){s!==void 0&&ee(s),l=0,r=c=i=s=void 0}function ie(){return s===void 0?o:v(Date.now())}function y(){return s!==void 0}function b(...e){let n=Date.now(),a=g(n);if(r=e,i=this,c=n,a){if(s===void 0)return te(c);if(d)return s=h(_,t),m(c)}return s===void 0&&(s=h(_,t)),o}return b.cancel=re,b.flush=ie,b.pending=y,b}var lt=(e,t=0,n)=>ct(e,t,f(f(f({},{leading:!0,trailing:!0}),n),{},{maxWait:t})),U=(e,t)=>{if(typeof e!=`object`||!e)return e;let n=Array.isArray(e)?[]:{};for(let r in e){if(typeof t==`function`){let i=t(e[r],r,e,n);if(i!==void 0){n[r]=i;continue}}typeof e[r]==`object`?n[r]=U(e[r],t):n[r]=e[r]}return n},ut=e=>U(e);class dt extends T{constructor(e){super(),this.bufferSize=void 0,this.buffer=[],this.cursorEnd=-1,this.cursorStart=0,this.bufferSize=e,this.buffer=Array(e)}next(e){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=e,this.subscribers.forEach(t=>t.next(e))}_subscribe(e){for(let t=this.cursorStart;t<=this.cursorEnd;t++)e.next(this.buffer[t%this.bufferSize]);let t=this.keyCounter++;return this.subscribers.set(t,e),new x().add(()=>this.subscribers.delete(t))}}class ft extends T{constructor(e){super(),this.value=void 0,this.value=e}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){let t=super._subscribe(e);return e.next(this.value),t}}function pt(e){return new w(t=>{let n={},r=Object.keys(e).length,i=e=>i=>{e in n||r--,n[e]=i,r===0&&t.next(n)};return Object.entries(e).reduce((e,[t,n])=>e.add(n.subscribe(i(t))),new x)})}function mt(...e){return new w(t=>e.reduce((e,n)=>e.add(n.subscribe(t)),new x))}var ht=e=>new w(t=>{let n=F.setTimeout(()=>{try{t.next()}catch(e){if(t.error)t.error(e);else throw e}},e);return()=>F.clearTimeout(n)}),gt=e=>new w(t=>{let n=F.setInterval(()=>t.next(),e);return()=>{n&&=(F.clearInterval(n),void 0)}});function _t(e){return new w(t=>{if(e instanceof Promise){let n=!1;return e.then(e=>{n||t.next(e)}).catch(e=>{n||t.error?.call(t,e)}),()=>{n=!0}}for(let n=0;n<e.length;n++)t.next(e[n])})}var vt=_t,yt=(e,t)=>new w(n=>{let r=e=>n.next(e);return e.addEventListener(t,r),()=>e.removeEventListener(t,r)});class bt extends x{remove(e){this.subscriptions=this.subscriptions.filter(t=>t!==e)}}function xt(e){return t=>new w(n=>t.subscribe(new St(n,e)))}class St{constructor(e,t){this.destination=void 0,this.size=void 0,this.lastValues=[],this.destination=e,this.size=t}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Ct={leading:!1,trailing:!0};function wt(e,t=Ct){return n=>new w(r=>n.subscribe(new Tt(r,e,t)))}class Tt{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,E(this.timeout)?F.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=F.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(e){if(this.destination.error)this.destination.error(e);else throw e}this.timeout=void 0},this.time)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Et={leading:!0,trailing:!1};function Dt(e,t=Et){return n=>new w(r=>n.subscribe(new Ot(r,e,t)))}class Ot{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,D(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=F.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var t;(t=this.destination).error?.call(t,e)}}function kt(e){return t=>new w(n=>t.subscribe(new At(n,e)))}class At{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.destination=e,this.predicate=t}next(e){let t;try{t=this.predicate(e)}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}var jt=(e,t)=>{let n=(e,t)=>{let n=Object.keys(e);for(let r in t)if(!n.includes(r)||t[r]!==e[r])return!1;return!0};return n(e,t)&&n(t,e)},Mt=(e,t)=>e instanceof Object&&t instanceof Object?jt(e,t):e===t;function Nt(e=Mt){return t=>new w(n=>t.subscribe(new Ft(n,e)))}var Pt={};class Ft{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.lastValue=Pt,this.destination=e,this.predicate=t}next(e){let t;try{t=this.lastValue===Pt||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object&&!Array.isArray(e)?f({},e):e}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function It(e){return t=>new w(n=>t.subscribe(new Lt(n,e)))}class Lt{constructor(e,t){this.destination=void 0,this.mapper=void 0,this.destination=e,this.mapper=t}next(e){let t;try{t=this.mapper(e)}catch(e){throw this.error(e),e}this.destination.next(t)}error(e){var t;(t=this.destination).error?.call(t,e)}}function Rt(e){return It(()=>e)}function zt(){return e=>new w(t=>{let n=!1,r=!1,i=e.subscribe(e=>{n||(n=!0,t.next(e)),r&&i.unsubscribe()},e=>{n=!0,t.error?.call(t,e),r&&i.unsubscribe()});return r=!0,n&&i.unsubscribe(),i})}function Bt(){return e=>new w(t=>e.subscribe(new Vt(t)))}class Vt{constructor(e){this.destination=void 0,this.last=void 0,this.hasLast=!1,this.destination=e}next(e){let t=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,e])}error(e){var t;(t=this.destination).error?.call(t,e)}}function Ht(e){return t=>new w(n=>t.subscribe(new Ut(n,e)))}class Ut{constructor(e,t){this.destination=void 0,this.effect=void 0,this.destination=e,this.effect=t}next(e){try{this.effect(e)}catch(e){throw this.error(e),e}this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function Wt(e){return t=>new w(n=>t.subscribe(new Gt(n,e)))}class Gt{constructor(e,t){if(this.destination=void 0,this.count=void 0,this.destination=e,this.count=t,t<0){var n;(n=this.destination).error?.call(n,Error(`Count can not be less than zero`))}}next(e){this.count===0?this.destination.next(e):this.count--}error(e){var t;(t=this.destination).error?.call(t,e)}}function Kt(e=0){return t=>{let n=0,r=new dt(e),i=t.subscribe(r),a=e=>()=>{e.unsubscribe(),n--,n===0&&i.unsubscribe()};return new w(e=>(n++,a(r.subscribe(e))))}}var qt=300,Jt=(e,t=qt)=>new w(n=>{let r=O(),{width:i,height:a}=e.getBoundingClientRect();if(n.next({width:i,height:a}),!ge(r))return;let o=new r.ResizeObserver(lt(e=>{let t=e[0];if(!t)return;let r,i;t.contentBoxSize&&t.contentBoxSize[0]?(i=t.contentBoxSize[0].blockSize,r=t.contentBoxSize[0].inlineSize):t.contentRect&&(r=t.contentRect.width,i=t.contentRect.height),E(r)&&E(i)&&n.next({width:r,height:i})},t));return o.observe(e),()=>o.disconnect()}),Yt=(e,t=6,n=`.`)=>{let r={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!t))if(typeof e[i]==`object`&&e[i]!==null){let a=Yt(e[i],t-1);for(let e in a)a.hasOwnProperty(e)&&(r[i+n+e]=a[e])}else r[i]=e[i];return r},Xt=e=>{e.innerHTML=``,e.removeAttribute(`src`),e.load()},Zt=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol===`https:`},Qt=(e,t)=>!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom),$t=(()=>{let e=0;return()=>{let t=e;return e=(e+1)%(2**53-1),t}})(),en=e=>e!==void 0&&e!==``?e:$t().toString();function tn(e,t,n){if(e<=t[0])return n[0];if(e>=t[t.length-1])return n[n.length-1];let r=1;for(;r<t.length&&t[r]<e;)r++;r>=t.length&&(r=t.length-1);let i=t[r-1],a=t[r],o=n[r-1],s=n[r];return e===i?o:e===a?s:o+(e-i)/(a-i)*(s-o)}function nn(e,t,n){if(e<=0||n<0)return[];let r=[],i=Math.floor((e-1)/2),a=Math.floor(e/2),o=t-i,s=t+a;o<0&&(s+=Math.abs(o),o=0),s>n&&(o-=s-n,s=n),o=Math.max(0,o),s=Math.min(n,s);for(let e=o;e<=s;e++)r.push(e);return r}var rn=e=>e instanceof DOMException&&(e.name===`AbortError`||e.code===20),an=e=>{if(!rn(e))throw e};function on(e){if(e&&typeof e==`object`){if(`message`in e)return String(e.message);try{return JSON.stringify(e)}catch{return`object serialization error`}}return String(e)}m=Symbol.iterator;class W{constructor(e){if(this.buffer=void 0,this.writeIndex=0,this.count=0,this.capacity=void 0,e<=0)throw Error(`Capacity must be greater than 0`);this.capacity=e,this.buffer=Array.from({length:e}).fill(null)}add(e){this.buffer[this.writeIndex]=e,this.writeIndex=(this.writeIndex+1)%this.capacity,this.count<this.capacity&&this.count++}*[m](){if(this.count===0)return;let e=this.count<this.capacity?0:this.writeIndex;for(let t=0;t<this.count;t++){let t=this.buffer[e];E(t)&&(yield t),e=(e+1)%this.capacity}}clear(){this.buffer.fill(null),this.writeIndex=0,this.count=0}get size(){return this.count}get maxCapacity(){return this.capacity}}var sn=e=>(t,n=!1)=>r=>{let i=typeof r==`object`;r==null||i&&!Object.keys(r).length||e(t,i?Yt(r):{value:r},n)},cn=(e={})=>{let t=e=>{let t=e;return e===void 0?t=`undefined`:e===null?t=`null`:(typeof e==`number`||typeof e==`boolean`)&&(t=e.toString()),t},n={};for(let r in e)Array.isArray(e[r])?n[r]=e[r].map(t):n[r]=t(e[r]);return n};class G{constructor({name:e,getParentContext:t,getRootTracerContext:n,options:r}){this.dynamicImportTimeout=5e3,this.subscription=new x,this.options=void 0,this.span=void 0,this.context=void 0,this.childTracers=[],this.initPromise=void 0,this.getRootTracerContext=void 0,this.eventsBuffer=null,this.options=r??{};let{tracerEventsBufferSize:i}=this.options;E(i)&&i>0&&(this.eventsBuffer=new W(i)),G.dynamicImportStatus===`not_started`&&(G.dynamicImportPromise=this.loadOpentelemetry());let a=Date.now();this.initPromise=G.dynamicImportPromise.then(r=>{G.dynamicImportStatus===`completed`&&this.init({name:e,getParentContext:t,getRootTracerContext:n},a)})}init({name:e,getParentContext:t,getRootTracerContext:n},r){let i=n?.();if(D(i))return;let{opentelemetryApi:a}=G.dynamicImports,{context:o,trace:s}=a,{tracer:c,attributes$:l}=i;this.span=c.startSpan(e,{startTime:r},t?.()),this.context=s.setSpan(o.active(),this.span),this.getRootTracerContext=n,this.subscription.add(l.subscribe(e=>{E(e)&&this.span.setAttributes(e)}))}loadOpentelemetry(){var e=this;return p(function*(){if(G.dynamicImportStatus===`not_started`){G.dynamicImportStatus=`in_progress`;try{let t=new Promise((t,n)=>F.setTimeout(n,e.dynamicImportTimeout)),n=Promise.all([import(`@opentelemetry/api`),import(`@opentelemetry/sdk-trace-web`),import(`@apptracer/opentelemetry`),import(`@opentelemetry/resources`),import(`@opentelemetry/semantic-conventions`)]),[r,i,a,o,s]=yield Promise.race([n,t]);G.dynamicImports={opentelemetryApi:r,opentelemetrySdk:i,tracer:a,opentelemetryResources:o,opentelemetrySemanticConventions:s},G.dynamicImportStatus=`completed`}catch{G.dynamicImportStatus=`failed`}}})()}isComponentTracerNotInitialized(){return D(this.span)||G.dynamicImportStatus===`failed`}addEventToBuffer(e,t,n,r){E(this.eventsBuffer)&&this.eventsBuffer.add({name:e,attributes:t,type:n,timestamp:r})}addEventToSpan(e,t,n,r){this.span.addEvent(e,f(f({},cn(t)),{},{type:n}),r)}log(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`log`,r)}):this.addEventToBuffer(e,t,`log`,r)}error(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`error`,r)}):this.addEventToBuffer(e,t,`error`,r)}critical(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`critical`,r)}):this.addEventToBuffer(e,t,`critical`,r)}createComponentTracer(e){let t=new G({name:e,getParentContext:()=>this.context,getRootTracerContext:()=>this.getRootTracerContext?.call(this),options:this.options});return this.childTracers.push(t),t}setSpanAttributes(e){this.span.setAttributes(cn(e))}end(){this.initPromise.then(e=>{if(!this.isComponentTracerNotInitialized()){if(E(this.eventsBuffer))for(let e of this.eventsBuffer)this.addEventToSpan(e.name,e.attributes,e.type,e.timestamp);this.childTracers.forEach(e=>e.end()),this.span.end(),this.subscription.unsubscribe()}})}pause(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!0)}resume(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!1)}}G.dynamicImportStatus=`not_started`,G.dynamicImports=void 0,G.dynamicImportPromise=void 0;var ln=`gW5EerTD5QhAnsbpF7Hd2NSMRteYIUUMjFbSyI68Pf5`,un=e=>{class t extends e{constructor(e,t){super(e,t),this._isPaused=!1,this._pausedSpans=void 0,this.maxExportBatchSize=void 0,this.maxQueueSize=void 0,this.maxQueueSize=t?.maxQueueSize??2048,this.maxExportBatchSize=t?.maxExportBatchSize??512,this._pausedSpans=new W(this.maxQueueSize)}pause(){this._isPaused=!0}resume(){var e=()=>super.onEnd,t=this;return p(function*(){if(!t._isPaused)return;t._isPaused=!1;let n=t._pausedSpans;t._pausedSpans=new W(t.maxQueueSize);let r=0;for(let i of n)e().call(t,i),r+=1,r>=t.maxExportBatchSize&&(yield new Promise(e=>F.setTimeout(()=>e(void 0),0)),r=0);n.clear(),yield t.forceFlush()})()}onEnd(e){if(this._isPaused){this._pausedSpans.add(e);return}super.onEnd(e)}}return t};class dn extends G{constructor(e){super({name:`Root`,options:e}),this.attributes$=new ft(null),this.paused$=new ft(!1),this.paused$.next(!!this.options.tracerPausedAtInit)}init({name:e,getParentContext:t},n){let{tracer:r,opentelemetryResources:i,opentelemetrySdk:a,opentelemetrySemanticConventions:o}=G.dynamicImports,{TracerUploadSpanExporter:s}=r,{WebTracerProvider:c,BatchSpanProcessor:l}=a,{resourceFromAttributes:u}=i,{ATTR_SERVICE_NAME:d,ATTR_SERVICE_VERSION:f}=o,p=new(un(l))(new s({appToken:ln}));this.subscription.add(this.paused$.subscribe(e=>{e?p.pause():p.resume()}));let m=new c({resource:u({[d]:`videoplayer-sdk-web`,[f]:ae}),spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0},spanProcessors:[p]});m.register();let h=m.getTracer(`sdk-videoplayer-tracer`);super.init({name:e,getParentContext:t,getRootTracerContext:()=>({tracer:h,attributes$:this.attributes$,paused$:this.paused$})},n)}getTraceId(){return this.isComponentTracerNotInitialized()?``:this.span.spanContext().traceId}setSpanAttributes(e){this.attributes$.next(f(f({},this.attributes$.getValue()),cn(e)))}addSubscription(e){this.subscription.add(e)}}class fn{constructor(e){this.fakeTraceId=void 0}log(e,t,n){}error(e,t,n){}critical(e,t,n){}createComponentTracer(e){return new fn({name:e})}end(){}getTraceId(){return this.fakeTraceId}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}var pn=()=>!0,mn={level:0,filter:pn,name:`Noname Tracer`,outputMethod:`log`};class hn{constructor({name:e,level:t,filter:n,outputMethod:r}={}){this.name=void 0,this.filter=pn,this.level=mn.level,this.outputMethod=mn.outputMethod,this.childTracers=[],this.filter=n??this.filter,this.level=t??this.level,this.outputMethod=r??this.outputMethod,this.name=e??mn.name}log(e,t,n){this.logDebug(e,t)}error(e,t,n){this.logError(e,t)}critical(e,t,n){this.logError(e,t)}createComponentTracer(e){let t=new hn({filter:this.filter,level:this.level,name:`${this.name}/ ${e}`,outputMethod:this.outputMethod});return this.childTracers.push(t),t}end(){this.childTracers.forEach(e=>e.end()),this.childTracers=[]}setLevel(e){this.level=e,this.childTracers.forEach(t=>t.setLevel(e))}setOtputMethod(e){this.outputMethod=e,this.childTracers.forEach(t=>t.setOtputMethod(e))}setFilter(e){this.filter=e,this.childTracers.forEach(t=>t.setFilter(e))}getFinishedSpans(){}getTraceId(){return`debug_trace`}get verbose(){return this.level===0}createMessage(e,t){return[this.name,e,JSON.stringify(t)].join(`: `)}logDebug(e,t){!this.verbose||!this.filter(e,t)||O().console[this.outputMethod](this.createMessage(e,t))}logError(e,t){this.filter(e,t)&&O().console.error(this.createMessage(e,t))}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}class gn{static createRootTracer(e=`fake`,t){switch(e){case`real`:return new dn(t);case`debug`:return new hn;default:return new fn}}}var _n;(e=>{e.MediaError=`mediaError`,e.SegmentFetcher=`segment_fetcher`,e.SegmentAppend=`segment_append`,e.Hangup=`hangup`,e.Stall=`stall`})(_n||={});var vn;(e=>{e.NETWORK=`network`,e.VIDEO_PIPELINE=`video_pipeline`,e.EXTERNAL_API=`external_api`,e.PARSER=`parser`,e.DOM=`dom`,e.WTF=`wtf`,e.UI=`ui`,e.CALL_FROM_EXTERNAL=`call_from_external`,e.FATAL=`fatal`})(vn||={});var yn;(e=>{e.Armenian=`58`,e.Azerbaijani=`57`,e.Belarusian=`114`,e.English=`3`,e.Kazakh=`97`,e.Portuguese=`73`,e.Russian=`0`,e.Spanish=`4`,e.Ukrainian=`1`,e.Uzbek=`65`,e.Vietnamese=`75`})(yn||={});var bn=`vk.ru`,xn=function(){var e=p(function*(e,t,n){let r=new URL(`https://${bn}/js/lang-pack.js`);return r.searchParams.set(`format`,`json`),r.searchParams.set(`name`,t),e!==void 0&&r.searchParams.set(`lang`,e),Sn(yield(yield fetch(r.toString())).json(),n)});return function(t,n,r){return e.apply(this,arguments)}}(),Sn=(e,t)=>Object.fromEntries(Object.entries(e.keys).map(([e,n])=>[e.substring(`${t}_`.length),Cn(n)])),Cn=e=>Array.isArray(e)?e[0]:e,wn;(e=>{e.RU=`ru`,e.EN=`en`})(wn||={});var K=`__vk_vp_internals_exposure`;class Tn{constructor(e,t){this.playerId=void 0,this.type=void 0,this.playerId=t,this.type=e,this.initWindowObjects()}getWindowObject(){var e;if(typeof window>`u`)return{};let t=this.playerId,n=this.type;return((e=window[K])==null||(e=e[t])==null?void 0:e[n])??{}}initWindowObjects(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[K]||(window[K]={}),window[K][e]||(window[K][e]={}),window[K][e][t]||(window[K][e][t]={})}expose(e){typeof window>`u`||Object.assign(this.getWindowObject(),e)}destroy(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[K]&&window[K][e]&&window[K][e][t]&&(delete window[K][e][t],Object.keys(window[K][e]).length||delete window[K][e],Object.keys(window[K]).length||delete window[K])}}var En={};y(En,{subscribe:()=>An,push:()=>kn,destroy:()=>On,create:()=>Dn});var q=new Map,Dn=(e,t)=>q.set(e,t??[]),On=e=>q.delete(e),kn=(e,t)=>{let n=q.get(e);n&&(typeof n==`function`?n(t):n.push(t))},An=(e,t)=>{let n=q.get(e);if(n){if(n&&Array.isArray(n))for(let e of n)t(e);q.set(e,t)}},jn=e=>fe({id:e.id,message:e.message,category:e.category,data:Mn(e.data),httpCode:e.httpCode,UVBackendErrorCode:e.UVBackendErrorCode});function Mn(e){switch(typeof e){case`boolean`:case`string`:case`number`:return e;case`object`:try{return JSON.stringify(e)}catch{return}default:return}}var Nn=e=>{let t=e.thrown instanceof Error?e.thrown:Error(e.message),n=e.id.length>10240?e.id.substring(0,10240):e.id;try{t.name=n}catch{t=Error(e.message),t.name=n}return t},Pn=()=>{try{var e;let{origin:t,pathname:n,search:r,hostname:i}=((e=O())==null||(e=e.document)==null?void 0:e.location)??{};return!i||i===`localhost`?void 0:f({url:t+n},new URLSearchParams(r).entries().reduce((e,[t,n])=>(e[`url.${t}`]=n,e),{}))}catch{}};class J{constructor(e,t,n,r){this.dynamicImportTimeout=5e3,this.componentName=void 0,this.subscription=new x,this.options=void 0,this.envParams=void 0,this.context=void 0,this.isEmbed=void 0,this.embedParent=void 0,this.beforeInitErrors=[],this.componentName=e,this.options=t,this.envParams=n,this.context=f({},r);let{isEmbed:i,topOrigin:a}=qe();this.isEmbed=i,this.embedParent=a?new URL(a).hostname:void 0,this.options.enabled&&(this.loadModule(),this.init())}updateContext(e){Object.assign(this.context,e)}error(e,t){let n=J.tracerErrorMap.get(this.componentName);if(!n){this.beforeInitErrors.push([e,t]);return}let{blackErrorCategoryList:r,blackErrorIdList:i,sampleRate:a,whiteErrorCategoryList:o,whiteErrorIdList:s}=this.options,{id:c,category:l}=e;if(!(r.length&&r.includes(l)||i.length&&i.includes(c)||o.length&&!o.includes(l)||s.length&&!s.includes(c)||Math.random()>=a))try{let r=Nn(e);n?.error(r,f(f({crashIdSource:t?.crashIdSource??r.name,severity:t?.severity??(e.traceAsLog?`debug`:void 0)},t?.issueKey?{issueKey:t.issueKey}:{}),{},{keys:f(f(f(f({},this.context),jn(e)),Pn()),this.isEmbed&&this.embedParent&&{iframe_host:this.embedParent})}))}catch(e){console.error(e)}}addSubscription(e){this.subscription.add(e)}destroy(){this.subscription.unsubscribe()}init(){var e=this;return p(function*(){try{if(yield J.loadPromise,J.tracerErrorMap.has(e.componentName)||D(J.appTracerModule))return;let{appTracerModule:t}=J,{initTracerError:n,initTracerErrorUploader:r,getTracerModules:i}=t,a=i(e.componentName),o=!a.error,s=a.error??n(e.componentName,{enableUnhandledErrorsListeners:!1,stringifyErrorDataObject:!0});E(e.options.userId)&&s.setUserId(e.options.userId),o&&r(e.componentName,{appToken:ln,environment:e.envParams.env,versionCode:1,versionName:e.envParams.version}),J.tracerErrorMap.set(e.componentName,s),e.beforeInitErrors.forEach(t=>e.error.apply(e,t)),e.beforeInitErrors=[]}catch(e){console.error(e)}})()}loadModule(){var e=this;E(J.loadPromise)||(J.loadPromise=function(){var t=p(function*(){try{let t=new Promise((t,n)=>F.setTimeout(n,e.dynamicImportTimeout));J.appTracerModule=yield Promise.race([t,import(`@apptracer/sdk/lite`)])}catch(e){J.loadPromise=null,console.error(e)}});return function(){return t.apply(this,arguments)}}()())}}J.tracerErrorMap=new Map,J.appTracerModule=null,J.loadPromise=null;class Fn{constructor(e,t){this.options=void 0,this.symbol=void 0,this.options=t,this.symbol=Symbol(e)}}var In=()=>{let e=new Map,t=new Map,n=new Map,r=new Map,i=new Set;return{resolve(e){if(!r.has(e)){let t=n.get(e);if(!t)throw Error(`No constructor registered in DI container for ${e.name}`);r.set(e,new t)}return r.get(e)},resolveOptional(e){try{return this.resolve(e)}catch{return}},replace(e,t){r.forEach((t,n)=>{t instanceof e&&r.delete(n)}),n.set(e,t)},getToken(n){if(e.has(n.symbol))return e.get(n.symbol);if(t.has(n.symbol)){let r=t.get(n.symbol)();return e.set(n.symbol,r),r}if(n.options?.factory){let t=n.options.factory();return e.set(n.symbol,t),t}throw Error(`No value registered in DI container for token "${n.symbol.description}"`)},registerToken(t,n){e.set(t.symbol,n)},registerFactory(e,n){t.set(e.symbol,n)},hasToken(n){return e.has(n.symbol)||t.has(n.symbol)||!!n.options?.factory},registerCleanup(e){i.add(e)},clear(){i.forEach(e=>e()),i.clear(),e.clear(),t.clear(),r.clear(),n.clear()}}};class Ln{constructor(e){this._inputNode=void 0,this._outputNode=void 0,this._plugins=[],this._destination=null,this._taps=[],this._inputNode=e.createGain(),this._outputNode=e.createGain()}get input(){return this._inputNode}get plugins(){return this._plugins}connectTo(e){this._destination=e,this.rebuild()}addTap(e){this._taps.push(e),this._outputNode.connect(e)}hasPlugin(e){return this._plugins.some(t=>t.id===e)}addPlugin(e){this.hasPlugin(e.id)||(this._plugins.push(e),this.rebuild())}removePlugin(e){let t=this._plugins.findIndex(t=>t.id===e);t!==-1&&(this._plugins.splice(t,1),this.rebuild())}rebuild(){this._inputNode.disconnect();for(let e of this._plugins)e.outputNode.disconnect();this._outputNode.disconnect();let e=this._inputNode;for(let t of this._plugins)e.connect(t.inputNode),e=t.outputNode;e.connect(this._outputNode),this._destination!==null&&this._outputNode.connect(this._destination);for(let e of this._taps)this._outputNode.connect(e)}}class Rn{constructor(e,t,n){this._pluginChain=void 0,this._element=void 0,this._ctx=void 0,this._sourceNode=null,this._isBound=!1,this._element=e,this._ctx=t,this._pluginChain=new Ln(t),this._pluginChain.connectTo(n)}get isBound(){return this._isBound}get plugins(){return this._pluginChain.plugins}bind(){this._isBound||=(this._sourceNode===null&&(this._sourceNode=this._ctx.createMediaElementSource(this._element)),this._sourceNode.disconnect(),this._sourceNode.connect(this._pluginChain.input),!0)}unbind(){this._isBound&&=(this._sourceNode?.disconnect(),this._sourceNode?.connect(this._ctx.destination),!1)}addPlugin(e){this._pluginChain.addPlugin(e)}removePlugin(e){this._pluginChain.removePlugin(e)}addAnalyser(e){this._pluginChain.addTap(e)}}class zn{constructor(){this._ctx=null,this._masterGain=null,this._connections=new Map,this._contextEnabled=!1,this._boundBeforeDisable=new Set}static isSupported(){let e=O();return E(e.AudioContext??e.webkitAudioContext)}get context(){if(D(this._ctx)){let e=O(),t=e.AudioContext??e.webkitAudioContext;this._ctx=new t}return this._ctx}get contextState(){return this._contextEnabled?this._ctx?.state??`suspended`:`suspended`}enableContext(){var e=this;return p(function*(){e.ensureContext(),yield e._ctx?.resume(),e._contextEnabled=!0;for(let t of e._boundBeforeDisable)e._connections.get(t)?.bind();e._boundBeforeDisable.clear()})()}disableContext(){var e=this;return p(function*(){e._contextEnabled=!1;for(let[t,n]of e._connections)n.isBound&&(e._boundBeforeDisable.add(t),n.unbind())})()}connectSource(e){var t=this;return p(function*(){t.ensureContext(),t._contextEnabled=!0,yield t._ctx?.resume();let n=t._connections.get(e);if(n!==void 0){n.isBound||n.bind();return}let r=new Rn(e,t.context,t._masterGain);r.bind(),t._connections.set(e,r)})()}disconnectSource(e){this._connections.get(e)?.unbind()}isSourceConnected(e){return this._connections.get(e)?.isBound??!1}addPlugin(e,t){let n=this._connections.get(e);if(n===void 0)throw Error(`Source is not connected. Call connectSource() first.`);n.addPlugin(t)}removePlugin(e,t){this._connections.get(e)?.removePlugin(t)}getPlugins(e){return this._connections.get(e)?.plugins??[]}createAnalyser(e){let t=this._connections.get(e);if(t===void 0)return null;let n=this.context.createAnalyser();return n.fftSize=256,n.smoothingTimeConstant=.8,t.addAnalyser(n),n}setMasterVolume(e){this._masterGain!==null&&(this._masterGain.gain.value=e)}getMasterVolume(){return this._masterGain?.gain.value??1}dispose(){this._connections.clear(),this._boundBeforeDisable.clear(),this._masterGain=null,this._contextEnabled=!1,this._ctx?.close(),this._ctx=null}ensureContext(){let e=this.context;D(this._masterGain)&&(this._masterGain=e.createGain(),this._masterGain.gain.value=1,this._masterGain.connect(e.destination))}}class Bn{constructor(e,t){this.id=`volume-fader`,this._gainNode=void 0,this._duration=void 0,this._curve=void 0,this._fade=null,this._gainNode=e.createGain(),this._gainNode.gain.value=1,this._duration=t.duration,this._curve=t.curve??this._buildEasingCurve(t.duration/1e3)}get inputNode(){return this._gainNode}get outputNode(){return this._gainNode}get faded(){return this._fade!==null}appear(){this._startFade(0,1)}disappear(){this._startFade(1,0)}pause(){if(this._fade===null)return;let e=this._gainNode.gain,t=this._gainNode.context.currentTime,n=t-this._fade.startTime,r=Math.max(0,this._fade.remaining-n);if(r<=.001){this._finishFade();return}let i=this._sampleIndex(this._fade,t),a=this._fade.curve[i];e.cancelScheduledValues(t),e.setValueAtTime(a,t),this._fade={from:a,target:this._fade.target,startTime:t,remaining:r,curve:this._fade.curve.subarray(i)}}resume(){if(this._fade===null)return;let e=this._gainNode.context.currentTime,{from:t,target:n,remaining:r,curve:i}=this._fade;if(r<=.001||Math.abs(n-t)<.001||i.length<2){this._finishFade();return}this._fade={from:t,target:n,startTime:e,remaining:r,curve:i},this._scheduleCurve(i,t,e,r)}cancel(){this._fade!==null&&this._finishFade()}_finishFade(){if(this._fade===null)return;let e=this._gainNode.gain,t=this._gainNode.context.currentTime;e.cancelScheduledValues(t),e.setValueAtTime(this._fade.target,t),this._fade=null}_startFade(e,t){let n=this._gainNode.gain,r=this._gainNode.context.currentTime,i=this._duration/1e3;if(i<=0){n.cancelScheduledValues(r),n.setValueAtTime(t,r),this._fade=null;return}let a=new Float32Array(this._curve.length);for(let n=0;n<this._curve.length;n++)a[n]=e+(t-e)*this._curve[n];this._fade={from:a[0],target:t,startTime:r,remaining:i,curve:a},this._scheduleCurve(a,a[0],r,i)}_buildEasingCurve(e){let t=Math.max(2,Math.ceil(e*60)),n=new Float32Array(t);for(let e=0;e<t;e++){let r=e/(t-1);n[e]=(1-Math.cos(Math.PI*r))/2}return n}_scheduleCurve(e,t,n,r){let i=this._gainNode.gain;i.cancelScheduledValues(n),i.setValueAtTime(t,n),i.setValueCurveAtTime(e,n,r)}_sampleIndex(e,t){let n=t-e.startTime,r=Math.max(0,Math.min(1,n/e.remaining));return Math.min(Math.round(r*(e.curve.length-1)),e.curve.length-1)}}class Vn{constructor(e,t,n,r){this._filter=void 0,this._source=void 0,this._defaultGain=void 0,this.frequency=void 0,this.frequency=t,this._source=n,this._defaultGain=r,this._filter=e.createBiquadFilter(),this._filter.type=`peaking`,this._filter.frequency.value=t,this._filter.gain.value=0,this._filter.Q.value=1,this._source.connect(this._filter.gain)}get value(){return this._source.offset.value}get node(){return this._filter}set(e){this._source.offset.value=e}reset(){this.set(this._defaultGain)}dispose(){this._source.disconnect(this._filter.gain)}}class Y{constructor(e,t){this.id=`equalizer`,this._inputNode=void 0,this._outputNode=void 0,this._filterMap=new Map,this.equalizer=void 0,this._inputNode=e.createGain(),this._outputNode=e.createGain();let n=Object.entries(t).map(([e,t])=>[Number(e),t]).filter(([e])=>Number.isFinite(e)).sort((e,t)=>e[0]-t[0]),r=Y._sources.get(e);D(r)&&(r=new Map,Y._sources.set(e,r));for(let[t,i]of n)if(!r.has(t)){let n=e.createConstantSource();n.offset.value=i,n.start(),r.set(t,n)}let i={};for(let[t,a]of n){let n=r.get(t);if(!n)continue;let o=new Vn(e,t,n,a);this._filterMap.set(t,o),i[t]=o}this.equalizer=i,this.rebuild()}get inputNode(){return this._inputNode}get outputNode(){return this._outputNode}resetAll(){for(let e of this._filterMap.values())e.reset()}dispose(){for(let e of this._filterMap.values())e.dispose()}rebuild(){this._inputNode.disconnect();for(let e of this._filterMap.values())e.node.disconnect();this._outputNode.disconnect();let e=this._inputNode;for(let t of this._filterMap.values())e.connect(t.node),e=t.node;e.connect(this._outputNode)}}Y._sources=new WeakMap;var Hn=-14;class Un{constructor(e,t){this.id=`normalizer`,this._compressor=void 0,this._gainNode=void 0,this._compressor=e.createDynamicsCompressor(),this._gainNode=e.createGain(),this.applyConfig(t),this._compressor.connect(this._gainNode)}get inputNode(){return this._compressor}get outputNode(){return this._gainNode}applyConfig(e){if(!Number.isFinite(e.lufs)||!Number.isFinite(e.peak)){this._gainNode.gain.value=1;return}this._compressor.threshold.value=e.peak,this._compressor.knee.value=0,this._compressor.ratio.value=20,this._compressor.attack.value=.003,this._compressor.release.value=.25;let t=(e.targetLufs??Hn)-e.lufs;this._gainNode.gain.value=10**(t/20)}}var Wn=(e,t)=>{let n=e.length,r=t>=0?t:n+t;return r>=0&&r<n?e[r]:void 0},Gn=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r,n,e))return r}},Kn=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n,e))return n;return-1},qn=(e,t=1)=>{let n=[],r=(e,t)=>{for(let i=0;i<e.length;i++){if(!(i in e))continue;let a=e[i];t>0&&Array.isArray(a)?r(a,t-1):n.push(a)}};return r(e,t),n},Jn=(e,t)=>{let n=[];for(let r=0;r<e.length;r++){let i=t(e[r],r,e);if(Array.isArray(i))for(let e=0;e<i.length;e++)n.push(i[e]);else n.push(i)}return n},Yn=(e,t,n=0)=>{let r=e.length,i=n>=0?n:Math.max(r+n,0);for(;i<r;i++){let n=e[i];if(n===t||n!==n&&t!==t)return!0}return!1},Xn=e=>{let t=e.length,n=Array(t);for(let r=0;r<t;r++)n[r]=e[t-1-r];return n},Zn=(e,t)=>{let n=e.slice();return t?n.sort(t):n.sort()},Qn=(e,t,n,...r)=>{let i=e.slice();return n===void 0?i.splice(t):i.splice(t,n,...r),i},$n=(e,t,n)=>{let r=e.length,i=t>=0?t:r+t,a=e.slice();return a[i]=n,a},er=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof self<`u`?self:Function(`return this`)(),tr=e=>{let t=[],n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r];t.push([i,e[i]])}return t},nr=e=>{let t={};for(let[n,r]of e)t[n]=r;return t},rr=Object.prototype.hasOwnProperty,ir=(e,t)=>rr.call(e,t),ar=e=>{let t=Object.keys(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n},or=e=>{let t=Array.from(e);return t.length===0?Promise.resolve([]):Promise.all(t.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},sr=e=>{let t=Array.from(e);return t.length===0?Promise.reject(AggregateError([],`All promises were rejected`)):new Promise((e,n)=>{let r=Array(t.length),i=t.length;t.forEach((t,a)=>{Promise.resolve(t).then(e,e=>{r[a]=e,--i,i===0&&n(AggregateError(r,`All promises were rejected`))})})})},cr=(e,t)=>e.then(e=>Promise.resolve(t()).then(()=>e),e=>Promise.resolve(t()).then(()=>{throw e})),lr=e=>{try{return Promise.resolve(e())}catch(e){return Promise.reject(e)}},ur=()=>{let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},{NativeAbortSignal:dr,NativeAbortController:fr}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function pr(e){let t;try{t=new Event(`abort`)}catch{typeof document<`u`?document.createEvent?(t=document.createEvent(`Event`),t.initEvent(`abort`,!1,!1)):(t=document.createEventObject(),t.type=`abort`):t={type:`abort`,bubbles:!1,cancelable:!1}}return t.reason=e,t}function mr(e){if(e===void 0)if(typeof document>`u`)e=Error(`This operation was aborted`),e.name=`AbortError`;else try{e=new DOMException(`signal is aborted without reason`),Object.defineProperty(e,"name",{value:`AbortError`})}catch{e=Error(`This operation was aborted`),e.name=`AbortError`}return e}class hr{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}removeEventListener(e,t){if(!(e in this.listeners))return;let n=this.listeners[e];for(let e=0,r=n.length;e<r;e++)if(n[e].callback===t){n.splice(e,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let n=0,r=t.length;n<r;n++){let r=t[n];try{r.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}r.options&&r.options.once&&this.removeEventListener(e.type,r.callback)}return!e.defaultPrevented}}class X extends hr{constructor(){super(),this.listeners||hr.call(this),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}toString(){return`[object AbortSignal]`}dispatchEvent(e){e.type===`abort`&&(this.aborted=!0,typeof this.onabort==`function`&&this.onabort.call(this,e)),super.dispatchEvent(e)}throwIfAborted(){let{aborted:e,reason:t=`Aborted`}=this;if(e)throw t}static timeout(e){let t=new Z;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new Z;function n(){t.abort(this.reason),r()}function r(){for(let t of e)t.removeEventListener(`abort`,n)}for(let r of e)if(r.aborted){t.abort(r.reason);break}else r.addEventListener(`abort`,n);return t.signal}}class Z{constructor(){Object.defineProperty(this,"signal",{value:new X,writable:!0,configurable:!0})}abort(e){let t=mr(e),n=pr(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(Z.prototype[Symbol.toStringTag]=`AbortController`,X.prototype[Symbol.toStringTag]=`AbortSignal`);function gr(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log(`__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill`),!0):typeof e.Request==`function`&&!e.Request.prototype.hasOwnProperty(`signal`)||!e.AbortController}function _r(e){typeof e==`function`&&(e={fetch:e});let{fetch:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!gr({fetch:t,Request:n,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:t,Request:a};let a=n;(a&&!a.prototype.hasOwnProperty(`signal`)||i)&&(a=function(e,t){let r;t&&t.signal&&(r=t.signal,delete t.signal);let i=new n(e,t);return r&&Object.defineProperty(i,"signal",{writable:!1,enumerable:!1,configurable:!0,value:r}),i},a.prototype=n.prototype);let o=t;return{fetch:(e,t)=>{let n=a&&a.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){let r;try{r=new DOMException(`Aborted`,`AbortError`)}catch{r=Error(`Aborted`),r.name=`AbortError`}if(n.aborted)return Promise.reject(r);let i=new Promise((e,t)=>{n.addEventListener(`abort`,()=>t(r),{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,o(e,t)])}return o(e,t)},Request:a}}var Q=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,$=`fetch`in Q&&gr({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}),vr=$?_r({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}):void 0,yr=$?vr.fetch:Q.fetch,br=$?vr.Request:Q.Request,xr=$?Z:Q.AbortController,Sr=$?X:Q.AbortSignal,Cr=(e,t)=>{let n=e.length,r=t>=0?t:n+t;if(r<0||r>=n)return;let i=e.charCodeAt(r);if(i>=55296&&i<=56319&&r+1<n){let t=e.charCodeAt(r+1);if(t>=56320&&t<=57343)return e[r]+e[r+1]}return e[r]};function*wr(e,t){let n=t.flags.includes(`g`)?t.flags:t.flags+`g`,r=new RegExp(t.source,n),i;for(;(i=r.exec(e))!==null;)yield i,i[0].length===0&&r.lastIndex++}var Tr=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return e+n.repeat(Math.ceil(r/n.length)).slice(0,r)},Er=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return n.repeat(Math.ceil(r/n.length)).slice(0,r)+e},Dr=(e,t,n)=>{if(typeof t==`string`){if(typeof n==`string`)return t===``?n+e.split(``).join(n)+n:e.split(t).join(n);let r=[],i=0,a=e.indexOf(t,i);for(;a!==-1;)r.push(e.slice(i,a)),r.push(n(t,a,e)),i=a+t.length,a=e.indexOf(t,i);return r.push(e.slice(i)),r.join(``)}let r=t.flags.includes(`g`)?t.flags:t.flags+`g`,i=new RegExp(t.source,r);return e.replace(i,n)},Or=e=>e.replace(/^\s+/,``),kr=e=>e.replace(/\s+$/,``),Ar=Or,jr=kr,Mr=(e,t)=>typeof e==`string`?Cr(e,t):Wn(e,t),Nr=(e,t={})=>{let n=t.timeout||1,r=performance.now();return Q.setTimeout(()=>{e({get didTimeout(){return t.timeout?!1:performance.now()-r-1>n},timeRemaining(){return Math.max(0,1+(performance.now()-r))}})},1)},Pr=e=>Q.clearTimeout(e),Fr=e=>typeof e==`function`&&e?.toString().endsWith(`{ [native code] }`),Ir=!Fr(Q.requestIdleCallback)||!Fr(Q.cancelIdleCallback),Lr=Ir?Nr:Q.requestIdleCallback,Rr=Ir?Pr:Q.cancelIdleCallback,zr=(e,t,n)=>typeof e==`string`?e.includes(t,n):Yn(e,t,n),Br=(e,t,n)=>{if(typeof e.canParse==`function`)return e.canParse(t,n);try{return new e(t,n),!0}catch{return!1}};
|
|
6
|
+
function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}var t=e;function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol._oxc_toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@_oxc_toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}var t=e,r=n;function i(e){var n=r(e,`string`);return t(n)==`symbol`?n:n+``}var a=i;function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=o;function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?c(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){u(a,r,i,o,s,`next`,e)}function s(e){u(a,r,i,o,s,`throw`,e)}o(void 0)})}}var f=l,p=d;let m;var h=Object.defineProperty,g=Object.getOwnPropertyNames,ee=Object.getOwnPropertyDescriptor,te=Object.prototype.hasOwnProperty;function _(e){return this[e]}var v=e=>{var t=(y??=new WeakMap).get(e),n;if(t)return t;if(t=h({},`__esModule`,{value:!0}),e&&typeof e==`object`||typeof e==`function`)for(var r of g(e))te.call(t,r)||h(t,r,{get:_.bind(e,r),enumerable:!(n=ee(e,r))||n.enumerable});return y.set(e,t),t},y,ne=e=>e;function re(e,t){this[e]=ne.bind(null,t)}var b=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0,configurable:!0,set:re.bind(t,n)})},x={};b(x,{withoutNullable:()=>de,videoSizeToQuality:()=>Ne,videoQualityToHeight:()=>Pe,videoHeightToQuality:()=>Me,urlCanParsePolyfilled:()=>ar,timeout:()=>Ke,timeCodeToString:()=>ze,throttleFn:()=>Ve,throttle:()=>it,tap:()=>vt,suppressAbort:()=>Nt,stringTrimStart:()=>qn,stringTrimRight:()=>Xn,stringTrimLeft:()=>Yn,stringTrimEnd:()=>Jn,stringReplaceAll:()=>Kn,stringPadStart:()=>Gn,stringPadEnd:()=>Wn,stringMatchAll:()=>Un,stringAt:()=>Hn,skip:()=>bt,shareReplay:()=>St,safeStorage:()=>be,requestIdleCallbackPolyfilled:()=>nr,promiseWithResolvers:()=>kn,promiseTry:()=>On,promiseFinally:()=>Dn,promiseAny:()=>En,promiseAllSettled:()=>Tn,pairwise:()=>gt,once:()=>ht,observeElementSize:()=>wt,observableFrom:()=>Ye,objectValues:()=>wn,objectHasOwn:()=>Cn,objectFromEntries:()=>xn,objectEntries:()=>bn,nowInt:()=>_e,now:()=>ge,noop:()=>w,merge:()=>Ge,mapTo:()=>mt,map:()=>V,loadVKLangPack:()=>Kt,isValidURL:()=>Et,isNullable:()=>O,isNonNullable:()=>D,isLowerOrEqual:()=>ke,isLower:()=>L,isInvariantQuality:()=>R,isIntersecting:()=>Dt,isHigherOrEqual:()=>Oe,isHigher:()=>De,isBrowserWindow:()=>me,isAbortError:()=>Mt,interval:()=>qe,interpolate:()=>At,includesPolyfilled:()=>ir,globalThisPolyfill:()=>yn,getWindow:()=>k,getVideoQualityLabel:()=>Le,getTraceSubscriptionMethod:()=>Ft,getRangeAroundIndex:()=>jt,getPlayerId:()=>kt,getMessageFromError:()=>Pt,getHighestQuality:()=>Ae,getExponentialDelay:()=>ye,fromEvent:()=>Xe,flattenObject:()=>H,filterChanged:()=>ut,filter:()=>ot,fillWithDefault:()=>Re,fetchPolyfilled:()=>Rn,devNull:()=>Zt,detectEmbed:()=>P,debounceFn:()=>Be,debounce:()=>tt,createDIContainer:()=>cn,combine:()=>We,cloneDeepWith:()=>z,cloneDeep:()=>He,clearVideoElement:()=>Tt,checkNever:()=>ae,cancelIdleCallbackPolyfilled:()=>rr,buffer:()=>Qe,atPolyfilled:()=>Zn,assertQualityIsExact:()=>Ie,assertNullable:()=>ue,assertNotEmptyArray:()=>fe,assertNonNullable:()=>le,assertNever:()=>C,assertEmptyArray:()=>pe,arrayWith:()=>vn,arrayToSpliced:()=>_n,arrayToSorted:()=>gn,arrayToReversed:()=>hn,arrayIncludes:()=>mn,arrayFlatMap:()=>pn,arrayFlat:()=>fn,arrayFindLastIndex:()=>dn,arrayFindLast:()=>un,arrayAt:()=>ln,areQualitiesExact:()=>Fe,addScript:()=>he,abortable:()=>ve,VideoQuality:()=>F,ValueSubject:()=>B,VKNumericLanguage:()=>Wt,VERSION:()=>ie,TracerFactory:()=>Ht,SubscriptionRemovable:()=>Ze,Subscription:()=>S,Subject:()=>E,RequestPolyfilled:()=>zn,ReplaySubject:()=>Ue,Observable:()=>T,Logger:()=>ce,InternalsExposure:()=>Xt,InterfaceLanguage:()=>Yt,InjectionToken:()=>sn,INTERNAL_EXPOSE_GLOBAL_KEY:()=>q,ErrorCategory:()=>Ut,CircularBuffer:()=>U,AppTracer:()=>Y,AbortSignalPolyfilled:()=>Vn,AbortControllerPolyfilled:()=>Bn}),module.exports=v(x);var ie=`1.0.100-dev.cb6e2e206.0`;class S{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(e=>{typeof e==`function`?e():e.unsubscribe()})}add(e){return this.subscriptions.push(e),this}}var C=e=>{throw Error(`${e} is value of unexpected type`)},ae=e=>{},w=()=>{},oe=e=>{throw console.error(e),e},se=e=>{console.error(e)};class T{constructor(e){this.suppressErrors=!1,e&&(this._subscribe=e)}setSuppressErrors(e){this.suppressErrors=e}subscribe(e,t){let n=this.suppressErrors?se:oe,r;r=t?typeof t==`function`?{next:t,error:w}:{next:e=>t.next(e),error:e=>t.error?.call(t,e)}:{next:n,error:w};let i=typeof e==`function`?{next:t=>{try{let n=e(t);n instanceof Promise&&n.catch(e=>r.next(e))}catch(e){r.next(e)}},error:e=>r.next(e)}:{next:t=>e.next(t),error:t=>e.error?e.error(t):r.next(t)},a;try{a=this._subscribe(i)}catch(e){i.error?.call(i,e)}return new S().add(()=>{switch(i.next=w,i.error=w,typeof a){case`function`:a();return;case`object`:a.unsubscribe();return;case`undefined`:return;default:return C(a)}})}pipe(...e){return e.reduce((e,t)=>t(e),this)}_subscribe(e){}}class E extends T{constructor(){super(),this.keyCounter=0,this.subscribers=new Map}next(e){this.subscribers.forEach(t=>t.next(e))}error(e){this.subscribers.forEach(t=>t.error?.call(t,e))}_subscribe(e){let t=this.keyCounter++;return this.subscribers.set(t,e),new S().add(()=>this.subscribers.delete(t))}}class ce{constructor(){this.log$=new E,this.logs=[],this.log=e=>{let t=f(f({},e),{},{timestamp:Date.now()});this.logs.push(t),this.log$.next(t)},this.getAllLogs=()=>this.logs}createCustomLog(e){return(...t)=>{let n;try{n=e(...t)}catch{n={message:"error in `createCustomLog`",component:`Logger`}}this.log(n)}}createComponentLog(e){return this.createCustomLog(t=>f({component:e},t))}}function le(e,t=`Assertion "value is not nullable" failed`){if(e==null)throw Error(t)}function ue(e,t=`Assertion "value is nullable" failed`){if(e!=null)throw Error(t)}function D(e){return e!=null}function O(e){return e==null}var de=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>D(t)));function fe(e,t){if(!e?.length)throw Error(t)}function pe(e,t){if(e?.length)throw Error(t)}var k=()=>globalThis,me=(e=k())=>!!(e.window&&e.screen),he=(e,t,n)=>new Promise((r,i)=>{t.addEventListener(`abort`,()=>{s(),l.remove()});let a=()=>{s(),i(`error`)},o=()=>{s(),r()},s=()=>{c&&clearTimeout(c),l.removeEventListener(`load`,o),l.removeEventListener(`error`,a)},c;n&&(c=k().setTimeout(()=>{s(),i(`timeout`)},n));let l=document.createElement(`script`);l.addEventListener(`load`,o),l.addEventListener(`error`,a),l.src=e,document.head.appendChild(l)}),ge=typeof k().performance?.now==`function`?()=>k().performance.now():()=>Date.now(),_e=()=>Math.trunc(ge()),ve=(e,t)=>p(function*(...n){let r=t(...n),i=e.aborted,a;for(;!i&&!e.aborted;)try{let e=yield r.next(a);i=e.done??!1,a=e.value}catch(e){yield r.throw(e)}return a}),ye=(e,{start:t=0,factor:n=2,max:r=1/0,min:i=t,random:a=0}={})=>{let o=t;return o*=n**+e,o*=1+(Math.random()*a*2-a),o=Math.round(o),o=Math.min(o,r),o=Math.max(o,i),o},be={};b(be,{set:()=>Ce,remove:()=>Te,isPersistent:()=>xe,has:()=>we,get:()=>Se,clear:()=>Ee});var A,j,M=`vk-videoplayer-dummy-key-${Math.random()}`,N=()=>{if(j!==void 0)return j;try{localStorage.setItem(M,`test`),localStorage.removeItem(M),j=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(M),j=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)j=2;else throw e}else throw e}return j===2&&(A=new Map),j},xe=()=>N()===0,Se=e=>{let t=N();switch(t){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return A?.get(e);default:C(t)}},Ce=(e,t)=>{let n=N();switch(n){case 0:try{localStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 1:try{sessionStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 2:A?.set(e,t);return;default:C(n)}},we=e=>{let t=N();switch(t){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return A?.has(e)??!1;default:return C(t),!1}},Te=e=>{let t=N();switch(t){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:A?.delete(e);return;default:C(t)}},Ee=()=>{let e=N();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return A?.clear();default:C(e)}},P=()=>{let e,t=[],n=k();try{e=n.self!==n.top}catch(t){t instanceof DOMException&&t.name===`SecurityError`?e=!0:(e=!1,console.error(t))}try{n.location?.ancestorOrigins&&(t=[...n.location.ancestorOrigins])}catch(e){console.error(e)}try{!t.length&&n.document.referrer&&(t=[new URL(n.document.referrer).origin])}catch(e){console.error(e)}return t=t.filter(e=>URL.canParse(e)),{isEmbed:e,origins:t,topOrigin:t.at(-1),immediateOrigin:t.at(0)}},F;(e=>{e.INVARIANT=`Invariant quality`,e.Q_144P=`144p`,e.Q_240P=`240p`,e.Q_360P=`360p`,e.Q_480P=`480p`,e.Q_576P=`576p`,e.Q_720P=`720p`,e.Q_1080P=`1080p`,e.Q_1440P=`1440p`,e.Q_2160P=`2160p`,e.Q_4320P=`4320p`})(F||={});var I={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},De=(e,t)=>I[e].height>I[t].height,Oe=(e,t)=>I[e].height>=I[t].height,L=(e,t)=>I[e].height<I[t].height,ke=(e,t)=>I[e].height<=I[t].height,Ae=e=>e.sort((e,t)=>e===t?0:e===`Invariant quality`?1:t===`Invariant quality`?-1:L(e,t)?1:-1)[0],je=Object.keys(I).sort((e,t)=>L(e,t)?-1:1),Me=(e,t=.02)=>[...je].find(n=>I[n].height*(1+t)>=e),Ne=({width:e,height:t})=>{let n=Math.min(e,t),r=Math.max(e,t);return je.find(e=>{let t=I[e];return t.width>=r&&t.height>=n})},Pe=e=>I[e].height,R=e=>e===`Invariant quality`,Fe=e=>e.every(e=>!R(e));function Ie(e){if(R(e))throw Error(`Expected exact quality`)}var Le=e=>{switch(e){case`4320p`:return`8K`;case`2160p`:return`4K`;case`1440p`:return`QHD`;case`1080p`:return`FHD`;case`720p`:return`HD`;default:return``}},Re=(e,t)=>{let n={};for(let r of Object.keys(t)){let i=t[r],a=e[r];Array.isArray(i)?n[r]=Array.isArray(a)?a:i:typeof i==`object`&&i?typeof a==`object`&&a&&!Array.isArray(a)?n[r]=Re(a,i):n[r]=a??i:n[r]=r in e?a:i}return n},ze=e=>{let t=``;return e>=3600&&(t+=Math.floor(e/3600)+`h`,e%=3600),e>=60&&(t+=Math.floor(e/60)+`m`,e%=60),e>0&&(t+=Math.floor(e)+`s`),t};function Be(e,t=0,n){let r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0,p=!t&&t!==0&&typeof k().requestAnimationFrame==`function`;n&&(u=!!n.leading,d=`maxWait`in n,a=n?.maxWait?Math.max(+n?.maxWait||0,t):a,f=`trailing`in n?!!n.trailing:f);function m(t){let n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function h(e,t){return p?(s&&k().cancelAnimationFrame(s),k().requestAnimationFrame(e)):setTimeout(e,t)}function g(e){if(p){k().cancelAnimationFrame(e);return}clearTimeout(e)}function ee(e){return l=e,s=h(v,t),u?m(e):o}function te(e){let n=e-c,r=e-l,i=t-n;return d?Math.min(i,a-r):i}function _(e){let n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function v(){let e=Date.now();if(_(e))return y(e);s=h(v,te(e))}function y(e){return s=void 0,f&&r?m(e):(r=i=void 0,o)}function ne(){s!==void 0&&g(s),l=0,r=c=i=s=void 0}function re(){return s===void 0?o:y(Date.now())}function b(){return s!==void 0}function x(...e){let n=Date.now(),a=_(n);if(r=e,i=this,c=n,a){if(s===void 0)return ee(c);if(d)return s=h(v,t),m(c)}return s===void 0&&(s=h(v,t)),o}return x.cancel=ne,x.flush=re,x.pending=b,x}var Ve=(e,t=0,n)=>Be(e,t,f(f(f({},{leading:!0,trailing:!0}),n),{},{maxWait:t})),z=(e,t)=>{if(typeof e!=`object`||!e)return e;let n=Array.isArray(e)?[]:{};for(let r in e){if(typeof t==`function`){let i=t(e[r],r,e,n);if(i!==void 0){n[r]=i;continue}}typeof e[r]==`object`?n[r]=z(e[r],t):n[r]=e[r]}return n},He=e=>z(e);class Ue extends E{constructor(e){super(),this.bufferSize=void 0,this.buffer=[],this.cursorEnd=-1,this.cursorStart=0,this.bufferSize=e,this.buffer=Array(e)}next(e){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=e,this.subscribers.forEach(t=>t.next(e))}_subscribe(e){for(let t=this.cursorStart;t<=this.cursorEnd;t++)e.next(this.buffer[t%this.bufferSize]);let t=this.keyCounter++;return this.subscribers.set(t,e),new S().add(()=>this.subscribers.delete(t))}}class B extends E{constructor(e){super(),this.value=void 0,this.value=e}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){let t=super._subscribe(e);return e.next(this.value),t}}function We(e){return new T(t=>{let n={},r=Object.keys(e).length,i=e=>i=>{e in n||r--,n[e]=i,r===0&&t.next(n)};return Object.entries(e).reduce((e,[t,n])=>e.add(n.subscribe(i(t))),new S)})}function Ge(...e){return new T(t=>e.reduce((e,n)=>e.add(n.subscribe(t)),new S))}var Ke=e=>new T(t=>{let n=k().setTimeout(()=>{try{t.next()}catch(e){if(t.error)t.error(e);else throw e}},e);return()=>k().clearTimeout(n)}),qe=e=>new T(t=>{let n=k(),r=n.setInterval(()=>t.next(),e);return()=>{r&&=(n.clearInterval(r),void 0)}});function Je(e){return new T(t=>{if(e instanceof Promise){let n=!1;return e.then(e=>{n||t.next(e)}).catch(e=>{n||t.error?.call(t,e)}),()=>{n=!0}}for(let n=0;n<e.length;n++)t.next(e[n])})}var Ye=Je,Xe=(e,t)=>new T(n=>{let r=e=>n.next(e);return e.addEventListener(t,r),()=>e.removeEventListener(t,r)});class Ze extends S{remove(e){this.subscriptions=this.subscriptions.filter(t=>t!==e)}}function Qe(e){return t=>new T(n=>t.subscribe(new $e(n,e)))}class $e{constructor(e,t){this.destination=void 0,this.size=void 0,this.lastValues=[],this.destination=e,this.size=t}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var t;(t=this.destination).error?.call(t,e)}}var et={leading:!1,trailing:!0};function tt(e,t=et){return n=>new T(r=>n.subscribe(new nt(r,e,t)))}class nt{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e;let t=k();D(this.timeout)?t.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=t.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(e){if(this.destination.error)this.destination.error(e);else throw e}this.timeout=void 0},this.time)}error(e){var t;(t=this.destination).error?.call(t,e)}}var rt={leading:!0,trailing:!1};function it(e,t=rt){return n=>new T(r=>n.subscribe(new at(r,e,t)))}class at{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,O(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=k().setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var t;(t=this.destination).error?.call(t,e)}}function ot(e){return t=>new T(n=>t.subscribe(new st(n,e)))}class st{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.destination=e,this.predicate=t}next(e){let t;try{t=this.predicate(e)}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}var ct=(e,t)=>{let n=(e,t)=>{let n=Object.keys(e);for(let r in t)if(!n.includes(r)||t[r]!==e[r])return!1;return!0};return n(e,t)&&n(t,e)},lt=(e,t)=>e instanceof Object&&t instanceof Object?ct(e,t):e===t;function ut(e=lt){return t=>new T(n=>t.subscribe(new ft(n,e)))}var dt={};class ft{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.lastValue=dt,this.destination=e,this.predicate=t}next(e){let t;try{t=this.lastValue===dt||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object&&!Array.isArray(e)?f({},e):e}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function V(e){return t=>new T(n=>t.subscribe(new pt(n,e)))}class pt{constructor(e,t){this.destination=void 0,this.mapper=void 0,this.destination=e,this.mapper=t}next(e){let t;try{t=this.mapper(e)}catch(e){throw this.error(e),e}this.destination.next(t)}error(e){var t;(t=this.destination).error?.call(t,e)}}function mt(e){return V(()=>e)}function ht(){return e=>new T(t=>{let n=!1,r=!1,i=e.subscribe(e=>{n||(n=!0,t.next(e)),r&&i.unsubscribe()},e=>{n=!0,t.error?.call(t,e),r&&i.unsubscribe()});return r=!0,n&&i.unsubscribe(),i})}function gt(){return e=>new T(t=>e.subscribe(new _t(t)))}class _t{constructor(e){this.destination=void 0,this.last=void 0,this.hasLast=!1,this.destination=e}next(e){let t=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,e])}error(e){var t;(t=this.destination).error?.call(t,e)}}function vt(e){return t=>new T(n=>t.subscribe(new yt(n,e)))}class yt{constructor(e,t){this.destination=void 0,this.effect=void 0,this.destination=e,this.effect=t}next(e){try{this.effect(e)}catch(e){throw this.error(e),e}this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function bt(e){return t=>new T(n=>t.subscribe(new xt(n,e)))}class xt{constructor(e,t){if(this.destination=void 0,this.count=void 0,this.destination=e,this.count=t,t<0){var n;(n=this.destination).error?.call(n,Error(`Count can not be less than zero`))}}next(e){this.count===0?this.destination.next(e):this.count--}error(e){var t;(t=this.destination).error?.call(t,e)}}function St(e=0){return t=>{let n=0,r=new Ue(e),i=t.subscribe(r),a=e=>()=>{e.unsubscribe(),n--,n===0&&i.unsubscribe()};return new T(e=>(n++,a(r.subscribe(e))))}}var Ct=300,wt=(e,t=Ct)=>new T(n=>{let r=k(),{width:i,height:a}=e.getBoundingClientRect();if(n.next({width:i,height:a}),!me(r))return;let o=new r.ResizeObserver(Ve(e=>{let t=e[0];if(!t)return;let r,i;t.contentBoxSize&&t.contentBoxSize[0]?(i=t.contentBoxSize[0].blockSize,r=t.contentBoxSize[0].inlineSize):t.contentRect&&(r=t.contentRect.width,i=t.contentRect.height),D(r)&&D(i)&&n.next({width:r,height:i})},t));return o.observe(e),()=>o.disconnect()}),H=(e,t=6,n=`.`)=>{let r={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!t))if(typeof e[i]==`object`&&e[i]!==null){let a=H(e[i],t-1);for(let e in a)a.hasOwnProperty(e)&&(r[i+n+e]=a[e])}else r[i]=e[i];return r},Tt=(e,t=!1)=>{t&&(e.innerHTML=``),e.removeAttribute(`src`),e.load()},Et=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol===`https:`},Dt=(e,t)=>!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom),Ot=(()=>{let e=0;return()=>{let t=e;return e=(e+1)%(2**53-1),t}})(),kt=e=>e!==void 0&&e!==``?e:Ot().toString();function At(e,t,n){if(e<=t[0])return n[0];if(e>=t[t.length-1])return n[n.length-1];let r=1;for(;r<t.length&&t[r]<e;)r++;r>=t.length&&(r=t.length-1);let i=t[r-1],a=t[r],o=n[r-1],s=n[r];return e===i?o:e===a?s:o+(e-i)/(a-i)*(s-o)}function jt(e,t,n){if(e<=0||n<0)return[];let r=[],i=Math.floor((e-1)/2),a=Math.floor(e/2),o=t-i,s=t+a;o<0&&(s+=Math.abs(o),o=0),s>n&&(o-=s-n,s=n),o=Math.max(0,o),s=Math.min(n,s);for(let e=o;e<=s;e++)r.push(e);return r}var Mt=e=>e instanceof DOMException&&(e.name===`AbortError`||e.code===20),Nt=e=>{if(!Mt(e))throw e};function Pt(e){if(e&&typeof e==`object`){if(`message`in e)return String(e.message);try{return JSON.stringify(e)}catch{return`object serialization error`}}return String(e)}m=Symbol.iterator;class U{constructor(e){if(this.buffer=void 0,this.writeIndex=0,this.count=0,this.capacity=void 0,e<=0)throw Error(`Capacity must be greater than 0`);this.capacity=e,this.buffer=Array.from({length:e}).fill(null)}add(e){this.buffer[this.writeIndex]=e,this.writeIndex=(this.writeIndex+1)%this.capacity,this.count<this.capacity&&this.count++}*[m](){if(this.count===0)return;let e=this.count<this.capacity?0:this.writeIndex;for(let t=0;t<this.count;t++){let t=this.buffer[e];D(t)&&(yield t),e=(e+1)%this.capacity}}clear(){this.buffer.fill(null),this.writeIndex=0,this.count=0}get size(){return this.count}get maxCapacity(){return this.capacity}}var Ft=e=>(t,n=!1)=>r=>{let i=typeof r==`object`;r==null||i&&!Object.keys(r).length||e(t,i?H(r):{value:r},n)},W=(e={})=>{let t=e=>{let t=e;return e===void 0?t=`undefined`:e===null?t=`null`:(typeof e==`number`||typeof e==`boolean`)&&(t=e.toString()),t},n={};for(let r in e)Array.isArray(e[r])?n[r]=e[r].map(t):n[r]=t(e[r]);return n};class G{constructor({name:e,getParentContext:t,getRootTracerContext:n,options:r}){this.dynamicImportTimeout=5e3,this.subscription=new S,this.options=void 0,this.span=void 0,this.context=void 0,this.childTracers=[],this.initPromise=void 0,this.getRootTracerContext=void 0,this.eventsBuffer=null,this.options=r??{};let{tracerEventsBufferSize:i}=this.options;D(i)&&i>0&&(this.eventsBuffer=new U(i)),G.dynamicImportStatus===`not_started`&&(G.dynamicImportPromise=this.loadOpentelemetry());let a=Date.now();this.initPromise=G.dynamicImportPromise.then(r=>{G.dynamicImportStatus===`completed`&&this.init({name:e,getParentContext:t,getRootTracerContext:n},a)})}init({name:e,getParentContext:t,getRootTracerContext:n},r){let i=n?.();if(O(i))return;let{opentelemetryApi:a}=G.dynamicImports,{context:o,trace:s}=a,{tracer:c,attributes$:l}=i;this.span=c.startSpan(e,{startTime:r},t?.()),this.context=s.setSpan(o.active(),this.span),this.getRootTracerContext=n,this.subscription.add(l.subscribe(e=>{D(e)&&this.span.setAttributes(e)}))}loadOpentelemetry(){var e=this;return p(function*(){if(G.dynamicImportStatus===`not_started`){G.dynamicImportStatus=`in_progress`;try{let t=new Promise((t,n)=>setTimeout(n,e.dynamicImportTimeout)),n=Promise.all([import(`@opentelemetry/api`),import(`@opentelemetry/sdk-trace-web`),import(`@apptracer/opentelemetry`),import(`@opentelemetry/resources`),import(`@opentelemetry/semantic-conventions`)]),[r,i,a,o,s]=yield Promise.race([n,t]);G.dynamicImports={opentelemetryApi:r,opentelemetrySdk:i,tracer:a,opentelemetryResources:o,opentelemetrySemanticConventions:s},G.dynamicImportStatus=`completed`}catch{G.dynamicImportStatus=`failed`}}})()}isComponentTracerNotInitialized(){return O(this.span)||G.dynamicImportStatus===`failed`}addEventToBuffer(e,t,n,r){D(this.eventsBuffer)&&this.eventsBuffer.add({name:e,attributes:t,type:n,timestamp:r})}addEventToSpan(e,t,n,r){this.span.addEvent(e,f(f({},W(t)),{},{type:n}),r)}log(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`log`,r)}):this.addEventToBuffer(e,t,`log`,r)}error(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`error`,r)}):this.addEventToBuffer(e,t,`error`,r)}critical(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`critical`,r)}):this.addEventToBuffer(e,t,`critical`,r)}createComponentTracer(e){let t=new G({name:e,getParentContext:()=>this.context,getRootTracerContext:()=>this.getRootTracerContext?.call(this),options:this.options});return this.childTracers.push(t),t}setSpanAttributes(e){this.span.setAttributes(W(e))}end(){this.initPromise.then(e=>{if(!this.isComponentTracerNotInitialized()){if(D(this.eventsBuffer))for(let e of this.eventsBuffer)this.addEventToSpan(e.name,e.attributes,e.type,e.timestamp);this.childTracers.forEach(e=>e.end()),this.span.end(),this.subscription.unsubscribe()}})}pause(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!0)}resume(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!1)}}G.dynamicImportStatus=`not_started`,G.dynamicImports=void 0,G.dynamicImportPromise=void 0;var It=`gW5EerTD5QhAnsbpF7Hd2NSMRteYIUUMjFbSyI68Pf5`,Lt=e=>{class t extends e{constructor(e,t){super(e,t),this._isPaused=!1,this._pausedSpans=void 0,this.maxExportBatchSize=void 0,this.maxQueueSize=void 0,this.maxQueueSize=t?.maxQueueSize??2048,this.maxExportBatchSize=t?.maxExportBatchSize??512,this._pausedSpans=new U(this.maxQueueSize)}pause(){this._isPaused=!0}resume(){var e=()=>super.onEnd,t=this;return p(function*(){if(!t._isPaused)return;t._isPaused=!1;let n=t._pausedSpans;t._pausedSpans=new U(t.maxQueueSize);let r=0;for(let i of n)e().call(t,i),r+=1,r>=t.maxExportBatchSize&&(yield new Promise(e=>k().setTimeout(e,0)),r=0);n.clear(),yield t.forceFlush()})()}onEnd(e){if(this._isPaused){this._pausedSpans.add(e);return}super.onEnd(e)}}return t};class Rt extends G{constructor(e){super({name:`Root`,options:e}),this.attributes$=new B(null),this.paused$=new B(!1),this.paused$.next(!!this.options.tracerPausedAtInit)}init({name:e,getParentContext:t},n){let{tracer:r,opentelemetryResources:i,opentelemetrySdk:a,opentelemetrySemanticConventions:o}=G.dynamicImports,{TracerUploadSpanExporter:s}=r,{WebTracerProvider:c,BatchSpanProcessor:l}=a,{resourceFromAttributes:u}=i,{ATTR_SERVICE_NAME:d,ATTR_SERVICE_VERSION:f}=o,p=new(Lt(l))(new s({appToken:It}));this.subscription.add(this.paused$.subscribe(e=>{e?p.pause():p.resume()}));let m=new c({resource:u({[d]:`videoplayer-sdk-web`,[f]:ie}),spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0},spanProcessors:[p]});m.register();let h=m.getTracer(`sdk-videoplayer-tracer`);super.init({name:e,getParentContext:t,getRootTracerContext:()=>({tracer:h,attributes$:this.attributes$,paused$:this.paused$})},n)}getTraceId(){return this.isComponentTracerNotInitialized()?``:this.span.spanContext().traceId}setSpanAttributes(e){this.attributes$.next(f(f({},this.attributes$.getValue()),W(e)))}addSubscription(e){this.subscription.add(e)}}class zt{constructor(e){this.fakeTraceId=void 0}log(e,t,n){}error(e,t,n){}critical(e,t,n){}createComponentTracer(e){return new zt({name:e})}end(){}getTraceId(){return this.fakeTraceId}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}var Bt=()=>!0,K={level:0,filter:Bt,name:`Noname Tracer`,outputMethod:`log`};class Vt{constructor({name:e,level:t,filter:n,outputMethod:r}={}){this.name=void 0,this.filter=Bt,this.level=K.level,this.outputMethod=K.outputMethod,this.childTracers=[],this.filter=n??this.filter,this.level=t??this.level,this.outputMethod=r??this.outputMethod,this.name=e??K.name}log(e,t,n){this.logDebug(e,t)}error(e,t,n){this.logError(e,t)}critical(e,t,n){this.logError(e,t)}createComponentTracer(e){let t=new Vt({filter:this.filter,level:this.level,name:`${this.name}/ ${e}`,outputMethod:this.outputMethod});return this.childTracers.push(t),t}end(){this.childTracers.forEach(e=>e.end()),this.childTracers=[]}setLevel(e){this.level=e,this.childTracers.forEach(t=>t.setLevel(e))}setOtputMethod(e){this.outputMethod=e,this.childTracers.forEach(t=>t.setOtputMethod(e))}setFilter(e){this.filter=e,this.childTracers.forEach(t=>t.setFilter(e))}getFinishedSpans(){}getTraceId(){return`debug_trace`}get verbose(){return this.level===0}createMessage(e,t){return[this.name,e,JSON.stringify(t)].join(`: `)}logDebug(e,t){!this.verbose||!this.filter(e,t)||k().console[this.outputMethod](this.createMessage(e,t))}logError(e,t){this.filter(e,t)&&k().console.error(this.createMessage(e,t))}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}class Ht{static createRootTracer(e=`fake`,t){switch(e){case`real`:return new Rt(t);case`debug`:return new Vt;default:return new zt}}}var Ut;(e=>{e.NETWORK=`network`,e.VIDEO_PIPELINE=`video_pipeline`,e.EXTERNAL_API=`external_api`,e.PARSER=`parser`,e.DOM=`dom`,e.WTF=`wtf`,e.UI=`ui`,e.CALL_FROM_EXTERNAL=`call_from_external`,e.FATAL=`fatal`})(Ut||={});var Wt;(e=>{e.Armenian=`58`,e.Azerbaijani=`57`,e.Belarusian=`114`,e.English=`3`,e.Kazakh=`97`,e.Portuguese=`73`,e.Russian=`0`,e.Spanish=`4`,e.Ukrainian=`1`,e.Uzbek=`65`,e.Vietnamese=`75`})(Wt||={});var Gt=`vk.ru`,Kt=function(){var e=p(function*(e,t,n){let r=new URL(`https://${Gt}/js/lang-pack.js`);return r.searchParams.set(`format`,`json`),r.searchParams.set(`name`,t),e!==void 0&&r.searchParams.set(`lang`,e),qt(yield(yield fetch(r.toString())).json(),n)});return function(t,n,r){return e.apply(this,arguments)}}(),qt=(e,t)=>Object.fromEntries(Object.entries(e.keys).map(([e,n])=>[e.substring(`${t}_`.length),Jt(n)])),Jt=e=>Array.isArray(e)?e[0]:e,Yt;(e=>{e.RU=`ru`,e.EN=`en`})(Yt||={});var q=`__vk_vp_internals_exposure`;class Xt{constructor(e,t){this.playerId=void 0,this.type=void 0,this.playerId=t,this.type=e,this.initWindowObjects()}getWindowObject(){var e;if(typeof window>`u`)return{};let t=this.playerId,n=this.type;return((e=window[q])==null||(e=e[t])==null?void 0:e[n])??{}}initWindowObjects(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[q]||(window[q]={}),window[q][e]||(window[q][e]={}),window[q][e][t]||(window[q][e][t]={})}expose(e){typeof window>`u`||Object.assign(this.getWindowObject(),e)}destroy(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[q]&&window[q][e]&&window[q][e][t]&&(delete window[q][e][t],Object.keys(window[q][e]).length||delete window[q][e],Object.keys(window[q]).length||delete window[q])}}var Zt={};b(Zt,{subscribe:()=>tn,push:()=>en,destroy:()=>$t,create:()=>Qt});var J=new Map,Qt=(e,t)=>J.set(e,t??[]),$t=e=>J.delete(e),en=(e,t)=>{let n=J.get(e);n&&(typeof n==`function`?n(t):n.push(t))},tn=(e,t)=>{let n=J.get(e);if(n){if(n&&Array.isArray(n))for(let e of n)t(e);J.set(e,t)}},nn=e=>de({id:e.id,message:e.message,category:e.category,data:rn(e.data),httpCode:e.httpCode,UVBackendErrorCode:e.UVBackendErrorCode});function rn(e){switch(typeof e){case`boolean`:case`string`:case`number`:return e;case`object`:try{return JSON.stringify(e)}catch{return}default:return}}var an=e=>{let t=e.thrown instanceof Error?e.thrown:Error(e.message),n=e.id.length>10240?e.id.substring(0,10240):e.id;try{t.name=n}catch{t=Error(e.message),t.name=n}return t},on=()=>{try{var e;let{origin:t,pathname:n,search:r,hostname:i}=((e=k())==null||(e=e.document)==null?void 0:e.location)??{};return!i||i===`localhost`?void 0:f({url:t+n},new URLSearchParams(r).entries().reduce((e,[t,n])=>(e[`url.${t}`]=n,e),{}))}catch{}};class Y{constructor(e,t,n,r){this.dynamicImportTimeout=5e3,this.componentName=void 0,this.subscription=new S,this.options=void 0,this.envParams=void 0,this.context=void 0,this.isEmbed=void 0,this.embedParent=void 0,this.beforeInitErrors=[],this.componentName=e,this.options=t,this.envParams=n,this.context=f({},r);let{isEmbed:i,topOrigin:a}=P();this.isEmbed=i,this.embedParent=a?new URL(a).hostname:void 0,this.options.enabled&&(this.loadModule(),this.init())}updateContext(e){Object.assign(this.context,e)}error(e,t){let n=Y.tracerErrorMap.get(this.componentName);if(!n){this.beforeInitErrors.push([e,t]);return}let{blackErrorCategoryList:r,blackErrorIdList:i,sampleRate:a,whiteErrorCategoryList:o,whiteErrorIdList:s}=this.options,{id:c,category:l}=e;if(!(r.length&&r.includes(l)||i.length&&i.includes(c)||o.length&&!o.includes(l)||s.length&&!s.includes(c)||Math.random()>=a))try{let r=an(e);n?.error(r,f(f({crashIdSource:t?.crashIdSource??r.name,severity:t?.severity??(e.traceAsLog?`debug`:void 0)},t?.issueKey?{issueKey:t.issueKey}:{}),{},{keys:f(f(f(f({},this.context),nn(e)),on()),this.isEmbed&&this.embedParent&&{iframe_host:this.embedParent})}))}catch(e){console.error(e)}}addSubscription(e){this.subscription.add(e)}destroy(){this.subscription.unsubscribe()}init(){var e=this;return p(function*(){try{if(yield Y.loadPromise,Y.tracerErrorMap.has(e.componentName)||O(Y.appTracerModule))return;let{appTracerModule:t}=Y,{initTracerError:n,initTracerErrorUploader:r,getTracerModules:i}=t,a=i(e.componentName),o=!a.error,s=a.error??n(e.componentName,{enableUnhandledErrorsListeners:!1,stringifyErrorDataObject:!0});D(e.options.userId)&&s.setUserId(e.options.userId),o&&r(e.componentName,{appToken:It,environment:e.envParams.env,versionCode:1,versionName:e.envParams.version}),Y.tracerErrorMap.set(e.componentName,s),e.beforeInitErrors.forEach(t=>e.error.apply(e,t)),e.beforeInitErrors=[]}catch(e){console.error(e)}})()}loadModule(){var e=this;D(Y.loadPromise)||(Y.loadPromise=function(){var t=p(function*(){try{let t=new Promise((t,n)=>k().setTimeout(n,e.dynamicImportTimeout));Y.appTracerModule=yield Promise.race([t,import(`@apptracer/sdk/lite`)])}catch(e){Y.loadPromise=null,console.error(e)}});return function(){return t.apply(this,arguments)}}()())}}Y.tracerErrorMap=new Map,Y.appTracerModule=null,Y.loadPromise=null;class sn{constructor(e,t){this.options=void 0,this.symbol=void 0,this.options=t,this.symbol=Symbol(e)}}var cn=()=>{let e=new Map,t=new Map,n=new Map,r=new Map,i=new Set;return{resolve(e){if(!r.has(e)){let t=n.get(e);if(!t)throw Error(`No constructor registered in DI container for ${e.name}`);r.set(e,new t)}return r.get(e)},resolveOptional(e){try{return this.resolve(e)}catch{return}},replace(e,t){r.forEach((t,n)=>{t instanceof e&&r.delete(n)}),n.set(e,t)},getToken(n){if(e.has(n.symbol))return e.get(n.symbol);if(t.has(n.symbol)){let r=t.get(n.symbol)();return e.set(n.symbol,r),r}if(n.options?.factory){let t=n.options.factory();return e.set(n.symbol,t),t}throw Error(`No value registered in DI container for token "${n.symbol.description}"`)},registerToken(t,n){e.set(t.symbol,n)},registerFactory(e,n){t.set(e.symbol,n)},hasToken(n){return e.has(n.symbol)||t.has(n.symbol)||!!n.options?.factory},registerCleanup(e){i.add(e)},clear(){i.forEach(e=>e()),i.clear(),e.clear(),t.clear(),r.clear(),n.clear()}}},ln=(e,t)=>{let n=e.length,r=t>=0?t:n+t;return r>=0&&r<n?e[r]:void 0},un=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r,n,e))return r}},dn=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n,e))return n;return-1},fn=(e,t=1)=>{let n=[],r=(e,t)=>{for(let i=0;i<e.length;i++){if(!(i in e))continue;let a=e[i];t>0&&Array.isArray(a)?r(a,t-1):n.push(a)}};return r(e,t),n},pn=(e,t)=>{let n=[];for(let r=0;r<e.length;r++){let i=t(e[r],r,e);if(Array.isArray(i))for(let e=0;e<i.length;e++)n.push(i[e]);else n.push(i)}return n},mn=(e,t,n=0)=>{let r=e.length,i=n>=0?n:Math.max(r+n,0);for(;i<r;i++){let n=e[i];if(n===t||n!==n&&t!==t)return!0}return!1},hn=e=>{let t=e.length,n=Array(t);for(let r=0;r<t;r++)n[r]=e[t-1-r];return n},gn=(e,t)=>{let n=e.slice();return t?n.sort(t):n.sort()},_n=(e,t,n,...r)=>{let i=e.slice();return n===void 0?i.splice(t):i.splice(t,n,...r),i},vn=(e,t,n)=>{let r=e.length,i=t>=0?t:r+t,a=e.slice();return a[i]=n,a},yn=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof self<`u`?self:Function(`return this`)(),bn=e=>{let t=[],n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r];t.push([i,e[i]])}return t},xn=e=>{let t={};for(let[n,r]of e)t[n]=r;return t},Sn=Object.prototype.hasOwnProperty,Cn=(e,t)=>Sn.call(e,t),wn=e=>{let t=Object.keys(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n},Tn=e=>{let t=Array.from(e);return t.length===0?Promise.resolve([]):Promise.all(t.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},En=e=>{let t=Array.from(e);return t.length===0?Promise.reject(AggregateError([],`All promises were rejected`)):new Promise((e,n)=>{let r=Array(t.length),i=t.length;t.forEach((t,a)=>{Promise.resolve(t).then(e,e=>{r[a]=e,--i,i===0&&n(AggregateError(r,`All promises were rejected`))})})})},Dn=(e,t)=>e.then(e=>Promise.resolve(t()).then(()=>e),e=>Promise.resolve(t()).then(()=>{throw e})),On=e=>{try{return Promise.resolve(e())}catch(e){return Promise.reject(e)}},kn=()=>{let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},{NativeAbortSignal:An,NativeAbortController:jn}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function Mn(e){let t;try{t=new Event(`abort`)}catch{typeof document<`u`?document.createEvent?(t=document.createEvent(`Event`),t.initEvent(`abort`,!1,!1)):(t=document.createEventObject(),t.type=`abort`):t={type:`abort`,bubbles:!1,cancelable:!1}}return t.reason=e,t}function Nn(e){if(e===void 0)if(typeof document>`u`)e=Error(`This operation was aborted`),e.name=`AbortError`;else try{e=new DOMException(`signal is aborted without reason`),Object.defineProperty(e,"name",{value:`AbortError`})}catch{e=Error(`This operation was aborted`),e.name=`AbortError`}return e}class Pn{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}removeEventListener(e,t){if(!(e in this.listeners))return;let n=this.listeners[e];for(let e=0,r=n.length;e<r;e++)if(n[e].callback===t){n.splice(e,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let n=0,r=t.length;n<r;n++){let r=t[n];try{r.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}r.options&&r.options.once&&this.removeEventListener(e.type,r.callback)}return!e.defaultPrevented}}class X extends Pn{constructor(){super(),this.listeners||Pn.call(this),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}toString(){return`[object AbortSignal]`}dispatchEvent(e){e.type===`abort`&&(this.aborted=!0,typeof this.onabort==`function`&&this.onabort.call(this,e)),super.dispatchEvent(e)}throwIfAborted(){let{aborted:e,reason:t=`Aborted`}=this;if(e)throw t}static timeout(e){let t=new Z;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new Z;function n(){t.abort(this.reason),r()}function r(){for(let t of e)t.removeEventListener(`abort`,n)}for(let r of e)if(r.aborted){t.abort(r.reason);break}else r.addEventListener(`abort`,n);return t.signal}}class Z{constructor(){Object.defineProperty(this,"signal",{value:new X,writable:!0,configurable:!0})}abort(e){let t=Nn(e),n=Mn(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(Z.prototype[Symbol.toStringTag]=`AbortController`,X.prototype[Symbol.toStringTag]=`AbortSignal`);function Fn(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log(`__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill`),!0):typeof e.Request==`function`&&!e.Request.prototype.hasOwnProperty(`signal`)||!e.AbortController}function In(e){typeof e==`function`&&(e={fetch:e});let{fetch:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!Fn({fetch:t,Request:n,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:t,Request:a};let a=n;(a&&!a.prototype.hasOwnProperty(`signal`)||i)&&(a=function(e,t){let r;t&&t.signal&&(r=t.signal,delete t.signal);let i=new n(e,t);return r&&Object.defineProperty(i,"signal",{writable:!1,enumerable:!1,configurable:!0,value:r}),i},a.prototype=n.prototype);let o=t;return{fetch:(e,t)=>{let n=a&&a.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){let r;try{r=new DOMException(`Aborted`,`AbortError`)}catch{r=Error(`Aborted`),r.name=`AbortError`}if(n.aborted)return Promise.reject(r);let i=new Promise((e,t)=>{n.addEventListener(`abort`,()=>t(r),{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,o(e,t)])}return o(e,t)},Request:a}}var Q=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,$=`fetch`in Q&&Fn({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}),Ln=$?In({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}):void 0,Rn=$?Ln.fetch:Q.fetch,zn=$?Ln.Request:Q.Request,Bn=$?Z:Q.AbortController,Vn=$?X:Q.AbortSignal,Hn=(e,t)=>{let n=e.length,r=t>=0?t:n+t;if(r<0||r>=n)return;let i=e.charCodeAt(r);if(i>=55296&&i<=56319&&r+1<n){let t=e.charCodeAt(r+1);if(t>=56320&&t<=57343)return e[r]+e[r+1]}return e[r]};function*Un(e,t){let n=t.flags.includes(`g`)?t.flags:t.flags+`g`,r=new RegExp(t.source,n),i;for(;(i=r.exec(e))!==null;)yield i,i[0].length===0&&r.lastIndex++}var Wn=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return e+n.repeat(Math.ceil(r/n.length)).slice(0,r)},Gn=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return n.repeat(Math.ceil(r/n.length)).slice(0,r)+e},Kn=(e,t,n)=>{if(typeof t==`string`){if(typeof n==`string`)return t===``?n+e.split(``).join(n)+n:e.split(t).join(n);let r=[],i=0,a=e.indexOf(t,i);for(;a!==-1;)r.push(e.slice(i,a)),r.push(n(t,a,e)),i=a+t.length,a=e.indexOf(t,i);return r.push(e.slice(i)),r.join(``)}let r=t.flags.includes(`g`)?t.flags:t.flags+`g`,i=new RegExp(t.source,r);return e.replace(i,n)},qn=e=>e.replace(/^\s+/,``),Jn=e=>e.replace(/\s+$/,``),Yn=qn,Xn=Jn,Zn=(e,t)=>typeof e==`string`?Hn(e,t):ln(e,t),Qn=(e,t={})=>{let n=t.timeout||1,r=performance.now();return Q.setTimeout(()=>{e({get didTimeout(){return t.timeout?!1:performance.now()-r-1>n},timeRemaining(){return Math.max(0,1+(performance.now()-r))}})},1)},$n=e=>Q.clearTimeout(e),er=e=>typeof e==`function`&&e?.toString().endsWith(`{ [native code] }`),tr=!er(Q.requestIdleCallback)||!er(Q.cancelIdleCallback),nr=tr?Qn:Q.requestIdleCallback,rr=tr?$n:Q.cancelIdleCallback,ir=(e,t,n)=>typeof e==`string`?e.includes(t,n):mn(e,t,n),ar=(e,t,n)=>{if(typeof e.canParse==`function`)return e.canParse(t,n);try{return new e(t,n),!0}catch{return!1}};
|
package/es2015.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vkontakte/videoplayer-shared v1.0.100-dev.
|
|
3
|
-
*
|
|
2
|
+
* @vkontakte/videoplayer-shared v1.0.100-dev.cb6e2e206.0
|
|
3
|
+
* Thu, 27 Aug 2026 11:40:58 GMT
|
|
4
4
|
* https://st.mycdn.me/static/vkontakte-videoplayer/1-0-100/doc/
|
|
5
5
|
*/
|
|
6
|
-
var _oxcModjo55a3=function(){function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}var t=e;function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol._oxc_toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@_oxc_toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}var t=e,r=n;function i(e){var n=r(e,`string`);return t(n)==`symbol`?n:n+``}var a=i;function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=o;function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?c(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){u(a,r,i,o,s,`next`,e)}function s(e){u(a,r,i,o,s,`throw`,e)}o(void 0)})}}var f=l,p=d;let m;var h=Object.defineProperty,ee=e=>e;function te(e,t){this[e]=ee.bind(null,t)}var g=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0,configurable:!0,set:te.bind(t,n)})},_=`1.0.100-dev.a5a2d3fc3.0`;class v{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(e=>{typeof e==`function`?e():e.unsubscribe()})}add(e){return this.subscriptions.push(e),this}}var y=e=>{throw Error(`${e} is value of unexpected type`)},ne=e=>{},b=()=>{},re=e=>{throw console.error(e),e},x=e=>{console.error(e)};class S{constructor(e){this.suppressErrors=!1,e&&(this._subscribe=e)}setSuppressErrors(e){this.suppressErrors=e}subscribe(e,t){let n=this.suppressErrors?x:re,r;r=t?typeof t==`function`?{next:t,error:b}:{next:e=>t.next(e),error:e=>t.error?.call(t,e)}:{next:n,error:b};let i=typeof e==`function`?{next:t=>{try{let n=e(t);n instanceof Promise&&n.catch(e=>r.next(e))}catch(e){r.next(e)}},error:e=>r.next(e)}:{next:t=>e.next(t),error:t=>e.error?e.error(t):r.next(t)},a;try{a=this._subscribe(i)}catch(e){i.error?.call(i,e)}return new v().add(()=>{switch(i.next=b,i.error=b,typeof a){case`function`:a();return;case`object`:a.unsubscribe();return;case`undefined`:return;default:return y(a)}})}pipe(...e){return e.reduce((e,t)=>t(e),this)}_subscribe(e){}}class C extends S{constructor(){super(),this.keyCounter=0,this.subscribers=new Map}next(e){this.subscribers.forEach(t=>t.next(e))}error(e){this.subscribers.forEach(t=>t.error?.call(t,e))}_subscribe(e){let t=this.keyCounter++;return this.subscribers.set(t,e),new v().add(()=>this.subscribers.delete(t))}}class ie{constructor(){this.log$=new C,this.logs=[],this.log=e=>{let t=f(f({},e),{},{timestamp:Date.now()});this.logs.push(t),this.log$.next(t)},this.getAllLogs=()=>this.logs}createCustomLog(e){return(...t)=>{let n;try{n=e(...t)}catch{n={message:"error in `createCustomLog`",component:`Logger`}}this.log(n)}}createComponentLog(e){return this.createCustomLog(t=>f({component:e},t))}}function ae(e,t=`Assertion "value is not nullable" failed`){if(e==null)throw Error(t)}function oe(e,t=`Assertion "value is nullable" failed`){if(e!=null)throw Error(t)}function w(e){return e!=null}function T(e){return e==null}var se=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>w(t)));function ce(e,t){if(!e?.length)throw Error(t)}function le(e,t){if(e?.length)throw Error(t)}var E=()=>globalThis,D=()=>globalThis,ue=(e=E())=>!!(e.window&&e.screen),O=typeof E().performance?.now==`function`?()=>E().performance.now():()=>Date.now(),de=()=>Math.trunc(O());function fe(){var e=self,t=new Map;e.onmessage=function(n){var r=n.data;if(r.type===`ping`){e.postMessage({type:`ready`});return}if(r.type===`set`){var i=r.id;r.repeat?t.set(i,{repeat:!0,handle:e.setInterval(function(){e.postMessage({type:`tick`,id:i})},r.delay)}):t.set(i,{repeat:!1,handle:e.setTimeout(function(){t.delete(i),e.postMessage({type:`tick`,id:i})},r.delay)});return}var a=t.get(r.id);a&&(a.repeat?e.clearInterval(a.handle):e.clearTimeout(a.handle),t.delete(r.id))}}var pe=()=>`'use strict';(${fe.toString()})();`;class me{constructor(e,t){this.worker=void 0,this.handlers=void 0,this.records=new Map,this.ticks=0,this.handleMessage=e=>{if(e.data.type===`ready`){this.handlers.onReady();return}let{id:t}=e.data,n=this.records.get(t);T(n)||(this.ticks++,n.repeat||this.records.delete(t),n.callback())},this.handleError=()=>{this.handlers.onFatalError(this.destroy())},this.worker=e,this.handlers=t,this.worker.onmessage=this.handleMessage,this.worker.onerror=this.handleError,this.worker.onmessageerror=this.handleError,this.postCommand({type:`ping`})}static create(e){let t=E();if(typeof t.Worker!=`function`||typeof t.Blob!=`function`||T(t.URL?.createObjectURL))return null;let n=t.URL.createObjectURL(new t.Blob([pe()],{type:`text/javascript`}));try{return new me(new t.Worker(n),e)}catch{return null}finally{t.URL.revokeObjectURL(n)}}get activeCount(){return this.records.size}get deliveredTicks(){return this.ticks}set(e,t,n,r){this.records.set(e,{callback:t,repeat:r,delay:n,startedAt:O()}),this.postCommand({type:`set`,id:e,delay:n,repeat:r})}clear(e){this.records.delete(e)&&this.postCommand({type:`clear`,id:e})}destroy(){let e=new Map(this.records);return this.records.clear(),this.worker.onmessage=null,this.worker.onerror=null,this.worker.onmessageerror=null,this.worker.terminate(),e}postCommand(e){this.worker.postMessage(e)}}var he;(e=>{e.SHARED=`shared`,e.CORE=`core`,e.STATISTICS=`statistics`,e.INTERACTIVE=`interactive`,e.UI=`ui`,e.UI_TV=`ui-tv`})(he||={});var ge;(e=>{e.IDLE=`idle`,e.STARTING=`starting`,e.READY=`ready`,e.FAILED=`failed`})(ge||={});var _e=1,k=0,A=`idle`,j=null,M=new Map,N=new Set,ve=e=>{let t=O();for(let[n,r]of e){let e=r.repeat?r.delay:Math.max(0,r.delay-(t-r.startedAt));Ce(n,r.callback,e,r.repeat)}},ye=e=>{A=`failed`,j=null,ve(e)},be=()=>{T(j)||(ve(j.destroy()),j=null),A=`idle`},xe=()=>{A===`idle`&&(A=`starting`,j=me.create({onReady:()=>{A=`ready`},onFatalError:ye}))},Se=e=>N.has(e)?(xe(),A===`ready`?j:null):null,Ce=(e,t,n,r)=>{let i=D();r?M.set(e,{repeat:!0,nativeId:i.setInterval(t,n)}):M.set(e,{repeat:!1,nativeId:i.setTimeout(()=>{M.delete(e),t()},n)})},we=(e,t,n,r)=>{let i=_e++,a=Se(e);return T(a)?Ce(i,t,n,r):a.set(i,t,n,r),i},Te=e=>{if(T(e))return;let t=M.get(e);if(T(t)){j?.clear(e);return}M.delete(e);let n=D();t.repeat?n.clearInterval(t.nativeId):n.clearTimeout(t.nativeId)},Ee=e=>({setTimeout:(t,n=0)=>we(e,t,n,!1),setInterval:(t,n=0)=>we(e,t,n,!0),clearTimeout:Te,clearInterval:Te}),De=e=>{N.clear(),e.forEach(e=>N.add(e)),N.size===0&&be()},Oe=e=>{k++,De(e)},ke=()=>{k!==0&&(k--,k===0&&De([]))},Ae=()=>({workerModules:[...N],workerState:A,liveConsumers:k,activeWindowTimers:M.size,activeWorkerTimers:j?.activeCount??0,workerTicks:j?.deliveredTicks??0}),P=Ee(`shared`),je=(e,t,n)=>new Promise((r,i)=>{t.addEventListener(`abort`,()=>{s(),l.remove()});let a=()=>{s(),i(`error`)},o=()=>{s(),r()},s=()=>{c&&P.clearTimeout(c),l.removeEventListener(`load`,o),l.removeEventListener(`error`,a)},c;n&&(c=P.setTimeout(()=>{s(),i(`timeout`)},n));let l=document.createElement(`script`);l.addEventListener(`load`,o),l.addEventListener(`error`,a),l.src=e,document.head.appendChild(l)}),Me=(e,t)=>p(function*(...n){let r=t(...n),i=e.aborted,a;for(;!i&&!e.aborted;)try{let e=yield r.next(a);i=e.done??!1,a=e.value}catch(e){yield r.throw(e)}return a}),Ne=(e,{start:t=0,factor:n=2,max:r=1/0,min:i=t,random:a=0}={})=>{let o=t;return o*=n**+e,o*=1+(Math.random()*a*2-a),o=Math.round(o),o=Math.min(o,r),o=Math.max(o,i),o},Pe={};g(Pe,{set:()=>Le,remove:()=>ze,isPersistent:()=>Fe,has:()=>Re,get:()=>Ie,clear:()=>Be});var F,I,L=`vk-videoplayer-dummy-key-${Math.random()}`,R=()=>{if(I!==void 0)return I;try{localStorage.setItem(L,`test`),localStorage.removeItem(L),I=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(L),I=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)I=2;else throw e}else throw e}return I===2&&(F=new Map),I},Fe=()=>R()===0,Ie=e=>{let t=R();switch(t){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return F?.get(e);default:y(t)}},Le=(e,t)=>{let n=R();switch(n){case 0:try{localStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 1:try{sessionStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 2:F?.set(e,t);return;default:y(n)}},Re=e=>{let t=R();switch(t){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return F?.has(e)??!1;default:return y(t),!1}},ze=e=>{let t=R();switch(t){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:F?.delete(e);return;default:y(t)}},Be=()=>{let e=R();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return F?.clear();default:y(e)}},Ve=()=>{let e,t=[],n=E();try{e=n.self!==n.top}catch(t){t instanceof DOMException&&t.name===`SecurityError`?e=!0:(e=!1,console.error(t))}try{n.location?.ancestorOrigins&&(t=[...n.location.ancestorOrigins])}catch(e){console.error(e)}try{!t.length&&n.document.referrer&&(t=[new URL(n.document.referrer).origin])}catch(e){console.error(e)}return t=t.filter(e=>URL.canParse(e)),{isEmbed:e,origins:t,topOrigin:t.at(-1),immediateOrigin:t.at(0)}},He;(e=>{e.INVARIANT=`Invariant quality`,e.Q_144P=`144p`,e.Q_240P=`240p`,e.Q_360P=`360p`,e.Q_480P=`480p`,e.Q_576P=`576p`,e.Q_720P=`720p`,e.Q_1080P=`1080p`,e.Q_1440P=`1440p`,e.Q_2160P=`2160p`,e.Q_4320P=`4320p`})(He||={});var z={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},Ue=(e,t)=>z[e].height>z[t].height,We=(e,t)=>z[e].height>=z[t].height,B=(e,t)=>z[e].height<z[t].height,Ge=(e,t)=>z[e].height<=z[t].height,Ke=e=>e.sort((e,t)=>e===t?0:e===`Invariant quality`?1:t===`Invariant quality`?-1:B(e,t)?1:-1)[0],qe=Object.keys(z).sort((e,t)=>B(e,t)?-1:1),Je=(e,t=.02)=>[...qe].find(n=>z[n].height*(1+t)>=e),Ye=({width:e,height:t})=>{let n=Math.min(e,t),r=Math.max(e,t);return qe.find(e=>{let t=z[e];return t.width>=r&&t.height>=n})},Xe=e=>z[e].height,V=e=>e===`Invariant quality`,Ze=e=>e.every(e=>!V(e));function Qe(e){if(V(e))throw Error(`Expected exact quality`)}var $e=e=>{switch(e){case`4320p`:return`8K`;case`2160p`:return`4K`;case`1440p`:return`QHD`;case`1080p`:return`FHD`;case`720p`:return`HD`;default:return``}},et=(e,t)=>{let n={};for(let r of Object.keys(t)){let i=t[r],a=e[r];Array.isArray(i)?n[r]=Array.isArray(a)?a:i:typeof i==`object`&&i?typeof a==`object`&&a&&!Array.isArray(a)?n[r]=et(a,i):n[r]=a??i:n[r]=r in e?a:i}return n},tt=e=>{let t=``;return e>=3600&&(t+=Math.floor(e/3600)+`h`,e%=3600),e>=60&&(t+=Math.floor(e/60)+`m`,e%=60),e>0&&(t+=Math.floor(e)+`s`),t};function nt(e,t=0,n){let r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0,p=!t&&t!==0&&typeof E().requestAnimationFrame==`function`;n&&(u=!!n.leading,d=`maxWait`in n,a=n?.maxWait?Math.max(+n?.maxWait||0,t):a,f=`trailing`in n?!!n.trailing:f);function m(t){let n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function h(e,t){return p?(s&&E().cancelAnimationFrame(s),E().requestAnimationFrame(e)):P.setTimeout(e,t)}function ee(e){if(p){E().cancelAnimationFrame(e);return}P.clearTimeout(e)}function te(e){return l=e,s=h(v,t),u?m(e):o}function g(e){let n=e-c,r=e-l,i=t-n;return d?Math.min(i,a-r):i}function _(e){let n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function v(){let e=Date.now();if(_(e))return y(e);s=h(v,g(e))}function y(e){return s=void 0,f&&r?m(e):(r=i=void 0,o)}function ne(){s!==void 0&&ee(s),l=0,r=c=i=s=void 0}function b(){return s===void 0?o:y(Date.now())}function re(){return s!==void 0}function x(...e){let n=Date.now(),a=_(n);if(r=e,i=this,c=n,a){if(s===void 0)return te(c);if(d)return s=h(v,t),m(c)}return s===void 0&&(s=h(v,t)),o}return x.cancel=ne,x.flush=b,x.pending=re,x}var rt=(e,t=0,n)=>nt(e,t,f(f(f({},{leading:!0,trailing:!0}),n),{},{maxWait:t})),H=(e,t)=>{if(typeof e!=`object`||!e)return e;let n=Array.isArray(e)?[]:{};for(let r in e){if(typeof t==`function`){let i=t(e[r],r,e,n);if(i!==void 0){n[r]=i;continue}}typeof e[r]==`object`?n[r]=H(e[r],t):n[r]=e[r]}return n},it=e=>H(e);class at extends C{constructor(e){super(),this.bufferSize=void 0,this.buffer=[],this.cursorEnd=-1,this.cursorStart=0,this.bufferSize=e,this.buffer=Array(e)}next(e){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=e,this.subscribers.forEach(t=>t.next(e))}_subscribe(e){for(let t=this.cursorStart;t<=this.cursorEnd;t++)e.next(this.buffer[t%this.bufferSize]);let t=this.keyCounter++;return this.subscribers.set(t,e),new v().add(()=>this.subscribers.delete(t))}}class U extends C{constructor(e){super(),this.value=void 0,this.value=e}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){let t=super._subscribe(e);return e.next(this.value),t}}function ot(e){return new S(t=>{let n={},r=Object.keys(e).length,i=e=>i=>{e in n||r--,n[e]=i,r===0&&t.next(n)};return Object.entries(e).reduce((e,[t,n])=>e.add(n.subscribe(i(t))),new v)})}function st(...e){return new S(t=>e.reduce((e,n)=>e.add(n.subscribe(t)),new v))}var ct=e=>new S(t=>{let n=P.setTimeout(()=>{try{t.next()}catch(e){if(t.error)t.error(e);else throw e}},e);return()=>P.clearTimeout(n)}),lt=e=>new S(t=>{let n=P.setInterval(()=>t.next(),e);return()=>{n&&=(P.clearInterval(n),void 0)}});function ut(e){return new S(t=>{if(e instanceof Promise){let n=!1;return e.then(e=>{n||t.next(e)}).catch(e=>{n||t.error?.call(t,e)}),()=>{n=!0}}for(let n=0;n<e.length;n++)t.next(e[n])})}var dt=ut,ft=(e,t)=>new S(n=>{let r=e=>n.next(e);return e.addEventListener(t,r),()=>e.removeEventListener(t,r)});class pt extends v{remove(e){this.subscriptions=this.subscriptions.filter(t=>t!==e)}}function mt(e){return t=>new S(n=>t.subscribe(new ht(n,e)))}class ht{constructor(e,t){this.destination=void 0,this.size=void 0,this.lastValues=[],this.destination=e,this.size=t}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var t;(t=this.destination).error?.call(t,e)}}var gt={leading:!1,trailing:!0};function _t(e,t=gt){return n=>new S(r=>n.subscribe(new vt(r,e,t)))}class vt{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,w(this.timeout)?P.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=P.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(e){if(this.destination.error)this.destination.error(e);else throw e}this.timeout=void 0},this.time)}error(e){var t;(t=this.destination).error?.call(t,e)}}var yt={leading:!0,trailing:!1};function bt(e,t=yt){return n=>new S(r=>n.subscribe(new xt(r,e,t)))}class xt{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,T(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=P.setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var t;(t=this.destination).error?.call(t,e)}}function St(e){return t=>new S(n=>t.subscribe(new Ct(n,e)))}class Ct{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.destination=e,this.predicate=t}next(e){let t;try{t=this.predicate(e)}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}var wt=(e,t)=>{let n=(e,t)=>{let n=Object.keys(e);for(let r in t)if(!n.includes(r)||t[r]!==e[r])return!1;return!0};return n(e,t)&&n(t,e)},Tt=(e,t)=>e instanceof Object&&t instanceof Object?wt(e,t):e===t;function Et(e=Tt){return t=>new S(n=>t.subscribe(new Ot(n,e)))}var Dt={};class Ot{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.lastValue=Dt,this.destination=e,this.predicate=t}next(e){let t;try{t=this.lastValue===Dt||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object&&!Array.isArray(e)?f({},e):e}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function kt(e){return t=>new S(n=>t.subscribe(new At(n,e)))}class At{constructor(e,t){this.destination=void 0,this.mapper=void 0,this.destination=e,this.mapper=t}next(e){let t;try{t=this.mapper(e)}catch(e){throw this.error(e),e}this.destination.next(t)}error(e){var t;(t=this.destination).error?.call(t,e)}}function jt(e){return kt(()=>e)}function Mt(){return e=>new S(t=>{let n=!1,r=!1,i=e.subscribe(e=>{n||(n=!0,t.next(e)),r&&i.unsubscribe()},e=>{n=!0,t.error?.call(t,e),r&&i.unsubscribe()});return r=!0,n&&i.unsubscribe(),i})}function Nt(){return e=>new S(t=>e.subscribe(new Pt(t)))}class Pt{constructor(e){this.destination=void 0,this.last=void 0,this.hasLast=!1,this.destination=e}next(e){let t=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,e])}error(e){var t;(t=this.destination).error?.call(t,e)}}function Ft(e){return t=>new S(n=>t.subscribe(new It(n,e)))}class It{constructor(e,t){this.destination=void 0,this.effect=void 0,this.destination=e,this.effect=t}next(e){try{this.effect(e)}catch(e){throw this.error(e),e}this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function Lt(e){return t=>new S(n=>t.subscribe(new Rt(n,e)))}class Rt{constructor(e,t){if(this.destination=void 0,this.count=void 0,this.destination=e,this.count=t,t<0){var n;(n=this.destination).error?.call(n,Error(`Count can not be less than zero`))}}next(e){this.count===0?this.destination.next(e):this.count--}error(e){var t;(t=this.destination).error?.call(t,e)}}function zt(e=0){return t=>{let n=0,r=new at(e),i=t.subscribe(r),a=e=>()=>{e.unsubscribe(),n--,n===0&&i.unsubscribe()};return new S(e=>(n++,a(r.subscribe(e))))}}var Bt=300,Vt=(e,t=Bt)=>new S(n=>{let r=E(),{width:i,height:a}=e.getBoundingClientRect();if(n.next({width:i,height:a}),!ue(r))return;let o=new r.ResizeObserver(rt(e=>{let t=e[0];if(!t)return;let r,i;t.contentBoxSize&&t.contentBoxSize[0]?(i=t.contentBoxSize[0].blockSize,r=t.contentBoxSize[0].inlineSize):t.contentRect&&(r=t.contentRect.width,i=t.contentRect.height),w(r)&&w(i)&&n.next({width:r,height:i})},t));return o.observe(e),()=>o.disconnect()}),W=(e,t=6,n=`.`)=>{let r={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!t))if(typeof e[i]==`object`&&e[i]!==null){let a=W(e[i],t-1);for(let e in a)a.hasOwnProperty(e)&&(r[i+n+e]=a[e])}else r[i]=e[i];return r},Ht=e=>{e.innerHTML=``,e.removeAttribute(`src`),e.load()},Ut=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol===`https:`},Wt=(e,t)=>!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom),Gt=(()=>{let e=0;return()=>{let t=e;return e=(e+1)%(2**53-1),t}})(),Kt=e=>e!==void 0&&e!==``?e:Gt().toString();function qt(e,t,n){if(e<=t[0])return n[0];if(e>=t[t.length-1])return n[n.length-1];let r=1;for(;r<t.length&&t[r]<e;)r++;r>=t.length&&(r=t.length-1);let i=t[r-1],a=t[r],o=n[r-1],s=n[r];return e===i?o:e===a?s:o+(e-i)/(a-i)*(s-o)}function Jt(e,t,n){if(e<=0||n<0)return[];let r=[],i=Math.floor((e-1)/2),a=Math.floor(e/2),o=t-i,s=t+a;o<0&&(s+=Math.abs(o),o=0),s>n&&(o-=s-n,s=n),o=Math.max(0,o),s=Math.min(n,s);for(let e=o;e<=s;e++)r.push(e);return r}var Yt=e=>e instanceof DOMException&&(e.name===`AbortError`||e.code===20),Xt=e=>{if(!Yt(e))throw e};function Zt(e){if(e&&typeof e==`object`){if(`message`in e)return String(e.message);try{return JSON.stringify(e)}catch{return`object serialization error`}}return String(e)}m=Symbol.iterator;class G{constructor(e){if(this.buffer=void 0,this.writeIndex=0,this.count=0,this.capacity=void 0,e<=0)throw Error(`Capacity must be greater than 0`);this.capacity=e,this.buffer=Array.from({length:e}).fill(null)}add(e){this.buffer[this.writeIndex]=e,this.writeIndex=(this.writeIndex+1)%this.capacity,this.count<this.capacity&&this.count++}*[m](){if(this.count===0)return;let e=this.count<this.capacity?0:this.writeIndex;for(let t=0;t<this.count;t++){let t=this.buffer[e];w(t)&&(yield t),e=(e+1)%this.capacity}}clear(){this.buffer.fill(null),this.writeIndex=0,this.count=0}get size(){return this.count}get maxCapacity(){return this.capacity}}var Qt=e=>(t,n=!1)=>r=>{let i=typeof r==`object`;r==null||i&&!Object.keys(r).length||e(t,i?W(r):{value:r},n)},$t=(e={})=>{let t=e=>{let t=e;return e===void 0?t=`undefined`:e===null?t=`null`:(typeof e==`number`||typeof e==`boolean`)&&(t=e.toString()),t},n={};for(let r in e)Array.isArray(e[r])?n[r]=e[r].map(t):n[r]=t(e[r]);return n};class K{constructor({name:e,getParentContext:t,getRootTracerContext:n,options:r}){this.dynamicImportTimeout=5e3,this.subscription=new v,this.options=void 0,this.span=void 0,this.context=void 0,this.childTracers=[],this.initPromise=void 0,this.getRootTracerContext=void 0,this.eventsBuffer=null,this.options=r??{};let{tracerEventsBufferSize:i}=this.options;w(i)&&i>0&&(this.eventsBuffer=new G(i)),K.dynamicImportStatus===`not_started`&&(K.dynamicImportPromise=this.loadOpentelemetry());let a=Date.now();this.initPromise=K.dynamicImportPromise.then(r=>{K.dynamicImportStatus===`completed`&&this.init({name:e,getParentContext:t,getRootTracerContext:n},a)})}init({name:e,getParentContext:t,getRootTracerContext:n},r){let i=n?.();if(T(i))return;let{opentelemetryApi:a}=K.dynamicImports,{context:o,trace:s}=a,{tracer:c,attributes$:l}=i;this.span=c.startSpan(e,{startTime:r},t?.()),this.context=s.setSpan(o.active(),this.span),this.getRootTracerContext=n,this.subscription.add(l.subscribe(e=>{w(e)&&this.span.setAttributes(e)}))}loadOpentelemetry(){var e=this;return p(function*(){if(K.dynamicImportStatus===`not_started`){K.dynamicImportStatus=`in_progress`;try{let t=new Promise((t,n)=>P.setTimeout(n,e.dynamicImportTimeout)),n=Promise.all([import(`@opentelemetry/api`),import(`@opentelemetry/sdk-trace-web`),import(`@apptracer/opentelemetry`),import(`@opentelemetry/resources`),import(`@opentelemetry/semantic-conventions`)]),[r,i,a,o,s]=yield Promise.race([n,t]);K.dynamicImports={opentelemetryApi:r,opentelemetrySdk:i,tracer:a,opentelemetryResources:o,opentelemetrySemanticConventions:s},K.dynamicImportStatus=`completed`}catch{K.dynamicImportStatus=`failed`}}})()}isComponentTracerNotInitialized(){return T(this.span)||K.dynamicImportStatus===`failed`}addEventToBuffer(e,t,n,r){w(this.eventsBuffer)&&this.eventsBuffer.add({name:e,attributes:t,type:n,timestamp:r})}addEventToSpan(e,t,n,r){this.span.addEvent(e,f(f({},$t(t)),{},{type:n}),r)}log(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`log`,r)}):this.addEventToBuffer(e,t,`log`,r)}error(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`error`,r)}):this.addEventToBuffer(e,t,`error`,r)}critical(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`critical`,r)}):this.addEventToBuffer(e,t,`critical`,r)}createComponentTracer(e){let t=new K({name:e,getParentContext:()=>this.context,getRootTracerContext:()=>this.getRootTracerContext?.call(this),options:this.options});return this.childTracers.push(t),t}setSpanAttributes(e){this.span.setAttributes($t(e))}end(){this.initPromise.then(e=>{if(!this.isComponentTracerNotInitialized()){if(w(this.eventsBuffer))for(let e of this.eventsBuffer)this.addEventToSpan(e.name,e.attributes,e.type,e.timestamp);this.childTracers.forEach(e=>e.end()),this.span.end(),this.subscription.unsubscribe()}})}pause(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!0)}resume(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!1)}}K.dynamicImportStatus=`not_started`,K.dynamicImports=void 0,K.dynamicImportPromise=void 0;var en=`gW5EerTD5QhAnsbpF7Hd2NSMRteYIUUMjFbSyI68Pf5`,tn=e=>{class t extends e{constructor(e,t){super(e,t),this._isPaused=!1,this._pausedSpans=void 0,this.maxExportBatchSize=void 0,this.maxQueueSize=void 0,this.maxQueueSize=t?.maxQueueSize??2048,this.maxExportBatchSize=t?.maxExportBatchSize??512,this._pausedSpans=new G(this.maxQueueSize)}pause(){this._isPaused=!0}resume(){var e=()=>super.onEnd,t=this;return p(function*(){if(!t._isPaused)return;t._isPaused=!1;let n=t._pausedSpans;t._pausedSpans=new G(t.maxQueueSize);let r=0;for(let i of n)e().call(t,i),r+=1,r>=t.maxExportBatchSize&&(yield new Promise(e=>P.setTimeout(()=>e(void 0),0)),r=0);n.clear(),yield t.forceFlush()})()}onEnd(e){if(this._isPaused){this._pausedSpans.add(e);return}super.onEnd(e)}}return t};class nn extends K{constructor(e){super({name:`Root`,options:e}),this.attributes$=new U(null),this.paused$=new U(!1),this.paused$.next(!!this.options.tracerPausedAtInit)}init({name:e,getParentContext:t},n){let{tracer:r,opentelemetryResources:i,opentelemetrySdk:a,opentelemetrySemanticConventions:o}=K.dynamicImports,{TracerUploadSpanExporter:s}=r,{WebTracerProvider:c,BatchSpanProcessor:l}=a,{resourceFromAttributes:u}=i,{ATTR_SERVICE_NAME:d,ATTR_SERVICE_VERSION:f}=o,p=new(tn(l))(new s({appToken:en}));this.subscription.add(this.paused$.subscribe(e=>{e?p.pause():p.resume()}));let m=new c({resource:u({[d]:`videoplayer-sdk-web`,[f]:_}),spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0},spanProcessors:[p]});m.register();let h=m.getTracer(`sdk-videoplayer-tracer`);super.init({name:e,getParentContext:t,getRootTracerContext:()=>({tracer:h,attributes$:this.attributes$,paused$:this.paused$})},n)}getTraceId(){return this.isComponentTracerNotInitialized()?``:this.span.spanContext().traceId}setSpanAttributes(e){this.attributes$.next(f(f({},this.attributes$.getValue()),$t(e)))}addSubscription(e){this.subscription.add(e)}}class rn{constructor(e){this.fakeTraceId=void 0}log(e,t,n){}error(e,t,n){}critical(e,t,n){}createComponentTracer(e){return new rn({name:e})}end(){}getTraceId(){return this.fakeTraceId}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}var an=()=>!0,on={level:0,filter:an,name:`Noname Tracer`,outputMethod:`log`};class sn{constructor({name:e,level:t,filter:n,outputMethod:r}={}){this.name=void 0,this.filter=an,this.level=on.level,this.outputMethod=on.outputMethod,this.childTracers=[],this.filter=n??this.filter,this.level=t??this.level,this.outputMethod=r??this.outputMethod,this.name=e??on.name}log(e,t,n){this.logDebug(e,t)}error(e,t,n){this.logError(e,t)}critical(e,t,n){this.logError(e,t)}createComponentTracer(e){let t=new sn({filter:this.filter,level:this.level,name:`${this.name}/ ${e}`,outputMethod:this.outputMethod});return this.childTracers.push(t),t}end(){this.childTracers.forEach(e=>e.end()),this.childTracers=[]}setLevel(e){this.level=e,this.childTracers.forEach(t=>t.setLevel(e))}setOtputMethod(e){this.outputMethod=e,this.childTracers.forEach(t=>t.setOtputMethod(e))}setFilter(e){this.filter=e,this.childTracers.forEach(t=>t.setFilter(e))}getFinishedSpans(){}getTraceId(){return`debug_trace`}get verbose(){return this.level===0}createMessage(e,t){return[this.name,e,JSON.stringify(t)].join(`: `)}logDebug(e,t){!this.verbose||!this.filter(e,t)||E().console[this.outputMethod](this.createMessage(e,t))}logError(e,t){this.filter(e,t)&&E().console.error(this.createMessage(e,t))}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}class cn{static createRootTracer(e=`fake`,t){switch(e){case`real`:return new nn(t);case`debug`:return new sn;default:return new rn}}}var ln;(e=>{e.MediaError=`mediaError`,e.SegmentFetcher=`segment_fetcher`,e.SegmentAppend=`segment_append`,e.Hangup=`hangup`,e.Stall=`stall`})(ln||={});var un;(e=>{e.NETWORK=`network`,e.VIDEO_PIPELINE=`video_pipeline`,e.EXTERNAL_API=`external_api`,e.PARSER=`parser`,e.DOM=`dom`,e.WTF=`wtf`,e.UI=`ui`,e.CALL_FROM_EXTERNAL=`call_from_external`,e.FATAL=`fatal`})(un||={});var dn;(e=>{e.Armenian=`58`,e.Azerbaijani=`57`,e.Belarusian=`114`,e.English=`3`,e.Kazakh=`97`,e.Portuguese=`73`,e.Russian=`0`,e.Spanish=`4`,e.Ukrainian=`1`,e.Uzbek=`65`,e.Vietnamese=`75`})(dn||={});var fn=`vk.ru`,pn=function(){var e=p(function*(e,t,n){let r=new URL(`https://${fn}/js/lang-pack.js`);return r.searchParams.set(`format`,`json`),r.searchParams.set(`name`,t),e!==void 0&&r.searchParams.set(`lang`,e),mn(yield(yield fetch(r.toString())).json(),n)});return function(t,n,r){return e.apply(this,arguments)}}(),mn=(e,t)=>Object.fromEntries(Object.entries(e.keys).map(([e,n])=>[e.substring(`${t}_`.length),hn(n)])),hn=e=>Array.isArray(e)?e[0]:e,gn;(e=>{e.RU=`ru`,e.EN=`en`})(gn||={});var q=`__vk_vp_internals_exposure`;class _n{constructor(e,t){this.playerId=void 0,this.type=void 0,this.playerId=t,this.type=e,this.initWindowObjects()}getWindowObject(){var e;if(typeof window>`u`)return{};let t=this.playerId,n=this.type;return((e=window[q])==null||(e=e[t])==null?void 0:e[n])??{}}initWindowObjects(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[q]||(window[q]={}),window[q][e]||(window[q][e]={}),window[q][e][t]||(window[q][e][t]={})}expose(e){typeof window>`u`||Object.assign(this.getWindowObject(),e)}destroy(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[q]&&window[q][e]&&window[q][e][t]&&(delete window[q][e][t],Object.keys(window[q][e]).length||delete window[q][e],Object.keys(window[q]).length||delete window[q])}}var vn={};g(vn,{subscribe:()=>Sn,push:()=>xn,destroy:()=>bn,create:()=>yn});var J=new Map,yn=(e,t)=>J.set(e,t??[]),bn=e=>J.delete(e),xn=(e,t)=>{let n=J.get(e);n&&(typeof n==`function`?n(t):n.push(t))},Sn=(e,t)=>{let n=J.get(e);if(n){if(n&&Array.isArray(n))for(let e of n)t(e);J.set(e,t)}},Cn=e=>se({id:e.id,message:e.message,category:e.category,data:wn(e.data),httpCode:e.httpCode,UVBackendErrorCode:e.UVBackendErrorCode});function wn(e){switch(typeof e){case`boolean`:case`string`:case`number`:return e;case`object`:try{return JSON.stringify(e)}catch{return}default:return}}var Tn=e=>{let t=e.thrown instanceof Error?e.thrown:Error(e.message),n=e.id.length>10240?e.id.substring(0,10240):e.id;try{t.name=n}catch{t=Error(e.message),t.name=n}return t},En=()=>{try{var e;let{origin:t,pathname:n,search:r,hostname:i}=((e=E())==null||(e=e.document)==null?void 0:e.location)??{};return!i||i===`localhost`?void 0:f({url:t+n},new URLSearchParams(r).entries().reduce((e,[t,n])=>(e[`url.${t}`]=n,e),{}))}catch{}};class Y{constructor(e,t,n,r){this.dynamicImportTimeout=5e3,this.componentName=void 0,this.subscription=new v,this.options=void 0,this.envParams=void 0,this.context=void 0,this.isEmbed=void 0,this.embedParent=void 0,this.beforeInitErrors=[],this.componentName=e,this.options=t,this.envParams=n,this.context=f({},r);let{isEmbed:i,topOrigin:a}=Ve();this.isEmbed=i,this.embedParent=a?new URL(a).hostname:void 0,this.options.enabled&&(this.loadModule(),this.init())}updateContext(e){Object.assign(this.context,e)}error(e,t){let n=Y.tracerErrorMap.get(this.componentName);if(!n){this.beforeInitErrors.push([e,t]);return}let{blackErrorCategoryList:r,blackErrorIdList:i,sampleRate:a,whiteErrorCategoryList:o,whiteErrorIdList:s}=this.options,{id:c,category:l}=e;if(!(r.length&&r.includes(l)||i.length&&i.includes(c)||o.length&&!o.includes(l)||s.length&&!s.includes(c)||Math.random()>=a))try{let r=Tn(e);n?.error(r,f(f({crashIdSource:t?.crashIdSource??r.name,severity:t?.severity??(e.traceAsLog?`debug`:void 0)},t?.issueKey?{issueKey:t.issueKey}:{}),{},{keys:f(f(f(f({},this.context),Cn(e)),En()),this.isEmbed&&this.embedParent&&{iframe_host:this.embedParent})}))}catch(e){console.error(e)}}addSubscription(e){this.subscription.add(e)}destroy(){this.subscription.unsubscribe()}init(){var e=this;return p(function*(){try{if(yield Y.loadPromise,Y.tracerErrorMap.has(e.componentName)||T(Y.appTracerModule))return;let{appTracerModule:t}=Y,{initTracerError:n,initTracerErrorUploader:r,getTracerModules:i}=t,a=i(e.componentName),o=!a.error,s=a.error??n(e.componentName,{enableUnhandledErrorsListeners:!1,stringifyErrorDataObject:!0});w(e.options.userId)&&s.setUserId(e.options.userId),o&&r(e.componentName,{appToken:en,environment:e.envParams.env,versionCode:1,versionName:e.envParams.version}),Y.tracerErrorMap.set(e.componentName,s),e.beforeInitErrors.forEach(t=>e.error.apply(e,t)),e.beforeInitErrors=[]}catch(e){console.error(e)}})()}loadModule(){var e=this;w(Y.loadPromise)||(Y.loadPromise=function(){var t=p(function*(){try{let t=new Promise((t,n)=>P.setTimeout(n,e.dynamicImportTimeout));Y.appTracerModule=yield Promise.race([t,import(`@apptracer/sdk/lite`)])}catch(e){Y.loadPromise=null,console.error(e)}});return function(){return t.apply(this,arguments)}}()())}}Y.tracerErrorMap=new Map,Y.appTracerModule=null,Y.loadPromise=null;class Dn{constructor(e,t){this.options=void 0,this.symbol=void 0,this.options=t,this.symbol=Symbol(e)}}var On=()=>{let e=new Map,t=new Map,n=new Map,r=new Map,i=new Set;return{resolve(e){if(!r.has(e)){let t=n.get(e);if(!t)throw Error(`No constructor registered in DI container for ${e.name}`);r.set(e,new t)}return r.get(e)},resolveOptional(e){try{return this.resolve(e)}catch{return}},replace(e,t){r.forEach((t,n)=>{t instanceof e&&r.delete(n)}),n.set(e,t)},getToken(n){if(e.has(n.symbol))return e.get(n.symbol);if(t.has(n.symbol)){let r=t.get(n.symbol)();return e.set(n.symbol,r),r}if(n.options?.factory){let t=n.options.factory();return e.set(n.symbol,t),t}throw Error(`No value registered in DI container for token "${n.symbol.description}"`)},registerToken(t,n){e.set(t.symbol,n)},registerFactory(e,n){t.set(e.symbol,n)},hasToken(n){return e.has(n.symbol)||t.has(n.symbol)||!!n.options?.factory},registerCleanup(e){i.add(e)},clear(){i.forEach(e=>e()),i.clear(),e.clear(),t.clear(),r.clear(),n.clear()}}};class kn{constructor(e){this._inputNode=void 0,this._outputNode=void 0,this._plugins=[],this._destination=null,this._taps=[],this._inputNode=e.createGain(),this._outputNode=e.createGain()}get input(){return this._inputNode}get plugins(){return this._plugins}connectTo(e){this._destination=e,this.rebuild()}addTap(e){this._taps.push(e),this._outputNode.connect(e)}hasPlugin(e){return this._plugins.some(t=>t.id===e)}addPlugin(e){this.hasPlugin(e.id)||(this._plugins.push(e),this.rebuild())}removePlugin(e){let t=this._plugins.findIndex(t=>t.id===e);t!==-1&&(this._plugins.splice(t,1),this.rebuild())}rebuild(){this._inputNode.disconnect();for(let e of this._plugins)e.outputNode.disconnect();this._outputNode.disconnect();let e=this._inputNode;for(let t of this._plugins)e.connect(t.inputNode),e=t.outputNode;e.connect(this._outputNode),this._destination!==null&&this._outputNode.connect(this._destination);for(let e of this._taps)this._outputNode.connect(e)}}class An{constructor(e,t,n){this._pluginChain=void 0,this._element=void 0,this._ctx=void 0,this._sourceNode=null,this._isBound=!1,this._element=e,this._ctx=t,this._pluginChain=new kn(t),this._pluginChain.connectTo(n)}get isBound(){return this._isBound}get plugins(){return this._pluginChain.plugins}bind(){this._isBound||=(this._sourceNode===null&&(this._sourceNode=this._ctx.createMediaElementSource(this._element)),this._sourceNode.disconnect(),this._sourceNode.connect(this._pluginChain.input),!0)}unbind(){this._isBound&&=(this._sourceNode?.disconnect(),this._sourceNode?.connect(this._ctx.destination),!1)}addPlugin(e){this._pluginChain.addPlugin(e)}removePlugin(e){this._pluginChain.removePlugin(e)}addAnalyser(e){this._pluginChain.addTap(e)}}class jn{constructor(){this._ctx=null,this._masterGain=null,this._connections=new Map,this._contextEnabled=!1,this._boundBeforeDisable=new Set}static isSupported(){let e=E();return w(e.AudioContext??e.webkitAudioContext)}get context(){if(T(this._ctx)){let e=E(),t=e.AudioContext??e.webkitAudioContext;this._ctx=new t}return this._ctx}get contextState(){return this._contextEnabled?this._ctx?.state??`suspended`:`suspended`}enableContext(){var e=this;return p(function*(){e.ensureContext(),yield e._ctx?.resume(),e._contextEnabled=!0;for(let t of e._boundBeforeDisable)e._connections.get(t)?.bind();e._boundBeforeDisable.clear()})()}disableContext(){var e=this;return p(function*(){e._contextEnabled=!1;for(let[t,n]of e._connections)n.isBound&&(e._boundBeforeDisable.add(t),n.unbind())})()}connectSource(e){var t=this;return p(function*(){t.ensureContext(),t._contextEnabled=!0,yield t._ctx?.resume();let n=t._connections.get(e);if(n!==void 0){n.isBound||n.bind();return}let r=new An(e,t.context,t._masterGain);r.bind(),t._connections.set(e,r)})()}disconnectSource(e){this._connections.get(e)?.unbind()}isSourceConnected(e){return this._connections.get(e)?.isBound??!1}addPlugin(e,t){let n=this._connections.get(e);if(n===void 0)throw Error(`Source is not connected. Call connectSource() first.`);n.addPlugin(t)}removePlugin(e,t){this._connections.get(e)?.removePlugin(t)}getPlugins(e){return this._connections.get(e)?.plugins??[]}createAnalyser(e){let t=this._connections.get(e);if(t===void 0)return null;let n=this.context.createAnalyser();return n.fftSize=256,n.smoothingTimeConstant=.8,t.addAnalyser(n),n}setMasterVolume(e){this._masterGain!==null&&(this._masterGain.gain.value=e)}getMasterVolume(){return this._masterGain?.gain.value??1}dispose(){this._connections.clear(),this._boundBeforeDisable.clear(),this._masterGain=null,this._contextEnabled=!1,this._ctx?.close(),this._ctx=null}ensureContext(){let e=this.context;T(this._masterGain)&&(this._masterGain=e.createGain(),this._masterGain.gain.value=1,this._masterGain.connect(e.destination))}}class Mn{constructor(e,t){this.id=`volume-fader`,this._gainNode=void 0,this._duration=void 0,this._curve=void 0,this._fade=null,this._gainNode=e.createGain(),this._gainNode.gain.value=1,this._duration=t.duration,this._curve=t.curve??this._buildEasingCurve(t.duration/1e3)}get inputNode(){return this._gainNode}get outputNode(){return this._gainNode}get faded(){return this._fade!==null}appear(){this._startFade(0,1)}disappear(){this._startFade(1,0)}pause(){if(this._fade===null)return;let e=this._gainNode.gain,t=this._gainNode.context.currentTime,n=t-this._fade.startTime,r=Math.max(0,this._fade.remaining-n);if(r<=.001){this._finishFade();return}let i=this._sampleIndex(this._fade,t),a=this._fade.curve[i];e.cancelScheduledValues(t),e.setValueAtTime(a,t),this._fade={from:a,target:this._fade.target,startTime:t,remaining:r,curve:this._fade.curve.subarray(i)}}resume(){if(this._fade===null)return;let e=this._gainNode.context.currentTime,{from:t,target:n,remaining:r,curve:i}=this._fade;if(r<=.001||Math.abs(n-t)<.001||i.length<2){this._finishFade();return}this._fade={from:t,target:n,startTime:e,remaining:r,curve:i},this._scheduleCurve(i,t,e,r)}cancel(){this._fade!==null&&this._finishFade()}_finishFade(){if(this._fade===null)return;let e=this._gainNode.gain,t=this._gainNode.context.currentTime;e.cancelScheduledValues(t),e.setValueAtTime(this._fade.target,t),this._fade=null}_startFade(e,t){let n=this._gainNode.gain,r=this._gainNode.context.currentTime,i=this._duration/1e3;if(i<=0){n.cancelScheduledValues(r),n.setValueAtTime(t,r),this._fade=null;return}let a=new Float32Array(this._curve.length);for(let n=0;n<this._curve.length;n++)a[n]=e+(t-e)*this._curve[n];this._fade={from:a[0],target:t,startTime:r,remaining:i,curve:a},this._scheduleCurve(a,a[0],r,i)}_buildEasingCurve(e){let t=Math.max(2,Math.ceil(e*60)),n=new Float32Array(t);for(let e=0;e<t;e++){let r=e/(t-1);n[e]=(1-Math.cos(Math.PI*r))/2}return n}_scheduleCurve(e,t,n,r){let i=this._gainNode.gain;i.cancelScheduledValues(n),i.setValueAtTime(t,n),i.setValueCurveAtTime(e,n,r)}_sampleIndex(e,t){let n=t-e.startTime,r=Math.max(0,Math.min(1,n/e.remaining));return Math.min(Math.round(r*(e.curve.length-1)),e.curve.length-1)}}class Nn{constructor(e,t,n,r){this._filter=void 0,this._source=void 0,this._defaultGain=void 0,this.frequency=void 0,this.frequency=t,this._source=n,this._defaultGain=r,this._filter=e.createBiquadFilter(),this._filter.type=`peaking`,this._filter.frequency.value=t,this._filter.gain.value=0,this._filter.Q.value=1,this._source.connect(this._filter.gain)}get value(){return this._source.offset.value}get node(){return this._filter}set(e){this._source.offset.value=e}reset(){this.set(this._defaultGain)}dispose(){this._source.disconnect(this._filter.gain)}}class X{constructor(e,t){this.id=`equalizer`,this._inputNode=void 0,this._outputNode=void 0,this._filterMap=new Map,this.equalizer=void 0,this._inputNode=e.createGain(),this._outputNode=e.createGain();let n=Object.entries(t).map(([e,t])=>[Number(e),t]).filter(([e])=>Number.isFinite(e)).sort((e,t)=>e[0]-t[0]),r=X._sources.get(e);T(r)&&(r=new Map,X._sources.set(e,r));for(let[t,i]of n)if(!r.has(t)){let n=e.createConstantSource();n.offset.value=i,n.start(),r.set(t,n)}let i={};for(let[t,a]of n){let n=r.get(t);if(!n)continue;let o=new Nn(e,t,n,a);this._filterMap.set(t,o),i[t]=o}this.equalizer=i,this.rebuild()}get inputNode(){return this._inputNode}get outputNode(){return this._outputNode}resetAll(){for(let e of this._filterMap.values())e.reset()}dispose(){for(let e of this._filterMap.values())e.dispose()}rebuild(){this._inputNode.disconnect();for(let e of this._filterMap.values())e.node.disconnect();this._outputNode.disconnect();let e=this._inputNode;for(let t of this._filterMap.values())e.connect(t.node),e=t.node;e.connect(this._outputNode)}}X._sources=new WeakMap;var Pn=-14;class Fn{constructor(e,t){this.id=`normalizer`,this._compressor=void 0,this._gainNode=void 0,this._compressor=e.createDynamicsCompressor(),this._gainNode=e.createGain(),this.applyConfig(t),this._compressor.connect(this._gainNode)}get inputNode(){return this._compressor}get outputNode(){return this._gainNode}applyConfig(e){if(!Number.isFinite(e.lufs)||!Number.isFinite(e.peak)){this._gainNode.gain.value=1;return}this._compressor.threshold.value=e.peak,this._compressor.knee.value=0,this._compressor.ratio.value=20,this._compressor.attack.value=.003,this._compressor.release.value=.25;let t=(e.targetLufs??Pn)-e.lufs;this._gainNode.gain.value=10**(t/20)}}var In=(e,t)=>{let n=e.length,r=t>=0?t:n+t;return r>=0&&r<n?e[r]:void 0},Ln=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r,n,e))return r}},Rn=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n,e))return n;return-1},zn=(e,t=1)=>{let n=[],r=(e,t)=>{for(let i=0;i<e.length;i++){if(!(i in e))continue;let a=e[i];t>0&&Array.isArray(a)?r(a,t-1):n.push(a)}};return r(e,t),n},Bn=(e,t)=>{let n=[];for(let r=0;r<e.length;r++){let i=t(e[r],r,e);if(Array.isArray(i))for(let e=0;e<i.length;e++)n.push(i[e]);else n.push(i)}return n},Vn=(e,t,n=0)=>{let r=e.length,i=n>=0?n:Math.max(r+n,0);for(;i<r;i++){let n=e[i];if(n===t||n!==n&&t!==t)return!0}return!1},Hn=e=>{let t=e.length,n=Array(t);for(let r=0;r<t;r++)n[r]=e[t-1-r];return n},Un=(e,t)=>{let n=e.slice();return t?n.sort(t):n.sort()},Wn=(e,t,n,...r)=>{let i=e.slice();return n===void 0?i.splice(t):i.splice(t,n,...r),i},Gn=(e,t,n)=>{let r=e.length,i=t>=0?t:r+t,a=e.slice();return a[i]=n,a},Kn=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof self<`u`?self:Function(`return this`)(),qn=e=>{let t=[],n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r];t.push([i,e[i]])}return t},Jn=e=>{let t={};for(let[n,r]of e)t[n]=r;return t},Yn=Object.prototype.hasOwnProperty,Xn=(e,t)=>Yn.call(e,t),Zn=e=>{let t=Object.keys(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n},Qn=e=>{let t=Array.from(e);return t.length===0?Promise.resolve([]):Promise.all(t.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},$n=e=>{let t=Array.from(e);return t.length===0?Promise.reject(AggregateError([],`All promises were rejected`)):new Promise((e,n)=>{let r=Array(t.length),i=t.length;t.forEach((t,a)=>{Promise.resolve(t).then(e,e=>{r[a]=e,--i,i===0&&n(AggregateError(r,`All promises were rejected`))})})})},er=(e,t)=>e.then(e=>Promise.resolve(t()).then(()=>e),e=>Promise.resolve(t()).then(()=>{throw e})),tr=e=>{try{return Promise.resolve(e())}catch(e){return Promise.reject(e)}},nr=()=>{let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},{NativeAbortSignal:rr,NativeAbortController:ir}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function ar(e){let t;try{t=new Event(`abort`)}catch{typeof document<`u`?document.createEvent?(t=document.createEvent(`Event`),t.initEvent(`abort`,!1,!1)):(t=document.createEventObject(),t.type=`abort`):t={type:`abort`,bubbles:!1,cancelable:!1}}return t.reason=e,t}function or(e){if(e===void 0)if(typeof document>`u`)e=Error(`This operation was aborted`),e.name=`AbortError`;else try{e=new DOMException(`signal is aborted without reason`),Object.defineProperty(e,"name",{value:`AbortError`})}catch{e=Error(`This operation was aborted`),e.name=`AbortError`}return e}class sr{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}removeEventListener(e,t){if(!(e in this.listeners))return;let n=this.listeners[e];for(let e=0,r=n.length;e<r;e++)if(n[e].callback===t){n.splice(e,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let n=0,r=t.length;n<r;n++){let r=t[n];try{r.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}r.options&&r.options.once&&this.removeEventListener(e.type,r.callback)}return!e.defaultPrevented}}class cr extends sr{constructor(){super(),this.listeners||sr.call(this),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}toString(){return`[object AbortSignal]`}dispatchEvent(e){e.type===`abort`&&(this.aborted=!0,typeof this.onabort==`function`&&this.onabort.call(this,e)),super.dispatchEvent(e)}throwIfAborted(){let{aborted:e,reason:t=`Aborted`}=this;if(e)throw t}static timeout(e){let t=new Z;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new Z;function n(){t.abort(this.reason),r()}function r(){for(let t of e)t.removeEventListener(`abort`,n)}for(let r of e)if(r.aborted){t.abort(r.reason);break}else r.addEventListener(`abort`,n);return t.signal}}class Z{constructor(){Object.defineProperty(this,"signal",{value:new cr,writable:!0,configurable:!0})}abort(e){let t=or(e),n=ar(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(Z.prototype[Symbol.toStringTag]=`AbortController`,cr.prototype[Symbol.toStringTag]=`AbortSignal`);function lr(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log(`__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill`),!0):typeof e.Request==`function`&&!e.Request.prototype.hasOwnProperty(`signal`)||!e.AbortController}function ur(e){typeof e==`function`&&(e={fetch:e});let{fetch:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!lr({fetch:t,Request:n,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:t,Request:a};let a=n;(a&&!a.prototype.hasOwnProperty(`signal`)||i)&&(a=function(e,t){let r;t&&t.signal&&(r=t.signal,delete t.signal);let i=new n(e,t);return r&&Object.defineProperty(i,"signal",{writable:!1,enumerable:!1,configurable:!0,value:r}),i},a.prototype=n.prototype);let o=t;return{fetch:(e,t)=>{let n=a&&a.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){let r;try{r=new DOMException(`Aborted`,`AbortError`)}catch{r=Error(`Aborted`),r.name=`AbortError`}if(n.aborted)return Promise.reject(r);let i=new Promise((e,t)=>{n.addEventListener(`abort`,()=>t(r),{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,o(e,t)])}return o(e,t)},Request:a}}var Q=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,$=`fetch`in Q&&lr({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}),dr=$?ur({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}):void 0,fr=$?dr.fetch:Q.fetch,pr=$?dr.Request:Q.Request,mr=$?Z:Q.AbortController,hr=$?cr:Q.AbortSignal,gr=(e,t)=>{let n=e.length,r=t>=0?t:n+t;if(r<0||r>=n)return;let i=e.charCodeAt(r);if(i>=55296&&i<=56319&&r+1<n){let t=e.charCodeAt(r+1);if(t>=56320&&t<=57343)return e[r]+e[r+1]}return e[r]};function*_r(e,t){let n=t.flags.includes(`g`)?t.flags:t.flags+`g`,r=new RegExp(t.source,n),i;for(;(i=r.exec(e))!==null;)yield i,i[0].length===0&&r.lastIndex++}var vr=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return e+n.repeat(Math.ceil(r/n.length)).slice(0,r)},yr=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return n.repeat(Math.ceil(r/n.length)).slice(0,r)+e},br=(e,t,n)=>{if(typeof t==`string`){if(typeof n==`string`)return t===``?n+e.split(``).join(n)+n:e.split(t).join(n);let r=[],i=0,a=e.indexOf(t,i);for(;a!==-1;)r.push(e.slice(i,a)),r.push(n(t,a,e)),i=a+t.length,a=e.indexOf(t,i);return r.push(e.slice(i)),r.join(``)}let r=t.flags.includes(`g`)?t.flags:t.flags+`g`,i=new RegExp(t.source,r);return e.replace(i,n)},xr=e=>e.replace(/^\s+/,``),Sr=e=>e.replace(/\s+$/,``),Cr=xr,wr=Sr,Tr=(e,t)=>typeof e==`string`?gr(e,t):In(e,t),Er=(e,t={})=>{let n=t.timeout||1,r=performance.now();return Q.setTimeout(()=>{e({get didTimeout(){return t.timeout?!1:performance.now()-r-1>n},timeRemaining(){return Math.max(0,1+(performance.now()-r))}})},1)},Dr=e=>Q.clearTimeout(e),Or=e=>typeof e==`function`&&e?.toString().endsWith(`{ [native code] }`),kr=!Or(Q.requestIdleCallback)||!Or(Q.cancelIdleCallback),Ar=kr?Er:Q.requestIdleCallback,jr=kr?Dr:Q.cancelIdleCallback,Mr=(e,t,n)=>typeof e==`string`?e.includes(t,n):Vn(e,t,n),Nr=(e,t,n)=>{if(typeof e.canParse==`function`)return e.canParse(t,n);try{return new e(t,n),!0}catch{return!1}};;return{se,Ye,Xe,Je,Nr,ct,tt,rt,bt,Ft,Xt,xr,wr,Cr,Sr,br,yr,vr,_r,gr,Lt,zt,Pe,Oe,Ar,ke,nr,tr,er,$n,Qn,Nt,Mt,Vt,dt,Zn,Xn,Jn,qn,de,O,b,st,jt,kt,pn,Ut,T,w,Ge,B,V,Wt,We,Ue,ue,Yt,lt,qt,Mr,Kn,E,$e,Qt,Ae,D,Jt,Kt,Zt,Ke,Ne,ft,W,Et,St,et,fr,vn,Ve,nt,_t,Ee,On,ot,H,it,Ht,ne,jr,mt,Tr,Qe,oe,ce,ae,y,le,Gn,Wn,Un,Hn,Vn,Bn,zn,Rn,Ln,In,Ze,je,Me,ge,Mn,He,U,dn,_,cn,he,pt,v,C,pr,at,S,Fn,ie,_n,gn,Dn,q,ln,un,X,G,jn,Y,hr,mr};}();var{se:_oxcModjo55a3_se,Ye:_oxcModjo55a3_Ye,Xe:_oxcModjo55a3_Xe,Je:_oxcModjo55a3_Je,Nr:_oxcModjo55a3_Nr,ct:_oxcModjo55a3_ct,tt:_oxcModjo55a3_tt,rt:_oxcModjo55a3_rt,bt:_oxcModjo55a3_bt,Ft:_oxcModjo55a3_Ft,Xt:_oxcModjo55a3_Xt,xr:_oxcModjo55a3_xr,wr:_oxcModjo55a3_wr,Cr:_oxcModjo55a3_Cr,Sr:_oxcModjo55a3_Sr,br:_oxcModjo55a3_br,yr:_oxcModjo55a3_yr,vr:_oxcModjo55a3_vr,_r:_oxcModjo55a3__r,gr:_oxcModjo55a3_gr,Lt:_oxcModjo55a3_Lt,zt:_oxcModjo55a3_zt,Pe:_oxcModjo55a3_Pe,Oe:_oxcModjo55a3_Oe,Ar:_oxcModjo55a3_Ar,ke:_oxcModjo55a3_ke,nr:_oxcModjo55a3_nr,tr:_oxcModjo55a3_tr,er:_oxcModjo55a3_er,$n:_oxcModjo55a3_$n,Qn:_oxcModjo55a3_Qn,Nt:_oxcModjo55a3_Nt,Mt:_oxcModjo55a3_Mt,Vt:_oxcModjo55a3_Vt,dt:_oxcModjo55a3_dt,Zn:_oxcModjo55a3_Zn,Xn:_oxcModjo55a3_Xn,Jn:_oxcModjo55a3_Jn,qn:_oxcModjo55a3_qn,de:_oxcModjo55a3_de,O:_oxcModjo55a3_O,b:_oxcModjo55a3_b,st:_oxcModjo55a3_st,jt:_oxcModjo55a3_jt,kt:_oxcModjo55a3_kt,pn:_oxcModjo55a3_pn,Ut:_oxcModjo55a3_Ut,T:_oxcModjo55a3_T,w:_oxcModjo55a3_w,Ge:_oxcModjo55a3_Ge,B:_oxcModjo55a3_B,V:_oxcModjo55a3_V,Wt:_oxcModjo55a3_Wt,We:_oxcModjo55a3_We,Ue:_oxcModjo55a3_Ue,ue:_oxcModjo55a3_ue,Yt:_oxcModjo55a3_Yt,lt:_oxcModjo55a3_lt,qt:_oxcModjo55a3_qt,Mr:_oxcModjo55a3_Mr,Kn:_oxcModjo55a3_Kn,E:_oxcModjo55a3_E,$e:_oxcModjo55a3_$e,Qt:_oxcModjo55a3_Qt,Ae:_oxcModjo55a3_Ae,D:_oxcModjo55a3_D,Jt:_oxcModjo55a3_Jt,Kt:_oxcModjo55a3_Kt,Zt:_oxcModjo55a3_Zt,Ke:_oxcModjo55a3_Ke,Ne:_oxcModjo55a3_Ne,ft:_oxcModjo55a3_ft,W:_oxcModjo55a3_W,Et:_oxcModjo55a3_Et,St:_oxcModjo55a3_St,et:_oxcModjo55a3_et,fr:_oxcModjo55a3_fr,vn:_oxcModjo55a3_vn,Ve:_oxcModjo55a3_Ve,nt:_oxcModjo55a3_nt,_t:_oxcModjo55a3__t,Ee:_oxcModjo55a3_Ee,On:_oxcModjo55a3_On,ot:_oxcModjo55a3_ot,H:_oxcModjo55a3_H,it:_oxcModjo55a3_it,Ht:_oxcModjo55a3_Ht,ne:_oxcModjo55a3_ne,jr:_oxcModjo55a3_jr,mt:_oxcModjo55a3_mt,Tr:_oxcModjo55a3_Tr,Qe:_oxcModjo55a3_Qe,oe:_oxcModjo55a3_oe,ce:_oxcModjo55a3_ce,ae:_oxcModjo55a3_ae,y:_oxcModjo55a3_y,le:_oxcModjo55a3_le,Gn:_oxcModjo55a3_Gn,Wn:_oxcModjo55a3_Wn,Un:_oxcModjo55a3_Un,Hn:_oxcModjo55a3_Hn,Vn:_oxcModjo55a3_Vn,Bn:_oxcModjo55a3_Bn,zn:_oxcModjo55a3_zn,Rn:_oxcModjo55a3_Rn,Ln:_oxcModjo55a3_Ln,In:_oxcModjo55a3_In,Ze:_oxcModjo55a3_Ze,je:_oxcModjo55a3_je,Me:_oxcModjo55a3_Me,ge:_oxcModjo55a3_ge,Mn:_oxcModjo55a3_Mn,He:_oxcModjo55a3_He,U:_oxcModjo55a3_U,dn:_oxcModjo55a3_dn,_:_oxcModjo55a3__,cn:_oxcModjo55a3_cn,he:_oxcModjo55a3_he,pt:_oxcModjo55a3_pt,v:_oxcModjo55a3_v,C:_oxcModjo55a3_C,pr:_oxcModjo55a3_pr,at:_oxcModjo55a3_at,S:_oxcModjo55a3_S,Fn:_oxcModjo55a3_Fn,ie:_oxcModjo55a3_ie,_n:_oxcModjo55a3__n,gn:_oxcModjo55a3_gn,Dn:_oxcModjo55a3_Dn,q:_oxcModjo55a3_q,ln:_oxcModjo55a3_ln,un:_oxcModjo55a3_un,X:_oxcModjo55a3_X,G:_oxcModjo55a3_G,jn:_oxcModjo55a3_jn,Y:_oxcModjo55a3_Y,hr:_oxcModjo55a3_hr,mr:_oxcModjo55a3_mr}=_oxcModjo55a3;export{_oxcModjo55a3_se as withoutNullable,_oxcModjo55a3_Ye as videoSizeToQuality,_oxcModjo55a3_Xe as videoQualityToHeight,_oxcModjo55a3_Je as videoHeightToQuality,_oxcModjo55a3_Nr as urlCanParsePolyfilled,_oxcModjo55a3_ct as timeout,_oxcModjo55a3_tt as timeCodeToString,_oxcModjo55a3_rt as throttleFn,_oxcModjo55a3_bt as throttle,_oxcModjo55a3_Ft as tap,_oxcModjo55a3_Xt as suppressAbort,_oxcModjo55a3_xr as stringTrimStart,_oxcModjo55a3_wr as stringTrimRight,_oxcModjo55a3_Cr as stringTrimLeft,_oxcModjo55a3_Sr as stringTrimEnd,_oxcModjo55a3_br as stringReplaceAll,_oxcModjo55a3_yr as stringPadStart,_oxcModjo55a3_vr as stringPadEnd,_oxcModjo55a3__r as stringMatchAll,_oxcModjo55a3_gr as stringAt,_oxcModjo55a3_Lt as skip,_oxcModjo55a3_zt as shareReplay,_oxcModjo55a3_Pe as safeStorage,_oxcModjo55a3_Oe as retainTimers,_oxcModjo55a3_Ar as requestIdleCallbackPolyfilled,_oxcModjo55a3_ke as releaseTimers,_oxcModjo55a3_nr as promiseWithResolvers,_oxcModjo55a3_tr as promiseTry,_oxcModjo55a3_er as promiseFinally,_oxcModjo55a3_$n as promiseAny,_oxcModjo55a3_Qn as promiseAllSettled,_oxcModjo55a3_Nt as pairwise,_oxcModjo55a3_Mt as once,_oxcModjo55a3_Vt as observeElementSize,_oxcModjo55a3_dt as observableFrom,_oxcModjo55a3_Zn as objectValues,_oxcModjo55a3_Xn as objectHasOwn,_oxcModjo55a3_Jn as objectFromEntries,_oxcModjo55a3_qn as objectEntries,_oxcModjo55a3_de as nowInt,_oxcModjo55a3_O as now,_oxcModjo55a3_b as noop,_oxcModjo55a3_st as merge,_oxcModjo55a3_jt as mapTo,_oxcModjo55a3_kt as map,_oxcModjo55a3_pn as loadVKLangPack,_oxcModjo55a3_Ut as isValidURL,_oxcModjo55a3_T as isNullable,_oxcModjo55a3_w as isNonNullable,_oxcModjo55a3_Ge as isLowerOrEqual,_oxcModjo55a3_B as isLower,_oxcModjo55a3_V as isInvariantQuality,_oxcModjo55a3_Wt as isIntersecting,_oxcModjo55a3_We as isHigherOrEqual,_oxcModjo55a3_Ue as isHigher,_oxcModjo55a3_ue as isBrowserWindow,_oxcModjo55a3_Yt as isAbortError,_oxcModjo55a3_lt as interval,_oxcModjo55a3_qt as interpolate,_oxcModjo55a3_Mr as includesPolyfilled,_oxcModjo55a3_Kn as globalThisPolyfill,_oxcModjo55a3_E as getWindow,_oxcModjo55a3_$e as getVideoQualityLabel,_oxcModjo55a3_Qt as getTraceSubscriptionMethod,_oxcModjo55a3_Ae as getTimersDiagnostics,_oxcModjo55a3_D as getTimerWindow,_oxcModjo55a3_Jt as getRangeAroundIndex,_oxcModjo55a3_Kt as getPlayerId,_oxcModjo55a3_Zt as getMessageFromError,_oxcModjo55a3_Ke as getHighestQuality,_oxcModjo55a3_Ne as getExponentialDelay,_oxcModjo55a3_ft as fromEvent,_oxcModjo55a3_W as flattenObject,_oxcModjo55a3_Et as filterChanged,_oxcModjo55a3_St as filter,_oxcModjo55a3_et as fillWithDefault,_oxcModjo55a3_fr as fetchPolyfilled,_oxcModjo55a3_vn as devNull,_oxcModjo55a3_Ve as detectEmbed,_oxcModjo55a3_nt as debounceFn,_oxcModjo55a3__t as debounce,_oxcModjo55a3_Ee as createTimers,_oxcModjo55a3_On as createDIContainer,_oxcModjo55a3_ot as combine,_oxcModjo55a3_H as cloneDeepWith,_oxcModjo55a3_it as cloneDeep,_oxcModjo55a3_Ht as clearVideoElement,_oxcModjo55a3_ne as checkNever,_oxcModjo55a3_jr as cancelIdleCallbackPolyfilled,_oxcModjo55a3_mt as buffer,_oxcModjo55a3_Tr as atPolyfilled,_oxcModjo55a3_Qe as assertQualityIsExact,_oxcModjo55a3_oe as assertNullable,_oxcModjo55a3_ce as assertNotEmptyArray,_oxcModjo55a3_ae as assertNonNullable,_oxcModjo55a3_y as assertNever,_oxcModjo55a3_le as assertEmptyArray,_oxcModjo55a3_Gn as arrayWith,_oxcModjo55a3_Wn as arrayToSpliced,_oxcModjo55a3_Un as arrayToSorted,_oxcModjo55a3_Hn as arrayToReversed,_oxcModjo55a3_Vn as arrayIncludes,_oxcModjo55a3_Bn as arrayFlatMap,_oxcModjo55a3_zn as arrayFlat,_oxcModjo55a3_Rn as arrayFindLastIndex,_oxcModjo55a3_Ln as arrayFindLast,_oxcModjo55a3_In as arrayAt,_oxcModjo55a3_Ze as areQualitiesExact,_oxcModjo55a3_je as addScript,_oxcModjo55a3_Me as abortable,_oxcModjo55a3_ge as WorkerState,_oxcModjo55a3_Mn as VolumeFaderPlugin,_oxcModjo55a3_He as VideoQuality,_oxcModjo55a3_U as ValueSubject,_oxcModjo55a3_dn as VKNumericLanguage,_oxcModjo55a3__ as VERSION,_oxcModjo55a3_cn as TracerFactory,_oxcModjo55a3_he as TimerModule,_oxcModjo55a3_pt as SubscriptionRemovable,_oxcModjo55a3_v as Subscription,_oxcModjo55a3_C as Subject,_oxcModjo55a3_pr as RequestPolyfilled,_oxcModjo55a3_at as ReplaySubject,_oxcModjo55a3_S as Observable,_oxcModjo55a3_Fn as NormalizerPlugin,_oxcModjo55a3_ie as Logger,_oxcModjo55a3__n as InternalsExposure,_oxcModjo55a3_gn as InterfaceLanguage,_oxcModjo55a3_Dn as InjectionToken,_oxcModjo55a3_q as INTERNAL_EXPOSE_GLOBAL_KEY,_oxcModjo55a3_ln as ErrorOrigin,_oxcModjo55a3_un as ErrorCategory,_oxcModjo55a3_X as EqualizerPlugin,_oxcModjo55a3_G as CircularBuffer,_oxcModjo55a3_jn as AudioGraph,_oxcModjo55a3_Y as AppTracer,_oxcModjo55a3_hr as AbortSignalPolyfilled,_oxcModjo55a3_mr as AbortControllerPolyfilled};
|
|
6
|
+
var _oxcModek9n7c=function(){function e(t){"@babel/helpers - typeof";return e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},e(t)}var t=e;function n(e,n){if(t(e)!=`object`||!e)return e;var r=e[Symbol._oxc_toPrimitive];if(r!==void 0){var i=r.call(e,n||`default`);if(t(i)!=`object`)return i;throw TypeError(`@@_oxc_toPrimitive must return a primitive value.`)}return(n===`string`?String:Number)(e)}var t=e,r=n;function i(e){var n=r(e,`string`);return t(n)==`symbol`?n:n+``}var a=i;function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=o;function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?c(Object(n),!0).forEach(function(t){s(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function u(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){n(e);return}s.done?t(c):Promise.resolve(c).then(r,i)}function d(e){return function(){var t=this,n=arguments;return new Promise(function(r,i){var a=e.apply(t,n);function o(e){u(a,r,i,o,s,`next`,e)}function s(e){u(a,r,i,o,s,`throw`,e)}o(void 0)})}}var f=l,p=d;let m;var h=Object.defineProperty,ee=e=>e;function g(e,t){this[e]=ee.bind(null,t)}var _=(e,t)=>{for(var n in t)h(e,n,{get:t[n],enumerable:!0,configurable:!0,set:g.bind(t,n)})},v=`1.0.100-dev.cb6e2e206.0`;class y{constructor(){this.subscriptions=[]}unsubscribe(){let e=this.subscriptions;this.subscriptions=[],e.forEach(e=>{typeof e==`function`?e():e.unsubscribe()})}add(e){return this.subscriptions.push(e),this}}var b=e=>{throw Error(`${e} is value of unexpected type`)},te=e=>{},x=()=>{},ne=e=>{throw console.error(e),e},S=e=>{console.error(e)};class C{constructor(e){this.suppressErrors=!1,e&&(this._subscribe=e)}setSuppressErrors(e){this.suppressErrors=e}subscribe(e,t){let n=this.suppressErrors?S:ne,r;r=t?typeof t==`function`?{next:t,error:x}:{next:e=>t.next(e),error:e=>t.error?.call(t,e)}:{next:n,error:x};let i=typeof e==`function`?{next:t=>{try{let n=e(t);n instanceof Promise&&n.catch(e=>r.next(e))}catch(e){r.next(e)}},error:e=>r.next(e)}:{next:t=>e.next(t),error:t=>e.error?e.error(t):r.next(t)},a;try{a=this._subscribe(i)}catch(e){i.error?.call(i,e)}return new y().add(()=>{switch(i.next=x,i.error=x,typeof a){case`function`:a();return;case`object`:a.unsubscribe();return;case`undefined`:return;default:return b(a)}})}pipe(...e){return e.reduce((e,t)=>t(e),this)}_subscribe(e){}}class w extends C{constructor(){super(),this.keyCounter=0,this.subscribers=new Map}next(e){this.subscribers.forEach(t=>t.next(e))}error(e){this.subscribers.forEach(t=>t.error?.call(t,e))}_subscribe(e){let t=this.keyCounter++;return this.subscribers.set(t,e),new y().add(()=>this.subscribers.delete(t))}}class re{constructor(){this.log$=new w,this.logs=[],this.log=e=>{let t=f(f({},e),{},{timestamp:Date.now()});this.logs.push(t),this.log$.next(t)},this.getAllLogs=()=>this.logs}createCustomLog(e){return(...t)=>{let n;try{n=e(...t)}catch{n={message:"error in `createCustomLog`",component:`Logger`}}this.log(n)}}createComponentLog(e){return this.createCustomLog(t=>f({component:e},t))}}function ie(e,t=`Assertion "value is not nullable" failed`){if(e==null)throw Error(t)}function ae(e,t=`Assertion "value is nullable" failed`){if(e!=null)throw Error(t)}function T(e){return e!=null}function E(e){return e==null}var oe=e=>Object.fromEntries(Object.entries(e).filter(([e,t])=>T(t)));function se(e,t){if(!e?.length)throw Error(t)}function ce(e,t){if(e?.length)throw Error(t)}var D=()=>globalThis,le=(e=D())=>!!(e.window&&e.screen),ue=(e,t,n)=>new Promise((r,i)=>{t.addEventListener(`abort`,()=>{s(),l.remove()});let a=()=>{s(),i(`error`)},o=()=>{s(),r()},s=()=>{c&&clearTimeout(c),l.removeEventListener(`load`,o),l.removeEventListener(`error`,a)},c;n&&(c=D().setTimeout(()=>{s(),i(`timeout`)},n));let l=document.createElement(`script`);l.addEventListener(`load`,o),l.addEventListener(`error`,a),l.src=e,document.head.appendChild(l)}),de=typeof D().performance?.now==`function`?()=>D().performance.now():()=>Date.now(),fe=()=>Math.trunc(de()),pe=(e,t)=>p(function*(...n){let r=t(...n),i=e.aborted,a;for(;!i&&!e.aborted;)try{let e=yield r.next(a);i=e.done??!1,a=e.value}catch(e){yield r.throw(e)}return a}),me=(e,{start:t=0,factor:n=2,max:r=1/0,min:i=t,random:a=0}={})=>{let o=t;return o*=n**+e,o*=1+(Math.random()*a*2-a),o=Math.round(o),o=Math.min(o,r),o=Math.max(o,i),o},he={};_(he,{set:()=>ve,remove:()=>be,isPersistent:()=>ge,has:()=>ye,get:()=>_e,clear:()=>xe});var O,k,A=`vk-videoplayer-dummy-key-${Math.random()}`,j=()=>{if(k!==void 0)return k;try{localStorage.setItem(A,`test`),localStorage.removeItem(A),k=0}catch(e){if(e instanceof DOMException||e instanceof TypeError)try{sessionStorage.getItem(A),k=1}catch(e){if(e instanceof DOMException||e instanceof TypeError)k=2;else throw e}else throw e}return k===2&&(O=new Map),k},ge=()=>j()===0,_e=e=>{let t=j();switch(t){case 0:return localStorage.getItem(e)??void 0;case 1:return sessionStorage.getItem(e)??void 0;case 2:return O?.get(e);default:b(t)}},ve=(e,t)=>{let n=j();switch(n){case 0:try{localStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 1:try{sessionStorage.setItem(e,t)}catch(e){if(e instanceof DOMException)console.error(e);else throw e}break;case 2:O?.set(e,t);return;default:b(n)}},ye=e=>{let t=j();switch(t){case 0:return e in localStorage;case 1:return e in sessionStorage;case 2:return O?.has(e)??!1;default:return b(t),!1}},be=e=>{let t=j();switch(t){case 0:return localStorage.removeItem(e);case 1:return sessionStorage.removeItem(e);case 2:O?.delete(e);return;default:b(t)}},xe=()=>{let e=j();switch(e){case 0:return localStorage.clear();case 1:return sessionStorage.clear();case 2:return O?.clear();default:b(e)}},Se=()=>{let e,t=[],n=D();try{e=n.self!==n.top}catch(t){t instanceof DOMException&&t.name===`SecurityError`?e=!0:(e=!1,console.error(t))}try{n.location?.ancestorOrigins&&(t=[...n.location.ancestorOrigins])}catch(e){console.error(e)}try{!t.length&&n.document.referrer&&(t=[new URL(n.document.referrer).origin])}catch(e){console.error(e)}return t=t.filter(e=>URL.canParse(e)),{isEmbed:e,origins:t,topOrigin:t.at(-1),immediateOrigin:t.at(0)}},Ce;(e=>{e.INVARIANT=`Invariant quality`,e.Q_144P=`144p`,e.Q_240P=`240p`,e.Q_360P=`360p`,e.Q_480P=`480p`,e.Q_576P=`576p`,e.Q_720P=`720p`,e.Q_1080P=`1080p`,e.Q_1440P=`1440p`,e.Q_2160P=`2160p`,e.Q_4320P=`4320p`})(Ce||={});var M={"144p":{width:256,height:144},"240p":{width:428,height:240},"360p":{width:640,height:360},"480p":{width:856,height:480},"576p":{width:1024,height:576},"720p":{width:1280,height:720},"1080p":{width:1920,height:1080},"1440p":{width:2560,height:1440},"2160p":{width:3840,height:2160},"4320p":{width:7680,height:4320}},we=(e,t)=>M[e].height>M[t].height,Te=(e,t)=>M[e].height>=M[t].height,N=(e,t)=>M[e].height<M[t].height,Ee=(e,t)=>M[e].height<=M[t].height,De=e=>e.sort((e,t)=>e===t?0:e===`Invariant quality`?1:t===`Invariant quality`?-1:N(e,t)?1:-1)[0],Oe=Object.keys(M).sort((e,t)=>N(e,t)?-1:1),ke=(e,t=.02)=>[...Oe].find(n=>M[n].height*(1+t)>=e),Ae=({width:e,height:t})=>{let n=Math.min(e,t),r=Math.max(e,t);return Oe.find(e=>{let t=M[e];return t.width>=r&&t.height>=n})},je=e=>M[e].height,P=e=>e===`Invariant quality`,Me=e=>e.every(e=>!P(e));function Ne(e){if(P(e))throw Error(`Expected exact quality`)}var Pe=e=>{switch(e){case`4320p`:return`8K`;case`2160p`:return`4K`;case`1440p`:return`QHD`;case`1080p`:return`FHD`;case`720p`:return`HD`;default:return``}},F=(e,t)=>{let n={};for(let r of Object.keys(t)){let i=t[r],a=e[r];Array.isArray(i)?n[r]=Array.isArray(a)?a:i:typeof i==`object`&&i?typeof a==`object`&&a&&!Array.isArray(a)?n[r]=F(a,i):n[r]=a??i:n[r]=r in e?a:i}return n},Fe=e=>{let t=``;return e>=3600&&(t+=Math.floor(e/3600)+`h`,e%=3600),e>=60&&(t+=Math.floor(e/60)+`m`,e%=60),e>0&&(t+=Math.floor(e)+`s`),t};function Ie(e,t=0,n){let r,i,a,o,s,c,l=0,u=!1,d=!1,f=!0,p=!t&&t!==0&&typeof D().requestAnimationFrame==`function`;n&&(u=!!n.leading,d=`maxWait`in n,a=n?.maxWait?Math.max(+n?.maxWait||0,t):a,f=`trailing`in n?!!n.trailing:f);function m(t){let n=r,a=i;return r=i=void 0,l=t,o=e.apply(a,n),o}function h(e,t){return p?(s&&D().cancelAnimationFrame(s),D().requestAnimationFrame(e)):setTimeout(e,t)}function ee(e){if(p){D().cancelAnimationFrame(e);return}clearTimeout(e)}function g(e){return l=e,s=h(y,t),u?m(e):o}function _(e){let n=e-c,r=e-l,i=t-n;return d?Math.min(i,a-r):i}function v(e){let n=e-c,r=e-l;return c===void 0||n>=t||n<0||d&&r>=a}function y(){let e=Date.now();if(v(e))return b(e);s=h(y,_(e))}function b(e){return s=void 0,f&&r?m(e):(r=i=void 0,o)}function te(){s!==void 0&&ee(s),l=0,r=c=i=s=void 0}function x(){return s===void 0?o:b(Date.now())}function ne(){return s!==void 0}function S(...e){let n=Date.now(),a=v(n);if(r=e,i=this,c=n,a){if(s===void 0)return g(c);if(d)return s=h(y,t),m(c)}return s===void 0&&(s=h(y,t)),o}return S.cancel=te,S.flush=x,S.pending=ne,S}var Le=(e,t=0,n)=>Ie(e,t,f(f(f({},{leading:!0,trailing:!0}),n),{},{maxWait:t})),I=(e,t)=>{if(typeof e!=`object`||!e)return e;let n=Array.isArray(e)?[]:{};for(let r in e){if(typeof t==`function`){let i=t(e[r],r,e,n);if(i!==void 0){n[r]=i;continue}}typeof e[r]==`object`?n[r]=I(e[r],t):n[r]=e[r]}return n},Re=e=>I(e);class ze extends w{constructor(e){super(),this.bufferSize=void 0,this.buffer=[],this.cursorEnd=-1,this.cursorStart=0,this.bufferSize=e,this.buffer=Array(e)}next(e){this.cursorEnd+=1,this.cursorStart=this.cursorEnd>=this.bufferSize?this.cursorStart+1:0,this.buffer[this.cursorEnd%this.bufferSize]=e,this.subscribers.forEach(t=>t.next(e))}_subscribe(e){for(let t=this.cursorStart;t<=this.cursorEnd;t++)e.next(this.buffer[t%this.bufferSize]);let t=this.keyCounter++;return this.subscribers.set(t,e),new y().add(()=>this.subscribers.delete(t))}}class L extends w{constructor(e){super(),this.value=void 0,this.value=e}next(e){super.next(this.value=e)}error(e){super.error(this.value=e)}getValue(){return this.value}_subscribe(e){let t=super._subscribe(e);return e.next(this.value),t}}function Be(e){return new C(t=>{let n={},r=Object.keys(e).length,i=e=>i=>{e in n||r--,n[e]=i,r===0&&t.next(n)};return Object.entries(e).reduce((e,[t,n])=>e.add(n.subscribe(i(t))),new y)})}function Ve(...e){return new C(t=>e.reduce((e,n)=>e.add(n.subscribe(t)),new y))}var He=e=>new C(t=>{let n=D().setTimeout(()=>{try{t.next()}catch(e){if(t.error)t.error(e);else throw e}},e);return()=>D().clearTimeout(n)}),Ue=e=>new C(t=>{let n=D(),r=n.setInterval(()=>t.next(),e);return()=>{r&&=(n.clearInterval(r),void 0)}});function We(e){return new C(t=>{if(e instanceof Promise){let n=!1;return e.then(e=>{n||t.next(e)}).catch(e=>{n||t.error?.call(t,e)}),()=>{n=!0}}for(let n=0;n<e.length;n++)t.next(e[n])})}var Ge=We,Ke=(e,t)=>new C(n=>{let r=e=>n.next(e);return e.addEventListener(t,r),()=>e.removeEventListener(t,r)});class qe extends y{remove(e){this.subscriptions=this.subscriptions.filter(t=>t!==e)}}function Je(e){return t=>new C(n=>t.subscribe(new Ye(n,e)))}class Ye{constructor(e,t){this.destination=void 0,this.size=void 0,this.lastValues=[],this.destination=e,this.size=t}next(e){this.lastValues.length===this.size&&this.lastValues.shift(),this.lastValues.push(e),this.destination.next(this.lastValues)}error(e){var t;(t=this.destination).error?.call(t,e)}}var Xe={leading:!1,trailing:!0};function Ze(e,t=Xe){return n=>new C(r=>n.subscribe(new Qe(r,e,t)))}class Qe{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e;let t=D();T(this.timeout)?t.clearTimeout(this.timeout):this.config.leading&&this.destination.next(e),this.timeout=t.setTimeout(()=>{if(this.config.trailing)try{this.destination.next(this.lastValue)}catch(e){if(this.destination.error)this.destination.error(e);else throw e}this.timeout=void 0},this.time)}error(e){var t;(t=this.destination).error?.call(t,e)}}var $e={leading:!0,trailing:!1};function et(e,t=$e){return n=>new C(r=>n.subscribe(new tt(r,e,t)))}class tt{constructor(e,t,n){this.destination=void 0,this.time=void 0,this.config=void 0,this.lastValue=void 0,this.timeout=void 0,this.destination=e,this.time=t,this.config=n}next(e){this.lastValue=e,E(this.timeout)&&(this.config.leading&&this.destination.next(e),this.timeout=D().setTimeout(()=>{this.config.trailing&&this.destination.next(this.lastValue),this.timeout=void 0},this.time))}error(e){var t;(t=this.destination).error?.call(t,e)}}function nt(e){return t=>new C(n=>t.subscribe(new rt(n,e)))}class rt{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.destination=e,this.predicate=t}next(e){let t;try{t=this.predicate(e)}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}var it=(e,t)=>{let n=(e,t)=>{let n=Object.keys(e);for(let r in t)if(!n.includes(r)||t[r]!==e[r])return!1;return!0};return n(e,t)&&n(t,e)},at=(e,t)=>e instanceof Object&&t instanceof Object?it(e,t):e===t;function ot(e=at){return t=>new C(n=>t.subscribe(new st(n,e)))}var R={};class st{constructor(e,t){this.destination=void 0,this.predicate=void 0,this.lastValue=R,this.destination=e,this.predicate=t}next(e){let t;try{t=this.lastValue===R||!this.predicate(this.lastValue,e),this.lastValue=e instanceof Object&&!Array.isArray(e)?f({},e):e}catch(e){throw this.error(e),e}t&&this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function z(e){return t=>new C(n=>t.subscribe(new ct(n,e)))}class ct{constructor(e,t){this.destination=void 0,this.mapper=void 0,this.destination=e,this.mapper=t}next(e){let t;try{t=this.mapper(e)}catch(e){throw this.error(e),e}this.destination.next(t)}error(e){var t;(t=this.destination).error?.call(t,e)}}function lt(e){return z(()=>e)}function ut(){return e=>new C(t=>{let n=!1,r=!1,i=e.subscribe(e=>{n||(n=!0,t.next(e)),r&&i.unsubscribe()},e=>{n=!0,t.error?.call(t,e),r&&i.unsubscribe()});return r=!0,n&&i.unsubscribe(),i})}function dt(){return e=>new C(t=>e.subscribe(new ft(t)))}class ft{constructor(e){this.destination=void 0,this.last=void 0,this.hasLast=!1,this.destination=e}next(e){let t=this.last;if(this.last=e,!this.hasLast){this.hasLast=!0;return}this.destination.next([t,e])}error(e){var t;(t=this.destination).error?.call(t,e)}}function pt(e){return t=>new C(n=>t.subscribe(new mt(n,e)))}class mt{constructor(e,t){this.destination=void 0,this.effect=void 0,this.destination=e,this.effect=t}next(e){try{this.effect(e)}catch(e){throw this.error(e),e}this.destination.next(e)}error(e){var t;(t=this.destination).error?.call(t,e)}}function ht(e){return t=>new C(n=>t.subscribe(new gt(n,e)))}class gt{constructor(e,t){if(this.destination=void 0,this.count=void 0,this.destination=e,this.count=t,t<0){var n;(n=this.destination).error?.call(n,Error(`Count can not be less than zero`))}}next(e){this.count===0?this.destination.next(e):this.count--}error(e){var t;(t=this.destination).error?.call(t,e)}}function _t(e=0){return t=>{let n=0,r=new ze(e),i=t.subscribe(r),a=e=>()=>{e.unsubscribe(),n--,n===0&&i.unsubscribe()};return new C(e=>(n++,a(r.subscribe(e))))}}var vt=300,yt=(e,t=vt)=>new C(n=>{let r=D(),{width:i,height:a}=e.getBoundingClientRect();if(n.next({width:i,height:a}),!le(r))return;let o=new r.ResizeObserver(Le(e=>{let t=e[0];if(!t)return;let r,i;t.contentBoxSize&&t.contentBoxSize[0]?(i=t.contentBoxSize[0].blockSize,r=t.contentBoxSize[0].inlineSize):t.contentRect&&(r=t.contentRect.width,i=t.contentRect.height),T(r)&&T(i)&&n.next({width:r,height:i})},t));return o.observe(e),()=>o.disconnect()}),B=(e,t=6,n=`.`)=>{let r={};for(let i in e)if(!(!e.hasOwnProperty(i)||e[i]instanceof HTMLElement||!t))if(typeof e[i]==`object`&&e[i]!==null){let a=B(e[i],t-1);for(let e in a)a.hasOwnProperty(e)&&(r[i+n+e]=a[e])}else r[i]=e[i];return r},bt=(e,t=!1)=>{t&&(e.innerHTML=``),e.removeAttribute(`src`),e.load()},xt=e=>{let t;try{t=new URL(e)}catch{return!1}return t.protocol===`https:`},St=(e,t)=>!(e.right<t.left||e.left>t.right||e.bottom<t.top||e.top>t.bottom),Ct=(()=>{let e=0;return()=>{let t=e;return e=(e+1)%(2**53-1),t}})(),wt=e=>e!==void 0&&e!==``?e:Ct().toString();function Tt(e,t,n){if(e<=t[0])return n[0];if(e>=t[t.length-1])return n[n.length-1];let r=1;for(;r<t.length&&t[r]<e;)r++;r>=t.length&&(r=t.length-1);let i=t[r-1],a=t[r],o=n[r-1],s=n[r];return e===i?o:e===a?s:o+(e-i)/(a-i)*(s-o)}function Et(e,t,n){if(e<=0||n<0)return[];let r=[],i=Math.floor((e-1)/2),a=Math.floor(e/2),o=t-i,s=t+a;o<0&&(s+=Math.abs(o),o=0),s>n&&(o-=s-n,s=n),o=Math.max(0,o),s=Math.min(n,s);for(let e=o;e<=s;e++)r.push(e);return r}var V=e=>e instanceof DOMException&&(e.name===`AbortError`||e.code===20),Dt=e=>{if(!V(e))throw e};function Ot(e){if(e&&typeof e==`object`){if(`message`in e)return String(e.message);try{return JSON.stringify(e)}catch{return`object serialization error`}}return String(e)}m=Symbol.iterator;class H{constructor(e){if(this.buffer=void 0,this.writeIndex=0,this.count=0,this.capacity=void 0,e<=0)throw Error(`Capacity must be greater than 0`);this.capacity=e,this.buffer=Array.from({length:e}).fill(null)}add(e){this.buffer[this.writeIndex]=e,this.writeIndex=(this.writeIndex+1)%this.capacity,this.count<this.capacity&&this.count++}*[m](){if(this.count===0)return;let e=this.count<this.capacity?0:this.writeIndex;for(let t=0;t<this.count;t++){let t=this.buffer[e];T(t)&&(yield t),e=(e+1)%this.capacity}}clear(){this.buffer.fill(null),this.writeIndex=0,this.count=0}get size(){return this.count}get maxCapacity(){return this.capacity}}var kt=e=>(t,n=!1)=>r=>{let i=typeof r==`object`;r==null||i&&!Object.keys(r).length||e(t,i?B(r):{value:r},n)},U=(e={})=>{let t=e=>{let t=e;return e===void 0?t=`undefined`:e===null?t=`null`:(typeof e==`number`||typeof e==`boolean`)&&(t=e.toString()),t},n={};for(let r in e)Array.isArray(e[r])?n[r]=e[r].map(t):n[r]=t(e[r]);return n};class W{constructor({name:e,getParentContext:t,getRootTracerContext:n,options:r}){this.dynamicImportTimeout=5e3,this.subscription=new y,this.options=void 0,this.span=void 0,this.context=void 0,this.childTracers=[],this.initPromise=void 0,this.getRootTracerContext=void 0,this.eventsBuffer=null,this.options=r??{};let{tracerEventsBufferSize:i}=this.options;T(i)&&i>0&&(this.eventsBuffer=new H(i)),W.dynamicImportStatus===`not_started`&&(W.dynamicImportPromise=this.loadOpentelemetry());let a=Date.now();this.initPromise=W.dynamicImportPromise.then(r=>{W.dynamicImportStatus===`completed`&&this.init({name:e,getParentContext:t,getRootTracerContext:n},a)})}init({name:e,getParentContext:t,getRootTracerContext:n},r){let i=n?.();if(E(i))return;let{opentelemetryApi:a}=W.dynamicImports,{context:o,trace:s}=a,{tracer:c,attributes$:l}=i;this.span=c.startSpan(e,{startTime:r},t?.()),this.context=s.setSpan(o.active(),this.span),this.getRootTracerContext=n,this.subscription.add(l.subscribe(e=>{T(e)&&this.span.setAttributes(e)}))}loadOpentelemetry(){var e=this;return p(function*(){if(W.dynamicImportStatus===`not_started`){W.dynamicImportStatus=`in_progress`;try{let t=new Promise((t,n)=>setTimeout(n,e.dynamicImportTimeout)),n=Promise.all([import(`@opentelemetry/api`),import(`@opentelemetry/sdk-trace-web`),import(`@apptracer/opentelemetry`),import(`@opentelemetry/resources`),import(`@opentelemetry/semantic-conventions`)]),[r,i,a,o,s]=yield Promise.race([n,t]);W.dynamicImports={opentelemetryApi:r,opentelemetrySdk:i,tracer:a,opentelemetryResources:o,opentelemetrySemanticConventions:s},W.dynamicImportStatus=`completed`}catch{W.dynamicImportStatus=`failed`}}})()}isComponentTracerNotInitialized(){return E(this.span)||W.dynamicImportStatus===`failed`}addEventToBuffer(e,t,n,r){T(this.eventsBuffer)&&this.eventsBuffer.add({name:e,attributes:t,type:n,timestamp:r})}addEventToSpan(e,t,n,r){this.span.addEvent(e,f(f({},U(t)),{},{type:n}),r)}log(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`log`,r)}):this.addEventToBuffer(e,t,`log`,r)}error(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`error`,r)}):this.addEventToBuffer(e,t,`error`,r)}critical(e,t,n=!1){let r=Date.now();n?this.initPromise.then(n=>{this.isComponentTracerNotInitialized()||this.addEventToSpan(e,t,`critical`,r)}):this.addEventToBuffer(e,t,`critical`,r)}createComponentTracer(e){let t=new W({name:e,getParentContext:()=>this.context,getRootTracerContext:()=>this.getRootTracerContext?.call(this),options:this.options});return this.childTracers.push(t),t}setSpanAttributes(e){this.span.setAttributes(U(e))}end(){this.initPromise.then(e=>{if(!this.isComponentTracerNotInitialized()){if(T(this.eventsBuffer))for(let e of this.eventsBuffer)this.addEventToSpan(e.name,e.attributes,e.type,e.timestamp);this.childTracers.forEach(e=>e.end()),this.span.end(),this.subscription.unsubscribe()}})}pause(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!0)}resume(){var e;(e=this.getRootTracerContext)==null||(e=e.call(this))==null||e.paused$.next(!1)}}W.dynamicImportStatus=`not_started`,W.dynamicImports=void 0,W.dynamicImportPromise=void 0;var At=`gW5EerTD5QhAnsbpF7Hd2NSMRteYIUUMjFbSyI68Pf5`,jt=e=>{class t extends e{constructor(e,t){super(e,t),this._isPaused=!1,this._pausedSpans=void 0,this.maxExportBatchSize=void 0,this.maxQueueSize=void 0,this.maxQueueSize=t?.maxQueueSize??2048,this.maxExportBatchSize=t?.maxExportBatchSize??512,this._pausedSpans=new H(this.maxQueueSize)}pause(){this._isPaused=!0}resume(){var e=()=>super.onEnd,t=this;return p(function*(){if(!t._isPaused)return;t._isPaused=!1;let n=t._pausedSpans;t._pausedSpans=new H(t.maxQueueSize);let r=0;for(let i of n)e().call(t,i),r+=1,r>=t.maxExportBatchSize&&(yield new Promise(e=>D().setTimeout(e,0)),r=0);n.clear(),yield t.forceFlush()})()}onEnd(e){if(this._isPaused){this._pausedSpans.add(e);return}super.onEnd(e)}}return t};class Mt extends W{constructor(e){super({name:`Root`,options:e}),this.attributes$=new L(null),this.paused$=new L(!1),this.paused$.next(!!this.options.tracerPausedAtInit)}init({name:e,getParentContext:t},n){let{tracer:r,opentelemetryResources:i,opentelemetrySdk:a,opentelemetrySemanticConventions:o}=W.dynamicImports,{TracerUploadSpanExporter:s}=r,{WebTracerProvider:c,BatchSpanProcessor:l}=a,{resourceFromAttributes:u}=i,{ATTR_SERVICE_NAME:d,ATTR_SERVICE_VERSION:f}=o,p=new(jt(l))(new s({appToken:At}));this.subscription.add(this.paused$.subscribe(e=>{e?p.pause():p.resume()}));let m=new c({resource:u({[d]:`videoplayer-sdk-web`,[f]:v}),spanLimits:{attributeCountLimit:1/0,eventCountLimit:1/0,attributePerEventCountLimit:1/0},spanProcessors:[p]});m.register();let h=m.getTracer(`sdk-videoplayer-tracer`);super.init({name:e,getParentContext:t,getRootTracerContext:()=>({tracer:h,attributes$:this.attributes$,paused$:this.paused$})},n)}getTraceId(){return this.isComponentTracerNotInitialized()?``:this.span.spanContext().traceId}setSpanAttributes(e){this.attributes$.next(f(f({},this.attributes$.getValue()),U(e)))}addSubscription(e){this.subscription.add(e)}}class Nt{constructor(e){this.fakeTraceId=void 0}log(e,t,n){}error(e,t,n){}critical(e,t,n){}createComponentTracer(e){return new Nt({name:e})}end(){}getTraceId(){return this.fakeTraceId}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}var G=()=>!0,K={level:0,filter:G,name:`Noname Tracer`,outputMethod:`log`};class Pt{constructor({name:e,level:t,filter:n,outputMethod:r}={}){this.name=void 0,this.filter=G,this.level=K.level,this.outputMethod=K.outputMethod,this.childTracers=[],this.filter=n??this.filter,this.level=t??this.level,this.outputMethod=r??this.outputMethod,this.name=e??K.name}log(e,t,n){this.logDebug(e,t)}error(e,t,n){this.logError(e,t)}critical(e,t,n){this.logError(e,t)}createComponentTracer(e){let t=new Pt({filter:this.filter,level:this.level,name:`${this.name}/ ${e}`,outputMethod:this.outputMethod});return this.childTracers.push(t),t}end(){this.childTracers.forEach(e=>e.end()),this.childTracers=[]}setLevel(e){this.level=e,this.childTracers.forEach(t=>t.setLevel(e))}setOtputMethod(e){this.outputMethod=e,this.childTracers.forEach(t=>t.setOtputMethod(e))}setFilter(e){this.filter=e,this.childTracers.forEach(t=>t.setFilter(e))}getFinishedSpans(){}getTraceId(){return`debug_trace`}get verbose(){return this.level===0}createMessage(e,t){return[this.name,e,JSON.stringify(t)].join(`: `)}logDebug(e,t){!this.verbose||!this.filter(e,t)||D().console[this.outputMethod](this.createMessage(e,t))}logError(e,t){this.filter(e,t)&&D().console.error(this.createMessage(e,t))}addSubscription(e){}setSpanAttributes(e){}pause(){}resume(){}}class Ft{static createRootTracer(e=`fake`,t){switch(e){case`real`:return new Mt(t);case`debug`:return new Pt;default:return new Nt}}}var It;(e=>{e.NETWORK=`network`,e.VIDEO_PIPELINE=`video_pipeline`,e.EXTERNAL_API=`external_api`,e.PARSER=`parser`,e.DOM=`dom`,e.WTF=`wtf`,e.UI=`ui`,e.CALL_FROM_EXTERNAL=`call_from_external`,e.FATAL=`fatal`})(It||={});var Lt;(e=>{e.Armenian=`58`,e.Azerbaijani=`57`,e.Belarusian=`114`,e.English=`3`,e.Kazakh=`97`,e.Portuguese=`73`,e.Russian=`0`,e.Spanish=`4`,e.Ukrainian=`1`,e.Uzbek=`65`,e.Vietnamese=`75`})(Lt||={});var Rt=`vk.ru`,zt=function(){var e=p(function*(e,t,n){let r=new URL(`https://${Rt}/js/lang-pack.js`);return r.searchParams.set(`format`,`json`),r.searchParams.set(`name`,t),e!==void 0&&r.searchParams.set(`lang`,e),Bt(yield(yield fetch(r.toString())).json(),n)});return function(t,n,r){return e.apply(this,arguments)}}(),Bt=(e,t)=>Object.fromEntries(Object.entries(e.keys).map(([e,n])=>[e.substring(`${t}_`.length),Vt(n)])),Vt=e=>Array.isArray(e)?e[0]:e,Ht;(e=>{e.RU=`ru`,e.EN=`en`})(Ht||={});var q=`__vk_vp_internals_exposure`;class Ut{constructor(e,t){this.playerId=void 0,this.type=void 0,this.playerId=t,this.type=e,this.initWindowObjects()}getWindowObject(){var e;if(typeof window>`u`)return{};let t=this.playerId,n=this.type;return((e=window[q])==null||(e=e[t])==null?void 0:e[n])??{}}initWindowObjects(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[q]||(window[q]={}),window[q][e]||(window[q][e]={}),window[q][e][t]||(window[q][e][t]={})}expose(e){typeof window>`u`||Object.assign(this.getWindowObject(),e)}destroy(){if(typeof window>`u`)return;let e=this.playerId,t=this.type;window[q]&&window[q][e]&&window[q][e][t]&&(delete window[q][e][t],Object.keys(window[q][e]).length||delete window[q][e],Object.keys(window[q]).length||delete window[q])}}var Wt={};_(Wt,{subscribe:()=>Jt,push:()=>qt,destroy:()=>Kt,create:()=>Gt});var J=new Map,Gt=(e,t)=>J.set(e,t??[]),Kt=e=>J.delete(e),qt=(e,t)=>{let n=J.get(e);n&&(typeof n==`function`?n(t):n.push(t))},Jt=(e,t)=>{let n=J.get(e);if(n){if(n&&Array.isArray(n))for(let e of n)t(e);J.set(e,t)}},Yt=e=>oe({id:e.id,message:e.message,category:e.category,data:Xt(e.data),httpCode:e.httpCode,UVBackendErrorCode:e.UVBackendErrorCode});function Xt(e){switch(typeof e){case`boolean`:case`string`:case`number`:return e;case`object`:try{return JSON.stringify(e)}catch{return}default:return}}var Zt=e=>{let t=e.thrown instanceof Error?e.thrown:Error(e.message),n=e.id.length>10240?e.id.substring(0,10240):e.id;try{t.name=n}catch{t=Error(e.message),t.name=n}return t},Qt=()=>{try{var e;let{origin:t,pathname:n,search:r,hostname:i}=((e=D())==null||(e=e.document)==null?void 0:e.location)??{};return!i||i===`localhost`?void 0:f({url:t+n},new URLSearchParams(r).entries().reduce((e,[t,n])=>(e[`url.${t}`]=n,e),{}))}catch{}};class Y{constructor(e,t,n,r){this.dynamicImportTimeout=5e3,this.componentName=void 0,this.subscription=new y,this.options=void 0,this.envParams=void 0,this.context=void 0,this.isEmbed=void 0,this.embedParent=void 0,this.beforeInitErrors=[],this.componentName=e,this.options=t,this.envParams=n,this.context=f({},r);let{isEmbed:i,topOrigin:a}=Se();this.isEmbed=i,this.embedParent=a?new URL(a).hostname:void 0,this.options.enabled&&(this.loadModule(),this.init())}updateContext(e){Object.assign(this.context,e)}error(e,t){let n=Y.tracerErrorMap.get(this.componentName);if(!n){this.beforeInitErrors.push([e,t]);return}let{blackErrorCategoryList:r,blackErrorIdList:i,sampleRate:a,whiteErrorCategoryList:o,whiteErrorIdList:s}=this.options,{id:c,category:l}=e;if(!(r.length&&r.includes(l)||i.length&&i.includes(c)||o.length&&!o.includes(l)||s.length&&!s.includes(c)||Math.random()>=a))try{let r=Zt(e);n?.error(r,f(f({crashIdSource:t?.crashIdSource??r.name,severity:t?.severity??(e.traceAsLog?`debug`:void 0)},t?.issueKey?{issueKey:t.issueKey}:{}),{},{keys:f(f(f(f({},this.context),Yt(e)),Qt()),this.isEmbed&&this.embedParent&&{iframe_host:this.embedParent})}))}catch(e){console.error(e)}}addSubscription(e){this.subscription.add(e)}destroy(){this.subscription.unsubscribe()}init(){var e=this;return p(function*(){try{if(yield Y.loadPromise,Y.tracerErrorMap.has(e.componentName)||E(Y.appTracerModule))return;let{appTracerModule:t}=Y,{initTracerError:n,initTracerErrorUploader:r,getTracerModules:i}=t,a=i(e.componentName),o=!a.error,s=a.error??n(e.componentName,{enableUnhandledErrorsListeners:!1,stringifyErrorDataObject:!0});T(e.options.userId)&&s.setUserId(e.options.userId),o&&r(e.componentName,{appToken:At,environment:e.envParams.env,versionCode:1,versionName:e.envParams.version}),Y.tracerErrorMap.set(e.componentName,s),e.beforeInitErrors.forEach(t=>e.error.apply(e,t)),e.beforeInitErrors=[]}catch(e){console.error(e)}})()}loadModule(){var e=this;T(Y.loadPromise)||(Y.loadPromise=function(){var t=p(function*(){try{let t=new Promise((t,n)=>D().setTimeout(n,e.dynamicImportTimeout));Y.appTracerModule=yield Promise.race([t,import(`@apptracer/sdk/lite`)])}catch(e){Y.loadPromise=null,console.error(e)}});return function(){return t.apply(this,arguments)}}()())}}Y.tracerErrorMap=new Map,Y.appTracerModule=null,Y.loadPromise=null;class $t{constructor(e,t){this.options=void 0,this.symbol=void 0,this.options=t,this.symbol=Symbol(e)}}var en=()=>{let e=new Map,t=new Map,n=new Map,r=new Map,i=new Set;return{resolve(e){if(!r.has(e)){let t=n.get(e);if(!t)throw Error(`No constructor registered in DI container for ${e.name}`);r.set(e,new t)}return r.get(e)},resolveOptional(e){try{return this.resolve(e)}catch{return}},replace(e,t){r.forEach((t,n)=>{t instanceof e&&r.delete(n)}),n.set(e,t)},getToken(n){if(e.has(n.symbol))return e.get(n.symbol);if(t.has(n.symbol)){let r=t.get(n.symbol)();return e.set(n.symbol,r),r}if(n.options?.factory){let t=n.options.factory();return e.set(n.symbol,t),t}throw Error(`No value registered in DI container for token "${n.symbol.description}"`)},registerToken(t,n){e.set(t.symbol,n)},registerFactory(e,n){t.set(e.symbol,n)},hasToken(n){return e.has(n.symbol)||t.has(n.symbol)||!!n.options?.factory},registerCleanup(e){i.add(e)},clear(){i.forEach(e=>e()),i.clear(),e.clear(),t.clear(),r.clear(),n.clear()}}},tn=(e,t)=>{let n=e.length,r=t>=0?t:n+t;return r>=0&&r<n?e[r]:void 0},nn=(e,t)=>{for(let n=e.length-1;n>=0;n--){let r=e[n];if(t(r,n,e))return r}},rn=(e,t)=>{for(let n=e.length-1;n>=0;n--)if(t(e[n],n,e))return n;return-1},an=(e,t=1)=>{let n=[],r=(e,t)=>{for(let i=0;i<e.length;i++){if(!(i in e))continue;let a=e[i];t>0&&Array.isArray(a)?r(a,t-1):n.push(a)}};return r(e,t),n},on=(e,t)=>{let n=[];for(let r=0;r<e.length;r++){let i=t(e[r],r,e);if(Array.isArray(i))for(let e=0;e<i.length;e++)n.push(i[e]);else n.push(i)}return n},sn=(e,t,n=0)=>{let r=e.length,i=n>=0?n:Math.max(r+n,0);for(;i<r;i++){let n=e[i];if(n===t||n!==n&&t!==t)return!0}return!1},cn=e=>{let t=e.length,n=Array(t);for(let r=0;r<t;r++)n[r]=e[t-1-r];return n},ln=(e,t)=>{let n=e.slice();return t?n.sort(t):n.sort()},un=(e,t,n,...r)=>{let i=e.slice();return n===void 0?i.splice(t):i.splice(t,n,...r),i},dn=(e,t,n)=>{let r=e.length,i=t>=0?t:r+t,a=e.slice();return a[i]=n,a},fn=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof self<`u`?self:Function(`return this`)(),pn=e=>{let t=[],n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r];t.push([i,e[i]])}return t},mn=e=>{let t={};for(let[n,r]of e)t[n]=r;return t},hn=Object.prototype.hasOwnProperty,gn=(e,t)=>hn.call(e,t),_n=e=>{let t=Object.keys(e),n=Array(t.length);for(let r=0;r<t.length;r++)n[r]=e[t[r]];return n},vn=e=>{let t=Array.from(e);return t.length===0?Promise.resolve([]):Promise.all(t.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))},yn=e=>{let t=Array.from(e);return t.length===0?Promise.reject(AggregateError([],`All promises were rejected`)):new Promise((e,n)=>{let r=Array(t.length),i=t.length;t.forEach((t,a)=>{Promise.resolve(t).then(e,e=>{r[a]=e,--i,i===0&&n(AggregateError(r,`All promises were rejected`))})})})},bn=(e,t)=>e.then(e=>Promise.resolve(t()).then(()=>e),e=>Promise.resolve(t()).then(()=>{throw e})),xn=e=>{try{return Promise.resolve(e())}catch(e){return Promise.reject(e)}},Sn=()=>{let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}},{NativeAbortSignal:Cn,NativeAbortController:wn}=function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}}(typeof self<`u`?self:global);function Tn(e){let t;try{t=new Event(`abort`)}catch{typeof document<`u`?document.createEvent?(t=document.createEvent(`Event`),t.initEvent(`abort`,!1,!1)):(t=document.createEventObject(),t.type=`abort`):t={type:`abort`,bubbles:!1,cancelable:!1}}return t.reason=e,t}function En(e){if(e===void 0)if(typeof document>`u`)e=Error(`This operation was aborted`),e.name=`AbortError`;else try{e=new DOMException(`signal is aborted without reason`),Object.defineProperty(e,"name",{value:`AbortError`})}catch{e=Error(`This operation was aborted`),e.name=`AbortError`}return e}class Dn{constructor(){Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}addEventListener(e,t,n){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push({callback:t,options:n})}removeEventListener(e,t){if(!(e in this.listeners))return;let n=this.listeners[e];for(let e=0,r=n.length;e<r;e++)if(n[e].callback===t){n.splice(e,1);return}}dispatchEvent(e){if(!(e.type in this.listeners))return;let t=this.listeners[e.type].slice();for(let n=0,r=t.length;n<r;n++){let r=t[n];try{r.callback.call(this,e)}catch(e){Promise.resolve().then(()=>{throw e})}r.options&&r.options.once&&this.removeEventListener(e.type,r.callback)}return!e.defaultPrevented}}class X extends Dn{constructor(){super(),this.listeners||Dn.call(this),Object.defineProperty(this,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(this,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(this,"reason",{value:void 0,writable:!0,configurable:!0})}toString(){return`[object AbortSignal]`}dispatchEvent(e){e.type===`abort`&&(this.aborted=!0,typeof this.onabort==`function`&&this.onabort.call(this,e)),super.dispatchEvent(e)}throwIfAborted(){let{aborted:e,reason:t=`Aborted`}=this;if(e)throw t}static timeout(e){let t=new Z;return setTimeout(()=>t.abort(new DOMException(`This signal is timeout in ${e}ms`,`TimeoutError`)),e),t.signal}static any(e){let t=new Z;function n(){t.abort(this.reason),r()}function r(){for(let t of e)t.removeEventListener(`abort`,n)}for(let r of e)if(r.aborted){t.abort(r.reason);break}else r.addEventListener(`abort`,n);return t.signal}}class Z{constructor(){Object.defineProperty(this,"signal",{value:new X,writable:!0,configurable:!0})}abort(e){let t=En(e),n=Tn(t);this.signal.reason=t,this.signal.dispatchEvent(n)}toString(){return`[object AbortController]`}}typeof Symbol<`u`&&Symbol.toStringTag&&(Z.prototype[Symbol.toStringTag]=`AbortController`,X.prototype[Symbol.toStringTag]=`AbortSignal`);function On(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log(`__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill`),!0):typeof e.Request==`function`&&!e.Request.prototype.hasOwnProperty(`signal`)||!e.AbortController}function kn(e){typeof e==`function`&&(e={fetch:e});let{fetch:t,Request:n=t.Request,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i=!1}=e;if(!On({fetch:t,Request:n,AbortController:r,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:i}))return{fetch:t,Request:a};let a=n;(a&&!a.prototype.hasOwnProperty(`signal`)||i)&&(a=function(e,t){let r;t&&t.signal&&(r=t.signal,delete t.signal);let i=new n(e,t);return r&&Object.defineProperty(i,"signal",{writable:!1,enumerable:!1,configurable:!0,value:r}),i},a.prototype=n.prototype);let o=t;return{fetch:(e,t)=>{let n=a&&a.prototype.isPrototypeOf(e)?e.signal:t?t.signal:void 0;if(n){let r;try{r=new DOMException(`Aborted`,`AbortError`)}catch{r=Error(`Aborted`),r.name=`AbortError`}if(n.aborted)return Promise.reject(r);let i=new Promise((e,t)=>{n.addEventListener(`abort`,()=>t(r),{once:!0})});return t&&t.signal&&delete t.signal,Promise.race([i,o(e,t)])}return o(e,t)},Request:a}}var Q=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window,$=`fetch`in Q&&On({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}),An=$?kn({fetch:Q.fetch,Request:Q.Request,AbortController:Q.AbortController}):void 0,jn=$?An.fetch:Q.fetch,Mn=$?An.Request:Q.Request,Nn=$?Z:Q.AbortController,Pn=$?X:Q.AbortSignal,Fn=(e,t)=>{let n=e.length,r=t>=0?t:n+t;if(r<0||r>=n)return;let i=e.charCodeAt(r);if(i>=55296&&i<=56319&&r+1<n){let t=e.charCodeAt(r+1);if(t>=56320&&t<=57343)return e[r]+e[r+1]}return e[r]};function*In(e,t){let n=t.flags.includes(`g`)?t.flags:t.flags+`g`,r=new RegExp(t.source,n),i;for(;(i=r.exec(e))!==null;)yield i,i[0].length===0&&r.lastIndex++}var Ln=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return e+n.repeat(Math.ceil(r/n.length)).slice(0,r)},Rn=(e,t,n=` `)=>{if(n===``||e.length>=t)return e;let r=t-e.length;return n.repeat(Math.ceil(r/n.length)).slice(0,r)+e},zn=(e,t,n)=>{if(typeof t==`string`){if(typeof n==`string`)return t===``?n+e.split(``).join(n)+n:e.split(t).join(n);let r=[],i=0,a=e.indexOf(t,i);for(;a!==-1;)r.push(e.slice(i,a)),r.push(n(t,a,e)),i=a+t.length,a=e.indexOf(t,i);return r.push(e.slice(i)),r.join(``)}let r=t.flags.includes(`g`)?t.flags:t.flags+`g`,i=new RegExp(t.source,r);return e.replace(i,n)},Bn=e=>e.replace(/^\s+/,``),Vn=e=>e.replace(/\s+$/,``),Hn=Bn,Un=Vn,Wn=(e,t)=>typeof e==`string`?Fn(e,t):tn(e,t),Gn=(e,t={})=>{let n=t.timeout||1,r=performance.now();return Q.setTimeout(()=>{e({get didTimeout(){return t.timeout?!1:performance.now()-r-1>n},timeRemaining(){return Math.max(0,1+(performance.now()-r))}})},1)},Kn=e=>Q.clearTimeout(e),qn=e=>typeof e==`function`&&e?.toString().endsWith(`{ [native code] }`),Jn=!qn(Q.requestIdleCallback)||!qn(Q.cancelIdleCallback),Yn=Jn?Gn:Q.requestIdleCallback,Xn=Jn?Kn:Q.cancelIdleCallback,Zn=(e,t,n)=>typeof e==`string`?e.includes(t,n):sn(e,t,n),Qn=(e,t,n)=>{if(typeof e.canParse==`function`)return e.canParse(t,n);try{return new e(t,n),!0}catch{return!1}};;return{oe,Ae,je,ke,Qn,He,Fe,Le,et,pt,Dt,Bn,Un,Hn,Vn,zn,Rn,Ln,In,Fn,ht,_t,he,Yn,Sn,xn,bn,yn,vn,dt,ut,yt,Ge,_n,gn,mn,pn,fe,de,x,Ve,lt,z,zt,xt,E,T,Ee,N,P,St,Te,we,le,V,Ue,Tt,Zn,fn,D,Pe,kt,Et,wt,Ot,De,me,Ke,B,ot,nt,F,jn,Wt,Se,Ie,Ze,en,Be,I,Re,bt,te,Xn,Je,Wn,Ne,ae,se,ie,b,ce,dn,un,ln,cn,sn,on,an,rn,nn,tn,Me,ue,pe,Ce,L,Lt,v,Ft,qe,y,w,Mn,ze,C,re,Ut,Ht,$t,q,It,H,Y,Pn,Nn};}();var{oe:_oxcModek9n7c_oe,Ae:_oxcModek9n7c_Ae,je:_oxcModek9n7c_je,ke:_oxcModek9n7c_ke,Qn:_oxcModek9n7c_Qn,He:_oxcModek9n7c_He,Fe:_oxcModek9n7c_Fe,Le:_oxcModek9n7c_Le,et:_oxcModek9n7c_et,pt:_oxcModek9n7c_pt,Dt:_oxcModek9n7c_Dt,Bn:_oxcModek9n7c_Bn,Un:_oxcModek9n7c_Un,Hn:_oxcModek9n7c_Hn,Vn:_oxcModek9n7c_Vn,zn:_oxcModek9n7c_zn,Rn:_oxcModek9n7c_Rn,Ln:_oxcModek9n7c_Ln,In:_oxcModek9n7c_In,Fn:_oxcModek9n7c_Fn,ht:_oxcModek9n7c_ht,_t:_oxcModek9n7c__t,he:_oxcModek9n7c_he,Yn:_oxcModek9n7c_Yn,Sn:_oxcModek9n7c_Sn,xn:_oxcModek9n7c_xn,bn:_oxcModek9n7c_bn,yn:_oxcModek9n7c_yn,vn:_oxcModek9n7c_vn,dt:_oxcModek9n7c_dt,ut:_oxcModek9n7c_ut,yt:_oxcModek9n7c_yt,Ge:_oxcModek9n7c_Ge,_n:_oxcModek9n7c__n,gn:_oxcModek9n7c_gn,mn:_oxcModek9n7c_mn,pn:_oxcModek9n7c_pn,fe:_oxcModek9n7c_fe,de:_oxcModek9n7c_de,x:_oxcModek9n7c_x,Ve:_oxcModek9n7c_Ve,lt:_oxcModek9n7c_lt,z:_oxcModek9n7c_z,zt:_oxcModek9n7c_zt,xt:_oxcModek9n7c_xt,E:_oxcModek9n7c_E,T:_oxcModek9n7c_T,Ee:_oxcModek9n7c_Ee,N:_oxcModek9n7c_N,P:_oxcModek9n7c_P,St:_oxcModek9n7c_St,Te:_oxcModek9n7c_Te,we:_oxcModek9n7c_we,le:_oxcModek9n7c_le,V:_oxcModek9n7c_V,Ue:_oxcModek9n7c_Ue,Tt:_oxcModek9n7c_Tt,Zn:_oxcModek9n7c_Zn,fn:_oxcModek9n7c_fn,D:_oxcModek9n7c_D,Pe:_oxcModek9n7c_Pe,kt:_oxcModek9n7c_kt,Et:_oxcModek9n7c_Et,wt:_oxcModek9n7c_wt,Ot:_oxcModek9n7c_Ot,De:_oxcModek9n7c_De,me:_oxcModek9n7c_me,Ke:_oxcModek9n7c_Ke,B:_oxcModek9n7c_B,ot:_oxcModek9n7c_ot,nt:_oxcModek9n7c_nt,F:_oxcModek9n7c_F,jn:_oxcModek9n7c_jn,Wt:_oxcModek9n7c_Wt,Se:_oxcModek9n7c_Se,Ie:_oxcModek9n7c_Ie,Ze:_oxcModek9n7c_Ze,en:_oxcModek9n7c_en,Be:_oxcModek9n7c_Be,I:_oxcModek9n7c_I,Re:_oxcModek9n7c_Re,bt:_oxcModek9n7c_bt,te:_oxcModek9n7c_te,Xn:_oxcModek9n7c_Xn,Je:_oxcModek9n7c_Je,Wn:_oxcModek9n7c_Wn,Ne:_oxcModek9n7c_Ne,ae:_oxcModek9n7c_ae,se:_oxcModek9n7c_se,ie:_oxcModek9n7c_ie,b:_oxcModek9n7c_b,ce:_oxcModek9n7c_ce,dn:_oxcModek9n7c_dn,un:_oxcModek9n7c_un,ln:_oxcModek9n7c_ln,cn:_oxcModek9n7c_cn,sn:_oxcModek9n7c_sn,on:_oxcModek9n7c_on,an:_oxcModek9n7c_an,rn:_oxcModek9n7c_rn,nn:_oxcModek9n7c_nn,tn:_oxcModek9n7c_tn,Me:_oxcModek9n7c_Me,ue:_oxcModek9n7c_ue,pe:_oxcModek9n7c_pe,Ce:_oxcModek9n7c_Ce,L:_oxcModek9n7c_L,Lt:_oxcModek9n7c_Lt,v:_oxcModek9n7c_v,Ft:_oxcModek9n7c_Ft,qe:_oxcModek9n7c_qe,y:_oxcModek9n7c_y,w:_oxcModek9n7c_w,Mn:_oxcModek9n7c_Mn,ze:_oxcModek9n7c_ze,C:_oxcModek9n7c_C,re:_oxcModek9n7c_re,Ut:_oxcModek9n7c_Ut,Ht:_oxcModek9n7c_Ht,$t:_oxcModek9n7c_$t,q:_oxcModek9n7c_q,It:_oxcModek9n7c_It,H:_oxcModek9n7c_H,Y:_oxcModek9n7c_Y,Pn:_oxcModek9n7c_Pn,Nn:_oxcModek9n7c_Nn}=_oxcModek9n7c;export{_oxcModek9n7c_oe as withoutNullable,_oxcModek9n7c_Ae as videoSizeToQuality,_oxcModek9n7c_je as videoQualityToHeight,_oxcModek9n7c_ke as videoHeightToQuality,_oxcModek9n7c_Qn as urlCanParsePolyfilled,_oxcModek9n7c_He as timeout,_oxcModek9n7c_Fe as timeCodeToString,_oxcModek9n7c_Le as throttleFn,_oxcModek9n7c_et as throttle,_oxcModek9n7c_pt as tap,_oxcModek9n7c_Dt as suppressAbort,_oxcModek9n7c_Bn as stringTrimStart,_oxcModek9n7c_Un as stringTrimRight,_oxcModek9n7c_Hn as stringTrimLeft,_oxcModek9n7c_Vn as stringTrimEnd,_oxcModek9n7c_zn as stringReplaceAll,_oxcModek9n7c_Rn as stringPadStart,_oxcModek9n7c_Ln as stringPadEnd,_oxcModek9n7c_In as stringMatchAll,_oxcModek9n7c_Fn as stringAt,_oxcModek9n7c_ht as skip,_oxcModek9n7c__t as shareReplay,_oxcModek9n7c_he as safeStorage,_oxcModek9n7c_Yn as requestIdleCallbackPolyfilled,_oxcModek9n7c_Sn as promiseWithResolvers,_oxcModek9n7c_xn as promiseTry,_oxcModek9n7c_bn as promiseFinally,_oxcModek9n7c_yn as promiseAny,_oxcModek9n7c_vn as promiseAllSettled,_oxcModek9n7c_dt as pairwise,_oxcModek9n7c_ut as once,_oxcModek9n7c_yt as observeElementSize,_oxcModek9n7c_Ge as observableFrom,_oxcModek9n7c__n as objectValues,_oxcModek9n7c_gn as objectHasOwn,_oxcModek9n7c_mn as objectFromEntries,_oxcModek9n7c_pn as objectEntries,_oxcModek9n7c_fe as nowInt,_oxcModek9n7c_de as now,_oxcModek9n7c_x as noop,_oxcModek9n7c_Ve as merge,_oxcModek9n7c_lt as mapTo,_oxcModek9n7c_z as map,_oxcModek9n7c_zt as loadVKLangPack,_oxcModek9n7c_xt as isValidURL,_oxcModek9n7c_E as isNullable,_oxcModek9n7c_T as isNonNullable,_oxcModek9n7c_Ee as isLowerOrEqual,_oxcModek9n7c_N as isLower,_oxcModek9n7c_P as isInvariantQuality,_oxcModek9n7c_St as isIntersecting,_oxcModek9n7c_Te as isHigherOrEqual,_oxcModek9n7c_we as isHigher,_oxcModek9n7c_le as isBrowserWindow,_oxcModek9n7c_V as isAbortError,_oxcModek9n7c_Ue as interval,_oxcModek9n7c_Tt as interpolate,_oxcModek9n7c_Zn as includesPolyfilled,_oxcModek9n7c_fn as globalThisPolyfill,_oxcModek9n7c_D as getWindow,_oxcModek9n7c_Pe as getVideoQualityLabel,_oxcModek9n7c_kt as getTraceSubscriptionMethod,_oxcModek9n7c_Et as getRangeAroundIndex,_oxcModek9n7c_wt as getPlayerId,_oxcModek9n7c_Ot as getMessageFromError,_oxcModek9n7c_De as getHighestQuality,_oxcModek9n7c_me as getExponentialDelay,_oxcModek9n7c_Ke as fromEvent,_oxcModek9n7c_B as flattenObject,_oxcModek9n7c_ot as filterChanged,_oxcModek9n7c_nt as filter,_oxcModek9n7c_F as fillWithDefault,_oxcModek9n7c_jn as fetchPolyfilled,_oxcModek9n7c_Wt as devNull,_oxcModek9n7c_Se as detectEmbed,_oxcModek9n7c_Ie as debounceFn,_oxcModek9n7c_Ze as debounce,_oxcModek9n7c_en as createDIContainer,_oxcModek9n7c_Be as combine,_oxcModek9n7c_I as cloneDeepWith,_oxcModek9n7c_Re as cloneDeep,_oxcModek9n7c_bt as clearVideoElement,_oxcModek9n7c_te as checkNever,_oxcModek9n7c_Xn as cancelIdleCallbackPolyfilled,_oxcModek9n7c_Je as buffer,_oxcModek9n7c_Wn as atPolyfilled,_oxcModek9n7c_Ne as assertQualityIsExact,_oxcModek9n7c_ae as assertNullable,_oxcModek9n7c_se as assertNotEmptyArray,_oxcModek9n7c_ie as assertNonNullable,_oxcModek9n7c_b as assertNever,_oxcModek9n7c_ce as assertEmptyArray,_oxcModek9n7c_dn as arrayWith,_oxcModek9n7c_un as arrayToSpliced,_oxcModek9n7c_ln as arrayToSorted,_oxcModek9n7c_cn as arrayToReversed,_oxcModek9n7c_sn as arrayIncludes,_oxcModek9n7c_on as arrayFlatMap,_oxcModek9n7c_an as arrayFlat,_oxcModek9n7c_rn as arrayFindLastIndex,_oxcModek9n7c_nn as arrayFindLast,_oxcModek9n7c_tn as arrayAt,_oxcModek9n7c_Me as areQualitiesExact,_oxcModek9n7c_ue as addScript,_oxcModek9n7c_pe as abortable,_oxcModek9n7c_Ce as VideoQuality,_oxcModek9n7c_L as ValueSubject,_oxcModek9n7c_Lt as VKNumericLanguage,_oxcModek9n7c_v as VERSION,_oxcModek9n7c_Ft as TracerFactory,_oxcModek9n7c_qe as SubscriptionRemovable,_oxcModek9n7c_y as Subscription,_oxcModek9n7c_w as Subject,_oxcModek9n7c_Mn as RequestPolyfilled,_oxcModek9n7c_ze as ReplaySubject,_oxcModek9n7c_C as Observable,_oxcModek9n7c_re as Logger,_oxcModek9n7c_Ut as InternalsExposure,_oxcModek9n7c_Ht as InterfaceLanguage,_oxcModek9n7c_$t as InjectionToken,_oxcModek9n7c_q as INTERNAL_EXPOSE_GLOBAL_KEY,_oxcModek9n7c_It as ErrorCategory,_oxcModek9n7c_H as CircularBuffer,_oxcModek9n7c_Y as AppTracer,_oxcModek9n7c_Pn as AbortSignalPolyfilled,_oxcModek9n7c_Nn as AbortControllerPolyfilled};
|